diff --git a/modules/Accounts/AccountHierarchy.php b/modules/Accounts/AccountHierarchy.php new file mode 100644 index 0000000..b36a408 --- /dev/null +++ b/modules/Accounts/AccountHierarchy.php @@ -0,0 +1,43 @@ +assign("CATEGORY",$parent_tab); + +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("MODULE",$currentModule); + +$check_button = Button_Check($currentModule); +$check_button['Import'] = 'no'; +$check_button['Export'] = 'no'; +$check_button['moduleSettings'] = 'no'; +$smarty->assign("CHECK", $check_button); + +$focus = CRMEntity::getInstance($currentModule); +$accountid = vtlib_purify($_REQUEST['accountid']); +if (!empty($accountid)) { + $hierarchy = $focus->getAccountHierarchy($accountid); +} +$smarty->assign("ACCOUNT_HIERARCHY",$hierarchy); +$smarty->display("AccountHierarchy.tpl"); + +?> \ No newline at end of file diff --git a/modules/Accounts/Accounts.js b/modules/Accounts/Accounts.js new file mode 100644 index 0000000..5db2c21 --- /dev/null +++ b/modules/Accounts/Accounts.js @@ -0,0 +1,404 @@ +/********************************************************************************* + +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + + +document.write(" +pquery($sql, array($templateid)); +$temparray = $adb->fetch_array($result); + +$fileContent = $temparray['data']; +$filename=html_entity_decode($temparray['filename'], ENT_QUOTES, $default_charset); +// Fix For: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$filename= $randomfilename . "_word.doc"; + +$filesize=$temparray['filesize']; +$wordtemplatedownloadpath =$root_directory ."/test/wordtemplatedownload/"; + +$handle = fopen($wordtemplatedownloadpath.$filename,"wb"); +fwrite($handle,base64_decode($fileContent),$filesize); +fclose($handle); + +//<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>> +$mass_merge = $_REQUEST['allselectedboxes']; +$single_record = $_REQUEST['record']; + +if($mass_merge != "") +{ + $mass_merge = explode(";",$mass_merge); + $temp_mass_merge = $mass_merge; + if(array_pop($temp_mass_merge)=="") + array_pop($mass_merge); + //$mass_merge = implode(",",$mass_merge); +}else if($single_record != "") +{ + $mass_merge = $single_record; +}else +{ + die("Record Id is not found, cannot merge the document"); +} + +//echo $mass_merge; +//die; +//for setting vtiger_accountid=0 for the contacts which are deleted +$ct_query = "select crmid from vtiger_crmentity where setype='Contacts' and deleted=1"; +$result = $adb->pquery($ct_query, array()); + +while($row = $adb->fetch_array($result)) +{ + $deleted_id[] = $row['crmid']; +} + +if(count($deleted_id) > 0) +{ + $update_query = "update vtiger_contactdetails set accountid = 0 where contactid in (". generateQuestionMarks($deleted_id) .")"; + $result = $adb->pquery($update_query, array($deleted_id)); +} +//End setting vtiger_accountid=0 for the contacts which are deleted + +//<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>> +global $current_user; +require('user_privileges/user_privileges_'.$current_user->id.'.php'); +if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || $module == "Users" || $module == "Emails") +{ + $query1="select vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid in (4,6) and vtiger_field.block <> 75 and vtiger_field.presence in (0,2) order by vtiger_field.tablename"; + $params1 = array(); +} +else +{ + $profileList = getCurrentUserProfileList(); + $query1="select vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid INNER JOIN vtiger_profile2field ON vtiger_profile2field.fieldid=vtiger_field.fieldid INNER JOIN vtiger_def_org_field ON vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid in (4,6) and vtiger_field.block <> 75 AND vtiger_profile2field.visible=0 AND vtiger_def_org_field.visible=0 AND vtiger_profile2field.profileid IN (". generateQuestionMarks($profileList) .") and vtiger_field.presence in (0,2) GROUP BY vtiger_field.fieldid order by vtiger_field.tablename"; + $params1 = array($profileList); + //Postgres 8 fixes + if( $adb->dbType == "pgsql") + $query1 = fixPostgresQuery( $query1, $log, 0); +} + +$result = $adb->pquery($query1, $params1); +$y=$adb->num_rows($result); +$userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); +$contactUserNameSql = getSqlForNameInDisplayFormat(array('first_name'=>'usersContacts.first_name', 'last_name' => + 'usersContacts.last_name'), 'Users'); + +for ($x=0; $x<$y; $x++) +{ + $tablename = $adb->query_result($result,$x,"tablename"); + $columnname = $adb->query_result($result,$x,"columnname"); + $modulename = $adb->query_result($result,$x,"name"); + + if($tablename == "crmentity") + { + if($modulename == "Contacts") + { + $tablename = "vtiger_crmentityContacts"; + } + } + $querycolumns[$x] = $tablename.".".$columnname; + if($columnname == "smownerid") + { + if($modulename == "Accounts") + { + $querycolumns[$x] = "case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as userjoinname,vtiger_users.first_name,vtiger_users.last_name,vtiger_users.user_name,vtiger_users.secondaryemail,vtiger_users.title,vtiger_users.phone_work,vtiger_users.department,vtiger_users.phone_mobile,vtiger_users.phone_other,vtiger_users.phone_fax,vtiger_users.email1,vtiger_users.phone_home,vtiger_users.email2,vtiger_users.address_street,vtiger_users.address_city,vtiger_users.address_state,vtiger_users.address_postalcode,vtiger_users.address_country"; + } + if($modulename == "Contacts") + { + $querycolumns[$x] = "case when (usersContacts.user_name not like '') then $contactUserNameSql else groupsContacts.groupname end as userjoincname"; + } + } + if($columnname == "parentid") + { + $querycolumns[$x] = "vtiger_accountAccount.accountname"; + } + if($columnname == "accountid") + { + $querycolumns[$x] = "vtiger_accountContacts.accountname"; + } + if($columnname == "reportsto") + { + $querycolumns[$x] = "vtiger_contactdetailsContacts.lastname"; + } + + if($modulename == "Accounts") + { + $field_label[$x] = "ACCOUNT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + if($columnname == "smownerid") + { + $field_label[$x] = $field_label[$x].",USER_FIRSTNAME,USER_LASTNAME,USER_USERNAME,USER_SECONDARYEMAIL,USER_TITLE,USER_OFFICEPHONE,USER_DEPARTMENT,USER_MOBILE,USER_OTHERPHONE,USER_FAX,USER_EMAIL,USER_HOMEPHONE,USER_OTHEREMAIL,USER_PRIMARYADDRESS,USER_CITY,USER_STATE,USER_POSTALCODE,USER_COUNTRY"; + } + } + + if($modulename == "Contacts") + { + $field_label[$x] = "CONTACT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + } + +} + +$csvheader = implode(",",$field_label); +//<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>> + +if(count($querycolumns) > 0) +{ + $selectcolumns = implode($querycolumns,","); + + $query = "select $selectcolumns from vtiger_account + inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_account.accountid + inner join vtiger_accountbillads on vtiger_account.accountid=vtiger_accountbillads.accountaddressid + inner join vtiger_accountshipads on vtiger_account.accountid=vtiger_accountshipads.accountaddressid + inner join vtiger_accountscf on vtiger_account.accountid = vtiger_accountscf.accountid + left join vtiger_account as vtiger_accountAccount on vtiger_accountAccount.accountid = vtiger_account.parentid + left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + left join vtiger_contactdetails on vtiger_contactdetails.accountid=vtiger_account.accountid + left join vtiger_crmentity as vtiger_crmentityContacts on vtiger_crmentityContacts.crmid = vtiger_contactdetails.contactid + left join vtiger_contactaddress on vtiger_contactdetails.contactid = vtiger_contactaddress.contactaddressid + left join vtiger_contactsubdetails on vtiger_contactdetails.contactid = vtiger_contactsubdetails.contactsubscriptionid + left join vtiger_contactscf on vtiger_contactdetails.contactid = vtiger_contactscf.contactid + left join vtiger_customerdetails on vtiger_contactdetails.contactid = vtiger_customerdetails.customerid + left join vtiger_contactdetails as vtiger_contactdetailsContacts on vtiger_contactdetailsContacts.contactid = vtiger_contactdetails.reportsto + left join vtiger_account as vtiger_accountContacts on vtiger_accountContacts.accountid = vtiger_contactdetails.accountid + left join vtiger_users as usersContacts on usersContacts.id = vtiger_crmentityContacts.smownerid + LEFT JOIN vtiger_groups as groupsContacts + ON groupsContacts.groupid = vtiger_crmentity.smownerid + where vtiger_crmentity.deleted=0 and (vtiger_crmentityContacts.deleted=0 || vtiger_crmentityContacts.deleted is null) and vtiger_account.accountid in(". generateQuestionMarks($mass_merge) .")"; + //echo $query; + //die; + $result = $adb->pquery($query, array($mass_merge)); +$avail_pick_arr = getAccessPickListValues('Accounts'); +while($columnValues = $adb->fetch_array($result)) +{ + $y=$adb->num_fields($result); + for($x=0; $x<$y; $x++) + { + $value = $columnValues[$x]; + foreach($columnValues as $key=>$val) + { + if($val == $value && $value != '') + { + if(array_key_exists($key,$avail_pick_arr)) + { + if(!in_array($val,$avail_pick_arr[$key])) + { + $value = "Not Accessible"; + } + } + } + } + //<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>> + if(trim($value) == "--None--" || trim($value) == "--none--") + { + $value = ""; + } + //<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>> + $actual_values[$x] = $value; + $actual_values[$x] = str_replace('"'," ",$actual_values[$x]); + //if value contains any line feed or carriage return replace the value with ".value." + if (preg_match ("/(\r?\n)/", $actual_values[$x])) + { + $actual_values[$x] = '"'.$actual_values[$x].'"'; + } + $actual_values[$x] = decode_html(str_replace(","," ",$actual_values[$x])); + } + $mergevalue[] = implode($actual_values,","); +} +$csvdata = implode($mergevalue,"###"); +}else +{ + die("No fields to do Merge"); +} + +// Fix for: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$datafilename = $randomfilename . "_data.csv"; + +$handle = fopen($wordtemplatedownloadpath.$datafilename,"wb"); +fwrite($handle,$csvheader."\r\n"); +fwrite($handle,str_replace("###","\r\n",$csvdata)); +fclose($handle); +?> + + + diff --git a/modules/Accounts/Popup.php b/modules/Accounts/Popup.php new file mode 100644 index 0000000..eb0e6e5 --- /dev/null +++ b/modules/Accounts/Popup.php @@ -0,0 +1,16 @@ + diff --git a/modules/Accounts/ProcessDuplicates.php b/modules/Accounts/ProcessDuplicates.php new file mode 100644 index 0000000..bb5047f --- /dev/null +++ b/modules/Accounts/ProcessDuplicates.php @@ -0,0 +1,134 @@ +pquery("SELECT count(*) AS count FROM vtiger_crmentity WHERE crmid=? and deleted=0", array($merge_id)); + $count = $adb->query_result($result,0,'count'); + + if($count > 0) + { + // First, save the primary record + $focus->mode="edit"; + setObjectValuesFromRequest($focus); + $focus->save($module); + $rec_values=$focus->column_fields; + + // Remove the id of primary record from the list of records to be deleted. + $del_value=explode(",",$recordids,-1); + $offset = array_search($merge_id,$del_value); + unset($del_value[$offset]); + + // Transfer the related lists of the records to be deleted, to the primary record's related list + if(method_exists($focus, 'transferRelatedRecords')){ + $focus->transferRelatedRecords($module,$del_value,$merge_id); + } else { + transferRelatedRecords($module,$del_value,$merge_id); + } + + // Delete the records by id specified in the list + foreach($del_value as $value) + { + DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$value,""); + } + } + + ?> + +assign("EDIT_DUPLICATE",""); + if($record_count == 2) { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + else { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[2]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[2]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + + $all_values_array=getRecordValues($exploded_id,$module); + $all_values=$all_values_array[0]; + $js_arr_val=$all_values_array[1]; + $fld_array=$all_values_array[2]; + $js_arr=implode(",",$js_arr_val); + + $imported_records = Array(); + $sql="select bean_id from vtiger_users_last_import where bean_type=? and deleted=0"; + $result = $adb->pquery($sql, array($module)); + $num_rows=$adb->num_rows($result); + $count=0; + for($i=0; $i<$num_rows;$i++) + { + foreach($exploded_id as $value) + if($value == $adb->query_result($result,$i,"bean_id")) + $count++; + array_push($imported_records,$adb->query_result($result,$i,"bean_id")); + } + + if ($record_count == $count) + $no_existing=1; + else + $no_existing=0; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("RECORD_COUNT",$record_count); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("MODULENAME", $module); + $smarty->assign("PARENT_TAB", $parent_tab); + $smarty->assign("JS_ARRAY", $js_arr); + $smarty->assign("ID_ARRAY", $exploded_id); + $smarty->assign("IDSTRING",$idstring); + $smarty->assign("ALLVALUES", $all_values); + $smarty->assign("FIELD_ARRAY", $fld_array); + $smarty->assign("IMPORTED_RECORDS", $imported_records); + $smarty->assign("NO_EXISTING", $no_existing); + $smarty->display("MergeFields.tpl"); +} + +?> diff --git a/modules/Accounts/QuickCreate.php b/modules/Accounts/QuickCreate.php new file mode 100644 index 0000000..8d5998b --- /dev/null +++ b/modules/Accounts/QuickCreate.php @@ -0,0 +1,12 @@ + diff --git a/modules/Accounts/Save.php b/modules/Accounts/Save.php new file mode 100644 index 0000000..f88fe9e --- /dev/null +++ b/modules/Accounts/Save.php @@ -0,0 +1,225 @@ +pquery($query, $params); + if($adb->num_rows($result) > 0) + { + echo $mod_strings['LBL_ACCOUNT_EXIST']; + } + else + { + echo 'SUCCESS'; + } + die; +} +//Ended + +$local_log =& LoggerManager::getLogger('index'); +global $log; +$focus = new Accounts(); +global $current_user; +$currencyid=fetchCurrency($current_user->id); +$rate_symbol = getCurrencySymbolandCRate($currencyid); +$rate = $rate_symbol['rate']; +$curr_symbol = $rate_symbol['symbol']; +if(isset($_REQUEST['record'])) +{ + $focus->id = $_REQUEST['record']; +$log->info("id is ".$focus->id); +} +if(isset($_REQUEST['mode'])) +{ + $focus->mode = $_REQUEST['mode']; +} + +foreach($focus->column_fields as $fieldname => $val) +{ + if(isset($_REQUEST[$fieldname])) + { + if(is_array($_REQUEST[$fieldname])) + $value = $_REQUEST[$fieldname]; + else + $value = trim($_REQUEST[$fieldname]); + $log->DEBUG($fieldname."=Field Name &first& Value =".$value); + $focus->column_fields[$fieldname] = $value; + } +} + +if($_REQUEST['assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} + +//When changing the Account Address Information it should also change the related contact address - dina +if($focus->mode == 'edit' && $_REQUEST['address_change'] == 'yes') +{ + $query = "update vtiger_contactaddress set mailingcity=?,mailingstreet=?,mailingcountry=?,mailingzip=?,mailingpobox=?,mailingstate=?,othercountry=?,othercity=?,otherstate=?,otherzip=?,otherstreet=?,otherpobox=? where contactaddressid in (select contactid from vtiger_contactdetails where accountid=?)" ; + $params = array($focus->column_fields['bill_city'], $focus->column_fields['bill_street'], $focus->column_fields['bill_country'], + $focus->column_fields['bill_code'], $focus->column_fields['bill_pobox'], $focus->column_fields['bill_state'], $focus->column_fields['ship_country'], + $focus->column_fields['ship_city'], $focus->column_fields['ship_state'], $focus->column_fields['ship_code'], $focus->column_fields['ship_street'], + $focus->column_fields['ship_pobox'], $focus->id); + $adb->pquery($query, $params); +} +//Changing account address - Ends + +$focus->save("Accounts"); +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == "Campaigns") +{ + if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") + { + $campAccStatusResult = $adb->pquery("select campaignrelstatusid from vtiger_campaignaccountrel where campaignid=? AND accountid=?",array($_REQUEST['return_id'], $focus->id)); + $accountStatus = $adb->query_result($campAccStatusResult,0,'campaignrelstatusid'); + $sql = "delete from vtiger_campaignaccountrel where accountid = ?"; + $adb->pquery($sql, array($focus->id)); + if(isset($accountStatus) && $accountStatus!=''){ + $sql = "insert into vtiger_campaignaccountrel values (?,?,?)"; + $adb->pquery($sql, array($_REQUEST['return_id'], $focus->id,$accountStatus)); + } + else{ + $sql = "insert into vtiger_campaignaccountrel values (?,?,1)"; + $adb->pquery($sql, array($_REQUEST['return_id'], $focus->id)); + } + } +} +$return_id = $focus->id; + +$parenttab = getParentTab(); +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']); +else $return_module = "Accounts"; +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']); +else $return_action = "DetailView"; +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']); + +$local_log->debug("Saved record with id of ".$return_id); + +//code added for returning back to the current view after edit from list view +if($_REQUEST['return_viewname'] == '') $return_viewname='0'; +if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']); + +header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']).$search); +/** Function to save Accounts custom field info into database +* @param integer $entity_id - accountid +*/ +function save_customfields($entity_id) +{ + global $log; + $log->debug("Entering save_customfields(".$entity_id.") method ..."); + $log->info("save customfields invoked"); + global $adb; + $dbquery = "SELECT * FROM customfields WHERE module = 'Accounts'"; + $result = $adb->pquery($dbquery, array()); + + $custquery = "SELECT * FROM vtiger_accountcf WHERE vtiger_accountid = ?"; + $cust_result = $adb->pquery($custquery, array($entity_id)); + if($adb->num_rows($result) != 0) + { + + $columns=''; + $values=''; + $ins_params = array(); + $update=''; + $upd_params = array(); + + $noofrows = $adb->num_rows($result); + for($i=0; $i<$noofrows; $i++) + { + $fldName=$adb->query_result($result,$i,"fieldlabel"); + $colName=$adb->query_result($result,$i,"column_name"); + if(isset($_REQUEST[$colName])) + { + $fldvalue=$_REQUEST[$colName]; + if(get_magic_quotes_gpc() == 1) + { + $fldvalue = stripslashes($fldvalue); + } + } + else + { + $fldvalue = ''; + } + + if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0) + { + //Update Block + if($i == 0) + { + $update = $colName."=?"; + array_push($upd_params, $fldvalue); + } + else + { + $update .= ', '.$colName."=?"; + array_push($upd_params, $fldvalue); + } + } + else + { + //Insert Block + if($i == 0) + { + $columns='accountid, '.$colName; + array_push($ins_params, $entity_id, $fldvalue); + } + else + { + $columns .= ', '.$colName; + array_push($ins_params, $fldvalue); + } + } + } + if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0) + { + //Update Block + $query = "UPDATE vtiger_accountcf SET $update WHERE vtiger_accountid=?"; + array_push($upd_params, $entity_id); + $adb->pquery($query, $upd_params); + } + else + { + //Insert Block + $query = "INSERT INTO vtiger_accountcf ($columns) VALUES(" . generateQuestionMarks($ins_params) .")"; + $adb->pquery($query, $ins_params); + } + + } + $log->debug("Exiting save_customfields method ..."); +} +?> diff --git a/modules/Accounts/Settings.php b/modules/Accounts/Settings.php new file mode 100644 index 0000000..48a80c0 --- /dev/null +++ b/modules/Accounts/Settings.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Accounts/TagCloud.php b/modules/Accounts/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Accounts/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Accounts/Tickerdetail.php b/modules/Accounts/Tickerdetail.php new file mode 100644 index 0000000..2577bdd --- /dev/null +++ b/modules/Accounts/Tickerdetail.php @@ -0,0 +1,100 @@ + + Company Report + +
+
+ + + + + + + + + '; + $output .=''; + $output .= ' + +
'.$comp.'
'; + $output .='
'; + foreach($first_array as $arr => $val) + { + $output .= ''; + for($j=0;$j + '; + } + $output .= ''; + } + $output .='
'.$val[$j+1].'
'; + array_shift($second_array[0]); + array_shift($second_array[0]); + foreach($second_array as $arr => $val) + { + $output .= ''; + for($j=0;$j + '; + } + $output .= ''; + } + $output .='
'.$val[$j+1].'
[Chart]
 
'; + $output .= ' + + + + + + + + +
BUSINESS SUMMARY
+
+ + +
+
+
+ '; +echo $output; +} +else +{ + $output = ''; + $output .= "
"; + $output .= "".$data.""; + $output .= "
"; + echo $output; +} +?> \ No newline at end of file diff --git a/modules/Accounts/UnifiedSearch.php b/modules/Accounts/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Accounts/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Accounts/index.php b/modules/Accounts/index.php new file mode 100644 index 0000000..87ea115 --- /dev/null +++ b/modules/Accounts/index.php @@ -0,0 +1,57 @@ + + diff --git a/modules/Accounts/language/de_de.lang.php b/modules/Accounts/language/de_de.lang.php new file mode 100644 index 0000000..ce564e0 --- /dev/null +++ b/modules/Accounts/language/de_de.lang.php @@ -0,0 +1,234 @@ +'Organisationen', + 'LBL_MODULE_TITLE'=>'Organisationen: Home', + 'LBL_SEARCH_FORM_TITLE'=>'suche Organisation', + 'LBL_LIST_FORM_TITLE'=>'Organisationen', + 'LBL_NEW_FORM_TITLE'=>'neue Organisation', + 'LBL_MEMBER_ORG_FORM_TITLE'=>'Zugehörige Organisationen', + // Label for Top Accounts in Home Page, added for 4.2 GA + 'LBL_TOP_ACCOUNTS'=>'meine top Organisationen', + 'LBL_TOP_AMOUNT'=>'Betrag', + 'LBL_LIST_ACCOUNT_NAME'=>'Organisationsname', + 'LBL_LIST_CITY'=>'Ort', + 'LBL_LIST_WEBSITE'=>'Webseite', + 'LBL_LIST_STATE'=>'Bundesland', + 'LBL_LIST_PHONE'=>'Telephone', + 'LBL_LIST_EMAIL_ADDRESS'=>'E-Mail Adresse', + 'LBL_LIST_CONTACT_NAME'=>'Personenname', + 'LBL_LIST_AMOUNT' => 'Total Potentiale', + + //DON'T CONVERT THESE THEY ARE MAPPINGS + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + + //END DON'T CONVERT + + 'LBL_ACCOUNT'=>'Organisation:', + 'LBL_ACCOUNT_NAME'=>'Organisation:', + 'LBL_PHONE'=>'Telefon:', + 'LBL_WEBSITE'=>'Webseite:', + 'LBL_FAX'=>'Fax:', + 'LBL_TICKER_SYMBOL'=>'Org. Namenszusatz:', + 'LBL_OTHER_PHONE'=>'weiteres Telefon:', + 'LBL_ANY_PHONE'=>'weiteres Telefon:', + 'LBL_MEMBER_OF'=>'gehört zu:', + 'LBL_EMAIL'=>'E-Mail:', + 'LBL_EMPLOYEES'=>'Mitarbeiter:', + 'LBL_OTHER_EMAIL_ADDRESS'=>'weitere E-Mail:', + 'LBL_ANY_EMAIL'=>'andere E-Mail:', + 'LBL_OWNERSHIP'=>'Eigentümer:', + 'LBL_RATING'=>'Bewertung:', + 'LBL_INDUSTRY'=>'Branche:', + 'LBL_SIC_CODE'=>'Ustnr.:', + 'LBL_TYPE'=>'Typ:', + 'LBL_ANNUAL_REVENUE'=>'Jahresumsatz:', + 'LBL_ADDRESS_INFORMATION'=>'Adresse', + 'LBL_ACCOUNT_INFORMATION'=>'Organisation', + 'LBL_CUSTOM_INFORMATION'=>'zusätzliche Information', + 'LBL_BILLING_ADDRESS'=>'Rechnungsadresse:', + 'LBL_SHIPPING_ADDRESS'=>'Lieferadresse:', + 'LBL_ANY_ADDRESS'=>'beliebige Adresse:', + 'LBL_CITY'=>'Ort:', + 'LBL_STATE'=>'Bundesland:', + 'LBL_POSTAL_CODE'=>'PLZ:', + 'LBL_COUNTRY'=>'Land:', + 'LBL_DESCRIPTION_INFORMATION'=>'Zusatzinformationen', + 'LBL_DESCRIPTION'=>'Beschreibung:', + 'NTC_COPY_BILLING_ADDRESS'=>'Kopiere Rechnungsadresse auf Lieferadresse', + 'NTC_COPY_SHIPPING_ADDRESS'=>'Kopiere Lieferadresse auf Rechnungsadresse', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Möchten Sie diesen Eintrag einer Organisation löschen?', + 'LBL_DUPLICATE'=>'eventuell doppelte Organisation angelegt', + 'MSG_DUPLICATE' => 'Das Anlegen dieser Organisation führt möglicherweise zu einer doppelten Eintragung. Sie können entweder mit der Auswahl einer Organisation aus der untenstehenden Liste fortfahren oder einen neue Organisation anlegen.', + + 'LBL_INVITEE'=>'Kontakte', + 'ERR_DELETE_RECORD'=>"Zum Löschen muss mindestens ein Eintrag markiert sein.", + + 'LBL_SELECT_ACCOUNT'=>'Organisation wählen', + 'LBL_GENERAL_INFORMATION'=>'allgemeine Information', + + //for v4 release added + 'LBL_NEW_POTENTIAL'=>'neues Verkaufspotential', + 'LBL_POTENTIAL_TITLE'=>'Potentiale', + + 'LBL_NEW_TASK'=>'neue Aufgabe', + 'LBL_TASK_TITLE'=>'Aufgaben', + 'LBL_NEW_CALL'=>'neuer Anruf', + 'LBL_CALL_TITLE'=>'Anrufe', + 'LBL_NEW_MEETING'=>'neues Meeting', + 'LBL_MEETING_TITLE'=>'Meetings', + 'LBL_NEW_EMAIL'=>'neue E-Mail', + 'LBL_EMAIL_TITLE'=>'E-Mails', + 'LBL_NEW_CONTACT'=>'neue Person', + 'LBL_CONTACT_TITLE'=>'Personen', + + //Added fields after RC1 - Release + 'LBL_ALL'=>'Alle', + 'LBL_PROSPECT'=>'Potentieller Kunde', + 'LBL_INVESTOR'=>'Investor', + 'LBL_RESELLER'=>'Wiederverkäufer', + 'LBL_PARTNER'=>'Partner', + + // Added for 4GA + 'LBL_TOOL_FORM_TITLE'=>'Werkzeuge', + //Added for 4GA + 'Account Name'=>'Organisation', + 'Phone'=>'Telefon', + 'Website'=>'Webseite', + 'Fax'=>'Fax', + 'Ticker Symbol'=>'Org. Namenszusatz', + 'Other Phone'=>'weiteres Telefon', + 'Member Of'=>'Mitglied von', + 'Email'=>'E-Mail', + 'Employees'=>'Mitarbeiter', + 'Other Email'=>'andere E-Mail', + 'Ownership'=>'Besitzer', + 'Rating'=>'Bewertung', + 'industry'=>'Branche', + 'SIC Code'=>'Ust. Nr.', + 'Type'=>'Typ', + 'Annual Revenue'=>'Jahresumsatz', + 'Assigned To'=>'zuständig ', + 'Billing Address'=>'Rechnungsadresse Strasse', + 'Shipping Address'=>'Lieferadresse Strasse', + 'Billing City'=>'Rechnungsadresse Ort', + 'Shipping City'=>'Lieferadresse Ort', + 'Billing State'=>'Rechnungsadresse Bundesland', + 'Shipping State'=>'Lieferadresse Bundesland', + 'Billing Code'=>'Rechnungsadresse PLZ', + 'Shipping Code'=>'Lieferadresse PLZ', + 'Billing Country'=>'Rechnungsadresse Land', + 'Shipping Country'=>'Lieferadresse Land', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Description'=>'Beschreibung', + 'Shipping Po Box'=>'Lieferadresse Postfachnr.', + 'Billing Po Box'=>'Rechnungsadresse Postfachnr.', + + //Added after 4.2 patch 2 + 'Email Opt Out'=>'E-Mail Opt aus', + 'LBL_EMAIL_OPT_OUT'=>'E-Mail Opt aus:', + + //Added after 5Alpha5 + 'Notify Owner'=>'Besitzer informieren', + + //Added for existing picklist entries + + '--None--'=>'--ohne--', + + 'Acquired'=>'erworben', + 'Active'=>'aktiv', + 'Market Failed'=>'Markt verfehlt', + 'Project Cancelled'=>'Projekt abgebrochen', + 'Shutdown'=>'Stillstand', + + 'Apparel'=>'Bekleidungsindustrie', + 'Banking'=>'Banken', + 'Biotechnology'=>'Biotechnologie', + 'Chemicals'=>'Chemie', + 'Communications'=>'Kommunikation', + 'Construction'=>'Anlagenbau', + 'Consulting'=>'Beratung', + 'Education'=>'Bildung', + 'Electronics'=>'Elektronik', + 'Energy'=>'Energie', + 'Engineering'=>'Ingenieurwesen', + 'Entertainment'=>'Unterhaltung', + 'Environmental'=>'Umwelt', + 'Finance'=>'Finanzen', + 'Food & Beverage'=>'Nahrungsmittel', + 'Government'=>'Regierung', + 'Healthcare'=>'Gesundheitswesen', + 'Hospitality'=>'Beherbergung', + 'Insurance'=>'Versicherung', + 'Machinery'=>'Maschinen', + 'Manufacturing'=>'Fertigung', + 'Media'=>'Medien', + 'Not For Profit'=>'Wohlfahrt', + 'Recreation'=>'Freizeit und Erholung', + 'Retail'=>'Einzelhandel', + 'Shipping'=>'Spedition', + 'Technology'=>'Technologie', + 'Telecommunications'=>'Telekommunikation', + 'Transportation'=>'Transport', + 'Utilities'=>'Versorgungseinrichtung', + 'Other'=>'andere', + + 'Analyst'=>'Analyst', + 'Competitor'=>'Wettbewerber', + 'Customer'=>'Kunde', + 'Integrator'=>'Integrator', + 'Investor'=>'Investor', + 'Partner'=>'Partner', + 'Press'=>'Presse', + 'Prospect'=>'Interessent', + 'Reseller'=>'Wiederverkäufer', + 'LBL_START_DATE' => 'Startdatum', + 'LBL_END_DATE' => 'Endedatum', + + // Added/Updated for vtiger CRM 5.0.4 + + //added to fix the issue #4081 + 'LBL_ACCOUNT_EXIST' => 'Diesen Organisationsnamen gibt es bereits!', + + // mailer export + 'LBL_MAILER_EXPORT' => 'Mailer Export', + 'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'Personen auswählen:', + 'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'Personen können auch über "benutzerdefinierte Felder" und einigen Standardfeldern ausgewählt werden.', + 'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'Export Typ auswählen:', + 'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'Die Daten werden aus den Organisationen und deren Personen ermittelt, die als Ergebnis der die vorhergehenden Suche ermittelt wurden.', + 'LBL_EXPORT_RESULTS_EMAIL' => 'Export E-Mailer Daten', + 'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'Export E-Mail Daten, unter Benutzung des E-Mail Feldes aus den Organisationen, wenn keine E-Mail Adresse bei den Personen angegeben wurde.', + 'LBL_EXPORT_RESULTS_FULL'=>'Export der Daten mit Personen, E-Mail, Organisationsname, Adresse, Telefon, usw.', + 'LBL_EXPORT_RESULTS_GO'=>'Export', + 'LBL_MAILER_EXPORT_IGNORE' => '--ignoriere--', + 'LBL_MAILER_EXPORT_CHECKED' =>'markiert', + 'LBL_MAILER_EXPORT_NOTCHECKED' => 'nicht markiert', + + // Added after 5.0.4 GA + + //Module Sequence Numbering + 'Account No'=>'Organisationsnr.', + // END + + // Account Hierarchy + 'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Zeige Organisationshierarchie', + 'Accounts ID' => 'Organisations ID', +); + +?> \ No newline at end of file diff --git a/modules/Accounts/language/en_gb.lang.php b/modules/Accounts/language/en_gb.lang.php new file mode 100644 index 0000000..a86178b --- /dev/null +++ b/modules/Accounts/language/en_gb.lang.php @@ -0,0 +1,192 @@ + 'Organisations', + 'LBL_MODULE_TITLE' => 'Organisations: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Account Search', + 'LBL_LIST_FORM_TITLE' => 'Organisation List', + 'LBL_NEW_FORM_TITLE' => 'New Organisation', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Member Organisations', + 'LBL_TOP_ACCOUNTS' => 'My Top Organisations', + 'LBL_TOP_AMOUNT' => 'Amount', + 'LBL_LIST_ACCOUNT_NAME' => 'Organisation Name', + 'LBL_LIST_CITY' => 'City', + 'LBL_LIST_WEBSITE' => 'Website', + 'LBL_LIST_STATE' => 'County', + 'LBL_LIST_PHONE' => 'Phone', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email Address', + 'LBL_LIST_CONTACT_NAME' => 'Contact Name', + 'LBL_LIST_AMOUNT' => 'Total Amount', + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + 'LBL_ACCOUNT' => 'Organisation:', + 'LBL_ACCOUNT_NAME' => 'Organisation Name:', + 'LBL_PHONE' => 'Phone:', + 'LBL_WEBSITE' => 'Website:', + 'LBL_FAX' => 'Fax:', + 'LBL_TICKER_SYMBOL' => 'Ticker Symbol:', + 'LBL_OTHER_PHONE' => 'Other Phone:', + 'LBL_ANY_PHONE' => 'Any Phone:', + 'LBL_MEMBER_OF' => 'Member of:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMPLOYEES' => 'Employees:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:', + 'LBL_ANY_EMAIL' => 'Any Email:', + 'LBL_OWNERSHIP' => 'Ownership:', + 'LBL_RATING' => 'Rating:', + 'LBL_INDUSTRY' => 'Industry:', + 'LBL_SIC_CODE' => 'SIC Code:', + 'LBL_TYPE' => 'Type:', + 'LBL_ANNUAL_REVENUE' => 'Annual Revenue:', + 'LBL_ADDRESS_INFORMATION' => 'Address Information', + 'LBL_ACCOUNT_INFORMATION' => 'Organisation Information', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_BILLING_ADDRESS' => 'Invoice Address:', + 'LBL_SHIPPING_ADDRESS' => 'Delivery Address:', + 'LBL_ANY_ADDRESS' => 'Any Address:', + 'LBL_CITY' => 'City:', + 'LBL_STATE' => 'County:', + 'LBL_POSTAL_CODE' => 'Postcode:', + 'LBL_COUNTRY' => 'Country:', + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', + 'LBL_DESCRIPTION' => 'Description:', + 'NTC_COPY_BILLING_ADDRESS' => 'Copy invoice address to delivery address', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Copy delivery address to invoice address', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Are you sure you want to remove this record as a member organisation?', + 'LBL_DUPLICATE' => 'Potential Duplicate Organisations', + 'MSG_DUPLICATE' => 'Creating this Organisation may potentialy create a duplicate. You can either select an Organisation from the list below or you may click on Create New Organisation to continue creating a new Organisation with the previously entered data.', + 'LBL_INVITEE' => 'Contacts', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the Organisation', + 'LBL_SELECT_ACCOUNT' => 'Select Organisation', + 'LBL_GENERAL_INFORMATION' => 'General Information', + 'LBL_NEW_POTENTIAL' => 'New Opportunity', + 'LBL_POTENTIAL_TITLE' => 'Opportunities', + 'LBL_NEW_TASK' => 'New Task', + 'LBL_TASK_TITLE' => 'Tasks', + 'LBL_NEW_CALL' => 'New Call', + 'LBL_CALL_TITLE' => 'Calls', + 'LBL_NEW_MEETING' => 'New Meeting', + 'LBL_MEETING_TITLE' => 'Meetings', + 'LBL_NEW_EMAIL' => 'New Email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_CONTACT' => 'New Contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_ALL' => 'All', + 'LBL_PROSPECT' => 'Prospect', + 'LBL_INVESTOR' => 'Investor', + 'LBL_RESELLER' => 'Reseller', + 'LBL_PARTNER' => 'Partner', + 'LBL_TOOL_FORM_TITLE' => 'Organisation Tools', + 'Account Name' => 'Organisation Name', + 'Phone' => 'Phone', + 'Website' => 'Website', + 'Fax' => 'Fax', + 'Ticker Symbol' => 'Ticker Symbol', + 'Other Phone' => 'Other Phone', + 'Member Of' => 'Member Of', + 'Email' => 'Email', + 'Employees' => 'Employees', + 'Other Email' => 'Other Email', + 'Ownership' => 'Ownership', + 'Rating' => 'Rating', + 'industry' => 'Industry', + 'SIC Code' => 'SIC Code', + 'Type' => 'Type', + 'Annual Revenue' => 'Annual Revenue', + 'Assigned To' => 'Assigned To', + 'Billing Address' => 'Invoice Address', + 'Shipping Address' => 'Delivery Address', + 'Billing City' => 'Invoice City', + 'Shipping City' => 'Delivery City', + 'Billing State' => 'Invoice County', + 'Shipping State' => 'Delivery County', + 'Billing Code' => 'Invoice Postcode', + 'Shipping Code' => 'Delivery Postcode', + 'Billing Country' => 'Invoice Country', + 'Shipping Country' => 'Delivery Country', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Description' => 'Description', + 'Shipping Po Box' => 'Delivery PO Box', + 'Billing Po Box' => 'Invoice PO Box', + 'Email Opt Out' => 'Email Opt Out', + 'LBL_EMAIL_OPT_OUT' => 'Email Opt Out: ', + 'Notify Owner' => 'Notify Owner', + '--None--' => '--None--', + 'Acquired' => 'Acquired', + 'Active' => 'Active', + 'Market Failed' => 'Market Failed', + 'Project Cancelled' => 'Project Cancelled', + 'Shutdown' => 'Shutdown', + 'Apparel' => 'Apparel', + 'Banking' => 'Banking', + 'Biotechnology' => 'Biotechnology', + 'Chemicals' => 'Chemicals', + 'Communications' => 'Communications', + 'Construction' => 'Construction', + 'Consulting' => 'Consulting', + 'Education' => 'Education', + 'Electronics' => 'Electronics', + 'Energy' => 'Energy', + 'Engineering' => 'Engineering', + 'Entertainment' => 'Entertainment', + 'Environmental' => 'Environmental', + 'Finance' => 'Finance', + 'Food & Beverage' => 'Food & Beverage', + 'Government' => 'Government', + 'Healthcare' => 'Healthcare', + 'Hospitality' => 'Hospitality', + 'Insurance' => 'Insurance', + 'Machinery' => 'Machinery', + 'Manufacturing' => 'Manufacturing', + 'Media' => 'Media', + 'Not For Profit' => 'Not For Profit', + 'Recreation' => 'Recreation', + 'Retail' => 'Retail', + 'Shipping' => 'Shipping', + 'Technology' => 'Technology', + 'Telecommunications' => 'Telecommunications', + 'Transportation' => 'Transportation', + 'Utilities' => 'Utilities', + 'Other' => 'Other', + 'Analyst' => 'Analyst', + 'Competitor' => 'Competitor', + 'Customer' => 'Customer', + 'Integrator' => 'Integrator', + 'Investor' => 'Investor', + 'Partner' => 'Partner', + 'Press' => 'Press', + 'Prospect' => 'Prospect', + 'Reseller' => 'Reseller', + 'LBL_START_DATE' => 'Start Date', + 'LBL_END_DATE' => 'End Date', + 'LBL_ACCOUNT_EXIST' => 'Organisation Name already exists', + 'LBL_MAILER_EXPORT' => 'Mailer Export', + 'LBL_MAILER_EXPORT_CONTACTS_TYPE' => 'Select Contacts:', + 'LBL_MAILER_EXPORT_CONTACTS_DESCR' => 'Contacts can also be selected via Custom Fields and some standard fields.', + 'LBL_MAILER_EXPORT_RESULTS_TYPE' => 'Select export type:', + 'LBL_MAILER_EXPORT_RESULTS_DESCR' => 'The data will be gathered from the Organisations and their Contacts that were returned from the previous search.', + 'LBL_EXPORT_RESULTS_EMAIL' => 'Export Email data', + 'LBL_EXPORT_RESULTS_EMAIL_CORP' => 'Export Email data using Company Email from the Organisation if the Contact\'s Email is empty', + 'LBL_EXPORT_RESULTS_FULL' => 'Export data with the Contacts, Email, Organisation name, Address, Telephone, etc.', + 'LBL_EXPORT_RESULTS_GO' => 'Export', + 'LBL_MAILER_EXPORT_IGNORE' => '--ignore--', + 'LBL_MAILER_EXPORT_CHECKED' => 'Checked', + 'LBL_MAILER_EXPORT_NOTCHECKED' => 'Not Checked', + 'Account No' => 'Organisation No.', + 'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Show Organisation Hierarchy', + 'Accounts ID' => 'Organisations ID', + 'Send SMS' => 'Send SMS', + 'Projects' => 'Projects', + 'Service Places' => 'Service Places' +); +?> \ No newline at end of file diff --git a/modules/Accounts/language/en_us.lang.php b/modules/Accounts/language/en_us.lang.php new file mode 100644 index 0000000..fc05170 --- /dev/null +++ b/modules/Accounts/language/en_us.lang.php @@ -0,0 +1,243 @@ +'Organizations', +'LBL_MODULE_TITLE'=>'Organizations: Home', +'LBL_SEARCH_FORM_TITLE'=>'Organization Search', +'LBL_LIST_FORM_TITLE'=>'Organization List', +'LBL_NEW_FORM_TITLE'=>'New Organization', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', +// Label for Top Organizations in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'My Top Organizations', +'LBL_TOP_AMOUNT'=>'Amount', +'LBL_LIST_ACCOUNT_NAME'=>'Organization Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_AMOUNT' => 'Total Amount', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Organization:', +'LBL_ACCOUNT_NAME'=>'Organization Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Organization Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Potential Duplicate Organizations', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Organization to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Organization', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Opportunity', +'LBL_POTENTIAL_TITLE'=>'Opportunities', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Organization Tools', +//Added for 4GA +'Account Name'=>'Organization Name', +'Phone'=>'Phone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Email'=>'Email', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'Rating'=>'Rating', +'industry'=>'Industry', +'SIC Code'=>'SIC Code', +'Type'=>'Type', +'Annual Revenue'=>'Annual Revenue', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Postal Code', +'Shipping Code'=>'Shipping Postal Code', +'Billing Country'=>'Billing Country', +'Shipping Country'=>'Shipping Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Email Opt Out', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for existing picklist entries + +'--None--'=>'--None--', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Analyst'=>'Analyst', +'Competitor'=>'Competitor', +'Customer'=>'Customer', +'Integrator'=>'Integrator', +'Investor'=>'Investor', +'Partner'=>'Partner', +'Press'=>'Press', +'Prospect'=>'Prospect', +'Reseller'=>'Reseller', +'LBL_START_DATE' => 'Start Date', +'LBL_END_DATE' => 'End Date', + +// Added/Updated for vtiger CRM 5.0.4 + +//added to fix the issue #4081 +'LBL_ACCOUNT_EXIST' => 'Organization Name Already Exists!', + +// mailer export +'LBL_MAILER_EXPORT' => 'Mailer Export', +'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'Select Contacts:', +'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'Contacts can also be selected via "Custom Fields" and some standard fields.', +'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'Select export type:', +'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'The data will gathered from the Organizations and their Contacts, that were returned + from the previous search.', +'LBL_EXPORT_RESULTS_EMAIL' => 'Export E-Mailer data', +'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'Export E-Mail data, using "Company Email" from the Organization if the Contacts "Email" is empty', +'LBL_EXPORT_RESULTS_FULL'=>'Export data with the Contacts, E-Mail, Organization name, Address, Telephone, etc.', +'LBL_EXPORT_RESULTS_GO'=>'Export', +'LBL_MAILER_EXPORT_IGNORE' => '--ignore--', +'LBL_MAILER_EXPORT_CHECKED' =>'Checked', +'LBL_MAILER_EXPORT_NOTCHECKED' => 'Not Checked', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Account No'=>'Organization No', +// END + +// Organization Hierarchy +'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Show Organization Hierarchy', +'Accounts ID' => 'Organizations ID', + +); + +?> diff --git a/modules/Accounts/language/es_es.lang.php b/modules/Accounts/language/es_es.lang.php new file mode 100644 index 0000000..8afcc57 --- /dev/null +++ b/modules/Accounts/language/es_es.lang.php @@ -0,0 +1,244 @@ +'Cuentas', +'LBL_MODULE_TITLE'=>'Cuentas: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Cuenta', +'LBL_LIST_FORM_TITLE'=>'Lista de Cuentas', +'LBL_NEW_FORM_TITLE'=>'Nueva Cuenta', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Miembro de Organización ', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'Mis Cuentas Principales', +'LBL_TOP_AMOUNT'=>'Importe', +'LBL_LIST_ACCOUNT_NAME'=>'Cuenta', +'LBL_LIST_CITY'=>'Población', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_STATE'=>'Provincia', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_EMAIL_ADDRESS'=>'Email', +'LBL_LIST_CONTACT_NAME'=>'Contacto', +'LBL_LIST_AMOUNT'=>'Cantidad Total', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Cuenta:', +'LBL_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_PHONE'=>'Teléfono:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker de bolsa:', +'LBL_OTHER_PHONE'=>'Tel. Otro:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_MEMBER_OF'=>'Miembro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empleados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email Alternativo:', +'LBL_OWNERSHIP'=>'Accionistas:', +'LBL_RATING'=>'Clasificación:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_SIC_CODE'=>'CIF:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Facturación Anual:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_ACCOUNT_INFORMATION'=>'Información de la Cuenta', +'LBL_CUSTOM_INFORMATION'=>'Información Específica', +'LBL_BILLING_ADDRESS'=>'Dirección (Factura):', +'LBL_SHIPPING_ADDRESS'=>'Dirección (Envío):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Población:', +'LBL_STATE'=>'Provincia:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descripción Adicional', +'LBL_DESCRIPTION'=>'Descripcion:', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar Factura a Envío', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar Envío a Factura', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'¿Está seguro que desea eliminar este registro de "Miembro"?', +'LBL_DUPLICATE'=>'Posibles cuentas duplicadas', +'MSG_DUPLICATE'=>'Creando esta cuenta puede duplicar una cuenta existente. Seleccione una cuenta de la lista de abajo o pulse en el boton Crear una Nueva Cuenta para crear una nueva cuenta con los datos introducidos.', + +'LBL_INVITEE'=>'Contactos', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la empresa.', + +'LBL_SELECT_ACCOUNT'=>'Seleccionar Cuenta', +'LBL_GENERAL_INFORMATION'=>'Información General', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Añadir Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidad', + +'LBL_NEW_TASK'=>'Añadir Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Añadir Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Añadir Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Añadir Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todo', +'LBL_PROSPECT'=>'Expectativa ', +'LBL_INVESTOR'=>'Inversor', +'LBL_RESELLER'=>'Revendedor', +'LBL_PARTNER'=>'Socio ', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Cuenta', +// Added for 4GA +'Account Name'=>'Nombre de la Cuenta', +'Phone'=>'Teléfono', +'Website'=>'Página Web', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker de bolsa', +'Other Phone'=>'Tel. Alternativo', +'Member Of'=>'Miembro de', +'Email'=>'Email', +'Employees'=>'Empleados', +'Other Email'=>'Email (Alternativo)', +'Ownership'=>'Accionistas', +'Rating'=>'Importancia', +'industry'=>'Actividad', +'SIC Code'=>'CIF', +'Type'=>'Tipo', +'Annual Revenue'=>'Facturación Anual', +'Assigned To'=>'Asignado a', +'Billing Address'=>'Dirección (Factura)', +'Shipping Address'=>'Dirección (Envío)', +'Billing City'=>'Población (Factura)', +'Shipping City'=>'Población (Envío)', +'Billing State'=>'Provincia (Factura)', +'Shipping State'=>'Provincia (Envío)', +'Billing Code'=>'Código Postal (Factura)', +'Shipping Code'=>'Código Postal (Envío)', +'Billing Country'=>'País (Factura)', +'Shipping Country'=>'País (Envío)', +'Created Time'=>'Fecha de Creación', +'Modified Time'=>'Fecha de Modificación', +'Description'=>'Descripción', +'Shipping Po Box'=>'Apdo. de Correos (Envío)', +'Billing Po Box'=>'Apdo. de Correos (Factura)', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'No Enviar Emails', +'LBL_EMAIL_OPT_OUT'=>'No Enviar Emails:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notificar al Propietario', + +//Added for existing picklist entries + +'--None--'=>'-----', + +'Acquired'=>'Adquirido', +'Active'=>'Activo', +'Market Failed'=>'Mercado Inmaduro', +'Project Cancelled'=>'Cancelado', +'Shutdown'=>'Suspendido', + +'Apparel'=>'Ropa', +'Banking'=>'Banca', +'Biotechnology'=>'Biotecnología', +'Chemicals'=>'Químicas', +'Communications'=>'Comunicaciones', +'Construction'=>'Construcción', +'Consulting'=>'Consultores', +'Education'=>'Educación', +'Electronics'=>'Electronica', +'Energy'=>'Energía', +'Engineering'=>'Ingeniería', +'Entertainment'=>'Entretenimiento', +'Environmental'=>'Medio Ambiente', +'Finance'=>'Finanzas', +'Food & Beverage'=>'Restauración', +'Government'=>'Gobierno', +'Healthcare'=>'Salud', +'Hospitality'=>'Hospital', +'Insurance'=>'Seguros', +'Machinery'=>'Mecánica', +'Manufacturing'=>'Manufacturas', +'Media'=>'Medios', +'Not For Profit'=>'ONG', +'Recreation'=>'Recreo', +'Retail'=>'Venta al por menor o Detall', +'Shipping'=>'Transporte', +'Technology'=>'Tecnología', +'Telecommunications'=>'Telecomunicaciones', +'Transportation'=>'Logística', +'Utilities'=>'Utilidades', +'Other'=>'Otros', + +'Analyst'=>'Analista', +'Competitor'=>'Competencia', +'Customer'=>'Cliente', +'Integrator'=>'Integrador', +'Investor'=>'Inversor', +'Partner'=>'Socio', +'Press'=>'Prensa', +'Prospect'=>'Prospector', +'Reseller'=>'Revendedor', +'LBL_START_DATE' =>'Inicio', +'LBL_END_DATE' => 'Vencimiento', + +// Added/Updated for vtiger CRM 5.0.4 + +//added to fix the issue #4081 +'LBL_ACCOUNT_EXIST' => 'Cuenta ya Existente', + +// mailer export +'LBL_MAILER_EXPORT' => 'Exportador de Email', +'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'Seleccione Contactos:', +'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'También puede seleccionar "Contactos" via "Campos Personalizados" u otros campos.', +'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'Seleccione tipo de Exportación:', +'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'Los datos se obtendrán de "Cuentas" y sus "Contactos" que provengan de la búsqueda previa.', + +'LBL_EXPORT_RESULTS_EMAIL' => 'Exportar datos de Email', +'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'Exportar datos de Email, usando "Email de la Cuenta" si no tiene Email de Contacto', +'LBL_EXPORT_RESULTS_FULL'=>'Exportar datos con Contactos, Email, Cuenta, Dirección, Teléfono, etc...', +'LBL_EXPORT_RESULTS_GO'=>'Exportado', +'LBL_MAILER_EXPORT_IGNORE' => '--Ignorar--', +'LBL_MAILER_EXPORT_CHECKED' =>'Marcado', +'LBL_MAILER_EXPORT_NOTCHECKED' => 'No Marcado', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Account No'=>'Núm. Cuenta', +// END + +// Account Hierarchy +'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Mostrar Jerarquía de Cuentas', +'Accounts ID' => 'Id Cuenta', +); + +?> diff --git a/modules/Accounts/language/es_mx.lang.php b/modules/Accounts/language/es_mx.lang.php new file mode 100644 index 0000000..183c238 --- /dev/null +++ b/modules/Accounts/language/es_mx.lang.php @@ -0,0 +1,243 @@ +'Cuentas', +'LBL_MODULE_TITLE'=>'Cuentas: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Cuenta', +'LBL_LIST_FORM_TITLE'=>'Lista de Cuentas', +'LBL_NEW_FORM_TITLE'=>'Nueva Cuenta', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Miembro de Organización ', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'Mis Cuentas Principales', +'LBL_TOP_AMOUNT'=>'Importe', +'LBL_LIST_ACCOUNT_NAME'=>'Cuenta', +'LBL_LIST_CITY'=>'Deleg./Mpio.', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_STATE'=>'Estado', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_EMAIL_ADDRESS'=>'Email', +'LBL_LIST_CONTACT_NAME'=>'Contacto', +'LBL_LIST_AMOUNT'=>'Cantidad Total', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Cuenta:', +'LBL_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_PHONE'=>'Teléfono:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Símbolo de bolsa:', +'LBL_OTHER_PHONE'=>'Tel. Otro:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_MEMBER_OF'=>'Miembro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empleados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email Alternativo:', +'LBL_OWNERSHIP'=>'Propietario:', +'LBL_RATING'=>'Clasificación:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_SIC_CODE'=>'RFC:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Facturación Anual:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_ACCOUNT_INFORMATION'=>'Información de la Cuenta', +'LBL_CUSTOM_INFORMATION'=>'Información Específica', +'LBL_BILLING_ADDRESS'=>'Dirección (Factura):', +'LBL_SHIPPING_ADDRESS'=>'Dirección (Envío):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Deleg./Mpio.:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descripción Adicional', +'LBL_DESCRIPTION'=>'Descripcion:', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar Factura a Envío', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar Envío a Factura', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'¿Está seguro que desea eliminar este registro de "Miembro"?', +'LBL_DUPLICATE'=>'Posibles cuentas duplicadas', +'MSG_DUPLICATE'=>'Al crear esta cuenta podría estar duplicando una cuenta existente. Seleccione una cuenta de la lista de abajo o pulse en el boton Crear una Nueva Cuenta para crear un nuevo registro con los datos introducidos.', + +'LBL_INVITEE'=>'Contactos', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la empresa.', + +'LBL_SELECT_ACCOUNT'=>'Seleccionar Cuenta', +'LBL_GENERAL_INFORMATION'=>'Información General', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Agregar Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidad', + +'LBL_NEW_TASK'=>'Agregar Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Agregar Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Agregar Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Agregar Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todo', +'LBL_PROSPECT'=>'Expectativa ', +'LBL_INVESTOR'=>'Inversionista', +'LBL_RESELLER'=>'Revendedor', +'LBL_PARTNER'=>'Socio ', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Cuenta', +// Added for 4GA +'Account Name'=>'Nombre de la Cuenta', +'Phone'=>'Teléfono', +'Website'=>'Página Web', +'Fax'=>'Fax', +'Ticker Symbol'=>'Símbolo de bolsa', +'Other Phone'=>'Tel. Alternativo', +'Member Of'=>'Miembro de', +'Email'=>'Email', +'Employees'=>'Empleados', +'Other Email'=>'Email (Alternativo)', +'Ownership'=>'Propietario', +'Rating'=>'Importancia', +'industry'=>'Actividad', +'SIC Code'=>'RFC', +'Type'=>'Tipo', +'Annual Revenue'=>'Facturación Anual', +'Assigned To'=>'Asignado a', +'Billing Address'=>'Dirección (Factura)', +'Shipping Address'=>'Dirección (Envío)', +'Billing City'=>'Deleg./Mpio. (Factura)', +'Shipping City'=>'Deleg./Mpio. (Envío)', +'Billing State'=>'Estado (Factura)', +'Shipping State'=>'Estado (Envío)', +'Billing Code'=>'Código Postal (Factura)', +'Shipping Code'=>'Código Postal (Envío)', +'Billing Country'=>'País (Factura)', +'Shipping Country'=>'País (Envío)', +'Created Time'=>'Fecha de Creación', +'Modified Time'=>'Fecha de Modificación', +'Description'=>'Descripción', +'Shipping Po Box'=>'Colonia (Envío)', +'Billing Po Box'=>'Colonia (Factura)', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'No Enviar Emails', +'LBL_EMAIL_OPT_OUT'=>'No Enviar Emails:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notificar al Propietario', + +//Added for existing picklist entries + +'--None--'=>'-----', + +'Acquired'=>'Adquirido', +'Active'=>'Activo', +'Market Failed'=>'Mercado Inmaduro', +'Project Cancelled'=>'Proyecto Cancelado', +'Shutdown'=>'Detenido', + +'Apparel'=>'Ropa', +'Banking'=>'Banca', +'Biotechnology'=>'Biotecnología', +'Chemicals'=>'Químicas', +'Communications'=>'Comunicaciones', +'Construction'=>'Construcción', +'Consulting'=>'Consultores', +'Education'=>'Educación', +'Electronics'=>'Electronica', +'Energy'=>'Energía', +'Engineering'=>'Ingeniería', +'Entertainment'=>'Entretenimiento', +'Environmental'=>'Medio Ambiente', +'Finance'=>'Finanzas', +'Food & Beverage'=>'Restauración', +'Government'=>'Gobierno', +'Healthcare'=>'Salud', +'Hospitality'=>'Hospital', +'Insurance'=>'Seguros', +'Machinery'=>'Mecánica', +'Manufacturing'=>'Manufacturas', +'Media'=>'Medios', +'Not For Profit'=>'ONG', +'Recreation'=>'Recreo', +'Retail'=>'Venta al por menor o Detall', +'Shipping'=>'Transporte', +'Technology'=>'Tecnología', +'Telecommunications'=>'Telecomunicaciones', +'Transportation'=>'Logística', +'Utilities'=>'Utilidades', +'Other'=>'Otros', + +'Analyst'=>'Analista', +'Competitor'=>'Competencia', +'Customer'=>'Cliente', +'Integrator'=>'Integrador', +'Investor'=>'Inversionista', +'Partner'=>'Socio', +'Press'=>'Prensa', +'Prospect'=>'Prospector', +'Reseller'=>'Revendedor', +'LBL_START_DATE' =>'Inicio', +'LBL_END_DATE' => 'Vencimiento', + +// Added/Updated for vtiger CRM 5.0.4 + +//added to fix the issue #4081 +'LBL_ACCOUNT_EXIST' => 'Cuenta ya Existente', + +// mailer export +'LBL_MAILER_EXPORT' => 'Exportador de Email', +'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'Seleccione Contactos:', +'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'También puede seleccionar "Contactos" via "Campos Personalizados" u otros campos.', +'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'Seleccione tipo de Exportación:', +'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'Los datos se obtendrán de "Cuentas" y sus "Contactos" que provengan de la búsqueda previa.', + +'LBL_EXPORT_RESULTS_EMAIL' => 'Exportar datos de Email', +'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'Exportar datos de Email, usando "Email de la Cuenta" si no tiene Email de Contacto', +'LBL_EXPORT_RESULTS_FULL'=>'Exportar datos con Contactos, Email, Cuenta, Dirección, Teléfono, etc...', +'LBL_EXPORT_RESULTS_GO'=>'Exportado', +'LBL_MAILER_EXPORT_IGNORE' => '--Ignorar--', +'LBL_MAILER_EXPORT_CHECKED' =>'Marcado', +'LBL_MAILER_EXPORT_NOTCHECKED' => 'No Marcado', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Account No'=>'Núm. Cuenta', +// END + +// Account Hierarchy +'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Mostrar Jerarquía de Cuentas', +'Accounts ID' => 'Id Cuenta', +); + +?> diff --git a/modules/Accounts/language/fr_fr.lang.php b/modules/Accounts/language/fr_fr.lang.php new file mode 100644 index 0000000..5000066 --- /dev/null +++ b/modules/Accounts/language/fr_fr.lang.php @@ -0,0 +1,194 @@ + 'Comptes', + 'LBL_MODULE_TITLE' => 'Comptes : accueil', + 'LBL_SEARCH_FORM_TITLE' => 'Rechercher comptes', + 'LBL_LIST_FORM_TITLE' => 'Liste des comptes', + 'LBL_NEW_FORM_TITLE' => 'Nouveau compte', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Filiale de', + 'LBL_TOP_ACCOUNTS' => 'Top comptes', + 'LBL_TOP_AMOUNT' => 'Montant', + 'LBL_LIST_ACCOUNT_NAME' => 'Nom compte', + 'LBL_LIST_CITY' => 'Ville ', + 'LBL_LIST_WEBSITE' => 'Site Web', + 'LBL_LIST_STATE' => 'Département', + 'LBL_LIST_PHONE' => 'Téléphone', + 'LBL_LIST_EMAIL_ADDRESS' => 'Adresse email', + 'LBL_LIST_CONTACT_NAME' => 'Nom du contact', + 'LBL_LIST_AMOUNT' => 'Total affaires', + 'db_name' => LBL_LIST_ACCOUNT_NAME, + 'db_website' => LBL_LIST_WEBSITE, + 'db_billing_address_city' => LBL_LIST_CITY, + 'LBL_ACCOUNT' => 'Compte :', + 'LBL_ACCOUNT_NAME' => 'Nom compte :', + 'LBL_PHONE' => 'Téléphone :', + 'LBL_WEBSITE' => 'Site Web :', + 'LBL_FAX' => 'Fax :', + 'LBL_TICKER_SYMBOL' => 'Symbole boursier :', + 'LBL_OTHER_PHONE' => 'Téléphone (alt.)', + 'LBL_ANY_PHONE' => 'Téléphone (alt.)', + 'LBL_MEMBER_OF' => 'Filiale de :', + 'LBL_EMAIL' => 'Email :', + 'LBL_EMPLOYEES' => 'Effectif :', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email (alt.) :', + 'LBL_ANY_EMAIL' => 'Email (alt.) :', + 'LBL_OWNERSHIP' => 'Propriétaire :', + 'LBL_RATING' => 'Notre :', + 'LBL_INDUSTRY' => 'Secteur :', + 'LBL_SIC_CODE' => 'Code APE :', + 'LBL_TYPE' => 'Type :', + 'LBL_ANNUAL_REVENUE' => 'CA :', + 'LBL_ADDRESS_INFORMATION' => 'Détail adresses', + 'LBL_ACCOUNT_INFORMATION' => 'Détail compte', + 'LBL_CUSTOM_INFORMATION' => 'Informations personnalisées', + 'LBL_BILLING_ADDRESS' => 'Adresse (facturation) :', + 'LBL_SHIPPING_ADDRESS' => 'Adresse (livraison) :', + 'LBL_ANY_ADDRESS' => 'Adresse (alt.):', + 'LBL_CITY' => 'Ville :', + 'LBL_STATE' => 'Département :', + 'LBL_POSTAL_CODE' => 'Code postal :', + 'LBL_COUNTRY' => 'Pays :', + 'LBL_DESCRIPTION_INFORMATION' => 'Informations complémentaires', + 'LBL_DESCRIPTION' => 'Description :', + 'NTC_COPY_BILLING_ADDRESS' => 'Utiliser adresse de facturation pour la livraison', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Utiliser adresse de livraison pour la facturation', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Etes-vous certain de vouloir désolidariser cet enregistrement du groupe ?', + 'LBL_DUPLICATE' => 'Doublon probable', + 'MSG_DUPLICATE' => 'Créer ce compte engeandrera probablement un doublon. Vous pouvez au choix, forcer la création de ce compte ou en sélectionner un dans la liste ci-dessous', + 'LBL_INVITEE' => 'Contacts', + 'ERR_DELETE_RECORD' => 'Un numéro d\'enregistrement doit être spécifié pour supprimer le compte.', + 'LBL_SELECT_ACCOUNT' => 'Sélectionner compte', + 'LBL_GENERAL_INFORMATION' => 'Information', + 'LBL_NEW_POTENTIAL' => 'Nouvelle affaire', + 'LBL_POTENTIAL_TITLE' => 'Affaires', + 'LBL_NEW_TASK' => 'Nouvelle tâche', + 'LBL_TASK_TITLE' => 'Tâches', + 'LBL_NEW_CALL' => 'Nouvel appel', + 'LBL_CALL_TITLE' => 'Appels', + 'LBL_NEW_MEETING' => 'Nouveau rendez-vous', + 'LBL_MEETING_TITLE' => 'Rendez-vous', + 'LBL_NEW_EMAIL' => 'Nouvel email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_CONTACT' => 'Nouveau contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_ALL' => 'Tous', + 'LBL_PROSPECT' => 'Prospect', + 'LBL_INVESTOR' => 'Investisseur', + 'LBL_RESELLER' => 'Revendeur', + 'LBL_PARTNER' => 'Partenaire', + 'LBL_TOOL_FORM_TITLE' => 'Outils', + 'Account Name' => 'Nom compte', + 'Phone' => 'Téléphone', + 'Website' => 'Site Web', + 'Fax' => 'Fax', + 'Ticker Symbol' => 'Symbole boursier', + 'Other Phone' => 'Téléphone (alt.)', + 'Member Of' => 'Filiale de', + 'Email' => 'Email', + 'Employees' => 'Effectif', + 'Other Email' => 'Autre email', + 'Ownership' => 'Propriétaire', + 'Rating' => 'Etat', + 'industry' => 'Secteur', + 'SIC Code' => 'Code APE', + 'Type' => 'Type', + 'Annual Revenue' => 'C.A. annuel', + 'Assigned To' => 'Assigné à', + 'Billing Address' => 'Adresse (facturation)', + 'Shipping Address' => 'Adresse (livraison)', + 'Billing City' => 'Ville (facturation)', + 'Shipping City' => 'Ville (livraison)', + 'Billing State' => 'Département (facturation)', + 'Shipping State' => 'Département (livraison)', + 'Billing Code' => 'Code postal (facturation)', + 'Shipping Code' => 'Code postal (livraison)', + 'Billing Country' => 'Pays (facturation)', + 'Shipping Country' => 'Pays (livraison)', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Description' => 'Description', + 'Shipping Po Box' => 'Boite postale (livraison)', + 'Billing Po Box' => 'Boite postale (facturation)', + 'Email Opt Out' => 'Ne pas contacter par email', + 'LBL_EMAIL_OPT_OUT' => 'Ne pas contacter par email :', + 'Notify Owner' => 'Notifier le collaborateur assigné', + '--None--' => '--Aucun--', + 'Acquired' => 'Acquis', + 'Active' => 'Actif', + 'Market Failed' => 'Perdu', + 'Project Cancelled' => 'Projet abandonné', + 'Shutdown' => 'Eteint', + 'Apparel' => 'Habillement', + 'Banking' => 'Banque', + 'Biotechnology' => 'Biotechnologie', + 'Chemicals' => 'Chimie', + 'Communications' => 'Communications', + 'Construction' => 'BTP', + 'Consulting' => 'Consulting', + 'Education' => 'Education', + 'Electronics' => 'Electronique', + 'Energy' => 'Energie', + 'Engineering' => 'Ingénierie', + 'Entertainment' => 'Divertissement', + 'Environmental' => 'Environnement', + 'Finance' => 'Finance', + 'Food & Beverage' => 'Agro-alimentaire', + 'Government' => 'Secteur public', + 'Healthcare' => 'Santé', + 'Hospitality' => 'Hôpitaux', + 'Insurance' => 'Assurances', + 'Machinery' => 'Construction mécanique', + 'Manufacturing' => 'Fabrication', + 'Media' => 'Médias', + 'Not For Profit' => 'Associatif', + 'Recreation' => 'Récréatif', + 'Retail' => 'Détaillant', + 'Shipping' => 'Livreur', + 'Technology' => 'Technologie', + 'Telecommunications' => 'Télécommunications', + 'Transportation' => 'Transport', + 'Utilities' => 'Utilitaire', + 'Other' => 'Autre', + 'Analyst' => 'Analyste', + 'Competitor' => 'Concurrent', + 'Customer' => 'Client', + 'Integrator' => 'Intégrateur', + 'Investor' => 'Investisseur', + 'Partner' => 'Partenaire', + 'Press' => 'Presse', + 'Prospect' => 'Prospect', + 'Reseller' => 'Revendeur', + 'LBL_START_DATE' => 'Date de début', + 'LBL_END_DATE' => 'Date de fin', + 'LBL_ACCOUNT_EXIST' => 'Ce nom de compte est déjà utilisé', + 'LBL_MAILER_EXPORT' => 'Mailer Export', + 'LBL_MAILER_EXPORT_CONTACTS_TYPE' => 'Selectionner le contact :', + 'LBL_MAILER_EXPORT_CONTACTS_DESCR' => 'Les contacts peuvent également être sélectionnés via "Champs personnalisés" et d\'autres champs standards.', + 'LBL_MAILER_EXPORT_RESULTS_TYPE' => 'Sélectionnez un type d\'export', + 'LBL_MAILER_EXPORT_RESULTS_DESCR' => 'Les données seront prises des comptes et leurs contacts qui ont été sélectionnés de la recherche précédente.', + 'LBL_EXPORT_RESULTS_EMAIL' => 'Données d\'export par email', + 'LBL_EXPORT_RESULTS_EMAIL_CORP' => 'Pendant l\'export des données mails, utiliser l\'email de l\'entreprise du compte si le champ Email du contact est vide', + 'LBL_EXPORT_RESULTS_FULL' => 'Exporter les données avec les contacts, emails, noms de compte, adresses, téléphones, etc.', + 'LBL_EXPORT_RESULTS_GO' => 'Exporter', + 'LBL_MAILER_EXPORT_IGNORE' => '--ignorer--', + 'LBL_MAILER_EXPORT_CHECKED' => 'Sélectionné', + 'LBL_MAILER_EXPORT_NOTCHECKED' => 'Non sélectionné', + //Module Sequence Numbering + 'Account No'=>'Compte N°', + // END + + // Account Hierarchy + 'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Afficher la hiérarchie des comptes', + 'Accounts ID' => 'Compte ID', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Accounts/language/hu_hu.lang.php b/modules/Accounts/language/hu_hu.lang.php new file mode 100644 index 0000000..428c718 --- /dev/null +++ b/modules/Accounts/language/hu_hu.lang.php @@ -0,0 +1,204 @@ + 'Cégek', + 'LBL_MODULE_TITLE' => 'Cégek: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Cég Keresés', + 'LBL_LIST_FORM_TITLE' => 'Cég Lista', + 'LBL_NEW_FORM_TITLE' => 'Új Cég', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Szervezeti tagság', + 'LBL_TOP_ACCOUNTS' => 'Legfontosabb cégeim', + 'LBL_TOP_AMOUNT' => 'Összeg', + 'LBL_LIST_ACCOUNT_NAME' => 'Cég neve', + 'LBL_LIST_CITY' => 'Város', + 'LBL_LIST_WEBSITE' => 'Weboldal', + 'LBL_LIST_STATE' => 'Állam/megye', + 'LBL_LIST_PHONE' => 'Telefon', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email cím', + 'LBL_LIST_CONTACT_NAME' => 'Kapcsolat neve', + 'LBL_LIST_AMOUNT' => 'Teljes összeg', + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + 'LBL_ACCOUNT' => 'Cég:', + 'LBL_ACCOUNT_NAME' => 'Cég neve:', + 'LBL_PHONE' => 'Telefon:', + 'LBL_WEBSITE' => 'Weboldal:', + 'LBL_FAX' => 'Fax:', + 'LBL_TICKER_SYMBOL' => 'Tőzsdei rövidítés:', + 'LBL_OTHER_PHONE' => 'Telefon, másik:', + 'LBL_ANY_PHONE' => 'Telefon, bármely:', + 'LBL_MEMBER_OF' => 'Tagja:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMPLOYEES' => 'Alkalmazottak:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email, másik:', + 'LBL_ANY_EMAIL' => 'Email, bármely:', + 'LBL_OWNERSHIP' => 'Tulajdonos:', + 'LBL_RATING' => 'Értékelés:', + 'LBL_INDUSTRY' => 'Iparág:', + 'LBL_SIC_CODE' => 'TEÁOR:', + 'LBL_TYPE' => 'Típus:', + 'LBL_ANNUAL_REVENUE' => 'Éves forgalom:', + 'LBL_ADDRESS_INFORMATION' => 'Cím adatok', + 'LBL_ACCOUNT_INFORMATION' => 'Cég adatok', + 'LBL_CUSTOM_INFORMATION' => 'Egyedi adatok', + 'LBL_BILLING_ADDRESS' => 'Számlázási cím:', + 'LBL_SHIPPING_ADDRESS' => 'Szállítási cím:', + 'LBL_ANY_ADDRESS' => 'Cím, bármely:', + 'LBL_CITY' => 'Város:', + 'LBL_STATE' => 'Állam:', + 'LBL_POSTAL_CODE' => 'Írányítószám:', + 'LBL_COUNTRY' => 'Ország:', + 'LBL_DESCRIPTION_INFORMATION' => 'Leírás', + 'LBL_DESCRIPTION' => 'Leírás:', + 'NTC_COPY_BILLING_ADDRESS' => 'Számlázási cím másolása a szállítási címbe', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Szállítási cím másolása a számlázási címbe', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Biztos vagy abban, hogy ezt a rekorodot mint tagszervezetet törölni akarod?', + 'LBL_DUPLICATE' => 'Lehetséges Cég Duplikáció', + 'MSG_DUPLICATE' => 'Ennek a Cégnek a létrehozása valószínűleg duplikálni fog egy már létező Céget a rendszerben. Kiválaszthatsz egy már létező Céget a listáról innen alább, vagy kattinthatsz az Új Cég gombra, hogy folytasd a cég létrehozását a már bevitt adatokkal.', + 'LBL_INVITEE' => 'Kapcsolatok', + 'ERR_DELETE_RECORD' => 'Egy rekord azonosítót meg kell adnon a vtiger_account törléséhez.', + 'LBL_SELECT_ACCOUNT' => 'Cég Kiválasztása', + 'LBL_GENERAL_INFORMATION' => 'Általános adatok', + 'LBL_NEW_POTENTIAL' => 'Új Lehetőség', + 'LBL_POTENTIAL_TITLE' => 'Lehetőségek', + 'LBL_NEW_TASK' => 'Új Feladat', + 'LBL_TASK_TITLE' => 'Feladatok', + 'LBL_NEW_CALL' => 'Új Hívás', + 'LBL_CALL_TITLE' => 'Hívások', + 'LBL_NEW_MEETING' => 'Új Megbeszélés', + 'LBL_MEETING_TITLE' => 'Megbeszélések', + 'LBL_NEW_EMAIL' => 'Új Email', + 'LBL_EMAIL_TITLE' => 'Emailek', + 'LBL_NEW_CONTACT' => 'Új Kapcsolat', + 'LBL_CONTACT_TITLE' => 'Kapcsolatok', + 'LBL_ALL' => 'Minden', + 'LBL_PROSPECT' => 'Vevő jelölt', + 'LBL_INVESTOR' => 'Befektető', + 'LBL_RESELLER' => 'Viszonteladó', + 'LBL_PARTNER' => 'Partner', + 'LBL_TOOL_FORM_TITLE' => 'Cég eszközök', + 'Account Name' => 'Cég neve', + 'Phone' => 'Telefon', + 'Website' => 'Weboldal', + 'Fax' => 'Fax', + 'Ticker Symbol' => 'Tőzsdei rövidítés', + 'Other Phone' => 'Telefon, másik', + 'Member Of' => 'Tagja', + 'Email' => 'Email', + 'Employees' => 'Alkalmazottak', + 'Other Email' => 'Email, másik', + 'Ownership' => 'Tulajdonos', + 'Rating' => 'Értékelés', + 'industry' => 'Iparág', + 'SIC Code' => 'TEÁOR', + 'Type' => 'Típus', + 'Annual Revenue' => 'Éves forgalom', + 'Assigned To' => 'Felelős', + 'Billing Address' => 'Számlázási cím - Utca', + 'Shipping Address' => 'Szállítási cím - Utca', + 'Billing City' => 'Számlázási cím - Város', + 'Shipping City' => 'Szállítási cím - Város', + 'Billing State' => 'Számlázási cím - Állam/Megye', + 'Shipping State' => 'Szállítási cím - Állam/Megye', + 'Billing Code' => 'Számlázási cím - Irányítószám', + 'Shipping Code' => 'Szállítási cím - Irányítószám', + 'Billing Country' => 'Számlázási cím - Ország', + 'Shipping Country' => 'Szállítási cím - Ország', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Description' => 'Leírás', + 'Shipping Po Box' => 'Szállítási cím - Postafiók', + 'Billing Po Box' => 'Számlázási cím - Postafiók', + 'Email Opt Out' => 'Email leiratkozva', + 'LBL_EMAIL_OPT_OUT' => 'Email leiratkozva:', + 'Notify Owner' => 'Értesítsd a tulajdonost', + '--None--' => '--Nincs--', + 'Acquired' => 'Megszerzett', + 'Active' => 'Aktív', + 'Market Failed' => 'Rossz célpiac', + 'Project Cancelled' => 'Törölt projekt', + 'Shutdown' => 'Halott akta', + 'Apparel' => 'Ruházat - Felszerelés', + 'Banking' => 'Bank', + 'Biotechnology' => 'Biotechnológia', + 'Chemicals' => 'Vegyipar', + 'Communications' => 'Kommunikáció', + 'Construction' => 'Építőipar', + 'Consulting' => 'Tanácsadás', + 'Education' => 'Oktatás', + 'Electronics' => 'Elektronika', + 'Energy' => 'Energia szektor', + 'Engineering' => 'Mérnöki tevékenység', + 'Entertainment' => 'Szórakoztató ipar', + 'Environmental' => 'Környezetvédelem', + 'Finance' => 'Pénzügyek', + 'Food & Beverage' => 'Élelmiszer ipar', + 'Government' => 'Államigazgatás', + 'Healthcare' => 'Egészségügy', + 'Hospitality' => 'Vendéglátás', + 'Insurance' => 'Biztosítás', + 'Machinery' => 'Gépipar', + 'Manufacturing' => 'Gyártás', + 'Media' => 'Média', + 'Not For Profit' => 'Non-Profit', + 'Recreation' => 'Wellness', + 'Retail' => 'Kiskereskedelem', + 'Shipping' => 'Szállítás', + 'Technology' => 'Technológia', + 'Telecommunications' => 'Telekommunikáció', + 'Transportation' => 'Közlekedés', + 'Utilities' => 'Szolgáltatás', + 'Other' => 'Egyéb', + 'Analyst' => 'Elemző', + 'Competitor' => 'Versenytárs', + 'Customer' => 'Vevő', + 'Integrator' => 'Integrátor', + 'Investor' => 'Befektető', + 'Partner' => 'Partner', + 'Press' => 'Sajtó', + 'Prospect' => 'Vevőjelölt', + 'Reseller' => 'Viszonteladó', + 'LBL_START_DATE' => 'Kezdő dátum', + 'LBL_END_DATE' => 'Záró dátum', + 'LBL_ACCOUNT_EXIST' => 'Cég név már létezik!', + 'LBL_MAILER_EXPORT' => 'Levelezés Exportálása', + 'LBL_MAILER_EXPORT_CONTACTS_TYPE' => 'Kapcsolatok kiválasztása:', + 'LBL_MAILER_EXPORT_CONTACTS_DESCR' => 'A Kapcsolatok kiválaszthatók egyedi mezőkön és néhány standard mezőn keresztül is.', + 'LBL_MAILER_EXPORT_RESULTS_TYPE' => 'Az export típus kiválasztása:', + 'LBL_MAILER_EXPORT_RESULTS_DESCR' => 'Az adatokat a Cégekből és a hozzájuk tartozó Kapcsolatokból szedtük össze, amik a megelőző keresés eredményeképpen rendelkezésünkre álltak.', + 'LBL_EXPORT_RESULTS_EMAIL' => 'E-levelező adatok exportálása', + 'LBL_EXPORT_RESULTS_EMAIL_CORP' => 'Email adatok exportálása a "Cég Email" mezőből, amennyiben a Kapcsolatok "Email" mező üres', + 'LBL_EXPORT_RESULTS_FULL' => 'Adatok exportálása a Kapcsolatok, E-Mail, Cégnév, Cím, Telefon, stb. adatokkal', + 'LBL_EXPORT_RESULTS_GO' => 'Exportálás', + 'LBL_MAILER_EXPORT_IGNORE' => '- mindegy -', + 'LBL_MAILER_EXPORT_CHECKED' => 'Igen', + 'LBL_MAILER_EXPORT_NOTCHECKED' => 'Nem', + 'Account No' => 'Cég No.', + 'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Cég Hierarchiát mutat', + 'Accounts ID' => 'Cég AZ', + 'Send SMS' => 'SMS küldés', + 'Projects' => 'Projektek', + 'Service Places' => 'Szolgáltatási helyek' +); +?> \ No newline at end of file diff --git a/modules/Accounts/language/nl_nl.lang.php b/modules/Accounts/language/nl_nl.lang.php new file mode 100644 index 0000000..18ba05b --- /dev/null +++ b/modules/Accounts/language/nl_nl.lang.php @@ -0,0 +1,252 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.5 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Accounts/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account zoeken', +'LBL_LIST_FORM_TITLE'=>'Accountlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuw account', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Leden organisatie', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'Mijn accounts', +'LBL_TOP_AMOUNT'=>'Hoeveelheid', +'LBL_LIST_ACCOUNT_NAME'=>'Accountnaam', +'LBL_LIST_CITY'=>'Plaats', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'Provincie', +'LBL_LIST_PHONE'=>'Telefoon', +'LBL_LIST_EMAIL_ADDRESS'=>'E-mailadres', +'LBL_LIST_CONTACT_NAME'=>'Contactnaam', +'LBL_LIST_AMOUNT' => 'Totale verkoopkansen', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Accountnaam:', +'LBL_PHONE'=>'Telefoon:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker symbool:', +'LBL_OTHER_PHONE'=>'Telefoon Mobiel:', +'LBL_ANY_PHONE'=>'Telefoon Extra:', +'LBL_MEMBER_OF'=>'Onderdeel van:', +'LBL_EMAIL'=>'E-mail:', +'LBL_EMPLOYEES'=>'Werknemers:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Bedrijfs e-mailadres:', +'LBL_ANY_EMAIL'=>'Extra e-mailadres:', +'LBL_OWNERSHIP'=>'Eigendom:', +'LBL_RATING'=>'Beoordeling:', +'LBL_INDUSTRY'=>'Industrie', +'LBL_SIC_CODE'=>'SIC nummer:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Jaarlijkse omzet:', +'LBL_ADDRESS_INFORMATION'=>'Adresinformatie', +'LBL_ACCOUNT_INFORMATION'=>'Accountinformatie', +'LBL_CUSTOM_INFORMATION'=>'Extra informatie', +'LBL_BILLING_ADDRESS'=>'Postadres:', +'LBL_SHIPPING_ADDRESS'=>'Afleveradres:', +'LBL_ANY_ADDRESS'=>'Bezoekadres:', +'LBL_CITY'=>'Plaats:', +'LBL_STATE'=>'Provincie:', +'LBL_POSTAL_CODE'=>'Postcode:', +'LBL_COUNTRY'=>'Land:', +'LBL_DESCRIPTION_INFORMATION'=>'Omschrijving', +'LBL_DESCRIPTION'=>'Omschrijving:', +'NTC_COPY_BILLING_ADDRESS'=>'Kopieer Postadres naar Bezoekadres', +'NTC_COPY_SHIPPING_ADDRESS'=>'Kopieer Bezoekadres naar Postadres', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Weet u zeker dat u dit veld wilt verwijderen als Onderdeel van deze organisatie?', +'LBL_DUPLICATE'=>'Mogelijke dubbele Accounts', +'MSG_DUPLICATE' => 'Wanneer u deze Account aanmaakt kan dit leiden tot een duplicaat. U kunt een keuze maken uit de geselecteerde accounts hieronder of u kunt klikken op Nieuw Account om door te gaan met uw nieuwe Account en de door u ingegeven informatie.', + +'LBL_INVITEE'=>'Contacten', +'ERR_DELETE_RECORD'=>"Een veld moet gespecificeerd zijn om de account te verwijderen.", + +'LBL_SELECT_ACCOUNT'=>'Selecteer account', +'LBL_GENERAL_INFORMATION'=>'Algemene informatie', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nieuwe Verkoopkans', +'LBL_POTENTIAL_TITLE'=>'Verkoopkansen', + +'LBL_NEW_TASK'=>'Nieuwe taak', +'LBL_TASK_TITLE'=>'Taken', +'LBL_NEW_CALL'=>'Telefoongesprek', +'LBL_CALL_TITLE'=>'Telefoongesprekken', +'LBL_NEW_MEETING'=>'Vergadering', +'LBL_MEETING_TITLE'=>'Vergadering', +'LBL_NEW_EMAIL'=>'Nieuwe e-mail', +'LBL_EMAIL_TITLE'=>'E-mail', +'LBL_NEW_CONTACT'=>'Nieuwe contacten', +'LBL_CONTACT_TITLE'=>'Contacten', + +//Added fields after RC1 - Release +'LBL_ALL'=>'Alle', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investeerder', +'LBL_RESELLER'=>'Wederverkoper', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account gereedschap', +//Added for 4GA +'Account Name'=>'Accountnaam', +'Phone'=>'Telefoon', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Ticker symbool', +'Other Phone'=>'Telefoon Mobiel', +'Member Of'=>'Onderdeel van', +'Email'=>'E-mail', +'Employees'=>'Werknemers', +'Other Email'=>'Extra e-mailadres', +'Ownership'=>'Eigendom', +'Rating'=>'Beoordeling', +'industry'=>'Industrie', +'SIC Code'=>'SBI code', +'Type'=>'Type', +'Annual Revenue'=>'Jaarlijkse omzet', +'Assigned To'=>'Toegewezen aan', +'Billing Address'=>'Postadres', +'Shipping Address'=>'Bezoekadres', +'Billing City'=>'P Plaats', +'Shipping City'=>'B Plaats', +'Billing State'=>'P Provincie', +'Shipping State'=>'B Provincie', +'Billing Code'=>'P Postcode', +'Shipping Code'=>'B Postcode', +'Billing Country'=>'P Land', +'Shipping Country'=>'B Land', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', +'Description'=>'Omschrijving', +'Billing Po Box'=>'P Postbus', +'Shipping Po Box'=>'B Postbus', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'E-mail optie uit', +'LBL_EMAIL_OPT_OUT'=>'E-mail optie uit:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notificatie aan eigenaar', + +//Added for existing picklist entries + +'--None--'=>'--Geen--', + +'Acquired'=>'Overname', +'Active'=>'Actief', +'Market Failed'=>'Slechte markt', +'Project Cancelled'=>'Project geannuleerd', +'Shutdown'=>'Afsluiten', + +'Apparel'=>'Kleding', +'Banking'=>'Banken', +'Biotechnology'=>'Biotechnologie', +'Chemicals'=>'Chemicalieen', +'Communications'=>'Communicatie', +'Construction'=>'Constructie', +'Consulting'=>'Consulting', +'Education'=>'Opleidingen', +'Electronics'=>'Electronica', +'Energy'=>'Energie', +'Engineering'=>'Installatie', +'Entertainment'=>'Entertainment', +'Environmental'=>'Milieu', +'Finance'=>'Financieel', +'Food & Beverage'=>'Voedingsmiddelen & Dranken', +'Government'=>'Overheid', +'Healthcare'=>'Gezondheidszorg', +'Hospitality'=>'Hotels en Conferentie gelegenheden', +'Insurance'=>'Verzekering', +'Machinery'=>'Machinerie', +'Manufacturing'=>'Productie', +'Media'=>'Media', +'Not For Profit'=>'Non Profit', +'Recreation'=>'Recreatie', +'Retail'=>'Detailhandel', +'Shipping'=>'Distributie', +'Technology'=>'Technologie', +'Telecommunications'=>'Telecommunicatie', +'Transportation'=>'Transport', +'Utilities'=>'Nutsbedrijven', +'Other'=>'Anders', + +'Analyst'=>'Analist', +'Competitor'=>'Concurrent', +'Customer'=>'Klant', +'Integrator'=>'Integrator', +'Investor'=>'Investeerder', +'Partner'=>'Partner', +'Press'=>'Pers', +'Prospect'=>'Prospect', +'Reseller'=>'Wederverkoper', +'LBL_START_DATE' => 'Startdatum', +'LBL_END_DATE' => 'Einddatum', +// Added/Updated for vtiger CRM 5.0.4 + +//added to fix the issue #4081 +'LBL_ACCOUNT_EXIST' => 'Accountnaam bestaat al!', + +// mailer export +'LBL_MAILER_EXPORT' => 'Mailer export', +'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'Selecteer contacten:', +'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'Contacten kunt u selecteren met "standaard velden" en andere velden.', +'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'Selecteer export type:', +'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'De gegevens zullen worden verzameld van accounts en haar contacten, die zijn retourneerd van een vorige zoekopdracht.', +'LBL_EXPORT_RESULTS_EMAIL' => 'Export e-mail data', +'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'Export e-mail data, de "bedrijfs e-mail account" zal worden gebruikt als het contact e-mail veld niet ingevuld is.', +'LBL_EXPORT_RESULTS_FULL'=>'Export data met contacten, e-mail, Accountnaam, adres, telefoon, etc.', +'LBL_EXPORT_RESULTS_GO'=>'Export', +'LBL_MAILER_EXPORT_IGNORE' => '--negeer--', +'LBL_MAILER_EXPORT_CHECKED' =>'Gecontroleerd', +'LBL_MAILER_EXPORT_NOTCHECKED' => 'Niet gecontroleerd', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Account No'=>'Account Nr', +// END + +// Account Hierarchy +'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Toon Account Hierarchie', + + +); + +?> \ No newline at end of file diff --git a/modules/Accounts/language/pt_br.lang.php b/modules/Accounts/language/pt_br.lang.php new file mode 100644 index 0000000..8f01164 --- /dev/null +++ b/modules/Accounts/language/pt_br.lang.php @@ -0,0 +1,243 @@ +'Organizações', +'LBL_MODULE_TITLE'=>'Organizações: Home', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisar Organizações', +'LBL_LIST_FORM_TITLE'=>'Listar Organizações', +'LBL_NEW_FORM_TITLE'=>'Nova Organização', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Organizações Membro', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'Minhas Principais Organizações', +'LBL_TOP_AMOUNT'=>'Quantidade', +'LBL_LIST_ACCOUNT_NAME'=>'Nome Organização', +'LBL_LIST_CITY'=>'Cidade', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'Estado', +'LBL_LIST_PHONE'=>'Telefone', +'LBL_LIST_EMAIL_ADDRESS'=>'Endereço Email', +'LBL_LIST_CONTACT_NAME'=>'Nome Contato', +'LBL_LIST_AMOUNT' => 'Total', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Organização:', +'LBL_ACCOUNT_NAME'=>'Nome Organização:', +'LBL_PHONE'=>'Telefone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Cód. Bolsa:', +'LBL_OTHER_PHONE'=>'Telefone Alternativo:', +'LBL_ANY_PHONE'=>'Outro Telefone:', +'LBL_MEMBER_OF'=>'Membro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empregados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email Alterntivo:', +'LBL_ANY_EMAIL'=>'Outro Email:', +'LBL_OWNERSHIP'=>'Proprietário:', +'LBL_RATING'=>'Avaliação:', +'LBL_INDUSTRY'=>'Atividade:', +'LBL_SIC_CODE'=>'Cod CNAE:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Receita Anual:', +'LBL_ADDRESS_INFORMATION'=>'Informação Endereço', +'LBL_ACCOUNT_INFORMATION'=>'Informação Organização', +'LBL_CUSTOM_INFORMATION'=>'Informação Customizada', +'LBL_BILLING_ADDRESS'=>'Endereço Faturamento:', +'LBL_SHIPPING_ADDRESS'=>'Endereço Entrega:', +'LBL_ANY_ADDRESS'=>'Endereço Alternativo:', +'LBL_CITY'=>'Cidade:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'CEP:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descrição', +'LBL_DESCRIPTION'=>'Descrição:', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar Endereço Faturamento', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar Endereço Entrega', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Você tem certeza que deseja remover este registro enquanto um membro da organização?', +'LBL_DUPLICATE'=>'Organizações com Possibilidade de Duplicação', +'MSG_DUPLICATE' => 'Criando esta vtiger_account poderá criar uma vtiger_potentialy Organização duplicada. Você pode também selecionar uma vtiger_account da lista abaixo ou clicar sobre Criar Nova Organização para continuar criando uma nova vtiger_account com os dados anteriores.', + +'LBL_INVITEE'=>'Contatos', +'ERR_DELETE_RECORD'=>"Defina um registro para apagar vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Selecionar Organização', +'LBL_GENERAL_INFORMATION'=>'Informação Geral', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nova Oportunidade', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nova Tarefa', +'LBL_TASK_TITLE'=>'Tarefas', +'LBL_NEW_CALL'=>'Nova Chamada', +'LBL_CALL_TITLE'=>'Chamadas', +'LBL_NEW_MEETING'=>'Nova Reunião', +'LBL_MEETING_TITLE'=>'Reuniões', +'LBL_NEW_EMAIL'=>'Novo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Novo Contato', +'LBL_CONTACT_TITLE'=>'Contatos', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todos', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investidor', +'LBL_RESELLER'=>'Revendedor', +'LBL_PARTNER'=>'Parceiro', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Ferramentas da Organização', +//Added for 4GA +'Account Name'=>'Nome Organização', +'Phone'=>'Telefone', +'Website'=>'Website', +'Fax'=>'Fax', +'Ticker Symbol'=>'Cod. Bolsa', +'Other Phone'=>'Telefone Alternativo', +'Member Of'=>'Membro de', +'Email'=>'Email', +'Employees'=>'Empregados', +'Other Email'=>'Email Alternativo', +'Ownership'=>'Propriedade', +'Rating'=>'Avaliação', +'industry'=>'Atividade', +'SIC Code'=>'Cod CNAE', +'Type'=>'Tipo', +'Annual Revenue'=>'Receita Anual', +'Assigned To'=>'Responsável', +'Billing Address'=>'Endereço Faturamento', +'Shipping Address'=>'Endereço Entrega', +'Billing City'=>'Cidade Faturamento', +'Shipping City'=>'Cidade Entrega', +'Billing State'=>'Estado Faturamento', +'Shipping State'=>'Estado Entrega', +'Billing Code'=>'CEP Faturamento', +'Shipping Code'=>'CEP Entrega', +'Billing Country'=>'País Faturamento', +'Shipping Country'=>'País Entrega', +'Created Time'=>'Hora Criação', +'Modified Time'=>'Hora Modificação', +'Description'=>'Descrição', +'Shipping Po Box'=>'Cx Postal Entrega', +'Billing Po Box'=>'Cx Postal Faturamento', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'Rejeita Email', +'LBL_EMAIL_OPT_OUT'=>'Rejeita Email:', + +//Added after 5Alpha5 +'Notify Owner'=>'Notificar Proprietário', + +//Added for existing picklist entries + +'--None--'=>'--Nada--', + +'Acquired'=>'Aquirido', +'Active'=>'Ativo', +'Market Failed'=>'Venda não realizada', +'Project Cancelled'=>'Projeto Cancelado', +'Shutdown'=>'Encerrado', + +'Apparel'=>'Vestuário', +'Banking'=>'Bancos', +'Biotechnology'=>'Biotecnologia', +'Chemicals'=>'Química', +'Communications'=>'Comunicações', +'Construction'=>'Construção', +'Consulting'=>'Consultoria', +'Education'=>'Educação', +'Electronics'=>'Eletrônica', +'Energy'=>'Energia', +'Engineering'=>'Engenharia', +'Entertainment'=>'Entretenimento', +'Environmental'=>'Meio Ambiente', +'Finance'=>'Finanças', +'Food & Beverage'=>'Alimentos & Bebidas', +'Government'=>'Governo', +'Healthcare'=>'Saúde', +'Hospitality'=>'Hotéis', +'Insurance'=>'Seguros', +'Machinery'=>'Máquinas', +'Manufacturing'=>'Indústria', +'Media'=>'Mídia', +'Not For Profit'=>'ONG', +'Recreation'=>'Recreação', +'Retail'=>'Comércio', +'Shipping'=>'Transporte Marítimo', +'Technology'=>'Tecnologia', +'Telecommunications'=>'Telecomunicações', +'Transportation'=>'Transportes', +'Utilities'=>'Serviço Público', +'Other'=>'Outro', + +'Analyst'=>'Analista', +'Competitor'=>'Concorrente', +'Customer'=>'Cliente', +'Integrator'=>'Integrador', +'Investor'=>'Investidor', +'Partner'=>'Parceiro', +'Press'=>'Imprensa', +'Prospect'=>'Prospect', +'Reseller'=>'Revendedor', +'LBL_START_DATE' => 'Data Inicial', +'LBL_END_DATE' => 'Data Final', + +// Added/Updated for vtiger CRM 5.0.4 + +//added to fix the issue #4081 +'LBL_ACCOUNT_EXIST' => 'O Nome da Organização já Existe!', + +// mailer export +'LBL_MAILER_EXPORT' => 'Exportar', +'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'Selecione Contatos:', +'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'Os Contatos também podem ser selecionados a partir dos "Campos Customizados" e através de qualquer campo padrão.', +'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'Selecione o tipo de Exportação:', +'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'Os dados serão obtidos a partir das Organizações e seus Contatos, que retornarem + a partir da pesquisa realizada.', +'LBL_EXPORT_RESULTS_EMAIL' => 'Exportar Contato e E-mail', +'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'Exportar Contatos e E-mails, utilizando o "E-mail da Empresa" se o "E-mail" do Contato estiver vazio', +'LBL_EXPORT_RESULTS_FULL'=>'Exportar dados com Contatos, E-mail, Organização, Endereço, Telefone, etc.', +'LBL_EXPORT_RESULTS_GO'=>'Executar Exportação', +'LBL_MAILER_EXPORT_IGNORE' => '--ignorar--', +'LBL_MAILER_EXPORT_CHECKED' =>'Checado', +'LBL_MAILER_EXPORT_NOTCHECKED' => 'Não Checado', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Account No'=>'Cód. Organização', +// END + +// Organization Hierarchy +'LBL_SHOW_ACCOUNT_HIERARCHY' => 'Mostrar Hierarquia da Organização', +'Accounts ID' => 'ID Organizações', + +); + +?> diff --git a/modules/Accounts/language/zh_cn.lang.php b/modules/Accounts/language/zh_cn.lang.php new file mode 100644 index 0000000..70203f3 --- /dev/null +++ b/modules/Accounts/language/zh_cn.lang.php @@ -0,0 +1,248 @@ +'客户', +'LBL_MODULE_TITLE'=>'客户:首页', +'LBL_SEARCH_FORM_TITLE'=>'搜寻客户', +'LBL_LIST_FORM_TITLE'=>'客户列表', +'LBL_NEW_FORM_TITLE'=>'新增客户', +'LBL_MEMBER_ORG_FORM_TITLE'=>'成员组织性质', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'我的重要客户', +'LBL_TOP_AMOUNT'=>'金额', +'LBL_LIST_ACCOUNT_NAME'=>'客户名称', +'LBL_LIST_CITY'=>'乡镇市区', +'LBL_LIST_WEBSITE'=>'网站', +'LBL_LIST_STATE'=>'县市', +'LBL_LIST_PHONE'=>'电话', +'LBL_LIST_EMAIL_ADDRESS'=>'电子邮件地址', +'LBL_LIST_CONTACT_NAME'=>'联系人姓名', +'LBL_LIST_AMOUNT'=>'机会总计', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name'=>'LBL_LIST_ACCOUNT_NAME', +'db_website'=>'LBL_LIST_WEBSITE', +'db_billing_address_city'=>'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'客户:', +'LBL_ACCOUNT_NAME'=>'客户名称:', +'LBL_PHONE'=>'电话:', +'LBL_WEBSITE'=>'网站:', +'LBL_FAX'=>'传真:', +'LBL_TICKER_SYMBOL'=>'传票符号:', +'LBL_OTHER_PHONE'=>'其它电话:', +'LBL_ANY_PHONE'=>'其它电话:', +'LBL_MEMBER_OF'=>'成员:', +'LBL_EMAIL'=>'电子邮件:', +'LBL_EMPLOYEES'=>'员工:', +'LBL_OTHER_EMAIL_ADDRESS'=>'其它电子邮件:', +'LBL_ANY_EMAIL'=>'其它电子邮件:', +'LBL_OWNERSHIP'=>'所有者:', +'LBL_RATING'=>'评价:', +'LBL_INDUSTRY'=>'行业类别:', +'LBL_SIC_CODE'=>'营业执照编号', +'LBL_TYPE'=>'类型:', +'LBL_ANNUAL_REVENUE'=>'年营业额:', +'LBL_ADDRESS_INFORMATION'=>'地址信息', +'LBL_ACCOUNT_INFORMATION'=>'账号信息', +'LBL_CUSTOM_INFORMATION'=>'客户信息', +'LBL_BILLING_ADDRESS'=>'账单地址:', +'LBL_SHIPPING_ADDRESS'=>'送货地址:', +'LBL_ANY_ADDRESS'=>'其它地址:', +'LBL_CITY'=>'乡镇市区:', +'LBL_STATE'=>'县市:', +'LBL_POSTAL_CODE'=>'邮政编码:', +'LBL_COUNTRY'=>'国家:', +'LBL_DESCRIPTION_INFORMATION'=>'描述信息', +'LBL_DESCRIPTION'=>'描述:', +'NTC_COPY_BILLING_ADDRESS'=>'复制账单地址内容到送货地址', +'NTC_COPY_SHIPPING_ADDRESS'=>'复制送货地址内容到账单地址', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'您确定要删除这笔成员/组织的记录吗?', +'LBL_DUPLICATE'=>'复制潜在案件客户', +'MSG_DUPLICATE'=>'由潜在案件客户中复制建立新客户,您可以点选客户列表中的客户以复制建立新的客户,并且继承它的相关数据。', + +'LBL_INVITEE'=>'联系人', +'ERR_DELETE_RECORD'=>'要删除账号您必须指定一笔记录编号.', + +'LBL_SELECT_ACCOUNT'=>'选择客户', +'LBL_GENERAL_INFORMATION'=>'主要信息', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'新增潜在案件', +'LBL_POTENTIAL_TITLE'=>'潜在案件', + +'LBL_NEW_TASK'=>'新增任务', +'LBL_TASK_TITLE'=>'任务', +'LBL_NEW_CALL'=>'新增电话记录', +'LBL_CALL_TITLE'=>'电话记录', +'LBL_NEW_MEETING'=>'新增会议记录', +'LBL_MEETING_TITLE'=>'会议', +'LBL_NEW_EMAIL'=>'新增电子邮件', +'LBL_EMAIL_TITLE'=>'邮件', +'LBL_NEW_CONTACT'=>'新增联系人', +'LBL_CONTACT_TITLE'=>'联系人', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'全部', +'LBL_PROSPECT'=>'期望', +'LBL_INVESTOR'=>'投资者', +'LBL_RESELLER'=>'转售人', +'LBL_PARTNER'=>'伙伴', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'客户工具', +//Added for 4GA +'Account Name'=>'客户名称', +'Phone'=>'电话', +'Website'=>'网址', +'Fax'=>'传真', +'Ticker Symbol'=>'股票代码', +'Other Phone'=>'其它电话', +'Member Of'=>'成员', +'Email'=>'电子邮件', +'Employees'=>'员工', +'Other Email'=>'其它电子邮件', +'Ownership'=>'拥有者', +'Rating'=>'评价', +'industry'=>'行业类别', +'SIC Code'=>'营业执照编号', +'Type'=>'类型', +'Annual Revenue'=>'年营业额', +'Assigned To'=>'负责人', +'Billing Address'=>'账单地址', +'Shipping Address'=>'送货地址', +'Billing City'=>'城市及区', +'Shipping City'=>'城市及区', +'Billing State'=>'省、直辖市', +'Shipping State'=>'省、直辖市', +'Billing Code'=>'邮政编码', +'Shipping Code'=>'邮政编码', +'Billing Country'=>'国家', +'Shipping Country'=>'国家', +'Created Time'=>'建立时间', +'Modified Time'=>'修改时间', +'Description'=>'描述', +'Shipping Po Box'=>'邮政信箱', +'Billing Po Box'=>'邮政信箱', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'拒绝电子邮件打扰', +'LBL_EMAIL_OPT_OUT'=>'拒绝电子邮件打扰:', + +//Added after 5Alpha5 +'Notify Owner'=>'提醒负责人', + +//Added for existing picklist entries + +'--None--'=>'--无--', + +'Acquired'=>'取得', +'Active'=>'启用', +'Market Failed'=>'市场失利', +'Project Cancelled'=>'项目取消', +'Shutdown'=>'关闭', + +'Apparel'=>'服装', +'Banking'=>'银行', +'Biotechnology'=>'生物科技', +'Chemicals'=>'化学', +'Communications'=>'交通', +'Construction'=>'建筑', +'Consulting'=>'顾问', +'Education'=>'教育', +'Electronics'=>'电子', +'Energy'=>'能源', +'Engineering'=>'工程', +'Entertainment'=>'娱乐', +'Environmental'=>'环境', +'Finance'=>'财务', +'Food & Beverage'=>'饮食', +'Government'=>'政府', +'Healthcare'=>'健康照护', +'Hospitality'=>'医院', +'Insurance'=>'保险', +'Machinery'=>'机械', +'Manufacturing'=>'工厂', +'Media'=>'媒体', +'Not For Profit'=>'非营利', +'Recreation'=>'娱乐中心', +'Retail'=>'零售', +'Shipping'=>'运输', +'Technology'=>'科技', +'Telecommunications'=>'通讯', +'Transportation'=>'传输', +'Utilities'=>'工具', +'Real Estate'=>'房地产公司', +'State-owned Enterprises'=>'国有企业', +'Private Enterprise'=>'民营企业', +'Construction Company'=>'建筑公司', +'LED Manufacturer'=>'LED 工程公司', +'LED Lighting Company'=>'LED 照明公司', +'Other'=>'其它', + +'Analyst'=>'分析师', +'Competitor'=>'竞争者', +'Customer'=>'客户', +'Integrator'=>'整合者', +'Investor'=>'投资者', +'Partner'=>'伙伴', +'Press'=>'新闻', +'Prospect'=>'潜在客户', +'Reseller'=>'盘商', +'LBL_START_DATE'=>'开始日期', +'LBL_END_DATE'=>'结束日期', + +// Added/Updated for vtiger CRM 5.0.4 + +//added to fix the issue #4081 +'LBL_ACCOUNT_EXIST'=>'帐户名称已存在!', + +// mailer export +'LBL_MAILER_EXPORT'=>'邮寄导出', +'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'选择通讯录:', +'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'联络可能被选择通过"自定义字段"和一些标准字段。.', +'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'选择导出类型:', +'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'聚集从账户及其联系人的数据,还给前次搜索.', +'LBL_EXPORT_RESULTS_EMAIL'=>'导出邮件联系人数据', +'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'导出邮件数据,如果联系人"电邮"为空则用"公司电邮"', +'LBL_EXPORT_RESULTS_FULL'=>'导出联系人数据,电子邮件帐户名称,地址,电话等.', +'LBL_EXPORT_RESULTS_GO'=>'导出', +'LBL_MAILER_EXPORT_IGNORE'=>'--忽略--', +'LBL_MAILER_EXPORT_CHECKED'=>'检查', +'LBL_MAILER_EXPORT_NOTCHECKED'=>'不进行检查', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Account No'=>'帐号', +//END + +// Account Hierarchy +'LBL_SHOW_ACCOUNT_HIERARCHY'=>'查看账号级别', + +); + +?> diff --git a/modules/Accounts/language/zh_tw.lang.php b/modules/Accounts/language/zh_tw.lang.php new file mode 100644 index 0000000..1e1b6bf --- /dev/null +++ b/modules/Accounts/language/zh_tw.lang.php @@ -0,0 +1,248 @@ +'客戶', +'LBL_MODULE_TITLE'=>'客戶:首頁', +'LBL_SEARCH_FORM_TITLE'=>'搜尋客戶', +'LBL_LIST_FORM_TITLE'=>'客戶列表', +'LBL_NEW_FORM_TITLE'=>'新增客戶', +'LBL_MEMBER_ORG_FORM_TITLE'=>'成員組織性質', +// Label for Top Accounts in Home Page, added for 4.2 GA +'LBL_TOP_ACCOUNTS'=>'我的重要客戶', +'LBL_TOP_AMOUNT'=>'金額', +'LBL_LIST_ACCOUNT_NAME'=>'客戶名稱', +'LBL_LIST_CITY'=>'鄉鎮市區', +'LBL_LIST_WEBSITE'=>'網站', +'LBL_LIST_STATE'=>'縣市', +'LBL_LIST_PHONE'=>'電話', +'LBL_LIST_EMAIL_ADDRESS'=>'電子郵件地址', +'LBL_LIST_CONTACT_NAME'=>'聯系人姓名', +'LBL_LIST_AMOUNT'=>'機會總計', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name'=>'LBL_LIST_ACCOUNT_NAME', +'db_website'=>'LBL_LIST_WEBSITE', +'db_billing_address_city'=>'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'客戶:', +'LBL_ACCOUNT_NAME'=>'客戶名稱:', +'LBL_PHONE'=>'電話:', +'LBL_WEBSITE'=>'網站:', +'LBL_FAX'=>'傳真:', +'LBL_TICKER_SYMBOL'=>'傳票符號:', +'LBL_OTHER_PHONE'=>'其它電話:', +'LBL_ANY_PHONE'=>'其它電話:', +'LBL_MEMBER_OF'=>'成員:', +'LBL_EMAIL'=>'電子郵件:', +'LBL_EMPLOYEES'=>'員工:', +'LBL_OTHER_EMAIL_ADDRESS'=>'其它電子郵件:', +'LBL_ANY_EMAIL'=>'其它電子郵件:', +'LBL_OWNERSHIP'=>'所有者:', +'LBL_RATING'=>'評價:', +'LBL_INDUSTRY'=>'行業類別:', +'LBL_SIC_CODE'=>'統一編號:', +'LBL_TYPE'=>'類型:', +'LBL_ANNUAL_REVENUE'=>'年營業額:', +'LBL_ADDRESS_INFORMATION'=>'地址信息', +'LBL_ACCOUNT_INFORMATION'=>'賬號信息', +'LBL_CUSTOM_INFORMATION'=>'客戶信息', +'LBL_BILLING_ADDRESS'=>'賬單地址:', +'LBL_SHIPPING_ADDRESS'=>'送貨地址:', +'LBL_ANY_ADDRESS'=>'其它地址:', +'LBL_CITY'=>'鄉鎮市區:', +'LBL_STATE'=>'縣市:', +'LBL_POSTAL_CODE'=>'郵政編碼:', +'LBL_COUNTRY'=>'國家:', +'LBL_DESCRIPTION_INFORMATION'=>'描述信息', +'LBL_DESCRIPTION'=>'描述:', +'NTC_COPY_BILLING_ADDRESS'=>'復制賬單地址內容到送貨地址', +'NTC_COPY_SHIPPING_ADDRESS'=>'復制送貨地址內容到賬單地址', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'您確定要刪除這筆成員/組織的記錄嗎?', +'LBL_DUPLICATE'=>'復制潛在案件客戶', +'MSG_DUPLICATE'=>'由潛在案件客戶中復制建立新客戶,您可以點選客戶列表中的客戶以復制建立新的客戶,並且繼承它的相關數據。', + +'LBL_INVITEE'=>'聯系人', +'ERR_DELETE_RECORD'=>'要刪除賬號您必須指定一筆記錄編號.', + +'LBL_SELECT_ACCOUNT'=>'選擇客戶', +'LBL_GENERAL_INFORMATION'=>'主要信息', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'新增潛在案件', +'LBL_POTENTIAL_TITLE'=>'潛在案件', + +'LBL_NEW_TASK'=>'新增任務', +'LBL_TASK_TITLE'=>'任務', +'LBL_NEW_CALL'=>'新增電話記錄', +'LBL_CALL_TITLE'=>'電話記錄', +'LBL_NEW_MEETING'=>'新增會議記錄', +'LBL_MEETING_TITLE'=>'會議', +'LBL_NEW_EMAIL'=>'新增電子郵件', +'LBL_EMAIL_TITLE'=>'郵件', +'LBL_NEW_CONTACT'=>'新增聯系人', +'LBL_CONTACT_TITLE'=>'聯系人', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'全部', +'LBL_PROSPECT'=>'期望', +'LBL_INVESTOR'=>'投資者', +'LBL_RESELLER'=>'轉售人', +'LBL_PARTNER'=>'夥伴', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'客戶工具', +//Added for 4GA +'Account Name'=>'客戶名稱', +'Phone'=>'電話', +'Website'=>'網址', +'Fax'=>'傳真', +'Ticker Symbol'=>'股票代碼', +'Other Phone'=>'其它電話', +'Member Of'=>'成員', +'Email'=>'電子郵件', +'Employees'=>'員工', +'Other Email'=>'其它電子郵件', +'Ownership'=>'擁有者', +'Rating'=>'評價', +'industry'=>'行業類別', +'SIC Code'=>'統一編號', +'Type'=>'類型', +'Annual Revenue'=>'年營業額', +'Assigned To'=>'負責人', +'Billing Address'=>'賬單地址', +'Shipping Address'=>'送貨地址', +'Billing City'=>'城市及區', +'Shipping City'=>'城市及區', +'Billing State'=>'省、直轄市', +'Shipping State'=>'省、直轄市', +'Billing Code'=>'郵政編碼', +'Shipping Code'=>'郵政編碼', +'Billing Country'=>'國家', +'Shipping Country'=>'國家', +'Created Time'=>'建立時間', +'Modified Time'=>'修改時間', +'Description'=>'描述', +'Shipping Po Box'=>'郵政信箱', +'Billing Po Box'=>'郵政信箱', + +//Added after 4.2 patch 2 +'Email Opt Out'=>'拒絕電子郵件打擾', +'LBL_EMAIL_OPT_OUT'=>'拒絕電子郵件打擾:', + +//Added after 5Alpha5 +'Notify Owner'=>'提醒負責人', + +//Added for existing picklist entries + +'--None--'=>'--無--', + +'Acquired'=>'取得', +'Active'=>'啟用', +'Market Failed'=>'市場失利', +'Project Cancelled'=>'項目取消', +'Shutdown'=>'關閉', + +'Apparel'=>'服裝', +'Banking'=>'銀行', +'Biotechnology'=>'生物科技', +'Chemicals'=>'化學', +'Communications'=>'交通', +'Construction'=>'建築', +'Consulting'=>'顧問', +'Education'=>'教育', +'Electronics'=>'電子', +'Energy'=>'能源', +'Engineering'=>'工程', +'Entertainment'=>'娛樂', +'Environmental'=>'環境', +'Finance'=>'財務', +'Food & Beverage'=>'飲食', +'Government'=>'政府', +'Healthcare'=>'健康照護', +'Hospitality'=>'醫院', +'Insurance'=>'保險', +'Machinery'=>'機械', +'Manufacturing'=>'工廠', +'Media'=>'媒體', +'Not For Profit'=>'非營利', +'Recreation'=>'娛樂中心', +'Retail'=>'零售', +'Shipping'=>'運輸', +'Technology'=>'科技', +'Telecommunications'=>'通訊', +'Transportation'=>'傳輸', +'Utilities'=>'工具', +'Real Estate'=>'房地產公司', +'State-owned Enterprises'=>'國有企業', +'Private Enterprise'=>'民營企業', +'Construction Company'=>'建築公司', +'LED Manufacturer'=>'LED 工程公司', +'LED Lighting Company'=>'LED 照明公司', +'Other'=>'其它', + +'Analyst'=>'分析師', +'Competitor'=>'競爭者', +'Customer'=>'客戶', +'Integrator'=>'整合者', +'Investor'=>'投資者', +'Partner'=>'夥伴', +'Press'=>'新聞', +'Prospect'=>'潛在客戶', +'Reseller'=>'盤商', +'LBL_START_DATE'=>'開始日期', +'LBL_END_DATE'=>'結束日期', + +// Added/Updated for vtiger CRM 5.0.4 + +//added to fix the issue #4081 +'LBL_ACCOUNT_EXIST'=>'帳戶名稱已存在!', + +// mailer export +'LBL_MAILER_EXPORT'=>'郵寄導出', +'LBL_MAILER_EXPORT_CONTACTS_TYPE'=>'選擇通訊錄:', +'LBL_MAILER_EXPORT_CONTACTS_DESCR'=>'聯絡可能被選擇通過"自定義字段"和一些標準字段。.', +'LBL_MAILER_EXPORT_RESULTS_TYPE'=>'選擇導出類型:', +'LBL_MAILER_EXPORT_RESULTS_DESCR'=>'聚集從賬戶及其聯系人的數據,還給前次搜索.', +'LBL_EXPORT_RESULTS_EMAIL'=>'導出郵件聯系人數據', +'LBL_EXPORT_RESULTS_EMAIL_CORP'=>'導出郵件數據,如果聯系人"電郵"為空則用"公司電郵"', +'LBL_EXPORT_RESULTS_FULL'=>'導出聯系人數據,電子郵件帳戶名稱,地址,電話等.', +'LBL_EXPORT_RESULTS_GO'=>'導出', +'LBL_MAILER_EXPORT_IGNORE'=>'--忽略--', +'LBL_MAILER_EXPORT_CHECKED'=>'檢查', +'LBL_MAILER_EXPORT_NOTCHECKED'=>'不進行檢查', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Account No'=>'帳號', +//END + +// Account Hierarchy +'LBL_SHOW_ACCOUNT_HIERARCHY'=>'查看賬號級別', + +); + +?> diff --git a/modules/Accounts/updateRelations.php b/modules/Accounts/updateRelations.php new file mode 100644 index 0000000..e96d5d8 --- /dev/null +++ b/modules/Accounts/updateRelations.php @@ -0,0 +1,40 @@ + diff --git a/modules/Administration/Forms.php b/modules/Administration/Forms.php new file mode 100644 index 0000000..88f9afd --- /dev/null +++ b/modules/Administration/Forms.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/modules/Administration/index.php b/modules/Administration/index.php new file mode 100644 index 0000000..d10fb63 --- /dev/null +++ b/modules/Administration/index.php @@ -0,0 +1,23 @@ + diff --git a/modules/Administration/language/de_de.lang.php b/modules/Administration/language/de_de.lang.php new file mode 100644 index 0000000..ba395ba --- /dev/null +++ b/modules/Administration/language/de_de.lang.php @@ -0,0 +1,23 @@ + 'Administration', + 'LBL_MODULE_TITLE' => 'Administration: Home', + + 'LBL_NEW_FORM_TITLE' => 'neuer Benutzer', + 'ERR_DELETE_RECORD' => 'Zum Löschen muss mindestens ein Benutzer ausgewählt werden.', +); + +?> \ No newline at end of file diff --git a/modules/Administration/language/en_gb.lang.php b/modules/Administration/language/en_gb.lang.php new file mode 100644 index 0000000..5c7d05f --- /dev/null +++ b/modules/Administration/language/en_gb.lang.php @@ -0,0 +1,17 @@ + 'Administration', + 'LBL_MODULE_TITLE' => 'Administration: Home', + 'LBL_NEW_FORM_TITLE' => 'New Organisation', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the Organisation' +); +?> \ No newline at end of file diff --git a/modules/Administration/language/en_us.lang.php b/modules/Administration/language/en_us.lang.php new file mode 100644 index 0000000..24dbe83 --- /dev/null +++ b/modules/Administration/language/en_us.lang.php @@ -0,0 +1,28 @@ +'Administration', +'LBL_MODULE_TITLE'=>'Administration: Home', + +'LBL_NEW_FORM_TITLE'=>'New Organization', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the organization.", +); + +?> diff --git a/modules/Administration/language/es_es.lang.php b/modules/Administration/language/es_es.lang.php new file mode 100644 index 0000000..82e6d65 --- /dev/null +++ b/modules/Administration/language/es_es.lang.php @@ -0,0 +1,27 @@ +'Administración', +'LBL_MODULE_TITLE'=>'Administración: Inicio', + +'LBL_NEW_FORM_TITLE' => 'Nueva Cuenta', +'ERR_DELETE_RECORD' => 'Debe especificar un registro para eliminar la cuenta.', +); + +?> diff --git a/modules/Administration/language/es_mx.lang.php b/modules/Administration/language/es_mx.lang.php new file mode 100644 index 0000000..1187bed --- /dev/null +++ b/modules/Administration/language/es_mx.lang.php @@ -0,0 +1,28 @@ +'Administración', +'LBL_MODULE_TITLE'=>'Administración: Inicio', + +'LBL_NEW_FORM_TITLE' => 'Nueva Cuenta', +'ERR_DELETE_RECORD' => 'Debe especificar un registro para eliminar la cuenta.', +); + +?> diff --git a/modules/Administration/language/fr_fr.lang.php b/modules/Administration/language/fr_fr.lang.php new file mode 100644 index 0000000..99d73a3 --- /dev/null +++ b/modules/Administration/language/fr_fr.lang.php @@ -0,0 +1,18 @@ + 'Administration', + 'LBL_MODULE_TITLE' => 'Administration : ', + 'LBL_NEW_FORM_TITLE' => 'Nouveau compte', + 'ERR_DELETE_RECORD' => 'Un numéro d\'enregistrement doit être renseigné pour supprimer le compte.', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Administration/language/hu_hu.lang.php b/modules/Administration/language/hu_hu.lang.php new file mode 100644 index 0000000..85e46d8 --- /dev/null +++ b/modules/Administration/language/hu_hu.lang.php @@ -0,0 +1,28 @@ + 'Adminisztráció', + 'LBL_MODULE_TITLE' => 'Adminisztráció: Kezdőlap', + 'LBL_NEW_FORM_TITLE' => 'Új Cég', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a Cég törléséhez' +); +?> \ No newline at end of file diff --git a/modules/Administration/language/nl_nl.lang.php b/modules/Administration/language/nl_nl.lang.php new file mode 100644 index 0000000..e748702 --- /dev/null +++ b/modules/Administration/language/nl_nl.lang.php @@ -0,0 +1,42 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.2 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Administration/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Administratie', +'LBL_MODULE_TITLE'=>'Administratie: Home', + +'LBL_NEW_FORM_TITLE'=>'Nieuw Account', +'ERR_DELETE_RECORD'=>"U moet een veld specificeren om het Account te verwijderen.", +); + +?> diff --git a/modules/Administration/language/pt_br.lang.php b/modules/Administration/language/pt_br.lang.php new file mode 100644 index 0000000..7c0e00e --- /dev/null +++ b/modules/Administration/language/pt_br.lang.php @@ -0,0 +1,28 @@ +'Administração', +'LBL_MODULE_TITLE'=>'Administracão: Principal', + +'LBL_NEW_FORM_TITLE'=>'Nova Organização', +'ERR_DELETE_RECORD'=>"Defina um registro para apagar a Organização.", +); + +?> diff --git a/modules/Administration/language/zh_cn.lang.php b/modules/Administration/language/zh_cn.lang.php new file mode 100644 index 0000000..eee33bf --- /dev/null +++ b/modules/Administration/language/zh_cn.lang.php @@ -0,0 +1,32 @@ +'系统管理', +'LBL_MODULE_TITLE'=>'系统管理:首页', +'LBL_NEW_FORM_TITLE'=>'新增用户', +'ERR_DELETE_RECORD'=>'必须指定纪录编号才能删除客户。', + +); + +?> \ No newline at end of file diff --git a/modules/Administration/language/zh_tw.lang.php b/modules/Administration/language/zh_tw.lang.php new file mode 100644 index 0000000..8a2178e --- /dev/null +++ b/modules/Administration/language/zh_tw.lang.php @@ -0,0 +1,32 @@ +'系統管理', +'LBL_MODULE_TITLE'=>'系統管理:首頁', +'LBL_NEW_FORM_TITLE'=>'新增用戶', +'ERR_DELETE_RECORD'=>'必須指定紀錄編號才能刪除客戶。', + +); + +?> \ No newline at end of file diff --git a/modules/Assets/Assets.js b/modules/Assets/Assets.js new file mode 100644 index 0000000..3460f20 --- /dev/null +++ b/modules/Assets/Assets.js @@ -0,0 +1,341 @@ +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ************************************************************************************/ +document.write(" +assign("EDIT_DUPLICATE",""); + if($record_count == 2) { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + else { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[2]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[2]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + + $all_values_array=getRecordValues($exploded_id,$module); + $all_values=$all_values_array[0]; + $js_arr_val=$all_values_array[1]; + $fld_array=$all_values_array[2]; + $js_arr=implode(",",$js_arr_val); + + $imported_records = Array(); + $sql="select bean_id from vtiger_users_last_import where bean_type=? and deleted=0"; + $result = $adb->pquery($sql, array($module)); + $num_rows=$adb->num_rows($result); + $count=0; + for($i=0; $i<$num_rows;$i++) + { + foreach($exploded_id as $value) + if($value == $adb->query_result($result,$i,"bean_id")) + $count++; + array_push($imported_records,$adb->query_result($result,$i,"bean_id")); + } + + if ($record_count == $count) + $no_existing=1; + else + $no_existing=0; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("RECORD_COUNT",$record_count); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("MODULENAME", $module); + $smarty->assign("PARENT_TAB", $parent_tab); + $smarty->assign("JS_ARRAY", $js_arr); + $smarty->assign("ID_ARRAY", $exploded_id); + $smarty->assign("IDSTRING",$idstring); + $smarty->assign("ALLVALUES", $all_values); + $smarty->assign("FIELD_ARRAY", $fld_array); + $smarty->assign("IMPORTED_RECORDS", $imported_records); + $smarty->assign("NO_EXISTING", $no_existing); + $smarty->display("MergeFields.tpl"); +} + +?> diff --git a/modules/Assets/QuickCreate.php b/modules/Assets/QuickCreate.php new file mode 100644 index 0000000..78fe10f --- /dev/null +++ b/modules/Assets/QuickCreate.php @@ -0,0 +1,11 @@ + diff --git a/modules/Assets/Save.php b/modules/Assets/Save.php new file mode 100644 index 0000000..fbed013 --- /dev/null +++ b/modules/Assets/Save.php @@ -0,0 +1,59 @@ +mode = $mode; +if($record)$focus->id = $record; + +$currencyid=fetchCurrency($current_user->id); +$rate_symbol = getCurrencySymbolandCRate($currencyid); +$rate = $rate_symbol['rate']; + +if($_REQUEST['assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} + +$focus->save($currentModule); +$return_id = $focus->id; + +$search = vtlib_purify($_REQUEST['search_url']); + +$parenttab = getParentTab(); +if($_REQUEST['return_module'] != '') { + $return_module = vtlib_purify($_REQUEST['return_module']); +} else { + $return_module = $currentModule; +} + +if($_REQUEST['return_action'] != '') { + $return_action = vtlib_purify($_REQUEST['return_action']); +} else { + $return_action = "DetailView"; +} + +if($_REQUEST['return_id'] != '') { + $return_id = vtlib_purify($_REQUEST['return_id']); +} + +if(isset($_REQUEST['activity_mode'])) $return_action .= '&activity_mode='.vtlib_purify($_REQUEST['activity_mode']); + +header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab&start=".vtlib_purify($_REQUEST['pagenumber']).$search); + +?> \ No newline at end of file diff --git a/modules/Assets/Settings.php b/modules/Assets/Settings.php new file mode 100644 index 0000000..980dd07 --- /dev/null +++ b/modules/Assets/Settings.php @@ -0,0 +1,13 @@ + diff --git a/modules/Assets/TagCloud.php b/modules/Assets/TagCloud.php new file mode 100644 index 0000000..8343cd5 --- /dev/null +++ b/modules/Assets/TagCloud.php @@ -0,0 +1,11 @@ + diff --git a/modules/Assets/UnifiedSearch.php b/modules/Assets/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Assets/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Assets/UpdateListPrice.php b/modules/Assets/UpdateListPrice.php new file mode 100644 index 0000000..64de814 --- /dev/null +++ b/modules/Assets/UpdateListPrice.php @@ -0,0 +1,24 @@ +debug("Going to update the ListPrice in (modules/Products/UpdateListPrice.php)."); +$record = vtlib_purify($_REQUEST['record']); +$pricebook_id = vtlib_purify($_REQUEST['pricebook_id']); +$product_id = vtlib_purify($_REQUEST['product_id']); +$listprice = vtlib_purify($_REQUEST['list_price']); +$return_action = vtlib_purify($_REQUEST['return_action']); +$return_module = vtlib_purify($_REQUEST['return_module']); + +$query = "update vtiger_pricebookproductrel set listprice=? where pricebookid=? and productid=?"; +$adb->pquery($query, array($listprice, $pricebook_id, $product_id)); +header("Location: index.php?module=$return_module&action=".$return_module."Ajax&file=$return_action&ajax=updatelistprice&record=$record"); +?> \ No newline at end of file diff --git a/modules/Assets/index.php b/modules/Assets/index.php new file mode 100644 index 0000000..c05d9d8 --- /dev/null +++ b/modules/Assets/index.php @@ -0,0 +1,15 @@ + diff --git a/modules/Assets/language/de_de.lang.php b/modules/Assets/language/de_de.lang.php new file mode 100644 index 0000000..f592353 --- /dev/null +++ b/modules/Assets/language/de_de.lang.php @@ -0,0 +1,45 @@ + translation is based on "Inventory Management" +$mod_strings = Array( + /*some general information*/ + 'LBL_MODULE_NAME'=>'Bestandsverwaltung', + 'SINGLE_Assets'=>'Bestandsverwaltung', + + /*blocks for the module*/ + 'LBL_ASSET_INFORMATION'=>'Bestandsverwaltung Information', + 'LBL_CUSTOM_INFORMATION'=>'Custom Information', + 'LBL_DESCRIPTION_INFORMATION'=>'Beschreibung', + + /*fields for the module*/ + 'Assets'=>'Bestandsverwaltung', + 'Asset Name' => 'Titel Bestandsverwaltung', + 'Customer Name'=>'Organisation', + 'Product Name'=>'Produkt', + 'Serial Number'=>'Seriennummer', + 'Asset No'=>'Bestandsverwaltung Nr', + 'Date Sold'=>'Verkaufsdatum', + 'Date in Service'=>'Servicedatum', + 'Status'=>'Status', + 'Shipping Method'=>'Versandmethode', + 'Shipping Tracking Number'=>'Sendungsverfolgungsnummer', + 'Tag Number'=>'Tag-Nummer', + 'Notes'=>'Beschreibung', + 'Invoice Name'=>'Rechnung', + + /*picklist values*/ + '--none--'=>'--ohne--', + 'In Service'=>'unterstützt', + 'Out-of-service'=>'wird nicht mehr unterstützt', + + /* additional related lists */ +); +?> diff --git a/modules/Assets/language/en_gb.lang.php b/modules/Assets/language/en_gb.lang.php new file mode 100644 index 0000000..274f1d0 --- /dev/null +++ b/modules/Assets/language/en_gb.lang.php @@ -0,0 +1,35 @@ + 'Assets', + 'SINGLE_Assets' => 'Asset', + 'LBL_ASSET_INFORMATION' => 'Asset Information', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_DESCRIPTION_INFORMATION' => 'Notes', + 'Assets' => 'Assets', + 'Asset Name' => 'Asset Name', + 'Customer Name' => 'Customer Name', + 'Product Name' => 'Product Name', + 'Serial Number' => 'Serial Number', + 'Asset No' => 'Asset No.', + 'Date Sold' => 'Date Sold', + 'Date in Service' => 'Date in Service', + 'Status' => 'Status', + 'Shipping Method' => 'Shipping Method', + 'Shipping Tracking Number' => 'Tracking Number', + 'Tag Number' => 'Tag Number', + 'Notes' => 'Notes', + 'Invoice Name' => 'Invoice Name', + 'In Service' => 'In Service', + 'Out-of-service' => 'Out-of-service', + 'Assets ID' => 'Assets ID', +); +?> \ No newline at end of file diff --git a/modules/Assets/language/en_us.lang.php b/modules/Assets/language/en_us.lang.php new file mode 100644 index 0000000..83cb726 --- /dev/null +++ b/modules/Assets/language/en_us.lang.php @@ -0,0 +1,43 @@ +'Assets', +'SINGLE_Assets'=>'Asset', + +/*blocks for the module*/ +'LBL_ASSET_INFORMATION'=>'Asset Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_DESCRIPTION_INFORMATION'=>'Notes', + +/*fields for the module*/ +'Assets'=>'Assets', +'Asset Name' => 'Asset Name', +'Customer Name'=>'Customer Name', +'Product Name'=>'Product Name', +'Serial Number'=>'Serial Number', +'Asset No'=>'Asset No', +'Date Sold'=>'Date Sold', +'Date in Service'=>'Date in Service', +'Status'=>'Status', +'Shipping Method'=>'Shipping Method', +'Shipping Tracking Number'=>'Shipping Tracking Number', +'Tag Number'=>'Tag Number', +'Notes'=>'Notes', +'Invoice Name'=>'Invoice Name', + +/*picklist values*/ +'In Service'=>'In Service', +'Out-of-service'=>'Out-of-service', +'Assets ID'=>'Assets ID', + +); +?> diff --git a/modules/Assets/language/es_es.lang.php b/modules/Assets/language/es_es.lang.php new file mode 100644 index 0000000..28b07c4 --- /dev/null +++ b/modules/Assets/language/es_es.lang.php @@ -0,0 +1,50 @@ +'Recursos', +'SINGLE_Assets'=>'Recurso', + +/*blocks for the module*/ +'LBL_ASSET_INFORMATION'=>'Información Recurso', +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', +'LBL_DESCRIPTION_INFORMATION'=>'Notas', + +/*fields for the module*/ +'Assets'=>'Recursos', +'Asset Name'=>'Nombre Recurso', +'Customer Name'=>'Instalado en', +'Product Name'=>'Producto', +'Serial Number'=>'Número serie', +'Asset No'=>'Número recurso', +'Date Sold'=>'Fecha venta', +'Date in Service'=>'Fecha instalación', +'Status'=>'Estado', +'Shipping Method'=>'Forma de envío', +'Shipping Tracking Number'=>'Número seguimiento envío', +'Tag Number'=>'Etiquetado', +'Notes'=>'Notas', +'Invoice Name'=>'Ref. Factura', + +/*picklist values*/ +'In Service'=>'En Servicio', +'Out-of-service'=>'Fuera de servicio', +'Assets ID'=>'Id Recurso', +); +?> \ No newline at end of file diff --git a/modules/Assets/language/es_mx.lang.php b/modules/Assets/language/es_mx.lang.php new file mode 100644 index 0000000..bed09db --- /dev/null +++ b/modules/Assets/language/es_mx.lang.php @@ -0,0 +1,51 @@ +'Activos', +'SINGLE_Assets'=>'Activo', + +/*blocks for the module*/ +'LBL_ASSET_INFORMATION'=>'Información de Activo', +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', +'LBL_DESCRIPTION_INFORMATION'=>'Descripción Adicional', + +/*fields for the module*/ +'Assets'=>'Activos', +'Asset Name'=>'Nombre Activo', +'Customer Name'=>'Instalado en', +'Product Name'=>'Producto', +'Serial Number'=>'Número serie', +'Asset No'=>'Número Activo', +'Date Sold'=>'Fecha venta', +'Date in Service'=>'Fecha instalación', +'Status'=>'Estado', +'Shipping Method'=>'Forma de envío', +'Shipping Tracking Number'=>'Número seguimiento envío', +'Tag Number'=>'Etiquetado', +'Notes'=>'Notas', +'Invoice Name'=>'Ref. Factura', + +/*picklist values*/ +'In Service'=>'En Servicio', +'Out-of-service'=>'Fuera de servicio', +'Assets ID'=>'Id de Activo', +); +?> \ No newline at end of file diff --git a/modules/Assets/language/fr_fr.lang.php b/modules/Assets/language/fr_fr.lang.php new file mode 100644 index 0000000..48e8867 --- /dev/null +++ b/modules/Assets/language/fr_fr.lang.php @@ -0,0 +1,35 @@ +'Liaison', + 'SINGLE_Assets'=>'Liaison', + 'LBL_ASSET_INFORMATION'=>'Information de liaison', + 'LBL_CUSTOM_INFORMATION'=>'Informations personnalisées', + 'LBL_DESCRIPTION_INFORMATION'=>'Notes', + 'Assets'=>'Liaison', + 'Customer Name'=>'Nom de Compte', + 'Product Name'=>'Produit', + 'Serial Number'=>'Numéro de série', + 'Asset No'=>'Liaison N°', + 'Date Sold'=>'Date de vente', + 'Date in Service'=>'Date de mise en service', + 'Status'=>'Statut', + 'Shipping Method'=>'Livraison via', + 'Shipping Tracking Number'=>'Numéro de suivi d\'expédition', + 'Tag Number'=>'Tag', + 'Notes'=>'Notes', + 'In Service'=>'En Service', + 'Out-of-service'=>'Hors service', + 'Assets ID'=>'Liaison ID', + 'Asset Name' => 'Nom de liaison', + 'Invoice Name' => 'Facture liée', + +); +?> \ No newline at end of file diff --git a/modules/Assets/language/hu_hu.lang.php b/modules/Assets/language/hu_hu.lang.php new file mode 100644 index 0000000..569ca6b --- /dev/null +++ b/modules/Assets/language/hu_hu.lang.php @@ -0,0 +1,42 @@ + 'Vagyontárgyak', + 'SINGLE_Assets' => 'Vagyontárgy', + 'LBL_ASSET_INFORMATION' => 'Vagyontárgy adatok', + 'LBL_CUSTOM_INFORMATION' => 'Egyéb adatok', + 'LBL_DESCRIPTION_INFORMATION' => 'Leírás', + 'Assets' => 'Vagyontárgyak', + 'Asset Name' => 'Vagyontárgy neve', + 'Customer Name' => 'Vásárló neve ', + 'Product Name' => 'Termék neve ', + 'Serial Number' => 'Gyári sorozat szám', + 'Asset No' => 'Vagyontárgy No.', + 'Date Sold' => 'Értékesítés dátuma', + 'Date in Service' => 'Karbantartás kezdő dátuma', + 'Status' => 'Állapot', + 'Shipping Method' => 'Szállítási mód', + 'Shipping Tracking Number' => 'Szállítási azonosító szám', + 'Tag Number' => 'Címke száma', + 'Notes' => 'Leírás:', + 'Invoice Name' => 'Számla/Díjbekérő megnevezése ', + 'In Service' => 'Karbantartás alatt', + 'Out-of-service' => 'Üzemképes', + 'Assets ID' => 'Vagyontárgy AZ', + '--none--' => '--Nincs--', + 'Serial Nummer' => 'Sorozatszám', + 'Shipping Tracking Nummer' => 'Szállítási követő szám', + 'Tag Nummer' => 'Címke szám' +); +?> \ No newline at end of file diff --git a/modules/Assets/language/nl_nl.lang.php b/modules/Assets/language/nl_nl.lang.php new file mode 100644 index 0000000..03f0152 --- /dev/null +++ b/modules/Assets/language/nl_nl.lang.php @@ -0,0 +1,66 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.2 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Assets/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +/*some general information*/ +'LBL_MODULE_NAME'=>'Activa', +'SINGLE_Assets'=>'Activa', + +/*blocks for the module*/ +'LBL_ASSET_INFORMATION'=>'Activa Informatie', +'LBL_CUSTOM_INFORMATION'=>'Maatwerk Informatie', +'LBL_DESCRIPTION_INFORMATION'=>'Notities', + +/*fields for the module*/ +'Assets'=>'Activa', +'Asset Name' => 'Activa Naam', +'Customer Name'=>'Klant Naam', +'Product Name'=>'Product Naam', +'Serial Nummer'=>'Serienummer', +'Asset No'=>'Activa nummer', +'Date Sold'=>'Datum Verkocht', +'Date in Service'=>'Datum in Service', +'Status'=>'Status', +'Shipping Method'=>'Transport Methode', +'Shipping Tracking Nummer'=>'Transport Tracking Nummer', +'Tag Nummer'=>'Tag Nummer', +'Notes'=>'Notities', +'Invoice Name'=>'Factuur Naam', // if you want this empty include space as label is picked from include/en_us.lang.php otherwise + +/*picklist values*/ +'In Service'=>'In Service', +'Out-of-service'=>'Uit Service', + + +); +?> diff --git a/modules/Assets/language/zh_cn.lang.php b/modules/Assets/language/zh_cn.lang.php new file mode 100644 index 0000000..f3e282d --- /dev/null +++ b/modules/Assets/language/zh_cn.lang.php @@ -0,0 +1,56 @@ +'资产', +'SINGLE_Assets'=>'资产', + +/*blocks for the module*/ +'LBL_ASSET_INFORMATION'=>'资产信息', +'LBL_CUSTOM_INFORMATION'=>'自定义信息', +'LBL_DESCRIPTION_INFORMATION'=>'备注', + +/*fields for the module*/ +'Assets'=>'资产', +'Asset Name' => '资产名称', +'Customer Name'=>'客户名称', +'Product Name'=>'产品名称', +'Serial Number'=>'序列号', +'Asset No'=>'资产编号', +'Date Sold'=>'销售日期', +'Date in Service'=>'服务日期', +'Status'=>'状态', +'Shipping Method'=>'快递方法', +'Shipping Tracking Number'=>'快递跟踪号', +'Tag Number'=>'标签号', +'Notes'=>'备注', +'Invoice Name'=>'发货单', + +/*picklist values*/ +'In Service'=>'正在提供服务', +'Out-of-service'=>'已不提供服务', +'Assets ID'=>'资产序号', + +); +?> diff --git a/modules/Assets/schema.xml b/modules/Assets/schema.xml new file mode 100644 index 0000000..032704d --- /dev/null +++ b/modules/Assets/schema.xml @@ -0,0 +1,32 @@ + + + + + vtiger_assets + +
+ + vtiger_assetscf + +
+
+
diff --git a/modules/Assets/updateRelations.php b/modules/Assets/updateRelations.php new file mode 100644 index 0000000..baee32b --- /dev/null +++ b/modules/Assets/updateRelations.php @@ -0,0 +1,53 @@ +delete_related_module($currentModule, $forCRMRecord, $destinationModule, $ids); + } +} else { + if(!empty($_REQUEST['idlist'])) { + // Split the string of ids + $ids = explode (";",trim($idlist,";")); + } else if(!empty($_REQUEST['entityid'])){ + $ids = $_REQUEST['entityid']; + } + if(!empty($ids)) { + relateEntities($focus, $currentModule, $forCRMRecord, $destinationModule, $ids); + } +} + +header("Location: index.php?module=$currentModule&record=$forCRMRecord&action=$action&parenttab=$parenttab"); +?> diff --git a/modules/Calendar/Activity.php b/modules/Calendar/Activity.php new file mode 100644 index 0000000..8124449 --- /dev/null +++ b/modules/Calendar/Activity.php @@ -0,0 +1,994 @@ +'crmid','vtiger_activity'=>'activityid','vtiger_seactivityrel'=>'activityid','vtiger_cntactivityrel'=>'activityid','vtiger_salesmanactivityrel'=>'activityid','vtiger_activity_reminder'=>'activity_id','vtiger_recurringevents'=>'activityid','vtiger_activitycf'=>'activityid'); + + var $column_fields = Array(); + var $sortby_fields = Array('subject','due_date','date_start','smownerid','activitytype','lastname'); //Sorting is added for due date and start date + + // This is used to retrieve related vtiger_fields from form posts. + var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id', 'contactname', 'contact_phone', 'contact_email', 'parent_name'); + + /** + * Mandatory table for supporting custom fields. + */ + var $customFieldTable = Array('vtiger_activitycf', 'activityid'); + + // This is the list of vtiger_fields that are in the lists. + var $list_fields = Array( + 'Close'=>Array('activity'=>'status'), + 'Type'=>Array('activity'=>'activitytype'), + 'Subject'=>Array('activity'=>'subject'), + 'Related to'=>Array('seactivityrel'=>'parent_id'), + 'Start Date'=>Array('activity'=>'date_start'), + 'Start Time'=>Array('activity','time_start'), + 'End Date'=>Array('activity'=>'due_date'), + 'End Time'=>Array('activity','time_end'), + 'Recurring Type'=>Array('recurringevents'=>'recurringtype'), + 'Assigned To'=>Array('crmentity'=>'smownerid'), + 'Contact Name'=>Array('contactdetails'=>'lastname') + ); + + var $range_fields = Array( + 'name', + 'date_modified', + 'start_date', + 'id', + 'status', + 'date_due', + 'time_start', + 'description', + 'contact_name', + 'priority', + 'duehours', + 'dueminutes', + 'location' + ); + + + var $list_fields_name = Array( + 'Close'=>'status', + 'Type'=>'activitytype', + 'Subject'=>'subject', + 'Contact Name'=>'lastname', + 'Related to'=>'parent_id', + 'Start Date & Time'=>'date_start', + 'End Date & Time'=>'due_date', + 'Recurring Type'=>'recurringtype', + 'Assigned To'=>'assigned_user_id', + 'Start Date'=>'date_start', + 'Start Time'=>'time_start', + 'End Date'=>'due_date', + 'End Time'=>'time_end'); + + var $list_link_field= 'subject'; + + //Added these variables which are used as default order by and sortorder in ListView + var $default_order_by = 'due_date'; + var $default_sort_order = 'ASC'; + + //var $groupTable = Array('vtiger_activitygrouprelation','activityid'); + + function Activity() { + $this->log = LoggerManager::getLogger('Calendar'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Calendar'); + } + + function save_module($module) + { + global $adb; + //Handling module specific save + //Insert into seactivity rel + if(isset($this->column_fields['parent_id']) && $this->column_fields['parent_id'] != '') + { + $this->insertIntoEntityTable("vtiger_seactivityrel", $module); + } + elseif($this->column_fields['parent_id']=='' && $insertion_mode=="edit") + { + $this->deleteRelation("vtiger_seactivityrel"); + } + //Insert into cntactivity rel + if(isset($this->column_fields['contact_id']) && $this->column_fields['contact_id'] != '') + { + $this->insertIntoEntityTable('vtiger_cntactivityrel', $module); + } + elseif($this->column_fields['contact_id'] =='' && $insertion_mode=="edit") + { + $this->deleteRelation('vtiger_cntactivityrel'); + } + $recur_type=''; + if(($recur_type == "--None--" || $recur_type == '') && $this->mode == "edit") + { + $sql = 'delete from vtiger_recurringevents where activityid=?'; + $adb->pquery($sql, array($this->id)); + } + //Handling for recurring type + //Insert into vtiger_recurring event table + if(isset($this->column_fields['recurringtype']) && $this->column_fields['recurringtype']!='' && $this->column_fields['recurringtype']!='--None--') + { + $recur_type = trim($this->column_fields['recurringtype']); + $recur_data = getrecurringObjValue(); + if(is_object($recur_data)) + $this->insertIntoRecurringTable($recur_data); + } + + //Insert into vtiger_activity_remainder table + + $this->insertIntoReminderTable('vtiger_activity_reminder',$module,""); + + //Handling for invitees + $selected_users_string = $_REQUEST['inviteesid']; + $invitees_array = explode(';',$selected_users_string); + $this->insertIntoInviteeTable($module,$invitees_array); + + //Inserting into sales man activity rel + $this->insertIntoSmActivityRel($module); + + $this->insertIntoActivityReminderPopup($module); + } + + + /** Function to insert values in vtiger_activity_reminder_popup table for the specified module + * @param $cbmodule -- module:: Type varchar + */ + function insertIntoActivityReminderPopup($cbmodule) { + + global $adb; + + $cbrecord = $this->id; + unset($_SESSION['next_reminder_time']); + if(isset($cbmodule) && isset($cbrecord)) { + $cbdate = getValidDBInsertDateValue($this->column_fields['date_start']); + $cbtime = $this->column_fields['time_start']; + + $reminder_query = "SELECT reminderid FROM vtiger_activity_reminder_popup WHERE semodule = ? and recordid = ?"; + $reminder_params = array($cbmodule, $cbrecord); + $reminderidres = $adb->pquery($reminder_query, $reminder_params); + + $reminderid = null; + if($adb->num_rows($reminderidres) > 0) { + $reminderid = $adb->query_result($reminderidres, 0, "reminderid"); + } + + if(isset($reminderid)) { + $callback_query = "UPDATE vtiger_activity_reminder_popup set status = 0, date_start = ?, time_start = ? WHERE reminderid = ?"; + $callback_params = array($cbdate, $cbtime, $reminderid); + } else { + $callback_query = "INSERT INTO vtiger_activity_reminder_popup (recordid, semodule, date_start, time_start) VALUES (?,?,?,?)"; + $callback_params = array($cbrecord, $cbmodule, $cbdate, $cbtime); + } + + $adb->pquery($callback_query, $callback_params); + } + } + + + /** Function to insert values in vtiger_activity_remainder table for the specified module, + * @param $table_name -- table name:: Type varchar + * @param $module -- module:: Type varchar + */ + function insertIntoReminderTable($table_name,$module,$recurid) + { + global $log; + $log->info("in insertIntoReminderTable ".$table_name." module is ".$module); + if($_REQUEST['set_reminder'] == 'Yes') + { + unset($_SESSION['next_reminder_time']); + $log->debug("set reminder is set"); + $rem_days = $_REQUEST['remdays']; + $log->debug("rem_days is ".$rem_days); + $rem_hrs = $_REQUEST['remhrs']; + $log->debug("rem_hrs is ".$rem_hrs); + $rem_min = $_REQUEST['remmin']; + $log->debug("rem_minutes is ".$rem_min); + $reminder_time = $rem_days * 24 * 60 + $rem_hrs * 60 + $rem_min; + $log->debug("reminder_time is ".$reminder_time); + if ($recurid == "") + { + if($_REQUEST['mode'] == 'edit') + { + $this->activity_reminder($this->id,$reminder_time,0,$recurid,'edit'); + } + else + { + $this->activity_reminder($this->id,$reminder_time,0,$recurid,''); + } + } + else + { + $this->activity_reminder($this->id,$reminder_time,0,$recurid,''); + } + } + elseif($_REQUEST['set_reminder'] == 'No') + { + $this->activity_reminder($this->id,'0',0,$recurid,'delete'); + } + } + + + // Code included by Jaguar - starts + /** Function to insert values in vtiger_recurringevents table for the specified tablename,module + * @param $recurObj -- Recurring Object:: Type varchar + */ +function insertIntoRecurringTable(& $recurObj) +{ + global $log,$adb; + $log->info("in insertIntoRecurringTable "); + $st_date = $recurObj->startdate->get_DB_formatted_date(); + $log->debug("st_date ".$st_date); + $end_date = $recurObj->enddate->get_DB_formatted_date(); + $log->debug("end_date is set ".$end_date); + $type = $recurObj->getRecurringType(); + $log->debug("type is ".$type); + $flag="true"; + + if($_REQUEST['mode'] == 'edit') + { + $activity_id=$this->id; + + $sql='select min(recurringdate) AS min_date,max(recurringdate) AS max_date, recurringtype, activityid from vtiger_recurringevents where activityid=? group by activityid, recurringtype'; + $result = $adb->pquery($sql, array($activity_id)); + $noofrows = $adb->num_rows($result); + for($i=0; $i<$noofrows; $i++) + { + $recur_type_b4_edit = $adb->query_result($result,$i,"recurringtype"); + $date_start_b4edit = $adb->query_result($result,$i,"min_date"); + $end_date_b4edit = $adb->query_result($result,$i,"max_date"); + } + if(($st_date == $date_start_b4edit) && ($end_date==$end_date_b4edit) && ($type == $recur_type_b4_edit)) + { + if($_REQUEST['set_reminder'] == 'Yes') + { + $sql = 'delete from vtiger_activity_reminder where activity_id=?'; + $adb->pquery($sql, array($activity_id)); + $sql = 'delete from vtiger_recurringevents where activityid=?'; + $adb->pquery($sql, array($activity_id)); + $flag="true"; + } + elseif($_REQUEST['set_reminder'] == 'No') + { + $sql = 'delete from vtiger_activity_reminder where activity_id=?'; + $adb->pquery($sql, array($activity_id)); + $flag="false"; + } + else + $flag="false"; + } + else + { + $sql = 'delete from vtiger_activity_reminder where activity_id=?'; + $adb->pquery($sql, array($activity_id)); + $sql = 'delete from vtiger_recurringevents where activityid=?'; + $adb->pquery($sql, array($activity_id)); + } + } + + $recur_freq = $recurObj->getRecurringFrequency(); + $recurringinfo = $recurObj->getDBRecurringInfoString(); + + if($flag=="true") { + $max_recurid_qry = 'select max(recurringid) AS recurid from vtiger_recurringevents;'; + $result = $adb->pquery($max_recurid_qry, array()); + $noofrows = $adb->num_rows($result); + $recur_id = 0; + if($noofrows > 0) { + $recur_id = $adb->query_result($result,0,"recurid"); + } + $current_id =$recur_id+1; + $recurring_insert = "insert into vtiger_recurringevents values (?,?,?,?,?,?)"; + $rec_params = array($current_id, $this->id, $st_date, $type, $recur_freq, $recurringinfo); + $adb->pquery($recurring_insert, $rec_params); + unset($_SESSION['next_reminder_time']); + if($_REQUEST['set_reminder'] == 'Yes') { + $this->insertIntoReminderTable("vtiger_activity_reminder",$module,$current_id,''); + } + } +} + + + /** Function to insert values in vtiger_invitees table for the specified module,tablename ,invitees_array + * @param $table_name -- table name:: Type varchar + * @param $module -- module:: Type varchar + * @param $invitees_array Array + */ + function insertIntoInviteeTable($module,$invitees_array) + { + global $log,$adb; + $log->debug("Entering insertIntoInviteeTable(".$module.",".$invitees_array.") method ..."); + if($this->mode == 'edit'){ + $sql = "delete from vtiger_invitees where activityid=?"; + $adb->pquery($sql, array($this->id)); + } + foreach($invitees_array as $inviteeid) + { + if($inviteeid != '') + { + $query="insert into vtiger_invitees values(?,?)"; + $adb->pquery($query, array($this->id, $inviteeid)); + } + } + $log->debug("Exiting insertIntoInviteeTable method ..."); + + } + + + /** Function to insert values in vtiger_salesmanactivityrel table for the specified module + * @param $module -- module:: Type varchar + */ + + function insertIntoSmActivityRel($module) + { + global $adb; + global $current_user; + if($this->mode == 'edit'){ + $sql = "delete from vtiger_salesmanactivityrel where activityid=?"; + $adb->pquery($sql, array($this->id)); + } + + $user_sql = $adb->pquery("select count(*) as count from vtiger_users where id=?", array($this->column_fields['assigned_user_id'])); + if($adb->query_result($user_sql, 0, 'count') != 0) { + $sql_qry = "insert into vtiger_salesmanactivityrel (smid,activityid) values(?,?)"; + $adb->pquery($sql_qry, array($this->column_fields['assigned_user_id'], $this->id)); + + if(isset($_REQUEST['inviteesid']) && $_REQUEST['inviteesid']!='') + { + $selected_users_string = $_REQUEST['inviteesid']; + $invitees_array = explode(';',$selected_users_string); + foreach($invitees_array as $inviteeid) + { + if($inviteeid != '') + { + $resultcheck = $adb->pquery("select * from vtiger_salesmanactivityrel where activityid=? and smid=?",array($this->id,$inviteeid)); + if($adb->num_rows($resultcheck) != 1){ + $query="insert into vtiger_salesmanactivityrel values(?,?)"; + $adb->pquery($query, array($inviteeid, $this->id)); + } + } + } + } + } +} + + /** + * + * @param String $tableName + * @return String + */ + public function getJoinClause($tableName) { + if($tableName == "vtiger_activity_reminder") + return 'LEFT JOIN'; + return parent::getJoinClause($tableName); + } + + + // Mike Crowe Mod --------------------------------------------------------Default ordering for us + /** + * Function to get sort order + * return string $sorder - sortorder string either 'ASC' or 'DESC' + */ + function getSortOrder() + { + global $log; + $log->debug("Entering getSortOrder() method ..."); + if(isset($_REQUEST['sorder'])) + $sorder = $this->db->sql_escape_string($_REQUEST['sorder']); + else + $sorder = (($_SESSION['ACTIVITIES_SORT_ORDER'] != '')?($_SESSION['ACTIVITIES_SORT_ORDER']):($this->default_sort_order)); + $log->debug("Exiting getSortOrder method ..."); + return $sorder; + } + + /** + * Function to get order by + * return string $order_by - fieldname(eg: 'subject') + */ + function getOrderBy() + { + global $log; + $log->debug("Entering getOrderBy() method ..."); + + $use_default_order_by = ''; + if(PerformancePrefs::getBoolean('LISTVIEW_DEFAULT_SORTING', true)) { + $use_default_order_by = $this->default_order_by; + } + + if (isset($_REQUEST['order_by'])) + $order_by = $this->db->sql_escape_string($_REQUEST['order_by']); + else + $order_by = (($_SESSION['ACTIVITIES_ORDER_BY'] != '')?($_SESSION['ACTIVITIES_ORDER_BY']):($use_default_order_by)); + $log->debug("Exiting getOrderBy method ..."); + return $order_by; + } + // Mike Crowe Mod -------------------------------------------------------- + + + +//Function Call for Related List -- Start + /** + * Function to get Activity related Contacts + * @param integer $id - activityid + * returns related Contacts record in array format + */ + function get_contacts($id, $cur_tab_id, $rel_tab_id, $actions=false) { + global $log, $singlepane_view,$currentModule,$current_user; + $log->debug("Entering get_contacts(".$id.") method ..."); + $this_module = $currentModule; + + $related_module = vtlib_getModuleNameById($rel_tab_id); + require_once("modules/$related_module/$related_module.php"); + $other = new $related_module(); + vtlib_setup_modulevars($related_module, $other); + $singular_modname = vtlib_toSingular($related_module); + + $parenttab = getParentTab(); + + $returnset = '&return_module='.$this_module.'&return_action=DetailView&activity_mode=Events&return_id='.$id; + + $search_string = ''; + $button = ''; + + if($actions) { + if(is_string($actions)) $actions = explode(',', strtoupper($actions)); + if(in_array('SELECT', $actions) && isPermitted($related_module,4, '') == 'yes') { + $button .= " "; + } + } + + $query = 'select vtiger_users.user_name,vtiger_contactdetails.accountid,vtiger_contactdetails.contactid, vtiger_contactdetails.firstname,vtiger_contactdetails.lastname, vtiger_contactdetails.department, vtiger_contactdetails.title, vtiger_contactdetails.email, vtiger_contactdetails.phone, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime from vtiger_contactdetails inner join vtiger_cntactivityrel on vtiger_cntactivityrel.contactid=vtiger_contactdetails.contactid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid left join vtiger_groups on vtiger_groups.groupid = vtiger_crmentity.smownerid where vtiger_cntactivityrel.activityid='.$id.' and vtiger_crmentity.deleted=0'; + + $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset); + + if($return_value == null) $return_value = Array(); + $return_value['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_contacts method ..."); + return $return_value; + } + + /** + * Function to get Activity related Users + * @param integer $id - activityid + * returns related Users record in array format + */ + + function get_users($id) { + global $log; + $log->debug("Entering get_contacts(".$id.") method ..."); + global $app_strings; + + $focus = new Users(); + + $button = ''; + + $returnset = '&return_module=Calendar&return_action=CallRelatedList&return_id='.$id; + + $query = 'SELECT vtiger_users.id, vtiger_users.first_name,vtiger_users.last_name, vtiger_users.user_name, vtiger_users.email1, vtiger_users.email2, vtiger_users.status, vtiger_users.is_admin, vtiger_user2role.roleid, vtiger_users.secondaryemail, vtiger_users.phone_home, vtiger_users.phone_work, vtiger_users.phone_mobile, vtiger_users.phone_other, vtiger_users.phone_fax,vtiger_activity.date_start,vtiger_activity.due_date,vtiger_activity.time_start,vtiger_activity.duration_hours,vtiger_activity.duration_minutes from vtiger_users inner join vtiger_salesmanactivityrel on vtiger_salesmanactivityrel.smid=vtiger_users.id inner join vtiger_activity on vtiger_activity.activityid=vtiger_salesmanactivityrel.activityid inner join vtiger_user2role on vtiger_user2role.userid=vtiger_users.id where vtiger_activity.activityid='.$id; + + $return_data = GetRelatedList('Calendar','Users',$focus,$query,$button,$returnset); + + if($return_data == null) $return_data = Array(); + $return_data['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_users method ..."); + return $return_data; + } + + /** + * Function to get activities for given criteria + * @param string $criteria - query string + * returns activity records in array format($list) or null value + */ + function get_full_list($criteria) { + global $log; + $log->debug("Entering get_full_list(".$criteria.") method ..."); + $query = "select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity.setype, vtiger_activity.*, + vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid + from vtiger_activity + inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid + left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid + left join vtiger_contactdetails on vtiger_contactdetails.contactid= vtiger_cntactivityrel.contactid + left join vtiger_seactivityrel on vtiger_seactivityrel.activityid = vtiger_activity.activityid + WHERE vtiger_crmentity.deleted=0 ".$criteria; + $result =& $this->db->query($query); + + if($this->db->getRowCount($result) > 0){ + + // We have some data. + while ($row = $this->db->fetchByAssoc($result)) { + foreach($this->list_fields_name as $field) + { + if (isset($row[$field])) { + $this->$field = $row[$field]; + } + else { + $this->$field = ''; + } + } + $list[] = $this; + } + } + if (isset($list)) + { + $log->debug("Exiting get_full_list method ..."); + return $list; + } + else + { + $log->debug("Exiting get_full_list method ..."); + return null; + } + + } + + +//calendarsync + /** + * Function to get meeting count + * @param string $user_name - User Name + * return integer $row["count(*)"] - count + */ + function getCount_Meeting($user_name) + { + global $log; + $log->debug("Entering getCount_Meeting(".$user_name.") method ..."); + $query = "select count(*) from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid inner join vtiger_salesmanactivityrel on vtiger_salesmanactivityrel.activityid=vtiger_activity.activityid inner join vtiger_users on vtiger_users.id=vtiger_salesmanactivityrel.smid where user_name=? and vtiger_crmentity.deleted=0 and vtiger_activity.activitytype='Meeting'"; + $result = $this->db->pquery($query, array($user_name),true,"Error retrieving contacts count"); + $rows_found = $this->db->getRowCount($result); + $row = $this->db->fetchByAssoc($result, 0); + $log->debug("Exiting getCount_Meeting method ..."); + return $row["count(*)"]; + } + + function get_calendars($user_name,$from_index,$offset) + { + global $log; + $log->debug("Entering get_calendars(".$user_name.",".$from_index.",".$offset.") method ..."); + $query = "select vtiger_activity.location as location,vtiger_activity.duration_hours as duehours, vtiger_activity.duration_minutes as dueminutes,vtiger_activity.time_start as time_start, vtiger_activity.subject as name,vtiger_crmentity.modifiedtime as date_modified, vtiger_activity.date_start start_date,vtiger_activity.activityid as id,vtiger_activity.status as status, vtiger_crmentity.description as description, vtiger_activity.priority as vtiger_priority, vtiger_activity.due_date as date_due ,vtiger_contactdetails.firstname cfn, vtiger_contactdetails.lastname cln from vtiger_activity inner join vtiger_salesmanactivityrel on vtiger_salesmanactivityrel.activityid=vtiger_activity.activityid inner join vtiger_users on vtiger_users.id=vtiger_salesmanactivityrel.smid left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid=vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid=vtiger_cntactivityrel.contactid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid where user_name='" .$user_name ."' and vtiger_crmentity.deleted=0 and vtiger_activity.activitytype='Meeting' limit " .$from_index ."," .$offset; + $log->debug("Exiting get_calendars method ..."); + return $this->process_list_query1($query); + } +//calendarsync + /** + * Function to get task count + * @param string $user_name - User Name + * return integer $row["count(*)"] - count + */ + function getCount($user_name) + { + global $log; + $log->debug("Entering getCount(".$user_name.") method ..."); + $query = "select count(*) from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid inner join vtiger_salesmanactivityrel on vtiger_salesmanactivityrel.activityid=vtiger_activity.activityid inner join vtiger_users on vtiger_users.id=vtiger_salesmanactivityrel.smid where user_name=? and vtiger_crmentity.deleted=0 and vtiger_activity.activitytype='Task'"; + $result = $this->db->pquery($query,array($user_name), true,"Error retrieving contacts count"); + $rows_found = $this->db->getRowCount($result); + $row = $this->db->fetchByAssoc($result, 0); + + $log->debug("Exiting getCount method ..."); + return $row["count(*)"]; + } + + /** + * Function to get list of task for user with given limit + * @param string $user_name - User Name + * @param string $from_index - query string + * @param string $offset - query string + * returns tasks in array format + */ + function get_tasks($user_name,$from_index,$offset) + { + global $log; + $log->debug("Entering get_tasks(".$user_name.",".$from_index.",".$offset.") method ..."); + $query = "select vtiger_activity.subject as name,vtiger_crmentity.modifiedtime as date_modified, vtiger_activity.date_start start_date,vtiger_activity.activityid as id,vtiger_activity.status as status, vtiger_crmentity.description as description, vtiger_activity.priority as priority, vtiger_activity.due_date as date_due ,vtiger_contactdetails.firstname cfn, vtiger_contactdetails.lastname cln from vtiger_activity inner join vtiger_salesmanactivityrel on vtiger_salesmanactivityrel.activityid=vtiger_activity.activityid inner join vtiger_users on vtiger_users.id=vtiger_salesmanactivityrel.smid left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid=vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid=vtiger_cntactivityrel.contactid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid where user_name='" .$user_name ."' and vtiger_crmentity.deleted=0 and vtiger_activity.activitytype='Task' limit " .$from_index ."," .$offset; + $log->debug("Exiting get_tasks method ..."); + return $this->process_list_query1($query); + + } + + /** + * Function to process the activity list query + * @param string $query - query string + * return array $response - activity lists + */ + function process_list_query1($query) + { + global $log; + $log->debug("Entering process_list_query1(".$query.") method ..."); + $result =& $this->db->query($query,true,"Error retrieving $this->object_name list: "); + $list = Array(); + $rows_found = $this->db->getRowCount($result); + if($rows_found != 0) + { + $task = Array(); + for($index = 0 , $row = $this->db->fetchByAssoc($result, $index); $row && $index <$rows_found;$index++, $row = $this->db->fetchByAssoc($result, $index)) + + { + foreach($this->range_fields as $columnName) + { + if (isset($row[$columnName])) { + if($columnName == 'time_start'){ + $startDate = new DateTimeField($row['date_start'].' '. + $row[$columnName]); + $task[$columnName] = $startDate->getDBInsertTimeValue(); + }else{ + $task[$columnName] = $row[$columnName]; + } + } + else + { + $task[$columnName] = ""; + } + } + + $task[contact_name] = return_name($row, 'cfn', 'cln'); + + $list[] = $task; + } + } + + $response = Array(); + $response['list'] = $list; + $response['row_count'] = $rows_found; + $response['next_offset'] = $next_offset; + $response['previous_offset'] = $previous_offset; + + + $log->debug("Exiting process_list_query1 method ..."); + return $response; + } + + /** + * Function to get reminder for activity + * @param integer $activity_id - activity id + * @param string $reminder_time - reminder time + * @param integer $reminder_sent - 0 or 1 + * @param integer $recurid - recuring eventid + * @param string $remindermode - string like 'edit' + */ + function activity_reminder($activity_id,$reminder_time,$reminder_sent=0,$recurid,$remindermode='') + { + global $log; + $log->debug("Entering vtiger_activity_reminder(".$activity_id.",".$reminder_time.",".$reminder_sent.",".$recurid.",".$remindermode.") method ..."); + //Check for vtiger_activityid already present in the reminder_table + $query_exist = "SELECT activity_id FROM ".$this->reminder_table." WHERE activity_id = ?"; + $result_exist = $this->db->pquery($query_exist, array($activity_id)); + + if($remindermode == 'edit') + { + if($this->db->num_rows($result_exist) > 0) + { + $query = "UPDATE ".$this->reminder_table." SET"; + $query .=" reminder_sent = ?, reminder_time = ? WHERE activity_id =?"; + $params = array($reminder_sent, $reminder_time, $activity_id); + } + else + { + $query = "INSERT INTO ".$this->reminder_table." VALUES (?,?,?,?)"; + $params = array($activity_id, $reminder_time, 0, $recurid); + } + } + elseif(($remindermode == 'delete') && ($this->db->num_rows($result_exist) > 0)) + { + $query = "DELETE FROM ".$this->reminder_table." WHERE activity_id = ?"; + $params = array($activity_id); + } + else + { + $query = "INSERT INTO ".$this->reminder_table." VALUES (?,?,?,?)"; + $params = array($activity_id, $reminder_time, 0, $recurid); + } + $this->db->pquery($query,$params,true,"Error in processing vtiger_table $this->reminder_table"); + $log->debug("Exiting vtiger_activity_reminder method ..."); + } + + //Used for vtigerCRM Outlook Add-In + /** + * Function to get tasks to display in outlookplugin + * @param string $username - User name + * return string $query - sql query + */ + function get_tasksforol($username) + { + global $log,$adb; + $log->debug("Entering get_tasksforol(".$username.") method ..."); + global $current_user; + require_once("modules/Users/Users.php"); + $seed_user=new Users(); + $user_id=$seed_user->retrieve_user_id($username); + $current_user=$seed_user; + $current_user->retrieve_entity_info($user_id, 'Users'); + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + + if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) + { + $sql1 = "select tablename,columnname from vtiger_field where tabid=9 and tablename <> 'vtiger_recurringevents' and tablename <> 'vtiger_activity_reminder' and vtiger_field.presence in (0,2)"; + $params1 = array(); + }else + { + $profileList = getCurrentUserProfileList(); + $sql1 = "select tablename,columnname from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=9 and tablename <> 'vtiger_recurringevents' and tablename <> 'vtiger_activity_reminder' and vtiger_field.displaytype in (1,2,4,3) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)"; + $params1 = array(); + if (count($profileList) > 0) { + $sql1 .= " and vtiger_profile2field.profileid in (". generateQuestionMarks($profileList) .")"; + array_push($params1, $profileList); + } + } + $result1 = $adb->pquery($sql1,$params1); + for($i=0;$i < $adb->num_rows($result1);$i++) + { + $permitted_lists[] = $adb->query_result($result1,$i,'tablename'); + $permitted_lists[] = $adb->query_result($result1,$i,'columnname'); + /*if($adb->query_result($result1,$i,'columnname') == "parentid") + { + $permitted_lists[] = 'vtiger_account'; + $permitted_lists[] = 'accountname'; + }*/ + } + $permitted_lists = array_chunk($permitted_lists,2); + $column_table_lists = array(); + for($i=0;$i < count($permitted_lists);$i++) + { + $column_table_lists[] = implode(".",$permitted_lists[$i]); + } + + $query = "select vtiger_activity.activityid as taskid, ".implode(',',$column_table_lists)." from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid + inner join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid + left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid=vtiger_activity.activityid + left join vtiger_contactdetails on vtiger_contactdetails.contactid=vtiger_cntactivityrel.contactid + left join vtiger_seactivityrel on vtiger_seactivityrel.activityid = vtiger_activity.activityid + where vtiger_users.user_name='".$username."' and vtiger_crmentity.deleted=0 and vtiger_activity.activitytype='Task'"; + $log->debug("Exiting get_tasksforol method ..."); + return $query; + } + + /** + * Function to get calendar query for outlookplugin + * @param string $username - User name * return string $query - sql query */ + function get_calendarsforol($user_name) + { + global $log,$adb; + $log->debug("Entering get_calendarsforol(".$user_name.") method ..."); + global $current_user; + require_once("modules/Users/Users.php"); + $seed_user=new Users(); + $user_id=$seed_user->retrieve_user_id($user_name); + $current_user=$seed_user; + $current_user->retrieve_entity_info($user_id, 'Users'); + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + + if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) + { + $sql1 = "select tablename,columnname from vtiger_field where tabid=9 and tablename <> 'vtiger_recurringevents' and tablename <> 'vtiger_activity_reminder' and vtiger_field.presence in (0,2)"; + $params1 = array(); + }else + { + $profileList = getCurrentUserProfileList(); + $sql1 = "select tablename,columnname from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid=9 and tablename <> 'vtiger_recurringevents' and tablename <> 'vtiger_activity_reminder' and vtiger_field.displaytype in (1,2,4,3) and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)"; + $params1 = array(); + if (count($profileList) > 0) { + $sql1 .= " and vtiger_profile2field.profileid in (". generateQuestionMarks($profileList) .")"; + array_push($params1,$profileList); + } + } + $result1 = $adb->pquery($sql1, $params1); + for($i=0;$i < $adb->num_rows($result1);$i++) + { + $permitted_lists[] = $adb->query_result($result1,$i,'tablename'); + $permitted_lists[] = $adb->query_result($result1,$i,'columnname'); + if($adb->query_result($result1,$i,'columnname') == "date_start") + { + $permitted_lists[] = 'vtiger_activity'; + $permitted_lists[] = 'time_start'; + } + if($adb->query_result($result1,$i,'columnname') == "due_date") + { + $permitted_lists[] = 'vtiger_activity'; + $permitted_lists[] = 'time_end'; + } + } + $permitted_lists = array_chunk($permitted_lists,2); + $column_table_lists = array(); + for($i=0;$i < count($permitted_lists);$i++) + { + $column_table_lists[] = implode(".",$permitted_lists[$i]); + } + + $query = "select vtiger_activity.activityid as clndrid, ".implode(',',$column_table_lists)." from vtiger_activity + inner join vtiger_salesmanactivityrel on vtiger_salesmanactivityrel.activityid=vtiger_activity.activityid + inner join vtiger_users on vtiger_users.id=vtiger_salesmanactivityrel.smid + left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid=vtiger_activity.activityid + left join vtiger_contactdetails on vtiger_contactdetails.contactid=vtiger_cntactivityrel.contactid + left join vtiger_seactivityrel on vtiger_seactivityrel.activityid = vtiger_activity.activityid + inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid + where vtiger_users.user_name='".$user_name."' and vtiger_crmentity.deleted=0 and vtiger_activity.activitytype='Meeting'"; + $log->debug("Exiting get_calendarsforol method ..."); + return $query; + } + + // Function to unlink all the dependent entities of the given Entity by Id + function unlinkDependencies($module, $id) { + global $log; + + $sql = 'DELETE FROM vtiger_activity_reminder WHERE activity_id=?'; + $this->db->pquery($sql, array($id)); + + $sql = 'DELETE FROM vtiger_recurringevents WHERE activityid=?'; + $this->db->pquery($sql, array($id)); + + $sql = 'DELETE FROM vtiger_cntactivityrel WHERE activityid = ?'; + $this->db->pquery($sql, array($id)); + + parent::unlinkDependencies($module, $id); + } + + // Function to unlink an entity with given Id from another entity + function unlinkRelationship($id, $return_module, $return_id) { + global $log; + if(empty($return_module) || empty($return_id)) return; + + if($return_module == 'Contacts') { + $sql = 'DELETE FROM vtiger_cntactivityrel WHERE contactid = ? AND activityid = ?'; + $this->db->pquery($sql, array($return_id, $id)); + } elseif($return_module == 'HelpDesk') { + $sql = 'DELETE FROM vtiger_seactivityrel WHERE crmid = ? AND activityid = ?'; + $this->db->pquery($sql, array($return_id, $id)); + } else { + $sql='DELETE FROM vtiger_seactivityrel WHERE activityid=?'; + $this->db->pquery($sql, array($id)); + + $sql = 'DELETE FROM vtiger_crmentityrel WHERE (crmid=? AND relmodule=? AND relcrmid=?) OR (relcrmid=? AND module=? AND crmid=?)'; + $params = array($id, $return_module, $return_id, $id, $return_module, $return_id); + $this->db->pquery($sql, $params); + } + } + + /** + * this function sets the status flag of activity to true or false depending on the status passed to it + * @param string $status - the status of the activity flag to set + * @return:: true if successful; false otherwise + */ + function setActivityReminder($status){ + global $adb; + if($status == "on"){ + $flag = 0; + }elseif($status == "off"){ + $flag = 1; + }else{ + return false; + } + $sql = "update vtiger_activity_reminder_popup set status=1 where recordid=?"; + $adb->pquery($sql, array($this->id)); + return true; + } + + /* + * Function to get the relation tables for related modules + * @param - $secmodule secondary module name + * returns the array with table names and fieldnames storing relations between module and this module + */ + function setRelationTables($secmodule){ + $rel_tables = array ( + "Contacts" => array("vtiger_cntactivityrel"=>array("activityid","contactid"),"vtiger_activity"=>"activityid"), + "Leads" => array("vtiger_seactivityrel"=>array("activityid","crmid"),"vtiger_activity"=>"activityid"), + "Accounts" => array("vtiger_seactivityrel"=>array("activityid","crmid"),"vtiger_activity"=>"activityid"), + "Potentials" => array("vtiger_seactivityrel"=>array("activityid","crmid"),"vtiger_activity"=>"activityid"), + ); + return $rel_tables[$secmodule]; + } + + /* + * Function to get the secondary query part of a report + * @param - $module primary module name + * @param - $secmodule secondary module name + * returns the query string formed on fetching the related data for report for secondary module + */ + function generateReportsSecQuery($module,$secmodule){ + $query = $this->getRelationQuery($module,$secmodule,"vtiger_activity","activityid"); + $query .=" left join vtiger_crmentity as vtiger_crmentityCalendar on vtiger_crmentityCalendar.crmid=vtiger_activity.activityid and vtiger_crmentityCalendar.deleted=0 + left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid + left join vtiger_contactdetails as vtiger_contactdetailsCalendar on vtiger_contactdetailsCalendar.contactid= vtiger_cntactivityrel.contactid + left join vtiger_activitycf on vtiger_activitycf.activityid = vtiger_activity.activityid + left join vtiger_seactivityrel on vtiger_seactivityrel.activityid = vtiger_activity.activityid + left join vtiger_activity_reminder on vtiger_activity_reminder.activity_id = vtiger_activity.activityid + left join vtiger_recurringevents on vtiger_recurringevents.activityid = vtiger_activity.activityid + left join vtiger_crmentity as vtiger_crmentityRelCalendar on vtiger_crmentityRelCalendar.crmid = vtiger_seactivityrel.crmid and vtiger_crmentityRelCalendar.deleted=0 + left join vtiger_account as vtiger_accountRelCalendar on vtiger_accountRelCalendar.accountid=vtiger_crmentityRelCalendar.crmid + left join vtiger_leaddetails as vtiger_leaddetailsRelCalendar on vtiger_leaddetailsRelCalendar.leadid = vtiger_crmentityRelCalendar.crmid + left join vtiger_potential as vtiger_potentialRelCalendar on vtiger_potentialRelCalendar.potentialid = vtiger_crmentityRelCalendar.crmid + left join vtiger_quotes as vtiger_quotesRelCalendar on vtiger_quotesRelCalendar.quoteid = vtiger_crmentityRelCalendar.crmid + left join vtiger_purchaseorder as vtiger_purchaseorderRelCalendar on vtiger_purchaseorderRelCalendar.purchaseorderid = vtiger_crmentityRelCalendar.crmid + left join vtiger_invoice as vtiger_invoiceRelCalendar on vtiger_invoiceRelCalendar.invoiceid = vtiger_crmentityRelCalendar.crmid + left join vtiger_salesorder as vtiger_salesorderRelCalendar on vtiger_salesorderRelCalendar.salesorderid = vtiger_crmentityRelCalendar.crmid + left join vtiger_troubletickets as vtiger_troubleticketsRelCalendar on vtiger_troubleticketsRelCalendar.ticketid = vtiger_crmentityRelCalendar.crmid + left join vtiger_campaign as vtiger_campaignRelCalendar on vtiger_campaignRelCalendar.campaignid = vtiger_crmentityRelCalendar.crmid + left join vtiger_groups as vtiger_groupsCalendar on vtiger_groupsCalendar.groupid = vtiger_crmentityCalendar.smownerid + left join vtiger_users as vtiger_usersCalendar on vtiger_usersCalendar.id = vtiger_crmentityCalendar.smownerid + left join vtiger_users as vtiger_lastModifiedByCalendar on vtiger_lastModifiedByCalendar.id = vtiger_crmentityCalendar.modifiedby "; + return $query; + } + + public function getNonAdminAccessControlQuery($module, $user,$scope='') { + require('user_privileges/user_privileges_'.$user->id.'.php'); + require('user_privileges/sharing_privileges_'.$user->id.'.php'); + $query = ' '; + $tabId = getTabid($module); + if($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] + == 1 && $defaultOrgSharingPermission[$tabId] == 3) { + $tableName = 'vt_tmp_u'.$user->id.'_t'.$tabId; + $sharingRuleInfoVariable = $module.'_share_read_permission'; + $sharingRuleInfo = $$sharingRuleInfoVariable; + $sharedTabId = null; + $this->setupTemporaryTable($tableName, $sharedTabId, $user, + $current_user_parent_role_seq, $current_user_groups); + $query = " INNER JOIN $tableName $tableName$scope ON ($tableName$scope.id = ". + "vtiger_crmentity$scope.smownerid and $tableName$scope.shared=0) "; + $sharedIds = getSharedCalendarId($user->id); + if(!empty($sharedIds)){ + $query .= "or ($tableName$scope.id = vtiger_crmentity$scope.smownerid AND ". + "$tableName$scope.shared=1 and vtiger_activity.visibility = 'Public') "; + } + } + return $query; + } + + protected function setupTemporaryTable($tableName, $tabId, $user, $parentRole, $userGroups) { + $module = null; + if (!empty($tabId)) { + $module = getTabname($tabId); + } + $query = $this->getNonAdminAccessQuery($module, $user, $parentRole, $userGroups); + $query = "create temporary table IF NOT EXISTS $tableName(id int(11) primary key, shared ". + "int(1) default 0) ignore ".$query; + $db = PearDatabase::getInstance(); + $result = $db->pquery($query, array()); + if(is_object($result)) { + $query = "create temporary table IF NOT EXISTS $tableName(id int(11) primary key, shared ". + "int(1) default 0) replace select 1, userid as id from vtiger_sharedcalendar where ". + "sharedid = $user->id"; + $result = $db->pquery($query, array()); + if(is_object($result)) { + return true; + } + } + return false; + } +} +?> diff --git a/modules/Calendar/ActivityAjax.php b/modules/Calendar/ActivityAjax.php new file mode 100644 index 0000000..184bc8c --- /dev/null +++ b/modules/Calendar/ActivityAjax.php @@ -0,0 +1,214 @@ +debug("In CalendarAjax file"); +$mysel = vtlib_purify($_REQUEST['view']); +$calendar_arr = Array(); +$calendar_arr['IMAGE_PATH'] = $image_path; +$date_data = array(); +if ( isset($_REQUEST['day'])) +{ + $date_data['day'] = $_REQUEST['day']; +} +if ( isset($_REQUEST['month'])) +{ + $date_data['month'] = $_REQUEST['month']; +} +if ( isset($_REQUEST['week'])) +{ + $date_data['week'] = $_REQUEST['week']; +} +if ( isset($_REQUEST['year'])) +{ + if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970) + { + print("".$app_strings['LBL_CAL_LIMIT_MSG'].""); + exit; + } + $date_data['year'] = $_REQUEST['year']; +} + + +if((isset($_REQUEST['type']) && $_REQUEST['type'] !='') || (isset($_REQUEST['n_type']) && $_REQUEST['n_type'] !='')) +{ + $type = $_REQUEST['type']; + $n_type = $_REQUEST['n_type']; + $cal_log->debug("type value is:".$type); + if($type == 'minical') + { + $cal_log->debug("going to get mini calendar"); + $temp_module = $currentModule; + $mod_strings = return_module_language($current_language,'Calendar'); + $currentModule = 'Calendar'; + $calendar_arr['IMAGE_PATH'] = $image_path; + $calendar_arr['calendar'] = new Calendar('month',$date_data); + $calendar_arr['view'] = 'month'; + $calendar_arr['size'] = 'small'; + if($current_user->hour_format != '') + $calendar_arr['calendar']->hour_format=$current_user->hour_format; + $calendar_arr['calendar']->add_Activities($current_user); + calendar_layout($calendar_arr); + $mod_strings = return_module_language($current_language,$temp_module); + $currentModule = vtlib_purify($_REQUEST['module']); + } + elseif($type == 'settings') + { + $cal_log->debug("going to get calendar Settings"); + require_once('modules/Calendar/calendar_share.php'); + } + else + { + $subtab = vtlib_purify($_REQUEST['subtab']); + if(empty($mysel)) + { + $mysel = 'day'; + } + $calendar_arr['calendar'] = new Calendar($mysel,$date_data); + + $calendar_arr['view'] = $mysel; + if($calendar_arr['calendar']->view == 'day') + $start_date = $end_date = $calendar_arr['calendar']->date_time->get_formatted_date(); + elseif($calendar_arr['calendar']->view == 'week') + { + $start_date = $calendar_arr['calendar']->slices[0]; + $end_date = $calendar_arr['calendar']->slices[6]; + } + elseif($calendar_arr['calendar']->view == 'month') + { + $start_date = $calendar_arr['calendar']->date_time->getThismonthDaysbyIndex(0); + $end_date = $calendar_arr['calendar']->date_time->getThismonthDaysbyIndex($calendar_arr['calendar']->date_time->daysinmonth - 1); + $start_date = $start_date->get_formatted_date(); + $end_date = $end_date->get_formatted_date(); + } + elseif($calendar_arr['calendar']->view == 'year') + { + $start_date = $calendar_arr['calendar']->date_time->getThisyearMonthsbyIndex(0); + $end_date = $calendar_arr['calendar']->date_time->get_first_day_of_changed_year('increment'); + $start_date = $start_date->get_formatted_date(); + $end_date = $end_date->get_formatted_date(); + } + else + { + die("view:".$calendar_arr['calendar']->view." is not defined"); + } + + if($type == 'change_owner' || $type == 'activity_delete' || $type == 'change_status' || $type == 'activity_postpone' || $n_type == 'nav') + { + if($current_user->hour_format != '') + $calendar_arr['calendar']->hour_format=$current_user->hour_format; + + if($type == 'change_status') + { + $return_id = vtlib_purify($_REQUEST['record']); + if(isset($_REQUEST['status'])) + { + $status = $_REQUEST['status']; + $activity_type = "Task"; + } + elseif(isset($_REQUEST['eventstatus'])) + { + $status = $_REQUEST['eventstatus']; + $activity_type = "Events"; + } + ChangeStatus($status,$return_id,$activity_type); + $mail_data = getActivityMailInfo($return_id,$status,$activity_type); + $invitee_qry = "select * from vtiger_invitees where activityid=?"; + $invitee_res = $adb->pquery($invitee_qry, array($return_id)); + $count = $adb->num_rows($invitee_res); + if($count != 0) + { + for($j = 0; $j < $count; $j++) + { + $invitees_ids[]= $adb->query_result($invitee_res,$j,"inviteeid"); + + } + $invitees_ids_string = implode(';',$invitees_ids); + sendInvitation($invitees_ids_string,$activity_type,$mail_data['subject'],$mail_data); + } + } + if($type == 'activity_postpone') + { + } + if ($_REQUEST['viewOption'] == 'hourview' && ($mysel == 'day' || $mysel == 'week' || $mysel == 'month' || $mysel == 'year')) + { + $calendar_arr['calendar']->add_Activities($current_user); + } + + if(isset($_REQUEST['viewOption']) && $_REQUEST['viewOption'] != null && $subtab == 'event') + { + if($_REQUEST['viewOption'] == 'hourview') + { + $cal_log->debug("going to get calendar Event HourView"); + if($calendar_arr['view'] == 'day') + { + echo getDayViewLayout($calendar_arr)."####".getEventInfo($calendar_arr,'listcnt'); + } + elseif($calendar_arr['view'] == 'week') + { + echo getWeekViewLayout($calendar_arr)."####".getEventInfo($calendar_arr,'listcnt'); + } + elseif($calendar_arr['view'] == 'month') + { + echo getMonthViewLayout($calendar_arr)."####".getEventInfo($calendar_arr,'listcnt'); + } + elseif($calendar_arr['view'] == 'year') + { + echo getYearViewLayout($calendar_arr)."####".getEventInfo($calendar_arr,'listcnt'); + } + else + { + die("view:".$view['view']." is not defined"); + } + } + elseif($_REQUEST['viewOption'] == 'listview') + { + $cal_log->debug("going to get calendar Event ListView"); + //To get Events List + $activity_arr = getEventList($calendar_arr, $start_date, $end_date); + $activity_list = $activity_arr[0]; + $navigation_arr = $activity_arr[1]; + echo constructEventListView($calendar_arr,$activity_list,$navigation_arr)."####".getEventInfo($calendar_arr,'listcnt'); + } + } + elseif($subtab == 'todo') + { + $cal_log->debug("going to get calendar Todo ListView"); + //To get Todos List + $todo_arr = getTodoList($calendar_arr, $start_date, $end_date); + $todo_list = $todo_arr[0]; + $navigation_arr = $todo_arr[1]; + echo constructTodoListView($todo_list,$calendar_arr,$subtab,$navigation_arr)."####".getTodoInfo($calendar_arr,'listcnt'); + } + } + elseif($type == 'view') + { + checkFileAccessForInclusion('modules/Calendar/'.$_REQUEST['file'].'.php'); + require_once('modules/Calendar/'.$_REQUEST['file'].'.php'); + } + else + { + die("View option is not defined"); + } + } +} +else +{ + require_once('include/Ajax/CommonAjax.php'); + //die("type is not set"); +} + +?> diff --git a/modules/Calendar/ActivityReminderCallbackAjax.php b/modules/Calendar/ActivityReminderCallbackAjax.php new file mode 100644 index 0000000..dd800f1 --- /dev/null +++ b/modules/Calendar/ActivityReminderCallbackAjax.php @@ -0,0 +1,150 @@ + $cur_time)) { + echo ""; + return; +} +$log = LoggerManager::getLogger('Activity_Reminder'); +$smarty = new vtigerCRM_Smarty; +if(isPermitted('Calendar','index') == 'yes'){ + $active = $adb->pquery("select * from vtiger_users where id=?",array($current_user->id)); + $active_res = $adb->query_result($active,0,'reminder_interval'); + if($active_res == 'None') { + $_SESSION['next_reminder_time'] = 'None'; + } + if($active_res!='None'){ + $interval=$adb->query_result($active,0,"reminder_interval"); + $intervalInMinutes = ConvertToMinutes($interval); + // check for reminders every minute + $time = time(); + $_SESSION['next_reminder_time'] = $time + ($intervalInMinutes * 60); + $date = date('Y-m-d', strtotime("+$intervalInMinutes minutes", $time)); + $time = date('H:i', strtotime("+$intervalInMinutes minutes", $time)); + $callback_query = + "SELECT * FROM vtiger_activity_reminder_popup inner join vtiger_crmentity where " . + " vtiger_activity_reminder_popup.status = 0 and " . + " vtiger_activity_reminder_popup.recordid = vtiger_crmentity.crmid " . + " and vtiger_crmentity.smownerid = ".$current_user->id." and vtiger_crmentity.deleted = 0 " . + " and ((DATE_FORMAT(vtiger_activity_reminder_popup.date_start,'%Y-%m-%d') <= '" . $date . "')" . + " AND (TIME_FORMAT(vtiger_activity_reminder_popup.time_start,'%H:%i') <= '" . $time . "'))"; + + $result = $adb->query($callback_query); + + $cbrows = $adb->num_rows($result); + if($cbrows > 0) { + for($index = 0; $index < $cbrows; ++$index) { + $reminderid = $adb->query_result($result, $index, "reminderid"); + $cbrecord = $adb->query_result($result, $index, "recordid"); + $cbmodule = $adb->query_result($result, $index, "semodule"); + + $focus = CRMEntity::getInstance($cbmodule); + + if($cbmodule == 'Calendar') { + $focus->retrieve_entity_info($cbrecord,$cbmodule); + + $cbsubject = $focus->column_fields['subject']; + $cbactivitytype = $focus->column_fields['activitytype']; + $cbdate = $focus->column_fields["date_start"]; + $cbtime = $focus->column_fields["time_start"]; + } else { + // For non-calendar records. + $cbsubject = array_values(getEntityName($cbmodule, $cbrecord)); + $cbsubject = $cbsubject[0]; + $cbactivitytype = getTranslatedString($cbmodule, $cbmodule); + $cbdate = $adb->query_result($result, $index, 'date_start'); + $cbtime = $adb->query_result($result, $index, 'time_start'); + + } + if($cbtime != ''){ + $date = new DateTimeField($cbdate.' '.$cbtime); + $cbtime = $date->getDisplayTime(); + $cbdate = $date->getDisplayDate(); + $cbtimeArr = getaddEventPopupTime($cbtime, '', 'am/pm'); + $cbtime = $cbtimeArr['starthour'].':'.$cbtimeArr['startmin'].''.$cbtimeArr['startfmt']; + } + + if($cbactivitytype=='Task') + $cbstatus = $focus->column_fields["taskstatus"]; + else + $cbstatus = $focus->column_fields["eventstatus"]; + + $cbstatus = getTranslatedString($cbstatus, $currentModule); + $cbactivitytype = getTranslatedString($cbactivitytype, $currentModule); + + // Appending recordid we can get unique callback dom id for that record. + $popupid = "ActivityReminder_$cbrecord"; + if($cbdate <= date('Y-m-d')){ + if($cbdate == date('Y-m-d') && $cbtime > date('H:i')) $cbcolor = ''; + else $cbcolor= '#FF1515'; + } + $smarty->assign("THEME", $theme); + $smarty->assign("popupid", $popupid); + $smarty->assign("APP", $app_strings); + $smarty->assign("cbreminderid", $reminderid); + $smarty->assign("cbdate", $cbdate); + $smarty->assign("cbtime", $cbtime); + $smarty->assign("cbsubject", $cbsubject); + $smarty->assign("cbmodule", $cbmodule); + $smarty->assign("cbrecord", $cbrecord); + $smarty->assign("cbstatus", $cbstatus); + $smarty->assign("cbcolor", $cbcolor); + $smarty->assign("cblinkdtl", $cblinkdtl); + $smarty->assign("activitytype", $cbactivitytype); + $smarty->display("ActivityReminderCallback.tpl"); + + $mark_reminder_as_read = "UPDATE vtiger_activity_reminder_popup set status = 1 where reminderid = ?"; + $adb->pquery($mark_reminder_as_read, array($reminderid)); + echo ""; + } + } else { + $callback_query = + "SELECT * FROM vtiger_activity_reminder_popup inner join vtiger_crmentity where " . + " vtiger_activity_reminder_popup.status = 0 and " . + " vtiger_activity_reminder_popup.recordid = vtiger_crmentity.crmid " . + " and vtiger_crmentity.smownerid = ".$current_user->id." and vtiger_crmentity.deleted = 0 ". + "AND vtiger_activity_reminder_popup.reminderid > 0 ORDER BY date_start DESC , ". + "TIME_FORMAT(vtiger_activity_reminder_popup.time_start,'%H:%i') DESC LIMIT 1"; + $result = $adb->query($callback_query); + $it = new SqlResultIterator($adb, $result); + $nextReminderTime = null; + foreach ($it as $row) { + $nextReminderTime = strtotime($row->date_start.' '.$row->time_start); + } + $_SESSION['next_reminder_time'] = $nextReminderTime - ($intervalInMinutes * 60); + } + echo ""; + } +} + +?> \ No newline at end of file diff --git a/modules/Calendar/ActivityReminderSetupCallbackAjax.php b/modules/Calendar/ActivityReminderSetupCallbackAjax.php new file mode 100644 index 0000000..5298c28 --- /dev/null +++ b/modules/Calendar/ActivityReminderSetupCallbackAjax.php @@ -0,0 +1,46 @@ +pquery($reminder_query, array($reminderid, $cbmodule, $cbrecord)); + echo ":#:SUCCESS"; + } else { + echo ":#:FAILURE"; + } + } +} + +?> diff --git a/modules/Calendar/Appointment.php b/modules/Calendar/Appointment.php new file mode 100644 index 0000000..f6f1cb8 --- /dev/null +++ b/modules/Calendar/Appointment.php @@ -0,0 +1,339 @@ +participant = Array(); + $this->participant_state = Array(); + $this->description = ""; + } + + /** To get the events of the specified user and shared events + * @param $userid -- The user Id:: Type integer + * @param $from_datetime -- The start date Obj :: Type Array + * @param $to_datetime -- The end date Obj :: Type Array + * @param $view -- The calendar view :: Type String + * @returns $list :: Type Array + */ + + function readAppointment($userid, &$from_datetime, &$to_datetime, $view) + { + global $current_user,$adb; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + $and = "AND ( + ( + ( + (CAST(CONCAT(date_start,' ',time_start) AS DATETIME) >= ? AND CAST(CONCAT(date_start,' ',time_start) AS DATETIME) <= ?) + OR (CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) <= ? ) + OR (CAST(CONCAT(date_start,' ',time_start) AS DATETIME) <= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ?) + ) + AND vtiger_recurringevents.activityid is NULL + ) + OR ( + (CAST(CONCAT(vtiger_recurringevents.recurringdate,' ',time_start) AS DATETIME) >= ? + AND CAST(CONCAT(vtiger_recurringevents.recurringdate,' ',time_start) AS DATETIME) <= ?) + OR (CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) <= ?) + OR (CAST(CONCAT(vtiger_recurringevents.recurringdate,' ',time_start) AS DATETIME) <= ? + AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ?) + ) + )"; + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + + $q= "select vtiger_activity.*, vtiger_crmentity.*, + case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name + FROM vtiger_activity + inner join vtiger_crmentity on vtiger_activity.activityid = vtiger_crmentity.crmid + left join vtiger_recurringevents on vtiger_activity.activityid=vtiger_recurringevents.activityid + left join vtiger_groups on vtiger_groups.groupid = vtiger_crmentity.smownerid + LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid + WHERE vtiger_crmentity.deleted = 0 and vtiger_activity.activitytype not in ('Emails','Task') $and "; + + // User Select Customization: Changes should made also in (calendayLaout getEventList) and one more BELOW + $query_filter_prefix = calendarview_getSelectedUserFilterQuerySuffix(); + $q .= $query_filter_prefix; + // END + $h = $from_datetime->z_hour; + $m = $from_datetime->min; + if(empty($m)) { + $m = '00'; + } + $startDate = new DateTimeField($from_datetime->year."-".$from_datetime->z_month."-". + $from_datetime->z_day." $h:$m"); + $h = '23'; + $m = '59'; + $endDate = new DateTimeField($to_datetime->year."-".$to_datetime->z_month."-". + $to_datetime->z_day." $h:$m"); + $params = array( + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue() + ); + if($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $defaultOrgSharingPermission[16] == 3) + { + //Added for User Based Custom View for Calendar + $sec_parameter=getCalendarViewSecurityParameter(); + $q .= $sec_parameter; + } + + $q .= " AND vtiger_recurringevents.activityid is NULL "; + $q .= " group by vtiger_activity.activityid ORDER by vtiger_activity.date_start,vtiger_activity.time_start"; + + $r = $adb->pquery($q, $params); + $n = $adb->getRowCount($r); + $a = 0; + $list = Array(); + + while ( $a < $n ) + { + + $result = $adb->fetchByAssoc($r); + $from = strtotime($result['date_start']); + $to = strtotime($result['due_date']. ' '. $result["time_end"]); + $windowTo = strtotime($endDate->getDBInsertDateTimeValue()); + for($j = $from; $j <= $to; $j=$j+(60*60*24)) + { + + $obj = &new Appointment(); + $temp_start = date("Y-m-d",$j); + $endTime = strtotime($temp_start. ' '. $result['time_start']); + if($endTime > $windowTo) { + break; + } + + $result["date_start"]= $temp_start ; + list($obj->temphour,$obj->tempmin) = explode(":",$result["time_start"]); + if($start_timestamp != $end_timestamp && $view == 'day'){ + if($j == $start_timestamp){ + $result["duration_hours"] = 24 - $obj->temphour; + }elseif($j > $start_timestamp && $j < $end_timestamp){ + list($obj->temphour,$obj->tempmin)= $current_user->start_hour !=''?explode(":",$current_user->start_hour):explode(":","08:00"); + $result["duration_hours"] = 24 - $obj->temphour; + }elseif($j == $end_timestamp){ + list($obj->temphour,$obj->tempmin)= $current_user->start_hour !=''?explode(":",$current_user->start_hour):explode(":","08:00"); + list($ehr,$emin) = explode(":",$result["time_end"]); + $result["duration_hours"] = $ehr - $obj->temphour; + } + } + $obj->readResult($result, $view); + $list[] = $obj; + unset($obj); + + } + $a++; + + } + //Get Recurring events + $q = "SELECT vtiger_activity.*, vtiger_crmentity.*, case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name , vtiger_recurringevents.recurringid, vtiger_recurringevents.recurringdate as date_start ,vtiger_recurringevents.recurringtype,vtiger_groups.groupname from vtiger_activity inner join vtiger_crmentity on vtiger_activity.activityid = vtiger_crmentity.crmid inner join vtiger_recurringevents on vtiger_activity.activityid=vtiger_recurringevents.activityid left join vtiger_groups on vtiger_groups.groupid = vtiger_crmentity.smownerid LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid"; + $q .= getNonAdminAccessControlQuery('Calendar',$current_user); + $q.=" where vtiger_crmentity.deleted = 0 and vtiger_activity.activitytype not in ('Emails','Task') AND (cast(concat(recurringdate, ' ', time_start) as datetime) between ? and ?) "; + + // User Select Customization + $q .= $query_filter_prefix; + // END + + $params = array($startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue()); + + $q .= " ORDER by vtiger_recurringevents.recurringid"; + $r = $adb->pquery($q, $params); + $n = $adb->getRowCount($r); + $a = 0; + while ( $a < $n ) + { + $obj = &new Appointment(); + $result = $adb->fetchByAssoc($r); + list($obj->temphour,$obj->tempmin) = explode(":",$result["time_start"]); + $obj->readResult($result,$view); + $a++; + $list[] = $obj; + unset($obj); + } + + + usort($list,'compare'); + return $list; + } + + + /** To read and set the events value in Appointment Obj + * @param $act_array -- The vtiger_activity array :: Type Array + * @param $view -- The calendar view :: Type String + */ + function readResult($act_array, $view) + { + global $adb,$current_user,$app_strings; + $format_sthour=''; + $format_stmin=''; + $this->description = $act_array["description"]; + $this->eventstatus = getRoleBasesdPickList('eventstatus',$act_array["eventstatus"]); + $this->priority = getRoleBasesdPickList('taskpriority',$act_array["priority"]); + $this->subject = $act_array["subject"]; + $this->activity_type = $act_array["activitytype"]; + $this->duration_hour = $act_array["duration_hours"]; + $this->duration_minute = $act_array["duration_minutes"]; + $this->creatorid = $act_array["smcreatorid"]; + //$this->creator = getUserName($act_array["smcreatorid"]); + $this->assignedto = $act_array["user_name"]; + $this->owner = $act_array["user_name"]; + if(!is_admin($current_user)) + { + if($act_array["smownerid"]!=0 && $act_array["smownerid"] != $current_user->id && $act_array["visibility"] == "Public"){ + $que = "select * from vtiger_sharedcalendar where sharedid=? and userid=?"; + $row = $adb->pquery($que, array($current_user->id, $act_array["smownerid"])); + $no = $adb->getRowCount($row); + if($no > 0) + $this->shared = true; + } + } + $this->image_name = $act_array["activitytype"].".gif"; + if(!empty($act_array["recurringid"]) && !empty($act_array["recurringtype"])) + $this->recurring="Recurring.gif"; + + $this->record = $act_array["activityid"]; + $date = new DateTimeField($act_array["date_start"].' '. $act_array['time_start']); + $eventStartDate = DateTimeField::convertToDBFormat($date->getDisplayDate()); + list($eventStartHour) = explode(':', $date->getDisplayTime()); + list($styear,$stmonth,$stday) = explode("-",$act_array["date_start"]); + list($sthour, $stmin) = explode(':', $act_array['time_start']); + if($act_array["notime"] != 1){ + $st_hour = $eventStartHour; + }else{ + $st_hour = 'notime'; + $act_array["time_start"] = "00:00"; + } + list($eyear,$emonth,$eday) = explode("-",$act_array["due_date"]); + list($end_hour,$end_min) = explode(":",$act_array['time_end']); + + $start_date_arr = Array( + 'min' => $stmin, + 'hour' => $sthour, + 'day' => $stday, + 'month' => $stmonth, + 'year' => $styear + ); + $end_date_arr = Array( + 'min' => $end_min, + 'hour' => $end_hour, + 'day' => $eday, + 'month' => $emonth, + 'year' => $eyear + ); + $this->start_time = new vt_DateTime($start_date_arr,true); + $this->end_time = new vt_DateTime($end_date_arr,true); + if($view == 'day' || $view == 'week') + { + $this->formatted_datetime= DateTimeField::convertToUserFormat($eventStartDate) + .":".$st_hour; + } + elseif($view == 'year') + { + list($year,$month,$date) = explode("-",$eventStartDate); + $this->formatted_datetime = $month; + } + else + { + $this->formatted_datetime= DateTimeField::convertToUserFormat($eventStartDate); + } + return; + } + + +} + +/** To two array values + * @param $a -- The vtiger_activity array :: Type Array + * @param $b -- The vtiger_activity array :: Type Array + * @returns value 0 or 1 or -1 depends on comparision result + */ +function compare($a,$b) +{ + if ($a->start_time->ts == $b->start_time->ts) + { + return 0; + } + return ($a->start_time->ts < $b->start_time->ts) ? -1 : 1; +} +function getRoleBasesdPickList($fldname,$exist_val) +{ + global $adb,$app_strings,$current_user; + $is_Admin = $current_user->is_admin; + if($is_Admin == 'off' && $fldname != '') + { + $roleid=$current_user->roleid; + $roleids = Array(); + $subrole = getRoleSubordinates($roleid); + if(count($subrole)> 0) + $roleids = $subrole; + array_push($roleids, $roleid); + + //here we are checking wheather the table contains the sortorder column .If sortorder is present in the main picklist table, then the role2picklist will be applicable for this table... + + $sql="select * from vtiger_$fldname where $fldname=?"; + $res = $adb->pquery($sql,array(decode_html($exist_val))); + $picklistvalueid = $adb->query_result($res,0,'picklist_valueid'); + if ($picklistvalueid != null) { + $pick_query="select * from vtiger_role2picklist where picklistvalueid=$picklistvalueid and roleid in (". generateQuestionMarks($roleids) .")"; + + $res_val=$adb->pquery($pick_query,array($roleids)); + $num_val = $adb->num_rows($res_val); + } + if($num_val > 0) + $pick_val = $exist_val; + else + $pick_val = $app_strings['LBL_NOT_ACCESSIBLE']; + + + }else + $pick_val = $exist_val; + + return $pick_val; + +} +?> diff --git a/modules/Calendar/Calendar.js b/modules/Calendar/Calendar.js new file mode 100644 index 0000000..e8d3fb8 --- /dev/null +++ b/modules/Calendar/Calendar.js @@ -0,0 +1,123 @@ + +/********************************************************************************* + +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +function set_values(form) { + + if (form.duedate_flag.checked) { + + form.duedate_flag.value='on'; + + form.duedate.value=""; + + form.duetime.value=""; + + form.duedate.readOnly=true; + + form.duetime.readOnly=true; + + document.images.jscal_trigger.width = 0; + + document.images.jscal_trigger.height = 0; + + } + + else { + + form.duedate_flag.value='off'; + + form.duedate.readOnly=false; + + form.duetime.readOnly=false; + + if (form.duetime.readonly) alert (alert_arr.READONLY); + + document.images.jscal_trigger.width = 16; + + document.images.jscal_trigger.height = 16; + + } + +} +function toggleTime() +{ + if(getObj("notime").checked) + { + getObj("notime").value = 'on'; + getObj("duration_hours").disabled = true; + getObj("duration_minutes").disabled = true; + } + else + { + getObj("notime").value = 'off'; + getObj("duration_minutes").disabled = false; + getObj("duration_hours").disabled = false; + } +} + +function toggleAssignType(currType) + +{ + + if (currType=="U") + + { + + getObj("assign_user").style.display="block" + + getObj("assign_team").style.display="none" + + } + + else + + { + + getObj("assign_user").style.display="none" + + getObj("assign_team").style.display="block" + + } + +} + +function showActivityView(selectactivity_view) +{ + //script to reload the page with the view type when the combo values are changed + View_name = selectactivity_view.options[selectactivity_view.options.selectedIndex].value; + document.frmOpenLstView.action = "index.php?module=Home&action=index&activity_view="+View_name; + document.frmOpenLstView.submit(); +} + +function exportCalendar(){ + if(document.getElementsByName('exportCalendar')[0].value == 'iCal'){ + var filename = $('ics_filename').value; + VtigerJS_DialogBox.block(); + + var url = "index.php?module=Calendar&action=iCalExport&filename="+filename; + location.href = url; + VtigerJS_DialogBox.unblock(); + ghide('CalExport') + } +} + +function importCalendar(){ + var file = document.getElementById('ics_file').value; + if (file != '') { + if (file.indexOf('.ics') != (file.length - 4)) { + alert(alert_arr.PLS_SELECT_VALID_FILE+".ics") + } + else { + document.ical_import.action.value='iCalImport'; + document.ical_import.module.value='Calendar'; + document.ical_import.submit(); + } + } +} diff --git a/modules/Calendar/Calendar.php b/modules/Calendar/Calendar.php new file mode 100644 index 0000000..b54dc24 --- /dev/null +++ b/modules/Calendar/Calendar.php @@ -0,0 +1,310 @@ +view = $view; + $this->date_time = new vt_DateTime($data,true); + $this->constructLayout(); + } + /** + * Function to get calendarview Label + * @param string $view - calendarview + * return string - calendarview Label + */ + function getCalendarView($view) + { + switch($view) + { + case 'day': + return "DAY"; + case 'week': + return "WEEK"; + case 'month': + return "MON"; + case 'year': + return "YEAR"; + } + } + + /** + * Function to set values for calendar object depends on calendar view + */ + function constructLayout() + { + global $current_user; + switch($this->view) + { + case 'day': + for($i=-1;$i<=23;$i++) + { + if($i == -1) + { + $layout = new Layout('hour',$this->date_time->getTodayDatetimebyIndex(0)); + $this->day_slice[$layout->start_time->get_formatted_date().':notime'] = $layout; + $this->slices['notime'] = $layout->start_time->get_formatted_date().":notime"; + } + else + { + $layout = new Layout('hour',$this->date_time->getTodayDatetimebyIndex($i)); + $this->day_slice[$layout->start_time->get_formatted_date().':'.$layout->start_time->z_hour] = $layout; + array_push($this->slices, $layout->start_time->get_formatted_date().":".$layout->start_time->z_hour); + } + } + break; + case 'week': + $weekview_days = 7; + for($i=1;$i<=$weekview_days;$i++) + { + $layout = new Layout('day',$this->date_time->getThisweekDaysbyIndex($i)); + $this->week_array[$layout->start_time->get_formatted_date()] = $layout; + + for($h=-1;$h<=23;$h++) + { + if($h == -1) + { + $hour_list = new Layout('hour',$this->date_time->getTodayDatetimebyIndex(0,$layout->start_time->day,$layout->start_time->month,$layout->start_time->year)); + $this->week_slice[$layout->start_time->get_formatted_date().':notime'] = $hour_list; + $this->week_hour_slices['notime'] = $layout->start_time->get_formatted_date().":notime"; + } + else + { + $hour_list = new Layout('hour',$this->date_time->getTodayDatetimebyIndex($h,$layout->start_time->day,$layout->start_time->month,$layout->start_time->year)); + $this->week_slice[$layout->start_time->get_formatted_date().':'.$hour_list->start_time->z_hour] = $hour_list; + array_push($this->week_hour_slices, $layout->start_time->get_formatted_date().":".$hour_list->start_time->z_hour); + } + } + array_push($this->slices, $layout->start_time->get_formatted_date()); + + } + break; + case 'month': + $arr = getCalendarDaysInMonth($this->date_time); + $this->month_array = $arr["month_array"]; + $this->slices = $arr["slices"]; + $this->date_time = $arr["date_time"]; + break; + case 'year': + $this->month_day_slices = Array(); + for($i=0;$i<12;$i++){ + $currMonth = $this->date_time->getThisyearMonthsbyIndex($i); + $layout = new Layout('month',$this->date_time->getThisyearMonthsbyIndex($i)); + $this->year_array[$layout->start_time->z_month] = $layout; + + $arr = getCalendarDaysInMonth($currMonth); + $slices = $arr["slices"]; + + $this->month_day_slices[$i] = $slices; + array_push($this->slices, $layout->start_time->z_month); + } + break; + } + } + + /** + * Function to get date info depends on calendarview + * @param string $type - string 'increment' or 'decrment' + */ + + function get_datechange_info($type) + { + if($type == 'next') + $mode = 'increment'; + if($type == 'prev') + $mode = 'decrment'; + switch($this->view) + { + case 'day': + $day = $this->date_time->get_changed_day($mode); + break; + case 'week': + $day = $this->date_time->get_first_day_of_changed_week($mode); + break; + case 'month': + $day = $this->date_time->get_first_day_of_changed_month($mode); + break; + case 'year': + $day = $this->date_time->get_first_day_of_changed_year($mode); + break; + default: + return "view is not supported"; + } + return $day->get_date_str(); + } + + /** + * Function to get activities + * @param array $current_user - user data + * @param string $free_busy - + */ + function add_Activities($current_user,$free_busy='') + { + if(isset($current_user->start_hour) && $current_user->start_hour !='') + { + list($sthour,$stmin)= explode(":",$current_user->start_hour); + $hr = $sthour+0; + $this->day_start_hour=$hr; + } + else + { + $this->day_start_hour=8; + } + if(isset($current_user->end_hour) && $current_user->end_hour !='') + { + list($endhour,$endmin)=explode(":",$current_user->end_hour); + $endhour = $endhour+0; + $this->day_end_hour=$endhour; + } + else + { + $this->day_end_hour=23; + } + if ( $this->view == 'week'){ + $start_datetime = $this->date_time->getThisweekDaysbyIndex(1); + $end_datetime = $this->date_time->getThisweekDaysbyIndex(7); + } elseif($this->view == 'month') { + $start_datetime = $this->date_time->getThismonthDaysbyIndex(0); + $end_datetime = $this->date_time->getThismonthDaysbyIndex($this->date_time->daysinmonth-1); + } elseif($this->view == 'year'){ + $start_datetime = $this->date_time->getThisyearMonthsbyIndex(0); + $end_datetime = $this->date_time->get_first_day_of_changed_year('increment'); + }else { + $start_datetime = $this->date_time; + $end_datetime = $this->date_time->getTodayDatetimebyIndex(23); + } + + $activities = Array(); + $activities = Appointment::readAppointment($current_user->id,$start_datetime,$end_datetime,$this->view); + if(!empty($activities)) + { + foreach($activities as $key=>$value) + { + if($this->view == 'day') + { + if(empty($this->day_slice[$value->formatted_datetime]->activities)) { + $this->day_slice[$value->formatted_datetime]->activities = array(); + } + array_push($this->day_slice[$value->formatted_datetime]->activities, $value); + } + elseif($this->view == 'week') + { + if(empty($this->week_slice[$value->formatted_datetime]->activities)) { + $this->week_slice[$value->formatted_datetime]->activities = array(); + } + array_push($this->week_slice[$value->formatted_datetime]->activities, $value); + } + elseif($this->view == 'month') + { + if(empty($this->month_array[$value->formatted_datetime]->activities)) { + $this->month_array[$value->formatted_datetime]->activities = array(); + } + array_push($this->month_array[$value->formatted_datetime]->activities,$value); + } + elseif($this->view == 'year') + { + if(empty($this->year_array[$value->formatted_datetime]->activities)) { + $this->year_array[$value->formatted_datetime]->activities = array(); + } + array_push($this->year_array[$value->formatted_datetime]->activities,$value); + } + else + die("view:".$this->view." is not defined"); + + } + } + + } +} + +class Layout +{ + var $view = 'day'; + var $start_time; + var $end_time; + var $activities = Array(); + + /** + * Constructor for Layout class + * @param string $view - calendarview + * @param string $time - time string + */ + + function Layout($view,$time) + { + $this->view = $view; + $this->start_time = $time; + if ( $view == 'month') + $this->end_time = $this->start_time->getMonthendtime(); + if ( $view == 'day') + $this->end_time = $this->start_time->getDayendtime(); + if ( $view == 'hour') + $this->end_time = $this->start_time->getHourendtime(); + } + + /** + * Function to get view + * return currentview + */ + + function getView() + { + return $this->view; + } +} + +/** + * this function returns the days in a month in an array format + * @param object $date_time - the date time object for the current month + * @return array $result - the array containing current months days information + */ +function getCalendarDaysInMonth($date_time){ + global $current_user; + $month_array = array(); + $slices = array(); + $monthview_days = $date_time->daysinmonth; + + $firstday_of_month = $date_time->getThisMonthsDayByIndex(0); + $fdom = $firstday_of_month; + + $num_of_prev_days = ($fdom->dayofweek+7)%7-1; + for($i=-$num_of_prev_days;$i<42;$i++){ + $pd = $date_time->getThisMonthsDayByIndex($i); + + $layout = new Layout('day', $pd); + $date = $layout->start_time->get_formatted_date(); + $month_array[$date] = $layout; + array_push($slices, $date); + } + + $result = array("month_array"=>$month_array, "slices"=>$slices, "date_time"=>$date_time); + return $result; +} +?> \ No newline at end of file diff --git a/modules/Calendar/Calendar.png b/modules/Calendar/Calendar.png new file mode 100644 index 0000000..d856443 Binary files /dev/null and b/modules/Calendar/Calendar.png differ diff --git a/modules/Calendar/CalendarAjax.php b/modules/Calendar/CalendarAjax.php new file mode 100644 index 0000000..ce66087 --- /dev/null +++ b/modules/Calendar/CalendarAjax.php @@ -0,0 +1,13 @@ + diff --git a/modules/Calendar/CalendarCommon.php b/modules/Calendar/CalendarCommon.php new file mode 100644 index 0000000..55969ae --- /dev/null +++ b/modules/Calendar/CalendarCommon.php @@ -0,0 +1,590 @@ +pquery($query, array($id)); + $rows = $adb->num_rows($result); + for($j=0;$j<$rows;$j++) + { + + $id = $adb->query_result($result,$j,'sharedid'); + $sharedname = getFullNameFromQResult($result, $j, 'Users'); + $sharedid[$id]=$sharedname; + + } + return $sharedid; +} + +/** + * To get the lists of vtiger_users id who shared their calendar with specified user + * @param $sharedid -- The shared user id :: Type integer + * @returns $shared_ids -- a comma seperated vtiger_users id :: Type string + */ +function getSharedCalendarId($sharedid) +{ + global $adb; + $query = "SELECT * from vtiger_sharedcalendar where sharedid=?"; + $result = $adb->pquery($query, array($sharedid)); + if($adb->num_rows($result)!=0) + { + for($j=0;$j<$adb->num_rows($result);$j++) + $userid[] = $adb->query_result($result,$j,'userid'); + $shared_ids = implode (",",$userid); + } + return $shared_ids; +} + +/** + * To get userid and username of all vtiger_users except the current user + * @param $id -- The user id :: Type integer + * @returns $user_details -- Array in the following format: + * $user_details=Array($userid1=>$username, $userid2=>$username,............,$useridn=>$username); + */ +function getOtherUserName($id) +{ + global $adb; + $user_details=Array(); + $query="select * from vtiger_users where deleted=0 and status='Active' and id!=?"; + $result = $adb->pquery($query, array($id)); + $num_rows=$adb->num_rows($result); + for($i=0;$i<$num_rows;$i++) + { + $userid=$adb->query_result($result,$i,'id'); + $username = getFullNameFromQResult($result, $i, 'Users'); + $user_details[$userid]=$username; + } + return $user_details; +} + +/** + * To get userid and username of vtiger_users in hierarchy level + * @param $id -- The user id :: Type integer + * @returns $user_details -- Array in the following format: + * $user_details=Array($userid1=>$username, $userid2=>$username,............,$useridn=>$username); + */ + +function getSharingUserName($id) +{ + global $adb,$current_user; + $user_details=Array(); + $assigned_user_id = $current_user->id; + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + if($is_admin==false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[getTabid('Calendar')] == 3 or $defaultOrgSharingPermission[getTabid('Calendar')] == 0)) + { + $role_seq = implode($parent_roles, "::"); + $query = "select id as id,user_name as user_name from vtiger_users where id=? and status='Active' union select vtiger_user2role.userid as id,vtiger_users.user_name as user_name from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like ? and status='Active' union select shareduserid as id,vtiger_users.user_name as user_name from vtiger_tmp_write_user_sharing_per inner join vtiger_users on vtiger_users.id=vtiger_tmp_write_user_sharing_per.shareduserid where status='Active' and vtiger_tmp_write_user_sharing_per.userid=? and vtiger_tmp_write_user_sharing_per.tabid=9"; + $params = array($current_user->id, $role_seq."::%", $current_user->id); + if (!empty($assigned_user_id)) { + $query .= " OR id=?"; + array_push($params, $assigned_user_id); + } + $query .= " order by user_name ASC"; + $result = $adb->pquery($query, $params, true, "Error filling in user array: "); + while($row = $adb->fetchByAssoc($result)) + { + $temp_result[$row['id']] = $row['user_name']; + } + $user_details = &$temp_result; + unset($user_details[$id]); + } + else + { + $user_details = get_user_array(FALSE, "Active", $id); + unset($user_details[$id]); + } + return $user_details; +} + +/** + * To get hour,minute and format + * @param $starttime -- The date&time :: Type string + * @param $endtime -- The date&time :: Type string + * @param $format -- The format :: Type string + * @returns $timearr :: Type Array +*/ +function getaddEventPopupTime($starttime,$endtime,$format) +{ + $timearr = Array(); + list($sthr,$stmin) = explode(":",$starttime); + list($edhr,$edmin) = explode(":",$endtime); + if($format == 'am/pm') + { + $hr = $sthr+0; + $timearr['startfmt'] = ($hr >= 12) ? "pm" : "am"; + if($hr == 0) $hr = 12; + $timearr['starthour'] = twoDigit(($hr>12)?($hr-12):$hr); + $timearr['startmin'] = $stmin; + + $edhr = $edhr+0; + $timearr['endfmt'] = ($edhr >= 12) ? "pm" : "am"; + if($edhr == 0) $edhr = 12; + $timearr['endhour'] = twoDigit(($edhr>12)?($edhr-12):$edhr); + $timearr['endmin'] = $edmin; + return $timearr; + } + if($format == '24') + { + $timearr['starthour'] = twoDigit($sthr); + $timearr['startmin'] = $stmin; + $timearr['startfmt'] = ''; + $timearr['endhour'] = twoDigit($edhr); + $timearr['endmin'] = $edmin; + $timearr['endfmt'] = ''; + return $timearr; + } +} + +/** + *To construct time select combo box + *@param $format -- the format :: Type string + *@param $bimode -- The mode :: Type string + *constructs html select combo box for time selection + *and returns it in string format. + */ +function getTimeCombo($format,$bimode,$hour='',$min='',$fmt='',$todocheck=false) +{ + global $mod_strings; + $combo = ''; + $min = $min - ($min%5); + if($bimode == 'start' && !$todocheck) + $jsfn = 'onChange="changeEndtime_StartTime(document.EditView.activitytype.value);"'; + else + $jsfn = null; + if($format == 'am/pm') + { + $combo .= ' '; + $combo .= ' '; + $combo .= ''; + } + else + { + $combo .= ''.$mod_strings[LBL_HR].' '; + $combo .= ' '.$mod_strings[LBL_MIN].''; + } + return $combo; +} + +/** + *Function to construct HTML select combo box + *@param $fieldname -- the field name :: Type string + *@param $tablename -- The table name :: Type string + *constructs html select combo box for combo field + *and returns it in string format. + */ + +function getActFieldCombo($fieldname,$tablename) +{ + global $adb, $mod_strings,$current_user; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + $combo = ''; + $js_fn = ''; + if($fieldname == 'eventstatus') + $js_fn = 'onChange = "getSelectedStatus();"'; + $combo .= ''; + return $combo; +} + +/*Fuction to get value for Assigned To field + *returns values of Assigned To field in array format +*/ +function getAssignedTo($tabid) +{ + global $current_user,$noof_group_rows,$adb; + $assigned_user_id = $current_user->id; + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + if($is_admin==false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[$tabid] == 3 or $defaultOrgSharingPermission[$tabid] == 0)) + { + $result=get_current_user_access_groups('Calendar'); + } + else + { + $result = get_group_options(); + } + if($result) $nameArray = $adb->fetch_array($result); + + if($is_admin==false && $profileGlobalPermission[2] == 1 && ($defaultOrgSharingPermission[$tabid] == 3 or $defaultOrgSharingPermission[$tabid] == 0)) + { + $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id,'private'), $assigned_user_id); + } + else + { + $users_combo = get_select_options_array(get_user_array(FALSE, "Active", $assigned_user_id), $assigned_user_id); + } + if($noof_group_rows!=0) + { + do + { + $groupname=$nameArray["groupname"]; + $group_option[] = array($groupname=>$selected); + + }while($nameArray = $adb->fetch_array($result)); + } + $fieldvalue[]=$users_combo; + $fieldvalue[] = $group_option; + return $fieldvalue; +} + +//Code Added by Minnie -Ends +/** + * Function to get the vtiger_activity details for mail body + * @param string $description - activity description + * @param string $from - to differenciate from notification to invitation. + * return string $list - HTML in string format + */ +function getActivityDetails($description,$user_id,$from='') +{ + global $log,$current_user,$current_language; + global $adb; + require_once 'include/utils/utils.php'; + $mod_strings = return_module_language($current_language, 'Calendar'); + $log->debug("Entering getActivityDetails(".$description.") method ..."); + $updated = $mod_strings['LBL_UPDATED']; + $created = $mod_strings['LBL_CREATED']; + $reply = (($description['mode'] == 'edit')?"$updated":"$created"); + if($description['activity_mode'] == "Events") + { + $end_date_lable=$mod_strings['End date and time']; + } + else + { + $end_date_lable=$mod_strings['Due Date']; + } + + $name = getUserFullName($user_id); + + if($from == "invite") + $msg = getTranslatedString($mod_strings['LBL_ACTIVITY_INVITATION']); + else + $msg = getTranslatedString($mod_strings['LBL_ACTIVITY_NOTIFICATION']); + + $current_username = getUserFullName($current_user->id); + $status = getTranslatedString($description['status'],'Calendar'); + $list = $name.','; + $list .= '

'.$msg.' '.$reply.'.
'.$mod_strings['LBL_DETAILS_STRING'].':
'; + $list .= '
      '.$mod_strings["LBL_SUBJECT"].' : '.$description['subject']; + $list .= '
      '.$mod_strings["Start date and time"].' : '.$description['st_date_time'] .' '.DateTimeField::getDBTimeZone(); + $list .= '
      '.$end_date_lable.' : '.$description['end_date_time'].' '.DateTimeField::getDBTimeZone(); + $list .= '
      '.$mod_strings["LBL_STATUS"].': '.$status; + $list .= '
      '.$mod_strings["Priority"].': '.getTranslatedString($description['taskpriority']); + $list .= '
      '.$mod_strings["Related To"].': '.getTranslatedString($description['relatedto']); + if(!empty($description['contact_name'])) + { + $list .= '
      '.$mod_strings["LBL_CONTACT_LIST"].' '.$description['contact_name']; + } + else + $list .= '
      '.$mod_strings["Location"].' : '.$description['location']; + + $list .= '
      '.$mod_strings["LBL_APP_DESCRIPTION"].': '.$description['description']; + $list .= '

'.$mod_strings["LBL_REGARDS_STRING"].' ,'; + $list .= '
'.$current_username.'.'; + + $log->debug("Exiting getActivityDetails method ..."); + return $list; +} + +function twoDigit( $no ){ + if($no < 10 && strlen(trim($no)) < 2) return "0".$no; + else return "".$no; +} + +function timeString($datetime,$fmt){ + + $timeStr = formatUserTimeString($datetime, $fmt); + $date = new DateTimeField($timeStr); + list($h, $m) = explode(':', $date->getDisplayTime()); + $timeStr = formatUserTimeString(array('hour'=>$h, 'minute'=>$m), $fmt); + return $timeStr; +} + +/** + * + * @param type $datetime + * @param type $fmt + * @return Date + */ +function formatUserTimeString($datetime,$fmt){ + + if(is_object($datetime)){ + $hr = $datetime->hour; + $min = $datetime->minute; + } else { + $hr = $datetime['hour']; + $min = $datetime['minute']; + } + $timeStr = ""; + if($fmt != 'am/pm'){ + $timeStr .= twoDigit($hr).":".twoDigit($min); + }else{ + $am_pm = array('AM', 'PM'); + $hour = twoDigit($hr%12); + if($hour == 0) { + $hour = 12; + } + $timeStr = $hour.':'.twoDigit($min).$am_pm[($hr/12)%2]; + } + return $timeStr; +} + +function sendInvitation($inviteesid,$mode,$subject,$desc) +{ + global $current_user,$mod_strings; + require_once("modules/Emails/mail.php"); + $invites=$mod_strings['INVITATION']; + $invitees_array = explode(';',$inviteesid); + $subject = $invites.' : '.$subject; + $record = $focus->id; + foreach($invitees_array as $inviteeid) + { + if($inviteeid != '') + { + $description=getActivityDetails($desc,$inviteeid,"invite"); + $to_email = getUserEmailId('id',$inviteeid); + send_mail('Calendar',$to_email,$current_user->user_name,'',$subject,$description); + } + } + +} + +function getActivityMailInfo($return_id,$status,$activity_type) +{ + $mail_data = Array(); + global $adb; + $qry = "select * from vtiger_activity where activityid=?"; + $ary_res = $adb->pquery($qry, array($return_id)); + $send_notification = $adb->query_result($ary_res,0,"sendnotification"); + $subject = $adb->query_result($ary_res,0,"subject"); + $priority = $adb->query_result($ary_res,0,"priority"); + $st_date = $adb->query_result($ary_res,0,"date_start"); + $st_time = $adb->query_result($ary_res,0,"time_start"); + $end_date = $adb->query_result($ary_res,0,"due_date"); + $end_time = $adb->query_result($ary_res,0,"time_end"); + $location = $adb->query_result($ary_res,0,"location"); + + if(!empty($st_time)){ + $date = new DateTimeField($st_date.' '.$st_time); + $st_date = $date->getDisplayDate(); + $st_time = $date->getDisplayTime(); + } + + if(!empty($end_time)){ + $date = new DateTimeField($end_date.' '.$end_time); + $end_date = $date->getDisplayDate(); + $end_time = $date->getDisplayTime(); + } + + $owner_qry = "select smownerid from vtiger_crmentity where crmid=?"; + $res = $adb->pquery($owner_qry, array($return_id)); + $owner_id = $adb->query_result($res,0,"smownerid"); + + $usr_res = $adb->pquery("select count(*) as count from vtiger_users where id=?",array($owner_id)); + if($adb->query_result($usr_res, 0, 'count')>0) { + $assignType = "U"; + $usr_id = $owner_id; + } + else { + $assignType = "T"; + $group_qry = "select groupname from vtiger_groups where groupid=?"; + $grp_res = $adb->pquery($group_qry, array($owner_id)); + $grp_name = $adb->query_result($grp_res,0,"groupname"); + } + + $desc_qry = "select description from vtiger_crmentity where crmid=?"; + $des_res = $adb->pquery($desc_qry, array($return_id)); + $description = $adb->query_result($des_res,0,"description"); + + + $rel_qry = "select case vtiger_crmentity.setype when 'Leads' then vtiger_leaddetails.lastname when 'Accounts' then vtiger_account.accountname when 'Potentials' then vtiger_potential.potentialname when 'Quotes' then vtiger_quotes.subject when 'PurchaseOrder' then vtiger_purchaseorder.subject when 'SalesOrder' then vtiger_salesorder.subject when 'Invoice' then vtiger_invoice.subject when 'Campaigns' then vtiger_campaign.campaignname when 'HelpDesk' then vtiger_troubletickets.title end as relname from vtiger_seactivityrel inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_seactivityrel.crmid left join vtiger_leaddetails on vtiger_leaddetails.leadid = vtiger_seactivityrel.crmid left join vtiger_account on vtiger_account.accountid=vtiger_seactivityrel.crmid left join vtiger_potential on vtiger_potential.potentialid=vtiger_seactivityrel.crmid left join vtiger_quotes on vtiger_quotes.quoteid= vtiger_seactivityrel.crmid left join vtiger_purchaseorder on vtiger_purchaseorder.purchaseorderid = vtiger_seactivityrel.crmid left join vtiger_salesorder on vtiger_salesorder.salesorderid = vtiger_seactivityrel.crmid left join vtiger_invoice on vtiger_invoice.invoiceid = vtiger_seactivityrel.crmid left join vtiger_campaign on vtiger_campaign.campaignid = vtiger_seactivityrel.crmid left join vtiger_troubletickets on vtiger_troubletickets.ticketid = vtiger_seactivityrel.crmid where vtiger_seactivityrel.activityid=?"; + $rel_res = $adb->pquery($rel_qry, array($return_id)); + $rel_name = $adb->query_result($rel_res,0,"relname"); + + $relatedContacts = getActivityRelatedContacts($return_id); + + $mail_data['mode'] = "edit"; + $mail_data['activity_mode'] = $activity_type; + $mail_data['sendnotification'] = $send_notification; + $mail_data['user_id'] = $usr_id; + $mail_data['subject'] = $subject; + $mail_data['status'] = $status; + $mail_data['taskpriority'] = $priority; + $mail_data['relatedto'] = $rel_name; + $mail_data['contact_name'] = implode(',', $relatedContacts); + $mail_data['description'] = $description; + $mail_data['assign_type'] = $assignType; + $mail_data['group_name'] = $grp_name; + $value = getaddEventPopupTime($st_time,$end_time,'24'); + $start_hour = $value['starthour'].':'.$value['startmin'].''.$value['startfmt']; + if($activity_type != 'Task' ) + $end_hour = $value['endhour'] .':'.$value['endmin'].''.$value['endfmt']; + $date = new DateTimeField($st_date." ".$start_hour); + $endDate = new DateTimeField($end_date." ".$end_hour); + $mail_data['st_date_time'] = $date->getDBInsertDateTimeValue(); + $mail_data['end_date_time'] = $endDate->getDBInsertDateValue().' '. + $endDate->getDBInsertTimeValue(); + $mail_data['location']=$location; + return $mail_data; + + +} + +// User Select Customization +/** + * Function returns the id of the User selected by current user in the picklist of the ListView or Calendar view of Current User + * return String - Id of the user that the current user has selected + */ +function calendarview_getSelectedUserId() { + global $current_user, $default_charset; + $only_for_user = htmlspecialchars(strip_tags($_REQUEST['onlyforuser']),ENT_QUOTES,$default_charset); + if($only_for_user == '') $only_for_user = $current_user->id; + return $only_for_user; +} + +function calendarview_getSelectedUserFilterQuerySuffix() { + global $current_user, $adb; + $only_for_user = calendarview_getSelectedUserId(); + $qcondition = ''; + if(!empty($only_for_user)) { + if($only_for_user != 'ALL') { + // For logged in user include the group records also. + if($only_for_user == $current_user->id) { + $user_group_ids = fetchUserGroupids($current_user->id); + // User does not belong to any group? Let us reset to non-existent group + if(!empty($user_group_ids)) $user_group_ids .= ','; + else $user_group_ids = ''; + $user_group_ids .= $current_user->id; + $qcondition = " AND vtiger_crmentity.smownerid IN (" . $user_group_ids .")"; + } else { + $qcondition = " AND vtiger_crmentity.smownerid = " . $adb->sql_escape_string($only_for_user); + } + } + } + return $qcondition; +} + +/** + * Function returns the data of the user selected by current user in the picklist of the ListView or Calendar view of Current User + * @param $useridInUse - The Id of the user that the Current User has selected in dropdown picklist in Calendar modules listview or Calendar View + * return string - The array of the events for the user that the current user has selected + */ +function calendarview_getUserSelectOptions($useridInUse) { + global $adb, $app_strings, $current_user, $mod_strings; + $users = $adb->query("SELECT id,user_name FROM vtiger_users WHERE status = 'Active' and deleted = 0"); + $userscount = $adb->num_rows($users); + + $userSelectdata = "" . $app_strings['LBL_LIST_OF'] . " : "; + $userSelectdata .=""; + return $userSelectdata; +} +// END + +?> diff --git a/modules/Calendar/CustomView.php b/modules/Calendar/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/Calendar/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/Calendar/Date.php b/modules/Calendar/Date.php new file mode 100644 index 0000000..35d19a9 --- /dev/null +++ b/modules/Calendar/Date.php @@ -0,0 +1,537 @@ +setDateTime(null); + } + else if ( isset( $timearr['ts'])) + { + $this->setDateTime($time['ts']); + } + else + { + if(isset($timearr['hour']) && $timearr['hour'] !== '') + { + $this->hour = $timearr['hour']; + } + if(isset($timearr['min']) && $timearr['min'] !== '') + { + $this->minute = $timearr['min']; + } + if(isset($timearr['sec']) && $timearr['sec'] !== '') + { + $this->second = $timearr['sec']; + } + if(isset($timearr['day']) && $timearr['day'] !== '') + { + $this->day = $timearr['day']; + } + if(isset($timearr['week']) && $timearr['week'] !== '') + { + $this->week = $timearr['week']; + } + if(isset($timearr['month']) && $timearr['month'] !== '') + { + $this->month = $timearr['month']; + } + if(isset($timearr['year']) && $timearr['year'] >= 1970) + { + $this->year = $timearr['year']; + } + else + { + return null; + } + } + if ($check) + { + $this->getDateTime(); + } + } + + /** + * function to get date and time using index + * @param integer $index - number between 0 to 23 + * @param string $day - date + * @param string $month - month + * @param string $year - year + * return vt_DateTime obj $datetimevalue + */ + function getTodayDatetimebyIndex($index,$day='', $month='', $year=''){ + if($day === '') + $day = $this->day; + if($month === '') + $month = $this->month; + if($year === '') + $year = $this->year; + $day_array = array(); + + if($index < 0 || $index > 23){ + die("hour is invalid"); + } + + $day_array['hour'] = $index; + $day_array['min'] = 0; + $day_array['day'] = $day; + $day_array['month'] = $month; + $day_array['year'] = $year; + $datetimevalue = new vt_DateTime($day_array,true); + return $datetimevalue; + } + + /** + * function to get days in week using index + * @param integer $index - number between 1 to 7 + * return vt_DateTime obj $datetimevalue + */ + function getThisweekDaysbyIndex($index){ + $week_array = array(); + if($index < 1 || $index > 7){ + die("day is invalid"); + } + $week_array['day'] = $this->day + ($index - $this->dayofweek); + $week_array['month'] = $this->month; + $week_array['year'] = $this->year; + $datetimevalue = new vt_DateTime($week_array,true); + return $datetimevalue; + } + + /** + * function to get days in month using index + * + * This function will be deprecated. + * The newer version is getThisMonthsDayByIndex() and should be used wherever possible + * + * @param integer $index - number between 0 to 42 + * @param string $day - date + * @param string $month - month + * @param string $year - year + * return vt_DateTime obj $datetimevalue + */ + + function getThismonthDaysbyIndex($index,$day='', $month='', $year='') + { + if($day == '') + $day = $index+1; + if($month == '') + $month = $this->month; + if($year == '') + $year = $this->year; + $month_array = array(); + $month_array['day'] = $day; + $month_array['month'] = $month; + $month_array['year'] = $year; + $datetimevalue = new vt_DateTime($month_array,true); + return $datetimevalue; + } + + /** + * function to get months in year using index + * @param integer $index - number between 0 to 11 + * return vt_DateTime obj $datetimevalue + */ + + function getThisyearMonthsbyIndex($index) + { + $year_array = array(); + $year_array['day'] = 1; + if($index < 0 || $index > 11) + { + die("month is invalid"); + } + $year_array['month'] = $index+1; + $year_array['year'] = $this->year; + $datetimevalue = new vt_DateTime($year_array,true); + return $datetimevalue; + } + + /** + * function to get hour end time + * return vt_DateTime obj $datetimevalue + */ + + function getHourendtime() + { + $date_array = array(); + $date_array['hour'] = $this->hour; + $date_array['min'] = 59; + $date_array['day'] = $this->day; + $date_array['sec'] = 59; + $date_array['month'] = $this->month; + $date_array['year'] = $this->year; + $datetimevalue = new vt_DateTime($date_array,true); + return $datetimevalue; + } + + /** + * function to get day end time + * return vt_DateTime obj $datetimevalue + */ + function getDayendtime() + { + $date_array = array(); + $date_array['hour'] = 23; + $date_array['min'] = 59; + $date_array['sec'] = 59; + $date_array['day'] = $this->day; + $date_array['month'] = $this->month; + $date_array['year'] = $this->year; + $datetimevalue = new vt_DateTime($date_array,true); + return $datetimevalue; + } + + /** + * function to get month end time + * return vt_DateTime obj $datetimevalue + */ + function getMonthendtime() + { + $date_array = array(); + $date_array['hour'] = 23; + $date_array['min'] = 59; + $date_array['sec'] = 59; + $date_array['day'] = $this->daysinmonth; + $date_array['month'] = $this->month; + $date_array['year'] = $this->year; + $datetimevalue = new vt_DateTime($date_array,true); + return $datetimevalue; + } + + /** + * function to get day of week + * return string $this->day - day (eg: Monday) + */ + function get_Date() + { + return $this->day; + } + + /** + * function to get month name in short + * return string $this->month_inshort - month name (eg: Jan) + */ + function getmonthName_inshort(){ + return $this->month_inshort; + } + /** + * function to get month + * return string $this->month - month name + */ + function getMonth(){ + return $this->month; + } + /** + * function to get year + */ + function getYear() { + return $this->year; + } + /** + * function to get the number of days in a month + */ + function getDaysInMonth() { + return $this->daysinmonth; + } + /** + * function to get month name + * return string $this->month_inlong - month name + */ + function getmonthName(){ + return $this->month_inlong; + } + + /** + * function to get day of week + * return string $this->dayofweek_inlong - day of week + */ + function getdayofWeek(){ + return $this->dayofweek_inlong; + } + /** + * function to get day of week in short + * return string $this->dayofweek_inshort - day of week (eg: Mon) + */ + + function getdayofWeek_inshort(){ + return $this->dayofweek_inshort; + } + + /** + * function to set values for vt_DateTime object + * @param integer $ts - Time stamp + */ + function setDateTime($ts){ + global $mod_strings; + if (empty($ts)){ + $ts = time(); + } + + $this->ts = $ts; + $this->ts_def = $this->ts; + $date_string = date('i::G::H::j::d::t::N::z::L::W::n::m::Y::Z::T::s',$ts); + + list($this->minute,$this->hour,$this->z_hour,$this->day,$this->z_day,$this->daysinmonth,$this->dayofweek,$this->dayofyear,$is_leap,$this->week,$this->month,$this->z_month,$this->year,$this->offset,$this->tz,$this->second) = explode('::',$date_string); + + $this->dayofweek_inshort =$mod_strings['cal_weekdays_short'][$this->dayofweek-1]; + $this->dayofweek_inlong=$mod_strings['cal_weekdays_long'][$this->dayofweek-1]; + $this->month_inshort=$mod_strings['cal_month_short'][$this->month]; + $this->month_inlong=$mod_strings['cal_month_long'][$this->month]; + + $this->daysinyear = 365; + + if ($is_leap == 1){ + $this->daysinyear += 1; + } + } + + /** + * function to get values from vt_DateTime object + */ + function getDateTime() + { + global $mod_strings; + $hour = 0; + $minute = 0; + $second = 0; + $day = 1; + $month = 1; + $year = 1970; + + if ( isset($this->second) && $this->second !== ''){ + $second = $this->second; + } + if ( isset($this->minute) && $this->minute !== ''){ + $minute = $this->minute; + } + if ( isset($this->hour) && $this->hour !== '') + { + $hour = $this->hour; + } + if ( isset($this->day) && $this->day !== ''){ + $day= $this->day; + } + if ( isset($this->month) && $this->month !== ''){ + $month = $this->month; + } + + if ( isset($this->year) && $this->year !== ''){ + $year = $this->year; + }else{ + die("year was not set"); + } + if(empty($hour) && $hour !== 0) $hour = 0; + $this->ts = mktime($hour,$minute,$second,$month,$day,$year); + $this->setDateTime($this->ts); + } + + /** + * function to get mysql formatted date + * return formatted date in string format + */ + function get_formatted_date(){ + $date = $this->year."-".$this->z_month."-".$this->z_day; + return DateTimeField::convertToUserFormat($date); + } + + /** + * + * @return Date + */ + function get_DB_formatted_date() { + return $this->year."-".$this->z_month."-".$this->z_day; + } + + /** + * function to get mysql formatted time + * return formatted time in string format + */ + function get_formatted_time(){ + $hour = $this->z_hour; + $min = $this->min; + if(empty($hour)) $hour = '00'; + if(empty($min)) $min = '00'; + return $hour.':'.$min; + } + + /** + * function to get date depends on mode value + * @param string $mode - 'increment' or 'decrement' + * return vt_DateTime obj + */ + function get_changed_day($mode){ + if($mode == 'increment') + $day = $this->day + 1; + else + $day = $this->day - 1; + $date_data = array('day'=>$day, + 'month'=>$this->month, + 'year'=>$this->year + ); + return new vt_DateTime($date_data,true); + } + + /** + * function to get changed week depends on mode value + * @param string $mode - 'increment' or 'decrement' + * return vt_DateTime obj + */ + function get_first_day_of_changed_week($mode){ + $first_day = $this->getThisweekDaysbyIndex(1); + if($mode == 'increment') + $day = $first_day->day + 7; + else + $day = $first_day->day - 7; + $date_data = array('day'=>$day, + 'month'=>$first_day->month, + 'year'=>$first_day->year + ); + return new vt_DateTime($date_data,true); + } + + /** + * function to get month depends on mode value + * @param string $mode - 'increment' or 'decrement' + * return vt_DateTime obj + */ + function get_first_day_of_changed_month($mode){ + $tmpDate['day'] = $this->day; + $tmpDate['month'] = $this->month; + $tmpDate['year'] = $this->year; + + if(is_array($arr) && !empty($arr)){ + $tmpDate['year'] = $arr[0]; + $tmpDate['month'] = $arr[1]; + $tmpDate['day'] = $arr[2]; + } + + if($mode == 'increment'){ + $month = $tmpDate['month'] + 1; + $year = $tmpDate['year'] ; + }else{ + if($tmpDate['month'] == 1){ + $month = 12; + $year = $tmpDate['year'] - 1; + }else{ + $month = $tmpDate['month'] - 1; + $year = $tmpDate['year'] ; + } + } + $date_data = array( + 'day'=>1, + 'month'=>$month, + 'year'=>$year + ); + + return new vt_DateTime($date_data,true); + } + + /** + * function to get year depends on mode value + * @param string $mode - 'increment' or 'decrement' + * return vt_DateTime obj + */ + function get_first_day_of_changed_year($mode){ + if($mode == 'increment'){ + $year = $this->year + 1; + }else{ + $year = $this->year - 1; + } + $date_data = array('day'=>1, + 'month'=>1, + 'year'=>$year + ); + return new vt_DateTime($date_data,true); + } + + /** + * function to get date string + * return date string + */ + function get_date_str(){ + $array = Array(); + if ( isset( $this->hour) && $this->hour != '') + { + array_push( $array, "hour=".$this->hour); + } + if ( isset( $this->day) && $this->day != '') + { + array_push( $array, "day=".$this->day); + } + if ( isset( $this->month) && $this->month) + { + array_push( $array, "month=".$this->month); + } + if ( isset( $this->year) && $this->year != '') + { + array_push( $array, "year=".$this->year); + } + return ("&".implode('&',$array)); + } + + /** + * function to get days in month using index + * + * This is the newer version of the function getThismonthDaysbyIndex(). + * This should be used whereever possible + * + * @param integer $index - number between 0 to 42 + * @param string $day - date + * @param string $month - month + * @param string $year - year + * return vt_DateTime obj $datetimevalue + */ + + function getThisMonthsDayByIndex($index){ + $day = $index; + $month = $this->month; + $year = $this->year; + $month_array = array(); + $month_array['day'] = $day; + $month_array['month'] = $month; + $month_array['year'] = $year; + $datetimevalue = new vt_DateTime($month_array,true); + return $datetimevalue; + } +} +?> diff --git a/modules/Calendar/Delete.php b/modules/Calendar/Delete.php new file mode 100644 index 0000000..e1017d8 --- /dev/null +++ b/modules/Calendar/Delete.php @@ -0,0 +1,36 @@ + \ No newline at end of file diff --git a/modules/Calendar/DetailView.php b/modules/Calendar/DetailView.php new file mode 100644 index 0000000..80ab471 --- /dev/null +++ b/modules/Calendar/DetailView.php @@ -0,0 +1,311 @@ +'. $mod_strings{"LBL_NOTIFICATION_ERROR"}.'

'; +} +session_unregister('mail_send_error'); + +$focus = CRMEntity::getInstance($currentModule); +$smarty = new vtigerCRM_Smarty(); +$activity_mode = vtlib_purify($_REQUEST['activity_mode']); +//If activity_mode == null + +if($activity_mode =='' || strlen($activity_mode) < 1) +{ + $query = "select activitytype from vtiger_activity where activityid=?"; + $result = $adb->pquery($query, array($_REQUEST['record'])); + $actType = $adb->query_result($result,0,'activitytype'); + if( $actType == 'Task') + { + $activity_mode = $actType; + } + elseif($actType != 'Emails') + { + $activity_mode = 'Events'; + } +} + +if($activity_mode == 'Task') +{ + $tab_type = 'Calendar'; + $smarty->assign("SINGLE_MOD",$mod_strings['LBL_TODO']); +} +elseif($activity_mode == 'Events') +{ + $tab_type = 'Events'; + $smarty->assign("SINGLE_MOD",$mod_strings['LBL_EVENT']); +} +$tab_id=getTabid($tab_type); + + +if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) { + $focus->retrieve_entity_info($_REQUEST['record'],$tab_type); + $focus->id = $_REQUEST['record']; + $focus->name=$focus->column_fields['subject']; +} + +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; +} + +//needed when creating a new task with default values passed in +if (isset($_REQUEST['contactname']) && is_null($focus->contactname)) { + $focus->contactname = $_REQUEST['contactname']; +} +if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) { + $focus->contact_id = $_REQUEST['contact_id']; +} +if (isset($_REQUEST['opportunity_name']) && is_null($focus->parent_name)) { + $focus->parent_name = $_REQUEST['opportunity_name']; +} +if (isset($_REQUEST['opportunity_id']) && is_null($focus->parent_id)) { + $focus->parent_id = $_REQUEST['opportunity_id']; +} +if (isset($_REQUEST['accountname']) && is_null($focus->parent_name)) { + $focus->parent_name = $_REQUEST['accountname']; +} +if (isset($_REQUEST['accountid']) && is_null($focus->parent_id)) { + $focus->parent_id = $_REQUEST['accountid']; +} + +$act_data = getBlocks($tab_type,"detail_view",'',$focus->column_fields); + +foreach($act_data as $block=>$entry) +{ + foreach($entry as $key=>$value) + { + foreach($value as $label=>$field) + { + $fldlabel[$field['fldname']] = $label; + if($field['ui'] == 15 || $field['ui'] == 16) + { + foreach($field['options'] as $index=>$arr_val) + { + if($arr_val[2] == "selected") + $finaldata[$field['fldname']] = $arr_val[0]; + } + } + else + { + $fldvalue = $field['value']; + if($field['fldname'] == 'description') { $fldvalue = nl2br($fldvalue); } + $finaldata[$field['fldname']] = $fldvalue; + } + + $finaldata[$field['fldname'].'link'] = $field['link']; + } + } +} + +//Start +//To set user selected hour format +if($current_user->hour_format == '') + $format = 'am/pm'; +else + $format = $current_user->hour_format; +list($stdate,$sttime) = split(' ',$finaldata['date_start']); +list($enddate,$endtime) = split(' ',$finaldata['due_date']); +$time_arr = getaddEventPopupTime($sttime,$endtime,$format); +$data['starthr'] = $time_arr['starthour']; +$data['startmin'] = $time_arr['startmin']; +$data['startfmt'] = $time_arr['startfmt']; +$data['endhr'] = $time_arr['endhour']; +$data['endmin'] = $time_arr['endmin']; +$data['endfmt'] = $time_arr['endfmt']; +$data['record'] = $focus->id; +if(isset($finaldata['sendnotification']) && $finaldata['sendnotification'] == strtolower($mod_strings['LBL_YES'])) + $data['sendnotification'] = $mod_strings['LBL_YES']; +else + $data['sendnotification'] = $mod_strings['LBL_NO']; +$data['subject'] = $finaldata['subject']; +$data['date_start'] = $stdate; +$data['due_date'] = $enddate; +$data['assigned_user_id'] = $finaldata['assigned_user_id']; +if($mod_strings[$finaldata['taskpriority']] != '') + $data['taskpriority'] = $mod_strings[$finaldata['taskpriority']]; +else + $data['taskpriority'] = $finaldata['taskpriority']; +$data['modifiedtime'] = $finaldata['modifiedtime']; +$data['createdtime'] = $finaldata['createdtime']; +$data['modifiedby'] = $finaldata['modifiedby']; +$data['parent_name'] = $finaldata['parent_id']; +$data['description'] = $finaldata['description']; +if($activity_mode == 'Task') +{ + if($mod_strings[$finaldata['taskstatus']] != '') + $data['taskstatus'] = $mod_strings[$finaldata['taskstatus']]; + else + $data['taskstatus'] = $finaldata['taskstatus']; + $data['activitytype'] = $activity_mode; + $data['contact_id'] = $finaldata['contact_id']; + $data['contact_idlink'] = $finaldata['contact_idlink']; +} +elseif($activity_mode == 'Events') +{ + $data['visibility'] = $finaldata['visibility']; + if($mod_strings[$finaldata['eventstatus']] != '') + $data['eventstatus'] = $mod_strings[$finaldata['eventstatus']]; + else + $data['eventstatus'] = $finaldata['eventstatus']; + $data['activitytype'] = $finaldata['activitytype']; + $data['location'] = $finaldata['location']; + //Calculating reminder time + $rem_days = 0; + $rem_hrs = 0; + $rem_min = 0; + if(!empty($focus->column_fields['reminder_time'])) + { + $data['set_reminder'] = $mod_strings['LBL_YES']; + $data['reminder_str'] = $finaldata['reminder_time']; + } + else + $data['set_reminder'] = $mod_strings['LBL_NO']; + //To set recurring details + $query = 'SELECT vtiger_recurringevents.*, vtiger_activity.date_start, vtiger_activity.time_start, vtiger_activity.due_date, vtiger_activity.time_end + FROM vtiger_recurringevents + INNER JOIN vtiger_activity ON vtiger_activity.activityid = vtiger_recurringevents.activityid + WHERE vtiger_recurringevents.activityid = ?'; + $res = $adb->pquery($query, array($focus->id)); + $rows = $adb->num_rows($res); + if($rows > 0) { + $recurringObject = RecurringType::fromDBRequest($adb->query_result_rowdata($res, 0)); + $recurringInfoDisplayData = $recurringObject->getDisplayRecurringInfo(); + $data = array_merge($data, $recurringInfoDisplayData); + + } else { + $data['recurringcheck'] = getTranslatedString('LBL_NO', $currentModule); + $data['repeat_str'] = ''; + } + $sql = 'select vtiger_users.*,vtiger_invitees.* from vtiger_invitees left join vtiger_users on vtiger_invitees.inviteeid=vtiger_users.id where activityid=?'; + $result = $adb->pquery($sql, array($focus->id)); + $num_rows=$adb->num_rows($result); + $invited_users=Array(); + for($i=0;$i<$num_rows;$i++) + { + $userid=$adb->query_result($result,$i,'inviteeid'); + $username = getFullNameFromQResult($result, $i, 'Users'); + $invited_users[$userid]=$username; + } + $smarty->assign("INVITEDUSERS",$invited_users); + $related_array = getRelatedListsInformation("Calendar", $focus); + $fieldsname = $related_array['Contacts']['header']; + $contact_info = $related_array['Contacts']['entries']; + + $entityIds = array_keys($contact_info); + $displayValueArray = getEntityName('Contacts', $entityIds); + if (!empty($displayValueArray)) { + foreach ($displayValueArray as $key => $field_value) { + $entityname[] = '' . $field_value . ''; + } + } + $smarty->assign("CONTACTS",$entityname); + + $is_fname_permitted = getFieldVisibilityPermission("Contacts", $current_user->id, 'firstname'); + $smarty->assign("IS_PERMITTED_CNT_FNAME",$is_fname_permitted); + + +} + +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$log->info("Calendar-Activities detail view"); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("ACTIVITY_MODE", $activity_mode); + +if (isset($focus->name)) +$smarty->assign("NAME", $focus->name); +else +$smarty->assign("NAME", ""); +$smarty->assign("UPDATEINFO",updateInfo($focus->id)); +if (isset($_REQUEST['return_module'])) +$smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module'])); +if (isset($_REQUEST['return_action'])) +$smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action'])); +if (isset($_REQUEST['return_id'])) +$smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id'])); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string'].'&activity_mode='.$activity_mode); +$smarty->assign("ID", $focus->id); +$smarty->assign("NAME", $focus->name); +$smarty->assign("BLOCKS", $act_data); +$smarty->assign("LABEL", $fldlabel); +$smarty->assign("VIEWTYPE", vtlib_purify($_REQUEST['viewtype'])); +$smarty->assign("CUSTOMFIELD", $cust_fld); +$smarty->assign("ACTIVITYDATA", $data); +$smarty->assign("ID", vtlib_purify($_REQUEST['record'])); + +//get Description Information +if(isPermitted("Calendar","EditView",$_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + +if(isPermitted("Calendar","Delete",$_REQUEST['record']) == 'yes') + $smarty->assign("DELETE","permitted"); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + + $tabid = getTabid($tab_type); + $validationData = getDBValidationData($focus->tab_name,$tabid); + $data2 = split_validationdataArray($validationData); + + $smarty->assign("VALIDATION_DATA_FIELDNAME",$data2['fieldname']); + $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data2['datatype']); + $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data2['fieldlabel']); + +$smarty->assign("MODULE",$currentModule); +$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record'])); + +if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){ + $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id); + VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id); +} + +// Gather the custom link information to display +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action'])); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params)); +// END + +$custom_fields_data = getCalendarCustomFields($tabid,'detail_view',$focus->column_fields); +$smarty->assign("CUSTOM_FIELDS_DATA", $custom_fields_data); + +$smarty->display("ActivityDetailView.tpl"); + +?> \ No newline at end of file diff --git a/modules/Calendar/EditView.php b/modules/Calendar/EditView.php new file mode 100644 index 0000000..224955b --- /dev/null +++ b/modules/Calendar/EditView.php @@ -0,0 +1,304 @@ +assign("SEARCH", $searchurl); +//4600 ends + +$activity_mode = vtlib_purify($_REQUEST['activity_mode']); +if($activity_mode == 'Task') +{ + $tab_type = 'Calendar'; + $taskcheck = true; + $smarty->assign("SINGLE_MOD",$mod_strings['LBL_TODO']); +} +elseif($activity_mode == 'Events') +{ + $tab_type = 'Events'; + $taskcheck = false; + $smarty->assign("SINGLE_MOD",$mod_strings['LBL_EVENT']); +} + +if(isset($_REQUEST['record']) && $_REQUEST['record']!='') { + $focus->id = vtlib_purify($_REQUEST['record']); + $focus->mode = 'edit'; + $focus->retrieve_entity_info($_REQUEST['record'],$tab_type); + $focus->name=$focus->column_fields['subject']; + $sql = 'select vtiger_users.*,vtiger_invitees.* from vtiger_invitees left join vtiger_users on vtiger_invitees.inviteeid=vtiger_users.id where activityid=?'; + $result = $adb->pquery($sql, array($focus->id)); + $num_rows=$adb->num_rows($result); + $invited_users=Array(); + for($i=0;$i<$num_rows;$i++) + { + $userid=$adb->query_result($result,$i,'inviteeid'); + $username = getFullNameFromQResult($result, $i, 'Users'); + $invited_users[$userid]=$username; + } + $smarty->assign("INVITEDUSERS",$invited_users); + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $related_array = getRelatedListsInformation("Calendar", $focus); + $cntlist = $related_array['Contacts']['entries']; + + $entityIds = array_keys($cntlist); + $cnt_namelist = array(); + $displayValueArray = getEntityName('Contacts', $entityIds); + if (!empty($displayValueArray)) { + foreach ($displayValueArray as $key => $field_value) { + $cnt_namelist[$key] = $field_value; + } + } + $cnt_idlist = array_keys($cnt_namelist); + $smarty->assign("CONTACTSID", implode(';', $cnt_idlist)); + $smarty->assign("CONTACTSNAME",$cnt_namelist); + $query = 'SELECT vtiger_recurringevents.*, vtiger_activity.date_start, vtiger_activity.time_start, vtiger_activity.due_date, vtiger_activity.time_end + FROM vtiger_recurringevents + INNER JOIN vtiger_activity ON vtiger_activity.activityid = vtiger_recurringevents.activityid + WHERE vtiger_recurringevents.activityid = ?'; + $res = $adb->pquery($query, array($focus->id)); + $rows = $adb->num_rows($res); + if($rows > 0) { + $recurringObject = RecurringType::fromDBRequest($adb->query_result_rowdata($res, 0)); + + $value['recurringcheck'] = 'Yes'; + $value['repeat_frequency'] = $recurringObject->getRecurringFrequency(); + $value['eventrecurringtype'] = $recurringObject->getRecurringType(); + $recurringInfo = $recurringObject->getUserRecurringInfo(); + + if($recurringObject->getRecurringType() == 'Weekly') { + $noOfDays = count($recurringInfo['dayofweek_to_repeat']); + for ($i = 0; $i < $noOfDays; ++$i) { + $value['week'.$recurringInfo['dayofweek_to_repeat'][$i]] = 'checked'; + } + + } elseif ($recurringObject->getRecurringType() == 'Monthly') { + $value['repeatMonth'] = $recurringInfo['repeatmonth_type']; + if ($recurringInfo['repeatmonth_type'] == 'date') { + $value['repeatMonth_date'] = $recurringInfo['repeatmonth_date']; + } else { + $value['repeatMonth_daytype'] = $recurringInfo['repeatmonth_daytype']; + $value['repeatMonth_day'] = $recurringInfo['dayofweek_to_repeat'][0]; + } + } + } else { + $value['recurringcheck'] = 'No'; + } + +}else +{ + if(isset($_REQUEST['contact_id']) && $_REQUEST['contact_id']!=''){ + $contactId = vtlib_purify($_REQUEST['contact_id']); + $entityIds = array($contactId); + $displayValueArray = getEntityName('Contacts', $entityIds); + if (!empty($displayValueArray)) { + foreach ($displayValueArray as $key => $field_value) { + $cnt_namelist[$key] = $field_value; + } + } + $cnt_idlist = array_keys($cnt_namelist); + $smarty->assign("CONTACTSID", implode(';', $cnt_idlist)); + $smarty->assign("CONTACTSNAME",$cnt_namelist); + + $account_id = vtlib_purify($_REQUEST['account_id']); + $account_name = getAccountName($account_id); + } +} +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; + $focus->mode = ''; +} +if(empty($_REQUEST['record']) && $focus->mode != 'edit'){ + setObjectValuesFromRequest($focus); +} +$userDetails=getOtherUserName($current_user->id); +$to_email = getUserEmailId('id',$current_user->id); +$smarty->assign("CURRENTUSERID",$current_user->id); + +$disp_view = getView($focus->mode); +if($disp_view == 'edit_view') +{ + $act_data = getBlocks($tab_type,$disp_view,$mode,$focus->column_fields); +} +else +{ + $act_data = getBlocks($tab_type,$disp_view,$mode,$focus->column_fields,'BAS'); +} +$smarty->assign("BLOCKS",$act_data); +foreach($act_data as $header=>$blockitem) +{ + foreach($blockitem as $row=>$data) + { + foreach($data as $key=>$maindata) + { + $uitype[$maindata[2][0]] = $maindata[0][0]; + $fldlabel[$maindata[2][0]] = $maindata[1][0]; + $fldlabel_sel[$maindata[2][0]] = $maindata[1][1]; + $fldlabel_combo[$maindata[2][0]] = $maindata[1][2]; + $value[$maindata[2][0]] = $maindata[3][0]; + $secondvalue[$maindata[2][0]] = $maindata[3][1]; + $thirdvalue[$maindata[2][0]] = $maindata[3][2]; + } + } +} +// jread.topik. patch account_id for create contact +if (strlen($account_name) > 0) +{ + $fldlabel_sel['parent_id'][1]='selected'; + $secondvalue['parent_id'] = $account_id; + $value['parent_id'] = $account_name; +} + +$format = ($current_user->hour_format == '')?'am/pm':$current_user->hour_format; +$stdate = key($value['date_start']); +$enddate = key($value['due_date']); +$sttime = $value['date_start'][$stdate]; +$endtime = $value['due_date'][$enddate]; +$time_arr = getaddEventPopupTime($sttime,$endtime,$format); +$value['starthr'] = $time_arr['starthour']; +$value['startmin'] = $time_arr['startmin']; +$value['startfmt'] = $time_arr['startfmt']; +$value['endhr'] = $time_arr['endhour']; +$value['endmin'] = $time_arr['endmin']; +$value['endfmt'] = $time_arr['endfmt']; +$smarty->assign("STARTHOUR",getTimeCombo($format,'start',$time_arr['starthour'],$time_arr['startmin'],$time_arr['startfmt'],$taskcheck)); +$smarty->assign("ENDHOUR",getTimeCombo($format,'end',$time_arr['endhour'],$time_arr['endmin'],$time_arr['endfmt'])); +$smarty->assign("FOLLOWUP",getTimeCombo($format,'followup_start',$time_arr['endhour'],$time_arr['endmin'],$time_arr['endfmt'])); +$smarty->assign("ACTIVITYDATA",$value); +$smarty->assign("LABEL",$fldlabel); +$smarty->assign("secondvalue",$secondvalue); +$smarty->assign("thirdvalue",$thirdvalue); +$smarty->assign("fldlabel_combo",$fldlabel_combo); +$smarty->assign("fldlabel_sel",$fldlabel_sel); +$smarty->assign("OP_MODE",$disp_view); +$smarty->assign("ACTIVITY_MODE",$activity_mode); +$smarty->assign("HOURFORMAT",$format); +$smarty->assign("USERSLIST",$userDetails); +$smarty->assign("USEREMAILID",$to_email); +$smarty->assign("MODULE",$currentModule); +$smarty->assign("DATEFORMAT",parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$log->info("Activity edit view"); + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); + +if (isset($focus->name)) +$smarty->assign("NAME", $focus->name); +else +$smarty->assign("NAME", ""); + +if($focus->mode == 'edit') +{ + $smarty->assign("MODE", $focus->mode); +} +$smarty->assign('CREATEMODE', vtlib_purify($_REQUEST['createmode'])); + +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + +// Unimplemented until jscalendar language vtiger_files are fixed +$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']); +$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + +$isContactIdEditable = getFieldVisibilityPermission($tab_type, $current_user->id, 'contact_id', 'readwrite'); +$smarty->assign("IS_CONTACTS_EDIT_PERMITTED", (($isContactIdEditable == '0')? true : false)); + +if (isset($_REQUEST['return_module'])) + $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module'])); +if (isset($_REQUEST['return_action'])) + $smarty->assign("RETURN_ACTION",vtlib_purify( $_REQUEST['return_action'])); +if (isset($_REQUEST['return_id'])) + $smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id'])); +if (isset($_REQUEST['ticket_id'])) + $smarty->assign("TICKETID", vtlib_purify($_REQUEST['ticket_id'])); +if (isset($_REQUEST['product_id'])) + $smarty->assign("PRODUCTID", vtlib_purify($_REQUEST['product_id'])); +if (isset($_REQUEST['return_viewname'])) + $smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname'])); +if(isset($_REQUEST['view']) && $_REQUEST['view']!='') + $smarty->assign("view",vtlib_purify($_REQUEST['view'])); +if(isset($_REQUEST['hour']) && $_REQUEST['hour']!='') + $smarty->assign("hour",vtlib_purify($_REQUEST['hour'])); +if(isset($_REQUEST['day']) && $_REQUEST['day']!='') + $smarty->assign("day",vtlib_purify($_REQUEST['day'])); +if(isset($_REQUEST['month']) && $_REQUEST['month']!='') + $smarty->assign("month",vtlib_purify($_REQUEST['month'])); +if(isset($_REQUEST['year']) && $_REQUEST['year']!='') + $smarty->assign("year",vtlib_purify($_REQUEST['year'])); +if(isset($_REQUEST['viewOption']) && $_REQUEST['viewOption']!='') + $smarty->assign("viewOption",vtlib_purify($_REQUEST['viewOption'])); +if(isset($_REQUEST['subtab']) && $_REQUEST['subtab']!='') + $smarty->assign("subtab",vtlib_purify($_REQUEST['subtab'])); +if(isset($_REQUEST['maintab']) && $_REQUEST['maintab']!='') + $smarty->assign("maintab",vtlib_purify($_REQUEST['maintab'])); + + +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); +$smarty->assign("ID", $focus->id); + + $tabid = getTabid($tab_type); + $validationData = getDBValidationData($focus->tab_name,$tabid); + $data = split_validationdataArray($validationData); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); +$smarty->assign("DUPLICATE",vtlib_purify($_REQUEST['isDuplicate'])); + +if ($activity_mode == 'Task') { + $custom_fields_data = getCalendarCustomFields(getTabid('Calendar'),'edit',$focus->column_fields); +} else { + $custom_fields_data = getCalendarCustomFields(getTabid('Events'),'edit',$focus->column_fields); +} +$smarty->assign("CUSTOM_FIELDS_DATA", $custom_fields_data); + +$smarty->assign("REPEAT_LIMIT_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + +$picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($tab_type); +$smarty->assign("PICKIST_DEPENDENCY_DATASOURCE", Zend_Json::encode($picklistDependencyDatasource)); + +// Gather the help information associated with fields +$smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule)); +// END + +$smarty->display("ActivityEditView.tpl"); + +?> \ No newline at end of file diff --git a/modules/Calendar/Events.png b/modules/Calendar/Events.png new file mode 100644 index 0000000..e40a0c3 Binary files /dev/null and b/modules/Calendar/Events.png differ diff --git a/modules/Calendar/ListView.php b/modules/Calendar/ListView.php new file mode 100644 index 0000000..cbf3475 --- /dev/null +++ b/modules/Calendar/ListView.php @@ -0,0 +1,296 @@ +initSortbyField('Calendar'); +// END +$smarty = new vtigerCRM_Smarty; +$other_text = Array(); + +if(!$_SESSION['lvs'][$currentModule]) +{ + unset($_SESSION['lvs']); + $modObj = new ListViewSession(); + $modObj->sorder = $sorder; + $modObj->sortby = $order_by; + $_SESSION['lvs'][$currentModule] = get_object_vars($modObj); +} + +if($_REQUEST['errormsg'] != '') +{ + $errormsg = vtlib_purify($_REQUEST['errormsg']); + $smarty->assign("ERROR",$mod_strings["SHARED_EVENT_DEL_MSG"]); +}else +{ + $smarty->assign("ERROR",""); +} + +if(ListViewSession::hasViewChanged($currentModule,$viewid)) { + $_SESSION['ACTIVITIES_ORDER_BY'] = ''; +} + +//<<<<<<< sort ordering >>>>>>>>>>>>> +$sorder = $focus->getSortOrder(); +$order_by = $focus->getOrderBy(); + +$_SESSION['ACTIVITIES_ORDER_BY'] = $order_by; +$_SESSION['ACTIVITIES_SORT_ORDER'] = $sorder; +//<<<<<<< sort ordering >>>>>>>>>>>>> + + +//<<<>>>>>> +$oCustomView = new CustomView($currentModule); +$viewid = $oCustomView->getViewId($currentModule); +$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid); +$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid); + +//Added to handle approving or denying status-public by the admin in CustomView +$statusdetails = $oCustomView->isPermittedChangeStatus($viewnamedesc['status']); +$smarty->assign("CUSTOMVIEW_PERMISSION",$statusdetails); + +//To check if a user is able to edit/delete a customview +$edit_permit = $oCustomView->isPermittedCustomView($viewid,'EditView',$currentModule); +$delete_permit = $oCustomView->isPermittedCustomView($viewid,'Delete',$currentModule); +$smarty->assign("CV_EDIT_PERMIT",$edit_permit); +$smarty->assign("CV_DELETE_PERMIT",$delete_permit); + +//<<<<>>>> +if($viewid == 0 ) +{ + echo "
"; + echo "
+ + + + + + + + + +
'> + $app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
+
"; + echo "
"; + exit; +} + +$changeOwner = getAssignedTo(16); +$userList = $changeOwner[0]; +$groupList = $changeOwner[1]; + +$smarty->assign("CHANGE_USER",$userList); +$smarty->assign("CHANGE_GROUP",$groupList); +$smarty->assign("CHANGE_OWNER",getUserslist()); +$smarty->assign("CHANGE_GROUP_OWNER",getGroupslist()); +$smarty->assign('MAX_RECORDS', $list_max_entries_per_page); +$where = ""; + +$url_string = ''; // assigning http url string + +if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true') +{ + + list($where, $ustring) = split("#@@#",getWhereCondition($currentModule)); + // we have a query + $url_string .="&query=true".$ustring; + $log->info("Here is the where clause for the list view: $where"); + $smarty->assign("SEARCH_URL",$url_string); +} + + +if($viewnamedesc['viewname'] == 'All') +{ + $smarty->assign("ALL", 'All'); +} + +if(isPermitted("Calendar","Delete",$_REQUEST['record']) == 'yes') +{ + $other_text['del'] = $app_strings[LBL_MASS_DELETE]; +} +if(isPermitted('Calendar','EditView','') == 'yes') +{ + $other_text['c_owner'] = $app_strings[LBL_CHANGE_OWNER]; +} +global $task_title; +$title_display = $current_module_strings['LBL_LIST_FORM_TITLE']; +if ($task_title) $title_display= $task_title; + +//Retreive the list from Database +//<<<<<<<<>>>>>>>> +if($viewid != "0") +{ + $listquery = getListQuery("Calendar"); + $list_query = $oCustomView->getModifiedCvListQuery($viewid,$listquery,"Calendar"); +}else +{ + $list_query = getListQuery("Calendar"); +} +//<<<<<<<>>>>>>>> + +if(isset($where) && $where != '') +{ + if(isset($_REQUEST['from_homepagedb']) && $_REQUEST['from_homepagedb'] == 'true') + $list_query .= " and ((vtiger_activity.status!='Completed' and vtiger_activity.status!='Deferred') or vtiger_activity.status is null) and ((vtiger_activity.eventstatus!='Held' and vtiger_activity.eventstatus!='Not Held') or vtiger_activity.eventstatus is null) AND ".$where; + else + $list_query .= " AND " .$where; +} +if (isset($_REQUEST['from_homepage'])) { + $dbStartDateTime = new DateTimeField(date('Y-m-d H:i:s')); + $userStartDate = $dbStartDateTime->getDisplayDate(); + $userStartDateTime = new DateTimeField($userStartDate.' 00:00:00'); + $startDateTime = $userStartDateTime->getDBInsertDateTimeValue(); + + $userEndDateTime = new DateTimeField($userStartDate.' 23:59:00'); + $endDateTime = $userEndDateTime->getDBInsertDateTimeValue(); + + if ($_REQUEST['from_homepage'] == 'upcoming_activities') + $list_query .= " AND (vtiger_activity.status is NULL OR vtiger_activity.status not in ('Completed','Deferred')) and (vtiger_activity.eventstatus is NULL OR vtiger_activity.eventstatus not in ('Held','Not Held')) AND (CAST((CONCAT(date_start,' ',time_start)) AS DATETIME) >= '$startDateTime' OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) >= '$startDateTime')"; + elseif ($_REQUEST['from_homepage'] == 'pending_activities') + $list_query .= " AND (vtiger_activity.status is NULL OR vtiger_activity.status not in ('Completed','Deferred')) and (vtiger_activity.eventstatus is NULL OR vtiger_activity.eventstatus not in ('Held','Not Held')) AND (CAST((CONCAT(due_date,' ',time_end)) AS DATETIME) <= '$endDateTime' OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) <= '$endDateTime')"; +} + +if(isset($order_by) && $order_by != '') { + if($order_by == 'smownerid') { + $list_query .= ' ORDER BY user_name '.$sorder; + } else { + $tablename = getTableNameForField('Calendar',$order_by); + $tablename = (($tablename != '')?($tablename."."):''); + if($order_by == 'lastname') + $list_query .= ' ORDER BY vtiger_contactdetails.lastname '.$sorder; + else + $list_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder; + } +} + +//Constructing the list view +$smarty->assign("CUSTOMVIEW_OPTION",$customviewcombo_html); +$smarty->assign("VIEWID", $viewid); +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("MODULE",$currentModule); +$smarty->assign("SINGLE_MOD",getTranslatedString('SINGLE_'.$currentModule, $currentModule)); +$smarty->assign("BUTTONS",$other_text); +$smarty->assign("NEW_EVENT",$app_strings['LNK_NEW_EVENT']); +$smarty->assign("NEW_TASK",$app_strings['LNK_NEW_TASK']); + +//Postgres 8 fixes +if( $adb->dbType == "pgsql") + $list_query = fixPostgresQuery( $list_query, $log, 0); + +if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){ + $count_result = $adb->query( mkCountQuery( $list_query)); + $noofrows = $adb->query_result($count_result,0,"count"); +}else{ + $noofrows = null; +} + +$queryMode = (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true'); +$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, $viewid, $queryMode); + +$navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$noofrows); + +$limit_start_rec = ($start-1) * $list_max_entries_per_page; + +if( $adb->dbType == "pgsql") + $list_result = $adb->pquery($list_query. " OFFSET $limit_start_rec LIMIT $list_max_entries_per_page", array()); +else + $list_result = $adb->pquery($list_query. " LIMIT $limit_start_rec, $list_max_entries_per_page", array()); + +$recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec,$noofrows); +$smarty->assign('recordListRange',$recordListRangeMsg); + +//Retreive the List View Table Header +if($viewid !='') +$url_string .="&viewname=".$viewid; + +//Cambiado code to add close button in custom vtiger_field +if (($viewid!=0)&&($viewid!="")){ + if (!isset($oCustomView->list_fields['Close'])) $oCustomView->list_fields['Close']=array ( 'vtiger_activity' => 'eventstatus' ); + if (!isset($oCustomView->list_fields_name['Close'])) $oCustomView->list_fields_name['Close']='eventstatus'; +} +$listview_header = getListViewHeader($focus,"Calendar",$url_string,$sorder,$order_by,"",$oCustomView); +$smarty->assign("LISTHEADER", $listview_header); + +$listview_header_search=getSearchListHeaderValues($focus,"Calendar",$url_string,$sorder,$order_by,"",$oCustomView); +$smarty->assign("SEARCHLISTHEADER", $listview_header_search); + +$listview_entries = getListViewEntries($focus,"Calendar",$list_result,$navigation_array,"","","EditView","Delete",$oCustomView); + +$smarty->assign("LISTENTITY", $listview_entries); +$smarty->assign("SELECT_SCRIPT", $view_script); + +//Added to select Multiple records in multiple pages +$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs'])); +$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs'])); +$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries),";")); + +$navigationOutput = getTableHeaderSimpleNavigation($navigation_array,$url_string,"Calendar","ListView",$viewid); +$alphabetical = AlphabeticalSearch($currentModule,'ListView','subject','true','basic',"","","","",$viewid); +$fieldnames = getAdvSearchfields($module); +$criteria = getcriteria_options(); +$smarty->assign("CRITERIA", $criteria); +$smarty->assign("FIELDNAMES", $fieldnames); +$smarty->assign("ALPHABETICAL", $alphabetical); +$smarty->assign("NAVIGATION", $navigationOutput); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +$_SESSION[$currentModule.'_listquery'] = $list_query; + +// Gather the custom link information to display +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'ACTION'=>vtlib_purify($_REQUEST['action']), 'CATEGORY'=> $category); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('LISTVIEWBASIC','LISTVIEW'), $customlink_params)); +// END + +if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') + $smarty->display("ListViewEntries.tpl"); +else + $smarty->display("ActivityListView.tpl"); +?> \ No newline at end of file diff --git a/modules/Calendar/ListViewPagging.php b/modules/Calendar/ListViewPagging.php new file mode 100644 index 0000000..333f176 --- /dev/null +++ b/modules/Calendar/ListViewPagging.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Calendar/OpenListView.php b/modules/Calendar/OpenListView.php new file mode 100644 index 0000000..7e5aeb2 --- /dev/null +++ b/modules/Calendar/OpenListView.php @@ -0,0 +1,231 @@ +debug("Entering getPendingActivities() method ..."); + require_once('data/Tracker.php'); + require_once('include/utils/utils.php'); + require_once('user_privileges/default_module_view.php'); + + global $currentModule; + global $singlepane_view; + global $theme; + global $focus; + global $action; + global $adb; + global $app_strings; + global $current_language; + global $current_user; + $current_module_strings = return_module_language($current_language, 'Calendar'); + + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + if($_REQUEST['activity_view']==''){ + $activity_view='today'; + }else{ + $activity_view=vtlib_purify($_REQUEST['activity_view']); + } + + $dbStartDateTime = new DateTimeField(date('Y-m-d H:i:s')); + $userStartDate = $dbStartDateTime->getDisplayDate(); + $userStartDateTime = new DateTimeField($userStartDate.' 00:00:00'); + $startDateTime = $userStartDateTime->getDBInsertDateTimeValue(); + + $userEndDateTime = new DateTimeField($userStartDate.' 23:59:00'); + $endDateTime = $userEndDateTime->getDBInsertDateTimeValue(); + + if($view == 'today'){ + $upcoming_condition = " AND (CAST((CONCAT(date_start,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime' + OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime')"; + $pending_condition = " AND (CAST((CONCAT(date_start,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime' + OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime')"; + }else if($view == 'all'){ + $upcoming_condition = " AND (CAST((CONCAT(date_start,' ',time_start)) AS DATETIME) >= '$startDateTime' + OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) >= '$startDateTime')"; + $pending_condition = " AND (CAST((CONCAT(date_start,' ',time_start)) AS DATETIME) <= '$startDateTime' + OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) <= '$startDateTime')"; + } + + if($mode != 1){ + $list_query = " select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity.". + "setype, vtiger_recurringevents.recurringdate, vtiger_activity.activityid, ". + "vtiger_activity.activitytype, vtiger_activity.date_start, vtiger_activity.due_date,". + "from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=". + "vtiger_activity.activityid LEFT JOIN vtiger_groups ON vtiger_groups.groupid = ". + "vtiger_crmentity.smownerid left outer join vtiger_recurringevents on ". + "vtiger_recurringevents.activityid=vtiger_activity.activityid"; + $list_query .= getNonAdminAccessControlQuery('Calendar',$current_user); + $list_query .= " WHERE vtiger_crmentity.deleted=0 and vtiger_activity.activitytype not in ". + "('Emails') AND ( vtiger_activity.status is NULL OR vtiger_activity.status not in". + "('Completed','Deferred')) and ( vtiger_activity.eventstatus is NULL OR vtiger_activity.". + "eventstatus not in ('Held','Not Held') )".$upcoming_condition; + + }else{ + $list_query = "select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity". + "setype, vtiger_recurringevents.recurringdate, vtiger_activity.activityid, vtiger_activity". + ".activitytype, vtiger_activity.date_start, vtiger_activity.due_date, from vtiger_activity". + "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid ". + "LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid ". + "left outer join vtiger_recurringevents on vtiger_recurringevents.activityid=". + "vtiger_activity.activityid"; + $list_query .= getNonAdminAccessControlQuery('Calendar',$current_user); + $list_query .= "WHERE vtiger_crmentity.deleted=0 and (vtiger_activity.". + "activitytype not in ('Emails')) AND (vtiger_activity.status is NULL OR vtiger_activity.". + "status not in ('Completed','Deferred')) and (vtiger_activity.eventstatus is NULL OR ". + "vtiger_activity.eventstatus not in ('Held','Not Held')) ".$pending_condition; + + $list_query.= " GROUP BY vtiger_activity.activityid"; + $list_query.= " ORDER BY date_start,time_start ASC"; + $res = $adb->query($list_query); + $noofrecords = $adb->num_rows($res); + $open_activity_list = array(); + $noofrows = $adb->num_rows($res); + if (count($res)>0){ + for($i=0;$i<$noofrows;$i++){ + $dateValue = $adb->query_result($res,$i,'date_start') . ' ' . + $adb->query_result($res,$i,'time_start'); + $endDateValue = $adb->query_result($res,$i,'due_date') . ' ' . + $adb->query_result($res,$i,'time_end'); + $recurringDateValue = $adb->query_result($res,$i,'due_date') . ' ' . + $adb->query_result($res,$i,'time_start'); + $date = new DateTimeField($dateValue); + $endDate = new DateTimeField($endDateValue); + $recurringDate = new DateTimeField($recurringDateValue); + + $open_activity_list[] = Array('name' => $adb->query_result($res,$i,'subject'), + 'id' => $adb->query_result($res,$i,'activityid'), + 'type' => $adb->query_result($res,$i,'activitytype'), + 'module' => $adb->query_result($res,$i,'setype'), + 'date_start' => $date->getDisplayDate(), + 'due_date' => $endDate->getDisplayDate(), + 'recurringdate' => $recurringDate->getDisplayDate(), + 'priority' => $adb->query_result($res,$i,'priority'), // Armando L�scher 04.07.2005 -> �priority -> Desc: Get vtiger_priority from db + ); + } + } + + $title=array(); + $title[]=$view; + $title[]='myUpcoPendAct.gif'; + $title[]='home_myact'; + $title[]='showActivityView'; + $title[]='MyUpcumingFrm'; + $title[]='activity_view'; + + $header=array(); + $header[] =$current_module_strings['LBL_LIST_SUBJECT']; + $header[] ='Type'; + + $return_url="&return_module=$currentModule&return_action=DetailView&return_id=" . ((is_object($focus)) ? $focus->id : ""); + $oddRow = true; + $entries=array(); + + foreach($open_activity_list as $event){ + $recur_date=preg_replace('/--/','',$event['recurringdate']); + if($recur_date!=""){ + $event['date_start']=$event['recurringdate']; + } + $font_color_high = "color:#00DD00;"; + $font_color_medium = "color:#DD00DD;"; + + switch ($event['priority']){ + case 'High': + $font_color=$font_color_high; + break; + case 'Medium': + $font_color=$font_color_medium; + break; + default: + $font_color=''; + } + + if($event['type'] != 'Task' && $event['type'] != 'Emails' && $event['type'] != ''){ + $activity_type = 'Events'; + }else{ + $activity_type = 'Task'; + } + } + $entries[$event['id']] = array( + '0' => ''.$event["name"].'', + 'IMAGE' => '', + ); + } + $values=Array('noofactivities'=>$noofrecords,'Title'=>$title,'Header'=>$header,'Entries'=>$entries); + $log->debug("Exiting getPendingActivities method ..."); + return $values; +} + +/** + * Function creates HTML to display ActivityView selection box + * @param string $activity_view - activity view + * return string $ACTIVITY_VIEW_SELECT_OPTION - HTML selection box + */ +function getActivityview($activity_view) +{ + global $log; + $log->debug("Entering getActivityview(".$activity_view.") method ..."); + $today = DateTimeField::convertToUserFormat(date("Y-m-d")); + + if($activity_view == 'Today') + { + $selected1 = 'selected'; + } + else if($activity_view == 'This Week') + { + $selected2 = 'selected'; + } + else if($activity_view == 'This Month') + { + $selected3 = 'selected'; + } + else if($activity_view == 'This Year') + { + $selected4 = 'selected'; + } + + //constructing the combo values for activities + $ACTIVITY_VIEW_SELECT_OPTION = ''; + + $log->debug("Exiting getActivityview method ..."); + return $ACTIVITY_VIEW_SELECT_OPTION; +} +?> \ No newline at end of file diff --git a/modules/Calendar/QuickCreate.php b/modules/Calendar/QuickCreate.php new file mode 100644 index 0000000..fbe0170 --- /dev/null +++ b/modules/Calendar/QuickCreate.php @@ -0,0 +1,19 @@ + \ No newline at end of file diff --git a/modules/Calendar/RenderRelatedListUI.php b/modules/Calendar/RenderRelatedListUI.php new file mode 100644 index 0000000..66e0b83 --- /dev/null +++ b/modules/Calendar/RenderRelatedListUI.php @@ -0,0 +1,164 @@ +debug("Entering get_duration(".$time_start.",".$duration_hours.",".$duration_minutes.") method ..."); + $time=explode(":",$time_start); + $time_mins = $time[1]; + $time_hrs = $time[0]; + $mins = ($time_mins + $duration_minutes) % 60; + $hrs_min = floor(($time_mins + $duration_minutes) / 60); + if(!isset($hrs)) + $hrs=0; + $hrs = $duration_hours + $hrs_min + $time_hrs; + if($hrs<10) + $hrs=$hrs; + if($mins<10) + $mins="0".$mins; + + $end_time = $hrs .$mins; + $log->debug("Exiting get_duration method ..."); + return $end_time; + } + + /** + * Function to convert time to number + * @param string $time_start - activity start time + * return integer $start_time - time + */ + function time_to_number($time_start) + { + global $log; + $log->debug("Entering time_to_number(".$time_start.") method ..."); + $start_time_array = explode(":",$time_start); + if(preg_match("/^[0]/",$start_time_array[0])) + { + $time_start_hrs=str_replace('0',"",$start_time_array[0]); + } + else + { + $time_start_hrs=$start_time_array[0]; + } + $start_time= $time_start_hrs .$start_time_array[1]; + $log->debug("Exiting time_to_number method ..."); + return $start_time; + } + + /** + * Function to status availability of user + * @param string $owner - ownername + * @param integer $userid - userid + * @param integer $activity_id - activityid + * @param string $avail_date - date in string format + * @param string $activity_start_time - time string + * @param string $activity_end_time - time string + * return string $availability - html img tag in string + */ + function status_availability($owner,$userid,$activity_id,$avail_date,$activity_start_time,$activity_end_time) + { + global $adb,$image_path,$log,$theme; + $log->debug("Entering status_availability(".$owner,$userid.",".$activity_id.",".$avail_date.",".$activity_start_time.",".$activity_end_time.") method ..."); + $avail_flag="false"; + $avail_date=DateTimeField::convertToDBFormat($avail_date); + if( $owner != $userid) + { + + $usr_query="select activityid,vtiger_activity.date_start,vtiger_activity.due_date, vtiger_activity.time_start,vtiger_activity.duration_hours,vtiger_activity.duration_minutes,vtiger_crmentity.smownerid from vtiger_activity,vtiger_crmentity where vtiger_crmentity.crmid=vtiger_activity.activityid and ('".$avail_date."' like date_start) and vtiger_crmentity.smownerid=? and vtiger_activity.activityid !=? and vtiger_crmentity.deleted=0"; + } + else + { + $usr_query="select activityid,vtiger_activity.date_start,vtiger_activity.due_date, vtiger_activity.time_start,vtiger_activity.duration_hours,vtiger_activity.duration_minutes,vtiger_crmentity.smownerid from vtiger_activity,vtiger_crmentity where vtiger_crmentity.crmid=vtiger_activity.activityid and ('".$avail_date."' like date_start) and vtiger_crmentity.smownerid=? and vtiger_activity.activityid !=? and vtiger_crmentity.deleted=0"; + } + $result_cal=$adb->pquery($usr_query, array($userid, $activity_id)); + $noofrows_cal = $adb->num_rows($result_cal); + $avail_flag="false"; + + if($noofrows_cal!=0) + { + while($row_cal = $adb->fetch_array($result_cal)) + { + $usr_date_start=$row_cal['date_start']; + $usr_due_date=$row_cal['due_date']; + $usr_time_start=$row_cal['time_start']; + $usr_hour_dur=$row_cal['duration_hours']; + $usr_mins_dur=$row_cal['duration_minutes']; + $user_start_time=time_to_number($usr_time_start); + $user_end_time=get_duration($usr_time_start,$usr_hour_dur,$usr_mins_dur); + + if( ( ($user_start_time > $activity_start_time) && ( $user_start_time < $activity_end_time) ) || ( ( $user_end_time > $activity_start_time) && ( $user_end_time < $activity_end_time) ) || ( ( $activity_start_time == $user_start_time ) || ($activity_end_time == $user_end_time) ) ) + { + $availability= 'busy'; + $avail_flag="true"; + $log->info("user start time-- ".$user_start_time."user end time".$user_end_time); + $log->info("Availability ".$availability); + + } + } + } + if($avail_flag!="true") + { + $recur_query="SELECT vtiger_activity.activityid, vtiger_activity.time_start, vtiger_activity.duration_hours, vtiger_activity.duration_minutes , vtiger_crmentity.smownerid, vtiger_recurringevents.recurringid, vtiger_recurringevents.recurringdate as date_start from vtiger_activity inner join vtiger_crmentity on vtiger_activity.activityid = vtiger_crmentity.crmid inner join vtiger_recurringevents on vtiger_activity.activityid=vtiger_recurringevents.activityid where ('".$avail_date."' like vtiger_recurringevents.recurringdate) and vtiger_crmentity.smownerid=? and vtiger_activity.activityid !=? and vtiger_crmentity.deleted=0"; + $result_cal=$adb->pquery($recur_query, array($userid, $activity_id)); + $noofrows_cal = $adb->num_rows($result_cal); + $avail_flag="false"; + + if($noofrows_cal!=0) + { + while($row_cal = $adb->fetch_array($result_cal)) + { + $usr_date_start=$row_cal['date_start']; + $usr_time_start=$row_cal['time_start']; + $usr_hour_dur=$row_cal['duration_hours']; + $usr_mins_dur=$row_cal['duration_minutes']; + $user_start_time=time_to_number($usr_time_start); + $user_end_time=get_duration($usr_time_start,$usr_hour_dur,$usr_mins_dur); + + if( ( ($user_start_time > $activity_start_time) && ( $user_start_time < $activity_end_time) ) || ( ( $user_end_time > $activity_start_time) && ( $user_end_time < $activity_end_time) ) || ( ( $activity_start_time == $user_start_time ) || ($activity_end_time == $user_end_time) ) ) + { + $availability= 'busy'; + $avail_flag="true"; + $log->info("Recurring Events:: user start time-- ".$user_start_time."user end time".$user_end_time); + $log->info("Recurring Events:: Availability ".$availability); + } + } + } + + + } + if($avail_flag == "true") + { + $availability=' '; + } + else + { + $availability=' '; + } + $log->debug("Exiting status_availability method ..."); + return $availability; + + } + +?> diff --git a/modules/Calendar/RepeatEvents.php b/modules/Calendar/RepeatEvents.php new file mode 100644 index 0000000..7d802e8 --- /dev/null +++ b/modules/Calendar/RepeatEvents.php @@ -0,0 +1,180 @@ +date_format) { + case 'dd-mm-yyyy': $format_string = 'd-m-Y H:i'; break; + case 'mm-dd-yyyy': $format_string = 'm-d-Y H:i'; break; + case 'yyyy-mm-dd': $format_string = 'Y-m-d H:i'; break; + } + return date($format_string, self::mktime($timeInYMDHIS)); + } + /** + * Split full timing into date and time part. + */ + static function splittime($fulltiming) { + return split(' ', $fulltiming); + } + /** + * Calculate the time interval to create repeated event entries. + */ + static function getRepeatInterval($type, $frequency, $recurringInfo, $start_date, $limit_date) { + $repeatInterval = Array(); + $starting = self::mktime($start_date); + $limiting = self::mktime($limit_date); + + if($type == 'Daily') { + $count = 0; + while(true) { + ++$count; + $interval = ($count * $frequency); + if(self::mktime(self::nexttime($starting, "+$interval days")) > $limiting) { + break; + } + $repeatInterval[] = $interval; + } + } else if($type == 'Weekly') { + if($recurringInfo->dayofweek_to_rpt == null) { + $count = 0; + $weekcount = 7; + while(true) { + ++$count; + $interval = $count * $weekcount; + if(self::mktime(self::nexttime($starting, "+$interval days")) > $limiting) { + break; + } + $repeatInterval[] = $interval; + } + } else { + $count = 0; + while(true) { + ++$count; + $interval = $count; + $new_timing = self::mktime(self::nexttime($starting, "+$interval days")); + $new_timing_dayofweek = date('N', $new_timing); + if($new_timing > $limiting) { + break; + } + if(in_array($new_timing_dayofweek-1, $recurringInfo->dayofweek_to_rpt)) { + $repeatInterval[] = $interval; + } + } + } + } else if($type == 'Monthly') { + $count = 0; + $avg_monthcount = 30; // TODO: We need to handle month increments precisely! + while(true) { + ++$count; + $interval = $count * $avg_monthcount; + if(self::mktime(self::nexttime($starting, "+$interval days")) > $limiting) { + break; + } + $repeatInterval[] = $interval; + } + } else if($type == 'Yearly') { + $count = 0; + $avg_monthcount = 30; + while(true) { + ++$count; + $interval = $count * $avg_monthcount; + if(self::mktime(self::nexttime($starting, "+$interval days")) > $limiting) { + break; + } + $repeatInterval[] = $interval; + } + } + return $repeatInterval; + } + + /** + * Repeat Activity instance till given limit. + */ + static function repeat($focus, $recurObj) { + + $frequency = $recurObj->recur_freq; + $repeattype= $recurObj->recur_type; + + $base_focus = new Activity(); + $base_focus->column_fields = $focus->column_fields; + $base_focus->id = $focus->id; + + $skip_focus_fields = Array ('record_id', 'createdtime', 'modifiedtime', 'recurringtype'); + + /** Create instance before and reuse */ + $new_focus = new Activity(); + + $eventStartDate = $focus->column_fields['date_start']; + $interval = strtotime($focus->column_fields['due_date']) - + strtotime($focus->column_fields['date_start']); + + foreach ($recurObj->recurringdates as $index => $startDate) { + if($index == 0 && $eventStartDate == $startDate) { + continue; + } + $startDateTimestamp = strtotime($startDate); + $endDateTime = $startDateTimestamp + $interval; + $endDate = date('Y-m-d', $endDateTime); + + // Reset the new_focus and prepare for reuse + if(isset($new_focus->id)) unset($new_focus->id); + $new_focus->column_fields = array(); + + foreach($base_focus->column_fields as $key=>$value) { + if(in_array($key, $skip_focus_fields)) { + // skip copying few fields + } else if($key == 'date_start') { + $new_focus->column_fields['date_start'] = $startDate; + } else if($key == 'due_date') { + $new_focus->column_fields['due_date'] = $endDate; + } else { + $new_focus->column_fields[$key] = $value; + } + } + if($numberOfRepeats > 10 && $index > 10) { + unset($new_focus->column_fields['sendnotification']); + } + $new_focus->save('Calendar'); + } + } + + static function repeatFromRequest($focus) { + global $log, $default_charset, $current_user; + $recurObj = getrecurringObjValue(); + self::repeat($focus, $recurObj); + } +} + +?> \ No newline at end of file diff --git a/modules/Calendar/Save.php b/modules/Calendar/Save.php new file mode 100644 index 0000000..94febae --- /dev/null +++ b/modules/Calendar/Save.php @@ -0,0 +1,350 @@ +column_fields["activitytype"] = 'Task'; +if(isset($_REQUEST['record'])) +{ + $focus->id = $_REQUEST['record']; + $local_log->debug("id is ".$id); +} +if(isset($_REQUEST['mode'])) +{ + $focus->mode = $_REQUEST['mode']; +} + +if((isset($_REQUEST['change_status']) && $_REQUEST['change_status']) && ($_REQUEST['status']!='' || $_REQUEST['eventstatus']!='')) +{ + $status =''; + $activity_type=''; + $return_id = $focus->id; + if(isset($_REQUEST['status'])) + { + $status = $_REQUEST['status']; + $activity_type = "Task"; + } + elseif(isset($_REQUEST['eventstatus'])) + { + $status = $_REQUEST['eventstatus']; + $activity_type = "Events"; + } + if(isPermitted("Calendar","EditView",$_REQUEST['record']) == 'yes') + { + ChangeStatus($status,$return_id,$activity_type); + } + else + { + echo ""; + echo "
"; + echo "
+ + + + + + + + + +
' >$app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
"; + echo "
";die; + } + $invitee_qry = "select * from vtiger_invitees where activityid=?"; + $invitee_res = $adb->pquery($invitee_qry, array($return_id)); + $count = $adb->num_rows($invitee_res); + if($count != 0) + { + for($j = 0; $j < $count; $j++) + { + $invitees_ids[]= $adb->query_result($invitee_res,$j,"inviteeid"); + + } + $invitees_ids_string = implode(';',$invitees_ids); + sendInvitation($invitees_ids_string,$activity_type,$mail_data['subject'],$mail_data); + } + + +} +else +{ + $timeFields = array('time_start', 'time_end'); + $tabId = getTabid($tab_type); + foreach($focus->column_fields as $fieldname => $val) + { + $fieldInfo = getFieldRelatedInfo($tabId, $fieldname); + $uitype = $fieldInfo['uitype']; + $typeofdata = $fieldInfo['typeofdata']; + if(isset($_REQUEST[$fieldname])) + { + if(is_array($_REQUEST[$fieldname])) + $value = $_REQUEST[$fieldname]; + else + $value = trim($_REQUEST[$fieldname]); + + if((($typeofdata == 'T~M') || ($typeofdata == 'T~O')) && ($uitype == 2 || $uitype == 70 )) { + if(!in_array($fieldname, $timeFields)) { + $date = DateTimeField::convertToDBTimeZone($value); + $value = $date->format('H:i'); + } + $focus->column_fields[$fieldname] = $value; + }else{ + $focus->column_fields[$fieldname] = $value; + } + if(($fieldname == 'notime') && ($focus->column_fields[$fieldname])) + { + $focus->column_fields['time_start'] = ''; + $focus->column_fields['duration_hours'] = ''; + $focus->column_fields['duration_minutes'] = ''; + } + if(($fieldname == 'recurringtype') && ! isset($_REQUEST['recurringcheck'])) + $focus->column_fields['recurringtype'] = '--None--'; + } + } + if(isset($_REQUEST['visibility']) && $_REQUEST['visibility']!= '') + $focus->column_fields['visibility'] = $_REQUEST['visibility']; + else + $focus->column_fields['visibility'] = 'Private'; + + if($_REQUEST['assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; + } elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; + } + + $dateField = 'date_start'; + $fieldname = 'time_start'; + $date = new DateTimeField($_REQUEST[$dateField]. ' ' . $_REQUEST[$fieldname]); + $focus->column_fields[$dateField] = $date->getDBInsertDateValue(); + $focus->column_fields[$fieldname] = $date->getDBInsertTimeValue(); + if(empty($_REQUEST['time_end'])) { + $_REQUEST['time_end'] = date('H:i', strtotime('+10 minutes', + strtotime($focus->column_fields['date_start'].' '.$_REQUEST['time_start']))); + } + $dateField = 'due_date'; + $fieldname = 'time_end'; + $date = new DateTimeField($_REQUEST[$dateField]. ' ' . $_REQUEST[$fieldname]); + $focus->column_fields[$dateField] = $date->getDBInsertDateValue(); + $focus->column_fields[$fieldname] = $date->getDBInsertTimeValue(); + + $focus->save($tab_type); + /* For Followup START -- by Minnie */ + if(isset($_REQUEST['followup']) && $_REQUEST['followup'] == 'on' && $activity_mode == 'Events' && isset($_REQUEST['followup_time_start']) && $_REQUEST['followup_time_start'] != '') + { + $heldevent_id = $focus->id; + $focus->column_fields['subject'] = '[Followup] '.$focus->column_fields['subject']; + $startDate = new DateTimeField($_REQUEST['followup_date'].' '. + $_REQUEST['followup_time_start']); + $endDate = new DateTimeField($_REQUEST['followup_due_date'].' '. + $_REQUEST['followup_time_end']); + $focus->column_fields['date_start'] = $startDate->getDBInsertDateValue(); + $focus->column_fields['due_date'] = $endDate->getDBInsertDateValue(); + $focus->column_fields['time_start'] = $startDate->getDBInsertTimeValue(); + $focus->column_fields['time_end'] = $endDate->getDBInsertTimeValue(); + $focus->column_fields['eventstatus'] = 'Planned'; + $focus->mode = 'create'; + $focus->save($tab_type); + } + /* For Followup END -- by Minnie */ + $return_id = $focus->id; +} + +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") + $return_module = vtlib_purify($_REQUEST['return_module']); +else + $return_module = "Calendar"; +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") + $return_action = vtlib_purify($_REQUEST['return_action']); +else + $return_action = "DetailView"; +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") + $return_id = vtlib_purify($_REQUEST['return_id']); + +$activemode = ""; +if($activity_mode != '') + $activemode = "&activity_mode=".$activity_mode; + +function getRequestData($return_id) +{ + global $adb; + $cont_qry = "select * from vtiger_cntactivityrel where activityid=?"; + $cont_res = $adb->pquery($cont_qry, array($return_id)); + $noofrows = $adb->num_rows($cont_res); + $cont_id = array(); + if($noofrows > 0) { + for($i=0; $i<$noofrows; $i++) { + $cont_id[] = $adb->query_result($cont_res,$i,"contactid"); + } + } + $cont_name = ''; + foreach($cont_id as $key=>$id) { + if($id != '') { + $displayValueArray = getEntityName('Contacts', $id); + if (!empty($displayValueArray)) { + foreach ($displayValueArray as $key => $field_value) { + $contact_name = $field_value; + } + } + $cont_name .= $contact_name .', '; + } + } + $cont_name = trim($cont_name,', '); + $mail_data = Array(); + $mail_data['user_id'] = $_REQUEST['assigned_user_id']; + $mail_data['subject'] = $_REQUEST['subject']; + $mail_data['status'] = (($_REQUEST['activity_mode']=='Task')?($_REQUEST['taskstatus']):($_REQUEST['eventstatus'])); + $mail_data['activity_mode'] = $_REQUEST['activity_mode']; + $mail_data['taskpriority'] = $_REQUEST['taskpriority']; + $mail_data['relatedto'] = $_REQUEST['parent_name']; + $mail_data['contact_name'] = $cont_name; + $mail_data['description'] = $_REQUEST['description']; + $mail_data['assign_type'] = $_REQUEST['assigntype']; + $mail_data['group_name'] = getGroupName($_REQUEST['assigned_group_id']); + $mail_data['mode'] = $_REQUEST['mode']; + $value = getaddEventPopupTime($_REQUEST['time_start'],$_REQUEST['time_end'],'24'); + $start_hour = $value['starthour'].':'.$value['startmin'].''.$value['startfmt']; + if($_REQUEST['activity_mode']!='Task') + $end_hour = $value['endhour'] .':'.$value['endmin'].''.$value['endfmt']; + $startDate = new DateTimeField($_REQUEST['date_start']." ".$start_hour); + $endDate = new DateTimeField($_REQUEST['due_date']." ".$end_hour); + $mail_data['st_date_time'] = $startDate->getDBInsertDateTimeValue(); + $mail_data['end_date_time'] = $endDate->getDBInsertDateTimeValue(); + $mail_data['location']=vtlib_purify($_REQUEST['location']); + return $mail_data; +} + +function getFieldRelatedInfo($tabId, $fieldName){ + $fieldInfo = VTCacheUtils::lookupFieldInfo($tabId, $fieldName); + if($fieldInfo === false) { + getColumnFields(getTabModuleName($tabid)); + $fieldInfo = VTCacheUtils::lookupFieldInfo($tabId, $fieldName); + } + return $fieldInfo; +} + +if(isset($_REQUEST['contactidlist']) && $_REQUEST['contactidlist'] != '') +{ + //split the string and store in an array + $storearray = explode (";",$_REQUEST['contactidlist']); + $del_sql = "delete from vtiger_cntactivityrel where activityid=?"; + $adb->pquery($del_sql, array($record)); + $record = $focus->id; + foreach($storearray as $id) + { + if($id != '') + { + + $sql = "insert into vtiger_cntactivityrel values (?,?)"; + $adb->pquery($sql, array($id, $record)); + if(!empty($heldevent_id)) { + $sql = "insert into vtiger_cntactivityrel values (?,?)"; + $adb->pquery($sql, array($id, $heldevent_id)); + } + } + } +} + +//code added to send mail to the vtiger_invitees +if(isset($_REQUEST['inviteesid']) && $_REQUEST['inviteesid']!='') +{ + $mail_contents = getRequestData($return_id); + sendInvitation($_REQUEST['inviteesid'],$_REQUEST['activity_mode'],$_REQUEST['subject'],$mail_contents); +} + +//to delete contact account relation while editing event +if(isset($_REQUEST['deletecntlist']) && $_REQUEST['deletecntlist'] != '' && $_REQUEST['mode'] == 'edit') +{ + //split the string and store it in an array + $storearray = explode (";",$_REQUEST['deletecntlist']); + foreach($storearray as $id) + { + if($id != '') + { + $record = $focus->id; + $sql = "delete from vtiger_cntactivityrel where contactid=? and activityid=?"; + $adb->pquery($sql, array($id, $record)); + } + } + +} + +//to delete activity and its parent table relation +if(isset($_REQUEST['del_actparent_rel']) && $_REQUEST['del_actparent_rel'] != '' && $_REQUEST['mode'] == 'edit') +{ + $parnt_id = $_REQUEST['del_actparent_rel']; + $sql= 'delete from vtiger_seactivityrel where crmid=? and activityid=?'; + $adb->pquery($sql, array($parnt_id, $record)); +} + +if(isset($_REQUEST['view']) && $_REQUEST['view']!='') + $view=vtlib_purify($_REQUEST['view']); +if(isset($_REQUEST['hour']) && $_REQUEST['hour']!='') + $hour=vtlib_purify($_REQUEST['hour']); +if(isset($_REQUEST['day']) && $_REQUEST['day']!='') + $day=vtlib_purify($_REQUEST['day']); +if(isset($_REQUEST['month']) && $_REQUEST['month']!='') + $month=vtlib_purify($_REQUEST['month']); +if(isset($_REQUEST['year']) && $_REQUEST['year']!='') + $year=vtlib_purify($_REQUEST['year']); +if(isset($_REQUEST['viewOption']) && $_REQUEST['viewOption']!='') + $viewOption=vtlib_purify($_REQUEST['viewOption']); +if(isset($_REQUEST['subtab']) && $_REQUEST['subtab']!='') + $subtab=vtlib_purify($_REQUEST['subtab']); + +if($_REQUEST['recurringcheck']) { + include_once dirname(__FILE__) . '/RepeatEvents.php'; + Calendar_RepeatEvents::repeatFromRequest($focus); +} + +//code added for returning back to the current view after edit from list view +if($_REQUEST['return_viewname'] == '') + $return_viewname='0'; +if($_REQUEST['return_viewname'] != '') + $return_viewname=vtlib_purify($_REQUEST['return_viewname']); + +$parenttab=getParentTab(); + +if(!empty($_REQUEST['start'])) { + $page='&start='.vtlib_purify($_REQUEST['start']); +} +if(!empty($_REQUEST['pagenumber'])){ + $page = "&start=".vtlib_purify($_REQUEST['pagenumber']); +} +if($_REQUEST['maintab'] == 'Calendar') + header("Location: index.php?action=".$return_action."&module=".$return_module."&view=".$view."&hour=".$hour."&day=".$day."&month=".$month."&year=".$year."&record=".$return_id."&viewOption=".$viewOption."&subtab=".$subtab."&parenttab=$parenttab"); +else + header("Location: index.php?action=$return_action&module=$return_module$view$hour$day$month$year&record=$return_id$activemode&viewname=$return_viewname$page&parenttab=$parenttab$search"); +?> diff --git a/modules/Calendar/SendReminder.bat b/modules/Calendar/SendReminder.bat new file mode 100644 index 0000000..e148ff4 --- /dev/null +++ b/modules/Calendar/SendReminder.bat @@ -0,0 +1,3 @@ +@echo off +cd ..\..\ +..\..\..\php\php.exe SendReminder.php diff --git a/modules/Calendar/Settings.php b/modules/Calendar/Settings.php new file mode 100644 index 0000000..eaf1e90 --- /dev/null +++ b/modules/Calendar/Settings.php @@ -0,0 +1,42 @@ +0) { + for($i=0;$i<3-$count;$i++) { + $menu_array[] = array(); + } +} + +$smarty->assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("IMAGE_PATH", "themes/$theme/images/"); +$smarty->assign('MODULE',$module); +$smarty->assign('MODULE_LBL',getTranslatedString($module)); +$smarty->assign('MENU_ARRAY', $menu_array); + +$smarty->display(vtlib_getModuleTemplate('Vtiger','Settings.tpl')); + +?> \ No newline at end of file diff --git a/modules/Calendar/TagCloud.php b/modules/Calendar/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Calendar/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Calendar/TodoSave.php b/modules/Calendar/TodoSave.php new file mode 100644 index 0000000..b0d3d4a --- /dev/null +++ b/modules/Calendar/TodoSave.php @@ -0,0 +1,96 @@ +column_fields["activitytype"] = 'Task'; +} + +if(isset($_REQUEST['record'])) +{ + $focus->id = $_REQUEST['record']; +} +if(isset($_REQUEST['mode'])) +{ + $focus->mode = $_REQUEST['mode']; +} +foreach($focus->column_fields as $fieldname => $val) +{ + if(isset($_REQUEST[$fieldname])) + { + if(is_array($_REQUEST[$fieldname])) + $value = $_REQUEST[$fieldname]; + else + $value = trim($_REQUEST[$fieldname]); + $focus->column_fields[$fieldname] = $value; + } +} +$focus->column_fields["subject"] = $_REQUEST["task_subject"]; +$focus->column_fields["time_start"] = $_REQUEST["task_time_start"]; +if($_REQUEST['task_assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['task_assigned_user_id']; +} elseif($_REQUEST['task_assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['task_assigned_group_id']; +} + +$date = new DateTimeField($_REQUEST['task_date_start']. ' ' . $_REQUEST['task_time_start']); +$endDate = new DateTimeField($_REQUEST['task_due_date']. ' ' . $_REQUEST['task_time_start']); +$focus->column_fields["taskstatus"] = $_REQUEST["taskstatus"]; +$focus->column_fields["date_start"] = $date->getDBInsertDateValue(); +$focus->column_fields["time_start"] = $date->getDBInsertTimeValue(); +$focus->column_fields["due_date"] = $endDate->getDBInsertDateValue(); +$focus->column_fields["time_end"] = $endDate->getDBInsertTimeValue(); +$focus->column_fields["taskpriority"] = $_REQUEST["taskpriority"]; +$focus->column_fields["parent_id"] = $_REQUEST["task_parent_id"]; +$focus->column_fields["contact_id"] = $_REQUEST["task_contact_id"]; +$focus->column_fields["description"] = $_REQUEST["task_description"]; +if(isset($_REQUEST['task_sendnotification']) && $_REQUEST['task_sendnotification'] != null) + $focus->column_fields["sendnotification"] = $_REQUEST["task_sendnotification"]; + + $focus->save($tab_type); + +function getRequestedToData() +{ + $mail_data = Array(); + $mail_data['user_id'] = $_REQUEST["task_assigned_user_id"]; + $mail_data['subject'] = $_REQUEST['task_subject']; + $mail_data['status'] = (($_REQUEST['activity_mode']=='Task')?($_REQUEST['taskstatus']):($_REQUEST['eventstatus'])); + $mail_data['activity_mode'] = $_REQUEST['activity_mode']; + $mail_data['taskpriority'] = $_REQUEST['taskpriority']; + $mail_data['relatedto'] = $_REQUEST['task_parent_name']; + $mail_data['contact_name'] = $_REQUEST['task_contact_name']; + $mail_data['description'] = $_REQUEST['task_description']; + $mail_data['assign_type'] = $_REQUEST['task_assigntype']; + $mail_data['group_name'] = getGroupName($_REQUEST['task_assigned_group_id']); + $mail_data['mode'] = $_REQUEST['task_mode']; + $startTime = $_REQUEST['task_time_start']; + $date = new DateTimeField($_REQUEST['task_date_start']." ".$startTime); + $endTime = $_REQUEST['task_time_end']; + $endDate = new DateTimeField($_REQUEST['task_due_date']." ".$startTime); + $startTime = $date->getDisplayTime(); + $endTime = $endDate->getDisplayTime(); + $value = getaddEventPopupTime($startTime, $endTime,'24'); + $start_hour = $value['starthour'].':'.$value['startmin'].''.$value['startfmt']; + $mail_data['st_date_time'] = $date->getDisplayDateTimeValue(); + $mail_data['end_date_time'] = $endDate->getDisplayDate(); + return $mail_data; +} + +header("Location: index.php?action=index&module=Calendar&view=".vtlib_purify($_REQUEST['view'])."&hour=".vtlib_purify($_REQUEST['hour'])."&day=".vtlib_purify($_REQUEST['day'])."&month=".vtlib_purify($_REQUEST['month'])."&year=".vtlib_purify($_REQUEST['year'])."&viewOption=".vtlib_purify($_REQUEST['viewOption'])."&subtab=todo&parenttab=".getParentTab()); +?> diff --git a/modules/Calendar/UnifiedSearch.php b/modules/Calendar/UnifiedSearch.php new file mode 100644 index 0000000..14e4cbf --- /dev/null +++ b/modules/Calendar/UnifiedSearch.php @@ -0,0 +1,11 @@ + diff --git a/modules/Calendar/addEventUI.php b/modules/Calendar/addEventUI.php new file mode 100644 index 0000000..74329a3 --- /dev/null +++ b/modules/Calendar/addEventUI.php @@ -0,0 +1,1142 @@ +id,true); + $to_email = getUserEmailId('id',$current_user->id); + $date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']); + $taskassignedto = getAssignedTo(9); + $eventassignedto = getAssignedTo(16); +$mysel= vtlib_purify($_REQUEST['view']); +$calendar_arr = Array(); +$calendar_arr['IMAGE_PATH'] = $image_path; +if(empty($mysel)){ + if($current_user->activity_view == "This Year"){ + $mysel = 'year'; + }else if($current_user->activity_view == "This Month"){ + $mysel = 'month'; + }else if($current_user->activity_view == "This Week"){ + $mysel = 'week'; + }else{ + $mysel = 'day'; + } +} +$date_data = array(); +if ( isset($_REQUEST['day'])) +{ + + $date_data['day'] = $_REQUEST['day']; +} + +if ( isset($_REQUEST['month'])) +{ + $date_data['month'] = $_REQUEST['month']; +} + +if ( isset($_REQUEST['week'])) +{ + $date_data['week'] = $_REQUEST['week']; +} + +if ( isset($_REQUEST['year'])) +{ + if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970) + { + print("".$app_strings['LBL_CAL_LIMIT_MSG'].""); + exit; + } + $date_data['year'] = $_REQUEST['year']; +} + + +if(empty($date_data)) +{ + $data_value=date('Y-m-d H:i:s'); + preg_match('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/',$data_value,$value); + $date_data = Array( + 'day'=>$value[3], + 'month'=>$value[2], + 'year'=>$value[1], + 'hour'=>$value[4], + 'min'=>$value[5], + ); + +} +$calendar_arr['calendar'] = new Calendar($mysel,$date_data); +$calendar_arr['view'] = $mysel; +if($current_user->hour_format == '') + $calendar_arr['calendar']->hour_format = 'am/pm'; +else + $calendar_arr['calendar']->hour_format = $current_user->hour_format; + +/** Function to construct HTML code for Assigned To field + * @param $assignedto -- Assigned To values :: Type array + * @param $toggletype -- String to different event and task :: Type string + * return $htmlStr -- HTML code in string forat :: Type string + */ +function getAssignedToHTML($assignedto,$toggletype) +{ + global $app_strings; + $userlist = $assignedto[0]; + if(isset($assignedto[1]) && $assignedto[1] != null) + $grouplist = $assignedto[1]; + $htmlStr = ''; + $check = 1; + foreach($userlist as $key_one=>$arr) + { + foreach($arr as $sel_value=>$value) + { + if($value != '') + $check=$check*0; + else + $check=$check*1; + } + } + if($check == 0) + { + $select_user='checked'; + $style_user='display:block'; + $style_group='display:none'; + } + else + { + $select_group='checked'; + $style_user='display:none'; + $style_group='display:block'; + } + if($toggletype == 'task') + $htmlStr .= ' '.$app_strings['LBL_USER']; + else + $htmlStr .= ' '.$app_strings['LBL_USER']; + if($grouplist != '') + { + if($toggletype == 'task') + $htmlStr .= ' '.$app_strings['LBL_GROUP']; + else + $htmlStr .= ' '.$app_strings['LBL_GROUP']; + } + if($toggletype == 'task') + { + $htmlStr .= ' + '; + } + $htmlStr .= getUserslist(); + $htmlStr .= ' + '; + if($grouplist != '') + { + if($toggletype == 'task') + { + $htmlStr .= ' + '; + } + $htmlStr .= getGroupslist(); + $htmlStr .= ' + '; + } + return $htmlStr; +} + +$date = new DateTimeField(null); +$endDate = new DateTimeField(date("Y-m-d H:i:s", (time() + (1 * 24 * 60 * 60)))); +list($startYear, $startMonth, $startDay) = DateTimeField::convertToDBFormat($date->getDisplayDate()); +list($startHour, $startMin) = explode(':', $date->getDisplayTime()); +list($startYear, $startMonth, $startDay) = DateTimeField::convertToDBFormat($date->getDisplayDate()); +list($startHour, $startMin) = explode(':', $date->getDisplayTime()); + +?> + + + + + + + + + + + +
+ + + + +
+ + id,'eventstatus', 'readwrite') == '0') { ?> + - + - + + + - + - + + - + +
+
+ + +
+ +column_fields['is_admin']=='on') + $Res = $adb->pquery("select * from vtiger_activitytype",array()); + else + { + $role_id=$current_user->roleid; + $subrole = getRoleSubordinates($role_id); + if(count($subrole)> 0) + { + $roleids = $subrole; + array_push($roleids, $role_id); + } + else + { + $roleids = $role_id; + } + + if (count($roleids) > 1) { + $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid in (". generateQuestionMarks($roleids) .") and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc",array($roleids)); + } else { + $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid = ? and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc",array($role_id)); + } + } + $eventlist=''; + for($i=0; $i<$adb->num_rows($Res);$i++) + { + $eventlist = $adb->query_result($Res,$i,'activitytype'); +?> + + + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
 
: + + + onclick=checkgroup(); checked>  + +
+ + + +
 
+    + + +
+
+
+ + +
+ + + + +
+ + id,'taskstatus', 'readwrite') == '0') { ?> + - + - + + + + - + - + + - + + +
+
+ + + + + + + + \ No newline at end of file diff --git a/modules/Calendar/calendarLayout.php b/modules/Calendar/calendarLayout.php new file mode 100644 index 0000000..816b89b --- /dev/null +++ b/modules/Calendar/calendarLayout.php @@ -0,0 +1,2203 @@ +debug("Entering calendar_layout() method"); + $cal_header = array (); + if (isset($param_arr['size']) && $param_arr['size'] == 'small') + $param_arr['calendar']->show_events = false; + + $cal_header['view'] = $param_arr['view']; + $cal_header['IMAGE_PATH'] = $param_arr['IMAGE_PATH']; + $cal_header['calendar'] = $param_arr['calendar']; + $eventlabel = $mod_strings['LBL_EVENTS']; + $todolabel = $mod_strings['LBL_TODOS']; + //if $param_arr['size'] is set to 'small', get small(mini) calendar + if(isset($param_arr['size']) && $param_arr['size'] == 'small') + { + get_mini_calendar($param_arr); + } + else + { + // User Select Customization + $onlyForUserParam = "onlyforuser=" . calendarview_getSelectedUserId(); + // END + + //To differentiate selected subtab from unselected one - Starts + if($subtab == 'event') + { + $eventtab_class = 'dvtSelectedCell'; + $todotab_class = 'dvtUnSelectedCell'; + $event_anchor = $eventlabel; + // Added for User Based CustomView for Calendar module + $todo_anchor = "date_time->get_date_str()."&viewOption=".$viewBox."&subtab=todo&parenttab=".$category."&$onlyForUserParam'>".$todolabel.""; + + } + elseif($subtab == 'todo') + { + $eventtab_class = 'dvtUnSelectedCell'; + $todotab_class = 'dvtSelectedCell'; + // Added User Based CustomView for Calendar module + $event_anchor = "date_time->get_date_str()."&viewOption=".$viewBox."&subtab=event&parenttab=".$category."&$onlyForUserParam'>".$eventlabel.""; + $todo_anchor = $todolabel; + } + //Ends + //To get calendar header and its links(like Day,Week,Month,Year and etc.) + get_cal_header_tab($cal_header,$viewBox,$subtab); + $subheader = ""; + $subheader .=<< + + + + + + +
+ + + + + + + + + +
 $event_anchor $todo_anchor 
+
+EOQ; + echo $subheader; + if($viewBox == 'hourview' && $subtab == 'event') + { + get_cal_header_data($param_arr,$viewBox,$subtab); + getHourView($param_arr); + } + elseif($viewBox == 'listview' && $subtab == 'event') + { + get_cal_header_data($param_arr,$viewBox,$subtab); + getEventListView($param_arr); + } + elseif($subtab == 'todo') + { + $todo_list = ""; + $todo_list .= getTodosListView($param_arr,'',$subtab); + $todo_list .= '

'; + echo $todo_list; + } + } + + $cal_log->debug("Exiting calendar_layout() method"); + +} + +/** + * Function creates HTML to display small(mini) Calendar + * @param array $cal - collection of objects and strings + */ +function get_mini_calendar(& $cal){ + global $current_user,$adb,$cal_log,$mod_strings,$theme; + $category = getParentTab(); + $cal_log->debug('Entering get_mini_calendar() method...'); + $count = 0; + //To decide number of rows(weeks) in a month + if ($cal['calendar']->month_array[$cal['calendar']->slices[35]]->start_time->month != $cal['calendar']->date_time->month) { + $rows = 5; + } else { + $rows = 6; + } + $minical = ""; + $minical .= " + + + "; + $minical .= ""; + $minical .= ""; + //To display days in week + $minical .= ''; + for ($i = 0; $i < 7; $i ++){ + $weekday = $mod_strings['cal_weekdays_short'][$i]; + $minical .= ''; + } + $minical .= ""; + $event_class = ''; + $class = ''; + for ($i = 0; $i < $rows; $i++){ + $minical .= ""; + + //calculate blank days for first week + for ($j = 0; $j < 7; $j ++){ + $cal['slice'] = $cal['calendar']->month_array[$cal['calendar']->slices[$count]]; + $class = dateCheck($cal['slice']->start_time->get_formatted_date()); + if($j == 0){ + $minical .= ""; + } + + //To differentiate day having events from other days + if(count($cal['slice']->activities) != 0 && ($cal['slice']->start_time->get_formatted_date() == $cal['slice']->activities[0]->start_time->get_formatted_date())){ + $event_class = 'class="eventDay"'; + }else{ + $event_class = ''; + } + //To differentiate current day from other days + if($class != '' ){ + $class = 'class="'.$class.'"'; + }else{ + $class = $event_class; + } + + //To display month dates + if ($cal['slice']->start_time->getMonth() == $cal['calendar']->date_time->getMonth()){ + $minical .= ""; + }else{ + $minical .= ""; + } + $count++; + } + $minical .= ''; + } + $minical .= "
 ".get_previous_cal($cal)." "; + $minical .= "date_time->get_date_str()."&parenttab=".$category."'>".display_date($cal['view'],$cal['calendar']->date_time)." ".get_next_cal($cal)." +
'.$mod_strings['LBL_WEEK'].''.$weekday.'
start_time->get_date_str()."&parenttab=".$category."'>".$cal['slice']->start_time->week.""; + $minical .= "getView()."".$cal['slice']->start_time->get_date_str()."&parenttab=".$category."'>"; + $minical .= $cal['slice']->start_time->get_Date()."
"; + echo $minical; + $cal_log->debug("Exiting get_mini_calendar() method..."); +} + +/** + * Function creates HTML to display Calendar Header and its Links + * @param array $header - collection of objects and strings + * @param string $viewBox - string 'listview' or 'hourview' or may be empty. if 'listview' means Events ListView.if 'hourview' means Events HourView. if empty means get Todos ListView + * @param string $subtab - string 'todo' or 'event'. if 'todo' means Todos View else Events View + */ +function get_cal_header_tab(& $header,$viewBox,$subtab) +{ + global $mod_strings,$cal_log; + $category = getParentTab(); + $cal_log->debug("Entering get_cal_header_tab() method..."); + $tabhtml = ""; + $count = 1; + include_once 'modules/Calendar/addEventUI.php'; + include_once 'modules/Calendar/header.php'; + $eventlabel = $mod_strings['LBL_EVENTS']; + $todolabel = $mod_strings['LBL_TODOS']; + $div = " + +
+ "; + echo $div; + $tabhtml .= ""; + $links = array ('day','week','month','year'); + //To differentiate the selected link from unselected links + foreach ($links as $link) + { + if ($header['view'] == $link) + { + $class = 'calSel'; + $anchor = $mod_strings["LBL_".$header['calendar']->getCalendarView($link)]; + } + else + { + $class = 'calUnSel'; + $anchor = "date_time->get_date_str()."&viewOption=".$viewBox."&subtab=".$subtab."&parenttab=".$category."'>".$mod_strings["LBL_".$header['calendar']->getCalendarView($link)].""; + } + + if($count == 1) + $tabhtml .= ""; + else + $tabhtml .= ""; + $count++; + } + //To get Navigation(next&previous) links and display Date info + $tabhtml .= ""; + $tabhtml .= ""; + $tabhtml .= ""; + $tabhtml .= ""; + $tabhtml .= ""; + echo $tabhtml; + $cal_log->debug("Exiting get_cal_header_tab() method..."); +} + +/** + * Function creates HTML to display number of Events, Todos and pending list in calendar under header(Eg:Total Events : 5, 2 Pending / Total To Dos: 4, 1 Pending) + * @param array $cal_arr - collection of objects and strings + * @param string $viewBox - string 'listview' or 'hourview'. if 'listview' means Events ListView.if 'hourview' means Events HourView. + */ +function get_cal_header_data(& $cal_arr,$viewBox,$subtab) +{ + global $mod_strings,$cal_log,$current_user,$adb,$theme; + $cal_log->debug("Entering get_cal_header_data() method..."); + global $current_user,$app_strings; + $date_format = $current_user->date_format; + $format = $cal_arr['calendar']->hour_format; + $hour_startat = timeString(array('hour' => date('H:i', (time() + (5 * 60))), 'minute' => 0), '24'); + $hour_endat = timeString(array('hour'=>date('H:i',(time() + (60 * 60))),'minute'=>0),'24'); + $time_arr = getaddEventPopupTime($hour_startat,$hour_endat,$format); + $date = new DateTimeField(null); + + //To get date in user selected format + $temp_date = $date->getDisplayDate(); + + if($current_user->column_fields['is_admin']=='on') + $Res = $adb->pquery("select * from vtiger_activitytype",array()); + else + { + $roleid=$current_user->roleid; + $subrole = getRoleSubordinates($roleid); + if(count($subrole)> 0) + { + $roleids = $subrole; + array_push($roleids, $roleid); + } + else + { + $roleids = $roleid; + } + + if (count($roleids) > 1) { + $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid in (". generateQuestionMarks($roleids) .") and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc", array($roleids)); + } else { + $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid = ? and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc", array($roleid)); + } + } + + $eventlist=''; + for($i=0; $i<$adb->num_rows($Res);$i++) + { + $eventlist .= $adb->query_result($Res,$i,'activitytype').";"; + } + + $headerdata = ""; + $headerdata .=" +
+
+ +
".$anchor."".$anchor." + + + "; + $tabhtml .= ""; + $tabhtml .= " +
".get_previous_cal($header,$viewBox,$subtab)." + ".display_date($header['view'],$header['calendar']->date_time)."".get_next_cal($header,$viewBox,$subtab)." +
+
view."".$header['calendar']->date_time->get_date_str()."&viewOption=".$viewBox."&subtab=".$subtab."&parenttab=".$category."\");' src='".$header['IMAGE_PATH']."btnL3Calendar.gif' alt='".$mod_strings['LBL_OPENCAL']."...' title='".$mod_strings['LBL_OPENCAL']."...' align='absmiddle' border='0'>view."".$header['calendar']->date_time->get_date_str()."&viewOption=".$viewBox."&subtab=".$subtab."&parenttab=".$category."\");' src='".$header['IMAGE_PATH']."tbarSettings.gif' alt='".$mod_strings['LBL_SETTINGS']."' title='".$mod_strings['LBL_SETTINGS']."' align='absmiddle' border='0'>".$app_strings['Calendar']."
+ "; + if(isPermitted("Calendar","EditView") == "yes") + { + $headerdata .=" + "; + } + else + { + $headerdata .=""; + } + $headerdata .=" + + +
 
+
+ ".$mod_strings['LBL_ADD']." + +
 ";//USER SELECT CUSTOMIZATION + $headerdata .= getEventInfo($cal_arr,'listcnt'); + $headerdata .= "
".$mod_strings['LBL_VIEW']." : ";//USER SELECT CUSTOMIZATION + $view_options = getEventViewOption($cal_arr,$viewBox); + + // User Select Customization + $view_options .= calendarview_getUserSelectOptions( calendarview_getSelectedUserId() ); + // END + + $headerdata .=$view_options."
+
"; + echo $headerdata; + $cal_log->debug("Exiting get_cal_header_data() method..."); +} + +/** + * Function creates HTML select statement to display View selection box + * @param array $cal - collection of objects and strings + * @param string $viewBox - string 'listview' or 'hourview'. if 'listview' means get Events ListView.if 'hourview' means get Events HourView. + * return string $view - html selection box + */ +function getEventViewOption(& $cal,$viewBox) +{ + global $mod_strings,$cal_log; + $category = getParentTab(); + if($viewBox == 'listview') + { + $list_sel = 'selected'; + $hr_sel = ''; + } + else + { + $list_sel = ''; + $hr_sel = 'selected'; + } + $cal_log->debug("Entering getEventViewOption() method..."); + $view = "view."'> + date_time->hour."'> + date_time->day."'> + date_time->week."'> + date_time->month."'> + date_time->year."'> + + + + + + + "; + $cal_log->debug("Exiting getEventViewOption() method..."); + return $view; +} + +/** + * Function creates HTML anchor tag to get previous-day/week/month/year view + * @param array $cal - collection of objects and strings + * @param string $viewBox - string 'listview' or 'hourview' or may be empty. if 'listview' means previous link in Events ListView.if 'hourview' means previous link in Events HourView. if empty means previous link in Todos ListView + * @param string $subtab - string 'todo' or 'event' or may be empty. if 'todo' means Todos View. if 'event' means Events View. if empty means small calendar view. + * return string $link - html tags in string format + */ +function get_previous_cal(& $cal,$viewBox='',$subtab='') +{ + global $mod_strings,$cal_log,$theme; + $category = getParentTab(); + $cal_log->debug("Entering get_previous_cal() method..."); + if(isset($cal['size']) && $cal['size'] == 'small') + { + $link = "view."".$cal['calendar']->get_datechange_info('prev')."&parenttab=".$category."\")'>"; + } + else + { + $link = "view."".$cal['calendar']->get_datechange_info('prev')."&viewOption=".$viewBox."&subtab=".$subtab."&parenttab=".$category."&onlyforuser=".calendarview_getSelectedUserId()."' onclick='VtigerJS_DialogBox.block();return true;'>"; + } + $cal_log->debug("Exiting get_previous_cal() method..."); + return $link; +} + +/** + * Function creates HTML anchor tag to get next-day/week/month/year view + * @param array $cal - collection of objects and strings + * @param string $viewBox - string 'listview' or 'hourview' or may be empty. if 'listview' means next link in Events ListView.if 'hourview' means next link in Events HourView. if empty means next link in Todos ListView + * @param string $subtab - string 'todo' or 'event' or may be empty. if 'todo' means Todos View. if 'event' means Events View. if empty means small calendar view. + * return string $link - html tags in string format + */ +function get_next_cal(& $cal,$viewBox='',$subtab='') +{ + global $mod_strings,$cal_log,$theme; + $category = getParentTab(); + $cal_log->debug("Entering get_next_cal() method..."); + if(isset($cal['size']) && $cal['size'] == 'small') + { + $link = "view."".$cal['calendar']->get_datechange_info('next')."&parenttab=".$category."\")' >"; + } + else + { + $link = "view."".$cal['calendar']->get_datechange_info('next')."&viewOption=".$viewBox."&subtab=".$subtab."&parenttab=".$category."&onlyforuser=".calendarview_getSelectedUserId()."' onclick='VtigerJS_DialogBox.block();return true;'>"; + } + $cal_log->debug("Exiting get_next_cal() method..."); + return $link; + +} + +/** + * Function to get date info depending upon on the calendar view(Eg: 21 July 2000) + * @param string $view - calendar view(day/week/month/year) + * @param array $date_time - contains DateTime object + * return string $label - date info(Eg for dayview : 13 July 2000) + */ +function display_date($view,$date_time) +{ + global $cal_log; + $cal_log->debug("Entering display_date() method..."); + if ($view == 'day') + { + //$label = $date_time->getdayofWeek()." "; + $label = $date_time->get_Date()." "; + $label .= $date_time->getmonthName()." "; + $label .= $date_time->year; + $cal_log->debug("Exiting display_date() method..."); + return $label; + } + elseif ($view == 'week') + { + $week_start = $date_time->getThisweekDaysbyIndex(1); + $week_end = $date_time->getThisweekDaysbyIndex(7); + $label = $week_start->get_Date()." "; + $label .= $week_start->getmonthName()." "; + $label .= $week_start->year; + $label .= " - "; + $label .= $week_end->get_Date()." "; + $label .= $week_end->getmonthName()." "; + $label .= $week_end->year; + $cal_log->debug("Exiting display_date() method..."); + return $label; + } + + elseif ($view == 'month') + { + $label = $date_time->getmonthName()." "; + $label .= $date_time->year; + $cal_log->debug("Exiting display_date() method..."); + return $label; + } + elseif ($view == 'year') + { + $cal_log->debug("Exiting display_date() method..."); + return $date_time->year; + } + +} +/** + * Function to get css class name for date + * @param string $slice_date - date + * returns string - css class name or empty string + */ +function dateCheck($slice_date) +{ + global $cal_log; + $cal_log->debug("Entering dateCheck() method..."); + $userCurrenDate = new DateTimeField(date('Y-m-d H:i:s')); + $today = $userCurrenDate->getDisplayDate(); + if($today == $slice_date) + { + $cal_log->debug("Exiting dateCheck() method..."); + //css class for day having event(s) + return 'currDay'; + } + else + { + $cal_log->debug("Exiting dateCheck() method..."); + return ''; + } +} + +/** + * Function to construct respective calendar layout depends on the calendar view + * @param array $view - collection of objects and strings + */ +function getHourView(& $view) +{ + global $cal_log,$theme; + $hourview_layout = ''; + $cal_log->debug("Entering getHourView() method..."); + $hourview_layout .= '
+
'; + + if($view['view'] == 'day') + $hourview_layout .= getDayViewLayout($view); + elseif($view['view'] == 'week') + $hourview_layout .= getWeekViewLayout($view); + elseif($view['view'] == 'month') + $hourview_layout .= getMonthViewLayout($view); + elseif($view['view'] == 'year') + $hourview_layout .= getYearViewLayout($view); + else + die("view:".$view['view']." is not defined"); + + $hourview_layout .= '
+ '; + $hourview_layout .= '
+ + + + + + + + +
'; + echo $hourview_layout; + $cal_log->debug("Exiting getHourView() method..."); +} + +/** + * Fuction constructs Events ListView depends on the view + * @param array $cal - collection of objects and strings + * @param string $mode - string 'listcnt' or empty. if empty means get Events ListView else get total no. of events and no. of pending events Info. + * returns string $activity_list - total no. of events and no. of pending events Info(Eg: Total Events : 2, 1 Pending). + */ +function getEventListView(& $cal,$mode='') +{ + global $cal_log,$theme; + $list_view = ""; + $cal_log->debug("Entering getEventListView() method..."); + if($cal['calendar']->view == 'day') + { + $start_date = $end_date = $cal['calendar']->date_time->get_DB_formatted_date(); + } + elseif($cal['calendar']->view == 'week') + { + $start_date = $cal['calendar']->slices[0]; + $end_date = $cal['calendar']->slices[6]; + $start_date = DateTimeField::convertToDBFormat($start_date); + $end_date = DateTimeField::convertToDBFormat($end_date); + } + elseif($cal['calendar']->view == 'month') + { + $start_date = $cal['calendar']->date_time->getThismonthDaysbyIndex(0); + $end_date = $cal['calendar']->date_time->getThismonthDaysbyIndex($cal['calendar']->date_time->daysinmonth - 1); + $start_date = $start_date->get_DB_formatted_date(); + $end_date = $end_date->get_DB_formatted_date(); + } + elseif($cal['calendar']->view == 'year') + { + $start_date = $cal['calendar']->date_time->getThisyearMonthsbyIndex(0); + $end_date = $cal['calendar']->date_time->get_first_day_of_changed_year('increment'); + $start_date = $start_date->get_DB_formatted_date(); + $end_date = $end_date->get_DB_formatted_date(); + } + else + { + die("view:".$cal['calendar']->view." is not defined"); + } + //if $mode value is empty means get Events list in array format else get the count of total events and pending events in array format. + if($mode != '') + { + $activity_list = getEventList($cal, $start_date, $end_date,$mode); + $cal_log->debug("Exiting getEventListView() method..."); + return $activity_list; + } + else + { + $ret_arr = getEventList($cal, $start_date, $end_date,$mode); + $activity_list = $ret_arr[0]; + $navigation_array = $ret_arr[1]; + } + //To get Events listView + $list_view .="
"; + $list_view .=constructEventListView($cal,$activity_list,$navigation_array); + $list_view .="
+ "; + $list_view .="
+ + + + + + + + +
"; + echo $list_view; + $cal_log->debug("Exiting getEventListView() method..."); +} + + +/** + * Fuction constructs Todos ListView depends on the view + * @param array $cal - collection of objects and strings + * @param string $check - string 'listcnt' or empty. if empty means get Todos ListView else get total no. of Todos and no. of pending todos Info. + * returns string $todo_list - total no. of todos and no. of pending todos Info(Eg: Total Todos : 2, 1 Pending). + */ +function getTodosListView($cal, $check='',$subtab='') +{ + global $cal_log,$theme; + $list_view = ""; + $cal_log->debug("Entering getTodosListView() method..."); + if($cal['calendar']->view == 'day') { + $start_date = $end_date = $cal['calendar']->date_time->get_DB_formatted_date(); + } elseif ($cal['calendar']->view == 'week') { + $start_date = $cal['calendar']->slices[0]; + $end_date = $cal['calendar']->slices[6]; + $start_date = DateTimeField::convertToDBFormat($start_date); + $end_date = DateTimeField::convertToDBFormat($end_date); + } elseif ($cal['calendar']->view == 'month') { + $start_date = $cal['calendar']->date_time->getThismonthDaysbyIndex(0); + $end_date = $cal['calendar']->date_time->getThismonthDaysbyIndex($cal['calendar']-> + date_time->daysinmonth - 1); + $start_date = $start_date->get_DB_formatted_date(); + $end_date = $end_date->get_DB_formatted_date(); + } elseif ($cal['calendar']->view == 'year') { + $start_date = $cal['calendar']->date_time->getThisyearMonthsbyIndex(0); + $end_date = $cal['calendar']->date_time->get_first_day_of_changed_year('increment'); + $start_date = $start_date->get_DB_formatted_date(); + $end_date = $end_date->get_DB_formatted_date(); + } else { + die("view:" . $cal['calendar']->view . " is not defined"); + } + //if $check value is empty means get Todos list in array format else get the count of total todos and pending todos in array format. + if($check != '') + { + $todo_list = getTodoList($cal, $start_date, $end_date,$check); + $cal_log->debug("Exiting getTodosListView() method..."); + return $todo_list; + } + else + { + $ret_arr = getTodoList($cal, $start_date, $end_date,$check); + $todo_list = $ret_arr[0]; + $navigation_arr = $ret_arr[1]; + } + $cal_log->debug("Exiting getTodosListView() method..."); + $list_view .="
"; + //To get Todos listView + $list_view .= constructTodoListView($todo_list,$cal,$subtab,$navigation_arr); + $list_view .="
+ + + + + + + + + + "; + echo $list_view; +} + +/** + * Function creates HTML to display Calendar DayView + * @param array $cal - collections of objects and strings. + * return string $dayview_layout - html tags in string format + */ +function getDayViewLayout(& $cal) +{ + global $current_user,$app_strings,$cal_log,$adb; + $no_of_rows = 1; + $cal_log->debug("Entering getDayViewLayout() method..."); + $date_format = $current_user->date_format; + $day_start_hour = $cal['calendar']->day_start_hour; + $day_end_hour = $cal['calendar']->day_end_hour; + $format = $cal['calendar']->hour_format; + $show_complete_view = false; + if(!empty($_REQUEST['complete_view'])){ + $show_complete_view =true; + } + $dayview_layout = ''; + $dayview_layout .= ' '; + $dayview_layout .= ' +
+ '; + if(!empty($show_complete_view)) { + $dayview_layout .= ''; + $day_start_hour = 0; + $day_end_hour = 23; + } else { + $dayview_layout .= ''; + } + for($j=0;$j<24;$j++) + { + $slice = $cal['calendar']->slices[$j]; + $act = $cal['calendar']->day_slice[$slice]->activities; + if(!empty($act)) + { + $temprows = count($act); + $no_of_rows = ($no_of_rows>$temprows)?$no_of_rows:$temprows; + } + } + for($i=$day_start_hour;$i<=$day_end_hour;$i++) + { + $time = array('hour'=>$i,'minute'=>0); + $sub_str = formatUserTimeString($time,$format); + $y = $i+1; + $hour_startat = formatUserTimeString(array('hour'=>$i,'minute'=>0),'24'); + $hour_endat = formatUserTimeString(array('hour'=>$y,'minute'=>0),'24'); + + $time_arr = getaddEventPopupTime($hour_startat,$hour_endat,$format); + $date = new DateTimeField(null); + $endDate = new DateTimeField(date('Y-m-d', time() + (1*24*50*60))); + $sttemp_date = $date->getDisplayDate(); + $endtemp_date = $endDate->getDisplayDate(); + + $js_string = ""; + if(isPermitted("Calendar","EditView") == "yes") + $js_string = 'onClick="fnvshobj(this,\'addEvent\'); gshow(\'addEvent\',\'Call\',\''.$sttemp_date.'\',\''.$endtemp_date.'\',\''.$time_arr['starthour'].'\',\''.$time_arr['startmin'].'\',\''.$time_arr['startfmt'].'\',\''.$time_arr['endhour'].'\',\''.$time_arr['endmin'].'\',\''.$time_arr['endfmt'].'\',\'hourview\',\'event\')"'; + $dayview_layout .= ' + '; + //To display events in Dayview + $dayview_layout .= getdayEventLayer($cal,$cal['calendar']->slices[$i],$no_of_rows); + $dayview_layout .= ''; + } + $dayview_layout .= '
  
  
'.$sub_str.'
+
'; + $cal_log->debug("Exiting getDayViewLayout() method..."); + return $dayview_layout; +} + +/** + * Function creates HTML to display Calendar WeekView + * @param array $cal - collections of objects and strings. + * return string $weekview_layout - html tags in string format + */ +function getWeekViewLayout(& $cal) +{ + global $current_user,$app_strings,$cal_log,$theme; + $category = getParentTab(); + $cal_log->debug("Entering getWeekViewLayout() method..."); + $date_format = $current_user->date_format; + $day_start_hour = $cal['calendar']->day_start_hour; + $day_end_hour = $cal['calendar']->day_end_hour; + $format = $cal['calendar']->hour_format; + $show_complete_view = false; + if(!empty($_REQUEST['complete_view'])){ + $show_complete_view =true; + } + $weekview_layout = ''; + $weekview_layout .= ''; + for ($col=0;$col<=7;$col++) + { + if($col==0) { + $weekview_layout .= ''; + if(!empty($show_complete_view)) { + $weekview_layout .= ''; + $day_start_hour = 0; + $day_end_hour = 23; + } else { + $weekview_layout .= ''; + } + } else { + //To display Days in Week + $cal['slice'] = $cal['calendar']->week_array[$cal['calendar']->slices[$col-1]]; + $date = $cal['calendar']->date_time->getThisweekDaysbyIndex($col); + $day = $date->getdayofWeek_inshort(); + $weekview_layout .= ''; + } + } + $weekview_layout .= '
'; + $weekview_layout .= ''; + $weekview_layout .= $date->get_Date().' - '.$day; + $weekview_layout .= ""; + $weekview_layout .= '
'; + $weekview_layout .= ''; + //To display Hours in User selected format + for($i=$day_start_hour;$i<=$day_end_hour;$i++) + { + $count = $i; + $hour_startat = formatUserTimeString(array('hour'=>$i,'minute'=>0),'24'); + $hour_endat = formatUserTimeString(array('hour'=>($i+1),'minute'=>0),'24'); + $time_arr = getaddEventPopupTime($hour_startat,$hour_endat,$format); + + $weekview_layout .= ''; + for ($column=1;$column<=1;$column++) + { + $time = array('hour'=>$i,'minute'=>0); + $sub_str = formatUserTimeString($time,$format); + $weekview_layout .= ''; + } + for ($column=0;$column<=6;$column++) + { + $temp_ts = $cal['calendar']->week_array[$cal['calendar']->slices[$column]]->start_time->ts; + $date = new DateTimeField(date('Y-m-d', $temp_ts)); + $sttemp_date = $date->getDisplayDate(); + if($i != 23) + $endtemp_date = $sttemp_date; + else + { + $endtemp_ts = $cal['calendar']->week_array[$cal['calendar']->slices[$column+1]]->start_time->ts; + $endDate = new DateTimeField(date('Y-m-d', $temp_ts)); + $endtemp_date = $endDate->getDisplayDate(); + } + + $weekview_layout .= ''; + $count = $count+24; + } + $weekview_layout .= ''; + } + $weekview_layout .= '
'; + $weekview_layout .=$sub_str; + $weekview_layout .= ''; + $weekview_layout .= ''; + //To display events in WeekView + $weekview_layout .=getweekEventLayer($cal,$cal['calendar']->week_hour_slices[$count]); + $weekview_layout .= '
'; + return $weekview_layout; + $cal_log->debug("Exiting getWeekViewLayout() method..."); + +} + +/** + * Function creates HTML to display Calendar MonthView + * @param array $cal - collections of objects and strings. + * return string $monthview_layout - html tags in string format + */ +function getMonthViewLayout(& $cal) +{ + global $current_user,$app_strings,$cal_log,$theme; + $category = getParentTab(); + $cal_log->debug("Entering getMonthViewLayout() method..."); + $date_format = $current_user->date_format; + $count = 0; + //To get no. of rows(weeks) in month + if ($cal['calendar']->month_array[$cal['calendar']->slices[35]]->start_time->month != $cal['calendar']->date_time->month) { + $rows = 5; + } else { + $rows = 6; + } + $format = $cal['calendar']->hour_format; + $hour_startat = formatUserTimeString(array('hour'=>date('H:i'),'minute'=>0),'24'); + $hour_endat = formatUserTimeString(array('hour'=>date('H:i',(time() + (60 * 60))),'minute'=>0),'24'); + $time_arr = getaddEventPopupTime($hour_startat,$hour_endat,$format); + $monthview_layout = ''; + $monthview_layout .= ''; + //To display days in week + for ($i = 0; $i < 7; $i ++) + { + $first_row = $cal['calendar']->month_array[$cal['calendar']->slices[$i]]; + $weekday = $first_row->start_time->getdayofWeek(); + $monthview_layout .= ''; + } + $monthview_layout .= '
'.$weekday.'
'; + $monthview_layout .= ' '; + $cnt = 0; + for ($i = 0; $i < $rows; $i ++) + { + $monthview_layout .= ''; + for ($j = 0; $j < 7; $j ++) + { + $temp_ts = $cal['calendar']->month_array[$cal['calendar']->slices[$count]]->start_time->ts; + $temp_date = (($date_format == 'dd-mm-yyyy')?(date('d-m-Y',$temp_ts)):(($date_format== 'mm-dd-yyyy')?(date('m-d-Y',$temp_ts)):(($date_format == 'yyyy-mm-dd')?(date('Y-m-d', $temp_ts)):('')))); + if($cal['calendar']->day_start_hour != 23) + $endtemp_date = $temp_date; + else + { + $endtemp_ts = $cal['calendar']->month_array[$cal['calendar']->slices[$count+1]]->start_time->ts; + $endtemp_date = (($date_format == 'dd-mm-yyyy')?(date('d-m-Y',$endtemp_ts)):(($date_format== 'mm-dd-yyyy')?(date('m-d-Y',$endtemp_ts)):(($date_format == 'yyyy-mm-dd')?(date('Y-m-d', $endtemp_ts)):('')))); + } + $cal['slice'] = $cal['calendar']->month_array[$cal['calendar']->slices[$count]]; + $monthclass = dateCheck($cal['slice']->start_time->get_formatted_date()); + if($monthclass != '') + $monthclass = 'calSel'; + else + $monthclass = 'dvtCellLabel'; + //to display dates in month + if ($cal['slice']->start_time->getMonth() == $cal['calendar']->date_time->getMonth()) + { + $monthview_layout .= ''; + } + else + { + $monthview_layout .= ''; + } + $count++; + } + $monthview_layout .= ''; + $monthview_layout .= ''; + for ($j = 0; $j < 7; $j ++) + { + $monthview_layout .= ''; + $cnt++; + } + $monthview_layout .= ''; + } + $monthview_layout .= '
'; + $monthview_layout .= ''; + $monthview_layout .= $cal['slice']->start_time->get_Date(); + $monthview_layout .= ''; + $monthview_layout .= ' 
'; + $monthview_layout .= getmonthEventLayer($cal,$cal['calendar']->slices[$cnt]); + $monthview_layout .= '
'; + return $monthview_layout; + $cal_log->debug("Exiting getMonthViewLayout() method..."); + +} + +/** + * Function creates HTML to display Calendar YearView + * @param array $cal - collections of objects and strings. + * return string $yearview_layout - html tags in string format + */ +function getYearViewLayout(& $cal) +{ + global $mod_strings,$cal_log; + $category = getParentTab(); + $cal_log->debug("Entering getYearViewLayout() method..."); + $yearview_layout = ''; + $yearview_layout .= ''; + $count = 0; + //year view divided as 4 rows and 3 columns + for($i=0;$i<4;$i++) + { + $yearview_layout .= ''; + for($j=0;$j<3;$j++) + { + $cal['slice'] = $cal['calendar']->year_array[$cal['calendar']->slices[$count]]; + $yearview_layout .= ''; + } + $yearview_layout .= '
+ + + + '; + for($w=0;$w<7;$w++) + { + $yearview_layout .= ''; + } + $yearview_layout .= ''; + $date = DateTimeField::convertToDBFormat($cal['calendar']->month_day_slices + [$count][35]); + list($_3rdyear,$_3rdmonth,$_3rddate) = explode("-",$date); + $date = DateTimeField::convertToDBFormat($cal['calendar']->month_day_slices + [$count][6]); + list($_2ndyear,$_2ndmonth,$_2nddate) = explode("-",$date); + //to get no. of rows(weeks) in month + if ($_3rdmonth != $_2ndmonth) { + $rows = 5; + } else { + $rows = 6; + } + $cnt = 0; + $date_stack = Array(); + for ($k = 0; $k < 5; $k ++) + { + $yearview_layout .= ''; + for ($mr = 0; $mr < 7; $mr ++) + { + $date = DateTimeField::convertToDBFormat($cal['calendar']->month_day_slices + [$count][$cnt]); + list($_1styear,$_1stmonth,$_1stdate) = explode("-", $date); + if(count($cal['slice']->activities) != 0) + { + for($act_count = 0;$act_countactivities);$act_count++) + { + array_push($date_stack,$cal['slice']->activities[$act_count]-> + start_time->get_formatted_date()); + } + } + if(in_array($cal['calendar']->month_day_slices[$count][$cnt],$date_stack)) + $event_class = 'class="eventDay"'; + else + $event_class = ''; + if($_1stmonth == $_2ndmonth) + $curclass = dateCheck($cal['calendar']->month_day_slices[$count][$cnt]); + if($curclass != '') + { + $class = 'class="'.$curclass.'"'; + $curclass = ''; + } + else + { + $class = $event_class; + $event_class = ''; + } + $date = $_1stdate + 0; + $month = $_1stmonth + 0; + $yearview_layout .= ''; + $cnt++; + } + $yearview_layout .= ''; + } + $yearview_layout .= ' +
+ + '.$cal['slice']->start_time->month_inlong.' + +
'.$mod_strings['cal_weekdays_short'][$w].'
'; + if($rows == 6 && $k==0) + { + $tdate = DateTimeField::convertToDBFormat($cal['calendar']-> + month_day_slices[$count][35+$mr]); + list($tempyear,$tempmonth,$tempdate) = explode("-", $tdate); + if($tempmonth == $_2ndmonth) + $yearview_layout .= ''.$tempdate; + } + if($_1stmonth == $_2ndmonth) + { + $yearview_layout .= ''.$date; + } + $yearview_layout .= '
+ + + '; + $count++; + } + $yearview_layout .= '
'; + return $yearview_layout; + $cal_log->debug("Exiting getYearViewLayout() method..."); + + +} + +/** + * Function creates HTML To display events in day view + * @param array $cal - collection of objects and strings + * @param string $slice - date:time(eg: 2006-07-13:10) + * returns string $eventlayer - hmtl in string format + */ +function getdayEventLayer(& $cal,$slice,$rows) +{ + global $mod_strings,$cal_log,$listview_max_textlength,$adb,$current_user,$theme; + $category = getParentTab(); + $cal_log->debug("Entering getdayEventLayer() method..."); + $eventlayer = ''; + $arrow_img_name = ''; + $rows = $rows + 1; + $last_colwidth = 100 / $rows; + $width = 100 / $rows ; + $act = $cal['calendar']->day_slice[$slice]->activities; + if(!empty($act)) + { + for($i=0;$iday_slice[$slice]->start_time->hour.'_'.$i; + $subject = $act[$i]->subject; + $id = $act[$i]->record; + if($listview_max_textlength && (strlen($subject)>$listview_max_textlength)) + $subject = substr($subject,0,$listview_max_textlength)."..."; + $format = $cal['calendar']->hour_format; + $duration_hour = $act[$i]->duration_hour; + $duration_min =$act[$i]->duration_minute; + $user = $act[$i]->owner; + $priority = $act[$i]->priority; + if($duration_min != '00') + $rowspan = $duration_hour+$rowspan; + elseif($duration_hour != '0') + { + $rowspan = $duration_hour; + } + $row_cnt = $rowspan; + $start_hour = timeString($act[$i]->start_time,$format); + $end_hour = timeString($act[$i]->end_time,$format); + $account_name = $act[$i]->accountname; + $eventstatus = $act[$i]->eventstatus; + $color = $act[$i]->color; + $image = vtiger_imageurl($act[$i]->image_name, $theme); + if($act[$i]->recurring) + $recurring = ''; + else + $recurring = ' '; + $height = $rowspan * 75; + $javacript_str = ''; + $idShared = "normal"; if($act[$i]->shared) $idShared = "shared"; + /*if($eventstatus != 'Held') + {*/ + if($idShared == "normal") + { + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete") == "yes") + $javacript_str = 'onMouseOver="cal_show(\''.$arrow_img_name.'\');" onMouseOut="fnHide_Event(\''.$arrow_img_name.'\');"'; + $action_str = ''; + } + else + { + $javacript_str = ''; + $eventlayer .= ' '; + } + $eventlayer .= ''; + + $visibility_query=$adb->pquery('SELECT visibility from vtiger_activity where activityid=?',array($id)); + $visibility = $adb->query_result($visibility_query,0,'visibility'); + $user_query = $adb->pquery("SELECT vtiger_crmentity.smownerid,vtiger_users.user_name from vtiger_crmentity,vtiger_users where crmid=? and vtiger_crmentity.smownerid=vtiger_users.id", array($id)); + $userid = $adb->query_result($user_query,0,"smownerid"); + $assigned_role_query=$adb->pquery("select roleid from vtiger_user2role where userid=?",array($userid)); + $assigned_role_id = $adb->query_result($assigned_role_query,0,"roleid"); + $role_list = $adb->pquery("SELECT * from vtiger_role WHERE parentrole LIKE '". formatForSqlLike($current_user->column_fields['roleid']) . formatForSqlLike($assigned_role_id) ."'",array()); + $is_shared = $adb->pquery("SELECT * from vtiger_sharedcalendar where userid=? and sharedid=?",array($userid,$current_user->id)); + $userName = getFullNameFromArray('Users', $current_user->column_fields); + if(($current_user->column_fields['is_admin']!='on' && $adb->num_rows($role_list)==0 && (($adb->num_rows($is_shared)==0 && ($visibility=='Public' || $visibility=='Private')) || $visibility=='Private')) && $userName!=$user) + { + $eventlayer .= '
'; + } + else{ + $eventlayer .= '
'; + } + $eventlayer .= ' + + + '; + $eventlayer .= ''; + + if(($current_user->column_fields['is_admin']!='on' && $adb->num_rows($role_list)==0 && (($adb->num_rows($is_shared)==0 && ($visibility=='Public' || $visibility=='Private')) || $visibility=='Private')) && $userName!=$user) + { + $eventlayer .= ''; + }else{ + $eventlayer .= ' + + '; + } $eventlayer .= '
'.$start_hour.' - '.$end_hour.'
'.$recurring.''.$user.' - '.$mod_strings['LBL_BUSY'].''.$subject.'
'; + if($act[$i]->shared) + $eventlayer .= ''; + else + $eventlayer .= ' '; + $eventlayer .= '('.$user.' | '.getTranslatedString($eventstatus).' | '.getTranslatedString($priority).')
'.$action_str.' 
'; + } + $eventlayer .= ' '; + } + else + { + $eventlayer .= ' '; + $eventlayer .= ' '; + } + $cal_log->debug("Exiting getdayEventLayer() method..."); + return $eventlayer; +} + +/** + * Function creates HTML To display events in week view + * @param array $cal - collection of objects and strings + * @param string $slice - date:time(eg: 2006-07-13:10) + * returns string $eventlayer - hmtl in string format + */ +function getweekEventLayer(& $cal,$slice) +{ + global $mod_strings,$cal_log,$listview_max_textlength,$adb,$current_user,$theme; + $category = getParentTab(); + $cal_log->debug("Entering getweekEventLayer() method..."); + $eventlayer = ''; + $arrow_img_name = ''; + $act = $cal['calendar']->week_slice[$slice]->activities; + if(!empty($act)) + { + for($i=0;$iweek_slice[$slice]->start_time->get_formatted_date().'_'.$act[$i]->start_time->hour.'_'.$i; + /* fix given by dartagnanlaf END --integrated by Minnie */ + $id = $act[$i]->record; + $subject = $act[$i]->subject; + if($listview_max_textlength && (strlen($subject)>$listview_max_textlength)) + $subject = substr($subject,0,$listview_max_textlength)."..."; + $format = $cal['calendar']->hour_format; + $start_hour = timeString($act[$i]->start_time, $format); + $end_hour = timeString($act[$i]->end_time, $format); + $account_name = $act[$i]->accountname; + $eventstatus = $act[$i]->eventstatus; + $user = $act[$i]->owner; + $priority = $act[$i]->priority; + $image = vtiger_imageurl($act[$i]->image_name, $theme); + $idShared = "normal"; if($act[$i]->shared) $idShared = "shared"; + if($act[$i]->recurring) + $recurring = ''; + else + $recurring = ' '; + $color = $act[$i]->color; + if($idShared == "normal") + { + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete") == "yes") + $javacript_str = 'onMouseOver="cal_show(\''.$arrow_img_name.'\');" onMouseOut="fnHide_Event(\''.$arrow_img_name.'\');"'; + $action_str = ''; + } + else + { + $javacript_str = ''; + $eventlayer .= ' '; + } + + $visibility_query=$adb->pquery('SELECT visibility from vtiger_activity where activityid=?',array($id)); + $visibility = $adb->query_result($visibility_query,0,'visibility'); + $user_query = $adb->pquery("SELECT vtiger_crmentity.smownerid,vtiger_users.user_name from vtiger_crmentity,vtiger_users where crmid=? and vtiger_crmentity.smownerid=vtiger_users.id", array($id)); + $userid = $adb->query_result($user_query,0,"smownerid"); + $assigned_role_query=$adb->pquery("select roleid from vtiger_user2role where userid=?",array($userid)); + $assigned_role_id = $adb->query_result($assigned_role_query,0,"roleid"); + $role_list = $adb->pquery("SELECT * from vtiger_role WHERE parentrole LIKE '". formatForSqlLike($current_user->column_fields['roleid']) . formatForSqlLike($assigned_role_id) ."'",array()); + $is_shared = $adb->pquery("SELECT * from vtiger_sharedcalendar where userid=? and sharedid=?",array($userid,$current_user->id)); + $userName = getFullNameFromArray('Users', $current_user->column_fields); + if(($current_user->column_fields['is_admin']!='on' && $adb->num_rows($role_list)==0 && (($adb->num_rows($is_shared)==0 && ($visibility=='Public' || $visibility=='Private')) || $visibility=='Private')) && $userName!=$user) + { + $eventlayer .= '
'; + } + else{ + $eventlayer .= '
'; + } + + $eventlayer .=' + + + + + + '; + if(($current_user->column_fields['is_admin']!='on' && $adb->num_rows($role_list)==0 && (($adb->num_rows($is_shared)==0 && ($visibility=='Public' || $visibility=='Private')) || $visibility=='Private')) && $userName!=$user) + { + $eventlayer .= ''; + }else{//CALUSER CUST END + $eventlayer .= ' + + '; + } + $eventlayer .= '
'.$start_hour.' - '.$end_hour.'
'.$recurring.''.$user.'-'.$mod_strings['LBL_BUSY'].''.$subject.'
'; + if($act[$i]->shared) + $eventlayer .= ''; + else + $eventlayer .= ' '; + $eventlayer .= '('.$user.' | '.getTranslatedString($eventstatus).' | '.getTranslatedString($priority).')
'.$action_str.' 

'; + } + $cal_log->debug("Exiting getweekEventLayer() method..."); + return $eventlayer; + } + +} + +/** + * Function creates HTML To display events in month view + * @param array $cal - collection of objects and strings + * @param string $slice - date(eg: 2006-07-13) + * returns string $eventlayer - hmtl in string format + */ +function getmonthEventLayer(& $cal,$slice) +{ + global $mod_strings,$cal_log,$adb,$current_user,$theme; + $category = getParentTab(); + $cal_log->debug("Entering getmonthEventLayer() method..."); + $eventlayer = ''; + $arrow_img_name = ''; + $act = $cal['calendar']->month_array[$slice]->activities; + if(!empty($act)) + { + $no_of_act = count($act); + if($no_of_act>2) + { + $act_row = 2; + $remin_list = $no_of_act - $act_row; + } + else + { + $act_row = $no_of_act; + $remin_list = null; + } + for($i=0;$i<$act_row;$i++) + { + $arrow_img_name = 'event'.$cal['calendar']->month_array[$slice]->start_time->hour.'_'.$i; + $id = $act[$i]->record; + $subject = $act[$i]->subject; + if(strlen($subject)>10) + $subject = substr($subject,0,10)."..."; + $format = $cal['calendar']->hour_format; + $start_hour = timeString($act[$i]->start_time,$format); + $end_hour = timeString($act[$i]->end_time,$format); + $account_name = $act[$i]->accountname; + $image = vtiger_imageurl($act[$i]->image_name, $theme); + $color = $act[$i]->color; + //Added for User Based Customview for Calendar Module + $visibility_query=$adb->pquery('SELECT visibility from vtiger_activity where activityid=?',array($id)); + $visibility = $adb->query_result($visibility_query,0,'visibility'); + $user_query = $adb->pquery("SELECT vtiger_crmentity.smownerid,vtiger_users.user_name from vtiger_crmentity,vtiger_users where crmid=? and vtiger_crmentity.smownerid=vtiger_users.id", array($id)); + $userid = $adb->query_result($user_query,0,"smownerid"); + $username = $adb->query_result($user_query,0,"user_name"); + $assigned_role_query=$adb->pquery("select roleid from vtiger_user2role where userid=?",array($userid)); + $assinged_role_id = $adb->query_result($assigned_role_query,0,"roleid"); + $role_list = $adb->pquery("SELECT * from vtiger_role WHERE parentrole LIKE '". formatForSqlLike($current_user->column_fields['roleid']) . formatForSqlLike($assinged_role_id) ."'",array()); + $is_shared = $adb->pquery("SELECT * from vtiger_sharedcalendar where userid=? and sharedid=?",array($userid,$current_user->id)); + + if(($current_user->column_fields['is_admin']!='on' && $adb->num_rows($role_list)==0 && (($adb->num_rows($is_shared)==0 && ($visibility=='Public' || $visibility=='Private')) || $visibility=='Private')) && $current_user->id != $userid) + { + $eventlayer .='
+  '.$username.' - '.$mod_strings["LBL_BUSY"].' +

'; + }else{ + $eventlayer .='
'; + } + } + + if($remin_list != null) + { + $eventlayer .=''; + } + $cal_log->debug("Exiting getmonthEventLayer() method..."); + return $eventlayer; + } +} + +/** + * Function to get events list scheduled between specified dates + * @param array $calendar - collection of objects and strings + * @param string $start_date - date string + * @param string $end_date - date string + * @param string $info - string 'listcnt' or empty string. if 'listcnt' means it returns no. of events and no. of pending events in array format else it returns events list in array format + * return array $Entries - eventslists in array format + */ +function getEventList(& $calendar,$start_date,$end_date,$info='') +{ + global $log,$theme; + $Entries = Array(); + $category = getParentTab(); + global $adb,$current_user,$mod_strings,$app_strings,$cal_log,$listview_max_textlength,$list_max_entries_per_page; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + $cal_log->debug("Entering getEventList() method..."); + + $and = "AND ( + ( + ( + (CAST(CONCAT(date_start,' ',time_start) AS DATETIME) >= ? AND CAST(CONCAT(date_start,' ',time_start) AS DATETIME) <= ?) + OR (CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) <= ? ) + OR (CAST(CONCAT(date_start,' ',time_start) AS DATETIME) <= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ?) + ) + AND vtiger_recurringevents.activityid is NULL + ) + OR ( + (CAST(CONCAT(vtiger_recurringevents.recurringdate,' ',time_start) AS DATETIME) >= ? + AND CAST(CONCAT(vtiger_recurringevents.recurringdate,' ',time_start) AS DATETIME) <= ?) + OR (CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) <= ?) + OR (CAST(CONCAT(vtiger_recurringevents.recurringdate,' ',time_start) AS DATETIME) <= ? + AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ?) + ) + )"; + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT vtiger_groups.groupname, $userNameSql as user_name,vtiger_crmentity.smownerid, vtiger_crmentity.crmid, + vtiger_activity.* FROM vtiger_activity + INNER JOIN vtiger_crmentity + ON vtiger_crmentity.crmid = vtiger_activity.activityid + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + LEFT JOIN vtiger_users + ON vtiger_users.id = vtiger_crmentity.smownerid + LEFT OUTER JOIN vtiger_recurringevents + ON vtiger_recurringevents.activityid = vtiger_activity.activityid + WHERE vtiger_crmentity.deleted = 0 + AND (vtiger_activity.activitytype not in ('Emails','Task')) $and "; + + $list_query = $query." AND vtiger_crmentity.smownerid = " . $current_user->id; + + // User Select Customization: Changes should made also in (Appointment::readAppointment) + $query_filter_prefix = calendarview_getSelectedUserFilterQuerySuffix(); + $query .= $query_filter_prefix; + $count_query .= $query_filter_prefix; + // END + + $startDate = new DateTimeField($start_date.' 00:00'); + $endDate = new DateTimeField($end_date. ' 23:59'); + $params = $info_params = array( + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue() + ); + if($info != '') + { + $groupids = explode(",", fetchUserGroupids($current_user->id)); // Explode can be removed, once implode is removed from fetchUserGroupids + if (count($groupids) > 0) { + + $com_q = " AND (vtiger_crmentity.smownerid = ? + OR vtiger_groups.groupid in (". generateQuestionMarks($groupids) .")) + GROUP BY vtiger_activity.activityid"; + } else { + $com_q = " AND vtiger_crmentity.smownerid = ? + GROUP BY vtiger_activity.activityid"; + } + + $pending_query = $query." AND (vtiger_activity.eventstatus = 'Planned')".$com_q; + $total_q = $query."".$com_q; + array_push($info_params, $current_user->id); + + if (count($groupids) > 0) { + array_push($info_params, $groupids); + } + + $total_res = $adb->pquery($total_q, $info_params); + $total = $adb->num_rows($total_res); + + $res = $adb->pquery($pending_query, $info_params); + $pending_rows = $adb->num_rows($res); + $cal_log->debug("Exiting getEventList() method..."); + return Array('totalevent'=>$total,'pendingevent'=>$pending_rows); + } + if($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $defaultOrgSharingPermission[16] == 3) + { + $sec_parameter=getCalendarViewSecurityParameter(); + $query .= $sec_parameter; + } + if(isset($_REQUEST['type']) && $_REQUEST['type'] == 'search') + { + $search_where = calendar_search_where($_REQUEST['field_name'],$_REQUEST['search_option'],$_REQUEST['search_text']); + $group_cond .= $search_where; + } + $group_cond .= " GROUP BY vtiger_activity.activityid ORDER BY vtiger_activity.date_start,vtiger_activity.time_start ASC"; + + //Ticket 6476 + if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){ + $count_result = $adb->pquery( mkCountQuery( $query),$params); + $noofrows = $adb->query_result($count_result,0,"count"); + }else{ + $noofrows = null; + } + global $currentModule; + $queryMode = (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true'); + //$viewid is used as a key for cache query and other info so pass the dates as viewid + $viewid = $start_date.$end_date; + $start = ListViewSession::getRequestCurrentPage($currentModule, $adb->convert2sql($query, + $params), $viewid, $queryMode); + + $navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$noofrows); + + //end + + $start_rec = ($start-1) * $list_max_entries_per_page; + $end_rec = $navigation_array['end_val']; + //print_r($navigation_array);die(); + //echo $end_rec.'val'; + + $list_query = $adb->convert2Sql($query, $params); + $_SESSION['Calendar_listquery'] = $list_query; + + if($start_rec < 0) + $start_rec = 0; + $query .= $group_cond." limit $start_rec,$list_max_entries_per_page"; + + if( $adb->dbType == "pgsql"){ + $query = fixPostgresQuery($query, $log, 0); + } + + + + $result = $adb->pquery($query, $params); + $rows = $adb->num_rows($result); + $c = 0; + if($start > 1) + $c = ($start-1) * $list_max_entries_per_page; + for($i=0;$i<$rows;$i++) + { + $element = Array(); + $element['no'] = $c+1; + $image_tag = ""; + $contact_data = ""; + $more_link = ""; + $start_time = $adb->query_result($result,$i,"time_start"); + $end_time = $adb->query_result($result,$i,"time_end"); + $date_start = $adb->query_result($result,$i,"date_start"); + $due_date = $adb->query_result($result,$i,"due_date"); + $date = new DateTimeField($date_start.' '.$start_time); + $endDate = new DateTimeField($due_date.' '.$end_time); + if(!empty($start_time)){ + $start_time = $date->getDisplayTime(); + } + if(!empty($end_time)){ + $end_time = $endDate->getDisplayTime(); + } + $format = $calendar['calendar']->hour_format; + $value = getaddEventPopupTime($start_time,$end_time,$format); + $start_hour = $value['starthour'].':'.$value['startmin'].''.$value['startfmt']; + $end_hour = $value['endhour'] .':'.$value['endmin'].''.$value['endfmt']; + $element['starttime'] = $date->getDisplayDate().' '.$start_hour; + $element['endtime'] = $endDate->getDisplayDate().' '.$end_hour; + $contact_id = $adb->query_result($result,$i,"contactid"); + $id = $adb->query_result($result,$i,"activityid"); + $subject = $adb->query_result($result,$i,"subject"); + $eventstatus = $adb->query_result($result,$i,"eventstatus"); + $assignedto = $adb->query_result($result,$i,"user_name"); + $userid = $adb->query_result($result,$i,"smownerid"); + $idShared = "normal"; + if(!empty($assignedto) && $userid != $current_user->id && $adb->query_result($result,$i,"visibility") == "Public") + { + $que = "select * from vtiger_sharedcalendar where sharedid=? and userid=?"; + $row = $adb->pquery($que, array($current_user->id, $userid)); + $no = $adb->getRowCount($row); + if($no > 0) $idShared = "shared"; + else $idShared = "normal"; + + + } + if($listview_max_textlength && (strlen($subject)>$listview_max_textlength)) + $subject = substr($subject,0,$listview_max_textlength)."..."; + if($contact_id != '') + { + $displayValueArray = getEntityName('Contacts', $contact_id); + if (!empty($displayValueArray)) { + foreach ($displayValueArray as $key => $field_value) { + $contactname = $field_value; + } + } + $contact_data = "".$contactname.","; + } + $more_link = "[".$mod_strings['LBL_MORE']."...]"; + $type = $adb->query_result($result,$i,"activitytype"); + if($type == 'Call') + $image_tag = " ".$app_strings['Call']; + else if($type == 'Meeting') + $image_tag = " ".$app_strings['Meeting']; + else + $image_tag = " ".getTranslatedString($type); + $element['eventtype'] = $image_tag; + $element['eventdetail'] = $contact_data." ".$subject." ".$more_link; + /*if(getFieldVisibilityPermission('Events',$current_user->id,'parent_id') == '0') + { + $element['relatedto']= getRelatedTo('Calendar',$result,$i); + }*/ + if($idShared == "normal") + { + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete")=="yes") + $element['action'] ="date_time->hour."\",\"".$calendar['calendar']->date_time->get_DB_formatted_date()."\",\"event\");' src='" . vtiger_imageurl('cal_event.jpg', $theme). "' border='0'>"; + } + else + { + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete")=="yes") + $element['action']=""; + } + if(getFieldVisibilityPermission('Events',$current_user->id,'eventstatus') == '0') + { + if(!$is_admin && $eventstatus != '') + { + $roleid=$current_user->roleid; + $roleids = Array(); + $subrole = getRoleSubordinates($roleid); + if(count($subrole)> 0) + $roleids = $subrole; + array_push($roleids, $roleid); + + //here we are checking wheather the table contains the sortorder column .If sortorder is present in the main picklist table, then the role2picklist will be applicable for this table... + + $sql="select * from vtiger_eventstatus where eventstatus=?"; + $res = $adb->pquery($sql,array(decode_html($eventstatus))); + $picklistvalueid = $adb->query_result($res,0,'picklist_valueid'); + if ($picklistvalueid != null) { + $pick_query="select * from vtiger_role2picklist where picklistvalueid=$picklistvalueid and roleid in (". generateQuestionMarks($roleids) .")"; + $res_val=$adb->pquery($pick_query,array($roleids)); + $num_val = $adb->num_rows($res_val); + } + if($num_val > 0) + $element['status'] = getTranslatedString(decode_html($eventstatus)); + else + $element['status'] = "".$app_strings['LBL_NOT_ACCESSIBLE'].""; + + + }else + $element['status'] = getTranslatedString(decode_html($eventstatus)); + } + if(!empty($assignedto)) + $element['assignedto'] = $assignedto; + else + $element['assignedto'] = $adb->query_result($result,$i,"groupname"); + $element['visibility'] = $adb->query_result($result,$i,"visibility"); + $c++; + $Entries[] = $element; + } + $ret_arr[0] = $Entries; + $ret_arr[1] = $navigation_array; + $cal_log->debug("Exiting getEventList() method..."); + return $ret_arr; +} + +/** + * Function to get todos list scheduled between specified dates + * @param array $calendar - collection of objects and strings + * @param string $start_date - date string + * @param string $end_date - date string + * @param string $info - string 'listcnt' or empty string. if 'listcnt' means it returns no. of todos and no. of pending todos in array format else it returns todos list in array format + * return array $Entries - todolists in array format + */ +function getTodoList(& $calendar,$start_date,$end_date,$info='') +{ + global $log,$app_strings,$theme; + $Entries = Array(); + $category = getParentTab(); + global $adb,$current_user,$mod_strings,$cal_log,$list_max_entries_per_page; + $cal_log->debug("Entering getTodoList() method..."); + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT vtiger_groups.groupname, $userNameSql as user_name, vtiger_crmentity.crmid, vtiger_cntactivityrel.contactid, + vtiger_activity.* FROM vtiger_activity + INNER JOIN vtiger_crmentity + ON vtiger_crmentity.crmid = vtiger_activity.activityid + LEFT JOIN vtiger_cntactivityrel + ON vtiger_cntactivityrel.activityid = vtiger_activity.activityid + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + LEFT JOIN vtiger_users + ON vtiger_users.id = vtiger_crmentity.smownerid"; + $query .= getNonAdminAccessControlQuery('Calendar',$current_user); + $query .= "WHERE vtiger_crmentity.deleted = 0 AND vtiger_activity.activitytype = 'Task'". + " AND ((CAST(CONCAT(date_start,' ',time_start) AS DATETIME) >= ? AND CAST(CONCAT(date_start,' ',time_start) AS DATETIME) <= ?) + OR (CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) <= ? ) + OR (CAST(CONCAT(date_start,' ',time_start) AS DATETIME) <= ? AND CAST(CONCAT(due_date,' ',time_end) AS DATETIME) >= ?) + )"; + + $list_query = $query." AND vtiger_crmentity.smownerid = " . $current_user->id; + + $startDate = new DateTimeField($start_date.' 00:00'); + $endDate = new DateTimeField($end_date. ' 23:59'); + $params = $info_params = array($startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue(), + $startDate->getDBInsertDateTimeValue(), $endDate->getDBInsertDateTimeValue()); + + if($info != '') + { + //added to fix #4816 + $groupids = explode(",", fetchUserGroupids($current_user->id)); + if (count($groupids) > 0 && !is_admin($current_user)) { + $com_q = " AND (vtiger_crmentity.smownerid = ? + OR vtiger_groups.groupid in (". generateQuestionMarks($groupids) ."))"; + array_push($info_params, $current_user->id); + array_push($info_params, $groupids); + } elseif(!is_admin($current_user)) { + $com_q = " AND vtiger_crmentity.smownerid = ?"; + array_push($info_params, $current_user->id); + } + //end + + $pending_query = $query." AND (vtiger_activity.status != 'Completed')".$com_q; + $total_q = $query."".$com_q; + if( $adb->dbType == "pgsql") + { + $pending_query = fixPostgresQuery( $pending_query, $log, 0); + $total_q = fixPostgresQuery( $total_q, $log, 0); + } + $total_res = $adb->pquery($total_q, $info_params); + $total = $adb->num_rows($total_res); + + $res = $adb->pquery($pending_query, $info_params); + $pending_rows = $adb->num_rows($res); + + $cal_log->debug("Exiting getTodoList() method..."); + return Array('totaltodo'=>$total,'pendingtodo'=>$pending_rows); + } + + $group_cond = ''; + $group_cond .= " ORDER BY vtiger_activity.date_start,vtiger_activity.time_start ASC"; + if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') + $start = vtlib_purify($_REQUEST['start']); + else + $start = 1; + +//T6477 changes + if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){ + $count_res = $adb->pquery(mkCountQuery($query), $params); + $total_rec_count = $adb->query_result($count_res,0,'count'); + }else{ + $total_rec_count = null; + } + + $navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$total_rec_count); + + $start_rec = ($start-1) * $list_max_entries_per_page; + $end_rec = $navigation_array['end_val']; + + $list_query = $adb->convert2Sql($query, $params); + $_SESSION['Calendar_listquery'] = $list_query; + + if($start_rec < 0) + $start_rec = 0; + + //ends + $query .= $group_cond." limit $start_rec,$list_max_entries_per_page"; + + if( $adb->dbType == "pgsql"){ + $query = fixPostgresQuery( $query, $log, 0); + } + + $result = $adb->pquery($query, $params); + $rows = $adb->num_rows($result); + $c=0; + if($start > 1) + $c = ($start-1) * $list_max_entries_per_page; + for($i=0;$i<$rows;$i++) + { + + $element = Array(); + $contact_name = ''; + $element['no'] = $c+1; + $more_link = ""; + $start_time = $adb->query_result($result,$i,"time_start"); + $date_start = $adb->query_result($result,$i,"date_start"); + $due_date = $adb->query_result($result,$i,"due_date"); + $date = new DateTimeField($date_start.' '.$start_time); + $endDate = new DateTimeField($due_date); + if(!empty($start_time)){ + $start_time = $date->getDisplayTime(); + } + $format = $calendar['calendar']->hour_format; + $value = getaddEventPopupTime($start_time,$start_time,$format); + $element['starttime'] = $value['starthour'].':'.$value['startmin'].''.$value['startfmt']; + $element['startdate'] = $date->getDisplayDate(); + $element['duedate'] = $endDate->getDisplayDate(); + + $id = $adb->query_result($result,$i,"activityid"); + $subject = $adb->query_result($result,$i,"subject"); + $more_link = "".$subject.""; + $element['tododetail'] = $more_link; + if(getFieldVisibilityPermission('Calendar',$current_user->id,'taskstatus') == '0') + { + $taskstatus = $adb->query_result($result,$i,"status"); + + if(!$is_admin && $taskstatus != '') + { + $roleid=$current_user->roleid; + $roleids = Array(); + $subrole = getRoleSubordinates($roleid); + if(count($subrole)> 0) + $roleids = $subrole; + array_push($roleids, $roleid); + + //here we are checking wheather the table contains the sortorder column .If sortorder is present in the main picklist table, then the role2picklist will be applicable for this table... + + $sql="select * from vtiger_taskstatus where taskstatus=?"; + $res = $adb->pquery($sql,array(decode_html($taskstatus))); + $picklistvalueid = $adb->query_result($res,0,'picklist_valueid'); + if ($picklistvalueid != null) { + $pick_query="select * from vtiger_role2picklist where picklistvalueid=$picklistvalueid and roleid in (". generateQuestionMarks($roleids) .")"; + $res_val=$adb->pquery($pick_query,array($roleids)); + $num_val = $adb->num_rows($res_val); + } + if($num_val > 0) + $element['status'] = getTranslatedString(decode_html($taskstatus)); + else + $element['status'] = "".$app_strings['LBL_NOT_ACCESSIBLE'].""; + + + }else + $element['status'] = getTranslatedString(decode_html($taskstatus)); + + + } + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete") == "yes") + $element['action'] ="date_time->hour."\",\"".$calendar['calendar']->date_time->get_DB_formatted_date()."\",\"todo\");' src='" . vtiger_imageurl('cal_event.jpg', $theme). "' border='0'>"; + $assignedto = $adb->query_result($result,$i,"user_name"); + if(!empty($assignedto)) + $element['assignedto'] = $assignedto; + else + $element['assignedto'] = $adb->query_result($result,$i,"groupname"); + $c++; + $Entries[] = $element; + } + $ret_arr[0] = $Entries; + $ret_arr[1] = $navigation_array; + $cal_log->debug("Exiting getTodoList() method..."); + return $ret_arr; +} + +/** + * Function to get number of Events and Todos Info + * @param array $cal - collection of objects and strings + * @param string $mode - string 'listcnt' or may be empty. if empty means get Events/Todos ListView else get total events/todos and no. of pending events/todos Info. + * return array $event_todo_info - collection of events/todos info. + */ +function getEventInfo(& $cal, $mode) +{ + global $mod_strings,$cal_log; + $cal_log->debug("Entering getEventInfo() method..."); + $event = Array(); + $event['event']=getEventListView($cal, $mode); + $event_info = ""; + $event_info .= $mod_strings['LBL_TOTALEVENTS']." ".$event['event']['totalevent']; + if($event['event']['pendingevent'] != null) + $event_info .= ", ".$event['event']['pendingevent']." ".$mod_strings['LBL_PENDING']; + $cal_log->debug("Exiting getEventInfo() method..."); + + return $event_info; +} + +function getTodoInfo(& $cal, $mode) +{ + global $mod_strings,$cal_log; + $cal_log->debug("Entering getTodoInfo() method..."); + $todo = Array(); + $todo['todo'] = getTodosListView($cal, $mode); + $todo_info = ""; + $todo_info .=$mod_strings['LBL_TOTALTODOS']." ".$todo['todo']['totaltodo']; + if($todo['todo']['pendingtodo'] != null) + $todo_info .= ", ".$todo['todo']['pendingtodo']." ".$mod_strings['LBL_PENDING']; + $cal_log->debug("Exiting getTodoInfo() method..."); + + return $todo_info; +} + + +/** + * Function creates HTML to display Events ListView + * @param array $entry_list - collection of strings(Event Information) + * return string $list_view - html tags in string format + */ +function constructEventListView(& $cal,$entry_list,$navigation_array='') +{ + global $mod_strings,$app_strings,$adb,$cal_log,$current_user,$theme; + $cal_log->debug("Entering constructEventListView() method..."); + $format = $cal['calendar']->hour_format; + $date_format = $current_user->date_format; + $date = new DateTimeField(null); + $endDate = new DateTimeField(date("Y-m-d H:i:s", (time() + + (1 * 24 * 60 * 60)))); + $hour_startat = $date->getDisplayTime(); + $hour_endat = $endDate->getDisplayTime(); + $time_arr = getaddEventPopupTime($hour_startat,$hour_endat,$format); + $temp_ts = $cal['calendar']->date_time->ts; + //to get date in user selected date format + $temp_date = $date->getDisplayDate(); + if($cal['calendar']->day_start_hour != 23) + $endtemp_date = $temp_date; + else + { + $endtemp_date = $endDate->getDisplayDate(); + } + $list_view = ""; + $start_datetime = $app_strings['LBL_START_DATE_TIME']; + $end_datetime = $app_strings['LBL_END_DATE_TIME']; + //Events listview header labels + $header = Array('0'=>'#', + '1'=>$start_datetime, + '2'=>$end_datetime, + '3'=>$mod_strings['LBL_EVENTTYPE'], + '4'=>$mod_strings['LBL_EVENTDETAILS'] + ); + $header_width = Array('0'=>'5%', + '1'=>'15%', + '2'=>'15%', + '3'=>'10%', + '4'=>'33%' + ); + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete") == "yes") + { + array_push($header,$mod_strings['LBL_ACTION']); + array_push($header_width,'10%'); + } + if(getFieldVisibilityPermission('Events',$current_user->id,'eventstatus') == '0') + { + array_push($header,$mod_strings['LBL_STATUS']); + array_push($header_width,'$10%'); + } + array_push($header,$mod_strings['LBL_ASSINGEDTO']); + array_push($header_width,'15%'); + + $list_view .=" + "; + $header_rows = count($header); + + $navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string,"Calendar","index"); + + if($navigationOutput != '') { + $list_view .= ""; + } + $list_view .= ""; + for($i=0;$i<$header_rows;$i++) { + $list_view .=""; + } + $list_view .=""; + $rows = count($entry_list); + if($rows != 0) { + $userName = getFullNameFromArray('Users', $current_user->column_fields); + + for($i=0;$i"; + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $assigned_role_query=$adb->pquery("select vtiger_user2role.roleid,vtiger_user2role.userid + from vtiger_user2role + INNER JOIN vtiger_users ON vtiger_users.id=vtiger_user2role.userid + WHERE $userNameSql=?", + array($entry_list[$i]['assignedto'])); + $assigned_user_role_id = $adb->query_result($assigned_role_query,0,"roleid"); + $assigned_user_id = $adb->query_result($assigned_role_query,0,"userid"); + $role_list = $adb->pquery("SELECT * from vtiger_role WHERE parentrole LIKE '". formatForSqlLike($current_user->column_fields['roleid']) . formatForSqlLike($assigned_user_role_id) ."'",array()); + $is_shared = $adb->pquery("SELECT * from vtiger_sharedcalendar where userid=? and sharedid=?",array($assigned_user_id,$current_user->id)); + + foreach($entry_list[$i] as $key=>$entry) { + if($key!='visibility') { + if(($key=='eventdetail'|| $key=='action') + && ($current_user->column_fields['is_admin']!='on' + && $adb->num_rows($role_list)==0 + && ($adb->num_rows($is_shared)==0 || $entry_list[$i]['visibility']=='Private')) + && $userName!=$entry_list[$i]['assignedto']) { + + if($key=='eventdetail') + $list_view .=""; + else + $list_view .=""; + }else + $list_view .=""; + } + } + $list_view .=""; + } + } + else + { + $list_view .=""; + } + $list_view .="
"; + $list_view .= "".$navigationOutput."
".$header[$i]."
".$entry_list[$i]['assignedto']." - ".$mod_strings['LBL_BUSY']."".$app_strings['LBL_NOT_ACCESSIBLE']."$entry
+ "; + $list_view .="
+ + + + + + "; + //checking permission for Create/Edit Operation + if(isPermitted("Calendar","EditView") == "yes") + { + $list_view .=""; + } + else + { + $list_view .=""; + } + $list_view .=" +
+ ".$app_strings['LBL_NO']." ".$app_strings['Events']." ".$app_strings['LBL_FOUND']." !
".$app_strings['LBL_YOU_CAN_CREATE']." ".$app_strings['LBL_AN']." ".$app_strings['Event']." ".$app_strings['LBL_NOW'].". ".$app_strings['LBL_CLICK_THE_LINK'].":
+   -".$app_strings['LBL_CREATE']." ".$app_strings['LBL_AN']." ".$app_strings['Event']."
+
".$app_strings['LBL_YOU_ARE_NOT_ALLOWED_TO_CREATE']." ".$app_strings['LBL_AN']." ".$app_strings['Event']."
+
"; + $list_view .="
"; + $cal_log->debug("Exiting constructEventListView() method..."); + return $list_view; +} + +/** + * Function creates HTML to display Todos ListView + * @param array $todo_list - collection of strings(Todo Information) + * @param array $cal - collection of objects and strings + * return string $list_view - html tags in string format + */ +function constructTodoListView($todo_list,$cal,$subtab,$navigation_array='') +{ + global $mod_strings,$cal_log,$adb,$theme; + $cal_log->debug("Entering constructTodoListView() method..."); + global $current_user,$app_strings; + $date_format = $current_user->date_format; + $format = $cal['calendar']->hour_format; + $date = new DateTimeField(null); + $endDate = new DateTimeField(date("Y-m-d H:i:s", (time() + + (1 * 24 * 60 * 60)))); + $hour_startat = $date->getDisplayTime(); + $hour_endat = $endDate->getDisplayTime(); + + $time_arr = getaddEventPopupTime($hour_startat,$hour_endat,$format); + //to get date in user selected date format + $temp_date = $date->getDisplayDate(); + if($cal['calendar']->day_start_hour != 23) + $endtemp_date = $temp_date; + else { + $endtemp_date = $endDate->getDisplayDate(); + } + $list_view = ""; + //labels of listview header + if($cal['view'] == 'day') + { + $colspan = 9; + $header = Array('0'=>'#','1'=>$mod_strings['LBL_TIME'], + '2'=>$mod_strings['LBL_START_DATE'], + '3'=>$mod_strings['LBL_DUE_DATE'], + '4'=>$mod_strings['LBL_TODO']); + $header_width = Array('0'=>'5%','1'=>'10%','2'=>'10%','3'=>'38%',); + if(getFieldVisibilityPermission('Calendar',$current_user->id,'taskstatus') == '0') + { + array_push($header,$mod_strings['LBL_STATUS']); + array_push($header_width,'10%'); + } + + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete") == "yes") + { + array_push($header,$mod_strings['LBL_ACTION']); + array_push($header_width,'10%'); + } + array_push($header,$mod_strings['LBL_ASSINGEDTO']); + array_push($header_width,'15%'); + } + else + { + $colspan = 10; + $header = Array('0'=>'#', + '1'=>$mod_strings['LBL_TIME'], + '2'=>$mod_strings['LBL_START_DATE'], + '3'=>$mod_strings['LBL_DUE_DATE'], + '4'=>$mod_strings['LBL_TODO'] + ); + $header_width = Array('0'=>'5%', + '1'=>'10%', + '2'=>'10%', + '3'=>'10%', + '4'=>'28%' + ); + if(getFieldVisibilityPermission('Calendar',$current_user->id,'taskstatus') == '0') + { + array_push($header,$mod_strings['LBL_STATUS']); + array_push($header_width,'10%'); + } + if(isPermitted("Calendar","EditView") == "yes" || isPermitted("Calendar","Delete") == "yes") + { + array_push($header,$mod_strings['LBL_ACTION']); + } + array_push($header,$mod_strings['LBL_ASSINGEDTO']); + array_push($header_width,'15%'); + + } + if($current_user->column_fields['is_admin']=='on') + $Res = $adb->pquery("select * from vtiger_activitytype",array()); + else + { + $roleid=$current_user->roleid; + $subrole = getRoleSubordinates($roleid); + if(count($subrole)> 0) + { + $roleids = $subrole; + array_push($roleids, $roleid); + } + else + { + $roleids = $roleid; + } + + if (count($roleids) > 1) { + $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid in (". generateQuestionMarks($roleids) .") and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc",array($roleids)); + } else { + $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid = ? and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc",array($roleid)); + } + } + $eventlist=''; + for($i=0; $i<$adb->num_rows($Res);$i++) + { + $eventlist .= $adb->query_result($Res,$i,'activitytype').";"; + } + + $list_view .=" + "; + //checking permission for Create/Edit Operation + if(isPermitted("Calendar","EditView") == "yes") + { + $list_view .=" + "; + } + else + { + $list_view .=""; + } + $list_view .=" + + +
 
+ ".$mod_strings['LBL_ADD']." +
 ".getTodoInfo($cal,'listcnt')."  
+ +
+ "; + $header_rows = count($header); + $navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string,"Calendar","index"); + + if($navigationOutput != '') + { + $list_view .= ""; + } + $list_view .= ""; + for($i=0;$i<$header_rows;$i++) + { + $list_view .=""; + } + $list_view .=""; + $rows = count($todo_list); + if($rows != 0) + { + for($i=0;$i$entry) + { + $list_view .=""; + } + $list_view .=""; + } + } + else + { + $list_view .=""; + } + $list_view .="
"; + $list_view .= "".$navigationOutput."
".$header[$i]."
".$entry."
"; + $list_view .="
+ + + + + + "; + //checking permission for Create/Edit Operation + if(isPermitted("Calendar","EditView") == "yes") + { + $list_view .=""; + } + else + { + $list_view .=""; + } + + $list_view .=" +
+ ".$app_strings['LBL_NO']." ".$app_strings['Todos']." ".$app_strings['LBL_FOUND']." !
".$app_strings['LBL_YOU_CAN_CREATE']." ".$app_strings['LBL_A']." ".$app_strings['Todo']." ".$app_strings['LBL_NOW'].". ".$app_strings['LBL_CLICK_THE_LINK']." :
+   -".$app_strings['LBL_CREATE']." ".$app_strings['LBL_A']." ".$app_strings['Todo']." +
".$app_strings['LBL_YOU_ARE_NOT_ALLOWED_TO_CREATE']." ".$app_strings['LBL_A']." ".$app_strings['Todo']."
+
"; + $list_view .="

"; + $cal_log->debug("Exiting constructTodoListView() method..."); + return $list_view; +} + +/** + * Function returns the list of privileges and permissions of the events that the current user can view the details of. + * return string - query that is used as secondary parameter to fetch the events that the user can view and the schedule of the users + */ +function getCalendarViewSecurityParameter() +{ + global $current_user; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + + require_once('modules/Calendar/CalendarCommon.php'); + $shared_ids = getSharedCalendarId($current_user->id); + if(isset($shared_ids) && $shared_ids != '') + $condition = " or (vtiger_crmentity.smownerid in($shared_ids)) or (vtiger_crmentity.smownerid NOT LIKE ($current_user->id))";// and vtiger_activity.visibility = 'Public')"; + else + $condition = "or (vtiger_crmentity.smownerid NOT LIKE ($current_user->id))"; + $sec_query .= " and (vtiger_crmentity.smownerid in($current_user->id) $condition or vtiger_crmentity.smownerid in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%')"; + + if(sizeof($current_user_groups) > 0) + { + $sec_query .= " or (vtiger_groups.groupid in (". implode(",", $current_user_groups) ."))"; + } + $sec_query .= ")"; + return $sec_query; +} +?> \ No newline at end of file diff --git a/modules/Calendar/calendar_share.php b/modules/Calendar/calendar_share.php new file mode 100644 index 0000000..f6cc7d3 --- /dev/null +++ b/modules/Calendar/calendar_share.php @@ -0,0 +1,169 @@ +id); + $shareduser_ids = getSharedUserId($current_user->id); +?> + + + + + +
+ +
+
+ + + + + + + + + + + + + + + + + +
+ + + + + + + + + + +
+
+ start_hour != ''){?> checked onClick="enableCalstarttime();">  +
+ hour_format == '24'){?> checked value="24">  +
+
+

+ +
+ + + + +
+ + + + + + + + + + + + + +
+
    +
  • +
  • +
+
 
+ + + +
+ +
+ + + + + +
+ + +
+ +
+
+
+ + + + +
+    + +
+
+ diff --git a/modules/Calendar/disable_sharing.php b/modules/Calendar/disable_sharing.php new file mode 100644 index 0000000..6b73acb --- /dev/null +++ b/modules/Calendar/disable_sharing.php @@ -0,0 +1,22 @@ +pquery($sql, array($id)); +} +header("Location:index.php?module=".$returnmodule."&action=".$returnaction); +?> \ No newline at end of file diff --git a/modules/Calendar/header.php b/modules/Calendar/header.php new file mode 100644 index 0000000..ac1263c --- /dev/null +++ b/modules/Calendar/header.php @@ -0,0 +1,119 @@ + + + + + '.$app_strings["Calendar"].' + + + + + + + +
+ + + + + +
+
+ +   + + + + + '; + + + if($CALENDAR_DISPLAY == 'true') + $html_string .= ' '; + if($WORLD_CLOCK_DISPLAY == 'true') + $html_string .= ' '; + if($CALCULATOR_DISPLAY == 'true') + $html_string .= ' '; + if($CHAT_DISPLAY == 'true') + $html_string .= ' '; + + $html_string .= ' + + +
'.$app_strings['LBL_CALENDAR_ALT'].''.$app_strings['LBL_CLOCK_ALT'].''.$app_strings['LBL_CALCULATOR_ALT'].''.$app_strings['LBL_CHAT_ALT'].''.$app_strings['LBL_LAST_VIEWED'].'
+ +   + + + + + + + +
+ +   + + + '; + if((isPermitted('Settings','index') == 'yes')) + $html_string .= ''; + $html_string .= ' +
'.$app_strings['LBL_SETTINGS'].'
+ + + + + + + + + + + \ + \ + \ + \ + ', fieldName, fieldLabel, expression.replace("\n","
"), editLink, deleteLink); + $('#expressionlist').append(row); + $(format('#expressionlist_deletelink_%s', fieldName)).click(function(){ + if(confirm(strings.LBL_DELETE_EXPRESSION_CONFIRM)) { + $('#status').show(); + + jsonget('deleteexpressionjson', + {modulename:moduleName, fieldname:fieldName}, + function(result){ + $('#status').hide(); + + if(result.status=='success'){ + $(format('#expressionlistrow_%s', fieldName)).remove(); + }else{ + errorDialog(result.message); + } + } + ); + } + }); + $(format('#expressionlist_editlink_%s', fieldName)).click(function(){ + ep.edit(fieldName, expression); + }); + } + + format = fn.format; + var moduleName; + function editpopup(){ + function close(){ + $('#editpopup').css('display', 'none'); + $('#editpopup_expression').text(''); + } + + function show(module){ + $('#editpopup').css('display', 'block'); + center($('#editpopup')); + } + + function center(el){ + el.css({position: 'absolute'}); + el.width("650px"); + el.height("310px"); + placeAtCenter(el.get(0)); + } + + $('#editpopup_close').bind('click', close); + $('#editpopup_save').bind('click', function(){ + var expression = $('#editpopup_expression').attr('value'); + var fieldName = $('#editpopup_field').attr('value'); + var fieldLabel = getfieldlabel(fieldName); + var moduleName = $('#pick_module').attr('value'); + + expression = expression.replace(//g, ""); + if(expression == '') return false; + + VtigerJS_DialogBox.block(); + $.get('index.php', { + module:'FieldFormulas', + action:'FieldFormulasAjax', + file:'saveexpressionjson', ajax:'true', + modulename: moduleName, fieldname:fieldName, + expression:expression + }, + function(result){ + VtigerJS_DialogBox.unblock(); + try { + var parsed = JSON.parse(result); + if(parsed.status=='success'){ + $("#expressionlistrow_"+fieldName).remove(); + addFieldExpression(moduleName, fieldName, fieldLabel, expression); + close(); + }else{ + errorDialog('save failed because '+parsed.message); + } + } catch(error) { + alert(error); + } + }); + }); + + $('#editpopup_cancel').bind('click', close); + + $('#editpopup_fieldnames').bind('change', function(){ + var textarea = $('#editpopup_expression').get(0); + var value = $(this).attr('value'); + if(value != '') value += ' '; + //http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript + if (document.selection) { + textarea.focus(); + var sel = document.selection.createRange(); + sel.text = value; + textarea.focus(); + }else if (textarea.selectionStart || textarea.selectionStart == '0') { + var startPos = textarea.selectionStart; + var endPos = textarea.selectionEnd; + var scrollTop = textarea.scrollTop; + textarea.value = textarea.value.substring(0, startPos) + + value + + textarea.value.substring(endPos, + textarea.value.length); + textarea.focus(); + textarea.selectionStart = startPos + value.length; + textarea.selectionEnd = startPos + value.length; + textarea.scrollTop = scrollTop; + } else { + textarea.value += value; + textarea.focus(); + } + // Reset the selected option (to enable next selection) + this.value = ''; + + }); + + + jsonget('getfunctionsjson', + {modulename:moduleName}, + function(result){ + var functions = $('#editpopup_functions'); + $.each(result, function(label, template){ + functions.append(format('', template, label)); + }); + $('#editpopup_functions').bind('change', function(){ + var textarea = $('#editpopup_expression').get(0); + var value = $(this).attr('value'); + //http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript + if (document.selection) { + textarea.focus(); + var sel = document.selection.createRange(); + sel.text = value; + textarea.focus(); + }else if (textarea.selectionStart || textarea.selectionStart == '0') { + var startPos = textarea.selectionStart; + var endPos = textarea.selectionEnd; + var scrollTop = textarea.scrollTop; + textarea.value = textarea.value.substring(0, startPos) + + value + + textarea.value.substring(endPos, + textarea.value.length); + textarea.focus(); + textarea.selectionStart = startPos + value.length; + textarea.selectionEnd = startPos + value.length; + textarea.scrollTop = scrollTop; + }else { + textarea.value += value; + textarea.focus(); + } + // Reset the selected option (to enable next selection) + this.value = ''; + + }); + + } + ); + + + return { + create: show, + edit: function(field, expression){ + $("#editpopup_field").attr('value', field); + $("#editpopup_expression").attr('value', expression); + show(); + }, + close:close, + changeModule: function(moduleName, exprFields, moduleFields){ + var field = $('#editpopup_field'); + field.children().remove(); + $.each(exprFields, function(fieldName, fieldLabel){ + field.append(format('', fieldName, fieldLabel)); + }); + + var fieldNames = $('#editpopup_fieldnames'); + fieldNames.children().remove(); + fieldNames.append(format('', fieldName, fieldLabel)); + }); + } + }; + } + + $(document).ready( + function(){ + Drag.init(document.getElementById('editpopup_draghandle'), document.getElementById('editpopup')); + toExec(); + } + ); + + function toExec(){ + ep = editpopup(); + function setModule(moduleName){ + $.get('index.php', { + module:'FieldFormulas', + action:'FieldFormulasAjax', + file:'getfieldsjson', ajax:'true', + modulename:moduleName}, + function(result){ + var parsed = JSON.parse(result); + ep.changeModule($(this).attr("value"), parsed['exprFields'], parsed['moduleFields']); + + $('#new_field_expression_busyicon').hide(); + $('#new_field_expression').show(); + + if(parsed['exprFields'].length!=0){ + $('#new_field_expression').attr('disabled', false); + $('#new_field_expression').attr('class', 'crmButton create small'); + $('#new_field_expression').bind('click', function(){ + ep.create(); + }); + $('#status_message').html(''); + $('#status_message').hide(); + }else{ + $('#new_field_expression').hide(); + $('#status_message').show(); + $('#status_message').html(strings.NEED_TO_ADD_A + ' ' + strings.CUSTOM_FIELD +''); + } + + jsonget('getexpressionlistjson', + {modulename:moduleName}, + function(result){ + $('#expressionlist_busyicon').hide(); + + var exprFields = parsed['exprFields']; + $('.expressionlistrow').remove(); + $.each(result, function(fieldName, expression){ + var fieldLabel = getfieldlabel(fieldName); + if(exprFields[fieldName]){ + addFieldExpression(moduleName, fieldName, fieldLabel, expression); + }else{ + jsonget('deleteexpressionjson', + {modulename:moduleName, fieldname:fieldName}, + function(){}); + } + + }); + } + ); + }); + ep.close(); + + + } + + $('#pick_module').bind('change', function(){ + var moduleName = $(this).attr("value"); + setModule(moduleName); + }); + setModule($('#pick_module').attr('value')); + + + + }; +} +editexpressionscript(jQuery); diff --git a/modules/FieldFormulas/resources/functional.js b/modules/FieldFormulas/resources/functional.js new file mode 100644 index 0000000..7057994 --- /dev/null +++ b/modules/FieldFormulas/resources/functional.js @@ -0,0 +1,142 @@ +/*+******************************************************************************* + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ******************************************************************************/ +function functional(){} + +functional.prototype = { + + /** + * Test: + * fn.format("Hello %s", "world") == "Hello world" + */ + format: function(){ + var i=1; + var fmtStr = arguments[0]; + var args = arguments; + return fmtStr.replace(/%s/g,function(){return args[i++];}) + }, + + + + + + addStylesheet: function(url){ + /*From: http://www.hunlock.com/blogs/Howto_Dynamically_Insert_Javascript_And_CSS*/ + var headID = document.getElementsByTagName("head")[0]; + var cssNode = document.createElement('link'); + cssNode.type = 'text/css'; + cssNode.rel = 'stylesheet'; + cssNode.href = url; + cssNode.media = 'screen'; + headID.appendChild(cssNode); + }, + + /* + *Convert the last parameter into a list argument + */ + + + /** + * Internal function for handling function arguments + * + * Test: + * fn.args("a","b","*c")(function(args){return args;})(1,2,3,4)=={"a":1,"b":2,"c":[3,4]}; + */ + /* + args: function(){ + if(arguments[arguments.length-1][0]=="*"){ + args = arguments[0,-1]; + larg = arguments[arguments.length-1].slice(1); + }else{ + args = arguments; + larg = null; + } + return function(callable){ + return { + arr=new Object(); + for(var i =1;iarguments.length){ + nparams = arguments.length; + } + + var args = []; + for(var i=0;i)[^>]*$|^#(\w+)$/, + +// Is it a simple selector + isSimple = /^.[^:#\[\.]*$/, + +// Will speed up references to undefined, and allows munging its name. + undefined; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + return this; + } + // Handle HTML strings + if ( typeof selector == "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Make sure an element was located + if ( elem ){ + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + return jQuery( elem ); + } + selector = []; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); + + return this.setArray(jQuery.makeArray(selector)); + }, + + // The current version of jQuery being used + jquery: "1.2.6", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // The number of elements contained in the matched element set + length: 0, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + var ret = -1; + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( name.constructor == String ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text != "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) + // The elements to wrap the target around + jQuery( html, this[0].ownerDocument ) + .clone() + .insertBefore( this[0] ) + .map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }) + .append(this); + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, false, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, true, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + find: function( selector ) { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? + jQuery.unique( elems ) : + elems ); + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var clone = this.cloneNode(true), + container = document.createElement("div"); + container.appendChild(clone); + return jQuery.clean([container.innerHTML])[0]; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] != undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, this ) ); + }, + + not: function( selector ) { + if ( selector.constructor == String ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ) ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector == 'string' ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return this.is( "." + selector ); + }, + + val: function( value ) { + if ( value == undefined ) { + + if ( this.length ) { + var elem = this[0]; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + + // Everything else, we just grab the value + } else + return (this[0].value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if( value.constructor == Number ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value == undefined ? + (this[0] ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + data: function( key, value ){ + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + if ( data === undefined && this.length ) + data = jQuery.data( this[0], key ); + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } else + return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ + jQuery.data( this, key, value ); + }); + }, + + removeData: function( key ){ + return this.each(function(){ + jQuery.removeData( this, key ); + }); + }, + + domManip: function( args, table, reverse, callback ) { + var clone = this.length > 1, elems; + + return this.each(function(){ + if ( !elems ) { + elems = jQuery.clean( args, this.ownerDocument ); + + if ( reverse ) + elems.reverse(); + } + + var obj = this; + + if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) + obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); + + var scripts = jQuery( [] ); + + jQuery.each(elems, function(){ + var elem = clone ? + jQuery( this ).clone( true )[0] : + this; + + // execute all scripts after the elements have been injected + if ( jQuery.nodeName( elem, "script" ) ) + scripts = scripts.add( elem ); + else { + // Remove any inner scripts for later evaluation + if ( elem.nodeType == 1 ) + scripts = scripts.add( jQuery( "script", elem ).remove() ); + + // Inject the elements into the document + callback.call( obj, elem ); + } + }); + + scripts.each( evalScript ); + }); + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( target.constructor == Boolean ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target != "object" && typeof target != "function" ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy == "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +var expando = "jQuery" + now(), uuid = 0, windowData = {}, + // exclude the following css properties to add px + exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning this function. + isFunction: function( fn ) { + return !!fn && typeof fn != "string" && !fn.nodeName && + fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.documentElement && !elem.body || + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( data ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.browser.msie ) + script.text = data; + else + script.appendChild( document.createTextNode( data ) ); + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + cache: {}, + + data: function( elem, name, data ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // Compute a unique ID for the element + if ( !id ) + id = elem[ expando ] = ++uuid; + + // Only generate the data cache if we're + // trying to access or manipulate it + if ( name && !jQuery.cache[ id ] ) + jQuery.cache[ id ] = {}; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) + jQuery.cache[ id ][ name ] = data; + + // Return the named cache data, or the ID for the element + return name ? + jQuery.cache[ id ][ name ] : + id; + }, + + removeData: function( elem, name ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( jQuery.cache[ id ] ) { + // Remove the section of cache data + delete jQuery.cache[ id ][ name ]; + + // If we've removed all the data, remove the element's cache + name = ""; + + for ( name in jQuery.cache[ id ] ) + break; + + if ( !name ) + jQuery.removeData( elem ); + } + + // Otherwise, we want to remove all of the element's data + } else { + // Clean up the element expando + try { + delete elem[ expando ]; + } catch(e){ + // IE has trouble directly removing the expando + // but it's ok with using removeAttribute + if ( elem.removeAttribute ) + elem.removeAttribute( expando ); + } + + // Completely remove the data cache + delete jQuery.cache[ id ]; + } + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length == undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length == undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames != undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // A helper method for determining if an element's values are broken + function color( elem ) { + if ( !jQuery.browser.safari ) + return false; + + // defaultView is cached + var ret = defaultView.getComputedStyle( elem, null ); + return !ret || ret.getPropertyValue("color") == ""; + } + + // We need to handle opacity special in IE + if ( name == "opacity" && jQuery.browser.msie ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + // Opera sometimes will give the wrong display answer, this fixes it, see #2037 + if ( jQuery.browser.opera && name == "display" ) { + var save = style.outline; + style.outline = "0 solid black"; + style.outline = save; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle && !color( elem ) ) + ret = computedStyle.getPropertyValue( name ); + + // If the element isn't reporting its values properly in Safari + // then some display: none elements are involved + else { + var swap = [], stack = [], a = elem, i = 0; + + // Locate all of the parent display: none elements + for ( ; a && color(a); a = a.parentNode ) + stack.unshift(a); + + // Go through and make them visible, but in reverse + // (It would be better if we knew the exact display type that they had) + for ( ; i < stack.length; i++ ) + if ( color( stack[ i ] ) ) { + swap[ i ] = stack[ i ].style.display; + stack[ i ].style.display = "block"; + } + + // Since we flip the display style, we have to handle that + // one special, otherwise get the value + ret = name == "display" && swap[ stack.length - 1 ] != null ? + "none" : + ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; + + // Finally, revert the display styles back + for ( i = 0; i < swap.length; i++ ) + if ( swap[ i ] != null ) + stack[ i ].style.display = swap[ i ]; + } + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context ) { + var ret = []; + context = context || document; + // !context.createElement fails in IE with an error but returns typeof 'object' + if (typeof context.createElement == 'undefined') + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + jQuery.each(elems, function(i, elem){ + if ( !elem ) + return; + + if ( elem.constructor == Number ) + elem += ''; + + // Convert html string into DOM nodes + if ( typeof elem == "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "
+ + +
+ + + + + + + + + +
+ + + + + + + + +
 '.$app_strings["Calendar"].' '.$mod_strings["LBL_ALL_EVENTS_TODOS"].' 
+
+ + + "; +} +$sHTML .= ""; + + +return $sHTML; +} + +/** Returns graph, if the cached image is present it'll display that image, +otherwise it will render the graph with the given details +* Portions created by vtiger are Copyright (C) vtiger. +* All Rights Reserved. +* Contributor(s): ______________________________________.. +*/ + +// Function to get the chached image if exists +function render_graph($cache_file_name,$html_imagename,$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$graph_type) +{ + + //Checks whether the cached image is present or not + if(file_exists($cache_file_name)) + { + @unlink($cache_file_name); + } + if(file_exists($cache_file_name.'.map')) + { + @unlink($cache_file_name.'.map'); + } + if (!file_exists($cache_file_name) || !file_exists($cache_file_name.'.map')) + { + //If the Cached image is not present + if($graph_type=="horizontal") + { + return horizontal_graph($cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$cache_file_name,$html_imagename); + } + else if($graph_type=="vertical") + { + return vertical_graph($cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$cache_file_name,$html_imagename); + } + else if($graph_type=="pie") + { + return pie_chart($cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$cache_file_name,$html_imagename); + + } + } + else + { + //Getting the cached image + $imgMap_fp = fopen($cache_file_name.'.map', "rb"); + $imgMap = fread($imgMap_fp, filesize($cache_file_name.'.map')); + fclose($imgMap_fp); + $base_name_cache_file=basename($cache_file_name); + $ccc="cache/images/".$base_name_cache_file; + $return = "\n$imgMap\n"; + $return .= ""; + return $return; + } +} +function get_graph_homepg($cache_file_name,$html_imagename,$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$graph_date,$urlstring,$test_target_val,$date_start,$end_date) +{ + global $tmp_dir; + global $graph_title, $mod_strings; + global $theme; + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $val=explode(":",$title); + $display_title=$val[0]; + $type = $_REQUEST[Chart_Type]; + if($type == 'horizontalbarchart') + $sHTML .= render_graph($tmp_dir."hor_".$cache_file_name,$html_imagename."_hor",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"horizontal"); + elseif($type == 'verticalbarchart') + $sHTML .= render_graph($tmp_dir."vert_".$cache_file_name,$html_imagename."_vert",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"vertical"); + elseif($type == 'piechart') + $sHTML .= render_graph($tmp_dir."pie_".$cache_file_name,$html_imagename."_pie",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"pie"); + return $sHTML; +} +?> \ No newline at end of file diff --git a/modules/Dashboard/Forms.php b/modules/Dashboard/Forms.php new file mode 100644 index 0000000..7408988 --- /dev/null +++ b/modules/Dashboard/Forms.php @@ -0,0 +1,166 @@ + + + + +EOQ; + +return $the_script; +} + +?> diff --git a/modules/Dashboard/HomepageDB.php b/modules/Dashboard/HomepageDB.php new file mode 100644 index 0000000..97fc4a9 --- /dev/null +++ b/modules/Dashboard/HomepageDB.php @@ -0,0 +1,69 @@ +id.'.php'); + +global $current_user,$user_id,$date_start,$end_date,$tmp_dir,$mod_strings,$app_strings; +$type='recordsforuser'; + +// Performance Optimization: Using new API to generate dashboard chart +/* +$module_arr = Array ('Accounts','Contacts','Leads','Potentials','Quotes','Invoice','PurchaseOrder', 'SalesOrder','Calendar','HelpDesk','Campaigns'); +foreach ($module_arr as $key => $mod_name){ + if(isPermitted("$mod_name","index",'') == 'yes'){ + + $permitted_mod_list[$key] = $mod_name; + } +} + +if(is_array($permitted_mod_list)){ + $moduleList = implode("','",$permitted_mod_list); +} + +$homepagedb_query = "select * from vtiger_crmentity se left join vtiger_leaddetails le on le.leadid=se.crmid left join vtiger_troubletickets tt on tt.ticketid=se.crmid left join vtiger_activity act on act.activityid=se.crmid left join vtiger_potential pot on pot.potentialid=se.crmid where se.deleted=0 and (le.converted=0 or le.converted is null) and (pot.sales_stage not in('".$app_strings['LBL_CLOSE_WON']."','".$app_strings['LBL_CLOSE_LOST']."') or pot.sales_stage is null) and (tt.status!='Closed' or tt.status is null) and ((act.status!='Completed' and act.status!='Deferred') or act.status is null) and ((act.eventstatus!='Held' and act.eventstatus!='Not Held') or act.eventstatus is null) and setype in ('".$moduleList."') and se.deleted=0 and se.smownerid=".$current_user->id; +$graph_by="setype"; +$graph_title=$mod_strings['recordsforuser'].' '.$current_user->user_name; +$module="Home"; +$where=""; +$query=$homepagedb_query; + +//Giving the Cached image name +$cache_file_name=abs(crc32($current_user->id))."_".$type."_".crc32($date_start.$end_date).".png"; + $html_imagename=$graph_by; //Html image name for the graph +$graph_details=module_Chart($current_user->id,$date_start,$end_date,$query,$graph_by,$graph_title,$where,$module,$type); +*/ + +// Performance Optimization +$graph_details = module_Chart_HomePageDashboard($current_user); + +if (!empty($graph_details) && $graph_details[1] != 0) { // END + $name_val=$graph_details[0]; + $cnt_val=$graph_details[1]; + $graph_title=$graph_details[2]; + $target_val=$graph_details[3]; + $graph_date=$graph_details[4]; + $urlstring=$graph_details[5]; + $cnt_table=$graph_details[6]; + $test_target_val=$graph_details[7]; + + $width=560; + $height=225; + $top=30; + $left=140; + $bottom=120; + $title=$graph_title; + $sHTML = render_graph($tmp_dir."vert_".$cache_file_name,$html_imagename."_vert",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"vertical"); + echo $sHTML; +}else{ + echo $mod_strings['LBL_NO_DATA']; +} + +?> diff --git a/modules/Dashboard/ReportsCharts.php b/modules/Dashboard/ReportsCharts.php new file mode 100644 index 0000000..19de917 --- /dev/null +++ b/modules/Dashboard/ReportsCharts.php @@ -0,0 +1,194 @@ + + + + + + + + + "; + +$sHTML .= " + + + + + + + + "; + +$sHTML .= " + + + + + + + + "; + + return $sHTML; +} + +/** Returns graph, if the cached image is present it'll display that image, +otherwise it will render the graph with the given details +* Portions created by vtiger are Copyright (C) vtiger. +* All Rights Reserved. +* Contributor(s): ______________________________________.. +*/ + +// Function to get the chached image if exists +function render_graph($cache_file_name,$html_imagename,$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$graph_type) +{ + + //Checks whether the cached image is present or not + if(file_exists($cahce_file_name)) + { + unlink($cache_file_name); + } + if(file_exists($cache_file_name.'.map')) + { + unlink($cache_file_name.'.map'); + } + if (!file_exists($cache_file_name) || !file_exists($cache_file_name.'.map')) + { + //If the Cached image is not present + if($graph_type=="horizontal") + { + return horizontal_graph($cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$cache_file_name,$html_imagename); + } + else if($graph_type=="vertical") + { + return vertical_graph($cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$cache_file_name,$html_imagename); + } + else if($graph_type=="pie") + { + return pie_chart($cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$cache_file_name,$html_imagename); + + } + } + else + { + //Getting the cached image + $imgMap_fp = fopen($cache_file_name.'.map', "rb"); + $imgMap = fread($imgMap_fp, vtiger_filesize($cache_file_name.'.map')); + fclose($imgMap_fp); + $base_name_cache_file=basename($cache_file_name); + $ccc="cache/images/".$base_name_cache_file; + $return = "\n$imgMap\n"; + $return .= ""; + return $return; + } +} +?> \ No newline at end of file diff --git a/modules/Dashboard/accumulated_bargraph.php b/modules/Dashboard/accumulated_bargraph.php new file mode 100644 index 0000000..ad567ef --- /dev/null +++ b/modules/Dashboard/accumulated_bargraph.php @@ -0,0 +1,88 @@ +SetScale("textlin"); + +$graph->SetShadow(); + + +// Create the lines of the Graph +for($i=0;$iSetFillColor($color_array[$i]); + $bplot[$i]->SetWidth(10); + + $bplot[$i]->value->Show(); + $bplot[$i]->value->SetFont(FF_FONT1,FS_NORMAL,8); + $bplot[$i]->value->SetColor("black"); + $bplot[$i]->value->SetFormat('%d'); + $bplot[$i]->SetValuePos('max'); + +} + +$gbplot = new AccBarPlot($bplot); +$gbplot->SetWidth(0.7); + +// Add the bar to the graph +$graph->Add($gbplot); + +$graph->xaxis->SetTickLabels($datax); + +$graph->title->Set($title); + +$graph->Set90AndMargin($left,$right,$top,$bottom); +//$graph->SetFrame(false); +$graph->title->SetFont(FF_FONT1,FS_BOLD); +$graph->yaxis->title->SetFont(FF_FONT1,FS_BOLD); +$graph->xaxis->title->SetFont(FF_FONT1,FS_BOLD); + +$graph->SetColor("#7D9CB8"); +$graph->SetMarginColor("#3D6A93"); + +// Display the graph +$graph->Stroke(); + +?> + diff --git a/modules/Dashboard/display_charts.php b/modules/Dashboard/display_charts.php new file mode 100644 index 0000000..c2a2b1b --- /dev/null +++ b/modules/Dashboard/display_charts.php @@ -0,0 +1,825 @@ +id.'.php'); +global $current_language; +$mod_strings = return_module_language($current_language, 'Dashboard'); + + +$period=($_REQUEST['period'])?$_REQUEST['period']:"tmon"; // Period >> lmon- Last Month, tmon- This Month, lweek-LastWeek, tweek-ThisWeek; lday- Last Day +$type=($_REQUEST['type'])?$_REQUEST['type']:"leadsource"; +$dates_values=start_end_dates($period); //To get the stating and End dates for a given period +$date_start=$dates_values[0]; //Starting date +$end_date=$dates_values[1]; // Ending Date +$period_type=$dates_values[2]; //Period type as MONTH,WEEK,LDAY +$width=$dates_values[3]; +$height=$dates_values[4]; + +//It gives all the dates in between the starting and ending dates and also gives the number of days,declared in utils.php +$no_days_dates=get_days_n_dates($date_start,$end_date); +$days=$no_days_dates[0]; +$date_array=$no_days_dates[1]; //Array containig all the dates +$user_id=$current_user->id; + +// Query for Leads +$leads_query="select vtiger_crmentity.crmid,vtiger_crmentity.createdtime, vtiger_leaddetails.*, vtiger_crmentity.smownerid, vtiger_leadscf.* from vtiger_leaddetails inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_leaddetails.leadid inner join vtiger_leadsubdetails on vtiger_leadsubdetails.leadsubscriptionid=vtiger_leaddetails.leadid inner join vtiger_leadaddress on vtiger_leadaddress.leadaddressid=vtiger_leadsubdetails.leadsubscriptionid inner join vtiger_leadscf on vtiger_leaddetails.leadid = vtiger_leadscf.leadid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 and vtiger_leaddetails.converted=0 "; + + +//Query for Accounts +$account_query="select vtiger_crmentity.*, vtiger_account.*, vtiger_accountscf.* from vtiger_account inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_account.accountid inner join vtiger_accountbillads on vtiger_account.accountid=vtiger_accountbillads.accountaddressid inner join vtiger_accountshipads on vtiger_account.accountid=vtiger_accountshipads.accountaddressid inner join vtiger_accountscf on vtiger_account.accountid = vtiger_accountscf.accountid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 "; + +//Query for Products by PO +$probyPO = "select vtiger_purchaseorder.*,vtiger_crmentity.* from vtiger_purchaseorder inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_purchaseorder.purchaseorderid inner join vtiger_inventoryproductrel on vtiger_purchaseorder.purchaseorderid = vtiger_inventoryproductrel.id LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid where vtiger_inventoryproductrel.id=vtiger_purchaseorder.purchaseorderid and vtiger_crmentity.deleted=0"; + +//Query for Products by Quotes +$probyQ = "select vtiger_quotes.*,vtiger_crmentity.* from vtiger_quotes inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_quotes.quoteid inner join vtiger_inventoryproductrel on vtiger_quotes.quoteid = vtiger_inventoryproductrel.id LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid where vtiger_inventoryproductrel.id=vtiger_quotes.quoteid and vtiger_crmentity.deleted=0"; + +//Query for Products by Invoices +$probyInv = "select vtiger_invoice.*,vtiger_crmentity.* from vtiger_invoice inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid inner join vtiger_inventoryproductrel on vtiger_invoice.invoiceid = vtiger_inventoryproductrel.id LEFT JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid LEFT JOIN vtiger_users ON vtiger_users.id = vtiger_crmentity.smownerid where vtiger_inventoryproductrel.id=vtiger_invoice.invoiceid and vtiger_crmentity.deleted=0"; + +//Query For Products qty in stock +$products_query="select distinct(vtiger_crmentity.crmid),vtiger_crmentity.createdtime,vtiger_products.* from vtiger_products inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_products.productid left join vtiger_inventoryproductrel on vtiger_products.productid = vtiger_inventoryproductrel.id where vtiger_crmentity.deleted=0 and vtiger_products.qtyinstock > 0"; + +//Query for Potential +$potential_query= "select vtiger_crmentity.*,vtiger_account.accountname, vtiger_potential.*, vtiger_potentialscf.*, vtiger_groups.groupname from vtiger_potential inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_potential.potentialid left join vtiger_account on vtiger_potential.related_to = vtiger_account.accountid inner join vtiger_potentialscf on vtiger_potentialscf.potentialid = vtiger_potential.potentialid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 "; + +//Query for Sales Order +$so_query="select vtiger_crmentity.*,vtiger_salesorder.*,vtiger_account.accountid,vtiger_quotes.quoteid from vtiger_salesorder inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_salesorder.salesorderid inner join vtiger_sobillads on vtiger_salesorder.salesorderid=vtiger_sobillads.sobilladdressid inner join vtiger_soshipads on vtiger_salesorder.salesorderid=vtiger_soshipads.soshipaddressid left join vtiger_salesordercf on vtiger_salesordercf.salesorderid = vtiger_salesorder.salesorderid left outer join vtiger_quotes on vtiger_quotes.quoteid=vtiger_salesorder.quoteid left outer join vtiger_account on vtiger_account.accountid=vtiger_salesorder.accountid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 "; + + +//Query for Purchase Order + +$po_query="select vtiger_crmentity.*,vtiger_purchaseorder.* from vtiger_purchaseorder inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_purchaseorder.purchaseorderid left outer join vtiger_vendor on vtiger_purchaseorder.vendorid=vtiger_vendor.vendorid inner join vtiger_pobillads on vtiger_purchaseorder.purchaseorderid=vtiger_pobillads.pobilladdressid inner join vtiger_poshipads on vtiger_purchaseorder.purchaseorderid=vtiger_poshipads.poshipaddressid left join vtiger_purchaseordercf on vtiger_purchaseordercf.purchaseorderid = vtiger_purchaseorder.purchaseorderid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 "; + +// Query for Quotes +$quotes_query="select vtiger_crmentity.*,vtiger_quotes.* from vtiger_quotes inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_quotes.quoteid inner join vtiger_quotesbillads on vtiger_quotes.quoteid=vtiger_quotesbillads.quotebilladdressid inner join vtiger_quotesshipads on vtiger_quotes.quoteid=vtiger_quotesshipads.quoteshipaddressid left join vtiger_quotescf on vtiger_quotes.quoteid = vtiger_quotescf.quoteid left outer join vtiger_account on vtiger_account.accountid=vtiger_quotes.accountid left outer join vtiger_potential on vtiger_potential.potentialid=vtiger_quotes.potentialid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 "; + +//Query for Invoice +$invoice_query="select vtiger_crmentity.*,vtiger_invoice.* from vtiger_invoice inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid inner join vtiger_invoicebillads on vtiger_invoice.invoiceid=vtiger_invoicebillads.invoicebilladdressid inner join vtiger_invoiceshipads on vtiger_invoice.invoiceid=vtiger_invoiceshipads.invoiceshipaddressid left outer join vtiger_salesorder on vtiger_salesorder.salesorderid=vtiger_invoice.salesorderid inner join vtiger_invoicecf on vtiger_invoice.invoiceid = vtiger_invoicecf.invoiceid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_crmentity.deleted=0 "; + +//Query for tickets +$helpdesk_query=" select vtiger_troubletickets.status AS ticketstatus, vtiger_groups.groupname AS ticketgroupname, vtiger_troubletickets.*,vtiger_crmentity.* from vtiger_troubletickets inner join vtiger_ticketcf on vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_troubletickets.ticketid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_contactdetails on vtiger_troubletickets.parent_id=vtiger_contactdetails.contactid left join vtiger_account on vtiger_account.accountid=vtiger_troubletickets.parent_id left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id and vtiger_troubletickets.ticketid = vtiger_ticketcf.ticketid where vtiger_crmentity.deleted=0"; + + +//Query for Contacts by Campaign +$contByCampaign = "select crmid from vtiger_contactdetails inner join vtiger_campaigncontrel on vtiger_campaigncontrel.contactid = vtiger_contactdetails.contactid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id where vtiger_crmentity.deleted=0 "; +$cont_Q = getDashboardQuery($contByCampaign,"Contacts"); + +$result = $adb->pquery($cont_Q, array()); +$num_conts = $adb->num_rows($result); +$cont_Array = array(); +for($z=0;$z<$num_conts;$z++) +{ + $cont_ID=$adb->query_result($result,$z,'crmid'); + if(!in_array($cont_ID, $cont_Array)) + array_push($cont_Array, $cont_ID); +} +$cont_checkQ = " and vtiger_crmentityContacts.crmid in(0)"; +if(count($cont_Array) > 0) + $cont_checkQ = " and vtiger_crmentityContacts.crmid in(".implode(", ", $cont_Array).")"; + +$campaign_query="select vtiger_campaign.*,vtiger_crmentity.* from vtiger_campaign inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_campaign.campaignid inner join vtiger_campaigncontrel on vtiger_campaigncontrel.campaignid=vtiger_campaign.campaignid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_campaigncontrel.contactid left join vtiger_crmentity as vtiger_crmentityContacts on vtiger_crmentityContacts.crmid = vtiger_contactdetails.contactid where vtiger_campaigncontrel.campaignid=vtiger_campaign.campaignid and vtiger_crmentity.deleted=0 and vtiger_crmentityContacts.deleted=0".$cont_checkQ; + + +//Query for tickets by account +$tickets_by_account="select vtiger_troubletickets.*, vtiger_groups.groupname AS ticketgroupname, vtiger_crmentity.*, vtiger_account.* from vtiger_troubletickets inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_troubletickets.ticketid inner join vtiger_account on vtiger_account.accountid=vtiger_troubletickets.parent_id left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id where vtiger_crmentity.deleted=0"; + +//Query for tickets by contact +$tickets_by_contact="select vtiger_troubletickets.*, vtiger_groups.groupname AS ticketgroupname, vtiger_crmentity.*, vtiger_contactdetails.* from vtiger_troubletickets inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_troubletickets.ticketid inner join vtiger_contactdetails on vtiger_contactdetails.contactid=vtiger_troubletickets.parent_id left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id where vtiger_crmentity.deleted=0"; + +//Query for product by category + +$product_category = "select vtiger_products.*,vtiger_crmentity.deleted from vtiger_products inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_products.productid where vtiger_crmentity.deleted=0"; + +$graph_array = Array( + "DashboardHome" => $mod_strings['DashboardHome'], + "leadsource" => $mod_strings['leadsource'], + "leadstatus" => $mod_strings['leadstatus'], + "leadindustry" => $mod_strings['leadindustry'], + "salesbyleadsource" => $mod_strings['salesbyleadsource'], + "salesbyaccount" => $mod_strings['salesbyaccount'], + "salesbyuser" => $mod_strings['salesbyuser'], + "salesbyteam" => $mod_strings['salesbyteam'], + "accountindustry" => $mod_strings['accountindustry'], + "productcategory" => $mod_strings['productcategory'], + "productbyqtyinstock" => $mod_strings['productbyqtyinstock'], + "productbypo" => $mod_strings['productbypo'], + "productbyquotes" => $mod_strings['productbyquotes'], + "productbyinvoice" => $mod_strings['productbyinvoice'], + "sobyaccounts" => $mod_strings['sobyaccounts'], + "sobystatus" => $mod_strings['sobystatus'], + "pobystatus" => $mod_strings['pobystatus'], + "quotesbyaccounts" => $mod_strings['quotesbyaccounts'], + "quotesbystage" => $mod_strings['quotesbystage'], + "invoicebyacnts" => $mod_strings['invoicebyacnts'], + "invoicebystatus" => $mod_strings['invoicebystatus'], + "ticketsbystatus" => $mod_strings['ticketsbystatus'], + "ticketsbypriority" => $mod_strings['ticketsbypriority'], + "ticketsbycategory" => $mod_strings['ticketsbycategory'], + "ticketsbyuser" => $mod_strings['ticketsbyuser'], + "ticketsbyteam" => $mod_strings['ticketsbyteam'], + "ticketsbyproduct"=> $mod_strings['ticketsbyproduct'], + "contactbycampaign"=> $mod_strings['contactbycampaign'], + "ticketsbyaccount"=> $mod_strings['ticketsbyaccount'], + "ticketsbycontact"=> $mod_strings['ticketsbycontact'], + ); + if(isset($_REQUEST['from_page']) && $_REQUEST['from_page'] == 'HomePage') + { + + //Charts for Lead Source + if($profileTabsPermission[getTabid("Leads")] == 0 && ($type == "leadsource") && (getFieldVisibilityPermission('Leads',$user_id,'leadsource') == "0")) + { + $graph_by="leadsource"; + $graph_title= $mod_strings['leadsource']; + $module="Leads"; + $where=""; + $query=getDashboardQuery($leads_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + + } + // To display the charts for Lead status + elseif ($profileTabsPermission[getTabid("Leads")] == 0 && ($type == "leadstatus")&& (getFieldVisibilityPermission('Leads',$user_id,'leadstatus') == "0")) + { + $graph_by="leadstatus"; + $graph_title= $mod_strings['leadstatus']; + $module="Leads"; + $where=""; + $query=getDashboardQuery($leads_query,$module); + if(!$is_admin) + $query .= ' and vtiger_leaddetails.leadsource '.picklist_check($module,$graph_by); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Charts for Lead Industry + elseif ($profileTabsPermission[getTabid("Leads")] == 0 && ($type == "leadindustry") && (getFieldVisibilityPermission('Leads',$user_id,'industry') == "0")) + { + $graph_by="industry"; + $graph_title=$mod_strings['leadindustry']; + $module="Leads"; + $where=""; + $query=getDashboardQuery($leads_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Sales by Lead Source + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyleadsource")&& (getFieldVisibilityPermission('Potentials',$user_id,'leadsource') == "0")) + { + $graph_by="leadsource"; + $graph_title=$mod_strings['salesbyleadsource']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like '%Closed Won%' "; + $query=getDashboardQuery($potential_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Sales by Account + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyaccount") && (getFieldVisibilityPermission('Potentials',$user_id,'related_to') == "0")) + { + $graph_by="related_to"; + $graph_title=$mod_strings['salesbyaccount']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like '%Closed Won%' "; + $query=getDashboardQuery($potential_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Sales by User + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyuser")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['salesbyuser']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like '%Closed Won%' and (vtiger_groups.groupname is NULL)"; + $query=getDashboardQuery($potential_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Sales by team + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyteam")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['salesbyteam']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like '%Closed Won%' and (vtiger_groups.groupname != NULL || vtiger_groups.groupname != '')"; + $query=getDashboardQuery($potential_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Charts for Account by Industry + elseif ($profileTabsPermission[getTabid("Accounts")] == 0 && ($type == "accountindustry") && (getFieldVisibilityPermission('Accounts',$user_id,'industry') == "0")) + { + $graph_by="industry"; + $graph_title=$mod_strings['accountindustry']; + $module="Accounts"; + $where=""; + $query=getDashboardQuery($account_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Charts for Products by Category + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productcategory") && (getFieldVisibilityPermission('Products',$user_id,'productcategory') == "0")) + { + $graph_by="productcategory"; + $graph_title=$mod_strings['productcategory']; + $module="Products"; + $where=""; + $query=getDashboardQuery($product_category, $module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Charts for Products by Quantity in stock + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbyqtyinstock") && (getFieldVisibilityPermission('Products',$user_id,'qtyinstock') == "0")) + { + $graph_by="productname"; + $graph_title=$mod_strings['productbyqtyinstock']; + $module="Products"; + $where=""; + $query=getDashboardQuery($products_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Charts for Products by PO + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbypo") && $profileTabsPermission[getTabid("PurchaseOrder")] == 0) + { + $graph_by="purchaseorderid"; + $graph_title=$mod_strings['productbypo']; + $module="Products"; + $where=""; + $query=getDashboardQuery($probyPO,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Charts for Products by Quotes + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbyquotes") && $profileTabsPermission[getTabid("Quotes")] == 0) + { + $graph_by="quoteid"; + $graph_title=$mod_strings['productbyquotes']; + $module="Products"; + $where=""; + $query=getDashboardQuery($probyQ, $module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Charts for Products by Invoice + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbyinvoice") && $profileTabsPermission[getTabid("Invoice")] == 0) + { + $graph_by="invoiceid"; + $graph_title=$mod_strings['productbyinvoice']; + $module="Products"; + $where=""; + $query=getDashboardQuery($probyInv, $module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + + // Sales Order by Accounts + elseif ($profileTabsPermission[getTabid("SalesOrder")] == 0 && ($type == "sobyaccounts") && (getFieldVisibilityPermission('SalesOrder',$user_id,'account_id') == "0")) + { + $graph_by="accountid"; + $graph_title=$mod_strings['sobyaccounts']; + $module="SalesOrder"; + $where=""; + $query=getDashboardQuery($so_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Sales Order by Status + elseif ($profileTabsPermission[getTabid("SalesOrder")] == 0 && ($type == "sobystatus") && (getFieldVisibilityPermission('SalesOrder',$user_id,'sostatus') == "0")) + { + $graph_by="sostatus"; + $graph_title=$mod_strings['sobystatus']; + $module="SalesOrder"; + $where=""; + $query=getDashboardQuery($so_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Purchase Order by Status + elseif ($profileTabsPermission[getTabid("PurchaseOrder")] == 0 && ($type == "pobystatus") && (getFieldVisibilityPermission('PurchaseOrder',$user_id,'postatus') == "0")) + { + $graph_by="postatus"; + $graph_title=$mod_strings['pobystatus']; + $module="PurchaseOrder"; + $where=""; + $query=getDashboardQuery($po_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Quotes by Accounts + elseif ($profileTabsPermission[getTabid("Quotes")] == 0 && ($type == "quotesbyaccounts") && (getFieldVisibilityPermission('Quotes',$user_id,'account_id') == "0")) + { + $graph_by="accountid"; + $graph_title= $mod_strings['quotesbyaccounts']; + $module="Quotes"; + $where=""; + $query=getDashboardQuery($quotes_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Quotes by Stage + elseif ($profileTabsPermission[getTabid("Quotes")] == 0 && ($type == "quotesbystage") && (getFieldVisibilityPermission('Quotes',$user_id,'quotestage') == "0")) + { + $graph_by="quotestage"; + $graph_title=$mod_strings['quotesbystage']; + $module="Quotes"; + $where=""; + $query=getDashboardQuery($quotes_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Invoice by Accounts + elseif ($profileTabsPermission[getTabid("Invoice")] == 0 && ($type == "invoicebyacnts") && (getFieldVisibilityPermission('Invoice',$user_id,'account_id') == "0")) + { + $graph_by="accountid"; + $graph_title=$mod_strings['invoicebyacnts']; + $module="Invoice"; + $where=""; + $query=getDashboardQuery($invoice_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Invoices by status + elseif ($profileTabsPermission[getTabid("Invoice")] == 0 && ($type == "invoicebystatus") && (getFieldVisibilityPermission('Invoice',$user_id,'invoicestatus') == "0")) + { + $graph_by="invoicestatus"; + $graph_title=$mod_strings['invoicebystatus']; + $module="Invoice"; + $where=""; + $query=getDashboardQuery($invoice_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by Status + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbystatus") && (getFieldVisibilityPermission('HelpDesk',$user_id,'ticketstatus') == "0")) + { + $graph_by="ticketstatus"; + $graph_title=$mod_strings['ticketsbystatus']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by Priority + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbypriority") && (getFieldVisibilityPermission('HelpDesk',$user_id,'ticketpriorities') == "0")) + { + $graph_by="priority"; + $graph_title=$mod_strings['ticketsbypriority']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by Category + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbycategory") && (getFieldVisibilityPermission('HelpDesk',$user_id,'ticketcategories') == "0")) + { + $graph_by="category"; + $graph_title=$mod_strings['ticketsbycategory']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by User + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyuser")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['ticketsbyuser']; + $module="HelpDesk"; + $where=" and (vtiger_groups.groupname is NULL)"; + $query=getDashboardQuery($helpdesk_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by Team + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyteam")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['ticketsbyteam']; + $module="HelpDesk"; + $where=" and (vtiger_groups.groupname != NULL || vtiger_groups.groupname != ' ')"; + $query=getDashboardQuery($helpdesk_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by Product + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyproduct") && (getFieldVisibilityPermission('HelpDesk',$user_id,'product_id') == "0")) + { + $graph_by="product_id"; + $graph_title=$mod_strings['ticketsbyproduct']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Campaigns by Contact + elseif ($profileTabsPermission[getTabid("Contacts")] == 0 && ($type == "contactbycampaign") && $profileTabsPermission[getTabid("Campaigns")] == 0) + { + $graph_by="campaignid"; + $graph_title=$mod_strings['contactbycampaign']; + $module="Contacts"; + $where=""; + $query=getDashboardQuery($campaign_query,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by Account + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyaccount") && (getFieldVisibilityPermission('HelpDesk',$user_id,'parent_id') == "0")) + { + $graph_by="parent_id"; + $graph_title=$mod_strings['ticketsbyaccount']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($tickets_by_account,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + //Tickets by Contact + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbycontact") && (getFieldVisibilityPermission('HelpDesk',$user_id,'parent_id') == "0")) + { + $graph_by="parent_id"; + $graph_title=$mod_strings['ticketsbycontact']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($tickets_by_contact,$module); + return get_graph_by_type($graph_by,$graph_title,$module,$where,$query,"210","210","forhomepage"); + } + else + { + //echo $mod_strings['LBL_NO_PERMISSION_FIELD']; + sleep(1); + return '

'.$mod_strings['LBL_NO_PERMISSION_FIELD'].'

'; + } + } + else + { + $html='
+ + + +
+ '; + echo $html_string; +?> diff --git a/modules/Calendar/iCal/iCalendar_components.php b/modules/Calendar/iCal/iCalendar_components.php new file mode 100644 index 0000000..d2621e7 --- /dev/null +++ b/modules/Calendar/iCal/iCalendar_components.php @@ -0,0 +1,628 @@ +construct(); + } + + function construct() { + // Initialize the components array + if(empty($this->components)) { + $this->components = array(); + foreach($this->valid_components as $name) { + $this->components[$name] = array(); + } + } + } + + function get_name() { + return $this->name; + } + + function add_property($name, $value = NULL, $parameters = NULL) { + + // Uppercase first of all + $name = strtoupper($name); + // Are we trying to add a valid property? + $xname = false; + if(!isset($this->valid_properties[$name])) { + // If not, is it an x-name as per RFC 2445? + if(!rfc2445_is_xname($name)) { + return false; + } + // Since this is an xname, all components are supposed to allow this property + $xname = true; + } + + // Create a property object of the correct class + if($xname) { + $property = new iCalendar_property_x; + $property->set_name($name); + } + else { + $classname = 'iCalendar_property_'.strtolower(str_replace('-', '_', $name)); + $property = new $classname; + } + // If $value is NULL, then this property must define a default value. + if($value === NULL) { + $value = $property->default_value(); + if($value === NULL) { + return false; + } + } + + // Set this property's parent component to ourselves, because some + // properties behave differently according to what component they apply to. + $property->set_parent_component($this->name); + + // Set parameters before value; this helps with some properties which + // accept a VALUE parameter, and thus change their default value type. + + // The parameters must be valid according to property specifications + if(!empty($parameters)) { + foreach($parameters as $paramname => $paramvalue) { + if(!$property->set_parameter($paramname, $paramvalue)) { + return false; + } + } + + // Some parameters interact among themselves (e.g. ENCODING and VALUE) + // so make sure that after the dust settles, these invariants hold true + if(!$property->invariant_holds()) { + return false; + } + } + + // $value MUST be valid according to the property data type + if(!$property->set_value($value)) { + return false; + } + + // If this property is restricted to only once, blindly overwrite value + if(!$xname && $this->valid_properties[$name] & RFC2445_ONCE) { + $this->properties[$name] = array($property); + } + + // Otherwise add it to the instance array for this property + else { + $this->properties[$name][] = $property; + } + + // Finally: after all these, does the component invariant hold? + if(!$this->invariant_holds()) { + // If not, completely undo the property addition + array_pop($this->properties[$name]); + if(empty($this->properties[$name])) { + unset($this->properties[$name]); + } + return false; + } + + return true; + + } + + function add_component($component) { + + // With the detailed interface, you can add only components with this function + if(!is_object($component) || !is_subclass_of($component, 'iCalendar_component')) { + return false; + } + + $name = $component->get_name(); + + // Only valid components as specified by this component are allowed + if(!in_array($name, $this->valid_components)) { + return false; + } + + // Add it + $this->components[$name][] = $component; + + return true; + } + + function get_property_list($name) { + } + + function invariant_holds() { + return true; + } + + function is_valid() { + // If we have any child components, check that they are all valid + if(!empty($this->components)) { + foreach($this->components as $component => $instances) { + foreach($instances as $number => $instance) { + if(!$instance->is_valid()) { + return false; + } + } + } + } + // Finally, check the valid property list for any mandatory properties + // that have not been set and do not have a default value + foreach($this->valid_properties as $property => $propdata) { + if(($propdata & RFC2445_REQUIRED) && empty($this->properties[$property])) { + $classname = 'iCalendar_property_'.strtolower(str_replace('-', '_', $property)); + $object = new $classname; + if($object->default_value() === NULL) { + return false; + } + unset($object); + } + } + + return true; + } + + function serialize() { + // Check for validity of the object + if(!$this->is_valid()) { + return false; + } + + // Maybe the object is valid, but there are some required properties that + // have not been given explicit values. In that case, set them to defaults. + foreach($this->valid_properties as $property => $propdata) { + if(($propdata & RFC2445_REQUIRED) && empty($this->properties[$property])) { + $this->add_property($property); + } + } + + // Start tag + $string = rfc2445_fold('BEGIN:'.$this->name) . RFC2445_CRLF; + // List of properties + if(!empty($this->properties)) { + foreach($this->properties as $name => $properties) { + foreach($properties as $property) { + $string .= $property->serialize(); + } + } + } + // List of components + if(!empty($this->components)) { + foreach($this->components as $name => $components) { + foreach($components as $component) { + $string .= $component->serialize(); + } + } + } + + // End tag + $string .= rfc2445_fold('END:'.$this->name) . RFC2445_CRLF; + + return $string; + } + + function assign_values($activity) { + foreach($this->mapping_arr as $key=>$components){ + if(!is_array($components['component']) && empty($components['function'])){ + $this->add_property($key,$activity[$components['component']]); + } else if(is_array($components['component']) && empty($components['function'])){ + $component = ''; + foreach($components['component'] as $comp){ + if(!empty($component)) $component .= ','; + $component .= $activity[$comp]; + } + $this->add_property($key,$component); + } else if(!empty($components['function'])){ + $this->$components['function']($activity); + } + } + return true; + } + + function generateArray($ical_activity){ + global $current_user; + $activity = array(); + $activitytype = $ical_activity['TYPE']; + if($activitytype=='VEVENT'){ + $modtype = 'Events'; + } else { + $modtype = 'Calendar'; + } + foreach($this->mapping_arr as $key=>$comp){ + $type = $comp['type']; + $component = $comp['component']; + if(!is_array($component)){ + if($type!='user'){ + if(isset($this->field_mapping_arr[$component])){ + if(getFieldVisibilityPermission($modtype,$current_user->id,$this->field_mapping_arr[$component])=='0') + $activity[$this->field_mapping_arr[$component]] = $ical_activity[$key]; + else + $activity[$this->field_mapping_arr[$component]] = ''; + } else { + if(getFieldVisibilityPermission($modtype,$current_user->id,$component)=='0') + $activity[$component] = $ical_activity[$key]; + else + $activity[$component] = ''; + } + } + } else { + $temp = $ical_activity[$key]; + $count = 0; + if($type == 'string'){ + $values = explode('\\,',$temp); + } else if($type == 'datetime' && !empty($temp)){ + $values = $this->strtodatetime($temp); + } + foreach($component as $index){ + if(!isset($activity[$index])){ + if(isset($this->field_mapping_arr[$index])){ + if(getFieldVisibilityPermission($modtype,$current_user->id,$this->field_mapping_arr[$index])=='0') + $activity[$this->field_mapping_arr[$index]] = $values[$count]; + else + $activity[$this->field_mapping_arr[$index]] = ''; + } else { + if(getFieldVisibilityPermission($modtype,$current_user->id,$index)=='0') + $activity[$index] = $values[$count]; + else + $activity[$index] = ''; + } + } + $count++; + } + unset($values); + } + } + if($activitytype=='VEVENT'){ + $activity['activitytype'] = 'Meeting'; + if(!empty($ical_activity['VALARM'])){ + $temp = str_replace("PT",'',$ical_activity['VALARM']['TRIGGER']); + $duration_type = $temp[strlen($temp)-1]; + $duration = intval($temp); + if($duration_type=='H'){ + $reminder_time = $duration*60; + } else if($duration_type=='M'){ + $reminder_time = $duration; + } + $activity['reminder_time'] = $reminder_time; + } + } else { + $activity['activitytype'] = 'Task'; + } + return $activity; + } + + function strtodatetime($date){ + $date = preg_replace('/[A-Za-z_]*/', '', $date); + $year = substr($date,0,4); + $month = substr($date,4,2); + $day = substr($date,6,2); + $hours = substr($date,8,2); + $minutes = substr($date,10,2); + $seconds = substr($date,12,2); + $datetime[] = $year."-".$month."-".$day; + $datetime[] = $hours.":".$minutes.":".$seconds; + return $datetime; + } +} + +class iCalendar extends iCalendar_component { + var $name = 'VCALENDAR'; + + function construct() { + $this->valid_properties = array( + 'CALSCALE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'METHOD' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'PRODID' => RFC2445_REQUIRED | RFC2445_ONCE, + 'VERSION' => RFC2445_REQUIRED | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + + $this->valid_components = array( + 'VEVENT', 'VTODO', 'VTIMEZONE' + // TODO: add support for the other component types + //, 'VJOURNAL', 'VFREEBUSY', 'VALARM' + ); + parent::construct(); + } + +} + +class iCalendar_event extends iCalendar_component { + + var $name = 'VEVENT'; + var $properties; + var $mapping_arr = array( + 'CLASS' => array('component'=>'visibility','type'=>'string'), + 'DESCRIPTION' => array('component'=>'description','type'=>'string'), + 'DTSTART' => array('component'=>array('date_start','time_start'),'function'=>'iCalendar_event_dtstart','type'=>'datetime'), + 'DTEND' => array('component'=>array('due_date','time_end'),'function'=>'iCalendar_event_dtend','type'=>'datetime'), + 'DTSTAMP' => array('component'=>array('date_start','time_start'),'function'=>'iCalendar_event_dtstamp','type'=>'datetime'), + 'LOCATION' => array('component'=>'location','type'=>'string'), + 'STATUS' => array('component'=>'eventstatus','type'=>'string'), + 'SUMMARY' => array('component'=>'subject','type'=>'string'), + 'PRIORITY' => array('component'=>'priority','type'=>'string'), + 'ATTENDEE' => array('component'=>'activityid','function'=>'iCalendar_event_attendee','type'=>'user'), + 'RESOURCES' => array('component'=>array('location','eventstatus'),'type'=>'string'), + ); + var $field_mapping_arr = array( + 'priority'=>'taskpriority' + ); + + function construct() { + + $this->valid_components = array('VALARM'); + + $this->valid_properties = array( + 'CLASS' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'CREATED' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DESCRIPTION' => RFC2445_OPTIONAL | RFC2445_ONCE, + // Standard ambiguous here: in 4.6.1 it says that DTSTAMP in optional, + // while in 4.8.7.2 it says it's REQUIRED. Go with REQUIRED. + 'DTSTAMP' => RFC2445_REQUIRED | RFC2445_ONCE, + // Standard ambiguous here: in 4.6.1 it says that DTSTART in optional, + // while in 4.8.2.4 it says it's REQUIRED. Go with REQUIRED. + 'DTSTART' => RFC2445_REQUIRED | RFC2445_ONCE, + 'GEO' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LAST-MODIFIED' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LOCATION' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'ORGANIZER' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'PRIORITY' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'SEQUENCE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'STATUS' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'SUMMARY' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'TRANSP' => RFC2445_OPTIONAL | RFC2445_ONCE, + // Standard ambiguous here: in 4.6.1 it says that UID in optional, + // while in 4.8.4.7 it says it's REQUIRED. Go with REQUIRED. + 'UID' => RFC2445_REQUIRED | RFC2445_ONCE, + 'URL' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'RECURRENCE-ID' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DTEND' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DURATION' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'ATTACH' => RFC2445_OPTIONAL, + 'ATTENDEE' => RFC2445_OPTIONAL, + 'CATEGORIES' => RFC2445_OPTIONAL, + 'COMMENT' => RFC2445_OPTIONAL, + 'CONTACT' => RFC2445_OPTIONAL, + 'EXDATE' => RFC2445_OPTIONAL, + 'EXRULE' => RFC2445_OPTIONAL, + 'REQUEST-STATUS' => RFC2445_OPTIONAL, + 'RELATED-TO' => RFC2445_OPTIONAL, + 'RESOURCES' => RFC2445_OPTIONAL, + 'RDATE' => RFC2445_OPTIONAL, + 'RRULE' => RFC2445_OPTIONAL, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + + parent::construct(); + } + + function invariant_holds() { + // DTEND and DURATION must not appear together + if(isset($this->properties['DTEND']) && isset($this->properties['DURATION'])) { + return false; + } + + + if(isset($this->properties['DTEND']) && isset($this->properties['DTSTART'])) { + // DTEND must be later than DTSTART + // The standard is not clear on how to hande different value types though + // TODO: handle this correctly even if the value types are different + if($this->properties['DTEND'][0]->value <= $this->properties['DTSTART'][0]->value) { + return false; + } + + // DTEND and DTSTART must have the same value type + if($this->properties['DTEND'][0]->val_type != $this->properties['DTSTART'][0]->val_type) { + return false; + } + + } + return true; + } + + function iCalendar_event_dtstamp($activity){ + $components = gmdate('Ymd', strtotime($activity['date_start']." ".$activity['time_start']))."T".gmdate('His', strtotime($activity['date_start']." ".$activity['time_start']))."Z"; + $this->add_property("DTSTAMP",$components); + return true; + } + + function iCalendar_event_dtstart($activity){ + $time = str_replace(':','',$activity['time_start']); + if(strlen($time)<6){ + while((6-strlen($time)) > 0 ){ + $time .= '0'; + } + } + $components = str_replace('-', '', $activity['date_start']).'T'. $time . 'Z'; + $this->add_property("DTSTART",$components); + return true; + } + + function iCalendar_event_dtend($activity){ + $time = str_replace(':','',$activity['time_end']); + if(strlen($time)<6){ + while((6-strlen($time)) > 0 ){ + $time .= '0'; + } + } + $components = str_replace('-', '', $activity['due_date']).'T'. $time . 'Z'; + $this->add_property("DTEND",$components); + return true; + } + + function iCalendar_event_attendee($activity){ + global $adb; + $users_res = $adb->pquery("SELECT inviteeid FROM vtiger_invitees WHERE activityid=?", array($activity['id'])); + if($adb->num_rows($users_res)>0){ + for($i=0;$i<$adb->num_rows($users_res);$i++){ + $inviteeid = $adb->query_result($users_res,$i,'inviteeid'); + $username = getUserFullName($inviteeid); + $user_email = getUserEmail($inviteeid); + $attendee = 'mailto:'.$user_email; + $this->add_property('ATTENDEE',$attendee); + } + } + return true; + } + +} + +class iCalendar_todo extends iCalendar_component { + var $name = 'VTODO'; + var $properties; + var $mapping_arr = array( + 'DESCRIPTION' => array('component'=>'description','type'=>'string'), + 'DTSTAMP' => array('component'=>array('date_start','time_start'),'function'=>'iCalendar_event_dtstamp','type'=>'datetime'), + 'DTSTART' => array('component'=>array('date_start','time_start'),'function'=>'iCalendar_event_dtstart','type'=>'datetime'), + 'DUE' => array('component'=>array('due_date'),'function'=>'iCalendar_event_dtend','type'=>'datetime'), + 'STATUS' => array('component'=>'status','type'=>'string'), + 'SUMMARY' => array('component'=>'subject','type'=>'string'), + 'PRIORITY' => array('component'=>'priority','type'=>'string'), + 'RESOURCES' => array('component'=>array('status'),'type'=>'string'), + ); + var $field_mapping_arr = array( + 'status'=>'taskstatus', + 'priority'=>'taskpriority' + ); + + function construct() { + + $this->valid_components = array(); + $this->valid_properties = array( + 'CLASS' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'COMPLETED' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'CREATED' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DESCRIPTION' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DTSTAMP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DTSTART' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'GEO' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LAST-MODIFIED' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LOCATION' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'ORGANIZER' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'PERCENT' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'PRIORITY' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'RECURID' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'SEQUENCE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'STATUS' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'SUMMARY' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'UID' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'URL' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DURATION' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'ATTACH' => RFC2445_OPTIONAL, + 'ATTENDEE' => RFC2445_OPTIONAL, + 'CATEGORIES' => RFC2445_OPTIONAL, + 'COMMENT' => RFC2445_OPTIONAL, + 'CONTACT' => RFC2445_OPTIONAL, + 'EXDATE' => RFC2445_OPTIONAL, + 'EXRULE' => RFC2445_OPTIONAL, + 'RSTATUS' => RFC2445_OPTIONAL, + 'RELATED' => RFC2445_OPTIONAL, + 'RESOURCES' => RFC2445_OPTIONAL, + 'RDATE' => RFC2445_OPTIONAL, + 'RRULE' => RFC2445_OPTIONAL, + 'XPROP' => RFC2445_OPTIONAL + ); + + parent::construct(); + // TODO: + // either 'due' or 'duration' may appear in a 'eventprop', but 'due' + // and 'duration' MUST NOT occur in the same 'eventprop' + } + function iCalendar_event_dtstamp($activity){ + $components = gmdate('Ymd', strtotime($activity['date_start']." ".$activity['time_start']))."T".gmdate('His', strtotime($activity['date_start']." ".$activity['time_start']))."Z"; + $this->add_property("DTSTAMP",$components); + return true; + } + + function iCalendar_event_dtstart($activity){ + $time = str_replace(':','',$activity['time_start']); + if(strlen($time)<6){ + while((6-strlen($time)) > 0 ){ + $time .= '0'; + } + } + $components = str_replace('-', '', $activity['date_start']).'T'. $time . 'Z'; + $this->add_property("DTSTART",$components); + return true; + } + + function iCalendar_event_dtend($activity){ + $components = str_replace('-', '', $activity['due_date']).'T000000Z'; + $this->add_property("DUE",$components); + return true; + } +} + +class iCalendar_journal extends iCalendar_component { + // TODO: implement +} + +class iCalendar_freebusy extends iCalendar_component { + // TODO: implement +} + +class iCalendar_alarm extends iCalendar_component { + var $name='VALARM'; + var $properties; + var $mapping_arr = array( + 'TRIGGER' => array('component'=>'reminder_time', 'function'=>'iCalendar_event_trigger'), + ); + + function construct() { + + $this->valid_components = array(); + $this->valid_properties = array( + 'TRIGGER' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DESCRIPTION' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'ACTION' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'X-WR-ALARMUID' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + + parent::construct(); + } + + function iCalendar_event_trigger($activity){ + $reminder_time = $activity['reminder_time']; + if($reminder_time>60){ + $reminder_time = round($reminder_time/60); + $reminder = $reminder_time.'H'; + }else { + $reminder = $reminder_time.'M'; + } + $this->add_property('ACTION', 'DISPLAY'); + $this->add_property('TRIGGER', 'PT'.$reminder); + $this->add_property('DESCRIPTION', 'Reminder'); + return true; + } +} + +class iCalendar_timezone extends iCalendar_component { + var $name = 'VTIMEZONE'; + var $properties; + + function construct() { + $this->valid_components = array(); + $this->valid_properties = array( + 'TZID' => RFC2445_REQUIRED | RFC2445_ONCE, + 'LAST-MODIFIED' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'TZURL' => RFC2445_OPTIONAL | RFC2445_ONCE, + // TODO: the next two are components of their own! + 'STANDARDC' => RFC2445_OPTIONAL, + 'DAYLIGHTC' => RFC2445_OPTIONAL, + 'TZOFFSETFROM' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'TZOFFSETTO' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'X-PROP' => RFC2445_OPTIONAL + ); + + parent::construct(); + } + +} + +// REMINDER: DTEND must be later than DTSTART for all components which support both +// REMINDER: DUE must be later than DTSTART for all components which support both + +?> diff --git a/modules/Calendar/iCal/iCalendar_parameters.php b/modules/Calendar/iCal/iCalendar_parameters.php new file mode 100644 index 0000000..441c55c --- /dev/null +++ b/modules/Calendar/iCal/iCalendar_parameters.php @@ -0,0 +1,227 @@ + array('PLAIN', 'RICHTEXT', 'ENRICHED', 'TAB-SEPARATED-VALUES', 'HTML', 'SGML', + 'VND.LATEX-Z', 'VND.FMI.FLEXSTOR'), + 'MULTIPART' => array('MIXED', 'ALTERNATIVE', 'DIGEST', 'PARALLEL', 'APPLEDOUBLE', 'HEADER-SET', + 'FORM-DATA', 'RELATED', 'REPORT', 'VOICE-MESSAGE', 'SIGNED', 'ENCRYPTED', + 'BYTERANGES'), + 'MESSAGE' => array('RFC822', 'PARTIAL', 'EXTERNAL-BODY', 'NEWS', 'HTTP'), + 'APPLICATION' => array('OCTET-STREAM', 'POSTSCRIPT', 'ODA', 'ATOMICMAIL', 'ANDREW-INSET', 'SLATE', + 'WITA', 'DEC-DX', 'DCA-RFT', 'ACTIVEMESSAGE', 'RTF', 'APPLEFILE', + 'MAC-BINHEX40', 'NEWS-MESSAGE-ID', 'NEWS-TRANSMISSION', 'WORDPERFECT5.1', + 'PDF', 'ZIP', 'MACWRITEII', 'MSWORD', 'REMOTE-PRINTING', 'MATHEMATICA', + 'CYBERCASH', 'COMMONGROUND', 'IGES', 'RISCOS', 'ESHOP', 'X400-BP', 'SGML', + 'CALS-1840', 'PGP-ENCRYPTED', 'PGP-SIGNATURE', 'PGP-KEYS', 'VND.FRAMEMAKER', + 'VND.MIF', 'VND.MS-EXCEL', 'VND.MS-POWERPOINT', 'VND.MS-PROJECT', + 'VND.MS-WORKS', 'VND.MS-TNEF', 'VND.SVD', 'VND.MUSIC-NIFF', 'VND.MS-ARTGALRY', + 'VND.TRUEDOC', 'VND.KOAN', 'VND.STREET-STREAM', 'VND.FDF', + 'SET-PAYMENT-INITIATION', 'SET-PAYMENT', 'SET-REGISTRATION-INITIATION', + 'SET-REGISTRATION', 'VND.SEEMAIL', 'VND.BUSINESSOBJECTS', + 'VND.MERIDIAN-SLINGSHOT', 'VND.XARA', 'SGML-OPEN-CATALOG', 'VND.RAPID', + 'VND.ENLIVEN', 'VND.JAPANNET-REGISTRATION-WAKEUP', + 'VND.JAPANNET-VERIFICATION-WAKEUP', 'VND.JAPANNET-PAYMENT-WAKEUP', + 'VND.JAPANNET-DIRECTORY-SERVICE', 'VND.INTERTRUST.DIGIBOX', 'VND.INTERTRUST.NNCP'), + 'IMAGE' => array('JPEG', 'GIF', 'IEF', 'G3FAX', 'TIFF', 'CGM', 'NAPLPS', 'VND.DWG', 'VND.SVF', + 'VND.DXF', 'PNG', 'VND.FPX', 'VND.NET-FPX'), + 'AUDIO' => array('BASIC', '32KADPCM', 'VND.QCELP'), + 'VIDEO' => array('MPEG', 'QUICKTIME', 'VND.VIVO', 'VND.MOTOROLA.VIDEO', 'VND.MOTOROLA.VIDEOP') + ); + $value = strtoupper($value); + if(rfc2445_is_xname($value)) { + return true; + } + @list($type, $subtype) = explode('/', $value); + if(empty($type) || empty($subtype)) { + return false; + } + if(!isset($fmttypes[$type]) || !in_array($subtype, $fmttypes[$type])) { + return false; + } + return true; + break; + + case 'LANGUAGE': + $value = strtoupper($value); + $parts = explode('-', $value); + foreach($parts as $part) { + if(empty($part)) { + return false; + } + if(strspn($part, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') != strlen($part)) { + return false; + } + } + return true; + break; + + case 'PARTSTAT': + $value = strtoupper($value); + switch($parent_property->parent_component) { + case 'VEVENT': + return ($value == 'NEEDS-ACTION' || $value == 'ACCEPTED' || $value == 'DECLINED' || $value == 'TENTATIVE' + || $value == 'DELEGATED' || rfc2445_is_xname($value)); + break; + case 'VTODO': + return ($value == 'NEEDS-ACTION' || $value == 'ACCEPTED' || $value == 'DECLINED' || $value == 'TENTATIVE' + || $value == 'DELEGATED' || $value == 'COMPLETED' || $value == 'IN-PROCESS' || rfc2445_is_xname($value)); + break; + case 'VJOURNAL': + return ($value == 'NEEDS-ACTION' || $value == 'ACCEPTED' || $value == 'DECLINED' || rfc2445_is_xname($value)); + break; + } + return false; + break; + + case 'RANGE': + $value = strtoupper($value); + return ($value == 'THISANDPRIOR' || $value == 'THISANDFUTURE'); + break; + + case 'RELATED': + $value = strtoupper($value); + return ($value == 'START' || $value == 'END'); + break; + + case 'RELTYPE': + $value = strtoupper($value); + return ($value == 'PARENT' || $value == 'CHILD' || $value == 'SIBLING' || rfc2445_is_xname($value)); + break; + + case 'ROLE': + $value = strtoupper($value); + return ($value == 'CHAIR' || $value == 'REQ-PARTICIPANT' || $value == 'OPT-PARTICIPANT' || $value == 'NON-PARTICIPANT' || rfc2445_is_xname($value)); + break; + + case 'RSVP': + $value = strtoupper($value); + return ($value == 'TRUE' || $value == 'FALSE'); + break; + + case 'TZID': + if(empty($value)) { + return false; + } + return (strcspn($value, '";:,') == strlen($value)); + break; + + case 'VALUE': + $value = strtoupper($value); + return ($value == 'BINARY' || $value == 'BOOLEAN' || $value == 'CAL-ADDRESS' || $value == 'DATE' || + $value == 'DATE-TIME' || $value == 'DURATION' || $value == 'FLOAT' || $value == 'INTEGER' || + $value == 'PERIOD' || $value == 'RECUR' || $value == 'TEXT' || $value == 'TIME' || + $value == 'URI' || $value == 'UTC-OFFSET' || rfc2445_is_xname($value)); + break; + } + } + + function do_value_formatting($parameter, $value) { + switch($parameter) { + // Parameters of type CAL-ADDRESS or URI MUST be double-quoted + case 'ALTREP': + case 'DIR': + case 'DELEGATED-FROM': + case 'DELEGATED-TO': + case 'MEMBER': + case 'SENT-BY': + return '"'.$value.'"'; + break; + + // Textual parameter types must be double quoted if they contain COLON, SEMICOLON + // or COMMA. Quoting always sounds easier and standards-conformant though. + case 'CN': + return '"'.$value.'"'; + break; + + // Parameters with enumerated legal values, just make them all caps + case 'CUTYPE': + case 'ENCODING': + case 'FBTYPE': + case 'FMTTYPE': + case 'LANGUAGE': + case 'PARTSTAT': + case 'RANGE': + case 'RELATED': + case 'RELTYPE': + case 'ROLE': + case 'RSVP': + case 'VALUE': + return strtoupper($value); + break; + + // Parameters we shouldn't be messing with + case 'TZID': + return $value; + break; + } + } + + function undo_value_formatting($parameter, $value) { + } + +} + +?> diff --git a/modules/Calendar/iCal/iCalendar_properties.php b/modules/Calendar/iCal/iCalendar_properties.php new file mode 100644 index 0000000..ad7eb14 --- /dev/null +++ b/modules/Calendar/iCal/iCalendar_properties.php @@ -0,0 +1,1367 @@ +construct(); + } + + function construct() { + $this->parameters = array(); + } + + // If some property needs extra care with its parameters, override this + // IMPORTANT: the parameter name MUST BE CAPITALIZED! + function is_valid_parameter($parameter, $value) { + + if(is_array($value)) { + if(!iCalendar_parameter::multiple_values_allowed($parameter)) { + return false; + } + foreach($value as $item) { + if(!iCalendar_parameter::is_valid_value($this, $parameter, $item)) { + return false; + } + } + return true; + } + + return iCalendar_parameter::is_valid_value($this, $parameter, $value); + } + + function invariant_holds() { + return true; + } + + // If some property is very picky about its values, it should do the work itself + // Only data type validation is done here + function is_valid_value($value) { + if(is_array($value)) { + if(!$this->val_multi) { + return false; + } + else { + foreach($value as $oneval) { + if(!rfc2445_is_valid_value($oneval, $this->val_type)) { + return false; + } + } + } + return true; + } + return rfc2445_is_valid_value($value, $this->val_type); + } + + function default_value() { + return $this->val_default; + } + + function set_parent_component($componentname) { + if(class_exists('iCalendar_'.strtolower(substr($componentname, 1)))) { + $this->parent_component = strtoupper($componentname); + return true; + } + + return false; + } + + function set_value($value) { + if($this->is_valid_value($value)) { + // This transparently formats any value type according to the iCalendar specs + if(is_array($value)) { + foreach($value as $key => $item) { + $value[$key] = rfc2445_do_value_formatting($item, $this->val_type); + } + $this->value = implode(',', $value); + } + else { + $this->value = rfc2445_do_value_formatting($value, $this->val_type); + } + + return true; + } + return false; + } + + function get_value() { + // First of all, assume that we have multiple values + $valarray = explode('\\,', $this->value); + + // Undo transparent formatting + $replace_function = create_function('$a', 'return rfc2445_undo_value_formatting($a, '.$this->val_type.');'); + $valarray = array_map($replace_function, $valarray); + + // Now, if this property cannot have multiple values, don't return as an array + if(!$this->val_multi) { + return $valarray[0]; + } + + // Otherwise return an array even if it has one element, for uniformity + return $valarray; + + } + + function set_parameter($name, $value) { + + // Uppercase + $name = strtoupper($name); + + // Are we trying to add a valid parameter? + $xname = false; + if(!isset($this->valid_parameters[$name])) { + // If not, is it an x-name as per RFC 2445? + if(!rfc2445_is_xname($name)) { + return false; + } + // No more checks -- all components are supposed to allow x-name parameters + $xname = true; + } + + if(!$this->is_valid_parameter($name, $value)) { + return false; + } + + if(is_array($value)) { + foreach($value as $key => $element) { + $value[$key] = iCalendar_parameter::do_value_formatting($name, $element); + } + } + else { + $value = iCalendar_parameter::do_value_formatting($name, $value); + } + + $this->parameters[$name] = $value; + + // Special case: if we just changed the VALUE parameter, reflect this + // in the object's status so that it only accepts correct type values + if($name == 'VALUE') { + // TODO: what if this invalidates an already-set value? + $this->val_type = constant('RFC2445_TYPE_'.str_replace('-', '_', $value)); + } + + return true; + + } + + function get_parameter($name) { + + // Uppercase + $name = strtoupper($name); + + if(isset($this->parameters[$name])) { + // If there are any double quotes in the value, invisibly strip them + if(is_array($this->parameters[$name])) { + foreach($this->parameters[$name] as $key => $value) { + if(substr($value, 0, 1) == '"') { + $this->parameters[$name][$key] = substr($value, 1, strlen($value) - 2); + } + } + return $this->parameters[$name]; + } + + else { + if(substr($this->parameters[$name], 0, 1) == '"') { + return substr($this->parameters[$name], 1, strlen($this->parameters[$name]) - 2); + } + } + } + + return NULL; + } + + function serialize() { + $string = $this->name; + + if(!empty($this->parameters)) { + foreach($this->parameters as $name => $value) { + $string .= ';'.$name.'='; + if(is_array($value)) { + $string .= implode(',', $value); + } + else { + $string .= $value; + } + } + } + + $string .= ':'.$this->value; + + return rfc2445_fold($string) . RFC2445_CRLF; + } +} + +// 4.7 Calendar Properties +// ----------------------- + +class iCalendar_property_calscale extends iCalendar_property { + + var $name = 'CALSCALE'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + // This is case-sensitive + return ($value === 'GREGORIAN'); + } +} + +class iCalendar_property_method extends iCalendar_property { + + var $name = 'METHOD'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + // This is case-sensitive + // Methods from RFC 2446 + $methods == array('PUBLISH', 'REQUEST', 'REPLY', 'ADD', 'CANCEL', 'REFRESH', 'COUNTER', 'DECLINECOUNTER'); + return in_array($value, $methods); + } +} + +class iCalendar_property_prodid extends iCalendar_property { + + var $name = 'PRODID'; + var $val_type = RFC2445_TYPE_TEXT; + var $val_default = NULL; + + function construct() { + $this->val_default = '-//John Papaioannou/NONSGML Bennu '._BENNU_VERSION.'//EN'; + + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_version extends iCalendar_property { + + var $name = 'VERSION'; + var $val_type = RFC2445_TYPE_TEXT; + var $val_default = '2.0'; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + return($value === '2.0' || $value === 2.0); + } + +} + +// 4.8.1 Descriptive Component Properties +// -------------------------------------- + +class iCalendar_property_attach extends iCalendar_property { + + var $name = 'ATTACH'; + var $val_type = RFC2445_TYPE_URI; + + function construct() { + $this->valid_parameters = array( + 'FMTTYPE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'ENCODING' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'VALUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function invariant_holds() { + if(isset($this->parameters['ENCODING']) && !isset($this->parameters['VALUE'])) { + return false; + } + if(isset($this->parameters['VALUE']) && !isset($this->parameters['ENCODING'])) { + return false; + } + + return true; + } + + function is_valid_parameter($parameter, $value) { + + $parameter = strtoupper($parameter); + + if(!parent::is_valid_parameter($parameter, $value)) { + return false; + } + + if($parameter === 'ENCODING' && strtoupper($value) != 'BASE64') { + return false; + } + + if($parameter === 'VALUE' && strtoupper($value) != 'BINARY') { + return false; + } + + return true; + } +} + +class iCalendar_property_categories extends iCalendar_property { + + var $name = 'CATEGORIES'; + var $val_type = RFC2445_TYPE_TEXT; + var $val_multi = true; + + function construct() { + $this->valid_parameters = array( + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_class extends iCalendar_property { + + var $name = 'CLASS'; + var $val_type = RFC2445_TYPE_TEXT; + var $val_default = 'PUBLIC'; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + function is_valid_value($value) { + $value = strtoupper($value); + // If this is not an xname, it is case-sensitive + return ($value === 'PUBLIC' || $value === 'PRIVATE' || $value === 'CONFIDENTIAL' || rfc2445_is_xname(strtoupper($value))); + } +} + +class iCalendar_property_comment extends iCalendar_property { + + var $name = 'COMMENT'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'ALTREP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_description extends iCalendar_property { + + var $name = 'DESCRIPTION'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'ALTREP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_geo extends iCalendar_property { + + var $name = 'GEO'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'ALTREP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + // This MUST be two floats separated by a semicolon + if(!is_string($value)) { + return false; + } + + $floats = explode(';', $value); + if(count($floats) != 2) { + return false; + } + + return rfc2445_is_valid_value($floats[0], RFC2445_TYPE_FLOAT) && rfc2445_is_valid_value($floats[1], RFC2445_TYPE_FLOAT); + } + + function set_value($value) { + // Must override this, otherwise the semicolon separating + // the two floats would get auto-quoted, which is illegal + if($this->is_valid_value($value)) { + $this->value = $value; + return true; + } + + return false; + } + +} + +class iCalendar_property_location extends iCalendar_property { + + var $name = 'LOCATION'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'ALTREP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_percent_complete extends iCalendar_property { + + var $name = 'PERCENT-COMPLETE'; + var $val_type = RFC2445_TYPE_INTEGER; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + // Only integers between 0 and 100 inclusive allowed + if(!parent::is_valid_value($value)) { + return false; + } + $value = intval($value); + return ($value >= 0 && $value <= 100); + } + +} + +class iCalendar_property_priority extends iCalendar_property { + + var $name = 'PRIORITY'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + // Only integers between 0 and 9 inclusive allowed + if(!parent::is_valid_value($value)) { + return false; + } + return true; + //$value = intval($value); + //return ($value >= 0 && $value <= 9); + } +} + +class iCalendar_property_resources extends iCalendar_property { + + var $name = 'RESOURCES'; + var $val_type = RFC2445_TYPE_TEXT; + var $val_multi = true; + + function construct() { + $this->valid_parameters = array( + 'ALTREP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_status extends iCalendar_property { + + var $name = 'STATUS'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + +/* function is_valid_value($value) { + // This is case-sensitive + switch ($this->parent_component) { + case 'VEVENT': + $allowed = array('TENTATIVE', 'CONFIRMED', 'CANCELLED'); + break; + case 'VTODO': + $allowed = array('NEEDS-ACTION', 'COMPLETED', 'IN-PROCESS', 'CANCELLED'); + break; + case 'VJOURNAL': + $allowed = array('DRAFT', 'FINAL', 'CANCELLED'); + break; + } + return in_array($value, $allowed); + + } +*/ +} + +class iCalendar_property_summary extends iCalendar_property { + + var $name = 'SUMMARY'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'ALTREP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +// 4.8.2 Date and Time Component Properties +// ---------------------------------------- + +class iCalendar_property_completed extends iCalendar_property { + + var $name = 'COMPLETED'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + // Time MUST be in UTC format + return(substr($value, -1) == 'Z'); + } +} + +class iCalendar_property_dtend extends iCalendar_property { + + var $name = 'DTEND'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + 'VALUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'TZID' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + + // If present in a FREEBUSY component, must be in UTC format + if($this->parent_component == 'VFREEBUSY' && substr($value, -1) != 'Z') { + return false; + } + + return true; + + } + + function is_valid_parameter($parameter, $value) { + + $parameter = strtoupper($parameter); + + if(!parent::is_valid_parameter($parameter, $value)) { + return false; + } + if($parameter == 'VALUE' && !($value == 'DATE' || $value == 'DATE-TIME')) { + return false; + } + + return true; + } +} + +class iCalendar_property_due extends iCalendar_property { + + var $name = 'DUE'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + 'VALUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'TZID' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + + // If present in a FREEBUSY component, must be in UTC format + if($this->parent_component == 'VFREEBUSY' && substr($value, -1) != 'Z') { + return false; + } + + return true; + + } + + function is_valid_parameter($parameter, $value) { + + $parameter = strtoupper($parameter); + + if(!parent::is_valid_parameter($parameter, $value)) { + return false; + } + if($parameter == 'VALUE' && !($value == 'DATE' || $value == 'DATE-TIME')) { + return false; + } + + return true; + } +} + +class iCalendar_property_dtstart extends iCalendar_property { + + var $name = 'DTSTART'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + 'VALUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'TZID' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + // TODO: unimplemented stuff when parent is a VTIMEZONE component + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + // If present in a FREEBUSY component, must be in UTC format + if($this->parent_component == 'VFREEBUSY' && substr($value, -1) != 'Z') { + return false; + } + + return true; + } + + function is_valid_parameter($parameter, $value) { + $parameter = strtoupper($parameter); + + if(!parent::is_valid_parameter($parameter, $value)) { + return false; + } + if($parameter == 'VALUE' && !($value == 'DATE' || $value == 'DATE-TIME')) { + return false; + } + + return true; + } +} + +class iCalendar_property_duration extends iCalendar_property { + + var $name = 'DURATION'; + var $val_type = RFC2445_TYPE_DURATION; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + + // Value must be positive + return ($value{0} != '-'); + } +} + +class iCalendar_property_freebusy extends iCalendar_property { + + var $name = 'FREEBUSY'; + var $val_type = RFC2445_TYPE_PERIOD; + var $val_multi = true; + + function construct() { + $this->valid_parameters = array( + 'FBTYPE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + + $pos = strpos($value, '/'); // We know there's only one / in there + if($value{$pos - 1} != 'Z') { + // Start time MUST be in UTC + return false; + } + if($value{$pos + 1} != 'P' && $substr($value, -1) != 'Z') { + // If the second part is not a period, it MUST be in UTC + return false; + } + + return true; + } + + // TODO: these properties SHOULD be shorted in ascending order (by start time and end time as tiebreak) +} + +class iCalendar_property_transp extends iCalendar_property { + + var $name = 'TRANSP'; + var $val_type = RFC2445_TYPE_TEXT; + var $val_default = 'OPAQUE'; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + return ($value === 'TRANSPARENT' || $value === 'OPAQUE'); + } +} + +// TODO: 4.8.3 timezone component properties + + +// 4.8.4 Relationship Component Properties +// --------------------------------------- + +class iCalendar_property_attendee extends iCalendar_property { + + var $name = 'ATTENDEE'; + var $val_type = RFC2445_TYPE_CAL_ADDRESS; + + // TODO: MUST NOT be specified when the calendar object has METHOD=PUBLISH + // TODO: standard has lots of detail here, make triple sure that we eventually conform + + function construct() { + $this->valid_parameters = array( + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'CN' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'ROLE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'PARTSTAT' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'RSVP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'CUTYPE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'MEMBER' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DELEGATED-TO' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DELEGATED-FROM' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'SENT-BY' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DIR' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function set_parent_component($componentname) { + if(!parent::set_parent_component($componentname)) { + return false; + } + + if($this->parent_component == 'VFREEBUSY' || $this->parent_component == 'VALARM') { + // Most parameters become invalid in this case, the full allowed set is now: + $this->valid_parameters = array( + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + return false; + } + +} + +class iCalendar_property_contact extends iCalendar_property { + + var $name = 'CONTACT'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'ALTREP' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_organizer extends iCalendar_property { + + var $name = 'ORGANIZER'; + var $val_type = RFC2445_TYPE_CAL_ADDRESS; + + function construct() { + $this->valid_parameters = array( + 'CN' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'DIR' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'SENT-BY' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + // TODO: +/* + Conformance: This property MUST be specified in an iCalendar object + that specifies a group scheduled calendar entity. This property MUST + be specified in an iCalendar object that specifies the publication of + a calendar user's busy time. This property MUST NOT be specified in + an iCalendar object that specifies only a time zone definition or + that defines calendar entities that are not group scheduled entities, + but are entities only on a single user's calendar. +*/ + +} + +class iCalendar_property_recurrence_id extends iCalendar_property { + + // TODO: can only be specified when defining recurring components in the calendar +/* + Conformance: This property can be specified in an iCalendar object + containing a recurring calendar component. + + Description: The full range of calendar components specified by a + recurrence set is referenced by referring to just the "UID" property + value corresponding to the calendar component. The "RECURRENCE-ID" + property allows the reference to an individual instance within the + recurrence set. +*/ + + var $name = 'RECURRENCE-ID'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + 'RANGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'TZID' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'VALUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_parameter($parameter, $value) { + + $parameter = strtoupper($parameter); + + if(!parent::is_valid_parameter($parameter, $value)) { + return false; + } + if($parameter == 'VALUE' && !($value == 'DATE' || $value == 'DATE-TIME')) { + return false; + } + + return true; + } + +} + +class iCalendar_property_related_to extends iCalendar_property { + + var $name = 'RELATED-TO'; + var $val_type = RFC2445_TYPE_TEXT; + + // TODO: the value of this property must reference another component's UID + + function construct() { + $this->valid_parameters = array( + 'RELTYPE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_url extends iCalendar_property { + + var $name = 'URL'; + var $val_type = RFC2445_TYPE_URI; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_uid extends iCalendar_property { + + var $name = 'UID'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + + // The exception to the rule: this is not a static value, so we + // generate it on-the-fly here. Guaranteed to be different for + // each instance of this property, too. Nice. + $this->val_default = rfc2445_guid(); + } +} + +// 4.8.5 Recurrence Component Properties +// ------------------------------------- + +class iCalendar_property_exdate extends iCalendar_property { + + var $name = 'EXDATE'; + var $val_type = RFC2445_TYPE_DATE_TIME; + var $val_multi = true; + + function construct() { + $this->valid_parameters = array( + 'TZID' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'VALUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_parameter($parameter, $value) { + + $parameter = strtoupper($parameter); + + if(!parent::is_valid_parameter($parameter, $value)) { + return false; + } + if($parameter == 'VALUE' && !($value == 'DATE' || $value == 'DATE-TIME')) { + return false; + } + + return true; + } + +} + +class iCalendar_property_exrule extends iCalendar_property { + + var $name = 'EXRULE'; + var $val_type = RFC2445_TYPE_RECUR; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_rdate extends iCalendar_property { + + var $name = 'RDATE'; + var $val_type = RFC2445_TYPE_DATE_TIME; + var $val_multi = true; + + function construct() { + $this->valid_parameters = array( + 'TZID' => RFC2445_OPTIONAL | RFC2445_ONCE, + 'VALUE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_parameter($parameter, $value) { + + $parameter = strtoupper($parameter); + + if(!parent::is_valid_parameter($parameter, $value)) { + return false; + } + if($parameter == 'VALUE' && !($value == 'DATE' || $value == 'DATE-TIME' || $value == 'PERIOD')) { + return false; + } + + return true; + } + +} + +class iCalendar_property_rrule extends iCalendar_property { + + var $name = 'RRULE'; + var $val_type = RFC2445_TYPE_RECUR; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +// TODO: 4.8.6 Alarm Component Properties + +// 4.8.7 Change Management Component Properties +// -------------------------------------------- + +class iCalendar_property_created extends iCalendar_property { + + var $name = 'CREATED'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + // Time MUST be in UTC format + return(substr($value, -1) == 'Z'); + } +} + +class iCalendar_property_dtstamp extends iCalendar_property { + + var $name = 'DTSTAMP'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + // Time MUST be in UTC format + return(substr($value, -1) == 'Z'); + } +} + +class iCalendar_property_last_modified extends iCalendar_property { + var $name = 'LAST-MODIFIED'; + var $val_type = RFC2445_TYPE_DATE_TIME; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + // Time MUST be in UTC format + return(substr($value, -1) == 'Z'); + } +} + +class iCalendar_property_sequence extends iCalendar_property { + + var $name = 'SEQUENCE'; + var $val_type = RFC2445_TYPE_INTEGER; + var $val_default = 0; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!parent::is_valid_value($value)) { + return false; + } + $value = intval($value); + return ($value >= 0); + } +} + +// 4.8.8 Miscellaneous Component Properties +// ---------------------------------------- + +class iCalendar_property_x extends iCalendar_property { + + var $name = RFC2445_XNAME; + var $val_type = NULL; + + function construct() { + $this->valid_parameters = array( + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function set_name($name) { + + $name = strtoupper($name); + + if(rfc2445_is_xname($name)) { + $this->name = $name; + return true; + } + + return false; + } +} + +class iCalendar_property_request_status extends iCalendar_property { + + // IMPORTANT NOTE: This property value includes TEXT fields + // separated by semicolons. Unfortunately, auto-value-formatting + // cannot be used in this case. As an exception, the value passed + // to this property MUST be already escaped. + + var $name = 'REQUEST-STATUS'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'LANGUAGE' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } + + function is_valid_value($value) { + if(!is_string($value) || empty($value)) { + return false; + } + + $len = strlen($value); + $parts = array(); + $from = 0; + $escch = false; + + for($i = 0; $i < $len; ++$i) { + if($value{$i} == ';' && !$escch) { + // Token completed + $parts[] = substr($value, $from, $i - $from); + $from = $i + 1; + continue; + } + $escch = ($value{$i} == '\\'); + } + // Add one last token with the remaining text; if the value + // ended with a ';' it was illegal, so check that this token + // is not the empty string. + $parts[] = substr($value, $from); + + $count = count($parts); + + // May have 2 or 3 tokens (last one is optional) + if($count != 2 && $count != 3) { + return false; + } + + // REMEMBER: if ANY part is empty, we have an illegal value + + // First token must be hierarchical numeric status (3 levels max) + if(strlen($parts[0]) == 0) { + return false; + } + + if($parts[0]{0} < '1' || $parts[0]{0} > '4') { + return false; + } + + $len = strlen($parts[0]); + + // Max 3 levels, and can't end with a period + if($len > 5 || $parts[0]{$len - 1} == '.') { + return false; + } + + for($i = 1; $i < $len; ++$i) { + if(($i & 1) == 1 && $parts[0]{$i} != '.') { + // Even-indexed chars must be periods + return false; + } + else if(($i & 1) == 0 && ($parts[0]{$i} < '0' || $parts[0]{$i} > '9')) { + // Odd-indexed chars must be numbers + return false; + } + } + + // Second and third tokens must be TEXT, and already escaped, so + // they are not allowed to have UNESCAPED semicolons, commas, slashes, + // or any newlines at all + + for($i = 1; $i < $count; ++$i) { + if(strpos($parts[$i], "\n") !== false) { + return false; + } + + $len = strlen($parts[$i]); + if($len == 0) { + // Cannot be empty + return false; + } + + $parts[$i] .= '#'; // This guard token saves some conditionals in the loop + + for($j = 0; $j < $len; ++$j) { + $thischar = $parts[$i]{$j}; + $nextchar = $parts[$i]{$j + 1}; + if($thischar == '\\') { + // Next char must now be one of ";,\nN" + if($nextchar != ';' && $nextchar != ',' && $nextchar != '\\' && + $nextchar != 'n' && $nextchar != 'N') { + return false; + } + + // OK, this escaped sequence is correct, bypass next char + ++$j; + continue; + } + if($thischar == ';' || $thischar == ',' || $thischar == '\\') { + // This wasn't escaped as it should + return false; + } + } + } + + return true; + } + + function set_value($value) { + // Must override this, otherwise the value would be quoted again + if($this->is_valid_value($value)) { + $this->value = $value; + return true; + } + + return false; + } + +} + +class iCalendar_property_trigger extends iCalendar_property { + + var $name = 'TRIGGER'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_action extends iCalendar_property { + + var $name = 'ACTION'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + 'DISPLAY' => RFC2445_OPTIONAL | RFC2445_ONCE, + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_x_wr_alarmuid extends iCalendar_property { + + var $name = 'X_WR_ALARMUID'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_tzoffsetto extends iCalendar_property { + + var $name = 'TZOFFSETTO'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_daylightc extends iCalendar_property { + + var $name = 'DAYLIGHTC'; + var $val_type = RFC2445_TYPE_INTEGER; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_standardc extends iCalendar_property { + + var $name = 'STANDARDC'; + var $val_type = RFC2445_TYPE_INTEGER; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} + +class iCalendar_property_tzid extends iCalendar_property { + + var $name = 'TZID'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_REQUIRED + ); + } +} + +####################### +/* +class iCalendar_property_class extends iCalendar_property { + + var $name = 'CLASS'; + var $val_type = RFC2445_TYPE_TEXT; + + function construct() { + $this->valid_parameters = array( + RFC2445_XNAME => RFC2445_OPTIONAL + ); + } +} +*/ + +?> diff --git a/modules/Calendar/iCal/iCalendar_rfc2445.php b/modules/Calendar/iCal/iCalendar_rfc2445.php new file mode 100644 index 0000000..e3b168c --- /dev/null +++ b/modules/Calendar/iCal/iCalendar_rfc2445.php @@ -0,0 +1,807 @@ + RFC2445_FOLDED_LINE_LENGTH) { + $retval .= substr($string, 0, RFC2445_FOLDED_LINE_LENGTH - 1) . RFC2445_CRLF . ' '; + $string = substr($string, RFC2445_FOLDED_LINE_LENGTH - 1); + } + + $retval .= $string; + + return $retval; + +} + +function rfc2445_unfold($string) { + for($i = 0; $i < strlen(RFC2445_WSP); ++$i) { + $string = str_replace(RFC2445_CRLF.substr(RFC2445_WSP, $i, 1), '', $string); + } + + return $string; +} + +function rfc2445_is_xname($name) { + + // If it's less than 3 chars, it cannot be legal + if(strlen($name) < 3) { + return false; + } + + // If it contains an illegal char anywhere, reject it + if(strspn($name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-') != strlen($name)) { + return false; + } + + // To be legal, it must still start with "X-" + return substr($name, 0, 2) === 'X-'; +} + +function rfc2445_is_valid_value($value, $type) { + + // This branch should only be taken with xname values + if($type === NULL) { + return true; + } + + switch($type) { + case RFC2445_TYPE_CAL_ADDRESS: + case RFC2445_TYPE_URI: + if(!is_string($value)) { + return false; + } + $valid_schemes = array('ftp', 'http', 'ldap', 'gopher', 'mailto', 'news', 'nntp', 'telnet', 'wais', 'file', 'prospero'); + + $pos = strpos($value, ':'); + if(!$pos) { + return false; + } + + $scheme = strtolower(substr($value, 0, $pos)); + $remain = substr($value, $pos + 1); + + if(!in_array($scheme, $valid_schemes)) { + return false; + } + + if($scheme === 'mailto') { + $regexp = '/^[a-zA-Z0-9]+[_a-zA-Z0-9\-]*(\.[_a-z0-9\-]+)*@(([0-9a-zA-Z\-]+\.)+[a-zA-Z][0-9a-zA-Z\-]+|([0-9]{1,3}\.){3}[0-9]{1,3})$/'; + } + else { + $regexp = '/^//(.+(:.*)?@)?(([0-9a-zA-Z\-]+\.)+[a-zA-Z][0-9a-zA-Z\-]+|([0-9]{1,3}\.){3}[0-9]{1,3})(:[0-9]{1,5})?(/.*)?$/'; + } + + return preg_match($regexp, $remain); + break; + + case RFC2445_TYPE_BINARY: + if(!is_string($value)) { + return false; + } + + $len = strlen($value); + + if($len % 4 != 0) { + return false; + } + + for($i = 0; $i < $len; ++$i) { + $ch = $value{$i}; + if(!($ch >= 'a' && $ch <= 'z' || $ch >= 'A' && $ch <= 'Z' || $ch >= '0' && $ch <= '9' || $ch == '-' || $ch == '+')) { + if($ch == '=' && $len - $i <= 2) { + continue; + } + return false; + } + } + return true; + break; + + case RFC2445_TYPE_BOOLEAN: + if(is_bool($value)) { + return true; + } + if(is_string($value)) { + $value = strtoupper($value); + return ($value == 'TRUE' || $value == 'FALSE'); + } + return false; + break; + + case RFC2445_TYPE_DATE: + if(is_int($value)) { + if($value < 0) { + return false; + } + $value = "$value"; + } + else if(!is_string($value)) { + return false; + } + + if(strlen($value) != 8) { + return false; + } + + $y = intval(substr($value, 0, 4)); + $m = intval(substr($value, 4, 2)); + $d = intval(substr($value, 6, 2)); + + return checkdate($m, $d, $y); + break; + + case RFC2445_TYPE_DATE_TIME: + if(!is_string($value) || strlen($value) < 15) { + return false; + } + + return($value{8} == 'T' && + rfc2445_is_valid_value(substr($value, 0, 8), RFC2445_TYPE_DATE) && + rfc2445_is_valid_value(substr($value, 9), RFC2445_TYPE_TIME)); + break; + + case RFC2445_TYPE_DURATION: + if(!is_string($value)) { + return false; + } + + $len = strlen($value); + + if($len < 3) { + // Minimum conformant length: "P1W" + return false; + } + + if($value{0} == '+' || $value{0} == '-') { + $value = substr($value, 1); + --$len; // Don't forget to update this! + } + + if($value{0} != 'P') { + return false; + } + + // OK, now break it up + $num = ''; + $allowed = 'WDT'; + + for($i = 1; $i < $len; ++$i) { + $ch = $value{$i}; + if($ch >= '0' && $ch <= '9') { + $num .= $ch; + continue; + } + if(strpos($allowed, $ch) === false) { + // Non-numeric character which shouldn't be here + return false; + } + if($num === '' && $ch != 'T') { + // Allowed non-numeric character, but no digits came before it + return false; + } + + // OK, $ch now holds a character which tells us what $num is + switch($ch) { + case 'W': + // If duration in weeks is specified, this must end the string + return ($i == $len - 1); + break; + + case 'D': + // Days specified, now if anything comes after it must be a 'T' + $allowed = 'T'; + break; + + case 'T': + // Starting to specify time, H M S are now valid delimiters + $allowed = 'HMS'; + break; + + case 'H': + $allowed = 'M'; + break; + + case 'M': + $allowed = 'S'; + break; + + case 'S': + return ($i == $len - 1); + break; + } + + // If we 're going to continue, reset $num + $num = ''; + + } + + // $num is kept for this reason: if we 're here, we ran out of chars + // therefore $num must be empty for the period to be legal + return ($num === '' && $ch != 'T'); + + break; + + case RFC2445_TYPE_FLOAT: + if(is_float($value)) { + return true; + } + if(!is_string($value) || $value === '') { + return false; + } + + $dot = false; + $int = false; + $len = strlen($value); + for($i = 0; $i < $len; ++$i) { + switch($value{$i}) { + case '-': case '+': + // A sign can only be seen at position 0 and cannot be the only char + if($i != 0 || $len == 1) { + return false; + } + break; + case '.': + // A second dot is an error + // Make sure we had at least one int before the dot + if($dot || !$int) { + return false; + } + $dot = true; + // Make also sure that the float doesn't end with a dot + if($i == $len - 1) { + return false; + } + break; + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + $int = true; + break; + default: + // Any other char is a no-no + return false; + break; + } + } + return true; + break; + + case RFC2445_TYPE_INTEGER: + if(is_int($value)) { + return true; + } + if(!is_string($value) || $value === '') { + return false; + } + + if($value{0} == '+' || $value{0} == '-') { + if(strlen($value) == 1) { + return false; + } + $value = substr($value, 1); + } + + if(strspn($value, '0123456789') != strlen($value)) { + return false; + } + + return ($value >= -2147483648 && $value <= 2147483647); + break; + + case RFC2445_TYPE_PERIOD: + if(!is_string($value) || empty($value)) { + return false; + } + + $parts = explode('/', $value); + if(count($parts) != 2) { + return false; + } + + if(!rfc2445_is_valid_value($parts[0], RFC2445_TYPE_DATE_TIME)) { + return false; + } + + // Two legal cases for the second part: + if(rfc2445_is_valid_value($parts[1], RFC2445_TYPE_DATE_TIME)) { + // It has to be after the start time, so + return ($parts[1] > $parts[0]); + } + else if(rfc2445_is_valid_value($parts[1], RFC2445_TYPE_DURATION)) { + // The period MUST NOT be negative + return ($parts[1]{0} != '-'); + } + + // It seems to be illegal + return false; + break; + + case RFC2445_TYPE_RECUR: + if(!is_string($value)) { + return false; + } + + $parts = explode(';', strtoupper($value)); + + // First of all, we need at least a FREQ and a UNTIL or COUNT part, so... + if(count($parts) < 2) { + return false; + } + + // Let's get that into a more easily comprehensible format + $vars = array(); + foreach($parts as $part) { + + $pieces = explode('=', $part); + // There must be exactly 2 pieces, e.g. FREQ=WEEKLY + if(count($pieces) != 2) { + return false; + } + + // It's illegal for a variable to appear twice + if(isset($vars[$pieces[0]])) { + return false; + } + + // Sounds good + $vars[$pieces[0]] = $pieces[1]; + } + + // OK... now to test everything else + + // FREQ must be the first thing appearing + reset($vars); + if(key($vars) != 'FREQ') { + return false; + } + + // It's illegal to have both UNTIL and COUNT appear + if(isset($vars['UNTIL']) && isset($vars['COUNT'])) { + return false; + } + + // Special case: BYWEEKNO is only valid for FREQ=YEARLY + if(isset($vars['BYWEEKNO']) && $vars['FREQ'] != 'YEARLY') { + return false; + } + + // Special case: BYSETPOS is only valid if another BY option is specified + if(isset($vars['BYSETPOS'])) { + $options = array('BYSECOND', 'BYMINUTE', 'BYHOUR', 'BYDAY', 'BYMONTHDAY', 'BYYEARDAY', 'BYWEEKNO', 'BYMONTH'); + $defined = array_keys($vars); + $common = array_intersect($options, $defined); + if(empty($common)) { + return false; + } + } + + // OK, now simply check if each element has a valid value, + // unsetting them on the way. If at the end the array still + // has some elements, they are illegal. + + if($vars['FREQ'] != 'SECONDLY' && $vars['FREQ'] != 'MINUTELY' && $vars['FREQ'] != 'HOURLY' && + $vars['FREQ'] != 'DAILY' && $vars['FREQ'] != 'WEEKLY' && + $vars['FREQ'] != 'MONTHLY' && $vars['FREQ'] != 'YEARLY') { + return false; + } + unset($vars['FREQ']); + + // Set this, we may need it later + $weekdays = explode(',', RFC2445_WEEKDAYS); + + if(isset($vars['UNTIL'])) { + if(rfc2445_is_valid_value($vars['UNTIL'], RFC2445_TYPE_DATE_TIME)) { + // The time MUST be in UTC format + if(!(substr($vars['UNTIL'], -1) == 'Z')) { + return false; + } + } + else if(!rfc2445_is_valid_value($vars['UNTIL'], RFC2445_TYPE_DATE_TIME)) { + return false; + } + } + unset($vars['UNTIL']); + + + if(isset($vars['COUNT'])) { + if(empty($vars['COUNT'])) { + // This also catches the string '0', which makes no sense + return false; + } + if(strspn($vars['COUNT'], '0123456789') != strlen($vars['COUNT'])) { + return false; + } + } + unset($vars['COUNT']); + + + if(isset($vars['INTERVAL'])) { + if(empty($vars['INTERVAL'])) { + // This also catches the string '0', which makes no sense + return false; + } + if(strspn($vars['INTERVAL'], '0123456789') != strlen($vars['INTERVAL'])) { + return false; + } + } + unset($vars['INTERVAL']); + + + if(isset($vars['BYSECOND'])) { + if($vars['BYSECOND'] == '') { + return false; + } + // Comma also allowed + if(strspn($vars['BYSECOND'], '0123456789,') != strlen($vars['BYSECOND'])) { + return false; + } + $secs = explode(',', $vars['BYSECOND']); + foreach($secs as $sec) { + if($sec == '' || $sec < 0 || $sec > 59) { + return false; + } + } + } + unset($vars['BYSECOND']); + + + if(isset($vars['BYMINUTE'])) { + if($vars['BYMINUTE'] == '') { + return false; + } + // Comma also allowed + if(strspn($vars['BYMINUTE'], '0123456789,') != strlen($vars['BYMINUTE'])) { + return false; + } + $mins = explode(',', $vars['BYMINUTE']); + foreach($mins as $min) { + if($min == '' || $min < 0 || $min > 59) { + return false; + } + } + } + unset($vars['BYMINUTE']); + + + if(isset($vars['BYHOUR'])) { + if($vars['BYHOUR'] == '') { + return false; + } + // Comma also allowed + if(strspn($vars['BYHOUR'], '0123456789,') != strlen($vars['BYHOUR'])) { + return false; + } + $hours = explode(',', $vars['BYHOUR']); + foreach($hours as $hour) { + if($hour == '' || $hour < 0 || $hour > 23) { + return false; + } + } + } + unset($vars['BYHOUR']); + + + if(isset($vars['BYDAY'])) { + if(empty($vars['BYDAY'])) { + return false; + } + + // First off, split up all values we may have + $days = explode(',', $vars['BYDAY']); + + foreach($days as $day) { + $daypart = substr($day, -2); + if(!in_array($daypart, $weekdays)) { + return false; + } + + if(strlen($day) > 2) { + $intpart = substr($day, 0, strlen($day) - 2); + if(!rfc2445_is_valid_value($intpart, RFC2445_TYPE_INTEGER)) { + return false; + } + if(intval($intpart) == 0) { + return false; + } + } + } + } + unset($vars['BYDAY']); + + + if(isset($vars['BYMONTHDAY'])) { + if(empty($vars['BYMONTHDAY'])) { + return false; + } + $mdays = explode(',', $vars['BYMONTHDAY']); + foreach($mdays as $mday) { + if(!rfc2445_is_valid_value($mday, RFC2445_TYPE_INTEGER)) { + return false; + } + $mday = abs(intval($mday)); + if($mday == 0 || $mday > 31) { + return false; + } + } + } + unset($vars['BYMONTHDAY']); + + + if(isset($vars['BYYEARDAY'])) { + if(empty($vars['BYYEARDAY'])) { + return false; + } + $ydays = explode(',', $vars['BYYEARDAY']); + foreach($ydays as $yday) { + if(!rfc2445_is_valid_value($yday, RFC2445_TYPE_INTEGER)) { + return false; + } + $yday = abs(intval($yday)); + if($yday == 0 || $yday > 366) { + return false; + } + } + } + unset($vars['BYYEARDAY']); + + + if(isset($vars['BYWEEKNO'])) { + if(empty($vars['BYWEEKNO'])) { + return false; + } + $weeknos = explode(',', $vars['BYWEEKNO']); + foreach($weeknos as $weekno) { + if(!rfc2445_is_valid_value($weekno, RFC2445_TYPE_INTEGER)) { + return false; + } + $weekno = abs(intval($weekno)); + if($weekno == 0 || $weekno > 53) { + return false; + } + } + } + unset($vars['BYWEEKNO']); + + + if(isset($vars['BYMONTH'])) { + if(empty($vars['BYMONTH'])) { + return false; + } + // Comma also allowed + if(strspn($vars['BYMONTH'], '0123456789,') != strlen($vars['BYMONTH'])) { + return false; + } + $months = explode(',', $vars['BYMONTH']); + foreach($months as $month) { + if($month == '' || $month < 1 || $month > 12) { + return false; + } + } + } + unset($vars['BYMONTH']); + + + if(isset($vars['BYSETPOS'])) { + if(empty($vars['BYSETPOS'])) { + return false; + } + $sets = explode(',', $vars['BYSETPOS']); + foreach($sets as $set) { + if(!rfc2445_is_valid_value($set, RFC2445_TYPE_INTEGER)) { + return false; + } + $set = abs(intval($set)); + if($set == 0 || $set > 366) { + return false; + } + } + } + unset($vars['BYSETPOS']); + + + if(isset($vars['WKST'])) { + if(!in_array($vars['WKST'], $weekdays)) { + return false; + } + } + unset($vars['WKST']); + + + // Any remaining vars must be x-names + if(empty($vars)) { + return true; + } + + foreach($vars as $name => $var) { + if(!rfc2445_is_xname($name)) { + return false; + } + } + + // At last, all is OK! + return true; + + break; + + case RFC2445_TYPE_TEXT: + return true; + break; + + case RFC2445_TYPE_TIME: + if(is_int($value)) { + if($value < 0) { + return false; + } + $value = "$value"; + } + else if(!is_string($value)) { + return false; + } + + if(strlen($value) == 7) { + if(strtoupper(substr($value, -1)) != 'Z') { + return false; + } + $value = substr($value, 0, 6); + } + if(strlen($value) != 6) { + return false; + } + + $h = intval(substr($value, 0, 2)); + $m = intval(substr($value, 2, 2)); + $s = intval(substr($value, 4, 2)); + + return ($h <= 23 && $m <= 59 && $s <= 60); + break; + + case RFC2445_TYPE_UTC_OFFSET: + if(is_int($value)) { + if($value >= 0) { + $value = "+$value"; + } + else { + $value = "$value"; + } + } + else if(!is_string($value)) { + return false; + } + + if(strlen($value) == 7) { + $s = intval(substr($value, 5, 2)); + $value = substr($value, 0, 5); + } + if(strlen($value) != 5 || $value == "-0000") { + return false; + } + + if($value{0} != '+' && $value{0} != '-') { + return false; + } + + $h = intval(substr($value, 1, 2)); + $m = intval(substr($value, 3, 2)); + + return ($h <= 23 && $m <= 59 && $s <= 59); + break; + } + + // TODO: remove this assertion + trigger_error('bad code path', E_USER_WARNING); + var_dump($type); + return false; +} + +function rfc2445_do_value_formatting($value, $type) { + // Note: this does not only do formatting; it also does conversion to string! + switch($type) { + case RFC2445_TYPE_CAL_ADDRESS: + case RFC2445_TYPE_URI: + // Enclose in double quotes + $value = '"'.$value.'"'; + break; + case RFC2445_TYPE_TEXT: + // Escape entities + $value = strtr($value, array("\n" => '\\n', '\\' => '\\\\', ',' => '\\,', ';' => '\\;')); + break; + } + return $value; +} + +function rfc2445_undo_value_formatting($value, $type) { + switch($type) { + case RFC2445_TYPE_CAL_ADDRESS: + case RFC2445_TYPE_URI: + // Trim beginning and end double quote + $value = substr($value, 1, strlen($value) - 2); + break; + case RFC2445_TYPE_TEXT: + // Unescape entities + $value = strtr($value, array('\\n' => "\n", '\\N' => "\n", '\\\\' => '\\', '\\,' => ',', '\\;' => ';')); + break; + } + return $value; +} + +// This is cheating: GUIDs have nothing to do with RFC 2445 + +function rfc2445_guid() { + // Implemented as per the Network Working Group draft on UUIDs and GUIDs + + // These two octets get special treatment + $time_hi_and_version = sprintf('%02x', (1 << 6) + mt_rand(0, 15)); // 0100 plus 4 random bits + $clock_seq_hi_and_reserved = sprintf('%02x', (1 << 7) + mt_rand(0, 63)); // 10 plus 6 random bits + + // Need another 14 random octects + $pool = ''; + for($i = 0; $i < 7; ++$i) { + $pool .= sprintf('%04x', mt_rand(0, 65535)); + } + + // time_low = 4 octets + $random = substr($pool, 0, 8).'-'; + + // time_mid = 2 octets + $random .= substr($pool, 8, 4).'-'; + + // time_high_and_version = 2 octets + $random .= $time_hi_and_version.substr($pool, 12, 2).'-'; + + // clock_seq_high_and_reserved = 1 octet + $random .= $clock_seq_hi_and_reserved; + + // clock_seq_low = 1 octet + $random .= substr($pool, 13, 2).'-'; + + // node = 6 octets + $random .= substr($pool, 14, 12); + + return $random; +} + +?> diff --git a/modules/Calendar/iCal/ical-parser-class.php b/modules/Calendar/iCal/ical-parser-class.php new file mode 100644 index 0000000..ed4d3c3 --- /dev/null +++ b/modules/Calendar/iCal/ical-parser-class.php @@ -0,0 +1,91 @@ +folders = 'cache/import/'; + } + + function iCalReader($filename,$root_directory='') { + $iCaltoArray = $this->iCalDecoder($filename,$root_directory); + return $iCaltoArray; + } + + function iCalDecoder($file,$root_directory) { + $ical = file_get_contents($root_directory.$this->folders.$file); + preg_match_all('/BEGIN:VEVENT.*?END:VEVENT/si', $ical, $eventresult, PREG_PATTERN_ORDER); + preg_match_all('/BEGIN:VTODO.*?END:VTODO/si', $ical, $todoresult, PREG_PATTERN_ORDER); + for ($i = 0; $i < count($eventresult[0]); $i++) { + $tmpbyline = explode("\r\n", $eventresult[0][$i]); + $begin = false; + $key=NULL; + foreach ($tmpbyline as $item) { + $tmpholderarray = explode(":",$item,2); + + if (count($tmpholderarray) >1) { + if($tmpholderarray[0]=='BEGIN'){ + if($begin==false){ + $begin = true; + $majorarray['TYPE']=$tmpholderarray[1]; + } else { + $majorarray[$tmpholderarray[1]]=array(); + $key = $tmpholderarray[1]; + } + } else if($tmpholderarray[0]=='END'){ + if(!empty($key)){ + $key = NULL; + } + } else { + if(!empty($key)){ + $majorarray[$key][$tmpholderarray[0]] = $tmpholderarray[1]; + } else { + $majorarray[$tmpholderarray[0]] = $tmpholderarray[1]; + } + } + } + + } + $icalarray[] = $majorarray; + unset($majorarray); + } + + for ($i = 0; $i < count($todoresult[0]); $i++) { + $tmpbyline = explode("\r\n", $todoresult[0][$i]); + $begin = false; + $key=NULL; + foreach ($tmpbyline as $item) { + $tmpholderarray = explode(":",$item); + + if (count($tmpholderarray) >1) { + if($tmpholderarray[0]=='BEGIN'){ + if($begin==false){ + $begin = true; + $majorarray['TYPE']=$tmpholderarray[1]; + } else { + $majorarray[$tmpholderarray[1]]=array(); + $key = $tmpholderarray[1]; + } + } else if($tmpholderarray[0]=='END'){ + if(!empty($key)){ + $key = NULL; + } + } else { + if(!empty($key)){ + $majorarray[$key][$tmpholderarray[0]] = $tmpholderarray[1]; + } else { + $majorarray[$tmpholderarray[0]] = $tmpholderarray[1]; + } + } + } + + } + $icalarray[] = $majorarray; + unset($majorarray); + } + return $icalarray; + } +} + +?> diff --git a/modules/Calendar/iCalExport.php b/modules/Calendar/iCalExport.php new file mode 100644 index 0000000..41c79c9 --- /dev/null +++ b/modules/Calendar/iCalExport.php @@ -0,0 +1,113 @@ +id . + " and vtiger_activity.activitytype NOT IN ('Emails')"; + +$calendar_results = $adb->query($ical_query); + +// Send the right content type and filename +header ("Content-type: text/calendar"); +header('Content-Disposition: attachment; '."filename={$filename}.ics"); + +$todo_fields = getColumnFields('Calendar'); +$event_fields = getColumnFields('Events'); +$event = $todo = array(); +$keys_to_replace = array( + 'events'=>array('taskpriority'), + 'todo'=>array('taskpriority','taskstatus') +); +$keyvals_to_replace = array( + 'events'=>array('taskpriority'=>'priority'), + 'todo'=>array('taskpriority'=>'priority','taskstatus'=>'status') +); +foreach($todo_fields as $key=>$val){ + if(getFieldVisibilityPermission('Calendar',$current_user->id,$key)==0){ + if(!in_array($key,$keys_to_replace['todo'])){ + $todo[$key] = 'yes'; + } else { + $todo[$keyvals_to_replace['todo'][$key]] = 'yes'; + } + } +} +foreach($event_fields as $key=>$val){ + if(getFieldVisibilityPermission('Events',$current_user->id,$key)==0){ + if(!in_array($key,$keys_to_replace['events'])){ + $event[$key] = 'yes'; + } else { + $event[$keyvals_to_replace['events'][$key]] = 'yes'; + } + } +} + +$tz = new iCalendar_timezone; +if(!empty($default_timezone)){ + $tzid = split('/',$default_timezone); +} else { + $default_timezone = date_default_timezone_get(); + $tzid = split('/',$default_timezone); +} + +if(!empty($tzid[1])){ + $tz->add_property('TZID', $tzid[1]); +} else { + $tz->add_property('TZID', $tzid[0]); +} +$tz->add_property('TZOFFSETTO', date('O')); +if(date('I')==1){ + $tz->add_property('DAYLIGHTC', date('I')); +} else { + $tz->add_property('STANDARDC', date('I')); +} + +$myical = new iCalendar; + +$myical->add_component($tz); + +while (!$calendar_results->EOF) { + $this_event = $calendar_results->fields; + $id = $this_event['activityid']; + $type = $this_event['activitytype']; + if($type!='Task'){ + $temp = $event; + foreach($temp as $key=>$val){ + $temp[$key] = $this_event[$key]; + } + $temp['id'] = $id; + $ev = new iCalendar_event; + $ev->assign_values($temp); + + $al = new iCalendar_alarm; + $al->assign_values($temp); + $ev->add_component($al); + } else { + $temp = $todo; + foreach($temp as $key=>$val){ + $temp[$key] = $this_event[$key]; + } + $ev = new iCalendar_todo; + $ev->assign_values($temp); + } + + $myical->add_component($ev); + $calendar_results->MoveNext(); +} +// Print the actual calendar +echo $myical->serialize(); + +?> \ No newline at end of file diff --git a/modules/Calendar/iCalImport.php b/modules/Calendar/iCalImport.php new file mode 100644 index 0000000..c8558d9 --- /dev/null +++ b/modules/Calendar/iCalImport.php @@ -0,0 +1,151 @@ +clearRecords($current_user->id); + $file_details = $_FILES['ics_file']; + $binFile = 'vtiger_import'.date('YmdHis'); + $file = $import_dir.''.$binFile; + $filetmp_name = $file_details['tmp_name']; + $upload_status = move_uploaded_file($filetmp_name,$file); + + $skip_fields = array( + 'Events'=>array('duration_hours'), + 'Calendar'=>array('eventstatus') + ); + $required_fields = array(); + + $modules = array('Events','Calendar'); + foreach($modules as $module){ + $calendar = CRMEntity::getInstance('Calendar'); + $calendar->initRequiredFields($module); + $val = array_keys($calendar->required_fields); + $required_fields[$module] = array_diff($val,$skip_fields[$module]); + } + + $ical = new iCal(); + $ical_activities = $ical->iCalReader($binFile); + + $count['Events'] = $count['Calendar'] = $skip_count['Events'] = $skip_count['Calendar'] = 0; + for($i=0;$icolumn_fields = $activity->generateArray($ical_activities[$i]); + $calendar->column_fields['assigned_user_id'] = $current_user->id; + $skip_record = false; + foreach($required_fields[$module] as $key){ + if(empty($calendar->column_fields[$key])){ + $skip_count[$module]++; + $skip_record = true; + break; + } + } + if($skip_record === true) { + continue; + } + $calendar->save('Calendar'); + $last_import = new iCalLastImport(); + $last_import->setFields(array('userid' => $current_user->id, + 'entitytype' => 'Calendar', + 'crmid' => $calendar->id)); + $last_import->save(); + if(!empty($ical_activities[$i]['VALARM'])){ + $calendar->activity_reminder($calendar->id,$calendar->column_fields['reminder_time'],0,'',''); + } + } + unlink($file); + $smarty->assign("IMAGE_PATH", $last_imported); + $smarty = new vtigerCRM_Smarty; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("IMP", $import_mod_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $parent_tab = vtlib_purify($_SESSION['import_parenttab']); + if(empty($parent_Tab)){ + $parent_tab = getParentTab(); + } + $smarty->assign("MODULE", vtlib_purify($_REQUEST['module'])); + $smarty->assign("SINGLE_MOD", vtlib_purify($_REQUEST['module'])); + $smarty->assign("CATEGORY", $parent_tab); + //@session_unregister("import_parenttab"); + $smarty->display("Buttons_List1.tpl"); + + $imported_events = $count['Events'] - $skip_count['Events']; + $imported_tasks = $count['Calendar'] - $skip_count['Calendar']; + $message= "".$mod_strings['LBL_SUCCESS']."" + ."

" .$mod_strings['LBL_SUCCESS_EVENTS_1']." $imported_events" + ."

" .$mod_strings['LBL_SKIPPED_EVENTS_1'].$skip_count['Events'] + ."

" .$mod_strings['LBL_SUCCESS_CALENDAR_1']." $imported_tasks" + ."

" .$mod_strings['LBL_SKIPPED_CALENDAR_1'].$skip_count['Calendar'] + ."

"; + + $smarty->assign("MESSAGE", $message); + $smarty->assign("RETURN_MODULE", $currentModule); + $smarty->assign("RETURN_ACTION", 'ListView'); + $smarty->assign("MODULE", $currentModule); + $smarty->assign("MODULENAME", $currentModule); + $smarty->display("iCalImport.tpl"); + +} else { + $smarty->assign("IMAGE_PATH", $last_imported); + $smarty = new vtigerCRM_Smarty; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("IMP", $import_mod_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $parent_tab = vtlib_purify($_SESSION['import_parenttab']); + if(empty($parent_Tab)){ + $parent_tab = getParentTab(); + } + $smarty->assign("MODULE", vtlib_purify($_REQUEST['module'])); + $smarty->assign("SINGLE_MOD", vtlib_purify($_REQUEST['module'])); + $smarty->assign("CATEGORY", $parent_tab); + //@session_unregister("import_parenttab"); + $smarty->display("Buttons_List1.tpl"); + + $last_import = new iCalLastImport(); + $ret_value = $last_import->undo('Calendar', $current_user->id); + + if(!empty($ret_value)){ + $message= "".$mod_strings['LBL_SUCCESS']."" + ."

" .$mod_strings['LBL_LAST_IMPORT_UNDONE']." "; + } else { + $message= "".$mod_strings['LBL_FAILURE']."" + ."

" .$mod_strings['LBL_NO_IMPORT_TO_UNDO']." "; + } + + $smarty->assign("MESSAGE", $message); + $smarty->assign("UNDO", 'yes'); + $smarty->assign("RETURN_MODULE", $currentModule); + $smarty->assign("RETURN_ACTION", 'ListView'); + $smarty->assign("MODULE", $currentModule); + $smarty->assign("MODULENAME", $currentModule); + $smarty->display("iCalImport.tpl"); +} +?> \ No newline at end of file diff --git a/modules/Calendar/iCalLastImport.php b/modules/Calendar/iCalLastImport.php new file mode 100644 index 0000000..811e844 --- /dev/null +++ b/modules/Calendar/iCalLastImport.php @@ -0,0 +1,67 @@ +tableName)) { + $adb->pquery('DELETE FROM '.$this->tableName .' WHERE userid = ?', array($userId)); + } + } + + function setFields($data) { + if(!empty($data)) { + foreach($data as $name => $value) { + $this->fieldData[$name] = $value; + } + } + } + + function save() { + $adb = PearDatabase::getInstance(); + + if(count($this->fieldData) == 0) return; + + if(!Vtiger_Utils::CheckTable($this->tableName)) { + Vtiger_Utils::CreateTable( + $this->tableName, + "(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, + userid INT NOT NULL, + entitytype VARCHAR(200) NOT NULL, + crmid INT NOT NULL)", + true); + } + + $fieldNames = array_keys($this->fieldData); + $fieldValues = array_values($this->fieldData); + $adb->pquery('INSERT INTO '.$this->tableName.'('. implode(',',$fieldNames) .') VALUES ('. generateQuestionMarks($fieldValues) .')', + array($fieldValues)); + } + + function undo($moduleName, $userId) { + $adb = PearDatabase::getInstance(); + if(Vtiger_Utils::CheckTable($this->tableName)) { + $result = $adb->pquery('UPDATE vtiger_crmentity SET deleted=1 WHERE crmid IN + (SELECT crmid FROM '.$this->tableName .' WHERE userid = ? AND entitytype = ?)', + array($userId, $moduleName)); + return $adb->getAffectedRowCount($result); + } + } +} +?> diff --git a/modules/Calendar/index.php b/modules/Calendar/index.php new file mode 100644 index 0000000..b36da7e --- /dev/null +++ b/modules/Calendar/index.php @@ -0,0 +1,32 @@ + \ No newline at end of file diff --git a/modules/Calendar/language/de_de.lang.php b/modules/Calendar/language/de_de.lang.php new file mode 100644 index 0000000..dca86cd --- /dev/null +++ b/modules/Calendar/language/de_de.lang.php @@ -0,0 +1,444 @@ +'Kalender', + 'LBL_MODULE_TITLE'=>'Kalender: Home', + 'LBL_MODULE_APPOINTMENT'=>'Kalender: Termin', + 'LBL_MODULE_APPOINTMENT_DETAIL'=>'Kalender: Termindetails', + 'LBL_SAVE'=>'Speichern', + 'LBL_RESET'=>'Abbrechen', + 'LBL_LIST_USER_NAME'=>'Nutzername', + 'LBL_LIST_NAME'=>'Name', + 'LBL_CALENDAR_SHARED'=>'Kalender wird gegenwärtig geteilt mit', + 'LBL_CALENDAR_SHARING'=>'Teile Kalender mit', + 'LBL_SHARING_OPTION'=>'darf meinen Kalender sehen?', + 'LBL_LIST_TOOLS'=>'Werkzeuge', + 'LBL_SETTINGS'=>'Einstellungen', + 'LBL_CALSETTINGS'=>'Kalendereinstellungen', + 'LBL_USE24'=>'benutze 24 h Format', + 'LBL_CALSTART'=>'starte meine Kalenderzeit mit', + 'LBL_TIMESETTINGS'=>'Zeiteinstellungen', + 'LBL_HOLDFOLLOWUP'=>'Nachfassen am', + 'LBL_CALL' => 'Anruf', + 'LBL_MEET' => 'Meeting', + 'LBL_APPNT' => 'Termin', + 'LBL_NEW_APPNT' => 'Neuer Termin', + 'LBL_NEW_APPNT_INFO' => 'Erstelle einen neuen Termin', + 'LBL_VIEW_DAY_APPNT_INFO' => 'zeige Termine für diesen Tag', + 'LBL_CHANGE_APPNT' => 'zeige oder ändere diesen Termin (%s - %s)', + + 'LBL_DAY' => 'Tag', + 'LBL_DAY_BUTTON_KEY' => 'D', + 'LBL_DAY_BUTTON_TITLE' => 'Tag [Alt+D]', + 'LBL_DAY1' => 'Montag', + 'LBL_DAY2' => 'Dienstag', + 'LBL_DAY3' => 'Mittwoch', + 'LBL_DAY4' => 'Donnerstag', + 'LBL_DAY5' => 'Freitag', + 'LBL_DAY6' => 'Samstag', + 'LBL_DAY0' => 'Sonntag', + + 'LBL_SM_MON' => 'MO', + 'LBL_SM_TUE' => 'DI', + 'LBL_SM_WED' => 'MI', + 'LBL_SM_THU' => 'DO', + 'LBL_SM_FRI' => 'FR', + 'LBL_SM_SAT' => 'SA', + 'LBL_SM_SUN' => 'SO', + + 'LBL_DATE_TITLE' => '%A, %d. %B %Y', + + 'LBL_WEEK' => 'Woche', + 'LBL_WEEK_BUTTON_KEY' => 'W', + 'LBL_WEEK_BUTTON_TITLE' => 'Woche [Alt+W]', + 'LBL_WEEKS' => 'Wochen', + 'LBL_NEXT_WEEK' => 'nächste Woche', + 'LBL_LAST_WEEK' => 'vorherige Woche', + 'LBL_4WEEKS_BACK' => '4 Wochen zurück', + 'LBL_4WEEKS_PLUS' => '4 Wochen vor', + 'LBL_RELOAD' => 'Neu Laden', + + + 'LBL_APPCREATED_BY' => 'Erstellt von:', + 'LBL_AT_DATE_TIME' => 'um', + + 'LBL_MON' => 'Monat', + 'LBL_MON_BUTTON_KEY' => 'M', + 'LBL_MON_BUTTON_TITLE' => 'Monat [Alt+M]', + 'LBL_PREV_MON' => 'vorheriger Monat', + 'LBL_NEXT_MON' => 'nächster Monat', + + 'LBL_YEAR_BUTTON_KEY'=>'Y', + 'LBL_PREV_YEAR'=>'vorheriges Jahr', + 'LBL_NEXT_YEAR' => 'nächstes Jahr', + + 'LBL_APP_LOCATION' => 'Ort', + 'LBL_APP_IGNORE_TIME' => 'ignoriere vorherige Zeiten', + 'LBL_SUBJECT'=>'Thema:', + 'LBL_APP_DESCRIPTION' => 'Beschreibung', + 'LBL_CONTACT'=>'Person:', + 'LBL_CONTACT_LIST'=>'Personenliste:', + + 'LBL_APP_IGNORE_TIME2' => '(z.B. die Verabredung ist zu keiner
bestimmten Zeit an diesem Tag)', + + 'LBL_APP_ERR001' =>'Sie haben ein ungültiges Datum im Feld eingegeben!', + 'LBL_APP_ERR002' =>'Ihr Angabe zum Start liegt nach dem Ende!', + 'LBL_APP_ERR003' =>'Person fehlt!', + 'LBL_APP_ERR004' =>'Thema fehlt!', + 'ERR_DELETE_RECORD'=>"Zum Löschen muss mindestens ein Eintrag markiert sein.", + 'DELETE_CONFIRMATION'=>"Möchten Sie diesen Eintrag löschen?", + + 'AppLoc'=> Array('0' => 'Büro' + , '1' => 'ausserhalb' + , '2' => 'Ferien' + , '3' => 'krank' + , '4' => 'verspätet' + , '5' => 'anderes' + , '6' => 'privat'), + + 'cal_month_long'=>array( + "", + "Januar", + "Februar", + "März", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Dezember", + ), + + 'cal_weekdays_short'=>array( + "Mo", + "Di", + "Mi", + "Do", + "Fr", + "Sa", + "So", + ), + 'cal_weekdays_long'=>array( + "Montag", + "Dienstag", + "Mittwoch", + "Donnerstag", + "Freitag", + "Samstag", + "Sonntag", + ), + 'cal_month_short'=>array( + "", + "Jan", + "Feb", + "Mär", + "Apr", + "Mai", + "Jun", + "Jul", + "Aug", + "Sep", + "Okt", + "Nov", + "Dez", + ), + + 'LBL_TIME'=>'Zeit', + 'LBL_START_TIME' => 'Startzeit', + 'LBL_END_TIME' => 'Endezeit', + 'LBL_START_DATE'=>'Startdatum', + 'LBL_TIME_START'=>'Beginn', + 'LBL_DUE_DATE'=>'fällig', + 'LBL_START_DATE_TIME'=>'Termin beginnt', + 'LBL_END_DATE_TIME'=>'Termin endet', + 'LBL_TODO'=>'Aufgabe', + 'LBL_TODOS'=>'Aufgaben', + 'LBL_EVENTS'=>'Ereignisse', + 'LBL_TOTALEVENTS'=>'Anzahl meiner Ereignisse: ', + 'LBL_TOTALTODOS'=>'Anzahl meiner Aufgaben :', + 'LBL_VIEW'=>'Ansicht', + 'LBL_LISTVIEW'=>'Listenansicht', + 'LBL_HRVIEW'=>'Stundenansicht', + 'LBL_WEEKVIEW'=>'Wochenansicht', + 'LBL_MONTHVIEW'=>'Monatsansicht', + 'LBL_YEARVIEW'=>'Jahresansicht', + 'LBL_STATUS'=>'Status', + 'LBL_ACTION'=>'Aktionen', + 'LBL_ADD'=>'hinzufügen', + 'LBL_OPENCAL'=>'Kalender öffnen', + + + 'LBL_ADD_EVENT'=>'erstelle Ereignis', + 'LBL_ADDCALL'=>'Anruf', + 'LBL_ADDMEETING'=>'Meeting', + 'LBL_ADDTODO'=>'Aufgabe', + 'LBL_BEFOREEVENT'=>'vor dem Ereignisbeginn', + 'LBL_BEFORETASK'=>'vor der Aufgabenbeginn', + 'LBL_EVENTDETAILS'=>'Details', + 'LBL_CURSTATUS'=>'aktueller Status', + 'LBL_ASSINGEDTO'=>'zuständig', + 'LBL_RELATEDTO'=>'bezogen auf', + 'LBL_PENDING'=>'offen', + 'LBL_PUBLIC'=>'öffentlich machen', + 'LBL_MORE'=>'mehr', + 'LBL_EDIT'=>'bearbeiten', + 'LBL_EVERYDAY'=>'jeden Tag', + 'LBL_EVERYWEEK'=>'jede Woche', + 'LBL_EVERYMON'=>'jeden Monat', + 'LBL_WEEKS'=>'Woche(n)', + 'LBL_MONTHS'=>'Monat(e)', + 'LBL_YEAR'=>'Jahr', + 'LBL_NONE_SCHEDULED'=>'nicht geplant', + + 'LBL_INVITE_INST1'=>'Um jemanden einzuladen, wählen Sie einen Benutzer aus der "Verfügbare Nutzer" Liste und klicken Sie den "Hinzufügen" Button.', + 'LBL_INVITE_SHARE'=>'Um das jemanden mitzuteilen, wählen Sie einen Benutzer aus der "Verfügbare Nutzer" Liste und klicken Sie den "Hinzufügen" Button.', + 'LBL_INVITE_INST2'=>'Um jemanden aus der Liste zu entfernen, wählen Sie den Benutzer in der "Ausgewählte Nutzer" Liste und klicken Sie auf "Entfernen".', + 'LBL_SELUSR_INFO'=>' Ausgewählte Nutzer werden eine E-Mail über diese Ereignis erhalten.', + 'LBL_CALSHAREMESSAGE'=>'Teile meinen Kalender mit den folgenden CRM Nutzern', + 'LBL_CALSHARE'=>'Kalender gemeinsam benutzen', + 'LBL_SEL_USERS'=>'ausgewählte Nutzer', + 'LBL_AVL_USERS'=>'verfügbare Nutzer', + 'LBL_ADD_BUTTON'=>'Hinzufügen', + 'LBL_USERS'=>'Benutzer', + 'LBL_RMV_BUTTON'=>'Entfernen', + 'LBL_SDRMD'=>'sende Erinnerung an', + 'LBL_ENABLE_REPEAT'=>'Wiederholung freigeben', + 'LBL_REPEAT_ONCE'=>'Wiederhole alle', + 'LBL_ADD_TODO'=>'Aufgabe erzeugen', + 'LBL_TODONAME'=>'Aufgabe', + 'LBL_TODODATETIME'=>'Zeit & Datum', + + //DON'T CONVERT THESE THEY ARE MAPPINGS + 'db_last_name' => 'LBL_LIST_LAST_NAME', + 'db_first_name' => 'LBL_LIST_FIRST_NAME', + 'db_title' => 'LBL_LIST_TITLE', + 'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', + 'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', + //DON'T CONVERT THESE THEY ARE MAPPINGS -ENDS + 'LBL_COMPLETED'=>'abgeschlossen', + 'LBL_DEFERRED'=>'verschoben', + 'LBL_HELD'=>'durchgeführt', + 'LBL_NOTHELD'=>'nicht durchgeführt', + 'LBL_POSTPONE'=>'verschieben', + 'LBL_CHANGEOWNER'=>'Besitzer wechseln', + 'LBL_DEL'=>'löschen', + + //Added for actvity merge with calendar + 'LBL_SEARCH_FORM_TITLE'=>'Aktivitätensuche', + 'LBL_LIST_FORM_TITLE'=>'Aktivitätenliste', + 'LBL_NEW_FORM_TITLE'=>'neue Aktivität', + 'LBL_TASK_INFORMATION'=>'Aufgabeninformation', + 'LBL_EVENT_INFORMATION'=>'Ereignisinformation', + 'LBL_CALENDAR_INFORMATION'=>'Kalenderinformation', + + 'LBL_NAME'=>'Betreff:', + 'LBL_ACTIVITY_NOTIFICATION'=>'Im CRM ist für Sie ein Termin hinterlegt. Dieser wurde ', + 'LBL_ACTIVITY_INVITATION'=>'Sie wurden im CRM zu einem Ereignis eingeladen. Dieses wurde', + 'LBL_DETAILS_STRING'=>'Hier sind die Details', + 'LBL_REGARDS_STRING'=>'Bitte berücksichtigen Sie diesen Termin in Ihrer Planung', + 'LBL_CONTACT_NAME'=>'Personenname', + 'LBL_OPEN_ACTIVITIES'=>'offene Aktivitäten', + 'LBL_ACTIVITY'=>'Aktivität:', + 'LBL_HISTORY'=>'Historie', + 'LBL_UPCOMING'=>"Meine aktuellen Aktivitäten", + 'LBL_TODAY'=>'heute ', + + 'LBL_NEW_TASK_BUTTON_TITLE'=>'neue Aufgabe [Alt+N]', + 'LBL_NEW_TASK_BUTTON_KEY'=>'N', + 'LBL_NEW_TASK_BUTTON_LABEL'=>'neue Aufgabe', + 'LBL_SCHEDULE_MEETING_BUTTON_TITLE'=>'Meeting planen [Alt+M]', + 'LBL_SCHEDULE_MEETING_BUTTON_KEY'=>'M', + 'LBL_SCHEDULE_MEETING_BUTTON_LABEL'=>'Meeting planen', + 'LBL_SCHEDULE_CALL_BUTTON_TITLE'=>'Anruf planen [Alt+C]', + 'LBL_SCHEDULE_CALL_BUTTON_KEY'=>'C', + 'LBL_SCHEDULE_CALL_BUTTON_LABEL'=>'Anruf planen', + 'LBL_NEW_NOTE_BUTTON_TITLE'=>'neue Notiz [Alt+T]', + 'LBL_NEW_ATTACH_BUTTON_TITLE'=>'Datei hinzufügen [Alt+F]', + 'LBL_NEW_NOTE_BUTTON_KEY'=>'T', + 'LBL_NEW_ATTACH_BUTTON_KEY'=>'F', + 'LBL_NEW_NOTE_BUTTON_LABEL'=>'neue Notiz', + 'LBL_NEW_ATTACH_BUTTON_LABEL'=>'Datei hinzufügen', + 'LBL_TRACK_EMAIL_BUTTON_TITLE'=>'Track E-Mail [Alt+K]', + 'LBL_TRACK_EMAIL_BUTTON_KEY'=>'K', + 'LBL_TRACK_EMAIL_BUTTON_LABEL'=>'Track E-Mail', + + 'LBL_LIST_CLOSE'=>'Schließen', + 'LBL_LIST_STATUS'=>'Status', + 'LBL_LIST_CONTACT'=>'Person', + //Added for 4.2 release for Account column support as shown by Fredy + 'LBL_LIST_ACCOUNT'=>'Organisation', + 'LBL_LIST_RELATED_TO'=>'Bezogen auf', + 'LBL_LIST_DUE_DATE'=>'zu erledigen bis', + 'LBL_LIST_DATE'=>'Datum', + 'LBL_LIST_SUBJECT'=>'Betreff', + 'LBL_LIST_LAST_MODIFIED'=>'zuletzt geändert', + 'LBL_LIST_RECURRING_TYPE'=>'Wiederholungstyp', + + 'ERR_DELETE_RECORD'=>"Bitte wählen Sie wenigstens einen Eintrag aus.", + 'NTC_NONE_SCHEDULED'=>'nichts geplant', + + // Added vtiger_fields for Attachments in Activities/SubPanelView.php + 'LBL_ATTACHMENTS'=>'Anhänge', + 'LBL_NEW_ATTACHMENT'=>'neuer Anhang', + + //Added vtiger_fields after RC1 - Release + 'LBL_ALL'=>'Alle', + 'LBL_CALL'=>'Anruf', + 'LBL_MEETING'=>'Meeting', + 'LBL_TASK'=>'Aufgabe', + + //Added for 4GA Release + 'Subject'=>'Betreff', + 'Assigned To'=>'zuständig', + 'Start Date & Time'=>'Termin beginnt', + 'Time Start'=>'Beginn', + 'Due Date'=>'zu erledigen bis', + 'Related To'=>'bezogen auf', + 'Contact Name'=>'Personenname', + 'Status'=>'Status', + 'Priority'=>'Priorität', + 'Visibility'=>'Sichtbarkeit', + 'Send Notification'=>'sende Termin als E-Mail Nachricht', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Activity Type'=>'Aktivitätentyp', + 'Description'=>'Beschreibung', + 'Duration'=>'Dauer', + 'Duration Minutes'=>'Dauer in Minuten', + 'Location'=>'Ort', + 'No Time'=>'keine Zeitangabe', + //Added for Send Reminder 4.2 release + 'Send Reminder'=>'sende Erinnerung', + 'LBL_YES'=>'Ja', + 'LBL_NO'=>'Nein', + 'LBL_DAYS'=>'Tag(e)', + 'LBL_MINUTES'=>'Minute(n)', + 'LBL_HOURS'=>'Stunde(n)', + 'LBL_BEFORE_EVENT'=>'vor dem Ereignis', + //Added for CustomView 4.2 Release + 'Close'=>'Schließen', + 'Start Date'=>'Startdatum', + 'Type'=>'Typ', + 'End Date'=>'Endedatum', + 'Recurrence'=> 'wiederholende Ereignisse', + 'Recurring Type'=> 'Wiederholungstyp', + //Activities - Notification Error + 'LBL_NOTIFICATION_ERROR'=>'Mail Fehler: Bitten Sie den CRM Systemadministrator die Einstellungen für den ausgehenden Mailserver zu überprüfen ODER geben Sie eine gültige E-Mail Adresse unter Meine Einstellungen an.', + // Mike Crowe Mod --------------------------------------------------------added for generic search + 'LBL_GENERAL_INFORMATION'=>'Allgemeine Information', + + 'LBL_EVENTTYPE'=>'Ereignistyp', + 'LBL_EVENTNAME'=>'Ereignisname', + 'LBL_EVENTSTAT'=>'Ereignis beginnt', + 'LBL_EVENTEDAT'=>'Ereignis endet', + 'LBL_INVITE'=>'Einladen', + 'LBL_REPEAT'=>'Wiederholen', + 'LBL_REMINDER'=>'Erinnerung', + 'LBL_SENDREMINDER'=>'sende Erinnerung', + 'LBL_NOTIFICATION'=>'Benachrichtigung', + 'LBL_SENDNOTIFICATION'=>'sende diesen Termin als E-Mail Nachricht', + 'LBL_RMD_ON'=>'E-Mail zur Erinnerung', + 'LBL_REPEATEVENT'=>'wiederhole alle ', + 'LBL_TIMEDATE'=>'Zeit & Datum', + 'LBL_HR'=>'h', + 'LBL_MIN'=>'min', + 'LBL_EVENT'=>'Ereignis', + 'Daily'=>'Tag(e)', + 'Weekly'=>'Woche(n)', + 'Monthly'=>'Monat(e)', + 'Yearly'=>'Jahr', + 'createdtime'=>'erstellt', + 'modifiedtime'=>'geändert', + 'first'=>'erste', + 'last'=>'letzte', + 'High'=>'hoch', + 'Medium'=>'mittel', + 'Low'=>'gering', + 'LBL_SELECT'=>'auswählen', + 'LBL_ALL_EVENTS_TODOS'=>'Alle Ereignisse & Aufgaben', + 'First'=>'erster', + 'Last'=>'letzter', + 'on'=>'am', + 'day of the month'=>'Tag des Monats', + 'Private'=>'privat', + 'Public'=>'öffentlich', + + //Added for existing Picklist entries + + 'Planned'=>'geplant', + 'Held'=>'durchgeführt', + 'Not Held'=>'nicht durchgeführt', + 'Completed'=>'abgeschlossen', + 'Deferred'=>'verschoben', + 'Not Started'=>'nicht begonnen', + 'In Progress'=>'begonnen', + 'Pending Input'=>'erwarte Zuarbeit', + 'LBL_REMAINDER_DAY'=>'Tag(e)', + 'LBL_REMAINDER_HRS'=>'Stunde(n)', + 'Call'=>'Anruf', + 'Meeting'=>'Meeting', + + //added to send dates and time in calendar notification/invitation mail. + + 'Start date and time'=>'beginnt', + 'End date and time'=>'endet', + //this is for task + 'End date'=>'Endedatum', + 'LBL_SET_DATE'=>'Datum angeben..', + 'Recurrence'=>'Wiederholen', + + //added to send invitation mail Subject. + 'INVITATION'=>' Einladung ', + + // Added/Updated for vtiger CRM 5.0.4 + 'LBL_YEAR_BUTTON_TITLE'=>'Jahr [Alt+Y]', + 'LBL_SELECT_CONTACT'=>'Personen auswählen', + 'SHARED_EVENT_DEL_MSG'=>'Sie habe keine Berechtigung diese Ereignisse zu verändern oder zu löschen.', + //added to fix ticket#4525 + 'LBL_CREATED'=>'erzeugt', + 'LBL_UPDATED'=>'modifiziert', + + //Added after 5.0.4 GA + 'LBL_BUSY' => 'geblockt', + + //Custom Fields support for Calendar + 'LBL_CUSTOM_INFORMATION'=>'benutzerdefinierte Information', + + // Repeat Event support for Calendar + 'LBL_UNTIL' => 'bis', + 'LBL_SET_DATE'=>'Setze Datum', + + 'LBL_MINE' =>'meine', + 'LBL_SUCCESS_CALENDAR_1' => 'Anzahl der Aufgaben, die erfolgreiche importiert wurden: ', + 'LBL_SKIPPED_CALENDAR_1' => 'Anzahl der Aufgaben, die nicht importiert wurden da Pflichtangaben fehlten: ', + 'LBL_SUCCESS_EVENTS_1' => 'Anzahl der Ereignisse, die erfolgreiche importiert wurden: ', + 'LBL_SKIPPED_EVENTS_1' => 'Anzahl der Ereignisse, die nicht importiert wurden da Pflichtangaben fehlten: ', + 'LBL_FINISHED'=>'beendet', + 'LBL_UNDO_LAST_IMPORT'=>'letzten Import rückgängig machen', + 'LBL_LAST_IMPORT'=>'zuletzt importiert', + 'LBL_LAST_IMPORT_UNDONE'=>'Ihr letzter Import wurde rückgängig gemacht', + 'LBL_SUCCESS'=>'Erfolgreich!', + 'LBL_NO_IMPORT_TO_UNDO'=>'Es konnte nichts rückgängig gemacht werden.', + 'LBL_FAILURE'=>'Fehler!', + + 'LBL_ARE_YOU_SURE'=>'Sind Sie sicher?', + 'Calendar ID' => 'Kalendar ID', +); + +?> \ No newline at end of file diff --git a/modules/Calendar/language/en_gb.lang.php b/modules/Calendar/language/en_gb.lang.php new file mode 100644 index 0000000..3c20a37 --- /dev/null +++ b/modules/Calendar/language/en_gb.lang.php @@ -0,0 +1,321 @@ + 'Calendar', + 'LBL_MODULE_TITLE' => 'Calendar: Home', + 'LBL_MODULE_APPOINTMENT' => 'Calendar: Appointment', + 'LBL_MODULE_APPOINTMENT_DETAIL' => 'Calendar: Appointment Detail', + 'LBL_SAVE' => 'Save', + 'LBL_RESET' => 'Cancel', + 'LBL_LIST_USER_NAME' => 'User Name', + 'LBL_LIST_NAME' => 'Name', + 'LBL_CALENDAR_SHARED' => 'Calendar currently shared with', + 'LBL_CALENDAR_SHARING' => 'Share calendar with', + 'LBL_SHARING_OPTION' => 'Can see my calendar?', + 'LBL_LIST_TOOLS' => 'Tools', + 'LBL_SETTINGS' => 'Settings', + 'LBL_CALSETTINGS' => 'Calendar Settings', + 'LBL_USE24' => 'Use 24 hour format', + 'LBL_CALSTART' => 'Start my calendar time at', + 'LBL_TIMESETTINGS' => 'Time Settings', + 'LBL_HOLDFOLLOWUP' => 'Hold followup on', + 'LBL_CALL' => 'Call', + 'LBL_MEET' => 'Meeting', + 'LBL_APPNT' => 'Appointment', + 'LBL_NEW_APPNT' => 'New Appointment', + 'LBL_NEW_APPNT_INFO' => 'Create a new appointment', + 'LBL_VIEW_DAY_APPNT_INFO' => 'View appointment(s) for this day', + 'LBL_CHANGE_APPNT' => 'see or change this appointment (%s - %s)', + 'LBL_DAY' => 'Day', + 'LBL_DAY_BUTTON_KEY' => 'D', + 'LBL_DAY_BUTTON_TITLE' => 'Day [Alt+D]', + 'LBL_DAY1' => 'Monday', + 'LBL_DAY2' => 'Tuesday', + 'LBL_DAY3' => 'Wednesday', + 'LBL_DAY4' => 'Thursday', + 'LBL_DAY5' => 'Friday', + 'LBL_DAY6' => 'Saturday', + 'LBL_DAY0' => 'Sunday', + 'LBL_SM_MON' => 'Mon', + 'LBL_SM_TUE' => 'Tue', + 'LBL_SM_WED' => 'Wed', + 'LBL_SM_THU' => 'Thu', + 'LBL_SM_FRI' => 'Fri', + 'LBL_SM_SAT' => 'Sat', + 'LBL_SM_SUN' => 'Sun', + 'LBL_DATE_TITLE' => 'Day %d, %A', + 'LBL_WEEK' => 'Week', + 'LBL_WEEK_BUTTON_KEY' => 'W', + 'LBL_WEEK_BUTTON_TITLE' => 'Week [Alt+W]', + 'LBL_WEEKS' => 'Week(s)', + 'LBL_NEXT_WEEK' => 'next week', + 'LBL_LAST_WEEK' => 'last week', + 'LBL_4WEEKS_BACK' => '4 weeks back', + 'LBL_4WEEKS_PLUS' => '4 weeks plus', + 'LBL_RELOAD' => 'Reload', + 'LBL_APPCREATED_BY' => 'Created by', + 'LBL_AT_DATE_TIME' => 'at', + 'LBL_MON' => 'Month', + 'LBL_MON_BUTTON_KEY' => 'M', + 'LBL_MON_BUTTON_TITLE' => 'Month [Alt+M]', + 'LBL_PREV_MON' => 'Previous Month', + 'LBL_NEXT_MON' => 'Next Month', + 'LBL_YEAR_BUTTON_KEY' => 'Y', + 'LBL_PREV_YEAR' => 'Previous Year', + 'LBL_NEXT_YEAR' => 'Next Year', + 'LBL_APP_LOCATION' => 'Location', + 'LBL_APP_IGNORE_TIME' => 'ignore above times', + 'LBL_SUBJECT' => 'Subject:', + 'LBL_APP_DESCRIPTION' => 'Description', + 'LBL_CONTACT' => 'Contact:', + 'LBL_CONTACT_LIST' => 'Contact List:', + 'LBL_APP_IGNORE_TIME2' => '(i.e. the appointment takes place
at no particular time on these day(s) )', + 'LBL_APP_ERR001' => 'Invalid date in field %s!', + 'LBL_APP_ERR002' => 'start after end!', + 'LBL_APP_ERR003' => 'Missing Contact!', + 'LBL_APP_ERR004' => 'Missing Subject!', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the Organisation', + 'DELETE_CONFIRMATION' => 'Are you sure you want to delete this appointment?', + 'AppLoc' => array('Office','Out','Holiday','Sick','Postponed','Option','Private'), + 'cal_month_long' => array('','January','February','March','April','May','June','July','August','September','October','November','December'), + 'cal_weekdays_short' => array('Mon','Tue','Wed','Thu','Fri','Sat','Sun'), + 'cal_weekdays_long' => array('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday'), + 'cal_month_short' => array('','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'), + 'LBL_TIME' => 'Time', + 'LBL_START_TIME' => 'Start Time', + 'LBL_END_TIME' => 'End Time', + 'LBL_START_DATE' => 'Start Date', + 'LBL_TIME_START' => 'Time Start', + 'LBL_DUE_DATE' => 'Due Date', + 'LBL_START_DATE_TIME' => 'Start Date & Time', + 'LBL_END_DATE_TIME' => 'End Date & Time', + 'LBL_TODO' => 'To Do', + 'LBL_TODOS' => 'To Dos', + 'LBL_EVENTS' => 'Events', + 'LBL_TOTALEVENTS' => 'My Total Events :', + 'LBL_TOTALTODOS' => 'My Total To Dos :', + 'LBL_VIEW' => 'View', + 'LBL_LISTVIEW' => 'List View', + 'LBL_HRVIEW' => 'Hour View', + 'LBL_WEEKVIEW' => 'Weekly Calendar View', + 'LBL_MONTHVIEW' => 'Monthly Calendar View', + 'LBL_YEARVIEW' => 'Yearly Calendar View', + 'LBL_STATUS' => 'Status', + 'LBL_ACTION' => 'Actions', + 'LBL_ADD' => 'Add', + 'LBL_OPENCAL' => 'Open Calendar', + 'LBL_ADD_EVENT' => 'Add Event', + 'LBL_ADDCALL' => 'Call', + 'LBL_ADDMEETING' => 'Meeting', + 'LBL_ADDTODO' => 'To Do', + 'LBL_BEFOREEVENT' => 'before the event starts', + 'LBL_BEFORETASK' => 'before the task starts', + 'LBL_EVENTDETAILS' => 'Event Details', + 'LBL_CURSTATUS' => 'Current Status', + 'LBL_ASSINGEDTO' => 'Assigned To', + 'LBL_RELATEDTO' => 'Related To', + 'LBL_PENDING' => 'Pending', + 'LBL_PUBLIC' => 'Mark Public', + 'LBL_MORE' => 'More', + 'LBL_EDIT' => 'Edit', + 'LBL_EVERYDAY' => 'Every Day', + 'LBL_EVERYWEEK' => 'Every Week', + 'LBL_EVERYMON' => 'Every Month', + 'LBL_MONTHS' => 'Month(s)', + 'LBL_YEAR' => 'Year', + 'LBL_NONE_SCHEDULED' => 'None Scheduled', + 'LBL_INVITE_INST1' => 'To invite, select the users from the Available Users list and click the Add button.', + 'LBL_INVITE_SHARE' => 'To share, select the users from the Available Users list and click the Add button.', + 'LBL_INVITE_INST2' => 'To remove, select the users from the Selected Users list and the click Remove button.', + 'LBL_SELUSR_INFO' => 'Selected users will receive an email about the event.', + 'LBL_CALSHAREMESSAGE' => 'Share my calendar with the following selected users', + 'LBL_CALSHARE' => 'Calendar Sharing', + 'LBL_SEL_USERS' => 'Selected Users', + 'LBL_AVL_USERS' => 'Available Users', + 'LBL_ADD_BUTTON' => 'Add', + 'LBL_USERS' => 'Users', + 'LBL_RMV_BUTTON' => 'Remove', + 'LBL_SDRMD' => 'Send Reminder to', + 'LBL_ENABLE_REPEAT' => 'Enable Repeat', + 'LBL_REPEAT_ONCE' => 'Repeat once in every', + 'LBL_ADD_TODO' => 'Create To Do', + 'LBL_TODONAME' => 'To Do', + 'LBL_TODODATETIME' => 'Time & Date', + 'db_last_name' => 'LBL_LIST_LAST_NAME', + 'db_first_name' => 'LBL_LIST_FIRST_NAME', + 'db_title' => 'LBL_LIST_TITLE', + 'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', + 'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', + 'LBL_COMPLETED' => 'Mark completed', + 'LBL_DEFERRED' => 'Mark Deferred', + 'LBL_HELD' => 'Mark Held', + 'LBL_NOTHELD' => 'Mark Not Held', + 'LBL_POSTPONE' => 'Postpone', + 'LBL_CHANGEOWNER' => 'Change owner', + 'LBL_DEL' => 'Delete', + 'LBL_SEARCH_FORM_TITLE' => 'Activity Search', + 'LBL_LIST_FORM_TITLE' => 'Activity List', + 'LBL_NEW_FORM_TITLE' => 'New Activity', + 'LBL_TASK_INFORMATION' => 'Task Information', + 'LBL_EVENT_INFORMATION' => 'Event Information', + 'LBL_CALENDAR_INFORMATION' => 'Calendar Information', + 'LBL_NAME' => 'Subject:', + 'LBL_ACTIVITY_NOTIFICATION' => 'This is a notification that an activity assigned to you has been', + 'LBL_ACTIVITY_INVITATION' => 'You have been invited for an activity that has been ', + 'LBL_DETAILS_STRING' => 'The details are', + 'LBL_REGARDS_STRING' => 'Thanks & regards', + 'LBL_CONTACT_NAME' => 'Contact Name', + 'LBL_OPEN_ACTIVITIES' => 'Open Activities', + 'LBL_ACTIVITY' => 'Activity:', + 'LBL_HISTORY' => 'History', + 'LBL_UPCOMING' => 'My Upcoming and Pending Activities', + 'LBL_TODAY' => 'through ', + 'LBL_NEW_TASK_BUTTON_TITLE' => 'New Task [Alt+N]', + 'LBL_NEW_TASK_BUTTON_KEY' => 'N', + 'LBL_NEW_TASK_BUTTON_LABEL' => 'New Task', + 'LBL_SCHEDULE_MEETING_BUTTON_TITLE' => 'Schedule Meeting [Alt+M]', + 'LBL_SCHEDULE_MEETING_BUTTON_KEY' => 'M', + 'LBL_SCHEDULE_MEETING_BUTTON_LABEL' => 'Schedule Meeting', + 'LBL_SCHEDULE_CALL_BUTTON_TITLE' => 'Schedule Call [Alt+C]', + 'LBL_SCHEDULE_CALL_BUTTON_KEY' => 'C', + 'LBL_SCHEDULE_CALL_BUTTON_LABEL' => 'Schedule Call', + 'LBL_NEW_NOTE_BUTTON_TITLE' => 'New Document [Alt+T]', + 'LBL_NEW_ATTACH_BUTTON_TITLE' => 'Attach File [Alt+F]', + 'LBL_NEW_NOTE_BUTTON_KEY' => 'T', + 'LBL_NEW_ATTACH_BUTTON_KEY' => 'F', + 'LBL_NEW_NOTE_BUTTON_LABEL' => 'New Document', + 'LBL_NEW_ATTACH_BUTTON_LABEL' => 'Attach File', + 'LBL_TRACK_EMAIL_BUTTON_TITLE' => 'Track Email [Alt+K]', + 'LBL_TRACK_EMAIL_BUTTON_KEY' => 'K', + 'LBL_TRACK_EMAIL_BUTTON_LABEL' => 'Track Email', + 'LBL_LIST_CLOSE' => 'Close', + 'LBL_LIST_STATUS' => 'Status', + 'LBL_LIST_CONTACT' => 'Contact', + 'LBL_LIST_ACCOUNT' => 'Organisation', + 'LBL_LIST_RELATED_TO' => 'Related to', + 'LBL_LIST_DUE_DATE' => 'Due Date', + 'LBL_LIST_DATE' => 'Date', + 'LBL_LIST_SUBJECT' => 'Subject', + 'LBL_LIST_LAST_MODIFIED' => 'Last Modified', + 'LBL_LIST_RECURRING_TYPE' => 'Recurring Type', + 'NTC_NONE_SCHEDULED' => 'None scheduled.', + 'LBL_ATTACHMENTS' => 'Attachments', + 'LBL_NEW_ATTACHMENT' => 'New Attachment', + 'LBL_ALL' => 'All', + 'LBL_MEETING' => 'Meeting', + 'LBL_TASK' => 'Task', + 'Subject' => 'Subject', + 'Assigned To' => 'Assigned To', + 'Start Date & Time' => 'Start Date & Time', + 'Time Start' => 'Time Start', + 'Due Date' => 'Due Date', + 'Related To' => 'Related to', + 'Contact Name' => 'Contact Name', + 'Status' => 'Status', + 'Priority' => 'Priority', + 'Visibility' => 'Visibility', + 'Send Notification' => 'Send Notification', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Activity Type' => 'Activity Type', + 'Description' => 'Description', + 'Duration' => 'Duration', + 'Duration Minutes' => 'Duration Minutes', + 'Location' => 'Location', + 'No Time' => 'No Time', + 'Send Reminder' => 'Send Reminder', + 'LBL_YES' => 'Yes', + 'LBL_NO' => 'No', + 'LBL_DAYS' => 'day(s)', + 'LBL_MINUTES' => 'minutes', + 'LBL_HOURS' => 'hours', + 'LBL_BEFORE_EVENT' => 'before event', + 'Close' => 'Close', + 'Start Date' => 'Start Date', + 'Type' => 'Type', + 'End Date' => 'End date', + 'Recurrence' => 'Recurrence', + 'Recurring Type' => 'Recurring Type', + 'LBL_NOTIFICATION_ERROR' => 'Mail Error : Please check the outgoing mail server configuration in Settings->Outgoing Mail Server Configuration or the email address for the present user', + 'LBL_GENERAL_INFORMATION' => 'General Information', + 'LBL_EVENTTYPE' => 'Event Type', + 'LBL_EVENTNAME' => 'Event Name', + 'LBL_EVENTSTAT' => 'Event starts at', + 'LBL_EVENTEDAT' => 'Event ends on', + 'LBL_INVITE' => 'Invite', + 'LBL_REPEAT' => 'Repeat', + 'LBL_REMINDER' => 'Reminder', + 'LBL_SENDREMINDER' => 'Send Reminder', + 'LBL_NOTIFICATION' => 'Notification', + 'LBL_SENDNOTIFICATION' => 'Send Notification', + 'LBL_RMD_ON' => 'Remind on', + 'LBL_REPEATEVENT' => 'Repeat once in every', + 'LBL_TIMEDATE' => 'Time & Date', + 'LBL_HR' => 'Hr', + 'LBL_MIN' => 'min', + 'LBL_EVENT' => 'Event', + 'Daily' => 'Day(s)', + 'Weekly' => 'Week(s)', + 'Monthly' => 'Month(s)', + 'Yearly' => 'Year', + 'createdtime' => 'Created Time', + 'modifiedtime' => 'Modified Time', + 'first' => 'First', + 'last' => 'Last', + 'High' => 'High', + 'Medium' => 'Medium', + 'Low' => 'Low', + 'LBL_SELECT' => 'Select', + 'LBL_ALL_EVENTS_TODOS' => 'All Events & To Dos', + 'on' => 'on', + 'day of the month' => 'day of the month', + 'Private' => 'Private', + 'Public' => 'Public', + 'Planned' => 'Planned', + 'Held' => 'Held', + 'Not Held' => 'Not Held', + 'Completed' => 'Completed', + 'Deferred' => 'Deferred', + 'Not Started' => 'Not Started', + 'In Progress' => 'In Progress', + 'Pending Input' => 'Pending Input', + 'LBL_REMAINDER_DAY' => 'days', + 'LBL_REMAINDER_HRS' => 'hrs', + 'Call' => 'Call', + 'Meeting' => 'Meeting', + 'Start date and time' => 'Start Date & Time', + 'End date and time' => 'End Date & Time', + 'LBL_SET_DATE' => 'Set Date', + 'INVITATION' => 'Invitation', + 'LBL_YEAR_BUTTON_TITLE' => 'Year [Alt+Y]', + 'LBL_SELECT_CONTACT' => 'Select Contacts', + 'SHARED_EVENT_DEL_MSG' => 'The user does not have permission to Edit/Delete shared event.', + 'LBL_CREATED' => 'created', + 'LBL_UPDATED' => 'updated', + 'LBL_BUSY' => 'Busy', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_UNTIL' => 'Until', + 'LBL_MINE' => 'Mine', + 'LBL_SUCCESS_CALENDAR_1' => 'No. of Tasks successfully imported: ', + 'LBL_SKIPPED_CALENDAR_1' => 'No. of Tasks skipped as they were missing one or more required fields: ', + 'LBL_SUCCESS_EVENTS_1' => 'No. of Events successfully imported: ', + 'LBL_SKIPPED_EVENTS_1' => 'No. of Events skipped as they were missing one or more required fields: ', + 'LBL_FINISHED' => 'Finished', + 'LBL_UNDO_LAST_IMPORT' => 'Undo Last Import', + 'LBL_LAST_IMPORT' => 'Last Imported', + 'LBL_LAST_IMPORT_UNDONE' => 'Your Last import was undone', + 'LBL_SUCCESS' => 'Success!', + 'LBL_NO_IMPORT_TO_UNDO' => 'There was no import to undo.', + 'LBL_FAILURE' => 'Failed!', + 'LBL_ARE_YOU_SURE' => 'Are you sure?', + 'Calendar ID' => 'Calendar ID', +); +?> \ No newline at end of file diff --git a/modules/Calendar/language/en_us.lang.php b/modules/Calendar/language/en_us.lang.php new file mode 100644 index 0000000..523fc5c --- /dev/null +++ b/modules/Calendar/language/en_us.lang.php @@ -0,0 +1,455 @@ +'Calendar', +'LBL_MODULE_TITLE'=>'Calendar: Home', +'LBL_MODULE_APPOINTMENT'=>'Calendar: Appointment', +'LBL_MODULE_APPOINTMENT_DETAIL'=>'Calendar: Appointment Detail', +'LBL_SAVE'=>'Save', +'LBL_RESET'=>'Cancel', +'LBL_LIST_USER_NAME'=>'User Name', +'LBL_LIST_NAME'=>'Name', +'LBL_CALENDAR_SHARED'=>'Calendar currently shared with', +'LBL_CALENDAR_SHARING'=>'Share calendar with', +'LBL_SHARING_OPTION'=>'Can see my calendar?', +'LBL_LIST_TOOLS'=>'Tools', +'LBL_SETTINGS'=>'Settings', +'LBL_CALSETTINGS'=>'Calendar Settings', +'LBL_USE24'=>'Use 24 hours format', +'LBL_CALSTART'=>'Start my calendar time at', +'LBL_TIMESETTINGS'=>'Time Settings', +'LBL_HOLDFOLLOWUP'=>'Hold followup on', +'LBL_CALL' => 'Call', +'LBL_MEET' => 'Meeting', +'LBL_APPNT' => 'Appointment', +'LBL_NEW_APPNT' => 'New Appointment', +'LBL_NEW_APPNT_INFO' => 'Create a new appointment', +'LBL_VIEW_DAY_APPNT_INFO' => 'View appointment(s) for this day', +'LBL_CHANGE_APPNT' => 'see or change this appointment (%s - %s)', + +'LBL_DAY' => 'Day', +'LBL_DAY_BUTTON_KEY' => 'D', +'LBL_DAY_BUTTON_TITLE' => 'Day [Alt+D]', +'LBL_DAY1' => 'Monday', +'LBL_DAY2' => 'Tuesday', +'LBL_DAY3' => 'Wednesday', +'LBL_DAY4' => 'Thursday', +'LBL_DAY5' => 'Friday', +'LBL_DAY6' => 'Saturday', +'LBL_DAY0' => 'Sunday', + +'LBL_SM_MON' => 'Mon', +'LBL_SM_TUE' => 'Tue', +'LBL_SM_WED' => 'Wed', +'LBL_SM_THU' => 'Thu', +'LBL_SM_FRI' => 'Fri', +'LBL_SM_SAT' => 'Sat', +'LBL_SM_SUN' => 'Sun', + +'LBL_DATE_TITLE' => 'Day %d, %A', + +'LBL_WEEK' => 'Week', +'LBL_WEEK_BUTTON_KEY' => 'W', +'LBL_WEEK_BUTTON_TITLE' => 'Week [Alt+W]', +'LBL_WEEKS' => 'Weeks', +'LBL_NEXT_WEEK' => 'next week', +'LBL_LAST_WEEK' => 'last week', +'LBL_4WEEKS_BACK' => '4 weeks back', +'LBL_4WEEKS_PLUS' => '4 weeks plus', +'LBL_RELOAD' => 'Reload', + + +'LBL_APPCREATED_BY' => 'Created by', +'LBL_AT_DATE_TIME' => 'at', + +'LBL_MON' => 'Month', +'LBL_MON_BUTTON_KEY' => 'M', +'LBL_MON_BUTTON_TITLE' => 'Month [Alt+M]', +'LBL_PREV_MON' => 'Previous Month', +'LBL_NEXT_MON' => 'Next Month', + +'LBL_YEAR_BUTTON_KEY'=>'Y', +'LBL_PREV_YEAR'=>'Previous Year', +'LBL_NEXT_YEAR' => 'Next Year', + +'LBL_APP_LOCATION' => 'Location', +'LBL_APP_IGNORE_TIME' => 'ignore above times', +'LBL_SUBJECT'=>'Subject:', +'LBL_APP_DESCRIPTION' => 'Description', +'LBL_CONTACT'=>'Contact:', +'LBL_CONTACT_LIST'=>'Contact List:', + +'LBL_APP_IGNORE_TIME2' => '(i.e. the appointment takes place
at no particular time on these day(s) )', + +'LBL_APP_ERR001' =>'Invalid Date in field %s!', +'LBL_APP_ERR002' =>'start after end !', +'LBL_APP_ERR003' =>'Missing Contact !', +'LBL_APP_ERR004' =>'Missing Subject !', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the appointment.", +'DELETE_CONFIRMATION'=>"Are you sure you want to delete this appointment?", + +'AppLoc'=> Array('0' => 'Office' + , '1' => 'Out' + , '2' => 'Vacation' + , '3' => 'sick' + , '4' => 'Postponed' + , '5' => 'Option' + , '6' => 'Private'), + +'cal_month_long'=>array( +"", +"January", +"February", +"March", +"April", +"May", +"June", +"July", +"August", +"September", +"October", +"November", +"December", +), + +'cal_weekdays_short'=>array( +"Mon", +"Tue", +"Wed", +"Thu", +"Fri", +"Sat", +"Sun", +), +'cal_weekdays_long'=>array( +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday", +), +'cal_month_short'=>array( +"", +"Jan", +"Feb", +"Mar", +"Apr", +"May", +"Jun", +"Jul", +"Aug", +"Sep", +"Oct", +"Nov", +"Dec", +), + +'LBL_TIME'=>'Time', +'LBL_START_TIME' => 'Start Time', +'LBL_END_TIME' => 'End Time', +'LBL_START_DATE'=>'Start Date', +'LBL_TIME_START'=>'Time Start', +'LBL_DUE_DATE'=>'Due Date', +'LBL_START_DATE_TIME'=>'Start Date & Time', +'LBL_END_DATE_TIME'=>'End Date & Time', +'LBL_TODO'=>'To Do', +'LBL_TODOS'=>'To Dos', +'LBL_EVENTS'=>'Events', +'LBL_TOTALEVENTS'=>'My Total Events :', +'LBL_TOTALTODOS'=>'My Total To Dos :', +'LBL_VIEW'=>'View', +'LBL_LISTVIEW'=>'List View', +'LBL_HRVIEW'=>'Hour View', +'LBL_WEEKVIEW'=>'Weekly Calendar View', +'LBL_MONTHVIEW'=>'Monthly Calendar View', +'LBL_YEARVIEW'=>'Yearly Calendar View', +'LBL_STATUS'=>'Status', +'LBL_ACTION'=>'Actions', +'LBL_ADD'=>'Add', +'LBL_OPENCAL'=>'Open Calendar', + + +'LBL_ADD_EVENT'=>'Add Event', +'LBL_ADDCALL'=>'Call', +'LBL_ADDMEETING'=>'Meeting', +'LBL_ADDTODO'=>'To Do', +'LBL_BEFOREEVENT'=>'before the event starts', +'LBL_BEFORETASK'=>'before the task starts', +'LBL_EVENTDETAILS'=>'Event Details', +'LBL_CURSTATUS'=>'Current Status', +'LBL_ASSINGEDTO'=>'Assigned To', +'LBL_RELATEDTO'=>'Related To', +'LBL_PENDING'=>'Pending', +'LBL_PUBLIC'=>'Mark Public', +'LBL_MORE'=>'More', +'LBL_EDIT'=>'Edit', +'LBL_EVERYDAY'=>'Every Day', +'LBL_EVERYWEEK'=>'Every Week', +'LBL_EVERYMON'=>'Every Month', +'LBL_WEEKS'=>'Week(s)', +'LBL_MONTHS'=>'Month(s)', +'LBL_YEAR'=>'Year', +'LBL_NONE_SCHEDULED'=>'None Scheduled', + +'LBL_INVITE_INST1'=>'To invite, select the users from the "Available Users" list and click the "Add" button.', +'LBL_INVITE_SHARE'=>'To share, select the users from the "Available Users" list and click the "Add" button.', +'LBL_INVITE_INST2'=>'To remove, select the users from the "Selected Users" list and the click "Remove" button.', +'LBL_SELUSR_INFO'=>' Selected users will receive an email about the Event.', +'LBL_CALSHAREMESSAGE'=>'Share my calendar with the following selected users', +'LBL_CALSHARE'=>'Calendar Sharing', +'LBL_SEL_USERS'=>'Selected Users', +'LBL_AVL_USERS'=>'Available Users', +'LBL_ADD_BUTTON'=>'Add', +'LBL_USERS'=>'Users', +'LBL_RMV_BUTTON'=>'Remove', +'LBL_SDRMD'=>'Send Reminder to', +'LBL_ENABLE_REPEAT'=>'Enable Repeat', +'LBL_REPEAT_ONCE'=>'Repeat once in every', +'LBL_ADD_TODO'=>'Create To Do', +'LBL_TODONAME'=>'To Do', +'LBL_TODODATETIME'=>'Time & Date', + + + + + +//DON'T CONVERT THESE THEY ARE MAPPINGS - STARTS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//DON'T CONVERT THESE THEY ARE MAPPINGS -ENDS +'LBL_COMPLETED'=>'Mark Completed', +'LBL_DEFERRED'=>'Mark Deferred', +'LBL_HELD'=>'Mark Held', +'LBL_NOTHELD'=>'Mark Not Held', +'LBL_POSTPONE'=>'Postpone', +'LBL_CHANGEOWNER'=>'Change Owner', +'LBL_DEL'=>'Delete', + +//Added for actvity merge with calendar +'LBL_SEARCH_FORM_TITLE'=>'Activity Search', +'LBL_LIST_FORM_TITLE'=>'Activity List', +'LBL_NEW_FORM_TITLE'=>'New Activity', +'LBL_TASK_INFORMATION'=>'Task Information', +'LBL_EVENT_INFORMATION'=>'Event Information', +'LBL_CALENDAR_INFORMATION'=>'Calendar Information', + +'LBL_NAME'=>'Subject:', +'LBL_ACTIVITY_NOTIFICATION'=>'This is a notification that an activity is assigned to you that has been', +'LBL_ACTIVITY_INVITATION'=>'You have been invited for an activity that has been ', +'LBL_DETAILS_STRING'=>'The details are', +'LBL_REGARDS_STRING'=>'Thanks & Regards', +'LBL_CONTACT_NAME'=>'Contact Name', +'LBL_OPEN_ACTIVITIES'=>'Open Activities', +'LBL_ACTIVITY'=>'Activity:', +'LBL_HISTORY'=>'History', +'LBL_UPCOMING'=>"My Upcoming and Pending Activities", +'LBL_TODAY'=>'through ', + +'LBL_NEW_TASK_BUTTON_TITLE'=>'New Task [Alt+N]', +'LBL_NEW_TASK_BUTTON_KEY'=>'N', +'LBL_NEW_TASK_BUTTON_LABEL'=>'New Task', +'LBL_SCHEDULE_MEETING_BUTTON_TITLE'=>'Schedule Meeting [Alt+M]', +'LBL_SCHEDULE_MEETING_BUTTON_KEY'=>'M', +'LBL_SCHEDULE_MEETING_BUTTON_LABEL'=>'Schedule Meeting', +'LBL_SCHEDULE_CALL_BUTTON_TITLE'=>'Schedule Call [Alt+C]', +'LBL_SCHEDULE_CALL_BUTTON_KEY'=>'C', +'LBL_SCHEDULE_CALL_BUTTON_LABEL'=>'Schedule Call', +'LBL_NEW_NOTE_BUTTON_TITLE'=>'New Document [Alt+T]', +'LBL_NEW_ATTACH_BUTTON_TITLE'=>'Attach File [Alt+F]', +'LBL_NEW_NOTE_BUTTON_KEY'=>'T', +'LBL_NEW_ATTACH_BUTTON_KEY'=>'F', +'LBL_NEW_NOTE_BUTTON_LABEL'=>'New Document', +'LBL_NEW_ATTACH_BUTTON_LABEL'=>'Attach File', +'LBL_TRACK_EMAIL_BUTTON_TITLE'=>'Track Email [Alt+K]', +'LBL_TRACK_EMAIL_BUTTON_KEY'=>'K', +'LBL_TRACK_EMAIL_BUTTON_LABEL'=>'Track Email', + +'LBL_LIST_CLOSE'=>'Close', +'LBL_LIST_STATUS'=>'Status', +'LBL_LIST_CONTACT'=>'Contact', +//Added for 4.2 release for Organization column support as shown by Fredy +'LBL_LIST_ACCOUNT'=>'Organization', +'LBL_LIST_RELATED_TO'=>'Related to', +'LBL_LIST_DUE_DATE'=>'Due Date', +'LBL_LIST_DATE'=>'Date', +'LBL_LIST_SUBJECT'=>'Subject', +'LBL_LIST_LAST_MODIFIED'=>'Last Modified', +'LBL_LIST_RECURRING_TYPE'=>'Recurring Type', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", +'NTC_NONE_SCHEDULED'=>'None scheduled.', + +// Added vtiger_fields for Attachments in Activities/SubPanelView.php +'LBL_ATTACHMENTS'=>'Attachments', +'LBL_NEW_ATTACHMENT'=>'New Attachment', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_CALL'=>'Call', +'LBL_MEETING'=>'Meeting', +'LBL_TASK'=>'Task', + +//Added for 4GA Release +'Subject'=>'Subject', +'Assigned To'=>'Assigned To', +'Start Date & Time'=>'Start Date & Time', +'Time Start'=>'Time Start', +'Due Date'=>'Due Date', +'Related To'=>'Related to', +'Contact Name'=>'Contact Name', +'Status'=>'Status', +'Priority'=>'Priority', +'Visibility'=>'Visibility', +'Send Notification'=>'Send Notification', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Activity Type'=>'Activity Type', +'Description'=>'Description', +'Duration'=>'Duration', +'Duration Minutes'=>'Duration Minutes', +'Location'=>'Location', +'No Time'=>'No Time', +//Added for Send Reminder 4.2 release +'Send Reminder'=>'Send Reminder', +'LBL_YES'=>'Yes', +'LBL_NO'=>'No', +'LBL_DAYS'=>'day(s)', +'LBL_MINUTES'=>'minutes', +'LBL_HOURS'=>'hours', +'LBL_BEFORE_EVENT'=>'before event', +//Added for CustomView 4.2 Release +'Close'=>'Close', +'Start Date'=>'Start Date', +'Type'=>'Type', +'End Date'=>'End Date', +'Recurrence'=> 'Recurring Events', +'Recurring Type'=> 'Recurring Type', +//Activities - Notification Error +'LBL_NOTIFICATION_ERROR'=>'Mail Error : Please check your outgoing mail server configuration in Settings->Outgoing Mail Server Configuration OR MailId for the present user is not Configured', +// Mike Crowe Mod --------------------------------------------------------added for generic search +'LBL_GENERAL_INFORMATION'=>'General Information', + +'LBL_EVENTTYPE'=>'Event Type', +'LBL_EVENTNAME'=>'Event Name', +'LBL_EVENTSTAT'=>'Event starts at', +'LBL_EVENTEDAT'=>'Event ends on', +'LBL_INVITE'=>'Invite', +'LBL_REPEAT'=>'Repeat', +'LBL_REMINDER'=>'Reminder', +'LBL_SENDREMINDER'=>'Send Reminder', +'LBL_NOTIFICATION'=>'Notification', +'LBL_SENDNOTIFICATION'=>'Send Notification', +'LBL_RMD_ON'=>'Remind on', +'LBL_REPEATEVENT'=>'Repeat once in every', +'LBL_TIMEDATE'=>'Time & Date', +'LBL_HR'=>'Hr', +'LBL_MIN'=>'min', +'LBL_EVENT'=>'Event', +'Daily'=>'Day(s)', +'Weekly'=>'Week(s)', +'Monthly'=>'Month(s)', +'Yearly'=>'Year', +'createdtime'=>'Created Time', +'modifiedtime'=>'Modified Time', +'first'=>'First', +'last'=>'Last', +'High'=>'High', +'Medium'=>'Medium', +'Low'=>'Low', +'LBL_SELECT'=>'Select', +'LBL_ALL_EVENTS_TODOS'=>'All Events & Todos', +'First'=>'First', +'Last'=>'Last', +'on'=>'on', +'day of the month'=>'day of the month', +'Private'=>'Private', +'Public'=>'Public', + +//Added for existing Picklist entries + +'Planned'=>'Planned', +'Held'=>'Held', +'Not Held'=>'Not Held', +'Completed'=>'Completed', +'Deferred'=>'Deferred', +'Not Started'=>'Not Started', +'In Progress'=>'In Progress', +'Pending Input'=>'Pending Input', +'LBL_REMAINDER_DAY'=>'days', +'LBL_REMAINDER_HRS'=>'hrs', +'Call'=>'Call', +'Meeting'=>'Meeting', + +//added to send dates and time in calendar notification/invitation mail. + +'Start date and time'=>'Start Date & Time', +'End date and time'=>'End Date & Time', +//this is for task +'End date'=>'End date', +'LBL_SET_DATE'=>'Set date..', +'Recurrence'=>'Recurrence', + +//added to send invitation mail Subject. +'INVITATION'=>' Invitation ', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_YEAR_BUTTON_TITLE'=>'Year [Alt+Y]', +'LBL_SELECT_CONTACT'=>'Select Contacts', +'SHARED_EVENT_DEL_MSG'=>'The User does not have permission to Edit/Delete Shared Event.', +//added to fix ticket#4525 +'LBL_CREATED'=>'created', +'LBL_UPDATED'=>'updated', + +//Added after 5.0.4 GA +'LBL_BUSY' => 'Busy', + +//Custom Fields support for Calendar +'LBL_CUSTOM_INFORMATION'=>'Custom Information', + +// Repeat Event support for Calendar +'LBL_UNTIL' => 'Until', +'LBL_SET_DATE'=>'Set Date', + +'LBL_MINE' =>'Mine', +'LBL_SUCCESS_CALENDAR_1' => 'No. of Tasks Successfully Imported : ', +'LBL_SKIPPED_CALENDAR_1' => 'No. of Tasks Skipped as they were missing one or more required fields : ', +'LBL_SUCCESS_EVENTS_1' => 'No. of Events Successfully Imported : ', +'LBL_SKIPPED_EVENTS_1' => 'No. of Events Skipped as they were missing one or more required fields : ', +'LBL_FINISHED'=>'Finished', +'LBL_UNDO_LAST_IMPORT'=>'Undo Last Import', +'LBL_LAST_IMPORT'=>'Last Imported', +'LBL_LAST_IMPORT_UNDONE'=>'Your Last Import Was Undone', +'LBL_SUCCESS'=>'Success!', +'LBL_NO_IMPORT_TO_UNDO'=>'There was no import to undo.', +'LBL_FAILURE'=>'Failed!', + +'LBL_ARE_YOU_SURE'=>'Are you sure?', +'Calendar ID' => 'Calendar ID', +); + +?> \ No newline at end of file diff --git a/modules/Calendar/language/es_es.lang.php b/modules/Calendar/language/es_es.lang.php new file mode 100644 index 0000000..8aff2a7 --- /dev/null +++ b/modules/Calendar/language/es_es.lang.php @@ -0,0 +1,455 @@ +'Calendario', +'LBL_MODULE_TITLE'=>'Calendario: Inicio', +'LBL_MODULE_APPOINTMENT'=>'Calendario: Evento', +'LBL_MODULE_APPOINTMENT_DETAIL'=>'Calendario: Detalle de Evento', +'LBL_SAVE'=>'Guardar', +'LBL_RESET'=>'Cancelar', +'LBL_LIST_USER_NAME'=>'Usuario', +'LBL_LIST_NAME'=>'Nombre', +'LBL_CALENDAR_SHARED'=>'Eventos compartidos con', +'LBL_CALENDAR_SHARING'=>'Compartir eventos con', +'LBL_SHARING_OPTION'=>'¿Puede ver mis eventos?', +'LBL_LIST_TOOLS'=>'Herramientas', +'LBL_SETTINGS'=>'Preferencias', +'LBL_CALSETTINGS'=>'Preferencias de Calendario', +'LBL_USE24'=>'Usar formato de 24h.', +'LBL_CALSTART'=>'Comenzar el día de Calendario a las', +'LBL_TIMESETTINGS'=>'Preferencias de Hora', +'LBL_HOLDFOLLOWUP'=>'Mantener seguimiento el dia', +'LBL_CALL' => 'Llamada', +'LBL_MEET' => 'Reunión', +'LBL_APPNT' => 'Evento', +'LBL_NEW_APPNT' => 'Nuevo Evento', +'LBL_NEW_APPNT_INFO' => 'Crear Evento', +'LBL_VIEW_DAY_APPNT_INFO' => 'Ver Eventos para hoy', +'LBL_CHANGE_APPNT' => 'ver o cambiar Eventos para hoy (%s - %s)', + +'LBL_DAY' => 'Día', +'LBL_DAY_BUTTON_KEY' => 'D', +'LBL_DAY_BUTTON_TITLE' => 'Día [Alt+D]', +'LBL_DAY1' => 'Lunes', +'LBL_DAY2' => 'Martes', +'LBL_DAY3' => 'Miércoles', +'LBL_DAY4' => 'Jueves', +'LBL_DAY5' => 'Viernes', +'LBL_DAY6' => 'Sábado', +'LBL_DAY0' => 'Domingo', + +'LBL_SM_MON' => 'Lun', +'LBL_SM_TUE' => 'Mar', +'LBL_SM_WED' => 'Mie', +'LBL_SM_THU' => 'Jue', +'LBL_SM_FRI' => 'Vie', +'LBL_SM_SAT' => 'Sab', +'LBL_SM_SUN' => 'Dom', + +'LBL_DATE_TITLE' => 'Día %d, %A', + +'LBL_WEEK' => 'Semana', +'LBL_WEEK_BUTTON_KEY' => 'W', +'LBL_WEEK_BUTTON_TITLE' => 'Semana [Alt+W]', +'LBL_WEEKS' => 'Semana', +'LBL_NEXT_WEEK' => 'Semana Siguiente', +'LBL_LAST_WEEK' => 'Semana Anterior', +'LBL_4WEEKS_BACK' => '4 semanas atrás', +'LBL_4WEEKS_PLUS' => '4 semanas siguientes', +'LBL_RELOAD' => 'Actualizar', + + +'LBL_APPCREATED_BY' => 'Creado por', +'LBL_AT_DATE_TIME' => 'en', + +'LBL_MON' => 'Mes', +'LBL_MON_BUTTON_KEY' => 'M', +'LBL_MON_BUTTON_TITLE' => 'Mes [Alt+M]', +'LBL_PREV_MON' => 'Mes Anterior', +'LBL_NEXT_MON' => 'Mes Siguiente', + +'LBL_YEAR_BUTTON_KEY'=>'Y', +'LBL_PREV_YEAR'=>'Año Anterior', +'LBL_NEXT_YEAR' => 'Año Siguiente', + +'LBL_APP_LOCATION' => 'Lugar', +'LBL_APP_IGNORE_TIME' => 'ignorar horas', +'LBL_SUBJECT'=>'Asunto:', +'LBL_APP_DESCRIPTION' => 'Descripción', +'LBL_CONTACT'=>'Contacto:', +'LBL_CONTACT_LIST'=>'Lista Contactos:', + +'LBL_APP_IGNORE_TIME2' => '(p.e. si el evento no tiene definida
una hora concreta)', + +'LBL_APP_ERR001' =>'Fecha inválida en campo %s!', +'LBL_APP_ERR002' =>'¡Empieza más tarde que la hora de fin!', +'LBL_APP_ERR003' =>'¡Falta Contacto !', +'LBL_APP_ERR004' =>'¡Falta Asunto!', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +'DELETE_CONFIRMATION'=>'¿Borrar el Evento?', + +'AppLoc'=> Array('0' => 'Oficina' + , '1' => 'Fuera' + , '2' => 'Vacaciones' + , '3' => 'Enfermo' + , '4' => 'Pospuesto' + , '5' => 'Optativo' + , '6' => 'Privado'), + +'cal_month_long'=>array( +"", +"Enero", +"Febrero", +"Marzo", +"Abril", +"Mayo", +"Junio", +"Julio", +"Agosto", +"Septiembre", +"Octubre", +"Noviembre", +"Deciembre", +), + +'cal_weekdays_short'=>array( +"Lun", +"Mar", +"Mie", +"Jue", +"Vie", +"Sab", +"Dom", +), +'cal_weekdays_long'=>array( +"Lunes", +"Martes", +"Miércoles", +"Jueves", +"Viernes", +"Sabado", +"Domingo", +), +'cal_month_short'=>array( +"", +"Ene", +"Feb", +"Mar", +"Abr", +"May", +"Jun", +"Jul", +"Ago", +"Sep", +"Oct", +"Nov", +"Dic", +), + +'LBL_TIME'=>'Horario', +'LBL_START_TIME' => 'Hora de inicio', +'LBL_END_TIME' => 'Hora de fin', +'LBL_START_DATE'=>'Fecha de inicio', +'LBL_TIME_START'=>'Hora de inicio',//START_TIME cambiada la etiqueta +'LBL_DUE_DATE'=>'Fecha de fin', +'LBL_START_DATE_TIME'=>'Fecha y Hora de inicio', +'LBL_END_DATE_TIME'=>'Fecha y Hora de fin', +'LBL_TODO'=>'Tarea', +'LBL_TODOS'=>'Tareas', +'LBL_EVENTS'=>'Eventos', +'LBL_TOTALEVENTS'=>'Total Eventos :', +'LBL_TOTALTODOS'=>'Total Tareas :', +'LBL_VIEW'=>'Vista', +'LBL_LISTVIEW'=>'Vista de Lista', +'LBL_HRVIEW'=>'Vista de Horas', +'LBL_WEEKVIEW'=>'Vista Semanal', +'LBL_MONTHVIEW'=>'Vista Mensual', +'LBL_YEARVIEW'=>'Vista Anual', +'LBL_STATUS'=>'Situación', +'LBL_ACTION'=>'Acciones', +'LBL_ADD'=>'Añadir', +'LBL_OPENCAL'=>'Abrir Calendario', + + +'LBL_ADD_EVENT'=>'Añadir Evento', +'LBL_ADDCALL'=>'Añadir Llamada', +'LBL_ADDMEETING'=>'Añadir Reunión', +'LBL_ADDTODO'=>'Añadir Tarea', +'LBL_BEFOREEVENT'=>'antes que comience el evento', +'LBL_BEFORETASK'=>'antes que comience la tarea', +'LBL_EVENTDETAILS'=>'Detalles del Evento', +'LBL_CURSTATUS'=>'Situación Actual', +'LBL_ASSINGEDTO'=>'Asignado A', +'LBL_RELATEDTO'=>'Relacionado Con', +'LBL_PENDING'=>'Pendiente', +'LBL_PUBLIC'=>'Público (Lo verán todos los usuarios)', +'LBL_MORE'=>'Más', +'LBL_EDIT'=>'Editar', +'LBL_EVERYDAY'=>'Cada día', +'LBL_EVERYWEEK'=>'Cada Semana', +'LBL_EVERYMON'=>'Cada Mes', +'LBL_WEEKS'=>'Semanas', +'LBL_MONTHS'=>'Meses', +'LBL_YEAR'=>'Año', +'LBL_NONE_SCHEDULED'=>'Nada Programado', + +'LBL_INVITE_INST1'=>'Para Invitar, seleccione los usuarios desde la lista "Usuarios Disponibles" y pulse "Añadir".', +'LBL_INVITE_SHARE'=>'Para Compartir,selecione Usuario desde "Usuarios Disponibles" y Pulse el botón "Añadir".', +'LBL_INVITE_INST2'=>'Para Eliminar, seleccione los usuarios desde la lista "Usuarios Seleccionados" y pulse "Borrar".', +'LBL_SELUSR_INFO'=>' Los Usuarios seleccionados recibirán un email .', +'LBL_CALSHAREMESSAGE'=>'Compartir mi calendario con los siguientes Usuarios', +'LBL_CALSHARE'=>'Compartición de Calendario', +'LBL_SEL_USERS'=>'Usuarios Seleccionados', +'LBL_AVL_USERS'=>'Usuarios Disponibles', +'LBL_ADD_BUTTON'=>'Añadir', +'LBL_USERS'=>'Usuarios', +'LBL_RMV_BUTTON'=>'Borrar', +'LBL_SDRMD'=>'Enviar Recordatorio a', +'LBL_ENABLE_REPEAT'=>'Activar Repetición', +'LBL_REPEAT_ONCE'=>'Repetir cada', +'LBL_ADD_TODO'=>'Crear Tarea', +'LBL_TODONAME'=>'Tarea', +'LBL_TODODATETIME'=>'Fecha y Hora', + + + + + +//DON'T CONVERT THESE THEY ARE MAPPINGS - STARTS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//DON'T CONVERT THESE THEY ARE MAPPINGS -ENDS +'LBL_COMPLETED'=>'Completada', +'LBL_DEFERRED'=>'Retrasar', +'LBL_HELD'=>'Realizada', +'LBL_NOTHELD'=>'Anular', +'LBL_POSTPONE'=>'Posponer', +'LBL_CHANGEOWNER'=>'Cambiar Propietario', +'LBL_DEL'=>'Borrar', + +//Added for actvity merge with calendar +'LBL_SEARCH_FORM_TITLE'=>'Buscar Tarea', +'LBL_LIST_FORM_TITLE'=>'Listado de Tareas', +'LBL_NEW_FORM_TITLE'=>'Nueva Tarea', +'LBL_TASK_INFORMATION'=>'Información de Tarea', +'LBL_EVENT_INFORMATION'=>'Información de Evento', +'LBL_CALENDAR_INFORMATION'=>'Información de Calendario', + +'LBL_NAME'=>'Asunto:', +'LBL_ACTIVITY_NOTIFICATION'=>'Se te ha asignado una tarea. Estado:', +'LBL_ACTIVITY_INVITATION'=>'Has sido invitado a una tarea. Estado:', +'LBL_DETAILS_STRING'=>'Los detalles son', +'LBL_REGARDS_STRING'=>'Un saludo', +'LBL_CONTACT_NAME'=>'Contacto', +'LBL_OPEN_ACTIVITIES'=>'Tareas Pendientes', +'LBL_ACTIVITY'=>'Tarea:', +'LBL_HISTORY'=>'Histórico', +'LBL_UPCOMING'=>'Tareas Pendientes', +'LBL_TODAY'=>'En el Día ', + +'LBL_NEW_TASK_BUTTON_TITLE'=>'Nueva Tarea [Alt+N]', +'LBL_NEW_TASK_BUTTON_KEY'=>'N', +'LBL_NEW_TASK_BUTTON_LABEL'=>'Nueva Tarea', +'LBL_SCHEDULE_MEETING_BUTTON_TITLE'=>'Programar Reunión [Alt+M]', +'LBL_SCHEDULE_MEETING_BUTTON_KEY'=>'M', +'LBL_SCHEDULE_MEETING_BUTTON_LABEL'=>'Programar Reunión', +'LBL_SCHEDULE_CALL_BUTTON_TITLE'=>'Programar Llamada [Alt+C]', +'LBL_SCHEDULE_CALL_BUTTON_KEY'=>'C', +'LBL_SCHEDULE_CALL_BUTTON_LABEL'=>'Programar Llamada', +'LBL_NEW_NOTE_BUTTON_TITLE'=>'Nuevo Documento [Alt+T]', +'LBL_NEW_ATTACH_BUTTON_TITLE'=>'Adjuntar Archivo [Alt+F]', +'LBL_NEW_NOTE_BUTTON_KEY'=>'T', +'LBL_NEW_ATTACH_BUTTON_KEY'=>'F', +'LBL_NEW_NOTE_BUTTON_LABEL'=>'Nuevo Documento', +'LBL_NEW_ATTACH_BUTTON_LABEL'=>'Adjuntar Archivo', +'LBL_TRACK_EMAIL_BUTTON_TITLE'=>'Seguir Email [Alt+K]', +'LBL_TRACK_EMAIL_BUTTON_KEY'=>'K', +'LBL_TRACK_EMAIL_BUTTON_LABEL'=>'Seguir Email', + +'LBL_LIST_CLOSE'=>'Cerrado', +'LBL_LIST_STATUS'=>'Estado', +'LBL_LIST_CONTACT'=>'Contacto', +//Added for 4.2 release for Account column support as shown by Fredy +'LBL_LIST_ACCOUNT'=>'Cuenta', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DUE_DATE'=>'Vencimiento', +'LBL_LIST_DATE'=>'Fecha', +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_LAST_MODIFIED'=>'Última Modificación', +'LBL_LIST_RECURRING_TYPE'=>'Tipo de recurrencia', + +'ERR_DELETE_RECORD'=>"Debe especificar un registro para eliminar la cuenta.", +'NTC_NONE_SCHEDULED'=>'Nada Programado.', + +// Added vtiger_fields for Attachments in Activities/SubPanelView.php +'LBL_ATTACHMENTS'=>'Adjuntos', +'LBL_NEW_ATTACHMENT'=>'Nuevo Adjunto', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todo', +'LBL_CALL'=>'Llamada', +'LBL_MEETING'=>'Reunión', +'LBL_TASK'=>'Tarea', + +//Added for 4GA Release +'Subject'=>'Asunto', +'Assigned To'=>'Asignado A', +'Start Date & Time'=>'Fecha y Hora de Inicio', +'Time Start'=>'Hora de Inicio', +'Due Date'=>'Fecha de Vencimiento', +'Related To'=>'Relacionado con', +'Contact Name'=>'Contacto', +'Status'=>'Estado', +'Priority'=>'Prioridad', +'Visibility'=>'Visibilidad', +'Send Notification'=>'Enviar notificación', +'Created Time'=>'Creado', +'Modified Time'=>'Modificado', +'Activity Type'=>'Tipo de Tarea', +'Description'=>'Descripción', +'Duration'=>'Duración', +'Duration Minutes'=>'Duración (Minutos)', +'Location'=>'Localización', +'No Time'=>'Sin Hora', +//Added for Send Reminder 4.2 release +'Send Reminder'=>'Enviar Recordatorio', +'LBL_YES'=>'Si', +'LBL_NO'=>'No', +'LBL_DAYS'=>'días', +'LBL_MINUTES'=>'minutos', +'LBL_HOURS'=>'horas', +'LBL_BEFORE_EVENT'=>'antes del evento', +//Added for CustomView 4.2 Release +'Close'=>'Cerrado', +'Start Date'=>'Fecha Inicio', +'Type'=>'Tipo', +'End Date'=>'Fecha Fin', +'Recurrence'=> 'Eventos Recurrentes', +'Recurring Type'=> 'Tipo de Recurrencia', +//Activities - Notification Error +'LBL_NOTIFICATION_ERROR'=>'Error de Correo: Compruebe su servidor de correo saliente en Configuración->Servidor de Correo Saliente o revise si el contacto tiene un email definido', +// Mike Crowe Mod --------------------------------------------------------added for generic search +'LBL_GENERAL_INFORMATION'=>'Información General', + +'LBL_EVENTTYPE'=>'Tipo de Tarea', +'LBL_EVENTNAME'=>'Asunto', +'LBL_EVENTSTAT'=>'Hora de Inicio ', +'LBL_EVENTEDAT'=>'Vencimiento', +'LBL_INVITE'=>'Invitar', +'LBL_REPEAT'=>'Repetir', +'LBL_REMINDER'=>'Recordar', +'LBL_SENDREMINDER'=>'Enviar Recordatorio', +'LBL_NOTIFICATION'=>'Notificación', +'LBL_SENDNOTIFICATION'=>'Enviar Notificación', +'LBL_RMD_ON'=>'Recordatorio Activo', +'LBL_REPEATEVENT'=>'Repetir cada ', +'LBL_TIMEDATE'=>'Fecha y Hora de Inicio', +'LBL_HR'=>' Horas', +'LBL_MIN'=>' Mins', +'LBL_EVENT'=>'Evento', +'Daily'=>'Días', +'Weekly'=>'Semanas', +'Monthly'=>'Meses', +'Yearly'=>'Año', +'createdtime'=>'Creado', +'modifiedtime'=>'Modificado', +'first'=>'Primero', +'last'=>'Último', +'High'=>'Alto', +'Medium'=>'Medio', +'Low'=>'Bajo', +'LBL_SELECT'=>'Seleccionar', +'LBL_ALL_EVENTS_TODOS'=>'Tareas', +'First'=>'Primero', +'Last'=>'Último', +'on'=>'en', +'day of the month'=>'día del mes', +'Private'=>'Privado', +'Public'=>'Público', + +//Added for existing Picklist entries + +'Planned'=>'Planeado', +'Held'=>'Realizada', +'Not Held'=>'Pendiente', +'Completed'=>'Completado', +'Deferred'=>'Retrasado', +'Not Started'=>'No Iniciada', +'In Progress'=>'En Progreso', +'Pending Input'=>'Pendiente de datos', +'LBL_REMAINDER_DAY'=>'días', +'LBL_REMAINDER_HRS'=>'hrs', +'Call'=>'Llamada', +'Meeting'=>'Reunión', + +//added to send dates and time in calendar notification/invitation mail. + +'Start date and time'=>'Día y hora de inicio', +'End date and time'=>'Día y hora de fin', +//this is for task +'End date'=>'Fecha de fin', +'LBL_SET_DATE'=>'Establecer fecha...', +'Recurrence'=>'Recurrencia', + +//added to send invitation mail Subject. +'INVITATION'=>' Invitación ', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_YEAR_BUTTON_TITLE'=>'Año [Alt+Y]', +'LBL_SELECT_CONTACT'=>'Seleccionar Contacto', +'SHARED_EVENT_DEL_MSG'=>'El Usuario no está autorizado para borrar este registro.', +//added to fix ticket#4525 +'LBL_CREATED'=>'creado', +'LBL_UPDATED'=>'actualizado', + +//Added after 5.0.4 GA +'LBL_BUSY' => 'Trabajando', + +//Custom Fields support for Calendar +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', + +// Repeat Event support for Calendar +'LBL_UNTIL' => 'Hasta', +'LBL_SET_DATE'=>'Establecer Fecha', + +'LBL_MINE' =>'Mios', +'LBL_SUCCESS_CALENDAR_1' => 'No. de Tareas Importadas Correctamente : ', +'LBL_SKIPPED_CALENDAR_1' => 'No. de Tareas No Importadas al faltar uno o más campos requeridos : ', +'LBL_SUCCESS_EVENTS_1' => 'No. de Eventos Importados Correctamente : ', +'LBL_SKIPPED_EVENTS_1' => 'No. de Eventos No Importados al faltar uno o más campos requeridos : ', +'LBL_FINISHED'=>'Terminado', +'LBL_UNDO_LAST_IMPORT'=>'Deshacer Ultima Importación', +'LBL_LAST_IMPORT'=>'Ultimos Importados', +'LBL_LAST_IMPORT_UNDONE'=>'Se ha deshecho la última importación', +'LBL_SUCCESS'=>'Correcto!', +'LBL_NO_IMPORT_TO_UNDO'=>'No hay importación para deshacer.', +'LBL_FAILURE'=>'Fallido!', + +'LBL_ARE_YOU_SURE'=>'¿Estás seguro?', +'Calendar ID' => 'Id Calendario', +); + +?> diff --git a/modules/Calendar/language/es_mx.lang.php b/modules/Calendar/language/es_mx.lang.php new file mode 100644 index 0000000..37d7c77 --- /dev/null +++ b/modules/Calendar/language/es_mx.lang.php @@ -0,0 +1,456 @@ +'Calendario', +'LBL_MODULE_TITLE'=>'Calendario: Inicio', +'LBL_MODULE_APPOINTMENT'=>'Calendario: Evento', +'LBL_MODULE_APPOINTMENT_DETAIL'=>'Calendario: Detalle de Evento', +'LBL_SAVE'=>'Guardar', +'LBL_RESET'=>'Cancelar', +'LBL_LIST_USER_NAME'=>'Usuario', +'LBL_LIST_NAME'=>'Nombre', +'LBL_CALENDAR_SHARED'=>'Eventos compartidos con', +'LBL_CALENDAR_SHARING'=>'Compartir eventos con', +'LBL_SHARING_OPTION'=>'¿Puede ver mis eventos?', +'LBL_LIST_TOOLS'=>'Herramientas', +'LBL_SETTINGS'=>'Preferencias', +'LBL_CALSETTINGS'=>'Preferencias de Calendario', +'LBL_USE24'=>'Usar formato de 24h.', +'LBL_CALSTART'=>'Comenzar el día de Calendario a las', +'LBL_TIMESETTINGS'=>'Preferencias de Hora', +'LBL_HOLDFOLLOWUP'=>'Mantener seguimiento el dia', +'LBL_CALL' => 'Llamada', +'LBL_MEET' => 'Reunión', +'LBL_APPNT' => 'Evento', +'LBL_NEW_APPNT' => 'Nuevo Evento', +'LBL_NEW_APPNT_INFO' => 'Crear Evento', +'LBL_VIEW_DAY_APPNT_INFO' => 'Ver Eventos para hoy', +'LBL_CHANGE_APPNT' => 'ver o cambiar Eventos para hoy (%s - %s)', + +'LBL_DAY' => 'Día', +'LBL_DAY_BUTTON_KEY' => 'D', +'LBL_DAY_BUTTON_TITLE' => 'Día [Alt+D]', +'LBL_DAY1' => 'Lunes', +'LBL_DAY2' => 'Martes', +'LBL_DAY3' => 'Miércoles', +'LBL_DAY4' => 'Jueves', +'LBL_DAY5' => 'Viernes', +'LBL_DAY6' => 'Sábado', +'LBL_DAY0' => 'Domingo', + +'LBL_SM_MON' => 'Lun', +'LBL_SM_TUE' => 'Mar', +'LBL_SM_WED' => 'Mie', +'LBL_SM_THU' => 'Jue', +'LBL_SM_FRI' => 'Vie', +'LBL_SM_SAT' => 'Sab', +'LBL_SM_SUN' => 'Dom', + +'LBL_DATE_TITLE' => 'Día %d, %A', + +'LBL_WEEK' => 'Semana', +'LBL_WEEK_BUTTON_KEY' => 'W', +'LBL_WEEK_BUTTON_TITLE' => 'Semana [Alt+W]', +'LBL_WEEKS' => 'Semana', +'LBL_NEXT_WEEK' => 'Semana Siguiente', +'LBL_LAST_WEEK' => 'Semana Anterior', +'LBL_4WEEKS_BACK' => '4 semanas atrás', +'LBL_4WEEKS_PLUS' => '4 semanas siguientes', +'LBL_RELOAD' => 'Actualizar', + + +'LBL_APPCREATED_BY' => 'Creado por', +'LBL_AT_DATE_TIME' => 'en', + +'LBL_MON' => 'Mes', +'LBL_MON_BUTTON_KEY' => 'M', +'LBL_MON_BUTTON_TITLE' => 'Mes [Alt+M]', +'LBL_PREV_MON' => 'Mes Anterior', +'LBL_NEXT_MON' => 'Mes Siguiente', + +'LBL_YEAR_BUTTON_KEY'=>'Y', +'LBL_PREV_YEAR'=>'Año Anterior', +'LBL_NEXT_YEAR' => 'Año Siguiente', + +'LBL_APP_LOCATION' => 'Lugar', +'LBL_APP_IGNORE_TIME' => 'ignorar horas', +'LBL_SUBJECT'=>'Asunto:', +'LBL_APP_DESCRIPTION' => 'Descripción', +'LBL_CONTACT'=>'Contacto:', +'LBL_CONTACT_LIST'=>'Lista Contactos:', + +'LBL_APP_IGNORE_TIME2' => '(p.e. si el evento no tiene definida
una hora concreta)', + +'LBL_APP_ERR001' =>'Fecha inválida en campo %s!', +'LBL_APP_ERR002' =>'¡Empieza más tarde que la hora de fin!', +'LBL_APP_ERR003' =>'¡Falta Contacto !', +'LBL_APP_ERR004' =>'¡Falta Asunto!', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +'DELETE_CONFIRMATION'=>'¿Borrar el Evento?', + +'AppLoc'=> Array('0' => 'Oficina' + , '1' => 'Fuera' + , '2' => 'Vacaciones' + , '3' => 'Enfermo' + , '4' => 'Pospuesto' + , '5' => 'Optativo' + , '6' => 'Privado'), + +'cal_month_long'=>array( +"", +"Enero", +"Febrero", +"Marzo", +"Abril", +"Mayo", +"Junio", +"Julio", +"Agosto", +"Septiembre", +"Octubre", +"Noviembre", +"Deciembre", +), + +'cal_weekdays_short'=>array( +"Lun", +"Mar", +"Mie", +"Jue", +"Vie", +"Sab", +"Dom", +), +'cal_weekdays_long'=>array( +"Lunes", +"Martes", +"Miércoles", +"Jueves", +"Viernes", +"Sabado", +"Domingo", +), +'cal_month_short'=>array( +"", +"Ene", +"Feb", +"Mar", +"Abr", +"May", +"Jun", +"Jul", +"Ago", +"Sep", +"Oct", +"Nov", +"Dic", +), + +'LBL_TIME'=>'Horario', +'LBL_START_TIME' => 'Hora de inicio', +'LBL_END_TIME' => 'Hora de fin', +'LBL_START_DATE'=>'Fecha de inicio', +'LBL_TIME_START'=>'Hora de inicio',//START_TIME cambiada la etiqueta +'LBL_DUE_DATE'=>'Fecha de fin', +'LBL_START_DATE_TIME'=>'Fecha y Hora de inicio', +'LBL_END_DATE_TIME'=>'Fecha y Hora de fin', +'LBL_TODO'=>'Tarea', +'LBL_TODOS'=>'Tareas', +'LBL_EVENTS'=>'Eventos', +'LBL_TOTALEVENTS'=>'Total Eventos :', +'LBL_TOTALTODOS'=>'Total Tareas :', +'LBL_VIEW'=>'Vista', +'LBL_LISTVIEW'=>'Vista de Lista', +'LBL_HRVIEW'=>'Vista de Horas', +'LBL_WEEKVIEW'=>'Vista Semanal', +'LBL_MONTHVIEW'=>'Vista Mensual', +'LBL_YEARVIEW'=>'Vista Anual', +'LBL_STATUS'=>'Situación', +'LBL_ACTION'=>'Acciones', +'LBL_ADD'=>'Agregar', +'LBL_OPENCAL'=>'Abrir Calendario', + + +'LBL_ADD_EVENT'=>'Agregar Evento', +'LBL_ADDCALL'=>'Agregar Llamada', +'LBL_ADDMEETING'=>'Agregar Reunión', +'LBL_ADDTODO'=>'Agregar Tarea', +'LBL_BEFOREEVENT'=>'antes que comience el evento', +'LBL_BEFORETASK'=>'antes que comience la tarea', +'LBL_EVENTDETAILS'=>'Detalles del Evento', +'LBL_CURSTATUS'=>'Situación Actual', +'LBL_ASSINGEDTO'=>'Asignado A', +'LBL_RELATEDTO'=>'Relacionado Con', +'LBL_PENDING'=>'Pendiente', +'LBL_PUBLIC'=>'Público (Lo verán todos los usuarios)', +'LBL_MORE'=>'Más', +'LBL_EDIT'=>'Editar', +'LBL_EVERYDAY'=>'Cada día', +'LBL_EVERYWEEK'=>'Cada Semana', +'LBL_EVERYMON'=>'Cada Mes', +'LBL_WEEKS'=>'Semanas', +'LBL_MONTHS'=>'Meses', +'LBL_YEAR'=>'Año', +'LBL_NONE_SCHEDULED'=>'Nada Programado', + +'LBL_INVITE_INST1'=>'Para Invitar, seleccione los usuarios desde la lista "Usuarios Disponibles" y pulse "Agregar".', +'LBL_INVITE_SHARE'=>'Para Compartir,selecione Usuario desde "Usuarios Disponibles" y Pulse el botón "Agregar".', +'LBL_INVITE_INST2'=>'Para Eliminar, seleccione los usuarios desde la lista "Usuarios Seleccionados" y pulse "Borrar".', +'LBL_SELUSR_INFO'=>' Los Usuarios seleccionados recibirán un email .', +'LBL_CALSHAREMESSAGE'=>'Compartir mi calendario con los siguientes Usuarios', +'LBL_CALSHARE'=>'Compartir Calendario', +'LBL_SEL_USERS'=>'Usuarios Seleccionados', +'LBL_AVL_USERS'=>'Usuarios Disponibles', +'LBL_ADD_BUTTON'=>'Agregar', +'LBL_USERS'=>'Usuarios', +'LBL_RMV_BUTTON'=>'Borrar', +'LBL_SDRMD'=>'Enviar Recordatorio a', +'LBL_ENABLE_REPEAT'=>'Activar Repetición', +'LBL_REPEAT_ONCE'=>'Repetir cada', +'LBL_ADD_TODO'=>'Crear Tarea', +'LBL_TODONAME'=>'Tarea', +'LBL_TODODATETIME'=>'Fecha y Hora', + + + + + +//DON'T CONVERT THESE THEY ARE MAPPINGS - STARTS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//DON'T CONVERT THESE THEY ARE MAPPINGS -ENDS +'LBL_COMPLETED'=>'Completada', +'LBL_DEFERRED'=>'Retrasar', +'LBL_HELD'=>'Realizada', +'LBL_NOTHELD'=>'Anular', +'LBL_POSTPONE'=>'Posponer', +'LBL_CHANGEOWNER'=>'Cambiar Propietario', +'LBL_DEL'=>'Borrar', + +//Added for actvity merge with calendar +'LBL_SEARCH_FORM_TITLE'=>'Búscar Tarea', +'LBL_LIST_FORM_TITLE'=>'Listado de Tareas', +'LBL_NEW_FORM_TITLE'=>'Nueva Tarea', +'LBL_TASK_INFORMATION'=>'Información de Tarea', +'LBL_EVENT_INFORMATION'=>'Información de Evento', +'LBL_CALENDAR_INFORMATION'=>'Información de Calendario', + +'LBL_NAME'=>'Asunto:', +'LBL_ACTIVITY_NOTIFICATION'=>'Se te ha asignado una tarea. Estado:', +'LBL_ACTIVITY_INVITATION'=>'Has sido invitado a una tarea. Estado:', +'LBL_DETAILS_STRING'=>'Los detalles son', +'LBL_REGARDS_STRING'=>'Gracias', +'LBL_CONTACT_NAME'=>'Contacto', +'LBL_OPEN_ACTIVITIES'=>'Tareas Pendientes', +'LBL_ACTIVITY'=>'Tarea:', +'LBL_HISTORY'=>'Histórico', +'LBL_UPCOMING'=>'Tareas Pendientes', +'LBL_TODAY'=>'En el Día ', + +'LBL_NEW_TASK_BUTTON_TITLE'=>'Nueva Tarea [Alt+N]', +'LBL_NEW_TASK_BUTTON_KEY'=>'N', +'LBL_NEW_TASK_BUTTON_LABEL'=>'Nueva Tarea', +'LBL_SCHEDULE_MEETING_BUTTON_TITLE'=>'Programar Reunión [Alt+M]', +'LBL_SCHEDULE_MEETING_BUTTON_KEY'=>'M', +'LBL_SCHEDULE_MEETING_BUTTON_LABEL'=>'Programar Reunión', +'LBL_SCHEDULE_CALL_BUTTON_TITLE'=>'Programar Llamada [Alt+C]', +'LBL_SCHEDULE_CALL_BUTTON_KEY'=>'C', +'LBL_SCHEDULE_CALL_BUTTON_LABEL'=>'Programar Llamada', +'LBL_NEW_NOTE_BUTTON_TITLE'=>'Nuevo Documento [Alt+T]', +'LBL_NEW_ATTACH_BUTTON_TITLE'=>'Adjuntar Archivo [Alt+F]', +'LBL_NEW_NOTE_BUTTON_KEY'=>'T', +'LBL_NEW_ATTACH_BUTTON_KEY'=>'F', +'LBL_NEW_NOTE_BUTTON_LABEL'=>'Nuevo Documento', +'LBL_NEW_ATTACH_BUTTON_LABEL'=>'Adjuntar Archivo', +'LBL_TRACK_EMAIL_BUTTON_TITLE'=>'Seguir Email [Alt+K]', +'LBL_TRACK_EMAIL_BUTTON_KEY'=>'K', +'LBL_TRACK_EMAIL_BUTTON_LABEL'=>'Seguir Email', + +'LBL_LIST_CLOSE'=>'Cerrado', +'LBL_LIST_STATUS'=>'Estado', +'LBL_LIST_CONTACT'=>'Contacto', +//Added for 4.2 release for Account column support as shown by Fredy +'LBL_LIST_ACCOUNT'=>'Cuenta', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DUE_DATE'=>'Vencimiento', +'LBL_LIST_DATE'=>'Fecha', +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_LAST_MODIFIED'=>'Última Modificación', +'LBL_LIST_RECURRING_TYPE'=>'Tipo de recurrencia', + +'ERR_DELETE_RECORD'=>"Debe especificar un registro para eliminar la cuenta.", +'NTC_NONE_SCHEDULED'=>'Nada Programado.', + +// Added vtiger_fields for Attachments in Activities/SubPanelView.php +'LBL_ATTACHMENTS'=>'Adjuntos', +'LBL_NEW_ATTACHMENT'=>'Nuevo Adjunto', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todo', +'LBL_CALL'=>'Llamada', +'LBL_MEETING'=>'Reunión', +'LBL_TASK'=>'Tarea', + +//Added for 4GA Release +'Subject'=>'Asunto', +'Assigned To'=>'Asignado A', +'Start Date & Time'=>'Fecha y Hora de Inicio', +'Time Start'=>'Hora de Inicio', +'Due Date'=>'Fecha de Vencimiento', +'Related To'=>'Relacionado con', +'Contact Name'=>'Contacto', +'Status'=>'Estado', +'Priority'=>'Prioridad', +'Visibility'=>'Visibilidad', +'Send Notification'=>'Enviar notificación', +'Created Time'=>'Creado', +'Modified Time'=>'Modificado', +'Activity Type'=>'Tipo de Tarea', +'Description'=>'Descripción', +'Duration'=>'Duración', +'Duration Minutes'=>'Duración (Minutos)', +'Location'=>'Localización', +'No Time'=>'Sin Hora', +//Added for Send Reminder 4.2 release +'Send Reminder'=>'Enviar Recordatorio', +'LBL_YES'=>'Si', +'LBL_NO'=>'No', +'LBL_DAYS'=>'días', +'LBL_MINUTES'=>'minutos', +'LBL_HOURS'=>'horas', +'LBL_BEFORE_EVENT'=>'antes del evento', +//Added for CustomView 4.2 Release +'Close'=>'Cerrado', +'Start Date'=>'Fecha Inicio', +'Type'=>'Tipo', +'End Date'=>'Fecha Fin', +'Recurrence'=> 'Eventos Recurrentes', +'Recurring Type'=> 'Tipo de Recurrencia', +//Activities - Notification Error +'LBL_NOTIFICATION_ERROR'=>'Error de Correo: Compruebe su servidor de correo saliente en Configuración->Servidor de Correo Saliente o revise si el contacto tiene un email definido', +// Mike Crowe Mod --------------------------------------------------------added for generic search +'LBL_GENERAL_INFORMATION'=>'Información General', + +'LBL_EVENTTYPE'=>'Tipo de Tarea', +'LBL_EVENTNAME'=>'Asunto', +'LBL_EVENTSTAT'=>'Hora de Inicio ', +'LBL_EVENTEDAT'=>'Vencimiento', +'LBL_INVITE'=>'Invitar', +'LBL_REPEAT'=>'Repetir', +'LBL_REMINDER'=>'Recordar', +'LBL_SENDREMINDER'=>'Enviar Recordatorio', +'LBL_NOTIFICATION'=>'Notificación', +'LBL_SENDNOTIFICATION'=>'Enviar Notificación', +'LBL_RMD_ON'=>'Recordatorio Activo', +'LBL_REPEATEVENT'=>'Repetir cada ', +'LBL_TIMEDATE'=>'Fecha y Hora de Inicio', +'LBL_HR'=>' Horas', +'LBL_MIN'=>' Mins', +'LBL_EVENT'=>'Evento', +'Daily'=>'Días', +'Weekly'=>'Semanas', +'Monthly'=>'Meses', +'Yearly'=>'Año', +'createdtime'=>'Creado', +'modifiedtime'=>'Modificado', +'first'=>'Primero', +'last'=>'Último', +'High'=>'Alto', +'Medium'=>'Medio', +'Low'=>'Bajo', +'LBL_SELECT'=>'Seleccionar', +'LBL_ALL_EVENTS_TODOS'=>'Tareas', +'First'=>'Primero', +'Last'=>'Último', +'on'=>'en', +'day of the month'=>'día del mes', +'Private'=>'Privado', +'Public'=>'Público', + +//Added for existing Picklist entries + +'Planned'=>'Planeado', +'Held'=>'Realizada', +'Not Held'=>'Pendiente', +'Completed'=>'Completado', +'Deferred'=>'Retrasado', +'Not Started'=>'No Iniciada', +'In Progress'=>'En Progreso', +'Pending Input'=>'Pendiente de datos', +'LBL_REMAINDER_DAY'=>'días', +'LBL_REMAINDER_HRS'=>'hrs', +'Call'=>'Llamada', +'Meeting'=>'Reunión', + +//added to send dates and time in calendar notification/invitation mail. + +'Start date and time'=>'Día y hora de inicio', +'End date and time'=>'Día y hora de fin', +//this is for task +'End date'=>'Fecha de fin', +'LBL_SET_DATE'=>'Establecer fecha...', +'Recurrence'=>'Recurrencia', + +//added to send invitation mail Subject. +'INVITATION'=>' Invitación ', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_YEAR_BUTTON_TITLE'=>'Año [Alt+Y]', +'LBL_SELECT_CONTACT'=>'Seleccionar Contacto', +'SHARED_EVENT_DEL_MSG'=>'El Usuario no está autorizado para borrar este registro.', +//added to fix ticket#4525 +'LBL_CREATED'=>'creado', +'LBL_UPDATED'=>'actualizado', + +//Added after 5.0.4 GA +'LBL_BUSY' => 'Ocupado', + +//Custom Fields support for Calendar +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', + +// Repeat Event support for Calendar +'LBL_UNTIL' => 'Hasta', +'LBL_SET_DATE'=>'Establecer Fecha', + +'LBL_MINE' =>'Mios', +'LBL_SUCCESS_CALENDAR_1' => 'No. de Tareas Importadas Correctamente : ', +'LBL_SKIPPED_CALENDAR_1' => 'No. de Tareas No Importadas al faltar uno o más campos requeridos : ', +'LBL_SUCCESS_EVENTS_1' => 'No. de Eventos Importados Correctamente : ', +'LBL_SKIPPED_EVENTS_1' => 'No. de Eventos No Importados al faltar uno o más campos requeridos : ', +'LBL_FINISHED'=>'Terminado', +'LBL_UNDO_LAST_IMPORT'=>'Deshacer Ultima Importación', +'LBL_LAST_IMPORT'=>'Ultimos Importados', +'LBL_LAST_IMPORT_UNDONE'=>'Se ha deshecho la última importación', +'LBL_SUCCESS'=>'Correcto!', +'LBL_NO_IMPORT_TO_UNDO'=>'No hay importación para deshacer.', +'LBL_FAILURE'=>'Fracaso!', + +'LBL_ARE_YOU_SURE'=>'¿Estás seguro?', +'Calendar ID' => 'Id Calendario', +); + +?> diff --git a/modules/Calendar/language/fr_fr.lang.php b/modules/Calendar/language/fr_fr.lang.php new file mode 100644 index 0000000..eeb5477 --- /dev/null +++ b/modules/Calendar/language/fr_fr.lang.php @@ -0,0 +1,383 @@ + 'Agenda', + 'LBL_MODULE_TITLE' => 'Agenda : accueil', + 'LBL_MODULE_APPOINTMENT' => 'Agenda : rendez-vous', + 'LBL_MODULE_APPOINTMENT_DETAIL' => 'Agenda : détail rendez-vous', + 'LBL_SAVE' => 'Sauver', + 'LBL_RESET' => 'Annuler', + 'LBL_LIST_USER_NAME' => 'Nom utilisateur', + 'LBL_LIST_NAME' => 'Nom', + 'LBL_CALENDAR_SHARED' => 'Votre agenda est partagé avec', + 'LBL_CALENDAR_SHARING' => 'Partager votre agenda avec', + 'LBL_SHARING_OPTION' => 'Peut-on voir mon agenda ?', + 'LBL_LIST_TOOLS' => 'Outils', + 'LBL_SETTINGS' => 'Configuration', + 'LBL_CALSETTINGS' => 'Configurer votre agenda', + 'LBL_USE24' => 'Utiliser le format 24h', + 'LBL_CALSTART' => 'Mes journées débutent à', + 'LBL_TIMESETTINGS' => 'Configuration heure', + 'LBL_HOLDFOLLOWUP' => 'Suivi', + 'LBL_CALL' => 'Appel', + 'LBL_MEET' => 'Rendez-vous', + 'LBL_APPNT' => 'Rendez-vous', + 'LBL_NEW_APPNT' => 'Nouveau rendez-vous', + 'LBL_NEW_APPNT_INFO' => 'Nouveau rendez-vous', + 'LBL_VIEW_DAY_APPNT_INFO' => 'Afficher les rendez-vous(s) pour aujourd\'hui', + 'LBL_CHANGE_APPNT' => 'Afficher/modifier ce rendez-vous (%s - %s)', + 'LBL_DAY' => 'Jour', + 'LBL_DAY_BUTTON_KEY' => 'J', + 'LBL_DAY_BUTTON_TITLE' => 'Jour [Alt+D]', + 'LBL_DAY1' => 'Lundi', + 'LBL_DAY2' => 'Mardi', + 'LBL_DAY3' => 'Mercredi', + 'LBL_DAY4' => 'Jeudi', + 'LBL_DAY5' => 'Vendredi', + 'LBL_DAY6' => 'Samedi', + 'LBL_DAY0' => 'Dimanche', + 'LBL_SM_MON' => 'Lun', + 'LBL_SM_TUE' => 'Mar', + 'LBL_SM_WED' => 'Mer', + 'LBL_SM_THU' => 'Jeu', + 'LBL_SM_FRI' => 'Ven', + 'LBL_SM_SAT' => 'Sam', + 'LBL_SM_SUN' => 'Dim', + 'LBL_DATE_TITLE' => '%d %A', + 'LBL_WEEK' => 'Semaine', + 'LBL_WEEK_BUTTON_KEY' => 'S', + 'LBL_WEEK_BUTTON_TITLE' => 'Semaine [Alt+W]', + 'LBL_WEEKS' => 'Semaine(s)', + 'LBL_NEXT_WEEK' => 'semaine prochaine', + 'LBL_LAST_WEEK' => 'semaine dernière', + 'LBL_4WEEKS_BACK' => 'il y a 1 mois', + 'LBL_4WEEKS_PLUS' => 'dans 1 mois', + 'LBL_RELOAD' => 'Actualiser', + 'LBL_APPCREATED_BY' => 'Créé par', + 'LBL_AT_DATE_TIME' => 'à', + 'LBL_MON' => 'Mois', + 'LBL_MON_BUTTON_KEY' => 'M ', + 'LBL_MON_BUTTON_TITLE' => 'Année [Alt+Y]', + 'LBL_PREV_MON' => 'Mois précédent', + 'LBL_NEXT_MON' => 'Mois suivant', + 'LBL_YEAR_BUTTON_KEY' => 'Y ', + 'LBL_PREV_YEAR' => 'Année précédente', + 'LBL_NEXT_YEAR' => 'Année suivante', + 'LBL_APP_LOCATION' => 'Localisation', + 'LBL_APP_IGNORE_TIME' => 'ignorer les horaires ci-dessus', + 'LBL_SUBJECT' => 'Objet', + 'LBL_APP_DESCRIPTION' => 'Description ', + 'LBL_CONTACT' => 'Contact :', + 'LBL_APP_IGNORE_TIME2' => '(ex. le rendez-vous n\'aura lieu + à aucune heure spécifique)', + 'LBL_APP_ERR001' => 'Date invalide dans ce champ %s !', + 'LBL_APP_ERR002' => 'Fini avant de commencer!', + 'LBL_APP_ERR003' => 'Contact manquant !', + 'LBL_APP_ERR004' => 'Objet manquant !', + 'ERR_DELETE_RECORD' => 'Un enregistrement doit être sélectionné.', + 'DELETE_CONFIRMATION' => 'Etes-vous certain de vouloir supprimer ce rendez-vous ?', + 'AppLoc' => array( + '' => 'Bureau', + '1' => 'Déplacement', + '2' => 'Vacances', + '3' => 'Malade', + '4' => 'Reporté', + '5' => 'Option', + '6' => 'Privé', + ), + 'cal_month_long' => array( + '' => '', + '1' => 'Janvier', + '2' => 'Février', + '3' => 'Mars', + '4' => 'Avril', + '5' => 'Mai', + '6' => 'Juin', + '7' => 'Juillet', + '8' => 'Août', + '9' => 'Septembre', + '10' => 'Octobre', + '11' => 'Novembre', + '12' => 'Décembre', + ), + 'cal_weekdays_short' => array( + '' => 'Dim', + '1' => 'Lun', + '2' => 'Mar', + '3' => 'Mer', + '4' => 'Jeu', + '5' => 'Ven', + '6' => 'Sam', + ), + 'cal_weekdays_long' => array( + '' => 'Dimanche', + '1' => 'Lundi', + '2' => 'Mardi', + '3' => 'Mercredi', + '4' => 'Jeudi', + '5' => 'Vendredi', + '6' => 'Samedi', + ), + 'cal_month_short' => array( + '' => '', + '1' => 'Jan', + '2' => 'Fev', + '3' => 'Mar', + '4' => 'Avr', + '5' => 'Mai', + '6' => 'Jui', + '7' => 'Juil', + '8' => 'Aoû', + '9' => 'Sep', + '10' => 'Oct', + '11' => 'Nov', + '12' => 'Dec', + ), + 'LBL_TIME' => 'Heure', + 'LBL_START_TIME' => 'Heure de début', + 'LBL_END_TIME' => 'Heure de fin', + 'LBL_START_DATE' => 'Date de début', + 'LBL_TIME_START' => 'Heure de début', + 'LBL_DUE_DATE' => 'Echéance', + 'LBL_START_DATE_TIME' => 'Date et heure de début', + 'LBL_END_DATE_TIME' => 'Date et heure de fin', + 'LBL_TODO' => 'Tâche', + 'LBL_TODOS' => 'Tâches', + 'LBL_EVENTS' => 'Evènements', + 'LBL_TOTALEVENTS' => 'Total ês :', + 'LBL_TOTALTODOS' => 'Total tâches :', + 'LBL_VIEW' => 'Affichage', + 'LBL_LISTVIEW' => 'Liste', + 'LBL_HRVIEW' => 'Horaire', + 'LBL_WEEKVIEW' => 'Hebdomadaire', + 'LBL_MONTHVIEW' => 'Mensuelle', + 'LBL_YEARVIEW' => 'Annuelle', + 'LBL_STATUS' => 'Statut', + 'LBL_ACTION' => 'Actions ', + 'LBL_ADD' => 'Ajouter', + 'LBL_OPENCAL' => 'Ouvrir calendrier', + 'LBL_ADD_EVENT' => 'Ajouter activité', + 'LBL_ADDCALL' => 'Appel', + 'LBL_ADDMEETING' => 'Rendez-vous', + 'LBL_ADDTODO' => 'Tâche', + 'LBL_BEFOREEVENT' => 'avant le début de l\'activité', + 'LBL_BEFORETASK' => 'avant le début de la tâche', + 'LBL_EVENTDETAILS' => 'Détails', + 'LBL_CURSTATUS' => 'Statut actuel', + 'LBL_ASSINGEDTO' => 'Assigné à', + 'LBL_RELATEDTO' => 'Relatif à', + 'LBL_PENDING' => 'En attente', + 'LBL_PUBLIC' => 'Marquer public', + 'LBL_MORE' => 'Plus', + 'LBL_EDIT' => 'Editer', + 'LBL_EVERYDAY' => 'Chaque jour', + 'LBL_EVERYWEEK' => 'Chaque semaine', + 'LBL_EVERYMON' => 'Chaque mois', + 'LBL_MONTHS' => 'Mois', + 'LBL_YEAR' => 'Année', + 'LBL_NONE_SCHEDULED' => 'Aucun', + 'LBL_INVITE_INST1' => 'Pour inviter un collaborateur, veuillez le sélectionner dans la liste ci-dessous, puis cliquer sur le bouton Ajouter >>', + 'LBL_INVITE_SHARE' => 'Pour partager, sélectionnez un collaborateur de la liste et ajoutez le à votre liste de partage.', + 'LBL_INVITE_INST2' => 'Pour retirer un collaborateur, veuillez le sélectionner dans la liste ci-dessous, puis cliquer sur le bouton << Retirer', + 'LBL_SELUSR_INFO' => ' Les utilisateurs sélectionnés recevront un email.', + 'LBL_CALSHAREMESSAGE' => 'Partager mon agenda avec ', + 'LBL_CALSHARE' => 'Partage d\'agenda', + 'LBL_SEL_USERS' => 'Sélectionner collaborateur', + 'LBL_AVL_USERS' => 'Collaborateur disponible', + 'LBL_ADD_BUTTON' => 'Ajouter', + 'LBL_USERS' => 'Collaborateurs', + 'LBL_RMV_BUTTON' => 'Retirer', + 'LBL_SDRMD' => 'Envoyer rappel à', + 'LBL_ENABLE_REPEAT' => 'Activer planifications', + 'LBL_REPEAT_ONCE' => 'Répéter chaque', + 'LBL_ADD_TODO' => 'Nouvelle tâche', + 'LBL_TODONAME' => 'Tâche', + 'LBL_TODODATETIME' => 'Commence à', + 'db_last_name' => LBL_LIST_LAST_NAME, + 'db_first_name' => LBL_LIST_FIRST_NAME, + 'db_title' => LBL_LIST_TITLE, + 'db_email1' => LBL_LIST_EMAIL_ADDRESS, + 'db_email2' => LBL_LIST_EMAIL_ADDRESS, + 'LBL_COMPLETED' => 'Terminé', + 'LBL_DEFERRED' => 'Reporté', + 'LBL_HELD' => 'A eu lieu', + 'LBL_NOTHELD' => 'N\'a pas eu lieu', + 'LBL_POSTPONE' => 'Reporté', + 'LBL_CHANGEOWNER' => 'Changer d\'assignation', + 'LBL_DEL' => 'Supprimer', + 'LBL_SEARCH_FORM_TITLE' => 'Recherche', + 'LBL_LIST_FORM_TITLE' => 'Liste', + 'LBL_NEW_FORM_TITLE' => 'Nouvelle activité', + 'LBL_TASK_INFORMATION' => 'Information', + 'LBL_EVENT_INFORMATION' => 'Informations', + 'LBL_CALENDAR_INFORMATION' => 'Informations', + 'LBL_NAME' => 'Sujet :', + 'LBL_ACTIVITY_NOTIFICATION' => 'Ceci est une notification relative à une activité qui vous est assignée', + 'LBL_ACTIVITY_INVITATION' => 'Vous avez été invité à une activité ', + 'LBL_DETAILS_STRING' => 'Les détails sont', + 'LBL_REGARDS_STRING' => 'cordialement', + 'LBL_CONTACT_NAME' => 'Contact', + 'LBL_OPEN_ACTIVITIES' => 'Activités en cours', + 'LBL_ACTIVITY' => 'Activité :', + 'LBL_HISTORY' => 'Historique', + 'LBL_UPCOMING' => 'Mes activités en cours', + 'LBL_TODAY' => 'jusqu\'à ', + 'LBL_NEW_TASK_BUTTON_TITLE' => 'Nouvelle tâche [Alt+N]', + 'LBL_NEW_TASK_BUTTON_KEY' => 'N ', + 'LBL_NEW_TASK_BUTTON_LABEL' => 'Nouvelle tâche', + 'LBL_SCHEDULE_MEETING_BUTTON_TITLE' => 'Planifier rendez-vous [Alt+M]', + 'LBL_SCHEDULE_MEETING_BUTTON_KEY' => 'M ', + 'LBL_SCHEDULE_MEETING_BUTTON_LABEL' => 'Planifier rendez-vous', + 'LBL_SCHEDULE_CALL_BUTTON_TITLE' => 'Planifier appel [Alt+C]', + 'LBL_SCHEDULE_CALL_BUTTON_KEY' => 'C ', + 'LBL_SCHEDULE_CALL_BUTTON_LABEL' => 'Planifier appel', + 'LBL_NEW_NOTE_BUTTON_TITLE' => 'Nouvelle note [Alt+T]', + 'LBL_NEW_ATTACH_BUTTON_TITLE' => 'Fichiers joints [Alt+F]', + 'LBL_NEW_NOTE_BUTTON_KEY' => 'T ', + 'LBL_NEW_ATTACH_BUTTON_KEY' => 'F ', + 'LBL_NEW_NOTE_BUTTON_LABEL' => 'Nouvelle note', + 'LBL_NEW_ATTACH_BUTTON_LABEL' => 'Ajouter fichier', + 'LBL_TRACK_EMAIL_BUTTON_TITLE' => 'Suivi email [Alt+K]', + 'LBL_TRACK_EMAIL_BUTTON_KEY' => 'K ', + 'LBL_TRACK_EMAIL_BUTTON_LABEL' => 'Suivi email', + 'LBL_LIST_CLOSE' => 'Clôt', + 'LBL_LIST_STATUS' => 'Statut', + 'LBL_LIST_CONTACT' => 'Contact ', + 'LBL_LIST_ACCOUNT' => 'Compte', + 'LBL_LIST_RELATED_TO' => 'Relatif à', + 'LBL_LIST_DUE_DATE' => 'Echéance', + 'LBL_LIST_DATE' => 'Date ', + 'LBL_LIST_SUBJECT' => 'Sujet', + 'LBL_LIST_LAST_MODIFIED' => 'Dernière modification', + 'LBL_LIST_RECURRING_TYPE' => 'Type répétition', + 'NTC_NONE_SCHEDULED' => 'Aucun.', + 'LBL_ATTACHMENTS' => 'Pièces jointes', + 'LBL_NEW_ATTACHMENT' => 'Ajouter fichier', + 'LBL_ALL' => 'Tout', + 'LBL_MEETING' => 'Rendez-vous', + 'LBL_TASK' => 'Tâche', + 'Subject' => 'Sujet', + 'Assigned To' => 'Assigné à', + 'Start Date & Time' => 'Date & heure de début', + 'Time Start' => 'Heure', + 'Due Date' => 'Echéance', + 'Related To' => 'Relatif à', + 'Contact Name' => 'Contact', + 'Status' => 'Statut', + 'Priority' => 'Priorité', + 'Visibility' => 'Visibilité', + 'Send Notification' => 'Envoyer notification', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Activity Type' => 'Type', + 'Description' => 'Description ', + 'Duration' => 'Durée', + 'Duration Minutes' => 'Durée minutes', + 'Location' => 'Localisation', + 'No Time' => 'Sans heure', + 'Send Reminder' => 'Envoyer rappel', + 'LBL_YES' => 'Oui', + 'LBL_NO' => 'Non', + 'LBL_DAYS' => 'jour(s)', + 'LBL_MINUTES' => 'minutes ', + 'LBL_HOURS' => 'heures', + 'LBL_BEFORE_EVENT' => 'avant l\'activité', + 'Close' => 'Clôt', + 'Start Date' => 'Date de début', + 'Type' => 'Type ', + 'End Date' => 'Date de fin', + 'Recurrence' => 'Récurence', + 'Recurring Type' => 'Type planification', + 'LBL_NOTIFICATION_ERROR' => 'Erreur : veuillez vérifier la configuration de votre serveur mail sortant ou l\'adresse email de votre profil.', + 'LBL_GENERAL_INFORMATION' => 'Information', + 'LBL_EVENTTYPE' => 'Type', + 'LBL_EVENTNAME' => 'Sujet', + 'LBL_EVENTSTAT' => 'Commence à', + 'LBL_EVENTEDAT' => 'Fini à', + 'LBL_INVITE' => 'Inviter', + 'LBL_REPEAT' => 'Répétition', + 'LBL_REMINDER' => 'Rappel', + 'LBL_SENDREMINDER' => 'Envoyer rappel', + 'LBL_NOTIFICATION' => 'Notification ', + 'LBL_SENDNOTIFICATION' => 'Envoyer rappel', + 'LBL_RMD_ON' => 'Rappel ', + 'LBL_REPEATEVENT' => 'Répéter tous les', + 'LBL_TIMEDATE' => 'Heure & Date', + 'LBL_HR' => 'H', + 'LBL_MIN' => 'min ', + 'LBL_EVENT' => 'Activité', + 'Daily' => 'Jour(s)', + 'Weekly' => 'Semaine(s)', + 'Monthly' => 'Mois', + 'Yearly' => 'Année', + 'createdtime' => 'Créé le', + 'modifiedtime' => 'Modifié le', + 'first' => 'premier', + 'last' => 'dernier', + 'High' => 'Haute', + 'Medium' => 'Normale', + 'Low' => 'Basse', + 'LBL_SELECT' => 'Sélectionner', + 'LBL_ALL_EVENTS_TODOS' => 'Activités', + 'First' => 'Premier', + 'Last' => 'Dernier', + 'on' => 'le', + 'day of the month' => 'jour du mois', + 'Private' => 'Privé', + 'Public' => 'Public ', + 'Planned' => 'Planifié', + 'Held' => 'A eu lieu', + 'Not Held' => 'N\'a pas eu lieu', + 'Completed' => 'Terminé', + 'Deferred' => 'Reporté', + 'Not Started' => 'Non commencé', + 'In Progress' => 'En cours', + 'Pending Input' => 'En attente', + 'LBL_REMAINDER_DAY' => 'Jours', + 'LBL_REMAINDER_HRS' => 'heures', + 'Call' => 'Appels', + 'Meeting' => 'Rendez-vous', + 'Start date and time' => 'Date et heure de début', + 'End date and time' => 'Date et heure de fin', + 'End date' => 'Date de fin', + 'LBL_SET_DATE' => 'Définir la date...', + 'INVITATION' => ' Invitation', + 'LBL_YEAR_BUTTON_TITLE' => 'Année [Alt+Y]', + 'LBL_SELECT_CONTACT' => 'Selectionnez les contacts', + 'SHARED_EVENT_DEL_MSG' => 'L\'utilisateur n\'a pas les permissions pour éditer/supprimer l\'ê enregistré.', + 'LBL_CREATED' => 'crée', + 'LBL_UPDATED' => 'Mis à jour', + 'LBL_BUSY' => 'Occupé', + //Custom Fields support for Calendar + 'LBL_CUSTOM_INFORMATION'=>' Information personnalisée', + + // Repeat Event support for Calendar + 'LBL_UNTIL' => 'jusqu\'à', + 'LBL_SET_DATE'=>'définir date', + + 'LBL_MINE' =>'Les miens', + 'LBL_SUCCESS_CALENDAR_1' => 'Nb. de tâches importées avec succès : ', + 'LBL_SKIPPED_CALENDAR_1' => 'Nb. de tâches ignorées car contenant des champs obligatoires manquants : ', + 'LBL_SUCCESS_EVENTS_1' => 'Nb. d\'activités importées avec succès : ', + 'LBL_SKIPPED_EVENTS_1' => 'No. d\'activités ignorées car contenant des champs obligatoires manquants : ', + 'LBL_FINISHED'=>'Terminé', + 'LBL_UNDO_LAST_IMPORT'=>'Annuler le dernier import', + 'LBL_LAST_IMPORT'=>'Dernièrement importés', + 'LBL_LAST_IMPORT_UNDONE'=>'Le dernier import n\'a pas été réalisé', + 'LBL_SUCCESS'=>'Succès !', + 'LBL_NO_IMPORT_TO_UNDO'=>'Aucun import à annuler.', + 'LBL_FAILURE'=>'Erreur !', + + 'LBL_ARE_YOU_SURE'=>'Etes-vous sûr?', + 'Calendar ID' => 'Activité ID', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Calendar/language/hu_hu.lang.php b/modules/Calendar/language/hu_hu.lang.php new file mode 100644 index 0000000..dbe48d7 --- /dev/null +++ b/modules/Calendar/language/hu_hu.lang.php @@ -0,0 +1,337 @@ + 'Naptár', + 'LBL_MODULE_TITLE' => 'Naptár: Kezdőlap', + 'LBL_MODULE_APPOINTMENT' => 'Naptár: Időpont-egyeztetés', + 'LBL_MODULE_APPOINTMENT_DETAIL' => 'Naptár: Időpont-egyeztetés adatok', + 'LBL_SAVE' => 'Mentés', + 'LBL_RESET' => 'Visszavon', + 'LBL_LIST_USER_NAME' => 'Felhasználó neve', + 'LBL_LIST_NAME' => 'Név', + 'LBL_CALENDAR_SHARED' => 'Naptár, aktuálisan megosztva vele', + 'LBL_CALENDAR_SHARING' => 'Osztd meg a Naptárt vele', + 'LBL_SHARING_OPTION' => 'Láthatja a Naptáramat?', + 'LBL_LIST_TOOLS' => 'Eszközök', + 'LBL_SETTINGS' => 'Beállítások', + 'LBL_CALSETTINGS' => 'Naptár Beállítások', + 'LBL_USE24' => 'Használd a 24 órás formátumot', + 'LBL_CALSTART' => 'A Naptáram kezdő időpontja', + 'LBL_TIMESETTINGS' => 'Idő Beállítások', + 'LBL_HOLDFOLLOWUP' => 'Utánkövetés', + 'LBL_CALL' => 'Hívás', + 'LBL_MEET' => 'Megbeszélés', + 'LBL_APPNT' => 'Időpont-egyeztetés', + 'LBL_NEW_APPNT' => 'Új Időpont-egyeztetés', + 'LBL_NEW_APPNT_INFO' => 'Új Időpont-egyeztetés', + 'LBL_VIEW_DAY_APPNT_INFO' => 'Időpont-egyeztetés(ek) erre a napra', + 'LBL_CHANGE_APPNT' => 'Megnézi vagy változtatja ezt az Időpont-egyeztetést (%s - %s)', + 'LBL_DAY' => 'Nap', + 'LBL_DAY_BUTTON_KEY' => 'N', + 'LBL_DAY_BUTTON_TITLE' => 'Nap [Alt+N]', + 'LBL_DAY1' => 'Hétfő', + 'LBL_DAY2' => 'Kedd', + 'LBL_DAY3' => 'Szerda', + 'LBL_DAY4' => 'Csütörtök', + 'LBL_DAY5' => 'Péntek', + 'LBL_DAY6' => 'Szombat', + 'LBL_DAY0' => 'Vasárnap', + 'LBL_SM_MON' => 'H', + 'LBL_SM_TUE' => 'K', + 'LBL_SM_WED' => 'Sze', + 'LBL_SM_THU' => 'Cs', + 'LBL_SM_FRI' => 'P', + 'LBL_SM_SAT' => 'Szo', + 'LBL_SM_SUN' => 'V', + 'LBL_DATE_TITLE' => 'Nap %d, %A', + 'LBL_WEEK' => 'Hét', + 'LBL_WEEK_BUTTON_KEY' => 'H', + 'LBL_WEEK_BUTTON_TITLE' => 'Hét [Alt+H]', + 'LBL_WEEKS' => 'Hetek', + 'LBL_NEXT_WEEK' => 'Következő hét', + 'LBL_LAST_WEEK' => 'Utolsó hét', + 'LBL_4WEEKS_BACK' => '4 hét vissza', + 'LBL_4WEEKS_PLUS' => '4 hét előre', + 'LBL_RELOAD' => 'Újratölt', + 'LBL_APPCREATED_BY' => 'Létrehozta', + 'LBL_AT_DATE_TIME' => 'ekkor', + 'LBL_MON' => 'Hónap', + 'LBL_MON_BUTTON_KEY' => 'M', + 'LBL_MON_BUTTON_TITLE' => 'Hónap [Alt+M]', + 'LBL_PREV_MON' => 'Előző Hónap', + 'LBL_NEXT_MON' => 'Következő Hónap', + 'LBL_YEAR_BUTTON_KEY' => 'Y', + 'LBL_PREV_YEAR' => 'Előző Év', + 'LBL_NEXT_YEAR' => 'Következő Év', + 'LBL_APP_LOCATION' => 'Helyszín', + 'LBL_APP_IGNORE_TIME' => 'időt figyelmen kívül hagy', + 'LBL_SUBJECT' => 'Tárgy:', + 'LBL_APP_DESCRIPTION' => 'Megjegyzés', + 'LBL_CONTACT' => 'Kapcsolat:', + 'LBL_CONTACT_LIST' => 'Kapcsolat Lista:', + 'LBL_APP_IGNORE_TIME2' => '(pl. az egyeztetett találkozónak nincs
meghatározott időpontja a nap folyamán)', + 'LBL_APP_ERR001' => 'Érvénytelen Dátum a mezőben %s!', + 'LBL_APP_ERR002' => 'Kezdés a Befejezés után !', + 'LBL_APP_ERR003' => 'Hiányzó Kapcsolat !', + 'LBL_APP_ERR004' => 'Hiányzó Tárgy !', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a VTiger-fiók törléséhez', + 'DELETE_CONFIRMATION' => 'Biztos vagy abban, hogy törölni akarod az Egyeztetett Időpontot?', + 'AppLoc' => array('Iroda','Távol','Szabadságon','Betegség','Elhalasztva','Opció','Privát'), + 'cal_month_long' => array('','Január','Február','Március','Április','Május','Június','Július','Augusztus','Szeptember','Október','November','December'), + 'cal_weekdays_short' => array('H','K ','Sze ','Cs ','P ','Szo',' V'), + 'cal_weekdays_long' => array('Hétfő ','Kedd ','Szerda ','Csütörtök ','Péntek ','Szombat ','Vasárnap'), + 'cal_month_short' => array('','Jan','Feb','Már','Ápr','Máj','Jún','Júl','Aug','Szep','Okt','Nov','Dec'), + 'LBL_TIME' => 'Idő', + 'LBL_START_TIME' => 'Kezdés ideje', + 'LBL_END_TIME' => 'Befejezés ideje', + 'LBL_START_DATE' => 'Kezdés dátuma', + 'LBL_TIME_START' => 'Idő kezdés', + 'LBL_DUE_DATE' => 'Határidő', + 'LBL_START_DATE_TIME' => 'Kezdés dátuma és ideje', + 'LBL_END_DATE_TIME' => 'Befejezés dátuma és ideje', + 'LBL_TODO' => 'Teendő', + 'LBL_TODOS' => 'Teendők', + 'LBL_EVENTS' => 'Események', + 'LBL_TOTALEVENTS' => 'Az én Eseményeim :', + 'LBL_TOTALTODOS' => 'Az én Teendőim :', + 'LBL_VIEW' => 'Nézet', + 'LBL_LISTVIEW' => 'Lista nézet', + 'LBL_HRVIEW' => 'Órás nézet', + 'LBL_WEEKVIEW' => 'Heti naptár nézet', + 'LBL_MONTHVIEW' => 'Havi naptár nézet', + 'LBL_YEARVIEW' => 'Éves Cnaptár nézet', + 'LBL_STATUS' => 'Állapot', + 'LBL_ACTION' => 'Tevékenységek', + 'LBL_ADD' => 'Hozzáad', + 'LBL_OPENCAL' => 'Naptár megnyitása', + 'LBL_ADD_EVENT' => 'Eseményt hozzáad', + 'LBL_ADDCALL' => 'Hívás', + 'LBL_ADDMEETING' => 'Megbeszélés', + 'LBL_ADDTODO' => 'Teendő', + 'LBL_BEFOREEVENT' => 'mielőtt az esemény kezdődne', + 'LBL_BEFORETASK' => 'mielőtt az feladat kezdődne', + 'LBL_EVENTDETAILS' => 'Esemény adatai', + 'LBL_CURSTATUS' => 'Aktuális Állapot', + 'LBL_ASSINGEDTO' => 'Felelős', + 'LBL_RELATEDTO' => 'Kapcsolódik', + 'LBL_PENDING' => 'Függőben', + 'LBL_PUBLIC' => 'Nyilvánosnak jelöl', + 'LBL_MORE' => 'Több', + 'LBL_EDIT' => 'Szerkeszt', + 'LBL_EVERYDAY' => 'Minden Nap', + 'LBL_EVERYWEEK' => 'Minden Hét', + 'LBL_EVERYMON' => 'Minden Hónap', + 'LBL_MONTHS' => 'Hónapok', + 'LBL_YEAR' => 'Év', + 'LBL_NONE_SCHEDULED' => 'Nincs ütemezve', + 'LBL_INVITE_INST1' => 'A meghíváshoz válassz ki felhasználókat az Elérhető Felhasználók Listáról és kattints a Hozzáad gombra.', + 'LBL_INVITE_SHARE' => 'A megosztáshoz válassz ki felhasználókat az Elérhető Felhasználók Listáról és kattints a Hozzáad gombra.', + 'LBL_INVITE_INST2' => 'Az eltávolításhoz válassz ki felhasználókat a Kiválasztott Felhasználók Listáról és kattints az Eltávolítás gombra.', + 'LBL_SELUSR_INFO' => 'A kiválasztott Felhasználók egy emailt fognak kapni az Eseményről.', + 'LBL_CALSHAREMESSAGE' => 'A Naptáram megosztása a következő kiválasztott Felhasználókkal', + 'LBL_CALSHARE' => 'Naptár megosztás', + 'LBL_SEL_USERS' => 'Kiválasztott Felhasználók', + 'LBL_AVL_USERS' => 'Elérhető Felhasználók', + 'LBL_ADD_BUTTON' => 'Hozzáad', + 'LBL_USERS' => 'Felhasználók', + 'LBL_RMV_BUTTON' => 'Eltávolít', + 'LBL_SDRMD' => 'Emlékeztetőt küld neki', + 'LBL_ENABLE_REPEAT' => 'Ismétlődés engedélyezve', + 'LBL_REPEAT_ONCE' => 'Ismételd meg egyszer minden ', + 'LBL_ADD_TODO' => 'Új Teendő', + 'LBL_TODONAME' => 'Teendő', + 'LBL_TODODATETIME' => 'Idő és Dátum', + 'db_last_name' => 'LBL_LIST_LAST_NAME', + 'db_first_name' => 'LBL_LIST_FIRST_NAME', + 'db_title' => 'LBL_LIST_TITLE', + 'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', + 'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', + 'LBL_COMPLETED' => 'Jelöld Késznek', + 'LBL_DEFERRED' => 'Jelöld Visszautasítottnak', + 'LBL_HELD' => 'Jelöld Megtartottnak', + 'LBL_NOTHELD' => 'Jelöld Nem-Megtartottnak', + 'LBL_POSTPONE' => 'Jelöld Elhalasztottnak', + 'LBL_CHANGEOWNER' => 'Tulajdonos Módosítása', + 'LBL_DEL' => 'Töröl', + 'LBL_SEARCH_FORM_TITLE' => 'Aktivitás Keresés', + 'LBL_LIST_FORM_TITLE' => 'Aktivitás Lista', + 'LBL_NEW_FORM_TITLE' => 'Új Aktivitás', + 'LBL_TASK_INFORMATION' => 'Feladatok', + 'LBL_EVENT_INFORMATION' => 'Események', + 'LBL_CALENDAR_INFORMATION' => 'Naptár adatok', + 'LBL_NAME' => 'Tárgy:', + 'LBL_ACTIVITY_NOTIFICATION' => 'Ez egy értesítés egy aktivitásról, amit hozzád rendeltek, és ami', + 'LBL_ACTIVITY_INVITATION' => 'Meghívtak egy aktivitásra, ami ', + 'LBL_DETAILS_STRING' => 'A részletes adatok itt vannak', + 'LBL_REGARDS_STRING' => 'Köszönöm és üdvözlettel', + 'LBL_CONTACT_NAME' => 'Kapcsolat neve', + 'LBL_OPEN_ACTIVITIES' => 'Nyitott Aktivitások', + 'LBL_ACTIVITY' => 'Aktivitás:', + 'LBL_HISTORY' => 'Előzmény', + 'LBL_UPCOMING' => 'Az elkövetkező és függőben levő aktivitásaim', + 'LBL_TODAY' => 'ma ', + 'LBL_NEW_TASK_BUTTON_TITLE' => 'Új Feladatok [Alt+N]', + 'LBL_NEW_TASK_BUTTON_KEY' => 'N', + 'LBL_NEW_TASK_BUTTON_LABEL' => 'Új Feladatok', + 'LBL_SCHEDULE_MEETING_BUTTON_TITLE' => 'Megbeszélés ütemezése [Alt+M]', + 'LBL_SCHEDULE_MEETING_BUTTON_KEY' => 'M', + 'LBL_SCHEDULE_MEETING_BUTTON_LABEL' => 'Megbeszélés ütemezése', + 'LBL_SCHEDULE_CALL_BUTTON_TITLE' => 'Hívás ütemezése [Alt+C]', + 'LBL_SCHEDULE_CALL_BUTTON_KEY' => 'C', + 'LBL_SCHEDULE_CALL_BUTTON_LABEL' => 'Hívás ütemezése', + 'LBL_NEW_NOTE_BUTTON_TITLE' => 'Új Dokumentum [Alt+T]', + 'LBL_NEW_ATTACH_BUTTON_TITLE' => 'Fájlt csatol [Alt+F]', + 'LBL_NEW_NOTE_BUTTON_KEY' => 'T', + 'LBL_NEW_ATTACH_BUTTON_KEY' => 'F', + 'LBL_NEW_NOTE_BUTTON_LABEL' => 'Új Dokumentum', + 'LBL_NEW_ATTACH_BUTTON_LABEL' => 'Fájlt csatol', + 'LBL_TRACK_EMAIL_BUTTON_TITLE' => 'Emailt nyomkövet [Alt+K]', + 'LBL_TRACK_EMAIL_BUTTON_KEY' => 'K', + 'LBL_TRACK_EMAIL_BUTTON_LABEL' => 'Emailt nyomkövet', + 'LBL_LIST_CLOSE' => 'Lezár', + 'LBL_LIST_STATUS' => 'Állapot', + 'LBL_LIST_CONTACT' => 'Kapcsolat', + 'LBL_LIST_ACCOUNT' => 'Cég', + 'LBL_LIST_RELATED_TO' => 'Kapcsolódik', + 'LBL_LIST_DUE_DATE' => 'Határidő', + 'LBL_LIST_DATE' => 'Dátum', + 'LBL_LIST_SUBJECT' => 'Tárgy', + 'LBL_LIST_LAST_MODIFIED' => 'Utoljára Módosítva', + 'LBL_LIST_RECURRING_TYPE' => 'Ismétlődés típusa', + 'NTC_NONE_SCHEDULED' => 'Nincs ütemezve.', + 'LBL_ATTACHMENTS' => 'Mellékletek', + 'LBL_NEW_ATTACHMENT' => 'Új Melléklet', + 'LBL_ALL' => 'Minden', + 'LBL_MEETING' => 'Megbeszélés', + 'LBL_TASK' => 'Feladat', + 'Subject' => 'Tárgy', + 'Assigned To' => 'Felelős', + 'Start Date & Time' => 'Kezdés dátuma és ideje', + 'Time Start' => 'Kezdő idő', + 'Due Date' => 'Határidő', + 'Related To' => 'Kapcsolódik', + 'Contact Name' => 'Kapcsolat neve', + 'Status' => 'Állapot', + 'Priority' => 'Prioritás', + 'Visibility' => 'Láthatóság', + 'Send Notification' => 'Értesítést küld', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Activity Type' => 'Aktivitás típus', + 'Description' => 'Megjegyzés', + 'Duration' => 'Időtartam', + 'Duration Minutes' => 'Időtartam Percekben', + 'Location' => 'Helyszín', + 'No Time' => 'Nincs idő', + 'Send Reminder' => 'Emlékeztetőt küld', + 'LBL_YES' => 'Igen', + 'LBL_NO' => 'Nem', + 'LBL_DAYS' => 'napok', + 'LBL_MINUTES' => 'percek', + 'LBL_HOURS' => 'órák', + 'LBL_BEFORE_EVENT' => 'az esemény előtt', + 'Close' => 'Lezár', + 'Start Date' => 'Kezdés dátuma', + 'Type' => 'Típus', + 'End Date' => 'Befejezés dátuma', + 'Recurrence' => 'Ismétlődés', + 'Recurring Type' => 'Ismétlődés típusa', + 'LBL_NOTIFICATION_ERROR' => 'Levelezési Hiba : Kérjük, hogy ellenőrizd a Kimenő mail szerver beállításokat a Beállítások -> Kimenő mail szerver beállításoknál vagy az adott Felhasználó email azonosítója nincs beállítva', + 'LBL_GENERAL_INFORMATION' => 'Általános adatok', + 'LBL_EVENTTYPE' => 'Esemény típusa', + 'LBL_EVENTNAME' => 'Esemény neve', + 'LBL_EVENTSTAT' => 'Esemény kezdődik', + 'LBL_EVENTEDAT' => 'Esemény befejeződik', + 'LBL_INVITE' => 'Meghív', + 'LBL_REPEAT' => 'Ismétel', + 'LBL_REMINDER' => 'Emlékeztető', + 'LBL_SENDREMINDER' => 'Emlékeztetőt küld', + 'LBL_NOTIFICATION' => 'Értesítés', + 'LBL_SENDNOTIFICATION' => 'Értesítést küld', + 'LBL_RMD_ON' => 'Emlékeztessen', + 'LBL_REPEATEVENT' => 'Ismétlődjön egyszer minden', + 'LBL_TIMEDATE' => 'Idő és Dátum', + 'LBL_HR' => 'ó', + 'LBL_MIN' => 'p', + 'LBL_EVENT' => 'Esemény', + 'Daily' => 'Napok', + 'Weekly' => 'Hetek', + 'Monthly' => 'Hónapok', + 'Yearly' => 'Év', + 'createdtime' => 'Létrehozás ideje', + 'modifiedtime' => 'Módosítás ideje', + 'first' => 'Első', + 'last' => 'Utolsó', + 'High' => 'Magas', + 'Medium' => 'Közepes', + 'Low' => 'Alacsony', + 'LBL_SELECT' => 'Kiválaszt', + 'LBL_ALL_EVENTS_TODOS' => 'Minden Esemény és Teendő', + 'on' => 'on', + 'day of the month' => 'a honap napja', + 'Private' => 'Privát', + 'Public' => 'Nyilvános', + 'Planned' => 'Tervezett', + 'Held' => 'Megtartott', + 'Not Held' => 'Elmaradt', + 'Completed' => 'Kész', + 'Deferred' => 'Visszautasított', + 'Not Started' => 'Még nem elkezdett', + 'In Progress' => 'Folyamatban', + 'Pending Input' => 'Információra várva', + 'LBL_REMAINDER_DAY' => 'Napok', + 'LBL_REMAINDER_HRS' => 'órák', + 'Call' => 'Hívás', + 'Meeting' => 'Megbeszélés', + 'Start date and time' => 'Kezdés dátuma és ideje', + 'End date and time' => 'Befejezés dátuma és ideje', + 'LBL_SET_DATE' => 'Dátumot beállít', + 'INVITATION' => ' Meghívás ', + 'LBL_YEAR_BUTTON_TITLE' => 'Év [Alt+Y]', + 'LBL_SELECT_CONTACT' => 'Kapcsolat kiválasztása', + 'SHARED_EVENT_DEL_MSG' => 'A felhasználónak nincs joga Szerkeszteni/Törölni a megosztott Eseményeket.', + 'LBL_CREATED' => 'létrehozva', + 'LBL_UPDATED' => 'módosítva', + 'LBL_BUSY' => 'Foglalt', + 'LBL_CUSTOM_INFORMATION' => 'Egyedi adatok', + 'LBL_UNTIL' => 'eddig', + 'LBL_MINE' => 'Az én', + 'LBL_SUCCESS_CALENDAR_1' => 'db Feladatot sikeresen importáltunk : ', + 'LBL_SKIPPED_CALENDAR_1' => 'db Feladatot kihagytunk az importálásból, mivel egy vagy több kötelező mező üres volt : ', + 'LBL_SUCCESS_EVENTS_1' => 'db Eseményt sikeresen importáltunk : ', + 'LBL_SKIPPED_EVENTS_1' => 'db Eseményt kihagytunk az importálásból, mivel egy vagy több kötelező mező üres volt : ', + 'LBL_FINISHED' => 'Befejeződött', + 'LBL_UNDO_LAST_IMPORT' => 'A legutóbbi Importálás visszavonása', + 'LBL_LAST_IMPORT' => 'Legutóbb Importálva', + 'LBL_LAST_IMPORT_UNDONE' => 'A legutóbbi Importálást sikeresen visszavontuk', + 'LBL_SUCCESS' => 'Sikeres!', + 'LBL_NO_IMPORT_TO_UNDO' => 'Nem volt visszavonható Importálás.', + 'LBL_FAILURE' => 'Sikertelen!', + 'LBL_ARE_YOU_SURE' => 'Biztos vagy benne?', + 'Calendar ID' => 'Naptár AZ', + 'DELETE_TASK_ACT_CONFIRMATION' => 'Biztos, hogy törölni akarod?', + 'Start Time' => 'Kezdés ideje', + 'End Time' => 'Befejezés ideje', + 'LBL_EVTDTL' => 'Esemény', + 'LBL_ACTIVITY_STRING' => 'Aktivitás' +); +?> \ No newline at end of file diff --git a/modules/Calendar/language/nl_nl.lang.php b/modules/Calendar/language/nl_nl.lang.php new file mode 100644 index 0000000..bcc4bf1 --- /dev/null +++ b/modules/Calendar/language/nl_nl.lang.php @@ -0,0 +1,468 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.3 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Calendar/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Agenda', +'LBL_MODULE_TITLE'=>'Agenda: Home', +'LBL_MODULE_APPOINTMENT'=>'Agenda: Afspraak', +'LBL_MODULE_APPOINTMENT_DETAIL'=>'Agenda: Afspraak informatie', +'LBL_SAVE'=>'Bewaren', +'LBL_RESET'=>'Annuleer', +'LBL_LIST_USER_NAME'=>'Gebruikersnaam', +'LBL_LIST_NAME'=>'Naam', +'LBL_CALENDAR_SHARED'=>'Agenda gedeeld met', +'LBL_CALENDAR_SHARING'=>'Deel agenda met', +'LBL_SHARING_OPTION'=>'Kan ik mijn agenda zien?', +'LBL_LIST_TOOLS'=>'Gereedschap', +'LBL_SETTINGS'=>'Instellingen', +'LBL_CALSETTINGS'=>'Agenda instellingen', +'LBL_USE24'=>'Gebruik een 24 uur formaat', +'LBL_CALSTART'=>'Start mijn agenda om', +'LBL_TIMESETTINGS'=>'Tijdinstelling', +'LBL_HOLDFOLLOWUP'=>'Vasthouden opvolgen van', +'LBL_CALL' => 'Telefoongesprek', +'LBL_MEET' => 'Vergadering', +'LBL_APPNT' => 'Afspraak', +'LBL_NEW_APPNT' => 'Nieuwe afspraak', +'LBL_NEW_APPNT_INFO' => 'Maak nieuwe afspraak', +'LBL_VIEW_DAY_APPNT_INFO' => 'Alle afspraken voor vandaag', +'LBL_CHANGE_APPNT' => 'Deze afspraak bekijken of wijzigen (%s - %s)', + +'LBL_DAY' => 'Dag', +'LBL_DAY_BUTTON_KEY' => 'D', +'LBL_DAY_BUTTON_TITLE' => 'Dag [Alt+D]', +'LBL_DAY1' => 'maandag', +'LBL_DAY2' => 'dinsdag', +'LBL_DAY3' => 'woensdag', +'LBL_DAY4' => 'donderdag', +'LBL_DAY5' => 'vrijdag', +'LBL_DAY6' => 'zaterdag', +'LBL_DAY0' => 'zondag', + +'LBL_SM_MON' => 'maa', +'LBL_SM_TUE' => 'din', +'LBL_SM_WED' => 'woe', +'LBL_SM_THU' => 'don', +'LBL_SM_FRI' => 'vrij', +'LBL_SM_SAT' => 'zat', +'LBL_SM_SUN' => 'zon', + +'LBL_DATE_TITLE' => 'Dag %d, %A', + +'LBL_WEEK' => 'Week', +'LBL_WEEK_BUTTON_KEY' => 'W', +'LBL_WEEK_BUTTON_TITLE' => 'Week [Alt+W]', +'LBL_WEEKS' => 'Weken', +'LBL_NEXT_WEEK' => 'Volgende week', +'LBL_LAST_WEEK' => 'Verleden week', +'LBL_4WEEKS_BACK' => '4 Weken terug', +'LBL_4WEEKS_PLUS' => '4 Weken vooruit', +'LBL_RELOAD' => 'Vernieuwen', + + +'LBL_APPCREATED_BY' => 'Gemaakt door', +'LBL_AT_DATE_TIME' => 'Aan', + +'LBL_MON' => 'Maand', +'LBL_MON_BUTTON_KEY' => 'M', +'LBL_MON_BUTTON_TITLE' => 'Maand [Alt+M]', +'LBL_PREV_MON' => 'Vorige maand', +'LBL_NEXT_MON' => 'Volgende maand', + +'LBL_YEAR_BUTTON_KEY'=>'J', +'LBL_MON_BUTTON_TITLE'=>'Jaar [Alt+J]', +'LBL_PREV_YEAR'=>'Vorig jaar', +'LBL_NEXT_YEAR' => 'Volgend jaar', + +'LBL_APP_LOCATION' => 'Locatie', +'LBL_APP_IGNORE_TIME' => 'Negeer bovengenoemde tijden', +'LBL_SUBJECT'=>'Onderwerp:', +'LBL_APP_DESCRIPTION' => 'Omschrijving', + +'LBL_CONTACT'=>'Contact:', +'LBL_CONTACT_LIST'=>'Contactlijst:', + +'LBL_APP_IGNORE_TIME2' => '(i.e. de afspraak vindt plaats
op geen van deze dagen', + +'LBL_APP_ERR001' =>'Fout datum formaat %s!', +'LBL_APP_ERR002' =>'Begin na het einde !', +'LBL_APP_ERR003' =>'Geen contact ingevuld !', +'LBL_APP_ERR004' =>'Geen onderwerp ingevuld !', +'ERR_DELETE_RECORD'=>"Een veld moet gespecificeerd zijn om een afspraak te verwijderen.", +'DELETE_CONFIRMATION'=>"Weet u zeker dat u deze afspraak wilt verwijderen?", + +'AppLoc'=> Array('K' => 'Kantoor' + , '1' => 'Uit' + , '2' => 'Vakantie' + , '3' => 'Ziek' + , '4' => 'Uitgesteld' + , '5' => 'Optie' + , '6' => 'Prive'), + +'cal_month_long'=>array( +"", +"Januari", +"Februari", +"Maart", +"April", +"Mei", +"Juni", +"Juli", +"Augustus", +"September", +"Oktober", +"November", +"December", +), + +'cal_weekdays_short'=>array( +"zon", +"maa", +"din", +"woe", +"don", +"vrij", +"zat", +), +'cal_weekdays_long'=>array( +"zondag", +"maandag", +"dinsdag", +"woensdag", +"donderdag", +"vrijdag", +"zaterdag", +), +'cal_month_short'=>array( +"", +"Jan", +"Feb", +"Maa", +"Apr", +"Mei", +"Jun", +"Jul", +"Aug", +"Sep", +"Okt", +"Nov", +"Dec", +), + +'LBL_TIME'=>'Tijd', +'LBL_START_TIME' => 'Starttijd', +'LBL_END_TIME' => 'Eindtijd', +'LBL_START_DATE'=>'Startdatum', +'LBL_TIME_START'=>'Tijd van aanvang', +'LBL_DUE_DATE'=>'Verwacht op', +'LBL_START_DATE_TIME'=>'Startdatum & tijd', +'LBL_END_DATE_TIME'=>'Einddatum & tijd', +'LBL_TODO'=>'Actie', +'LBL_TODOS'=>'Acties', +'LBL_EVENTS'=>'Afspraken', +'LBL_TOTALEVENTS'=>'Al mijn Afspraken:', +'LBL_TOTALTODOS'=>'Al mijn Acties:', +'LBL_VIEW'=>'Bekijken', +'LBL_LISTVIEW'=>'Bekijk lijst', +'LBL_HRVIEW'=>'Bekijk uren', +'LBL_WEEKVIEW'=>'Bekijk wekelijkse kalender', +'LBL_MONTHVIEW'=>'Bekijk maandelijkse kalender', +'LBL_YEARVIEW'=>'Bekijk jaarlijkse kalender', +'LBL_STATUS'=>'Status', +'LBL_ACTION'=>'Acties', +'LBL_ADD'=>'Toevoegen', +'LBL_OPENCAL'=>'Kalender openmaken', + + +'LBL_ADD_EVENT'=>'Afspraken toevoegen', +'LBL_ADDCALL'=>'Telefoongesprek', +'LBL_ADDMEETING'=>'Vergadering', +'LBL_ADDTODO'=>'Actie', +'LBL_BEFOREEVENT'=>'Voordat de afspraak begint', +'LBL_BEFORETASK'=>'Voordat de taak begint', +'LBL_EVENTDETAILS'=>'Afspraak details', +'LBL_CURSTATUS'=>'Huidige status', +'LBL_ASSINGEDTO'=>'Toegewezen aan', +'LBL_RELATEDTO'=>'Gerelateerd aan', +'LBL_PENDING'=>'In afwachting van', +'LBL_PUBLIC'=>'Noteer publiek', +'LBL_MORE'=>'Meer', +'LBL_EDIT'=>'Bewerk', +'LBL_EVERYDAY'=>'Elke dag', +'LBL_EVERYWEEK'=>'Elke week', +'LBL_EVERYMON'=>'Elke maand', +'LBL_WEEKS'=>'Weken', +'LBL_MONTHS'=>'Maanden', +'LBL_YEAR'=>'Jaar', +'LBL_NONE_SCHEDULED'=>'Niet gepland', + +'LBL_INVITE_INST1'=>'Selecteer een gebruiker voor een uitnodiging.', +'LBL_INVITE_INST2'=>'Om te verwijderen selecteer een gebruiker.', +'LBL_SELUSR_INFO'=>' Geselecteerde gebruikers ontvangen een e-mail van de afspraak.', +'LBL_CALSHAREMESSAGE'=>'Deel mijn agenda met de geselecteerde gebruikers', +'LBL_CALSHARE'=>'Agenda delen', +'LBL_SEL_USERS'=>'Geselecteerde gebruikers', +'LBL_AVL_USERS'=>'Beschikbare gebruikers', +'LBL_ADD_BUTTON'=>'Toevoegen', +'LBL_USERS'=>'Gebruikers', +'LBL_RMV_BUTTON'=>'Verwijder', +'LBL_RMD_ON'=>'Herinner op', +'LBL_SDRMD'=>'Stuur herinnnering aan', +'LBL_ENABLE_REPEAT'=>'Herhaling aanzetten', +'LBL_REPEAT_ONCE'=>'Herhaal een keer per', +'LBL_ADD_TODO'=>'Toevoegen Actie', +'LBL_TODONAME'=>'Actie', +'LBL_TODODATETIME'=>'Start tijd en datum', + + + + + +//DON'T CONVERT THESE THEY ARE MAPPINGS - STARTS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//DON'T CONVERT THESE THEY ARE MAPPINGS -ENDS +'LBL_COMPLETED'=>'Markeer Afgerond', +'LBL_DEFERRED'=>'Uitgesteld', +'LBL_HELD'=>'Mark gehouden', +'LBL_NOTHELD'=>'Mark niet gehouden', +'LBL_POSTPONE'=>'Verplaatsen', +'LBL_CHANGEOWNER'=>'Wijzig eigenaar', +'LBL_DEL'=>'Delete', + +//Added for actvity merge with calendar +'LBL_SEARCH_FORM_TITLE'=>'Zoek activiteiten', +'LBL_LIST_FORM_TITLE'=>'Activiteitenlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuwe activiteiten', +'LBL_TASK_INFORMATION'=>'Taak informatie', +'LBL_EVENT_INFORMATION'=>'Afspraak informatie', +'LBL_CALENDAR_INFORMATION'=>'Kalender informatie', + +'LBL_NAME'=>'Onderwerp:', +'LBL_ACTIVITY_NOTIFICATION'=>'Dit is een notificatie dat een activiteit aan u is toegewezen dat is ', +'LBL_ACTIVITY_INVITATION'=>'U bent uitgenodigd voor een activiteit dat is ', +'LBL_DETAILS_STRING'=>'De details zijn', +'LBL_REGARDS_STRING'=>'Bedankt & Groeten', +'LBL_CONTACT_NAME'=>'Contactnaam', +'LBL_OPEN_ACTIVITIES'=>'Open activiteiten', +'LBL_ACTIVITY'=>'Activiteit:', +'LBL_HISTORY'=>'Geschiedenis', +'LBL_UPCOMING'=>"Mijn huidige en aankomende activiteiten", +'LBL_TODAY'=>'door ', + +'LBL_NEW_TASK_BUTTON_TITLE'=>'Nieuwe taak [Alt+N]', +'LBL_NEW_TASK_BUTTON_KEY'=>'N', +'LBL_NEW_TASK_BUTTON_LABEL'=>'Nieuwe taak', +'LBL_SCHEDULE_MEETING_BUTTON_TITLE'=>'Vergadering plannen [Alt+M]', +'LBL_SCHEDULE_MEETING_BUTTON_KEY'=>'M', +'LBL_SCHEDULE_MEETING_BUTTON_LABEL'=>'Vergadering plannen', +'LBL_SCHEDULE_CALL_BUTTON_TITLE'=>'Telefoongesprek plannen [Alt+C]', +'LBL_SCHEDULE_CALL_BUTTON_KEY'=>'C', +'LBL_SCHEDULE_CALL_BUTTON_LABEL'=>'Telefoongesprek plannen', +'LBL_NEW_NOTE_BUTTON_TITLE'=>'Nieuwe notitie [Alt+T]', +'LBL_NEW_ATTACH_BUTTON_TITLE'=>'Bestand toevoegen [Alt+F]', +'LBL_NEW_NOTE_BUTTON_KEY'=>'T', +'LBL_NEW_ATTACH_BUTTON_KEY'=>'F', +'LBL_NEW_NOTE_BUTTON_LABEL'=>'Nieuwe notitie', +'LBL_NEW_ATTACH_BUTTON_LABEL'=>'Bestand toevoegen', +'LBL_TRACK_EMAIL_BUTTON_TITLE'=>'E-mail zoeken [Alt+K]', +'LBL_TRACK_EMAIL_BUTTON_KEY'=>'K', +'LBL_TRACK_EMAIL_BUTTON_LABEL'=>'E-mail zoeken', + +'LBL_LIST_CLOSE'=>'Sluiten', +'LBL_LIST_STATUS'=>'Status', +'LBL_LIST_CONTACT'=>'Contact', +//Added for 4.2 release for Account column support as shown by Fredy +'LBL_LIST_ACCOUNT'=>'Account', +'LBL_LIST_RELATED_TO'=>'Gerelateerd aan', +'LBL_LIST_DUE_DATE'=>'Einddatum', +'LBL_LIST_DATE'=>'Datum', +'LBL_LIST_SUBJECT'=>'Onderwerp', +'LBL_LIST_LAST_MODIFIED'=>'Gewijzigd', +'LBL_LIST_RECURRING_TYPE'=>'Herhaaltype', + +'ERR_DELETE_RECORD'=>"Een veld moet gespecificeerd zijn om de vTiger_account te verwijderen.", +'NTC_NONE_SCHEDULED'=>'Niets gepland.', + +// Added vtiger_fields for Attachments in Activities/SubPanelView.php +'LBL_ATTACHMENTS'=>'Bijlage', +'LBL_NEW_ATTACHMENT'=>'Bijlage', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Alles', +'LBL_CALL'=>'Telefoongesprek', +'LBL_MEETING'=>'Vergadering', +'LBL_TASK'=>'Taken', + +//Added for 4GA Release +'Subject'=>'Onderwerp', +'Assigned To'=>'Toegewezen aan', +'Start Date & Time'=>'Startdatum & tijd', +'Time Start'=>'Starttijd', +'Due Date'=>'Einddatum', +'Related To'=>'Gerelateerd aan', +'Contact Name'=>'Contactnaam', +'Status'=>'Status', +'Priority'=>'Prioriteit', +'Visibility'=>'Zichtbaarheid', +'Send Notification'=>'Stuur notificatie', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', +'Activity Type'=>'Activiteit type', +'Description'=>'Omschrijving', +'Duration'=>'Duur', +'Duration Minutes'=>'Minuten', +'Location'=>'Locatie', +'No Time'=>'Geen tijd', +//Added for Send Reminder 4.2 release +'Send Reminder'=>'Stuur herinnering', +'LBL_YES'=>'Ja', +'LBL_NO'=>'Nee', +'LBL_DAYS'=>'Dagen(s)', +'LBL_MINUTES'=>'Minuten', +'LBL_HOURS'=>'Uren', +'LBL_BEFORE_EVENT'=>'Voor de afspraak', +//Added for CustomView 4.2 Release +'Close'=>'Sluiten', +'Start Date'=>'Startdatum', +'Type'=>'Type', +'End Date'=>'Einddatum', +'Recurrence'=> 'Herhaalde afspraken', +'Recurring Type'=> 'Herhaalype', +//Activities - Notification Error +'LBL_NOTIFICATION_ERROR'=>'E-mailserver Error : U heeft uw uitgaande e-mailserver nog niet geconfigureerd', +// Mike Crowe Mod --------------------------------------------------------added for generic search +'LBL_GENERAL_INFORMATION'=>'Algemene informatie', + +'LBL_EVENTTYPE'=>'Afspraak type', +'LBL_EVENTNAME'=>'Afspraak naam', +'LBL_EVENTSTAT'=>'Afspraak begint om', +'LBL_EVENTEDAT'=>'Afspraak eindigt op', +'LBL_INVITE'=>'Uitnodigen', +'LBL_REPEAT'=>'Herhalen', +'LBL_REMINDER'=>'Herinnering', +'LBL_ENABLE_REPEAT'=>'Herhalen', +'LBL_SENDREMINDER'=>'Stuur herinnering', +'LBL_NOTIFICATION'=>'Notificatie', +'LBL_SENDNOTIFICATION'=>'Stuur notificatie', +'LBL_RMD_ON'=>'Herinner', +'LBL_REPEATEVENT'=>'Herhaal om de', +'LBL_TIMEDATE'=>'Tijd & Datum', +'LBL_TODO'=>'Actie', +'LBL_HR'=>'uur', +'LBL_MIN'=>'min', +'LBL_EVENT'=>'Afspraak', +'Daily'=>'Dag (en)', +'Weekly'=>'Week(en)', +'Monthly'=>'Maand(en)', +'Yearly'=>'Jaar', +'createdtime'=>'Gemaakt', +'modifiedtime'=>'Gewijzigd', +'first'=>'Eerst', +'last'=>'Laatst', +'High'=>'Hoog', +'Medium'=>'Medium', +'Low'=>'Laag', +'LBL_SELECT'=>'Selecteer', +'LBL_SELECT_CONTACT'=>'Selecteer contact', +'LBL_ALL_EVENTS_TODOS'=>'Alle Afspraken en Acties', +'First'=>'Eerste', +'Last'=>'Laaste', +'on'=>'op', +'day of the month'=>'Dag van de maand', +'Private'=>'Prive', +'Public'=>'Publiek', + +//Added for existing Picklist entries + +'Planned'=>'Gepland', +'Held'=>'Gehouden', +'Not Held'=>'Niet gehouden', +'Completed'=>'Gereed', +'Deferred'=>'Uitgesteld', +'Not Started'=>'Niet gestart', +'In Progress'=>'Bezig', +'Pending Input'=>'Wacht op informatie', +'LBL_REMAINDER_DAY'=>'Dagen', +'LBL_REMAINDER_HRS'=>'Uren', +'Call'=>'Bel', +'Meeting'=>'Vergadering', + +//added to send dates and time in calendar notification/invitation mail. + +'Start date and time'=>'Begindatum & tijd', +'End date and time'=>'Einddatum & tijd', +//this is for task +'End date'=>'Einddatum', +'LBL_SET_DATE'=>'Datum instellen', +'Recurrence'=>'Herhaling', + +//added to send invitation mail Subject. +'INVITATION'=>' Uitnodiging', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_YEAR_BUTTON_TITLE'=>'Jaar [Alt+Y]', +'LBL_SELECT_CONTACT'=>'Selecteer Contactpersonen', +'SHARED_EVENT_DEL_MSG'=>'De gebruiker heeft geen toestemming om gedeelde activiteiten te wijzigen/ verwijderen.', +//added to fix ticket#4525 +'LBL_CREATED'=>'aangemaakt', +'LBL_UPDATED'=>'bijgewerkt', + +//Added after 5.0.4 GA +'LBL_BUSY' => 'Bezet', + +//Custom Fields support for Calendar +'LBL_CUSTOM_INFORMATION'=>'Extra Informatie', + +// Repeat Event support for Calendar +'LBL_UNTIL' => 'Tot', +'LBL_SET_DATE'=>'prik datum', + +'LBL_MINE' =>'Mijn', +'LBL_SUCCESS_CALENDAR_1' => 'Aantal succesvol geimporteerde Taken : ', +'LBL_SKIPPED_CALENDAR_1' => 'Aantal Taken overgeslagen vanwege het missen van een of meer verplichte velden : ', +'LBL_SUCCESS_EVENTS_1' => 'Aantal succesvol geimporteerde Afspraken : ', +'LBL_SKIPPED_EVENTS_1' => 'Aantal Afspraken overgeslagen vanwege het missen van een of meer verplichte velden : ', +'LBL_FINISHED'=>'Beeindigd', +'LBL_UNDO_LAST_IMPORT'=>'Laatste import ongedaan maken', +'LBL_LAST_IMPORT'=>'Laatst geimporteerd', +'LBL_LAST_IMPORT_UNDONE'=>'Uw laatste import is ongedaan gemaakt', +'LBL_SUCCESS'=>'Succes!', +'LBL_NO_IMPORT_TO_UNDO'=>'Er Is Geen Import Om Ongedaan Te Maken.', +'LBL_FAILURE'=>'Fout!', +); + +?> diff --git a/modules/Calendar/language/pt_br.lang.php b/modules/Calendar/language/pt_br.lang.php new file mode 100644 index 0000000..2b6c906 --- /dev/null +++ b/modules/Calendar/language/pt_br.lang.php @@ -0,0 +1,455 @@ +'Agenda', +'LBL_MODULE_TITLE'=>'Agenda: Principal', +'LBL_MODULE_APPOINTMENT'=>'Agenda: Compromisso', +'LBL_MODULE_APPOINTMENT_DETAIL'=>'Agenda: Detalhe Compromisso', +'LBL_SAVE'=>'Salvar', +'LBL_RESET'=>'Cancelar', +'LBL_LIST_USER_NAME'=>'Nome Usuário', +'LBL_LIST_NAME'=>'Nome', +'LBL_CALENDAR_SHARED'=>'Agenda atualmente compartilhada com', +'LBL_CALENDAR_SHARING'=>'Compartilhar Agenda com', +'LBL_SHARING_OPTION'=>'Pode ver minha Agenda?', +'LBL_LIST_TOOLS'=>'Ferramentas', +'LBL_SETTINGS'=>'Configurações', +'LBL_CALSETTINGS'=>'Configurações Agenda', +'LBL_USE24'=>'Usar formato 24 horas', +'LBL_CALSTART'=>'Iniciar horário da minha Agenda em', +'LBL_TIMESETTINGS'=>'Configurações Data', +'LBL_HOLDFOLLOWUP'=>'Realizar acompanhamento sobre', +'LBL_CALL' => 'Chamada', +'LBL_MEET' => 'Reunião', +'LBL_APPNT' => 'Compromisso', +'LBL_NEW_APPNT' => 'Novo Compromisso', +'LBL_NEW_APPNT_INFO' => 'Criar um novo Compromisso', +'LBL_VIEW_DAY_APPNT_INFO' => 'Visualizar Compromisso(s) para este dia', +'LBL_CHANGE_APPNT' => 'visualizar ou mudar este Compromisso (%s - %s)', + +'LBL_DAY' => 'Dia', +'LBL_DAY_BUTTON_KEY' => 'D', +'LBL_DAY_BUTTON_TITLE' => 'Dia [Alt+D]', +'LBL_DAY1' => 'Segunda', +'LBL_DAY2' => 'Terça', +'LBL_DAY3' => 'Quarta', +'LBL_DAY4' => 'Quinta', +'LBL_DAY5' => 'Sexta', +'LBL_DAY6' => 'Sábado', +'LBL_DAY0' => 'Domingo', + +'LBL_SM_MON' => 'Seg', +'LBL_SM_TUE' => 'Ter', +'LBL_SM_WED' => 'Qua', +'LBL_SM_THU' => 'Qui', +'LBL_SM_FRI' => 'Sex', +'LBL_SM_SAT' => 'Sab', +'LBL_SM_SUN' => 'Dom', + +'LBL_DATE_TITLE' => 'Dia %d, %A', + +'LBL_WEEK' => 'Semana', +'LBL_WEEK_BUTTON_KEY' => 'W', +'LBL_WEEK_BUTTON_TITLE' => 'Semana [Alt+W]', +'LBL_WEEKS' => 'Semanas', +'LBL_NEXT_WEEK' => 'próxima semana', +'LBL_LAST_WEEK' => 'última semana', +'LBL_4WEEKS_BACK' => 'Últimas 4 semanas', +'LBL_4WEEKS_PLUS' => 'Próximas 4 semanas', +'LBL_RELOAD' => 'Atualizar', + + +'LBL_APPCREATED_BY' => 'Criado por', +'LBL_AT_DATE_TIME' => 'em', + +'LBL_MON' => 'Mês', +'LBL_MON_BUTTON_KEY' => 'M', +'LBL_MON_BUTTON_TITLE' => 'Ano [Alt+Y]', +'LBL_PREV_MON' => 'Mês Anterior', +'LBL_NEXT_MON' => 'Próximo Mês', + +'LBL_YEAR_BUTTON_KEY'=>'A', +'LBL_PREV_YEAR'=>'Ano Anterior', +'LBL_NEXT_YEAR' => 'Próximo Ano', + +'LBL_APP_LOCATION' => 'Local', +'LBL_APP_IGNORE_TIME' => 'ignorar hora acima', +'LBL_SUBJECT'=>'Assunto:', +'LBL_APP_DESCRIPTION' => 'Descrição', +'LBL_CONTACT'=>'Contato:', +'LBL_CONTACT_LIST'=>'Lista Contato:', + +'LBL_APP_IGNORE_TIME2' => '(i.e. o Compromisso ocorre
em nenhuma hora particular neste(s) dia(s) )', + +'LBL_APP_ERR001' =>'Data inválida no campo %s!', +'LBL_APP_ERR002' =>'iniciar após o final!', +'LBL_APP_ERR003' =>'Sem Contato!', +'LBL_APP_ERR004' =>'Sem Assunto!', +'ERR_DELETE_RECORD'=>"Defina um registro para apagar o Compromisso.", +'DELETE_CONFIRMATION'=>"Você tem certeza que deseja apagar este Compromisso?", + +'AppLoc'=> Array('0' => 'Escritório' + , '1' => 'Ausente' + , '2' => 'Férias' + , '3' => 'Doente' + , '4' => 'Adiado' + , '5' => 'Opção' + , '6' => 'Particular'), + +'cal_month_long'=>array( +"", +"Janeiro", +"Fevereiro", +"Março", +"Abril", +"Maio", +"Junho", +"Julho", +"Agosto", +"Setembro", +"Outubro", +"Novembro", +"Dezembro", +), + +'cal_weekdays_short'=>array( +"Seg", +"Ter", +"Qua", +"Qui", +"Sex", +"Sab", +"Dom", +), +'cal_weekdays_long'=>array( +"Segunda", +"Terça", +"Quarta", +"Quinta", +"Sexta", +"Sábado", +"Domingo", +), +'cal_month_short'=>array( +"", +"Jan", +"Fev", +"Mar", +"Abr", +"Mai", +"Jun", +"Jul", +"Ago", +"Set", +"Out", +"Nov", +"Dez", +), + +'LBL_TIME'=>'Hora', +'LBL_START_TIME' => 'Hora Inicial', +'LBL_END_TIME' => 'Hora Final', +'LBL_START_DATE'=>'Data Inicial', +'LBL_TIME_START'=>'Hora Inicial', +'LBL_DUE_DATE'=>'Data Vencimento', +'LBL_START_DATE_TIME'=>'Data & Hora Inicial', +'LBL_END_DATE_TIME'=>'Data & Hora Final', +'LBL_TODO'=>'Compromisso', +'LBL_TODOS'=>'Compromissos', +'LBL_EVENTS'=>'Eventos', +'LBL_TOTALEVENTS'=>'Total Eventos :', +'LBL_TOTALTODOS'=>'Total Compromissos:', +'LBL_VIEW'=>'Ver', +'LBL_LISTVIEW'=>'Lista', +'LBL_HRVIEW'=>'Hora', +'LBL_WEEKVIEW'=>'Agenda Semanal', +'LBL_MONTHVIEW'=>'Agenda Mensal', +'LBL_YEARVIEW'=>'Agenda Anual', +'LBL_STATUS'=>'Status', +'LBL_ACTION'=>'Ações', +'LBL_ADD'=>'Adicionar', +'LBL_OPENCAL'=>'Abrir Agenda', + + +'LBL_ADD_EVENT'=>'Evento', +'LBL_ADDCALL'=>'Chamada', +'LBL_ADDMEETING'=>'Reunião', +'LBL_ADDTODO'=>'Compromisso', +'LBL_BEFOREEVENT'=>'antes do início do evento', +'LBL_BEFORETASK'=>'antes do início da tarefa', +'LBL_EVENTDETAILS'=>'Detalhes do Evento', +'LBL_CURSTATUS'=>'Status Atual', +'LBL_ASSINGEDTO'=>'Responsável', +'LBL_RELATEDTO'=>'Relacionado', +'LBL_PENDING'=>'Pendente', +'LBL_PUBLIC'=>'Público', +'LBL_MORE'=>'Mais', +'LBL_EDIT'=>'Editar', +'LBL_EVERYDAY'=>'Todo Dia', +'LBL_EVERYWEEK'=>'Toda Semana', +'LBL_EVERYMON'=>'Todo Mês', +'LBL_WEEKS'=>'Semana(s)', +'LBL_MONTHS'=>'Mês(es)', +'LBL_YEAR'=>'Ano', +'LBL_NONE_SCHEDULED'=>'Nada Agendado', + +'LBL_INVITE_INST1'=>'Para convidar, selecione os usuários na lista "Usuários Disponíveis" e clique no botão "Adicionar".', +'LBL_INVITE_SHARE'=>'Para compartilhar, selecione os usuários na lista "Usuários Disponíveis" e clique no botão "Adicionar".', +'LBL_INVITE_INST2'=>'Para remover, selecione os usuários na lista "Usuários Selecionados" e click no botão "Remover".', +'LBL_SELUSR_INFO'=>' Os usuários selecionados receberão um email sobre o Evento.', +'LBL_CALSHAREMESSAGE'=>'Compartilhar minha Agenda com os Usuários abaixo selecionados.', +'LBL_CALSHARE'=>'Compartilhar Agenda', +'LBL_SEL_USERS'=>'Usuários Selecionados', +'LBL_AVL_USERS'=>'Usuários Disponíveis', +'LBL_ADD_BUTTON'=>'Adicionar', +'LBL_USERS'=>'Usuários', +'LBL_RMV_BUTTON'=>'Remover', +'LBL_SDRMD'=>'Enviar Lembrete para', +'LBL_ENABLE_REPEAT'=>'Habilitar Repetir', +'LBL_REPEAT_ONCE'=>'Repetir uma vez em todos', +'LBL_ADD_TODO'=>'Criar Compromisso', +'LBL_TODONAME'=>'Compromisso', +'LBL_TODODATETIME'=>'Data & Hora', + + + + + +//DON'T CONVERT THESE THEY ARE MAPPINGS - STARTS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//DON'T CONVERT THESE THEY ARE MAPPINGS -ENDS +'LBL_COMPLETED'=>'Concluído', +'LBL_DEFERRED'=>'Adiado', +'LBL_HELD'=>'Confirmar', +'LBL_NOTHELD'=>'Não Confirmado', +'LBL_POSTPONE'=>'Adiar', +'LBL_CHANGEOWNER'=>'Mudar Proprietário', +'LBL_DEL'=>'Apagar', + +//Added for actvity merge with calendar +'LBL_SEARCH_FORM_TITLE'=>'Pesquisar Atividade', +'LBL_LIST_FORM_TITLE'=>'Listar Atividade', +'LBL_NEW_FORM_TITLE'=>'Nova Atividade', +'LBL_TASK_INFORMATION'=>'Informação Tarefa', +'LBL_EVENT_INFORMATION'=>'Informação Evento', +'LBL_CALENDAR_INFORMATION'=>'Informação Agenda', + +'LBL_NAME'=>'Assunto:', +'LBL_ACTIVITY_NOTIFICATION'=>'Esta notificação tem por objetivo informá-lo que uma Atividade foi atribuída à você. ', +'LBL_ACTIVITY_INVITATION'=>'Você foi convidado para uma atividade ', +'LBL_DETAILS_STRING'=>'Observe abaixo os detalhes:', +'LBL_REGARDS_STRING'=>'Respeitosamente', +'LBL_CONTACT_NAME'=>'Nome Contato', +'LBL_OPEN_ACTIVITIES'=>'Atividades Abertas', +'LBL_ACTIVITY'=>'Atividade:', +'LBL_HISTORY'=>'Histórico', +'LBL_UPCOMING'=>"Atividades Próximas e Pendentes", +'LBL_TODAY'=>'através', + +'LBL_NEW_TASK_BUTTON_TITLE'=>'Nova Tarefa [Alt+N]', +'LBL_NEW_TASK_BUTTON_KEY'=>'N', +'LBL_NEW_TASK_BUTTON_LABEL'=>'Nova Tarefa', +'LBL_SCHEDULE_MEETING_BUTTON_TITLE'=>'Agendar Reunião [Alt+M] ', +'LBL_SCHEDULE_MEETING_BUTTON_KEY'=>'M', +'LBL_SCHEDULE_MEETING_BUTTON_LABEL'=>'Agendar Reunião', +'LBL_SCHEDULE_CALL_BUTTON_TITLE'=>'Agendar Chamada [Alt+C] ', +'LBL_SCHEDULE_CALL_BUTTON_KEY'=>'C', +'LBL_SCHEDULE_CALL_BUTTON_LABEL'=>'Agendar Chamada', +'LBL_NEW_NOTE_BUTTON_TITLE'=>'Novo Documento [Alt+T] ', +'LBL_NEW_ATTACH_BUTTON_TITLE'=>'Anexar Arquivo [Alt+F]', +'LBL_NEW_NOTE_BUTTON_KEY'=>'T', +'LBL_NEW_ATTACH_BUTTON_KEY'=>'F', +'LBL_NEW_NOTE_BUTTON_LABEL'=>'Novo Documento', +'LBL_NEW_ATTACH_BUTTON_LABEL'=>'Anexar Arquivo', +'LBL_TRACK_EMAIL_BUTTON_TITLE'=>'Rastrear Email [Alt+K]', +'LBL_TRACK_EMAIL_BUTTON_KEY'=>'K', +'LBL_TRACK_EMAIL_BUTTON_LABEL'=>'Rastrear Email', + +'LBL_LIST_CLOSE'=>'Fechar', +'LBL_LIST_STATUS'=>'Status', +'LBL_LIST_CONTACT'=>'Contato', +//Added for 4.2 release for Account column support as shown by Fredy +'LBL_LIST_ACCOUNT'=>'Organização', +'LBL_LIST_RELATED_TO'=>'Relacionar com', +'LBL_LIST_DUE_DATE'=>'Data Vencimento', +'LBL_LIST_DATE'=>'Data', +'LBL_LIST_SUBJECT'=>'Assunto', +'LBL_LIST_LAST_MODIFIED'=>'Última Modificação', +'LBL_LIST_RECURRING_TYPE'=>'Tipo Recorrência', + +'ERR_DELETE_RECORD'=>"Um registro deve ser especificado para apagar vtiger_account.", +'NTC_NONE_SCHEDULED'=>'Nada agendado.', + +// Added vtiger_fields for Attachments in Activities/SubPanelView.php +'LBL_ATTACHMENTS'=>'Anexos', +'LBL_NEW_ATTACHMENT'=>'Novo Anexo', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todos', +'LBL_CALL'=>'Chamada', +'LBL_MEETING'=>'Reunião', +'LBL_TASK'=>'Tarefa', + +//Added for 4GA Release +'Subject'=>'Assunto', +'Assigned To'=>'Responsável', +'Start Date & Time'=>'Data & Hora Início', +'Time Start'=>'Hora Início', +'Due Date'=>'Data Vencimento', +'Related To'=>'Relacionado', +'Contact Name'=>'Nome Contato', +'Status'=>'Status', +'Priority'=>'Prioridade', +'Visibility'=>'Visibilidade', +'Send Notification'=>'Enviar Notificação', +'Created Time'=>'Hora Criação', +'Modified Time'=>'Hora Modificação', +'Activity Type'=>'Tipo Atividade', +'Description'=>'Descrição', +'Duration'=>'Duração', +'Duration Minutes'=>'Duração em Minutos', +'Location'=>'Local', +'No Time'=>'Sem Hora', +//Added for Send Reminder 4.2 release +'Send Reminder'=>'Enviar Lembrete', +'LBL_YES'=>'Sim', +'LBL_NO'=>'Não', +'LBL_DAYS'=>'dia(s)', +'LBL_MINUTES'=>'minutos', +'LBL_HOURS'=>'horas', +'LBL_BEFORE_EVENT'=>'antes do evento', +//Added for CustomView 4.2 Release +'Close'=>'Fechar', +'Start Date'=>'Data Início', +'Type'=>'Tipo', +'End Date'=>'Data Final', +'Recurrence'=>'Eventos Recorrentes', +'Recurring Type'=>'Tipo Recorrência', +//Activities - Notification Error +'LBL_NOTIFICATION_ERROR'=>'Mensagem Erro: Por favor checar a configuração do seu Servidor de Mensagem em Configurações->Configuração Servidor Mensagem OU ID de mensagem para o atual usuário não está Configurado.', +// Mike Crowe Mod --------------------------------------------------------added for generic search +'LBL_GENERAL_INFORMATION'=>'Informação Geral', + +'LBL_EVENTTYPE'=>'Tipo Evento', +'LBL_EVENTNAME'=>'Nome Evento', +'LBL_EVENTSTAT'=>'Início Evento em', +'LBL_EVENTEDAT'=>'Fim Evento em', +'LBL_INVITE'=>'Convite', +'LBL_REPEAT'=>'Repetir', +'LBL_REMINDER'=>'Lembrete', +'LBL_SENDREMINDER'=>'Enviar Lembrete', +'LBL_NOTIFICATION'=>'Notificação', +'LBL_SENDNOTIFICATION'=>'Enviar Notificação', +'LBL_RMD_ON'=>'Lembrar em', +'LBL_REPEATEVENT'=>'Repetir Evento', +'LBL_TIMEDATE'=>'Data & Hora', +'LBL_HR'=>'h', +'LBL_MIN'=>'min', +'LBL_EVENT'=>'Evento', +'Daily'=>'Dia(s)', +'Weekly'=>'Semana(s)', +'Monthly'=>'Mês(es)', +'Yearly'=>'Ano', +'createdtime'=>'Hora Criação', +'modifiedtime'=>'Hora Modificação', +'first'=>'Primeiro', +'last'=>'Último', +'High'=>'Alta', +'Medium'=>'Média', +'Low'=>'Baixa', +'LBL_SELECT'=>'Selecionar', +'LBL_ALL_EVENTS_TODOS'=>'Todos Eventos & Compromissos', +'First'=>'Primeiro', +'Last'=>'Último', +'on'=>'sobre', +'day of the month'=>'dia do mês', +'Private'=>'Privado', +'Public'=>'Público', + +//Added for existing Picklist entries + +'Planned'=>'Planejado', +'Held'=>'Confirmado', +'Not Held'=>'Não Confirmado', +'Completed'=>'Concluído', +'Deferred'=>'Adiado', +'Not Started'=>'Não Iniciado', +'In Progress'=>'Em Andamento', +'Pending Input'=>'Pendente', +'LBL_REMAINDER_DAY'=>'dias', +'LBL_REMAINDER_HRS'=>'h', +'Call'=>'Chamada', +'Meeting'=>'Reunião', + +//added to send dates and time in calendar notification/invitation mail. + +'Start date and time'=>'Data e Hora Inicial', +'End date and time'=>'Data e Hora Final', +//this is for task +'End date'=>'Data final', +'LBL_SET_DATE'=>'Definição data...', +'Recurrence'=>'Recorrente', + +//added to send invitation mail Subject. +'INVITATION'=>' Convite ', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_YEAR_BUTTON_TITLE'=>'Ano [Alt+Y]', +'LBL_SELECT_CONTACT'=>'Selecionar Contatos', +'SHARED_EVENT_DEL_MSG'=>'O Usuário não tem permissão para Editar/Apagar Evento Compartilhado.', +//added to fix ticket#4525 +'LBL_CREATED'=>'criado', +'LBL_UPDATED'=>'atualizado', + +//Added after 5.0.4 GA +'LBL_BUSY' => 'Ocupado', + +//Custom Fields support for Calendar +'LBL_CUSTOM_INFORMATION'=>'Informação Customizada', + +// Repeat Event support for Calendar +'LBL_UNTIL' => 'Até', +'LBL_SET_DATE'=>'Configurar Data', + +'LBL_MINE' =>'Meu', +'LBL_SUCCESS_CALENDAR_1' => 'No. de Tarefas Importadas com Sucesso : ', +'LBL_SKIPPED_CALENDAR_1' => 'No. de Tarefas Omitidas em função de um ou mais campos requeridos ausentes : ', +'LBL_SUCCESS_EVENTS_1' => 'No. de Eventos Importados com Sucesso : ', +'LBL_SKIPPED_EVENTS_1' => 'No. de Eventos Ignorados em função de um ou mais campos requeridos ausentes : ', +'LBL_FINISHED'=>'Concluído', +'LBL_UNDO_LAST_IMPORT'=>'Desfazer Última Importação', +'LBL_LAST_IMPORT'=>'Último Importado', +'LBL_LAST_IMPORT_UNDONE'=>'Sua Última Importação Foi Desfeita', +'LBL_SUCCESS'=>'Sucesso!', +'LBL_NO_IMPORT_TO_UNDO'=>'Não existe nenhuma importação para desfazer.', +'LBL_FAILURE'=>'Falhou!', + +'LBL_ARE_YOU_SURE'=>'Tem certeza?', +'Calendar ID' => 'ID Agenda', +); + +?> diff --git a/modules/Calendar/language/zh_cn.lang.php b/modules/Calendar/language/zh_cn.lang.php new file mode 100644 index 0000000..c2194df --- /dev/null +++ b/modules/Calendar/language/zh_cn.lang.php @@ -0,0 +1,453 @@ +'日程安排', +'LBL_MODULE_TITLE'=>'日程安排: 首页', +'LBL_MODULE_APPOINTMENT'=>'日程安排:预约', +'LBL_MODULE_APPOINTMENT_DETAIL'=>'日程安排:预约明细', +'LBL_SAVE'=>'保存', +'LBL_RESET'=>'取消', +'LBL_LIST_USER_NAME'=>'用户名', +'LBL_LIST_NAME'=>'名称', +'LBL_CALENDAR_SHARED'=>'目前与别人共享的日程', +'LBL_CALENDAR_SHARING'=>'共享日程', +'LBL_SHARING_OPTION'=>'查看我的日程?', +'LBL_LIST_TOOLS'=>'工具', +'LBL_SETTINGS'=>'设定', +'LBL_CALSETTINGS'=>'日程设定', +'LBL_USE24'=>'使用24小时制', +'LBL_CALSTART'=>'日程开始时间', +'LBL_TIMESETTINGS'=>'时间设定', +'LBL_HOLDFOLLOWUP'=>'保持跟进', +'LBL_CALL'=>'电话', +'LBL_MEET'=>'会议', +'LBL_APPNT'=>'行程', +'LBL_NEW_APPNT'=>'新增行程', +'LBL_NEW_APPNT_INFO'=>'建立新的行程', +'LBL_VIEW_DAY_APPNT_INFO'=>'浏览今天的行程', +'LBL_CHANGE_APPNT'=>'查看或修改这个行程 (%s - %s)', + +'LBL_DAY'=>'日', +'LBL_DAY_BUTTON_KEY'=>'D', +'LBL_DAY_BUTTON_TITLE'=>'日[Alt+D]', +'LBL_DAY1'=>'星期一', +'LBL_DAY2'=>'星期二', +'LBL_DAY3'=>'星期三', +'LBL_DAY4'=>'星期四', +'LBL_DAY5'=>'星期五', +'LBL_DAY6'=>'星期六', +'LBL_DAY0'=>'星期日', + +'LBL_SM_MON'=>'一', +'LBL_SM_TUE'=>'二', +'LBL_SM_WED'=>'三', +'LBL_SM_THU'=>'四', +'LBL_SM_FRI'=>'五', +'LBL_SM_SAT'=>'六', +'LBL_SM_SUN'=>'日', + +'LBL_DATE_TITLE'=>'Day%d,%A', + +'LBL_WEEK'=>'周', +'LBL_WEEK_BUTTON_KEY'=>'W', +'LBL_WEEK_BUTTON_TITLE'=>'周[Alt+W]', +'LBL_WEEKS'=>'周', +'LBL_NEXT_WEEK'=>'下周', +'LBL_LAST_WEEK'=>'上周', +'LBL_4WEEKS_BACK'=>'四周前', +'LBL_4WEEKS_PLUS'=>'四周后', +'LBL_RELOAD'=>'重新加载', + + +'LBL_APPCREATED_BY'=>'创建者:', +'LBL_AT_DATE_TIME'=>'在', + +'LBL_MON'=>'月', +'LBL_MON_BUTTON_KEY'=>'M', +'LBL_MON_BUTTON_TITLE'=>'月[Alt+M]', +'LBL_PREV_MON'=>'上个月', +'LBL_NEXT_MON'=>'下个月', + +'LBL_YEAR_BUTTON_KEY'=>'Y', +'LBL_PREV_YEAR'=>'去年', +'LBL_NEXT_YEAR'=>'明年', + +'LBL_APP_LOCATION'=>'地点', +'LBL_APP_IGNORE_TIME'=>'忽略上述时间', +'LBL_SUBJECT'=>'主题:', +'LBL_APP_DESCRIPTION'=>'描述', +'LBL_CONTACT'=>'联系方式:', +'LBL_CONTACT_LIST'=>'联系人列表:', + +'LBL_APP_IGNORE_TIME2'=>'(注:这个行程在该期间没有特定的时间)', + +'LBL_APP_ERR001'=>'字段 %s 数据类型错误!', +'LBL_APP_ERR002'=>'开始日期在结束日期之后!', +'LBL_APP_ERR003'=>'漏填联系人 !', +'LBL_APP_ERR004'=>'漏填标题 !', +'ERR_DELETE_RECORD'=>'在删除行程前必须输入正确的记录编号.', +'DELETE_CONFIRMATION'=>'您确定要删除这次的行程?', + +'AppLoc'=> Array('0'=>'办公室' + , '1'=>'外出' + , '2'=>'休假' + , '3'=>'病假' + , '4'=>'延期' + , '5' => '任意' + , '6'=>'私人'), + +'cal_month_long'=>array( +"", +"一月", +"二月", +"三月", +"四月", +"五月", +"六月", +"七月", +"八月", +"九月", +"十月", +"十一月", +"十二月", +), + +'cal_weekdays_short'=>array( +"日", +"一", +"二", +"三", +"四", +"五", +"六", +), +'cal_weekdays_long'=>array( +"星期日", +"星期一", +"星期二", +"星期三", +"星期四", +"星期五", +"星期六", +), +'cal_month_short'=>array( +"", +"一月", +"二月", +"三月", +"四月", +"五月", +"六月", +"七月", +"八月", +"九月", +"十月", +"十一月", +"十二月", +), + +'LBL_TIME'=>'时间', +'LBL_START_TIME'=>'开始时间', +'LBL_END_TIME'=>'结束时间', +'LBL_START_DATE'=>'开始日期', +'LBL_TIME_START'=>'时间开始', +'LBL_DUE_DATE'=>'结束日期', +'LBL_START_DATE_TIME'=>'开始时间', +'LBL_END_DATE_TIME'=>'结束时间', +'LBL_TODO'=>'任务', +'LBL_TODOS'=>'待办任务', +'LBL_EVENTS'=>'事件', +'LBL_TOTALEVENTS'=>'我的全部事件:', +'LBL_TOTALTODOS'=>'我的待办任务:', +'LBL_VIEW'=>'查看', +'LBL_LISTVIEW'=>'列表视图', +'LBL_HRVIEW'=>'日历视图', +'LBL_WEEKVIEW'=>'周历视图', +'LBL_MONTHVIEW'=>'月历视图', +'LBL_YEARVIEW'=>'年历视图', +'LBL_STATUS'=>'状态', +'LBL_ACTION'=>'操作', +'LBL_ADD'=>'添加', +'LBL_OPENCAL'=>'打开日历', + + +'LBL_ADD_EVENT'=>'添加事件', +'LBL_ADDCALL'=>'电话', +'LBL_ADDMEETING'=>'会议', +'LBL_ADDTODO'=>'待办', +'LBL_BEFOREEVENT'=>'在事件开始之前', +'LBL_BEFORETASK'=>'在任务开始之前', +'LBL_EVENTDETAILS'=>'事件细节', +'LBL_CURSTATUS'=>'当前状态', +'LBL_ASSINGEDTO'=>'负责人', +'LBL_RELATEDTO'=>'关联于', +'LBL_PENDING'=>'即将发生', +'LBL_PUBLIC'=>'标记为公开', +'LBL_MORE'=>'更多', +'LBL_EDIT'=>'编辑', +'LBL_EVERYDAY'=>'每天', +'LBL_EVERYWEEK'=>'每周', +'LBL_EVERYMON'=>'每月', +'LBL_WEEKS'=>'周', +'LBL_MONTHS'=>'月', +'LBL_YEAR'=>'年', +'LBL_NONE_SCHEDULED'=>'没有任何行程', + +'LBL_INVITE_INST1'=>'邀请的方式可以从可选择用户列表中选择并点击添加按钮', +'LBL_INVITE_SHARE'=>'共享的方式可以从可选择用户列表中选择并点击添加按钮.', +'LBL_INVITE_INST2'=>'移除的方式可以从已选择用户列表中选择并点击移除按钮', +'LBL_SELUSR_INFO'=>'选择的用户会收到一封事件的通知的Email。', + 'LBL_CALSHAREMESSAGE'=>'与以下已选用户共享我的日程', +'LBL_CALSHARE'=>'共享日程', +'LBL_SEL_USERS'=>'已选择用户', +'LBL_AVL_USERS'=>'可选择用户', +'LBL_ADD_BUTTON'=>'添加', +'LBL_USERS'=>'用户', +'LBL_RMV_BUTTON'=>'移除', +'LBL_SDRMD'=>'发送邮件通知', +'LBL_ENABLE_REPEAT'=>'启用重复', +'LBL_REPEAT_ONCE'=>'重复频率', +'LBL_ADD_TODO'=>'新增待办任务', +'LBL_TODONAME'=>'待办任务', +'LBL_TODODATETIME'=>'开始时间', + + + + + +//DON'T CONVERT THESE THEY ARE MAPPINGS - STARTS +'db_last_name'=>'LBL_LIST_LAST_NAME', +'db_first_name'=>'LBL_LIST_FIRST_NAME', +'db_title'=>'LBL_LIST_TITLE', +'db_email1'=>'LBL_LIST_EMAIL_ADDRESS', +'db_email2'=>'LBL_LIST_EMAIL_ADDRESS', +//DON'T CONVERT THESE THEY ARE MAPPINGS -ENDS +'LBL_COMPLETED'=>'标记为完成', +'LBL_DEFERRED'=>'标记为延期', +'LBL_HELD'=>'标记为已执行', +'LBL_NOTHELD'=>'标记为未执行', +'LBL_POSTPONE'=>'推迟', +'LBL_CHANGEOWNER'=>'更改负责人', +'LBL_DEL'=>'删除', + +//Added for actvity merge with calendar +'LBL_SEARCH_FORM_TITLE'=>'搜索待办事项', +'LBL_LIST_FORM_TITLE'=>'待办事项列表', +'LBL_NEW_FORM_TITLE'=>'新增待办事项', +'LBL_TASK_INFORMATION'=>'任务信息', +'LBL_EVENT_INFORMATION'=>'事件信息', +'LBL_CALENDAR_INFORMATION'=>'日历信息', + +'LBL_NAME'=>'主题:', +'LBL_ACTIVITY_NOTIFICATION'=>'这是通知,活动分配给你', +'LBL_ACTIVITY_INVITATION'=>'你被邀请参与一个活动', +'LBL_DETAILS_STRING'=>'细节是', +'LBL_REGARDS_STRING'=>'感谢和问候', +'LBL_CONTACT_NAME'=>'联系人', +'LBL_OPEN_ACTIVITIES'=>'进行中事项', +'LBL_ACTIVITY'=>'活动:', +'LBL_HISTORY'=>'历史', +'LBL_UPCOMING'=>'即将到来与等待中待办事项', +'LBL_TODAY'=>'到', + +'LBL_NEW_TASK_BUTTON_TITLE'=>'新增任务[Alt+N]', +'LBL_NEW_TASK_BUTTON_KEY'=>'N', +'LBL_NEW_TASK_BUTTON_LABEL'=>'新增任务', +'LBL_SCHEDULE_MEETING_BUTTON_TITLE'=>'安排会议[Alt+M]', +'LBL_SCHEDULE_MEETING_BUTTON_KEY'=>'M', +'LBL_SCHEDULE_MEETING_BUTTON_LABEL'=>'安排会议', +'LBL_SCHEDULE_CALL_BUTTON_TITLE'=>'安排电话[Alt+C]', +'LBL_SCHEDULE_CALL_BUTTON_KEY'=>'C', +'LBL_SCHEDULE_CALL_BUTTON_LABEL'=>'安排电话', +'LBL_NEW_NOTE_BUTTON_TITLE'=>'新增备忘录 [Alt+T]', +'LBL_NEW_ATTACH_BUTTON_TITLE'=>'附加文件 [Alt+F]', +'LBL_NEW_NOTE_BUTTON_KEY'=>'T', +'LBL_NEW_ATTACH_BUTTON_KEY'=>'F', +'LBL_NEW_NOTE_BUTTON_LABEL'=>'新增备忘录', +'LBL_NEW_ATTACH_BUTTON_LABEL'=>'附加文件', +'LBL_TRACK_EMAIL_BUTTON_TITLE'=>'追踪邮件[Alt+K]', +'LBL_TRACK_EMAIL_BUTTON_KEY'=>'K', +'LBL_TRACK_EMAIL_BUTTON_LABEL'=>'追踪邮件', + +'LBL_LIST_CLOSE'=>'关闭', +'LBL_LIST_STATUS'=>'状态', +'LBL_LIST_CONTACT'=>'联系人', +//Added for 4.2 release for Account column support as shown by Fredy +'LBL_LIST_ACCOUNT'=>'客户', +'LBL_LIST_RELATED_TO'=>'关联于', +'LBL_LIST_DUE_DATE'=>'结束日期', +'LBL_LIST_DATE'=>'日期', +'LBL_LIST_SUBJECT'=>'主题', +'LBL_LIST_LAST_MODIFIED'=>'最后更新', +'LBL_LIST_RECURRING_TYPE'=>'重复类型', + +'ERR_DELETE_RECORD'=>"一个记录编号必须被指定删除vtiger_account.", +'NTC_NONE_SCHEDULED'=>'没有安排.', + +// Added vtiger_fields for Attachments in Activities/SubPanelView.php +'LBL_ATTACHMENTS'=>'附件', +'LBL_NEW_ATTACHMENT'=>'新增附件', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'全部', +'LBL_CALL'=>'电话', +'LBL_MEETING'=>'会议', +'LBL_TASK'=>'任务', + +//Added for 4GA Release +'Subject'=>'主题', +'Assigned To'=>'负责人', +'Start Date & Time'=>'开始时间', +'Time Start'=>'开始时间', +'Due Date'=>'结束日期', +'Related To'=>'关联于', +'Contact Name'=>'联系人姓名', +'Status'=>'状态', +'Priority'=>'优先级', +'Visibility'=>'可见性', +'Send Notification'=>'发送邮件通知', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', +'Activity Type'=>'活动类型', +'Description'=>'描述', +'Duration'=>'持续', +'Duration Minutes'=>'持续分钟', +'Location'=>'地点', +'No Time'=>'没有时间', +//Added for Send Reminder 4.2 release +'Send Reminder'=>'发送邮件通知', +'LBL_YES'=>'是', +'LBL_NO'=>'否', +'LBL_DAYS'=>'日', +'LBL_MINUTES'=>'分', +'LBL_HOURS'=>'时', +'LBL_BEFORE_EVENT'=>'在事件开始之前', +//Added for CustomView 4.2 Release +'Close'=>'关闭', +'Start Date'=>'开始日期', +'Type'=>'类型', +'End Date'=>'结束日期', +'Recurrence'=>'重复事件', +'Recurring Type'=>'重复类型', +//Activities - Notification Error +'LBL_NOTIFICATION_ERROR'=>'邮件错误:请检查您的发送邮件服务器设置,在设置 > 发送邮件服务器设置或是目前用户的邮件设置', +// Mike Crowe Mod --------------------------------------------------------added for generic search +'LBL_GENERAL_INFORMATION'=>'一般信息', + +'LBL_EVENTTYPE'=>'事件类型', +'LBL_EVENTNAME'=>'事件名称', +'LBL_EVENTSTAT'=>'开始时间', +'LBL_EVENTEDAT'=>'结束时间', +'LBL_INVITE'=>'邀请', +'LBL_REPEAT'=>'重复', +'LBL_REMINDER'=>'提醒', +'LBL_SENDREMINDER'=>'发送邮件通知', +'LBL_NOTIFICATION'=>'提醒', +'LBL_SENDNOTIFICATION'=>'发送邮件通知', +'LBL_RMD_ON'=>'提醒', +'LBL_REPEATEVENT'=>'每个都重复一次', +'LBL_TIMEDATE'=>'开始时间', +'LBL_HR'=>'时', +'LBL_MIN'=>'分', +'LBL_EVENT'=>'事件', +'Daily'=>'天', +'Weekly'=>'周', +'Monthly'=>'月', +'Yearly'=>'年', +'createdtime'=>'创建时间', +'modifiedtime'=>'修改时间', +'first'=>'第一个', +'last'=>'最后一个', +'High'=>'高', +'Medium'=>'中', +'Low'=>'低', +'LBL_SELECT'=>'选择', +'LBL_ALL_EVENTS_TODOS'=>'所有事件和待办任务', + 'First'=>'第一个', +'Last'=>'最后一个', +'on'=>'在', +'day of the month'=>'日', +'Private'=>'私有', +'Public'=>'公开', + +//Added for existing Picklist entries + +'Planned'=>'计划中', +'Held'=>'已执行', +'Not Held'=>'未执行', +'Completed'=>'已完成', +'Deferred'=>'延期', +'Not Started'=>'未开始', +'In Progress'=>'处理中', +'Pending Input'=>'待定', +'LBL_REMAINDER_DAY'=>'天', +'LBL_REMAINDER_HRS'=>'小时', +'Call'=>'电话', +'Meeting'=>'会议', + +//added to send dates and time in calendar notification/invitation mail. + +'Start date and time'=>'开始时间', +'End date and time'=>'结束时间', +//this is for task +'End date'=>'结束日期', +'LBL_SET_DATE'=>'设置日期..', +'Recurrence'=>'重复', + +//added to send invitation mail Subject. +'INVITATION'=>'邀请', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_YEAR_BUTTON_TITLE'=>'Year[Alt+Y]', +'LBL_SELECT_CONTACT'=>'选择联系人', +'SHARED_EVENT_DEL_MSG'=>'用户没有权限编辑/删除这个纪录.', +//added to fix ticket#4525 +'LBL_CREATED'=>'新建', +'LBL_UPDATED'=>'更新', + +//Added after 5.0.4 GA +'LBL_BUSY'=>'忙碌', + +//Custom Fields support for Calendar +'LBL_CUSTOM_INFORMATION'=>'自定义信息', + +// Repeat Event support for Calendar +'LBL_UNTIL'=>'至', +'LBL_SET_DATE'=>'设置日期', + +'LBL_MINE'=>'我的', +'LBL_SUCCESS_CALENDAR_1'=>'成功导入任务数 : ', +'LBL_SKIPPED_CALENDAR_1'=>'忽略的任务数(一个字段或者多个字段丢失): ', +'LBL_SUCCESS_EVENTS_1'=>'成功导入事件数 : ', +'LBL_SKIPPED_EVENTS_1'=>'忽略的事件数(一个字段或者多个字段丢失): ', +'LBL_FINISHED'=>'完成', +'LBL_UNDO_LAST_IMPORT'=>'重做最后一次导入', +'LBL_LAST_IMPORT'=>'最后导入', +'LBL_LAST_IMPORT_UNDONE'=>'你的最后一次导入被重做', +'LBL_SUCCESS'=>'成功!', +'LBL_NO_IMPORT_TO_UNDO'=>'没有可重做的导入。', +'LBL_FAILURE'=>'完成!', +); + +?> diff --git a/modules/Calendar/new_calendar.php b/modules/Calendar/new_calendar.php new file mode 100644 index 0000000..23561ff --- /dev/null +++ b/modules/Calendar/new_calendar.php @@ -0,0 +1,87 @@ +activity_view == "This Year"){ + $mysel = 'year'; + }else if($current_user->activity_view == "This Month"){ + $mysel = 'month'; + }else if($current_user->activity_view == "This Week"){ + $mysel = 'week'; + }else{ + $mysel = 'day'; + } +} +/* fix given by dartagnanlaf END --integrated by Minnie */ +$date_data = array(); +if (isset($_REQUEST['day']) && is_numeric(vtlib_purify($_REQUEST['day']))) { + $date_data['day'] = vtlib_purify($_REQUEST['day']); +} +if (isset($_REQUEST['month']) && is_numeric(vtlib_purify($_REQUEST['month']))) { + $date_data['month'] = vtlib_purify($_REQUEST['month']); +} +if (isset($_REQUEST['week']) && is_numeric(vtlib_purify($_REQUEST['week']))) { + $date_data['week'] = vtlib_purify($_REQUEST['week']); +} +if (isset($_REQUEST['year']) && is_numeric(vtlib_purify($_REQUEST['year']))) { + if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970) { + print("".$app_strings['LBL_CAL_LIMIT_MSG'].""); + exit; + } + $date_data['year'] = vtlib_purify($_REQUEST['year']); +} + + +if(empty($date_data)) { + $dateTimeField = new DateTimeField(''); + $dateValue = $dateTimeField->getDisplayDate(); + $timeValue = $dateTimeField->getDisplayTime(); + $dbDateValue = DateTimeField::convertToDBFormat($dateValue); + $dateValueArray = explode('-', $dbDateValue); + $timeValueArray = explode(':', $timeValue); + $date_data = Array( + 'day'=>$dateValueArray[2], + 'month'=>$dateValueArray[1], + 'year'=>$dateValueArray[0], + 'hour'=>$timeValueArray[0], + 'min'=>$timeValueArray[1], + ); +} + +$calendar_arr['calendar'] = new Calendar($mysel,$date_data); +if($current_user->hour_format != '') + $calendar_arr['calendar']->hour_format=$current_user->hour_format; +if ($viewBox == 'hourview' && ($mysel == 'day' || $mysel == 'week' || $mysel == 'month' || $mysel == 'year')) +{ + $calendar_arr['calendar']->add_Activities($current_user); +} +$calendar_arr['view'] = $mysel; +calendar_layout($calendar_arr,$viewBox,$subtab); +?> \ No newline at end of file diff --git a/modules/Calendar/script.js b/modules/Calendar/script.js new file mode 100644 index 0000000..ec45889 --- /dev/null +++ b/modules/Calendar/script.js @@ -0,0 +1,1382 @@ +/********************************************************************************* + +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +function DisableSharing() +{ + + x = document.SharedList.selected_id.length; + idstring = ""; + xx = 0; + if ( x == undefined) + { + + if (document.SharedList.selected_id.checked) + { + document.SharedList.idlist.value=document.SharedList.selected_id.value; + } + else + { + alert(alert_arr.SELECT_ATLEAST_ONE_USER); + return false; + } + } + else + { + for(i = 0; i < x ; i++) + { + if(document.SharedList.selected_id[i].checked) + { + idstring = document.SharedList.selected_id[i].value +";"+idstring + xx++ + } + } + if (xx != 0) + { + document.SharedList.idlist.value=idstring; + } + else + { + alert(alert_arr.SELECT_ATLEAST_ONE_USER); + return false; + } + } + if(confirm(alert_arr.DISABLE_SHARING_CONFIRMATION+xx+alert_arr.USERS)) + { + document.SharedList.action="index.php?module=Calendar&action=disable_sharing&return_module=Calendar&return_action=calendar_share"; + } + else + { + return false; + } +} + + + +function showhide(argg) +{ + var x=document.getElementById(argg).style; + if (x.display=="none") + { + x.display="block" + + } + else { + x.display="none" + } +} + + +function showhideRepeat(argg1,argg2) +{ + var x=document.getElementById(argg2).style; + var y=document.getElementById(argg1).checked; + + if (y) + { + x.display="block"; + } + else { + x.display="none"; + } + +} + + + +function gshow(argg1,type,startdate,enddate,starthr,startmin,startfmt,endhr,endmin,endfmt,viewOption,subtab) +{ + smin = parseInt(startmin,10); + smin = smin - (smin%5); + var y=document.getElementById(argg1).style; + + if(type != 'todo' && type!='') + { + for(var i=0;;i++){ + if( document.EditView.activitytype[i].value == type){ + document.EditView.activitytype[i].selected='yes'; + triggerOnChangeHandler(('activitytype')); + break; + } + } + + smin = _2digit(smin); + document.EditView.date_start.value = startdate; + document.EditView.starthr.value = starthr; + document.EditView.startmin.value = smin; + document.EditView.startfmt.value = startfmt; + document.EditView.viewOption.value = viewOption; + document.EditView.subtab.value = subtab; + calDuedatetime(type); + } + if(type == 'todo') + { + smin = _2digit(smin); + document.createTodo.task_date_start.value = startdate; + document.createTodo.task_due_date.value = enddate; + document.createTodo.starthr.value = starthr; + document.createTodo.startmin.value = smin; + document.createTodo.startfmt.value = startfmt; + document.createTodo.viewOption.value = viewOption; + document.createTodo.subtab.value = subtab; + } + if (y.display=="none") + { + y.display="block"; + } +} + +function rptoptDisp(Opt){ + var currOpt = Opt.options[Opt.selectedIndex].value; + if(currOpt == "Daily") + { + ghide('repeatWeekUI'); + ghide('repeatMonthUI'); + } + else if(currOpt == "Weekly") + { + if(document.getElementById('repeatWeekUI').style.display == "none"); + document.getElementById('repeatWeekUI').style.display = "block"; + ghide('repeatMonthUI'); + } + else if(currOpt == "Monthly") + { + ghide('repeatWeekUI'); + if(document.getElementById('repeatMonthUI').style.display == "none"); + document.getElementById('repeatMonthUI').style.display = "block"; + } + else if(currOpt == "Yearly") + { + ghide('repeatWeekUI'); + ghide('repeatMonthUI'); + } +} + +function Taskshow(argg1,type,startdate,starthr,startmin,startfmt) +{ + var y=document.getElementById(argg1).style; + if (y.display=="none") + { + document.EditView.date_start.value = startdate; + document.EditView.starthr.value = starthr; + document.EditView.startmin.value = startmin; + document.EditView.startfmt.value = startfmt; + y.display="block"; + } +} + +function ghide(argg2) +{ + var z=document.getElementById(argg2).style; + if (z.display=="block" ) + { + z.display="none" + + } +} + + function moveMe(arg1) { + var posx = 0; + var posy = 0; + var e=document.getElementById(arg1); + + if (!e) var e = window.event; + + if (e.pageX || e.pageY) + { + posx = e.pageX; + posy = e.pageY; + } + else if (e.clientX || e.clientY) + { + posx = e.clientX + document.body.scrollLeft; + posy = e.clientY + document.body.scrollTop; + } + } + +function switchClass(myModule,toStatus) { + var x=document.getElementById(myModule); + if($(x)) + { + if (toStatus=="on") { + x.className="dvtSelectedCell"; + } + if (toStatus=="off") { + x.className="dvtUnSelectedCell"; + } + } + +} + +function enableCalstarttime() +{ + if(document.SharingForm.sttime_check.checked == true) + document.SharingForm.start_hour.disabled = false; + else + document.SharingForm.start_hour.disabled = true; +} +function check_form() { + formSelectColumnString('inviteesid','selectedusers'); + formSelectColumnString('inviteesid','selectedusers'); + if(trim(document.EditView.subject.value) == "") { + alert(alert_arr.MISSING_EVENT_NAME); + document.EditView.subject.focus() + return false; + } else { + if(document.EditView.record.value != '') { + document.EditView.mode.value = 'edit'; + } else { + document.EditView.mode.value = 'create'; + } + starthour = parseInt(document.EditView.starthr.value,10); + startmin = parseInt(document.EditView.startmin.value,10); + startformat = document.EditView.startfmt.value; + endhour = parseInt(document.EditView.endhr.value,10); + endmin = parseInt(document.EditView.endmin.value,10); + endformat = document.EditView.endfmt.value; + followupformat = document.EditView.followup_startfmt.value; + followuphour = parseInt(document.EditView.followup_starthr.value,10); + followupmin = parseInt(document.EditView.followup_startmin.value,10); + if(startformat != '') { + if(startformat == 'pm') { + if(starthour == 12) + starthour = 12; + else + starthour = starthour + 12; + } else { + if(starthour == 12) + starthour = 0; + else + starthour = starthour; + } + } + if(endformat != '') { + if(endformat == 'pm') { + if(endhour == 12) + endhour = 12; + else + endhour = endhour + 12; + } else { + if(endhour == 12) + endhour = 0; + else + endhour = endhour; + } + } + if(!dateValidate('date_start','Start date','OTH')) { + return false; + } + if(!dateValidate('due_date','End date','OTH')) { + return false; + } + if(dateComparison('due_date','End date','date_start','Start date','GE')) { + var dateval1=getObj('date_start').value.replace(/^\s+/g, '').replace(/\s+$/g, ''); + var dateval2=getObj('due_date').value.replace(/^\s+/g, '').replace(/\s+$/g, ''); + var dateval3=getObj('followup_date').value.replace(/^\s+/g, '').replace(/\s+$/g, ''); + + var dateelements1=splitDateVal(dateval1) + var dateelements2=splitDateVal(dateval2) + var dateelements3=splitDateVal(dateval3) + + dd1=dateelements1[0] + mm1=dateelements1[1] + yyyy1=dateelements1[2] + + dd2=dateelements2[0] + mm2=dateelements2[1] + yyyy2=dateelements2[2] + + dd3=dateelements3[0] + mm3=dateelements3[1] + yyyy3=dateelements3[2] + + var date1=new Date() + var date2=new Date() + var date3=new Date() + + date1.setYear(yyyy1) + date1.setMonth(mm1-1) + date1.setDate(dd1) + date1.setHours(starthour) + date1.setMinutes(startmin) + + date2.setYear(yyyy2) + date2.setMonth(mm2-1) + date2.setDate(dd2) + date2.setHours(endhour) + date2.setMinutes(endmin) + + date3.setYear(yyyy3) + date3.setMonth(mm3-1) + date3.setDate(dd3) + + diff_ms = Math.abs(date2.getTime()-date1.getTime())/(1000*60); + hour = Math.floor(diff_ms/(60)); + minute = Math.floor(diff_ms % 60) + document.EditView.duration_hours.value = hour; + document.EditView.duration_minutes.value = minute; + + event_starthour = _2digit(starthour); + event_startmin = _2digit(startmin); + event_endhour = _2digit(endhour); + event_endmin = _2digit(endmin); + document.EditView.time_start.value = event_starthour+':'+event_startmin; + document.EditView.time_end.value = event_endhour+':'+event_endmin; + // Added for Aydin Kurt-Elli requirement START -by Minnie + if (document.EditView.followup.checked == true && + document.getElementById('date_table_thirdtd').style.display == 'block') { + if(!dateValidate('followup_date','Followup Date','OTH')) { + return false; + } + if(followupformat != '') { + if(followupformat == 'pm') { + if(followuphour == 12) + followuphour = 12; + else + followuphour = followuphour + 12; + } else { + if(followuphour == 12) + followuphour = 0; + else + followuphour = followuphour; + } + } + + if ( compareDates(date3,'Followup Date',date2,'End Date','GE')) { + if (date3 <= date2) { + if((followuphour*60+followupmin) <= (endhour*60+endmin)) { + alert(alert_arr.FOLLOWUPTIME_GREATER_THAN_STARTTIME); + document.EditView.followup_starthr.focus(); + return false; + } + } + } + else return false; + //modified to set followup end date depends on the event or todo. If it is Event, the difference between followup start date and end date is 1hr. If it is todo then difference is 5mins. + date3.setMinutes(followupmin); + date3.setHours(followuphour); + if(document.EditView.activitytype[0].checked == true) { + date3.setMinutes(parseInt(date3.getMinutes(),10)+5); + } + if(document.EditView.activitytype[1].checked == true) { + date3.setMinutes(parseInt(date3.getMinutes(),10)+60); + } + var tempdate = getdispDate(date3); + + followuphour = _2digit(followuphour); + followupmin = _2digit(followupmin); + followupendhour = _2digit(date3.getHours()); + followupendmin = _2digit(date3.getMinutes()); + document.EditView.followup_due_date.value = tempdate; + document.EditView.followup_time_start.value = followuphour+':'+followupmin; + document.EditView.followup_time_end.value = followupendhour+':'+followupendmin; + //end + } + // Added for Aydin Kurt-Elli requirement END -by Minnie --> + + //added to avoid db error while giving characters in the repeat "every n no of day in month" text box + if((getObj("recurringcheck")) && (document.EditView.recurringcheck.checked == true) && + (document.EditView.recurringtype.value =="Monthly")) { + if((document.EditView.repeatMonth[0].checked == true) && + ((parseInt(parseFloat(document.EditView.repeatMonth_date.value))!= + document.EditView.repeatMonth_date.value) || + document.EditView.repeatMonth_date.value=='' || + parseInt(document.EditView.repeatMonth_date.value)>'31' || + document.EditView.repeatMonth_date.value<='0')) { + alert(alert_arr.INVALID +' "'+document.EditView.repeatMonth_date.value+'" '); + document.EditView.repeatMonth_date.focus(); + return false; + } + } + //end + + + //added to check Start Date & Time,if Activity Status is Planned.//start + if(document.EditView.eventstatus.value == "Planned") { + var chkdate=new Date() + chkdate.setMinutes(event_startmin) + chkdate.setHours(event_starthour) + chkdate.setYear(yyyy1) + chkdate.setMonth(mm1-1) + chkdate.setDate(dd1) + if(!comparestartdate(chkdate)) return false; + + } + + } + else + return false; + if(getObj("recurringcheck") && document.EditView.recurringcheck.checked == false) { + document.EditView.recurringtype.value = '--None--'; + } + return true; + } +} + +function task_check_form() +{ + starthour = parseInt(document.createTodo.starthr.value,10); + startmin = parseInt(document.createTodo.startmin.value,10); + startformat = document.createTodo.startfmt.value; + if(startformat != '') + { + if(startformat == 'pm') + { + if(starthour == 12) + starthour = 12; + else + starthour = starthour + 12; + + } + else + { + if(starthour == 12) + starthour = 0; + else + starthour = starthour; + } + } + starthour = _2digit(starthour); + startmin = _2digit(startmin); + document.createTodo.task_time_start.value = starthour+':'+startmin; + if(document.createTodo.record.value != '') + { + document.createTodo.mode.value = 'edit'; + } + else + { + document.createTodo.mode.value = 'create'; + } + +} + + +function maintask_check_form() +{ + starthour = parseInt(document.EditView.starthr.value,10); + startmin = parseInt(document.EditView.startmin.value,10); + startformat = document.EditView.startfmt.value; + if(startformat != '') + { + if(startformat == 'pm') + { + if(starthour == 12) + starthour = 12; + else + starthour = starthour + 12; + } + else + { + if(starthour == 12) + starthour = 0; + else + starthour = starthour; + } + } + starthour = _2digit(starthour); + startmin = _2digit(startmin); + document.EditView.time_start.value = starthour+':'+startmin; +} + + +var moveupLinkObj,moveupDisabledObj,movedownLinkObj,movedownDisabledObj; + +function userEventSharing(selectedusrid,selcolid) +{ + formSelectColumnString(selectedusrid,selcolid); +} + + +function incUser(avail_users,sel_users) +{ + availListObj=getObj(avail_users) + selectedColumnsObj=getObj(sel_users) + var selectlength=selectedColumnsObj.length + var availlength=availListObj.length + + for (i=0;i= 0) + selectedColumnsObj.remove(selectedColumnsObj.options.selectedIndex) + } + +} + + +// function to delete activity related contact in calendar +var del_ids = new Array(); +function removeActContacts() +{ + var avail_contacts = getObj('parentid'); + // this block is to remove contacts and get deleted contact ids + if(avail_contacts.options.selectedIndex > -1) + { + for(m = 0; m < avail_contacts.options.length; m++) + { + if(avail_contacts.options[m].selected == true) + { + del_ids.push(avail_contacts.options[m].value); + avail_contacts.options[m] = null; + removeActContacts(); + } + } + } + document.EditView.deletecntlist.value = del_ids.join(";"); + + // this block is to get available id list + var avail_ids = new Array(); + for(n=0; n window.innerWidth ){ + leftSide = eval(leftSide) - eval(widthM); + tagName.style.left = leftSide + 'px'; + } + else + tagName.style.left= leftSide + 'px'; + tagName.style.top= topSide + 'px'; + tagName.style.display = 'block'; + tagName.style.visibility = "visible"; + if(type == 'event') + { + var heldstatus = "eventstatus=Held"; + var notheldstatus = "eventstatus=Not Held"; + var activity_mode = "Events"; + var complete = document.getElementById("complete"); + var pending = document.getElementById("pending"); + var postpone = document.getElementById("postpone"); + var actdelete = document.getElementById("actdelete"); + var changeowner = document.getElementById("changeowner"); + var OptionData = document.getElementById('view_Option').options[document.getElementById('view_Option').selectedIndex].value; + + } + if(type == 'todo') + { + var heldstatus = "status=Completed"; + var notheldstatus = "status=Deferred"; + var activity_mode = "Task"; + var complete = document.getElementById("taskcomplete"); + var pending = document.getElementById("taskpending"); + var postpone = document.getElementById("taskpostpone"); + var actdelete = document.getElementById("taskactdelete"); + var changeowner = document.getElementById("taskchangeowner"); + var OptionData = ''; + } + document.getElementById("idlist").value = id; + document.change_owner.hour.value = hour; + document.change_owner.day.value = day; + document.change_owner.view.value = view; + document.change_owner.month.value = month; + document.change_owner.year.value = year; + document.change_owner.subtab.value = type; + if(complete) complete.href="javascript:updateStatus("+id+",'"+heldstatus+"','"+view+"',"+hour+","+day+","+month+","+year+",'"+type+"')"; + if(pending) pending.href="javascript:updateStatus("+id+",'"+notheldstatus+"','"+view+"',"+hour+","+day+","+month+","+year+",'"+type+"')"; + + if(postpone) postpone.href="index.php?module=Calendar&action=EditView&record="+id+"&return_action=index&activity_mode="+activity_mode+"&view="+view+"&hour="+hour+"&day="+day+"&month="+month+"&year="+year+"&viewOption="+OptionData+"&subtab="+type+"&maintab=Calendar"; + + if(actdelete) actdelete.href="javascript:delActivity("+id+",'"+view+"',"+hour+","+day+","+month+","+year+",'"+type+"')"; + + if(changeowner) changeowner.href="javascript:dispLayer('act_changeowner');"; + +} + +function dispLayer(lay) +{ + var tagName = document.getElementById(lay); + tagName.style.visibility = 'visible'; + tagName.style.display = 'block'; +} + +//check whether user form selected or group form selected +function checkgroup() +{ + if($("group_checkbox").checked) + { + document.change_owner.lead_group_owner.style.display = "block"; + document.change_owner.lead_owner.style.display = "none"; + } + else + { + document.change_owner.lead_group_owner.style.display = "none"; + document.change_owner.lead_owner.style.display = "block"; + } +} + +function calendarChangeOwner() +{ + var idlist = document.change_owner.idlist.value; + var view = document.change_owner.view.value; + var day = document.change_owner.day.value; + var month = document.change_owner.month.value; + var year = document.change_owner.year.value; + var hour = document.change_owner.hour.value; + var subtab = document.change_owner.subtab.value; + + //var checked = document.change_owner.user_lead_owner[0].checked; + if($("user_checkbox").checked) + { + var user_id = document.getElementById('lead_owner').options[document.getElementById('lead_owner').options.selectedIndex].value; + var url = 'module=Users&action=updateLeadDBStatus&return_module=Calendar&return_action=ActivityAjax&owner_id='+user_id+'&idlist='+idlist+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=change_owner&owner_type=User'; + } + else + { + var group_id = document.getElementById('lead_group_owner').options[document.getElementById('lead_group_owner').options.selectedIndex].value; + var url = 'module=Users&action=updateLeadDBStatus&return_module=Calendar&return_action=ActivityAjax&owner_id='+group_id+'&idlist='+idlist+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=change_owner&owner_type=Group'; + } + + if(subtab == 'event') + { + var OptionData = $('view_Option').options[$('view_Option').selectedIndex].value; + var eventurl = url+'&viewOption='+OptionData+'&subtab=event&ajax=true'; + + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: eventurl, + onComplete: function(response) { + if(OptionData == 'listview') + { + result = response.responseText.split('####'); + $("total_activities").innerHTML = result[1]; + $("listView").innerHTML=result[0]; + document.EventViewOption.action.value = "index"; + window.document.EventViewOption.submit(); + } + if(OptionData == 'hourview') + { + result = response.responseText.split('####'); + $("total_activities").innerHTML = result[1]; + $("hrView").innerHTML=result[0]; + document.EventViewOption.action.value = "index"; + window.document.EventViewOption.submit(); + } + } + } + ); + } + if(subtab == 'todo') + { + + var todourl = url+'&subtab=todo&ajax=true'; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: todourl, + onComplete: function(response) { + result = response.responseText.split('####'); + $("total_activities").innerHTML = result[1]; + $("mnuTab2").innerHTML=result[0]; + } + } + ); + } +} + +function delActivity(id,view,hour,day,month,year,subtab) +{ + if(subtab == 'event') + { + var users = document.getElementsByName('onlyforuser'); + var onlyforuser = users[0].value; + var OptionData = $('view_Option').options[$('view_Option').selectedIndex].value; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Users&action=massdelete&return_module=Calendar&return_action=ActivityAjax&idlist='+id+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=activity_delete&viewOption='+OptionData+'&subtab=event&ajax=true&onlyforuser='+encodeURIComponent(onlyforuser), + onComplete: function(response) { + if(OptionData == 'listview') + { + result = response.responseText.split('####'); + $("total_activities").innerHTML = result[1]; + $("listView").innerHTML=result[0]; + } + if(OptionData == 'hourview') + { + result = response.responseText.split('####'); + $("total_activities").innerHTML = result[1]; + $("hrView").innerHTML=result[0]; + } + } + } + ); + } + if(subtab == 'todo') + { + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Users&action=massdelete&return_module=Calendar&return_action=ActivityAjax&idlist='+id+'&view='+view+'&hour='+hour+'&day='+day+'&month='+month+'&year='+year+'&type=activity_delete&subtab=todo&ajax=true', + onComplete: function(response) { + result = response.responseText.split('####'); + $("total_activities").innerHTML = result[1]; + $("mnuTab2").innerHTML=result[0]; + } + } + ); + } +} + + +/* +* javascript function to display the div tag +* @param divId :: div tag ID +*/ +function cal_show(divId) + +{ + + var id = document.getElementById(divId); + + id.style.visibility = 'visible'; + +} + +function fnAssignTo(){ + var option_Box = document.getElementById('parent_type'); + var option_select = option_Box.options[option_Box.selectedIndex].value; + if(option_select == "Leads" || option_select == "Leads&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else if(option_select == "Accounts" || option_select == "Accounts&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else if(option_select == "Potentials" || option_select == "Potentials&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else if(option_select == "Quotes&action=Popup" || option_select == "Quotes&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else if(option_select == "PurchaseOrder" || option_select == "PurchaseOrder&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else if(option_select == "SalesOrder" || option_select == "SalesOrder&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else if(option_select == "Invoice" || option_select == "Invoice&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else if(option_select == "Campaigns" || option_select == "Campaigns&action=Popup") + { + document.getElementById('leadLay').style.visibility = 'visible'; + } + else{ + document.getElementById('leadLay').style.visibility = 'hidden'; + } + } + +function fnShowPopup(){ + document.getElementById('popupLay').style.display = 'block'; +} + +function fnHidePopup(){ + document.getElementById('popupLay').style.display = 'none'; +} + +function getValidationarr(id,activity_mode,opmode,subtab,viewOption) +{ + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Calendar&action=ActivityAjax&record='+id+'&activity_mode='+activity_mode+'&ajax=true&type=view&file=DetailView', + onComplete: function(response) { + $("dataArray").innerHTML=response.responseText; + setFieldvalues(opmode,subtab,viewOption); + } + } + ); + +} + +function setFieldvalues(opmode,subtab,viewOption) +{ + var st = document.getElementById('activity_cont'); + eval(st.innerHTML); + if(activity_type == 'Events') + { + document.EditView.viewOption.value = viewOption; + document.EditView.subtab.value = subtab; + for(x=0;x is a contact id + ltext ==> is a contact name +**/ +function addOption(lvalue,ltext) +{ + var optObj = document.createElement('OPTION') + if (browser_ie) optObj.innerText = ltext; + else if(browser_nn4 || browser_nn6) optObj.text = ltext; + else optObj.text = ltext; + optObj.value = lvalue; + document.getElementById('parentid').appendChild(optObj); +} + +function getdispDate(tempDate) +{ + var datefmt = document.EditView.dateformat.value; + var dd = _2digit(parseInt(tempDate.getDate(),10)); + var mm = _2digit(parseInt(tempDate.getMonth(),10)+1); + var yy = tempDate.getFullYear(); + if(datefmt == '%d-%m-%Y') return dd+'-'+mm+'-'+yy; + else if(datefmt == '%m-%d-%Y') return mm+'-'+dd+'-'+yy; + else return yy+'-'+mm+'-'+dd; +} diff --git a/modules/Calendar/updateCalendarSharing.php b/modules/Calendar/updateCalendarSharing.php new file mode 100644 index 0000000..a1c09e7 --- /dev/null +++ b/modules/Calendar/updateCalendarSharing.php @@ -0,0 +1,45 @@ +pquery($delquery, array($_REQUEST["current_userid"])); + +$selectedid = $_REQUEST['shar_userid']; +$sharedid = explode (";",$selectedid); +if(isset($sharedid) && $sharedid != null) +{ + foreach($sharedid as $sid) + { + if($sid != '') + { + $sql = "insert into vtiger_sharedcalendar values (?,?)"; + $adb->pquery($sql, array($_REQUEST["current_userid"], $sid)); + } + } +} +if(isset($_REQUEST['start_hour']) && $_REQUEST['start_hour'] != '') +{ + $sql = "update vtiger_users set start_hour=? where id=?"; + $adb->pquery($sql, array($_REQUEST['start_hour'], $current_user->id)); +} + +$sql = "update vtiger_users set hour_format=? where id=?"; +$adb->pquery($sql, array($hour_format, $current_user->id)); +RecalculateSharingRules(); +header("Location: index.php?action=index&module=Calendar&view=".vtlib_purify($_REQUEST['view'])."&hour=".vtlib_purify($_REQUEST['hour'])."&day=".vtlib_purify($_REQUEST['day'])."&month=".vtlib_purify($_REQUEST['month'])."&year=".vtlib_purify($_REQUEST['year'])."&viewOption=".vtlib_purify($_REQUEST['viewOption'])."&subtab=".vtlib_purify($_REQUEST['subtab'])."&parenttab=".getParentTab()); + +?> \ No newline at end of file diff --git a/modules/Calendar/updateRelations.php b/modules/Calendar/updateRelations.php new file mode 100644 index 0000000..b6e17de --- /dev/null +++ b/modules/Calendar/updateRelations.php @@ -0,0 +1,64 @@ +pquery($sql, array($id, $_REQUEST["parentid"])); + } + } + header("Location: index.php?action=CallRelatedList&module=Calendar&activity_mode=Events&record=".$record); + +} +elseif(isset($_REQUEST['entityid']) && $_REQUEST['entityid'] != '' && $_REQUEST['destination_module'] == 'Contacts') +{ + $record = vtlib_purify($_REQUEST["parentid"]); + $sql = "insert into vtiger_cntactivityrel values (?,?)"; + $adb->pquery($sql, array($_REQUEST["entityid"], $_REQUEST["parentid"])); + header("Location: index.php?action=DetailView&module=Calendar&activity_mode=Events&record=".$record); +} + +//This if for adding the vtiger_users +if(isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != '' && $_REQUEST['destination_module'] == 'Users') +{ + //split the string and store in an array + $storearray = explode (";",$idlist); + foreach($storearray as $id) + { + if($id != '') + { + $record = vtlib_purify($_REQUEST['parentid']); + $sql = "insert into vtiger_salesmanactivityrel values (?,?)"; + $adb->pquery($sql, array($id, $_REQUEST["parentid"])); + } + } + header("Location: index.php?action=DetailView&module=Calendar&activity_mode=Events&record=".$record); +} +elseif(isset($_REQUEST['entityid']) && $_REQUEST['entityid'] != '' && $_REQUEST['destination_module'] == 'Users') +{ + $record = vtlib_purify($_REQUEST['parentid']); + $sql = "insert into vtiger_salesmanactivityrel values (?,?)"; + $adb->pquery($sql, array($_REQUEST["entityid"], $_REQUEST["parentid"])); + header("Location: index.php?action=DetailView&module=Calendar&activity_mode=Events&record=".$record); + +} + +?> \ No newline at end of file diff --git a/modules/Campaigns/CallRelatedList.php b/modules/Campaigns/CallRelatedList.php new file mode 100644 index 0000000..b0d857e --- /dev/null +++ b/modules/Campaigns/CallRelatedList.php @@ -0,0 +1,115 @@ +retrieve_entity_info($RECORD,$currentmodule); + $focus->id = $RECORD; + $focus->name=$focus->column_fields['campaignname']; + $log->debug("id is ".$focus->id); + $log->debug("name is ".$focus->name); + } + + global $mod_strings; + global $app_strings,$adb; + global $theme; + global $currentModule; + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $smarty = new vtigerCRM_Smarty; + + if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; + } + if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') { + $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode'])); + } + if (isset($focus->name)) $smarty->assign("NAME", $focus->name); + $related_array=getRelatedLists($currentModule,$focus); + + // vtlib customization: Related module could be disabled, check it + if(isset($related_array)) { + foreach($related_array as $mod_key=>$mod_val) { + if($mod_key == "Contacts" || $mod_key == "Leads") { + $rel_checked=$_REQUEST[$mod_key.'_all']; + $rel_check_split=explode(";",$rel_checked); + if (is_array($mod_val)) { + $mod_val["checked"]=array(); + if (isset($mod_val['entries'])) { + foreach($mod_val['entries'] as $key=>$val) { + if(in_array($key,$rel_check_split)) + $related_array[$mod_key]["checked"][$key] = 'checked'; + else + $related_array[$mod_key]["checked"][$key] = ''; + } + } + } + } + } + } + // END + $smarty->assign("RELATEDLISTS", $related_array); + + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + $relationId = vtlib_purify($_REQUEST['relation_id']); + RelatedListViewSession::addRelatedModuleToSession($relationId, + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); + + require_once('modules/CustomView/CustomView.php'); + + // Module Sequence Numbering + $mod_seq_field = getModuleSequenceField($currentModule); + if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; + } else { + $mod_seq_id = $focus->id; + } + $smarty->assign('MOD_SEQ_ID', $mod_seq_id); + // END + + $smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); + $smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); + $smarty->assign("CATEGORY",$category); + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $smarty->assign("ID",$focus->id); + $smarty->assign("MODULE",$currentmodule); + $smarty->assign("SINGLE_MOD",$app_strings['Campaign']); + $smarty->assign("MOD",$mod_strings); + $smarty->assign("APP",$app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("RECORDID", $RECORD); + $smarty->assign('MAX_RECORDS', $list_max_entries_per_page); + + $check_button = Button_Check($module); + $smarty->assign("CHECK", $check_button); + + if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '') + $smarty->display("RelatedListContents.tpl"); + else + $smarty->display("RelatedLists.tpl"); +} +?> \ No newline at end of file diff --git a/modules/Campaigns/Campaigns.js b/modules/Campaigns/Campaigns.js new file mode 100644 index 0000000..d2d4935 --- /dev/null +++ b/modules/Campaigns/Campaigns.js @@ -0,0 +1,42 @@ +/********************************************************************************* + +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + + + +function set_return_specific_campaign(campaign_id, campaign_name) { + if(document.getElementById('from_link').value != '') { + window.opener.document.QcEditView.campaignname.value = campaign_name; + window.opener.document.QcEditView.campaignid.value = campaign_id; + } else { + window.opener.document.EditView.campaignname.value = campaign_name; + window.opener.document.EditView.campaignid.value = campaign_id; +} +} + +function set_return(product_id, product_name) { + if(document.getElementById('from_link').value != '') { + window.opener.document.QcEditView.parent_name.value = product_name; + window.opener.document.QcEditView.parent_id.value = product_id; + } else { + window.opener.document.EditView.parent_name.value = product_name; + window.opener.document.EditView.parent_id.value = product_id; +} +} + +function set_return_todo(product_id, product_name) { + if(document.getElementById('from_link').value != '') { + window.opener.document.QcEditView.task_parent_name.value = product_name; + window.opener.document.QcEditView.task_parent_id.value = product_id; + } else { + window.opener.document.createTodo.task_parent_name.value = product_name; + window.opener.document.createTodo.task_parent_id.value = product_id; +} +} + diff --git a/modules/Campaigns/Campaigns.php b/modules/Campaigns/Campaigns.php new file mode 100644 index 0000000..85ae8f9 --- /dev/null +++ b/modules/Campaigns/Campaigns.php @@ -0,0 +1,652 @@ +'crmid','vtiger_campaign'=>'campaignid','vtiger_campaignscf'=>'campaignid'); + /** + * Mandatory table for supporting custom fields. + */ + var $customFieldTable = Array('vtiger_campaignscf', 'campaignid'); + var $column_fields = Array(); + + var $sortby_fields = Array('campaignname','smownerid','campaigntype','productname','expectedrevenue','closingdate','campaignstatus','expectedresponse','targetaudience','expectedcost'); + + var $list_fields = Array( + 'Campaign Name'=>Array('campaign'=>'campaignname'), + 'Campaign Type'=>Array('campaign'=>'campaigntype'), + 'Campaign Status'=>Array('campaign'=>'campaignstatus'), + 'Expected Revenue'=>Array('campaign'=>'expectedrevenue'), + 'Expected Close Date'=>Array('campaign'=>'closingdate'), + 'Assigned To' => Array('crmentity'=>'smownerid') + ); + + var $list_fields_name = Array( + 'Campaign Name'=>'campaignname', + 'Campaign Type'=>'campaigntype', + 'Campaign Status'=>'campaignstatus', + 'Expected Revenue'=>'expectedrevenue', + 'Expected Close Date'=>'closingdate', + 'Assigned To'=>'assigned_user_id' + ); + + var $list_link_field= 'campaignname'; + //Added these variables which are used as default order by and sortorder in ListView + var $default_order_by = 'crmid'; + var $default_sort_order = 'DESC'; + + //var $groupTable = Array('vtiger_campaigngrouprelation','campaignid'); + + var $search_fields = Array( + 'Campaign Name'=>Array('vtiger_campaign'=>'campaignname'), + 'Campaign Type'=>Array('vtiger_campaign'=>'campaigntype'), + ); + + var $search_fields_name = Array( + 'Campaign Name'=>'campaignname', + 'Campaign Type'=>'campaigntype', + ); + // Used when enabling/disabling the mandatory fields for the module. + // Refers to vtiger_field.fieldname values. + var $mandatory_fields = Array('campaignname','createdtime' ,'modifiedtime','assigned_user_id'); + + // For Alphabetical search + var $def_basicsearch_col = 'campaignname'; + + function Campaigns() + { + $this->log =LoggerManager::getLogger('campaign'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Campaigns'); + } + + /** Function to handle module specific operations when saving a entity + */ + function save_module($module) + { + } + + // Mike Crowe Mod --------------------------------------------------------Default ordering for us + /** + * Function to get Campaign related Accouts + * @param integer $id - campaignid + * returns related Accounts record in array format + */ + function get_accounts($id, $cur_tab_id, $rel_tab_id, $actions = false) { + global $log, $singlepane_view,$currentModule; + $log->debug("Entering get_accounts(".$id.") method ..."); + $this_module = $currentModule; + + $related_module = vtlib_getModuleNameById($rel_tab_id); + require_once("modules/$related_module/$related_module.php"); + $other = new $related_module(); + + $is_CampaignStatusAllowed = false; + global $current_user; + if(getFieldVisibilityPermission('Accounts', $current_user->id, 'campaignrelstatus') == '0') { + $other->list_fields['Status'] = array('vtiger_campaignrelstatus'=>'campaignrelstatus'); + $other->list_fields_name['Status'] = 'campaignrelstatus'; + $other->sortby_fields[] = 'campaignrelstatus'; + $is_CampaignStatusAllowed = (getFieldVisibilityPermission('Accounts', $current_user->id, 'campaignrelstatus','readwrite') == '0')? true : false; + } + + vtlib_setup_modulevars($related_module, $other); + $singular_modname = vtlib_toSingular($related_module); + + $parenttab = getParentTab(); + + if($singlepane_view == 'true') + $returnset = '&return_module='.$this_module.'&return_action=DetailView&return_id='.$id; + else + $returnset = '&return_module='.$this_module.'&return_action=CallRelatedList&return_id='.$id; + + $button = ''; + + // Send mail button for selected Accounts + $button .= ""; + $button .= '    '; + /* To get Accounts CustomView -START */ + require_once('modules/CustomView/CustomView.php'); + $ahtml = ""; + /* To get Accounts CustomView -END */ + + $button .= $ahtml.""; + $button .= '    '; + + if($actions) + { + if(is_string($actions)) + $actions = explode(',', strtoupper($actions)); + if(in_array('SELECT', $actions) && isPermitted($related_module,4, '') == 'yes') + { + $button .= " "; + } + if(in_array('ADD', $actions) && isPermitted($related_module,1, '') == 'yes') + { + $button .= "". + " "; + } + } + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT vtiger_account.*, + CASE when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name, + vtiger_crmentity.*, vtiger_crmentity.modifiedtime, vtiger_campaignrelstatus.*, vtiger_accountbillads.* + FROM vtiger_account + INNER JOIN vtiger_campaignaccountrel ON vtiger_campaignaccountrel.accountid = vtiger_account.accountid + INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_account.accountid + LEFT JOIN vtiger_groups ON vtiger_groups.groupid=vtiger_crmentity.smownerid + LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid=vtiger_users.id + LEFT JOIN vtiger_accountbillads ON vtiger_accountbillads.accountaddressid = vtiger_account.accountid + LEFT JOIN vtiger_campaignrelstatus ON vtiger_campaignrelstatus.campaignrelstatusid = vtiger_campaignaccountrel.campaignrelstatusid + WHERE vtiger_campaignaccountrel.campaignid = ".$id." AND vtiger_crmentity.deleted=0"; + + $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset); + + if($return_value == null) + $return_value = Array(); + else if($is_CampaignStatusAllowed) { + $statusPos = count($return_value['header']) - 2; // Last column is for Actions, exclude that. Also the index starts from 0, so reduce one more count. + $return_value = $this->add_status_popup($return_value, $statusPos, 'Accounts'); + } + + $return_value['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_accounts method ..."); + return $return_value; + } + + /** + * Function to get Campaign related Contacts + * @param integer $id - campaignid + * returns related Contacts record in array format + */ + function get_contacts($id, $cur_tab_id, $rel_tab_id, $actions=false) { + global $log, $singlepane_view,$currentModule; + $log->debug("Entering get_contacts(".$id.") method ..."); + $this_module = $currentModule; + + $related_module = vtlib_getModuleNameById($rel_tab_id); + require_once("modules/$related_module/$related_module.php"); + $other = new $related_module(); + + $is_CampaignStatusAllowed = false; + global $current_user; + if(getFieldVisibilityPermission('Contacts', $current_user->id, 'campaignrelstatus') == '0') { + $other->list_fields['Status'] = array('vtiger_campaignrelstatus'=>'campaignrelstatus'); + $other->list_fields_name['Status'] = 'campaignrelstatus'; + $other->sortby_fields[] = 'campaignrelstatus'; + $is_CampaignStatusAllowed = (getFieldVisibilityPermission('Contacts', $current_user->id, 'campaignrelstatus','readwrite') == '0')? true : false; + } + + vtlib_setup_modulevars($related_module, $other); + $singular_modname = vtlib_toSingular($related_module); + + $parenttab = getParentTab(); + + if($singlepane_view == 'true') + $returnset = '&return_module='.$this_module.'&return_action=DetailView&return_id='.$id; + else + $returnset = '&return_module='.$this_module.'&return_action=CallRelatedList&return_id='.$id; + + $button = ''; + + // Send mail button for selected Leads + $button .= ""; + $button .= '    '; + + /* To get Leads CustomView -START */ + require_once('modules/CustomView/CustomView.php'); + $lhtml = ""; + /* To get Leads CustomView -END */ + + $button .= $lhtml.""; + $button .= '    '; + + if($actions) { + if(is_string($actions)) $actions = explode(',', strtoupper($actions)); + if(in_array('SELECT', $actions) && isPermitted($related_module,4, '') == 'yes') { + $button .= " "; + } + if(in_array('ADD', $actions) && isPermitted($related_module,1, '') == 'yes') { + $button .= "". + " "; + } + } + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT vtiger_contactdetails.accountid, vtiger_account.accountname, + CASE when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name , + vtiger_contactdetails.contactid, vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.title, + vtiger_contactdetails.department, vtiger_contactdetails.email, vtiger_contactdetails.phone, vtiger_crmentity.crmid, + vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_campaignrelstatus.* + FROM vtiger_contactdetails + INNER JOIN vtiger_campaigncontrel ON vtiger_campaigncontrel.contactid = vtiger_contactdetails.contactid + INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_contactdetails.contactid + LEFT JOIN vtiger_groups ON vtiger_groups.groupid=vtiger_crmentity.smownerid + LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid=vtiger_users.id + LEFT JOIN vtiger_account ON vtiger_account.accountid = vtiger_contactdetails.accountid + LEFT JOIN vtiger_campaignrelstatus ON vtiger_campaignrelstatus.campaignrelstatusid = vtiger_campaigncontrel.campaignrelstatusid + WHERE vtiger_campaigncontrel.campaignid = ".$id." AND vtiger_crmentity.deleted=0"; + + $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset); + + if($return_value == null) + $return_value = Array(); + else if($is_CampaignStatusAllowed) { + $statusPos = count($return_value['header']) - 2; // Last column is for Actions, exclude that. Also the index starts from 0, so reduce one more count. + $return_value = $this->add_status_popup($return_value, $statusPos, 'Contacts'); + } + + $return_value['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_contacts method ..."); + return $return_value; + } + + /** + * Function to get Campaign related Leads + * @param integer $id - campaignid + * returns related Leads record in array format + */ + function get_leads($id, $cur_tab_id, $rel_tab_id, $actions=false) { + global $log, $singlepane_view, $currentModule; + $log->debug("Entering get_leads(".$id.") method ..."); + $this_module = $currentModule; + + $related_module = vtlib_getModuleNameById($rel_tab_id); + require_once("modules/$related_module/$related_module.php"); + $other = new $related_module(); + + $is_CampaignStatusAllowed = false; + global $current_user; + if(getFieldVisibilityPermission('Leads', $current_user->id, 'campaignrelstatus') == '0') { + $other->list_fields['Status'] = array('vtiger_campaignrelstatus'=>'campaignrelstatus'); + $other->list_fields_name['Status'] = 'campaignrelstatus'; + $other->sortby_fields[] = 'campaignrelstatus'; + $is_CampaignStatusAllowed = (getFieldVisibilityPermission('Leads', $current_user->id, 'campaignrelstatus','readwrite') == '0')? true : false; + } + + vtlib_setup_modulevars($related_module, $other); + $singular_modname = vtlib_toSingular($related_module); + + $parenttab = getParentTab(); + + if($singlepane_view == 'true') + $returnset = '&return_module='.$this_module.'&return_action=DetailView&return_id='.$id; + else + $returnset = '&return_module='.$this_module.'&return_action=CallRelatedList&return_id='.$id; + + $button = ''; + + // Send mail button for selected Leads + $button .= ""; + $button .= '    '; + + /* To get Leads CustomView -START */ + require_once('modules/CustomView/CustomView.php'); + $lhtml = ""; + /* To get Leads CustomView -END */ + + $button .= $lhtml.""; + $button .= '    '; + + if($actions) { + if(is_string($actions)) $actions = explode(',', strtoupper($actions)); + if(in_array('SELECT', $actions) && isPermitted($related_module,4, '') == 'yes') { + $button .= " "; + } + if(in_array('ADD', $actions) && isPermitted($related_module,1, '') == 'yes') { + $button .= "". + " "; + } + } + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT vtiger_leaddetails.*, vtiger_crmentity.crmid,vtiger_leadaddress.phone,vtiger_leadsubdetails.website, + CASE when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name, + vtiger_crmentity.smownerid, vtiger_campaignrelstatus.* + FROM vtiger_leaddetails + INNER JOIN vtiger_campaignleadrel ON vtiger_campaignleadrel.leadid=vtiger_leaddetails.leadid + INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_leaddetails.leadid + INNER JOIN vtiger_leadsubdetails ON vtiger_leadsubdetails.leadsubscriptionid = vtiger_leaddetails.leadid + INNER JOIN vtiger_leadaddress ON vtiger_leadaddress.leadaddressid = vtiger_leadsubdetails.leadsubscriptionid + LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid = vtiger_users.id + LEFT JOIN vtiger_groups ON vtiger_groups.groupid=vtiger_crmentity.smownerid + LEFT JOIN vtiger_campaignrelstatus ON vtiger_campaignrelstatus.campaignrelstatusid = vtiger_campaignleadrel.campaignrelstatusid + WHERE vtiger_crmentity.deleted=0 AND vtiger_campaignleadrel.campaignid = ".$id; + + $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset); + + if($return_value == null) + $return_value = Array(); + else if($is_CampaignStatusAllowed) { + $statusPos = count($return_value['header']) - 2; // Last column is for Actions, exclude that. Also the index starts from 0, so reduce one more count. + $return_value = $this->add_status_popup($return_value, $statusPos, 'Leads'); + } + + $return_value['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_leads method ..."); + return $return_value; + } + + /** + * Function to get Campaign related Potentials + * @param integer $id - campaignid + * returns related potentials record in array format + */ + function get_opportunities($id, $cur_tab_id, $rel_tab_id, $actions=false) { + global $log, $singlepane_view,$currentModule,$current_user; + $log->debug("Entering get_opportunities(".$id.") method ..."); + $this_module = $currentModule; + + $related_module = vtlib_getModuleNameById($rel_tab_id); + require_once("modules/$related_module/$related_module.php"); + $other = new $related_module(); + vtlib_setup_modulevars($related_module, $other); + $singular_modname = vtlib_toSingular($related_module); + + $parenttab = getParentTab(); + + if($singlepane_view == 'true') + $returnset = '&return_module='.$this_module.'&return_action=DetailView&return_id='.$id; + else + $returnset = '&return_module='.$this_module.'&return_action=CallRelatedList&return_id='.$id; + + $button = ''; + + if($actions && getFieldVisibilityPermission($related_module,$current_user->id,'campaignid', 'readwrite') == '0') { + if(is_string($actions)) $actions = explode(',', strtoupper($actions)); + if(in_array('SELECT', $actions) && isPermitted($related_module,4, '') == 'yes') { + $button .= " "; + } + if(in_array('ADD', $actions) && isPermitted($related_module,1, '') == 'yes') { + $button .= " "; + } + } + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT CASE when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name, + vtiger_potential.related_to, vtiger_account.accountname, vtiger_potential.potentialid, vtiger_potential.potentialname, + vtiger_potential.potentialtype, vtiger_potential.sales_stage, vtiger_potential.amount, vtiger_potential.closingdate, + vtiger_crmentity.crmid, vtiger_crmentity.smownerid FROM vtiger_campaign + INNER JOIN vtiger_potential ON vtiger_campaign.campaignid = vtiger_potential.campaignid + INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_potential.potentialid + LEFT JOIN vtiger_groups ON vtiger_groups.groupid=vtiger_crmentity.smownerid + LEFT JOIN vtiger_users ON vtiger_users.id=vtiger_crmentity.smownerid + LEFT JOIN vtiger_account ON vtiger_account.accountid = vtiger_potential.related_to + WHERE vtiger_campaign.campaignid = ".$id." AND vtiger_crmentity.deleted=0"; + + $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset); + + if($return_value == null) $return_value = Array(); + $return_value['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_opportunities method ..."); + return $return_value; + } + + /** + * Function to get Campaign related Activities + * @param integer $id - campaignid + * returns related activities record in array format + */ + function get_activities($id, $cur_tab_id, $rel_tab_id, $actions=false) { + global $log, $singlepane_view,$currentModule,$current_user; + $log->debug("Entering get_activities(".$id.") method ..."); + $this_module = $currentModule; + + $related_module = vtlib_getModuleNameById($rel_tab_id); + require_once("modules/$related_module/Activity.php"); + $other = new Activity(); + vtlib_setup_modulevars($related_module, $other); + $singular_modname = vtlib_toSingular($related_module); + + $parenttab = getParentTab(); + + if($singlepane_view == 'true') + $returnset = '&return_module='.$this_module.'&return_action=DetailView&return_id='.$id; + else + $returnset = '&return_module='.$this_module.'&return_action=CallRelatedList&return_id='.$id; + + $button = ''; + + $button .= ''; + + if($actions) { + if(is_string($actions)) $actions = explode(',', strtoupper($actions)); + if(in_array('ADD', $actions) && isPermitted($related_module,1, '') == 'yes') { + if(getFieldVisibilityPermission('Calendar',$current_user->id,'parent_id', 'readwrite') == '0') { + $button .= " "; + } + if(getFieldVisibilityPermission('Events',$current_user->id,'parent_id', 'readwrite') == '0') { + $button .= ""; + } + } + } + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT vtiger_contactdetails.lastname, + vtiger_contactdetails.firstname, + vtiger_contactdetails.contactid, + vtiger_activity.*, + vtiger_seactivityrel.*, + vtiger_crmentity.crmid, vtiger_crmentity.smownerid, + vtiger_crmentity.modifiedtime, + CASE when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name, + vtiger_recurringevents.recurringtype + FROM vtiger_activity + INNER JOIN vtiger_seactivityrel + ON vtiger_seactivityrel.activityid = vtiger_activity.activityid + INNER JOIN vtiger_crmentity + ON vtiger_crmentity.crmid=vtiger_activity.activityid + LEFT JOIN vtiger_cntactivityrel + ON vtiger_cntactivityrel.activityid = vtiger_activity.activityid + LEFT JOIN vtiger_contactdetails + ON vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid + LEFT JOIN vtiger_users + ON vtiger_users.id = vtiger_crmentity.smownerid + LEFT OUTER JOIN vtiger_recurringevents + ON vtiger_recurringevents.activityid = vtiger_activity.activityid + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + WHERE vtiger_seactivityrel.crmid=".$id." + AND vtiger_crmentity.deleted = 0 + AND (activitytype = 'Task' + OR activitytype !='Emails')"; + + $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset); + + if($return_value == null) $return_value = Array(); + $return_value['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_activities method ..."); + return $return_value; + + } + /* + * Function populate the status columns' HTML + * @param - $related_list return value from GetRelatedList + * @param - $status_column index of the status column in the list. + * returns true on success + */ + function add_status_popup($related_list, $status_column = 7, $related_module) + { + global $adb; + + if(!$this->campaignrelstatus) + { + $result = $adb->query('SELECT * FROM vtiger_campaignrelstatus;'); + while($row = $adb->fetchByAssoc($result)) + { + $this->campaignrelstatus[$row['campaignrelstatus']] = $row; + } + } + foreach($related_list['entries'] as $key => &$entry) + { + $popupitemshtml = ''; + foreach($this->campaignrelstatus as $campaingrelstatus) + { + $camprelstatus = getTranslatedString($campaingrelstatus[campaignrelstatus],'Campaigns'); + $popupitemshtml .= "id."', '$key', '$campaingrelstatus[campaignrelstatusid]', '".addslashes($camprelstatus)."');\">$camprelstatus
"; + } + $popuphtml = '
'.$popupitemshtml.'
'; + + $entry[$status_column] = "[+] ".$entry[$status_column]."".$popuphtml; + } + + return $related_list; + } + + /* + * Function to get the secondary query part of a report + * @param - $module primary module name + * @param - $secmodule secondary module name + * returns the query string formed on fetching the related data for report for secondary module + */ + function generateReportsSecQuery($module,$secmodule){ + $query = $this->getRelationQuery($module,$secmodule,"vtiger_campaign","campaignid"); + $query .=" left join vtiger_crmentity as vtiger_crmentityCampaigns on vtiger_crmentityCampaigns.crmid=vtiger_campaign.campaignid and vtiger_crmentityCampaigns.deleted=0 + left join vtiger_products as vtiger_productsCampaigns on vtiger_campaign.product_id = vtiger_productsCampaigns.productid + left join vtiger_campaignscf on vtiger_campaignscf.campaignid = vtiger_crmentityCampaigns.crmid + left join vtiger_groups as vtiger_groupsCampaigns on vtiger_groupsCampaigns.groupid = vtiger_crmentityCampaigns.smownerid + left join vtiger_users as vtiger_usersCampaigns on vtiger_usersCampaigns.id = vtiger_crmentityCampaigns.smownerid + left join vtiger_users as vtiger_lastModifiedByCampaigns on vtiger_lastModifiedByCampaigns.id = vtiger_crmentityCampaigns.modifiedby "; + + return $query; + } + + /* + * Function to get the relation tables for related modules + * @param - $secmodule secondary module name + * returns the array with table names and fieldnames storing relations between module and this module + */ + function setRelationTables($secmodule){ + $rel_tables = array ( + "Contacts" => array("vtiger_campaigncontrel"=>array("campaignid","contactid"),"vtiger_campaign"=>"campaignid"), + "Leads" => array("vtiger_campaignleadrel"=>array("campaignid","leadid"),"vtiger_campaign"=>"campaignid"), + "Accounts" => array("vtiger_campaignaccountrel"=>array("campaignid","accountid"),"vtiger_campaign"=>"campaignid"), + "Potentials" => array("vtiger_potential"=>array("campaignid","potentialid"),"vtiger_campaign"=>"campaignid"), + "Calendar" => array("vtiger_seactivityrel"=>array("crmid","activityid"),"vtiger_campaign"=>"campaignid"), + "Products" => array("vtiger_campaign"=>array("campaignid","product_id")), + ); + return $rel_tables[$secmodule]; + } + + // Function to unlink an entity with given Id from another entity + function unlinkRelationship($id, $return_module, $return_id) { + global $log; + if(empty($return_module) || empty($return_id)) return; + + if($return_module == 'Leads') { + $sql = 'DELETE FROM vtiger_campaignleadrel WHERE campaignid=? AND leadid=?'; + $this->db->pquery($sql, array($id, $return_id)); + } elseif($return_module == 'Contacts') { + $sql = 'DELETE FROM vtiger_campaigncontrel WHERE campaignid=? AND contactid=?'; + $this->db->pquery($sql, array($id, $return_id)); + } elseif($return_module == 'Accounts') { + $sql = 'DELETE FROM vtiger_campaignaccountrel WHERE campaignid=? AND accountid=?'; + $this->db->pquery($sql, array($id, $return_id)); + } else { + $sql = 'DELETE FROM vtiger_crmentityrel WHERE (crmid=? AND relmodule=? AND relcrmid=?) OR (relcrmid=? AND module=? AND crmid=?)'; + $params = array($id, $return_module, $return_id, $id, $return_module, $return_id); + $this->db->pquery($sql, $params); + } + } + + function save_related_module($module, $crmid, $with_module, $with_crmids) { + $adb = PearDatabase::getInstance(); + + if(!is_array($with_crmids)) $with_crmids = Array($with_crmids); + foreach($with_crmids as $with_crmid) { + if ($with_module == 'Leads') { + $checkResult = $adb->pquery('SELECT 1 FROM vtiger_campaignleadrel WHERE campaignid = ? AND leadid = ?', + array($crmid, $with_crmid)); + if($checkResult && $adb->num_rows($checkResult) > 0) { + continue; + } + $sql = 'INSERT INTO vtiger_campaignleadrel VALUES(?,?,1)'; + $adb->pquery($sql, array($crmid, $with_crmid)); + + } elseif($with_module == 'Contacts') { + $checkResult = $adb->pquery('SELECT 1 FROM vtiger_campaigncontrel WHERE campaignid = ? AND contactid = ?', + array($crmid, $with_crmid)); + if($checkResult && $adb->num_rows($checkResult) > 0) { + continue; + } + $sql = 'INSERT INTO vtiger_campaigncontrel VALUES(?,?,1)'; + $adb->pquery($sql, array($crmid, $with_crmid)); + + } elseif($with_module == 'Accounts') { + $checkResult = $adb->pquery('SELECT 1 FROM vtiger_campaignaccountrel WHERE campaignid = ? AND accountid = ?', + array($crmid, $with_crmid)); + if($checkResult && $adb->num_rows($checkResult) > 0) { + continue; + } + $sql = 'INSERT INTO vtiger_campaignaccountrel VALUES(?,?,1)'; + $adb->pquery($sql, array($crmid, $with_crmid)); + + } else { + parent::save_related_module($module, $crmid, $with_module, $with_crmid); + } + } + } + +} +?> diff --git a/modules/Campaigns/Campaigns.png b/modules/Campaigns/Campaigns.png new file mode 100644 index 0000000..edb2707 Binary files /dev/null and b/modules/Campaigns/Campaigns.png differ diff --git a/modules/Campaigns/CampaignsAjax.php b/modules/Campaigns/CampaignsAjax.php new file mode 100644 index 0000000..e2d11f6 --- /dev/null +++ b/modules/Campaigns/CampaignsAjax.php @@ -0,0 +1,13 @@ + diff --git a/modules/Campaigns/CustomView.php b/modules/Campaigns/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/Campaigns/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/Campaigns/Delete.php b/modules/Campaigns/Delete.php new file mode 100644 index 0000000..9dddc07 --- /dev/null +++ b/modules/Campaigns/Delete.php @@ -0,0 +1,39 @@ + \ No newline at end of file diff --git a/modules/Campaigns/DetailView.php b/modules/Campaigns/DetailView.php new file mode 100644 index 0000000..1903964 --- /dev/null +++ b/modules/Campaigns/DetailView.php @@ -0,0 +1,122 @@ +retrieve_entity_info($_REQUEST['record'],"Campaigns"); + $focus->name=$focus->column_fields['campaignname']; + $focus->id = $_REQUEST['record']; +} + +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') +{ + $focus->id = ""; +} +global $app_strings,$mod_strings,$theme,$currentModule,$default_module_view,$adb,$list_max_entries_per_page; + +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$smarty = new vtigerCRM_Smarty; +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("THEME", $theme); + +if (isset($focus->name)) $smarty->assign("NAME", $focus->name); +else $smarty->assign("NAME", ""); +$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); + +$smarty->assign("CUSTOMFIELD", $cust_fld); +$smarty->assign("SINGLE_MOD",'Campaign'); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + +if(isPermitted("Campaigns","EditView",$_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + +if(isPermitted("Campaigns","Delete",$_REQUEST['record']) == 'yes') + $smarty->assign("DELETE","permitted"); + +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); +$smarty->assign("UPDATEINFO",updateInfo($focus->id)); +$smarty->assign("ID", vtlib_purify($_REQUEST['record'])); + +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; +} else { + $mod_seq_id = $focus->id; +} +$smarty->assign('MOD_SEQ_ID', $mod_seq_id); +// END + +$tabid = getTabid("Campaigns"); +$validationData = getDBValidationData($focus->tab_name,$tabid); +$data = split_validationdataArray($validationData); + +$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); +$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); +$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); +$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule)); + +if($singlepane_view == 'true') +{ + $related_array = getRelatedLists($currentModule,$focus); + $smarty->assign("RELATEDLISTS", $related_array); + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); +} + +$smarty->assign("SinglePane_View", $singlepane_view); +$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); +$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); +$smarty->assign("MODULE",$currentModule); +$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record'])); +$smarty->assign("RECORDID", $_REQUEST['record']); +$smarty->assign('MAX_RECORDS', $list_max_entries_per_page); + +if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){ + $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id); + VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id); +} + +// Record Change Notification +$focus->markAsViewed($current_user->id); +// END + +// Gather the custom link information to display +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action'])); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params)); +// END + +$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true)); + +$smarty->display("DetailView.tpl"); + +$focus->id = $_REQUEST['record']; + +?> \ No newline at end of file diff --git a/modules/Campaigns/DetailViewAjax.php b/modules/Campaigns/DetailViewAjax.php new file mode 100644 index 0000000..081bf9c --- /dev/null +++ b/modules/Campaigns/DetailViewAjax.php @@ -0,0 +1,47 @@ +retrieve_entity_info($crmid,"Campaigns"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Campaigns"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){ + require_once 'include/ListView/RelatedListViewContents.php'; +} +?> \ No newline at end of file diff --git a/modules/Campaigns/EditView.php b/modules/Campaigns/EditView.php new file mode 100644 index 0000000..76b7d60 --- /dev/null +++ b/modules/Campaigns/EditView.php @@ -0,0 +1,23 @@ +mode == 'edit') { + $smarty->assign("OLDSMOWNERID", $focus->column_fields['assigned_user_id']); +} + +if(isset($_REQUEST['product_id'])) { + $smarty->assign("PRODUCTID", vtlib_purify($_REQUEST['product_id'])); +} + + $smarty->display("salesEditView.tpl"); + +?> \ No newline at end of file diff --git a/modules/Campaigns/ListView.php b/modules/Campaigns/ListView.php new file mode 100644 index 0000000..8604a63 --- /dev/null +++ b/modules/Campaigns/ListView.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Campaigns/ListViewPagging.php b/modules/Campaigns/ListViewPagging.php new file mode 100644 index 0000000..333f176 --- /dev/null +++ b/modules/Campaigns/ListViewPagging.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Campaigns/LoadList.php b/modules/Campaigns/LoadList.php new file mode 100644 index 0000000..470b327 --- /dev/null +++ b/modules/Campaigns/LoadList.php @@ -0,0 +1,47 @@ +initForCustomViewById(vtlib_purify($_REQUEST["cvid"])); +} else { + $queryGenerator->initForDefaultCustomView(); +} + +$rs = $adb->query($queryGenerator->getQuery()); + +if($_REQUEST["list_type"] == "Leads"){ + $reltable = "vtiger_campaignleadrel"; + $relid = "leadid"; +} +elseif($_REQUEST["list_type"] == "Contacts"){ + + $reltable = "vtiger_campaigncontrel"; + $relid = "contactid"; +} +elseif($_REQUEST["list_type"] == "Accounts"){ + $reltable = "vtiger_campaignaccountrel"; + $relid = "accountid"; +} + +$focus = CRMEntity::getInstance($currentModule); +while($row=$adb->fetch_array($rs)) { + relateEntities($focus, $currentModule, vtlib_purify($_REQUEST['return_id']), vtlib_purify($_REQUEST["list_type"]), $row[$relid]); +} + +header("Location: index.php?module=Campaigns&action=CampaignsAjax&file=CallRelatedList&ajax=true&". + "record=".vtlib_purify($_REQUEST['return_id'])); + +?> diff --git a/modules/Campaigns/MassEdit.php b/modules/Campaigns/MassEdit.php new file mode 100644 index 0000000..0553078 --- /dev/null +++ b/modules/Campaigns/MassEdit.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Campaigns/MassEditSave.php b/modules/Campaigns/MassEditSave.php new file mode 100644 index 0000000..0e1f2a6 --- /dev/null +++ b/modules/Campaigns/MassEditSave.php @@ -0,0 +1,67 @@ +retrieve_entity_info($recordid, $currentModule); + $focus->mode = 'edit'; + $focus->id = $recordid; + foreach($focus->column_fields as $fieldname => $val) + { + if(isset($_REQUEST[$fieldname."_mass_edit_check"])) + { + if($fieldname == 'assigned_user_id'){ + if($_REQUEST['assigntype'] == 'U') { + $value = $_REQUEST['assigned_user_id']; + } elseif($_REQUEST['assigntype'] == 'T') { + $value = $_REQUEST['assigned_group_id']; + } + } else { + if(is_array($_REQUEST[$fieldname])) + $value = $_REQUEST[$fieldname]; + else + $value = trim($_REQUEST[$fieldname]); + } + $focus->column_fields[$fieldname] = $value; + } + else{ + $focus->column_fields[$fieldname] = decode_html($focus->column_fields[$fieldname]); + } + } + $focus->save($currentModule); + } + } +} + +$parenttab = getParentTab(); +header("Location: index.php?module=$return_module&action=$return_action&parenttab=$parenttab$rstart"); +?> \ No newline at end of file diff --git a/modules/Campaigns/Popup.php b/modules/Campaigns/Popup.php new file mode 100644 index 0000000..98ea8ec --- /dev/null +++ b/modules/Campaigns/Popup.php @@ -0,0 +1,23 @@ + diff --git a/modules/Campaigns/QuickCreate.php b/modules/Campaigns/QuickCreate.php new file mode 100644 index 0000000..8d5998b --- /dev/null +++ b/modules/Campaigns/QuickCreate.php @@ -0,0 +1,12 @@ + diff --git a/modules/Campaigns/Save.php b/modules/Campaigns/Save.php new file mode 100644 index 0000000..f0515fa --- /dev/null +++ b/modules/Campaigns/Save.php @@ -0,0 +1,53 @@ +column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} + +$focus->save("Campaigns"); +$return_id = $focus->id; + +$parenttab = getParentTab(); +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']); +else $return_module = "Campaigns"; +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']); +else $return_action = "DetailView"; +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']); + +header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab&start=".vtlib_purify($_REQUEST['pagenumber']).$search); +?> \ No newline at end of file diff --git a/modules/Campaigns/Settings.php b/modules/Campaigns/Settings.php new file mode 100644 index 0000000..48a80c0 --- /dev/null +++ b/modules/Campaigns/Settings.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Campaigns/TagCloud.php b/modules/Campaigns/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Campaigns/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Campaigns/UnifiedSearch.php b/modules/Campaigns/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Campaigns/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Campaigns/index.php b/modules/Campaigns/index.php new file mode 100644 index 0000000..da92b36 --- /dev/null +++ b/modules/Campaigns/index.php @@ -0,0 +1,17 @@ + diff --git a/modules/Campaigns/language/de_de.lang.php b/modules/Campaigns/language/de_de.lang.php new file mode 100644 index 0000000..4939c4a --- /dev/null +++ b/modules/Campaigns/language/de_de.lang.php @@ -0,0 +1,96 @@ +'Kampagnen Information', + 'LBL_CUSTOM_INFORMATION'=>'zusätzliche Information', + 'LBL_DESCRIPTION_INFORMATION'=>'Information', + 'LBL_EXPECTATIONS_AND_ACTUALS'=>'Erwartungen & Aktuelles', + + 'Campaign Name'=>'Kampagnenname', + 'Campaign Type'=>'Kampagnentyp', + 'Campaign Status'=>'Kampagnenstatus', + 'Campaign ID'=>'Kampagnennr.', + 'Expected Close Date'=>'erwartetes Abschlußdatum', + 'Expected Revenue'=>'erwarteter Umsatz', + 'Budget Cost'=>'Budget', + 'Actual Cost'=>'aktuelle Kosten', + 'Expected Response'=>'erwarteter Rücklauf', + 'Assigned To'=>'zuständig', + 'Num Sent'=>'gesendete Anzahl', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Description'=>'Beschreibung', + 'Product'=>'Produkt', + 'Target Audience'=>'Zielgruppe', + 'TargetSize'=>'Größe der Zielgruppe', + 'Sponsor'=>'Sponsor', + + 'Expected Sales Count'=>'erwartete Verkaufsmenge', + 'Expected Response Count'=>'erwartete Rücklaufmenge', + 'Expected ROI'=>'erwarteter ROI', + + 'Actual Sales Count'=>'aktuelle Verkaufsmenge', + 'Actual Response Count'=>'aktuelle Rücklaufmenge', + 'Actual ROI'=>'aktueller ROI', + 'Select One'=>'Eins auswählen', + 'LBL_LOAD_LIST'=>'lade Liste', + + //Added for existing Picklist Entries + + 'Conference'=>'Konferenz', + 'Webinar'=>'Websemiar', + 'Trade Show'=>'Messe', + 'Public Relations'=>'PR', + 'Partners'=>'Partner', + 'Referral Program'=>'Referenzprogram', + 'Advertisement'=>'Werbung', + 'Banner Ads'=>'Web Werbung', + 'Direct Mail'=>'per Brief', + 'Email'=>'E-Mail', + 'Telemarketing'=>'Telemarketing', + 'Others'=>'andere', + + 'Planning'=>'Planung', + 'Active'=>'aktiv', + 'Inactive'=>'inaktiv', + 'Completed'=>'erledigt', + 'Cancelled'=>'abgebrochen', + + 'Excellent'=>'ausgezeichnet', + 'Good'=>'gut', + 'Average'=>'Durchschnitt', + 'Poor'=>'schwach', + + //Module Sequence Numbering + 'Campaign No'=>'Kampagnennr.', + // status fields + '--None--'=>'--ohne--', + 'Contacted - Successful' => 'erfolgreich kontaktiert', + 'Contacted - Unsuccessful' => 'ohne Erfolg kontaktiert', + 'Contacted - Never Contact Again' => 'Kontaktiert - nie wiederholen', + // END + 'Campaigns ID' => 'Campaigns ID', +); + +?> \ No newline at end of file diff --git a/modules/Campaigns/language/en_gb.lang.php b/modules/Campaigns/language/en_gb.lang.php new file mode 100644 index 0000000..1d699fc --- /dev/null +++ b/modules/Campaigns/language/en_gb.lang.php @@ -0,0 +1,70 @@ + 'Campaign Information', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', + 'LBL_EXPECTATIONS_AND_ACTUALS' => 'Expectations & Actuals', + 'Campaign Name' => 'Campaign Name', + 'Campaign Type' => 'Campaign Type', + 'Campaign Status' => 'Campaign Status', + 'Campaign ID' => 'Campaign ID', + 'Expected Close Date' => 'Expected Close Date', + 'Expected Revenue' => 'Expected Revenue', + 'Budget Cost' => 'Budget Cost', + 'Actual Cost' => 'Actual Cost', + 'Expected Response' => 'Expected Response', + 'Assigned To' => 'Assigned To', + 'Num Sent' => 'Num Sent', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Description' => 'Description', + 'Product' => 'Product', + 'Target Audience' => 'Target Audience', + 'TargetSize' => 'Target Size', + 'Sponsor' => 'Sponsor', + 'Expected Sales Count' => 'Expected Sales Count', + 'Expected Response Count' => 'Expected Response Count', + 'Expected ROI' => 'Expected ROI', + 'Actual Sales Count' => 'Actual Sales Count', + 'Actual Response Count' => 'Actual Response Count', + 'Actual ROI' => 'Actual ROI', + 'Select One' => 'Select One', + 'LBL_LOAD_LIST' => 'Load List', + 'Conference' => 'Conference', + 'Webinar' => 'Webinar', + 'Trade Show' => 'Trade Show', + 'Public Relations' => 'Public Relations', + 'Partners' => 'Partners', + 'Referral Program' => 'Referral Program', + 'Advertisement' => 'Advertisement', + 'Banner Ads' => 'Banner Ads', + 'Direct Mail' => 'Direct Mail', + 'Email' => 'Email', + 'Telemarketing' => 'Telemarketing', + 'Others' => 'Others', + 'Planning' => 'Planning', + 'Active' => 'Active', + 'Inactive' => 'Inactive', + 'Complete' => 'Complete', + 'Cancelled' => 'Cancelled', + 'Excellent' => 'Excellent', + 'Good' => 'Good', + 'Average' => 'Average', + 'Poor' => 'Poor', + 'Campaign No' => 'Campaign No.', + '--None--' => '--None--', + 'Contacted - Successful' => 'Contacted - Successful', + 'Contacted - Unsuccessful' => 'Contacted - Unsuccessful', + 'Contacted - Never Contact Again' => 'Contacted - Never Contact Again', + 'Campaigns ID' => 'Campaigns ID', +); +?> \ No newline at end of file diff --git a/modules/Campaigns/language/en_us.lang.php b/modules/Campaigns/language/en_us.lang.php new file mode 100644 index 0000000..6ae19f7 --- /dev/null +++ b/modules/Campaigns/language/en_us.lang.php @@ -0,0 +1,96 @@ +'Campaign Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_EXPECTATIONS_AND_ACTUALS'=>'Expectations & Actuals', + +'Campaign Name'=>'Campaign Name', +'Campaign Type'=>'Campaign Type', +'Campaign Status'=>'Campaign Status', +'Campaign ID'=>'Campaign ID', +'Expected Close Date'=>'Expected Close Date', +'Expected Revenue'=>'Expected Revenue', +'Budget Cost'=>'Budget Cost', +'Actual Cost'=>'Actual Cost', +'Expected Response'=>'Expected Response', +'Assigned To'=>'Assigned To', +'Num Sent'=>'Num Sent', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Product'=>'Product', +'Target Audience'=>'Target Audience', +'TargetSize'=>'Target Size', +'Sponsor'=>'Sponsor', + +'Expected Sales Count'=>'Expected Sales Count', +'Expected Response Count'=>'Expected Response Count', +'Expected ROI'=>'Expected ROI', + +'Actual Sales Count'=>'Actual Sales Count', +'Actual Response Count'=>'Actual Response Count', +'Actual ROI'=>'Actual ROI', +'Select One'=>'Select One', +'LBL_LOAD_LIST'=>'Load List', + +//Added for existing Picklist Entries + +'Conference'=>'Conference', +'Webinar'=>'Webinar', +'Trade Show'=>'Trade Show', +'Public Relations'=>'Public Relations', +'Partners'=>'Partners', +'Referral Program'=>'Referral Program', +'Advertisement'=>'Advertisement', +'Banner Ads'=>'Banner Ads', +'Direct Mail'=>'Direct Mail', +'Email'=>'Email', +'Telemarketing'=>'Telemarketing', +'Others'=>'Others', + +'Planning'=>'Planning', +'Active'=>'Active', +'Inactive'=>'Inactive', +'Complete'=>'Complete', +'Cancelled'=>'Cancelled', + +'Excellent'=>'Excellent', +'Good'=>'Good', +'Average'=>'Average', +'Poor'=>'Poor', + +//Module Sequence Numbering +'Campaign No'=>'Campaign No', +// status fields +'--None--'=>'--None--', +'Contacted - Successful' => 'Contacted - Successful', +'Contacted - Unsuccessful' => 'Contacted - Unsuccessful', +'Contacted - Never Contact Again' => 'Contacted - Never Contact Again', +// END +'Campaigns ID' => 'Campaigns ID', +); + +?> diff --git a/modules/Campaigns/language/es_es.lang.php b/modules/Campaigns/language/es_es.lang.php new file mode 100644 index 0000000..a4a500a --- /dev/null +++ b/modules/Campaigns/language/es_es.lang.php @@ -0,0 +1,96 @@ +'Información de Campaña', +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', +'LBL_DESCRIPTION_INFORMATION'=>'Descripción de la Información', +'LBL_EXPECTATIONS_AND_ACTUALS'=>'Expectativa y Real', + +'Campaign Name'=>'Nombre de Campaña', +'Campaign Type'=>'Tipo de Campaña', +'Campaign Status'=>'Situación de Campaña', +'Campaign ID'=>'ID de Campaña', +'Expected Close Date'=>'Fecha Estimada de Fin', +'Expected Revenue'=>'Beneficio Estimado', +'Budget Cost'=>'Coste Estimado', +'Actual Cost'=>'Coste Real', +'Expected Response'=>'Respuesta Estimada', +'Assigned To'=>'Asignado a', +'Num Sent'=>'Número de Envíos', +'Created Time'=>'Creado', +'Modified Time'=>'Modificado', +'Description'=>'Descripción', +'Product'=>'Producto', +'Target Audience'=>'Público Objetivo', +'TargetSize'=>'Cantidad Objetivo', +'Sponsor'=>'Patrocinador', + +'Expected Sales Count'=>'Estimación de Ventas', +'Expected Response Count'=>'Estimación de Respuestas', +'Expected ROI'=>'Estimación de ROI', + +'Actual Sales Count'=>'Ventas', +'Actual Response Count'=>'Respuestas', +'Actual ROI'=>'Retorno de Inversión', +'Select One'=>'Elija uno', +'LBL_LOAD_LIST'=>'Cargar Listado', + +//Added for existing Picklist Entries + +'Conference'=>'Conferencia', +'Webinar'=>'Webinar', +'Trade Show'=>'Feria', +'Public Relations'=>'Relaciones Públicas', +'Partners'=>'Socios', +'Referral Program'=>'Programa de Referidos', +'Advertisement'=>'Publicidad', +'Banner Ads'=>'Banners', +'Direct Mail'=>'Mailing', +'Email'=>'Emailing', +'Telemarketing'=>'Telemarketing', +'Others'=>'Otros', + +'Planning'=>'Planeada', +'Active'=>'Activa', +'Inactive'=>'Inactiva', +'Complete'=>'Completa', +'Cancelled'=>'Cancelada', + +'Excellent'=>'Excelente', +'Good'=>'Buena', +'Average'=>'Normal', +'Poor'=>'Pobre', + +//Module Sequence Numbering +'Campaign No'=>'Núm. Campaña', +// END + +// status fields +'--None--'=>'--Ninguno--', +'Contacted - Successful' => 'Respuesta - Satisfactoria', +'Contacted - Unsuccessful' => 'Respuesta - Insatisfactoria', +'Contacted - Never Contact Again' => 'Respuesta - No volver a contactar', +'Campaigns ID' => 'Id Campaña', +); + +?> diff --git a/modules/Campaigns/language/es_mx.lang.php b/modules/Campaigns/language/es_mx.lang.php new file mode 100644 index 0000000..5b92c9a --- /dev/null +++ b/modules/Campaigns/language/es_mx.lang.php @@ -0,0 +1,96 @@ +'Información de Campaña', +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', +'LBL_DESCRIPTION_INFORMATION'=>'Descripción Adicional', +'LBL_EXPECTATIONS_AND_ACTUALS'=>'Expectativa y Real', + +'Campaign Name'=>'Nombre de Campaña', +'Campaign Type'=>'Tipo de Campaña', +'Campaign Status'=>'Situación de Campaña', +'Campaign ID'=>'ID de Campaña', +'Expected Close Date'=>'Fecha Estimada de Fin', +'Expected Revenue'=>'Beneficio Estimado', +'Budget Cost'=>'Costo Estimado', +'Actual Cost'=>'Costo Real', +'Expected Response'=>'Respuesta Estimada', +'Assigned To'=>'Asignado a', +'Num Sent'=>'Número de Envíos', +'Created Time'=>'Creado', +'Modified Time'=>'Modificado', +'Description'=>'Descripción', +'Product'=>'Producto', +'Target Audience'=>'Público Objetivo', +'TargetSize'=>'Cantidad Objetivo', +'Sponsor'=>'Patrocinador', + +'Expected Sales Count'=>'Estimación de Ventas', +'Expected Response Count'=>'Estimación de Respuestas', +'Expected ROI'=>'Estimación de ROI', + +'Actual Sales Count'=>'Ventas', +'Actual Response Count'=>'Respuestas', +'Actual ROI'=>'Retorno de Inversión', +'Select One'=>'Elija uno', +'LBL_LOAD_LIST'=>'Cargar Listado', + +//Added for existing Picklist Entries + +'Conference'=>'Conferencia', +'Webinar'=>'Webinar', +'Trade Show'=>'Feria', +'Public Relations'=>'Relaciones Públicas', +'Partners'=>'Socios', +'Referral Program'=>'Programa de Referidos', +'Advertisement'=>'Publicidad', +'Banner Ads'=>'Banners', +'Direct Mail'=>'Mailing', +'Email'=>'Emailing', +'Telemarketing'=>'Telemarketing', +'Others'=>'Otros', + +'Planning'=>'Planeada', +'Active'=>'Activa', +'Inactive'=>'Inactiva', +'Complete'=>'Completa', +'Cancelled'=>'Cancelada', + +'Excellent'=>'Excelente', +'Good'=>'Buena', +'Average'=>'Normal', +'Poor'=>'Pobre', + +//Module Sequence Numbering +'Campaign No'=>'Núm. Campaña', +// END + +// status fields +'--None--'=>'--Ninguno--', +'Contacted - Successful' => 'Respuesta - Satisfactoria', +'Contacted - Unsuccessful' => 'Respuesta - Insatisfactoria', +'Contacted - Never Contact Again' => 'Respuesta - No volver a contactar', +'Campaigns ID' => 'Id Campaña', +); + +?> diff --git a/modules/Campaigns/language/fr_fr.lang.php b/modules/Campaigns/language/fr_fr.lang.php new file mode 100644 index 0000000..926d814 --- /dev/null +++ b/modules/Campaigns/language/fr_fr.lang.php @@ -0,0 +1,72 @@ + 'Détail campagne', + 'LBL_CUSTOM_INFORMATION' => 'Informations personnalisées', + 'LBL_DESCRIPTION_INFORMATION' => 'Description', + 'LBL_EXPECTATIONS_AND_ACTUALS' => 'Evaluations', + 'Campaign Name' => 'Objet', + 'Campaign Type' => 'Type', + 'Campaign Status' => 'Statut', + 'Campaign ID' => 'Ref', + 'Expected Close Date' => 'Echéance', + 'Expected Revenue' => 'CA prévisionnel', + 'Budget Cost' => 'Budget', + 'Actual Cost' => 'Coût actuel', + 'Expected Response' => 'Réponse attendue', + 'Assigned To' => 'Assigné à', + 'Num Sent' => 'Nombre d\'envois', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Description' => 'Description', + 'Product' => 'Produit', + 'Target Audience' => 'Cible visé', + 'TargetSize' => 'Taille de la cible', + 'Sponsor' => 'Sponsor', + 'Expected Sales Count' => 'Ventes attendues', + 'Expected Response Count' => 'Nombre de retours attendu', + 'Expected ROI' => 'ROI attendu', + 'Actual Sales Count' => 'Ventes', + 'Actual Response Count' => 'Nombre de retours', + 'Actual ROI' => 'ROI', + 'Select One' => 'Choisir', + 'LBL_LOAD_LIST' => 'Charger une liste', + 'Conference' => 'Conférence', + 'Webinar' => 'Séminaire', + 'Trade Show' => 'Salon', + 'Public Relations' => 'Relation publique', + 'Partners' => 'Partenaire', + 'Referral Program' => 'Programme de référencement', + 'Advertisement' => 'Promotion', + 'Banner Ads' => 'Bannière publicitaire', + 'Direct Mail' => 'Mailing direct', + 'Email' => 'Email', + 'Telemarketing' => 'Télémarketing', + 'Others' => 'Autres', + 'Planning' => 'Planifié', + 'Active' => 'Actif', + 'Inactive' => 'Inactif', + 'Complete' => 'Terminé', + 'Completed' => 'Terminé', + 'Cancelled' => 'Annulé', + 'Excellent' => 'Excellent', + 'Good' => 'Bon', + 'Average' => 'Moyen', + 'Poor' => 'Faible', + 'Campaign No' => 'Campagne N°', + // 5.4.0 + '--None--'=>'--Aucun--', + 'Contacted - Successful' => 'Contacté - avec succès', + 'Contacted - Unsuccessful' => 'Contacté - sans succès', + 'Contacted - Never Contact Again' => 'Contacté - Ne pas recontacter', + 'Campaigns ID' => 'Campagne ID', +); + +?> diff --git a/modules/Campaigns/language/hu_hu.lang.php b/modules/Campaigns/language/hu_hu.lang.php new file mode 100644 index 0000000..e60a988 --- /dev/null +++ b/modules/Campaigns/language/hu_hu.lang.php @@ -0,0 +1,82 @@ + 'Kampány adatok', + 'LBL_CUSTOM_INFORMATION' => 'Egyedi adatok', + 'LBL_DESCRIPTION_INFORMATION' => 'Leírás', + 'LBL_EXPECTATIONS_AND_ACTUALS' => 'Várható adatok és jelenlegi adatok', + 'Campaign Name' => 'Kampány neve', + 'Campaign Type' => 'Kampány típusa', + 'Campaign Status' => 'Kampány állapot', + 'Campaign ID' => 'Kampány ID', + 'Expected Close Date' => 'Várható lezárás dátuma', + 'Expected Revenue' => 'Várható jövedelem', + 'Budget Cost' => 'Tervezett költség', + 'Actual Cost' => 'Jelenlegi költség', + 'Expected Response' => 'Várható reakció', + 'Assigned To' => 'Felelős', + 'Num Sent' => 'Küldött db', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Description' => 'Leírás:', + 'Product' => 'Termék', + 'Target Audience' => 'Célközönség', + 'TargetSize' => 'Célkitűzés nagysága', + 'Sponsor' => 'Szponzor', + 'Expected Sales Count' => 'Várható megrendelések száma', + 'Expected Response Count' => 'Várható visszajelzési darabszám', + 'Expected ROI' => 'Várható megtérülés', + 'Actual Sales Count' => 'Jelenleg: megrendelések száma', + 'Actual Response Count' => 'Jelenlegi visszajelzési darabszám', + 'Actual ROI' => 'Jelenlegi megtérülés', + 'Select One' => 'Válassz ki egyet', + 'LBL_LOAD_LIST' => 'Lista betöltése', + 'Conference' => 'Konferencia', + 'Webinar' => 'Webinar', + 'Trade Show' => 'Árubemutató', + 'Public Relations' => 'Public Relations', + 'Partners' => 'Partnerek', + 'Referral Program' => 'Ajánló program', + 'Advertisement' => 'Hirdetés', + 'Banner Ads' => 'Banner hirdetés', + 'Direct Mail' => 'Direct Mail', + 'Email' => 'Email', + 'Telemarketing' => 'Telemarketing', + 'Others' => 'Más, egyéb', + 'Planning' => 'Tervezés', + 'Active' => 'Aktív', + 'Inactive' => 'Inaktív', + 'Complete' => 'Kész', + 'Cancelled' => 'Törölt', + 'Excellent' => 'Kiválló', + 'Good' => 'Jó', + 'Average' => 'Közepes', + 'Poor' => 'Gyenge', + 'Campaign No' => 'Kampány No.', + '--None--' => '--Nincs--', + 'Contacted - Successful' => 'Kapcsolatfelvétel - Sikeres', + 'Contacted - Unsuccessful' => 'Kapcsolatfelvétel - Sikertelen', + 'Contacted - Never Contact Again' => 'Kapcsolatfelvétel - Felejtős örökre', + 'Campaigns ID' => 'Kampány AZ', + 'Completed' => 'Kész' +); +?> \ No newline at end of file diff --git a/modules/Campaigns/language/nl_nl.lang.php b/modules/Campaigns/language/nl_nl.lang.php new file mode 100644 index 0000000..a6639d7 --- /dev/null +++ b/modules/Campaigns/language/nl_nl.lang.php @@ -0,0 +1,107 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.4 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Campaigns/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +// Added in release 5.0 +'LBL_CAMPAIGN_INFORMATION'=>'Campagne informatie', +'LBL_CUSTOM_INFORMATION'=>'Klantinformatie', +'LBL_DESCRIPTION_INFORMATION'=>'Omschrijving', +'LBL_EXPECTATIONS_AND_ACTUALS'=>'Verwachting en actueel', + +'Campaign Name'=>'Campagne naam', +'Campaign Type'=>'Campagne type', +'Campaign Status'=>'Campagne status', +'Campaign ID'=>'Campagne', +'Expected Close Date'=>'Verwachte sluitingsdatum', +'Expected Revenue'=>'Verwachte omzet', +'Budget Cost'=>'Budget kosten', +'Actual Cost'=>'Actuele kosten', +'Expected Response'=>'Verwachte reactie', +'Assigned To'=>'Toegewezen aan', +'Num Sent'=>'Aantal verzonden', +'Created Time'=>'Aangemaakt', +'Modified Time'=>'Gewijzigd', +'Description'=>'Omschrijving', +'Product'=>'Product', +'Target Audience'=>'Doelgroep', +'TargetSize'=>'Doelgroep grote', +'Sponsor'=>'Sponsor', + +'Expected Sales Count'=>'Verwachte verkoop', +'Expected Response Count'=>'Verwachte reactie', +'Expected ROI'=>'Verwachte opbrengsten', + +'Actual Sales Count'=>'Actuele verkoop', +'Actual Response Count'=>'Actuele reactie', +'Actual ROI'=>'Actuele opbrengsten', +'Select One'=>'Selecteer', +'LBL_LOAD_LIST'=>'Lijst laden', + +//Added for existing Picklist Entries + +'Conference'=>'Conferentie', +'Webinar'=>'Webinar', +'Trade Show'=>'Beurs', +'Public Relations'=>'Public Relations', +'Partners'=>'Partners', +'Referral Program'=>'Referral programma', +'Advertisement'=>'Advertie', +'Banner Ads'=>'Banner advertenties', +'Direct Mail'=>'Direct mail', +'Email'=>'E-mail', +'Telemarketing'=>'Telemarketing', +'Others'=>'Anders', + +'Planning'=>'Planning', +'Active'=>'Actief', +'Inactive'=>'Inactief', +'Complete'=>'Gereed', +'Cancelled'=>'Afgezegd', + +'Excellent'=>'Uitstekend', +'Good'=>'Goed', +'Average'=>'Gemiddeld', +'Poor'=>'Slecht', + +//Module Sequence Numbering +'Campaign No'=>'Campagnenummer', +// status fields +'--None--'=>'--None--', +'Contacted - Successful' => 'Contact gehad - Success', +'Contacted - Unsuccessful' => 'Contact gehad - Geen success', +'Contacted - Never Contact Again' => 'Contact gehad - Nooit meer contacten' +// END + +); + +?> diff --git a/modules/Campaigns/language/pt_br.lang.php b/modules/Campaigns/language/pt_br.lang.php new file mode 100644 index 0000000..db435a5 --- /dev/null +++ b/modules/Campaigns/language/pt_br.lang.php @@ -0,0 +1,96 @@ +'Informação da Campanha', +'LBL_CUSTOM_INFORMATION'=>'Informação Customizada', +'LBL_DESCRIPTION_INFORMATION'=>'Descrição da Informação', +'LBL_EXPECTATIONS_AND_ACTUALS'=>'Expectativas & Atualidades', + +'Campaign Name'=>'Nome Campanha', +'Campaign Type'=>'Tipo Campanha', +'Campaign Status'=>'Status Campanha', +'Campaign ID'=>'ID Campanha', +'Expected Close Date'=>'Previsão Fechamento', +'Expected Revenue'=>'Previsão Receita', +'Budget Cost'=>'Custo Orçado', +'Actual Cost'=>'Custo Atual', +'Expected Response'=>'Expectativa Resposta', +'Assigned To'=>'Responsável', +'Num Sent'=>'No. Envio', +'Created Time'=>'Data Criação', +'Modified Time'=>'Data Modificação', +'Description'=>'Descrição', +'Product'=>'Produto', +'Target Audience'=>'Público Alvo', //Contribuição de Maristela Trindade +'TargetSize'=>'Tamanho Alvo', +'Sponsor'=>'Patrocinador', + +'Expected Sales Count'=>'Montante Esperado Vendas', +'Expected Response Count'=>'Quantidade Resposta Esperada', +'Expected ROI'=>'Expectativa ROI', + +'Actual Sales Count'=>'Montante Vendas Atual', +'Actual Response Count'=>'Quantidade Resposta Atual', +'Actual ROI'=>'ROI Atual', +'Select One'=>'Selecione Um', +'LBL_LOAD_LIST'=>'Carregar Lista', + +//Added for existing Picklist Entries + +'Conference'=>'Conferência', +'Webinar'=>'Seminário via Web', +'Trade Show'=>'Feiras', +'Public Relations'=>'Relações Públicas', +'Partners'=>'Parceiros', +'Referral Program'=>'Programa Referência', +'Advertisement'=>'Propaganda', +'Banner Ads'=>'Banners', +'Direct Mail'=>'Mala Direta', +'Email'=>'Email', +'Telemarketing'=>'Telemarketing', +'Others'=>'Outros', + +'Planning'=>'Planejamento', +'Active'=>'Ativa', +'Inactive'=>'Inativa', +'Complete'=>'Completa', +'Cancelled'=>'Cancelada', + +'Excellent'=>'Excelente', +'Good'=>'Boa', +'Average'=>'Média', +'Poor'=>'Ruim', + +//Module Sequence Numbering +'Campaign No'=>'No. Campanha', +// status fields +'--None--'=>'--Nada--', +'Contacted - Successful' => 'Contactado - Sucesso', +'Contacted - Unsuccessful' => 'Contactado - Insucesso', +'Contacted - Never Contact Again' => 'Contactado - Nunca Contactar Novamente', +// END +'Campaigns ID' => 'ID Campanhas', +); + +?> diff --git a/modules/Campaigns/language/zh_cn.lang.php b/modules/Campaigns/language/zh_cn.lang.php new file mode 100644 index 0000000..298bee9 --- /dev/null +++ b/modules/Campaigns/language/zh_cn.lang.php @@ -0,0 +1,98 @@ +'营销活动信息', +'LBL_CUSTOM_INFORMATION'=>'自定义信息', +'LBL_DESCRIPTION_INFORMATION'=>'详细信息', +'LBL_EXPECTATIONS_AND_ACTUALS'=>'预期与实际', + +'Campaign Name'=>'营销活动名称', +'Campaign Type'=>'营销活动类型', +'Campaign Status'=>'营销活动状态', +'Campaign ID'=>'营销活动编号', +'Expected Close Date'=>'预计结束日期', +'Expected Revenue'=>'预期收益', +'Budget Cost'=>'成本预算', +'Actual Cost'=>'实际成本', +'Expected Response'=>'预期反应', +'Assigned To'=>'负责人', +'Num Sent'=>'寄送数量', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', +'Description'=>'描述', +'Product'=>'产品', +'Target Audience'=>'目标族群', +'TargetSize'=>'目标规模', +'Sponsor'=>'主办方', + + +'Expected Sales Count'=>'预期销售数量', +'Expected Response Count'=>'预期回应数量', +'Expected ROI'=>'预期回报率', + + 'Actual Sales Count'=>'实际销售数量', +'Actual Response Count'=>'实际回应数量', +'Actual ROI'=>'实际回报率', +'Select One'=>'选择一个', +'LBL_LOAD_LIST'=>'加载列表', + +//Added for existing Picklist Entries + +'Conference'=>'研讨会', +'Webinar'=>'网上交流会', +'Trade Show'=>'贸易展览', +'Public Relations'=>'公共关系', +'Partners'=>'合作伙伴', +'Referral Program'=>'介绍活动', +'Advertisement'=>'广告', +'Banner Ads'=>'网络广告', +'Direct Mail'=>'邮件营销', +'Email'=>'Email', +'Telemarketing'=>'电话营销', +'Others'=>'其它', + +'Planning'=>'计划中', +'Active'=>'活动', +'Inactive'=>'停止', +'Completed'=>'完成', +'Cancelled'=>'取消', + +'Excellent'=>'极佳', +'Good'=>'好', +'Average'=>'一般', +'Poor'=>'差', + +//Module Sequence Numbering +'Campaign No'=>'营销活动编号', +// status fields +'--None--'=>'-- 无 --', +'Contacted - Successful'=>'已取得联系 - 成功', +'Contacted - Unsuccessful'=>'已取得联系 - 失败', +'Contacted - Never Contact Again'=>'已取得联系 - 今后不再联系' +// END + +); + +?> diff --git a/modules/Campaigns/updateRelations.php b/modules/Campaigns/updateRelations.php new file mode 100644 index 0000000..a94db7e --- /dev/null +++ b/modules/Campaigns/updateRelations.php @@ -0,0 +1,39 @@ + diff --git a/modules/Campaigns/updateRelationsAjax.php b/modules/Campaigns/updateRelationsAjax.php new file mode 100644 index 0000000..02cfc5b --- /dev/null +++ b/modules/Campaigns/updateRelationsAjax.php @@ -0,0 +1,52 @@ +pquery($sql, $params)) +{ + echo ":#:SUCCESS"; +} +else +{ + echo ":#:FAILURE"; +} + +exit; + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/ConfigEditor.js b/modules/ConfigEditor/ConfigEditor.js new file mode 100644 index 0000000..4b4c74f --- /dev/null +++ b/modules/ConfigEditor/ConfigEditor.js @@ -0,0 +1,45 @@ +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ************************************************************************************/ +function replaceUploadSize(){ + var upload = document.getElementById('key_upload_maxsize').value; + upload = "'"+upload+"'"; + upload = upload.replace(/000000/g,""); + upload = upload.replace(/'/g,""); + document.getElementById('key_upload_maxsize').value = upload; +} + + +function vtlib_field_help_show_this(basenode, fldname) { + var domnode = $('vtlib_fieldhelp_div'); + + + + var helpcontent = document.getElementById('helpInfo').value; + + + if(!domnode) { + domnode = document.createElement('div'); + domnode.id = 'vtlib_fieldhelp_div'; + domnode.className = 'dvtSelectedCell'; + domnode.style.position = 'absolute'; + domnode.style.width = '150px'; + domnode.style.padding = '4px'; + domnode.style.fontWeight = 'normal'; + document.body.appendChild(domnode); + + domnode = $('vtlib_fieldhelp_div'); + Event.observe(domnode, 'mouseover', function() { $('vtlib_fieldhelp_div').show(); }); + Event.observe(domnode, 'mouseout', vtlib_field_help_hide); + } + else { + domnode.show(); + } + domnode.innerHTML = helpcontent; + fnvshobj(basenode,'vtlib_fieldhelp_div'); +} diff --git a/modules/ConfigEditor/ConfigEditor.php b/modules/ConfigEditor/ConfigEditor.php new file mode 100644 index 0000000..d61c62f --- /dev/null +++ b/modules/ConfigEditor/ConfigEditor.php @@ -0,0 +1,57 @@ +query_result( + $adb->pquery("SELECT blockid FROM vtiger_settings_blocks WHERE label='LBL_OTHER_SETTINGS'",array()), + 0, 'blockid'); + $sequence = (int)$adb->query_result( + $adb->pquery("SELECT max(sequence) as sequence FROM vtiger_settings_field WHERE blockid=?",array($blockid)), + 0, 'sequence') + 1; + $fieldid = $adb->getUniqueId('vtiger_settings_field'); + $adb->pquery("INSERT INTO vtiger_settings_field (fieldid,blockid,sequence,name,iconpath,description,linkto) + VALUES (?,?,?,?,?,?,?)", array($fieldid, $blockid,$sequence,$displayLabel,'migrate.gif','Update configuration file of the application', 'index.php?module=ConfigEditor&action=index')); + } else { + $adb->pquery("DELETE FROM vtiger_settings_field WHERE name=?", array($displayLabel)); + } + } +} + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/ConfigEditorAjax.php b/modules/ConfigEditor/ConfigEditorAjax.php new file mode 100644 index 0000000..efae0a9 --- /dev/null +++ b/modules/ConfigEditor/ConfigEditorAjax.php @@ -0,0 +1,11 @@ + diff --git a/modules/ConfigEditor/ConfigEditorHandler.php b/modules/ConfigEditor/ConfigEditorHandler.php new file mode 100644 index 0000000..74ef1c2 --- /dev/null +++ b/modules/ConfigEditor/ConfigEditorHandler.php @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/modules/ConfigEditor/ConfigFileReader.php b/modules/ConfigEditor/ConfigFileReader.php new file mode 100644 index 0000000..1daf6f5 --- /dev/null +++ b/modules/ConfigEditor/ConfigFileReader.php @@ -0,0 +1,305 @@ +filepath = $path; + $this->viewables = $viewables; + $this->editables = $editables; + $this->read(); + } + + /** + * Read and parse the configuration file contents. + */ + protected function read() { + $fileContent = trim(file_get_contents($this->filepath)); + $pattern = '/\$([^=]+)=([^;]+);/'; + $matches = null; + $matchesFound = preg_match_all($pattern, $fileContent, $matches); + $configContents = array(); + if($matchesFound) { + $configContents = $matches[0]; + } + $this->rows = array(); + foreach($configContents as $configLine) { + $this->rows[] = new ConfigFileRow($configLine, $this); + } + $this->rowIndex = -1; + unset($fileContent); + } + + /** + * Save the rows back to configuration. + */ + function save() { + $fileContent = trim(file_get_contents($this->filepath)); + if ($this->rows) { + $fp = fopen($this->filepath, 'w'); + $rowcount = count($this->rows); + for($index = 0; $index < $rowcount; ++$index) { + $row = $this->rows[$index]; + if($row->isEditable()) { + $variableName = $row->variableName(); + $newVariableValue = $row->variableValue(); + $pattern = '/\$'.$variableName.'[\s]+=([^;]+);/'; + $replacement = $row->toString(); + $fileContent = preg_replace($pattern, $replacement, $fileContent); + } + } + fwrite($fp, $fileContent); + fclose($fp); + } + } + + function editables($key = false) { + if ($key === false) return array_keys($this->editables); + return $this->editables[$key]; + } + + function viewables($key = false) { + if ($key === false) return array_keys($this->viewables); + return $this->viewables[$key]; + } + + /** + * Set new value to the desired variable. + */ + function setVariableValue($name, $value) { + if ($this->rows) { + foreach($this->rows as $row) { + if ($row->matchesVariableName($name)) { + if($name == 'upload_maxsize'){ + return $row->setVariableValue($value*1000000); + }else{ + return $row->setVariableValue($value); + } + } + } + } + } + + /** + * Get all the rows + */ + function getAll() { + return $this->rows; + } + + /** + * Has next row to read? + */ + function next() { + if ($this->rowIndex++ < count($this->rows)) { + return true; + } + } + + /** + * Get the current row during iteration (please call next() before this) + */ + function get() { + return $this->rows[$this->rowIndex]; + } + + /** + * Rewind the iteration + */ + function rewind() { + $this->rowIndex = 0; + } +} + +/** + * Configuration file row class + */ +class ConfigFileRow { + // Actual line content + protected $lineContent; + // Parsed variable name and value + protected $parsedVarName = false; + protected $parsedVarValue= ''; + + // Is the variable of string type? + protected $isValueString = false; + + // Some variables which is never editable + protected static $alltimeNoneditableVars = array( + "dbconfig['db_server']", + "application_unique_key" + ); + + // Editable and Viewable variable names + protected $parent; + + // Is the variable value editable? + protected $isValueEditable = false; + + // Regex to detect variable name and its safe value + static $variableRegex = '/^[ \t]*\\$([^=]+)=([^;]+)/'; + //Regex to detect support name,it doesnt allow any single quote,and special characters,it does allow only alpha numeric,utf8,.com,@ + static $variableUnSafeValueRegex = "/[\x{4e00}-\x{9fa5}[:print:]]+.*\-/u"; + /** + * Constructor + */ + function __construct($content, $parent) { + $this->lineContent = $content; + $this->parent = $parent; + $this->parse(); + } + + /** + * Parse the content + */ + protected function parse() { + if (preg_match(self::$variableRegex, $this->lineContent, $m)) { + $this->parsedVarName = trim($m[1]); + $this->parsedVarValue = trim($m[2]); + // Is variable string type? + if (strpos($this->parsedVarValue, "'") === 0 || strpos($this->parsedVarValue, '"') === 0) { + $this->isValueString = true; + $this->parsedVarValue = trim($m[2], "'\" "); + } + if (!in_array($this->parsedVarName, self::$alltimeNoneditableVars)) { + $this->isValueEditable = true; + } else { + $this->isValueEditable = false; + } + } + } + + /** + * Does the row represent variable? + */ + function isVariable() { + return ($this->parsedVarName !== false); + } + + /** + * Is the variable viewable? + */ + function isViewable() { + if ($this->isVariable()) { + $editables = $this->parent->editables(); + if (!empty($editables)) { + return in_array($this->parsedVarName, $this->parent->viewables()); + } else { + return true; + } + } + return false; + } + + /** + * Is the variable editable? + */ + function isEditable() { + if ($this->isVariable()) { + $editables = $this->parent->editables(); + if (empty($editables)) { + return $this->isValueEditable; + } + return ((in_array($this->parsedVarName, $editables) !== false) && $this->isValueEditable); + } + return false; + } + + /** + * Get variable name + */ + function variableName() { + return $this->parsedVarName; + } + + /** + * Check if the variable name matches with input + */ + function matchesVariableName($input) { + $input = ltrim($input, '$'); + return ($input == $this->parsedVarName); + } + + /** + * Get variable value + */ + function variableValue() { + return $this->parsedVarValue; + } + + /** + * Is the variable value string type? + */ + function isValueString() { + return $this->isValueString; + } + + /** + * Set the variable value + */ + function setVariableValue($value) { + // TODO Avoid any PHP String concate hacks + if (preg_match(self::$variableUnSafeValueRegex, $value, $m)) { + return false; + } + // Should the value be restricted to a set? + $meta = $this->meta(); + if (isset($meta['values']) && is_array($meta['values']) ) { + $allowedValues = array_keys($meta['values']); + if (!empty($allowedValues) && !in_array($value, $allowedValues)) { + return false; + } + } + $this->parsedVarValue = $value; + return true; + } + + /** + * Get the meta information + */ + function meta() { + if ($this->isEditable()) return $this->parent->editables($this->parsedVarName); + if ($this->isViewable()) return $this->parent->viewables($this->parsedVarName); + return false; + } + + /** + * String representation of the instance + */ + function toString() { + if ($this->isVariable()) { + $encloseWith = ""; + if ($this->isValueString()) { + $encloseWith = "'"; + } + return sprintf("\$%s = %s%s%s;", $this->parsedVarName, $encloseWith, $this->parsedVarValue, $encloseWith); + } + return $this->lineContent; + } +} +?> \ No newline at end of file diff --git a/modules/ConfigEditor/ConfigurationUtils.php b/modules/ConfigEditor/ConfigurationUtils.php new file mode 100644 index 0000000..dabbc16 --- /dev/null +++ b/modules/ConfigEditor/ConfigurationUtils.php @@ -0,0 +1,23 @@ +pquery($query, array()); + $rows = $adb->num_rows($res); + for($i=0; $i <$rows; $i++) { + $module[] = $adb->query_result($res, $i, 'name'); + } + $modules = array_merge($module,$additionalModules); + $modules = array_diff($modules,$unusedmodules); + return $modules; + } +} +?> diff --git a/modules/ConfigEditor/Request.php b/modules/ConfigEditor/Request.php new file mode 100644 index 0000000..3c520c6 --- /dev/null +++ b/modules/ConfigEditor/Request.php @@ -0,0 +1,32 @@ +valuemap = $values; + } + + function get($key, $defvalue='') { + $value = $defvalue; + if (isset($this->valuemap[$key])) { + $value = $this->valuemap[$key]; + } + if (!empty($value)) { + $value = vtlib_purify($value); + } + return $value; + } + + function values() { + return $this->valuemap; + } +} +?> \ No newline at end of file diff --git a/modules/ConfigEditor/Viewer.php b/modules/ConfigEditor/Viewer.php new file mode 100644 index 0000000..7a5521d --- /dev/null +++ b/modules/ConfigEditor/Viewer.php @@ -0,0 +1,30 @@ +assign('CUSTOM_MODULE', true); + + $this->assign('APP', $app_strings); + $this->assign('MOD', $mod_strings); + $this->assign('MODULE', $currentModule); + // TODO: Update Single Module Instance name here. + $this->assign('SINGLE_MOD', 'SINGLE_'.$currentModule); + $this->assign('CATEGORY', 'Settings'); + $this->assign('IMAGE_PATH', "themes/$theme/images/"); + $this->assign('THEME', $theme); + } +} +?> \ No newline at end of file diff --git a/modules/ConfigEditor/config.php b/modules/ConfigEditor/config.php new file mode 100644 index 0000000..f99df21 --- /dev/null +++ b/modules/ConfigEditor/config.php @@ -0,0 +1,45 @@ + getTranslatedString('LBL_TRUE','ConfigEditor'), + 'false' => getTranslatedString('LBL_FALSE','ConfigEditor') +); + +$__ConfigEditor_Config = array( + + 'edit.filepath' => dirname(__FILE__) . '/../../config.inc.php', + + /* CONFIGURE: + * List the configuration variables that user can set. + * By setting it to array() lets allows editing of all variables but it is not RECOMMENDED + */ + 'allow.editing.variables' => array( + 'CALENDAR_DISPLAY' => array('label'=>getTranslatedString('LBL_MINI_CALENDAR_DISPLAY','ConfigEditor'),'values'=>$trueFalseArray), + 'WORLD_CLOCK_DISPLAY' => array('label'=> getTranslatedString('LBL_WORLD_CLOCK_DISPLAY','ConfigEditor'),'values'=>$trueFalseArray), + 'CALCULATOR_DISPLAY' => array('label' => getTranslatedString('LBL_CALCULATOR_DISPLAY','ConfigEditor') , 'values'=>$trueFalseArray), + 'USE_RTE' => array('label'=>getTranslatedString('LBL_USE_RTE','ConfigEditor'), 'values'=>$trueFalseArray), + 'HELPDESK_SUPPORT_EMAIL_ID'=>array('label'=>getTranslatedString('LBL_HELPDESK_SUPPORT_EMAILID','ConfigEditor'),'values'=>array()), + 'HELPDESK_SUPPORT_NAME' => array('label' => getTranslatedString('LBL_HELPDESK_SUPPORT_NAME','ConfigEditor'),'values'=>array()), + 'upload_maxsize' => array('label'=>getTranslatedString('LBL_MAX_UPLOAD_SIZE','ConfigEditor'),'values'=>array()), + 'history_max_viewed' => array('label'=>getTranslatedString('LBL_MAX_HISTORY_VIEWED','ConfigEditor'),'values'=>array()), + 'default_module' => array('label'=>getTranslatedString('LBL_DEFAULT_MODULE','ConfigEditor'),'values'=>$moduleLabels), + 'listview_max_textlength' => array('label' => getTranslatedString('LBL_MAX_TEXT_LENGTH_IN_LISTVIEW','ConfigEditor'), 'values' => array() ), + 'list_max_entries_per_page' => array('label' => getTranslatedString('LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW','ConfigEditor'), 'values'=> array()), + ) + +); +?> \ No newline at end of file diff --git a/modules/ConfigEditor/index.php b/modules/ConfigEditor/index.php new file mode 100644 index 0000000..a77c865 --- /dev/null +++ b/modules/ConfigEditor/index.php @@ -0,0 +1,113 @@ +getViewer(); + $viewer->display(vtlib_getModuleTemplate('Vtiger', 'OperationNotPermitted.tpl')); + exit; + } + + /** + * Core processing method + */ + function process(ConfigEditor_Request $request) { + $this->authCheck(); + $type = $request->get('type'); + if ($type == 'save') { + $this->processSave($request); + } else { + $this->processDefault($request); + } + } + + /** + * Default action + */ + protected function processDefault($request) { + global $currentModule; + + $configReader = $this->getReader(); + $viewer = $this->getViewer(); + + if (is_null($configReader)) { + $viewer->assign('WARNING', 'Configuration file is not writeable!'); + } else if ($configReader === false) { + $viewer->assign('WARNING', 'Configuration file not found!'); + } else { + $viewer->assign('CONFIGREADER', $configReader); + } + $viewer->display(vtlib_getModuleTemplate($currentModule, 'index.tpl')); + } + + /** + * Save action + */ + protected function processSave($request) { + $configReader = $this->getReader(); + + if ($configReader) { + $reqvalues = $request->values(); + foreach($reqvalues as $k => $v) { + if (preg_match("/key_([^ ]+)/", $k, $m)) { + $configReader->setVariableValue($m[1], $v); + } + } + $configReader->save(); + } + header('Location: index.php?module=ConfigEditor&action=index'); + } +} + +$controller = new ConfigEditor_Controller(); +$controller->process(new ConfigEditor_Request($_REQUEST)); + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/de_de.lang.php b/modules/ConfigEditor/language/de_de.lang.php new file mode 100644 index 0000000..f76edc8 --- /dev/null +++ b/modules/ConfigEditor/language/de_de.lang.php @@ -0,0 +1,46 @@ + 'Konfigurationseditor', + 'LBL_CONFIG_EDITOR' => 'Konfigurations Editor', + 'LBL_SETTINGS' => 'Einstellungen', + 'LBL_CONFIG_EDIT'=>'Bearbeiten der vtiger CRM Konfigurationsdetails', + 'SINGLE_ConfigEditor' => 'Konfigurationseditor', + 'LBL_TRUE'=> 'ja', + 'LBL_FALSE'=> 'nein', + 'LBL_MAX_UPLOAD_SIZE_MSG'=> 'Maximale Uploadgröße ist 5 MB', + 'LBL_INVALID_EMAIL_MSG'=>'Ungültige E-Mail-Adresse', + 'LBL_EMPTY_NAME_MSG'=> 'Supportname darf nicht leer sein', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG'=>'Die maximale Anzahl der Einträge in der Listenansicht sind 100 Zeichen', + 'LBL_MAX_HISTORY_VIEWED_MSG'=>'Bitte geben Sie eine Zahl im Bereich von 1 - 5 an', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG'=>'Maximale Textlänge sind 100 Zeichen ', + 'LBL_MB'=>'MB', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Minikalendaranzeige', + 'LBL_WORLD_CLOCK_DISPLAY'=>'Weltuhranzeige', + 'LBL_CALCULATOR_DISPLAY'=>'Taschenrechneranzeige', + 'LBL_USE_RTE'=>'Benutze CKEditor', + 'LBL_HELPDESK_SUPPORT_EMAILID'=>'Trouble Ticket E-Mail-Id', + 'LBL_HELPDESK_SUPPORT_NAME'=>'Trouble Ticket Support Name', + 'LBL_MAX_UPLOAD_SIZE'=>'Maximale Uploadgröße (5MB)', + 'LBL_MAX_HISTORY_VIEWED'=>'Maximal angezeigte Historie', + 'LBL_DEFAULT_MODULE'=>'Standardmodul', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW'=>'Maximale Textlänge in der Listenansicht', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW'=>'Maximale Einträge/Seite in der Listenansicht', + 'LBL_CONFIG_FILE'=>'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' =>'Sie bearbeiten die Konfigurationsdateien von vtiger CRM. ', + 'LBL_DOUBLE_CHECK_INFO'=>'Bitte überprüfen Sie nochmals die Werte, bevor Sie die Änderungen speichern!', + 'LBL_HELP_INFO'=>"Diese wird als 'Von E-Mail-Id' genutzt, + um einen neuen Benutzer über seine Zugangsdaten zu informieren, + falls Trouble Tickets einem Benutzer zugewiesen werden oder eine E-Mail als Erinnerung oder Benachrichtigung versendet wird. ", + +); + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/en_gb.lang.php b/modules/ConfigEditor/language/en_gb.lang.php new file mode 100644 index 0000000..6c11693 --- /dev/null +++ b/modules/ConfigEditor/language/en_gb.lang.php @@ -0,0 +1,43 @@ + 'Config Editor', + 'LBL_CONFIG_EDITOR' => 'Configuration Editor', + 'LBL_SETTINGS' => 'Settings', + 'LBL_CONFIG_EDIT' => 'Edit the configuration details of vtiger CRM', + 'SINGLE_ConfigEditor' => 'Config Editor', + 'LBL_TRUE' => 'true', + 'LBL_FALSE' => 'false', + 'LBL_MAX_UPLOAD_SIZE_MSG' => 'Maximum upload size is 5MB', + 'LBL_INVALID_EMAIL_MSG' => 'Invalid email address', + 'LBL_EMPTY_NAME_MSG' => 'Support Name cannot be empty', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG' => 'Maximum entries in the listview is 100', + 'LBL_MAX_HISTORY_VIEWED_MSG' => 'Please enter a number in the range 1-5', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG' => 'Maximum text length is 100', + 'LBL_MB' => 'MB', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Mini Calendar Display', + 'LBL_WORLD_CLOCK_DISPLAY' => 'World Clock Display', + 'LBL_CALCULATOR_DISPLAY' => 'Calculator Display', + 'LBL_USE_RTE' => 'Use RTE', + 'LBL_HELPDESK_SUPPORT_EMAILID' => 'Helpdesk Support email address', + 'LBL_HELPDESK_SUPPORT_NAME' => 'Helpdesk Support name', + 'LBL_MAX_UPLOAD_SIZE' => 'Max. Upload size (Max. 5MB)', + 'LBL_MAX_HISTORY_VIEWED' => 'Max. History viewed', + 'LBL_DEFAULT_MODULE' => 'Default Module', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW' => 'Max. text length in listview', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW' => 'Max. entries per page in listview', + 'LBL_CONFIG_FILE' => 'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' => 'You are editing the configuration details of vtiger CRM', + 'LBL_DOUBLE_CHECK_INFO' => 'Please double check before saving the values', + 'LBL_HELP_INFO' => 'This is the \'From email address\' used when sending an email to a new user informing them of their login credentials, sending an email to a trouble-ticket owner about the ticket assigned and when sending email reminders and notifications.', + 'LBL_RESTRICTED_CHARACTERS' => 'Special characters like \' " and ; are not allowed' +); +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/en_us.lang.php b/modules/ConfigEditor/language/en_us.lang.php new file mode 100644 index 0000000..3088962 --- /dev/null +++ b/modules/ConfigEditor/language/en_us.lang.php @@ -0,0 +1,46 @@ + 'ConfigEditor', + 'LBL_CONFIG_EDITOR' => 'Configuration Editor', + 'LBL_SETTINGS' => 'Settings', + 'LBL_CONFIG_EDIT'=>'Edit the Configuration details of vtiger CRM', + 'SINGLE_ConfigEditor' => 'ConfigEditor', + 'LBL_TRUE'=> 'true', + 'LBL_FALSE'=> 'false', + 'LBL_MAX_UPLOAD_SIZE_MSG'=> 'Maximum upload size is 5MB', + 'LBL_INVALID_EMAIL_MSG'=>'Invalid Email Address', + 'LBL_EMPTY_NAME_MSG'=> 'Support Name cannot be empty', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG'=>'Maximum entries in the ListView is 100', + 'LBL_MAX_HISTORY_VIEWED_MSG'=>'Please enter a number in the range 1-5', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG'=>'Maximum text length is 100', + 'LBL_MB'=>'MB', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Mini Calendar Display', + 'LBL_WORLD_CLOCK_DISPLAY'=>'World Clock Display', + 'LBL_CALCULATOR_DISPLAY'=>'Calculator Display', + 'LBL_USE_RTE'=>'Use RTE', + 'LBL_HELPDESK_SUPPORT_EMAILID'=>'Helpdesk Support Email-Id', + 'LBL_HELPDESK_SUPPORT_NAME'=>'Helpdesk Support Name', + 'LBL_MAX_UPLOAD_SIZE'=>'Max.Upload Size (Max 5MB)', + 'LBL_MAX_HISTORY_VIEWED'=>'Max. History Viewed', + 'LBL_DEFAULT_MODULE'=>'Default Module', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW'=>'Max. text length in listview', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW'=>'Max. entries per page in listview', + 'LBL_CONFIG_FILE'=>'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' =>'You are editing the configuration details of vtiger CRM.', + 'LBL_DOUBLE_CHECK_INFO'=>'Please do double check before saving the values.', + 'LBL_HELP_INFO'=>"This is used as a 'From email-id' to send a mail to a new user created about his login credentials, + send a mail to trouble-ticket owner about the ticket assigned,send a mail about reminder and notification.", + 'LBL_RESTRICTED_CHARACTERS'=>"Special characters like ' " and ; are not allowed", + + ); + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/es_es.lang.php b/modules/ConfigEditor/language/es_es.lang.php new file mode 100644 index 0000000..0068ddf --- /dev/null +++ b/modules/ConfigEditor/language/es_es.lang.php @@ -0,0 +1,54 @@ + 'Editor Configuración', + 'LBL_CONFIG_EDITOR' => 'Editor Configuración', + 'LBL_SETTINGS' => 'Configuración', + 'LBL_CONFIG_EDIT'=>'Editar la Configuración de vtiger CRM', + 'SINGLE_ConfigEditor' => 'Editor Configuración', + 'LBL_TRUE'=> 'verdadero', + 'LBL_FALSE'=> 'falso', + 'LBL_MAX_UPLOAD_SIZE_MSG'=> 'Tamaño máximo de carga es 5MB', + 'LBL_INVALID_EMAIL_MSG'=>'Correo Electrónico Inválido', + 'LBL_EMPTY_NAME_MSG'=> 'Nombre de Soporte no puede quedar vacío', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG'=>'Número máximo de entradas en Vista de Lista es 100', + 'LBL_MAX_HISTORY_VIEWED_MSG'=>'Introduce un número entre 1 y 5', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG'=>'Longitud de texto máximo es 100', + 'LBL_MB'=>'MB', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Mostrar Calendario', + 'LBL_WORLD_CLOCK_DISPLAY'=>'Mostrar Reloj Mundial', + 'LBL_CALCULATOR_DISPLAY'=>'Mostrar Calculadora', + 'LBL_USE_RTE'=>'Utilizar Editor Enriquecido', + 'LBL_HELPDESK_SUPPORT_EMAILID'=>'Email de Asistencia y Soporte', + 'LBL_HELPDESK_SUPPORT_NAME'=>'Nombre de Asistencia y Soporte', + 'LBL_MAX_UPLOAD_SIZE'=>'Tamaño máximo de carga (Máx 5MB)', + 'LBL_MAX_HISTORY_VIEWED'=>'Tamaño Histórico de Navegación', + 'LBL_DEFAULT_MODULE'=>'Módulo Inicial', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW'=>'Longitud de texto en vista de lista', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW'=>'Entradas por página en vista de lista', + 'LBL_CONFIG_FILE'=>'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' =>'Estás editando la configuración de vtiger CRM.', + 'LBL_DOUBLE_CHECK_INFO'=>'Por favor, verifica los valores introducidos antes de guardar.', + 'LBL_HELP_INFO'=>"Esto se utiliza como correo de respuesta al notificar un usuario recién creado, + notificar de la asignación de una incidencia y otras notificaciones y recordatorios en general.", + 'LBL_RESTRICTED_CHARACTERS'=>"Caracteres especiales como ' " y ; no son permitidos", + +); + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/es_mx.lang.php b/modules/ConfigEditor/language/es_mx.lang.php new file mode 100644 index 0000000..df1d9d6 --- /dev/null +++ b/modules/ConfigEditor/language/es_mx.lang.php @@ -0,0 +1,54 @@ + 'Editor de Configuración', + 'LBL_CONFIG_EDITOR' => 'Editor de Config.inc.php', + 'LBL_SETTINGS' => 'Parámetros', + 'LBL_CONFIG_EDIT'=>'Editar la Configuración de vtiger CRM', + 'SINGLE_ConfigEditor' => 'Editor de Configuración', + 'LBL_TRUE'=> 'verdadero', + 'LBL_FALSE'=> 'Falso', + 'LBL_MAX_UPLOAD_SIZE_MSG'=> 'Tamaño máximo de carga es 5MB', + 'LBL_INVALID_EMAIL_MSG'=>'Correo Electrónico Inválido', + 'LBL_EMPTY_NAME_MSG'=> 'Nombre de Soporte no puede quedar vacío', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG'=>'Número máximo de entradas en Vista de Lista es 100', + 'LBL_MAX_HISTORY_VIEWED_MSG'=>'Introduce un número entre 1 y 5', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG'=>'Longitud de texto máximo es 100', + 'LBL_MB'=>'MB', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Mostrar Mini Calendario', + 'LBL_WORLD_CLOCK_DISPLAY'=>'Mostrar Reloj Mundial', + 'LBL_CALCULATOR_DISPLAY'=>'Mostrar Calculadora', + 'LBL_USE_RTE'=>'Utilizar Editor Enriquecido', + 'LBL_HELPDESK_SUPPORT_EMAILID'=>'Email de Asistencia y Soporte', + 'LBL_HELPDESK_SUPPORT_NAME'=>'Nombre de Asistencia y Soporte', + 'LBL_MAX_UPLOAD_SIZE'=>'Tamaño máximo de carga (Máx 5MB)', + 'LBL_MAX_HISTORY_VIEWED'=>'Tamaño Histórico de Navegación', + 'LBL_DEFAULT_MODULE'=>'Módulo Inicial', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW'=>'Longitud de texto en vista de lista', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW'=>'Entradas por página en vista de lista', + 'LBL_CONFIG_FILE'=>'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' =>'Estás editando la configuración de vtiger CRM.', + 'LBL_DOUBLE_CHECK_INFO'=>'Por favor, revisa dos veces antes de salvar los valores.', + 'LBL_HELP_INFO'=>"Esto se utiliza como correo de respuesta al notificar un usuario recién creado, + notificar de la asignación de un caso, otras notificaciones y recordatorios en general.", + 'LBL_RESTRICTED_CHARACTERS'=>"Caracteres especiales como ' " y ; no son permitidos", + +); + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/fr_fr.lang.php b/modules/ConfigEditor/language/fr_fr.lang.php new file mode 100644 index 0000000..9316481 --- /dev/null +++ b/modules/ConfigEditor/language/fr_fr.lang.php @@ -0,0 +1,45 @@ + 'ConfigEditor', + 'LBL_CONFIG_EDITOR' => 'Configuration Editeur', + 'LBL_SETTINGS' => 'Configuration', + 'LBL_CONFIG_EDIT'=>'Edition de la configuration pour vtiger CRM', + 'SINGLE_ConfigEditor' => 'Editeur de la configuration', + 'LBL_TRUE'=> 'vrai', + 'LBL_FALSE'=> 'faux', + 'LBL_MAX_UPLOAD_SIZE_MSG'=> 'La taille max. de téléchargement est de 5 Mo', + 'LBL_INVALID_EMAIL_MSG'=>'Adresse Email invalide', + 'LBL_EMPTY_NAME_MSG'=> 'Nom du support ne peut être vide', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG'=>'100 entrées maximum dans les vues Listes', + 'LBL_MAX_HISTORY_VIEWED_MSG'=>'Choisir un nombre parmi 1-5', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG'=>'100 caractères maximum', + 'LBL_MB'=>'Mo', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Afficher le Mini Calendrier', + 'LBL_WORLD_CLOCK_DISPLAY'=>'Afficher l\'horloge', + 'LBL_CALCULATOR_DISPLAY'=>'Afficher la calculatrice', + 'LBL_USE_RTE'=>'Utiliser RTE', + 'LBL_HELPDESK_SUPPORT_EMAILID'=>'Email du support client ', + 'LBL_HELPDESK_SUPPORT_NAME'=>'Nom du support client ', + 'LBL_MAX_UPLOAD_SIZE'=>'Taille max. de fichier téléchargement (Max 5Mo)', + 'LBL_MAX_HISTORY_VIEWED'=>'Affichage max. du nombre d\'historique', + 'LBL_DEFAULT_MODULE'=>'Module par défaut', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW'=>'Longueur max. du texte par colonne dans la vue "Listes"', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW'=>'Nombre d\'entrées maximum par page dans les vues Listes', + 'LBL_CONFIG_FILE'=>'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' =>'Vous éditez la configuration de vtiger CRM.', + 'LBL_DOUBLE_CHECK_INFO'=>'Vérifier soigneusement les informations saisies avant d\'enregistrer.', + 'LBL_HELP_INFO'=>"Il s'agit de l' 'Email d'expéditeur' envoyant un email à un nouvel utilisateur avec son login, + envoi un email de dépôt de nouveau ticket, les envois de rappels et notifications.", + 'LBL_RESTRICTED_CHARACTERS'=>"Les caractères spéciaux tel que ' " et ; sont interdits", + +); + +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/hu_hu.lang.php b/modules/ConfigEditor/language/hu_hu.lang.php new file mode 100644 index 0000000..016277b --- /dev/null +++ b/modules/ConfigEditor/language/hu_hu.lang.php @@ -0,0 +1,48 @@ + 'Konfiguráció Szerkesztő', + 'LBL_CONFIG_EDITOR' => 'Konfiguráció Szerkesztő', + 'LBL_SETTINGS' => 'Beállítások', + 'LBL_CONFIG_EDIT' => 'A vtiger CRM konfigurációs beállításainak szerkesztése', + 'SINGLE_ConfigEditor' => 'Konfiguráció Szerkesztő', + 'LBL_TRUE' => 'igaz', + 'LBL_FALSE' => 'hamis', + 'LBL_MAX_UPLOAD_SIZE_MSG' => 'Maximális feltöltési méret: 5MB', + 'LBL_INVALID_EMAIL_MSG' => 'Érvénytelen E-mail cím', + 'LBL_EMPTY_NAME_MSG' => 'Az Ügyfélszolgálat feladó neve nem lehet üres', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG' => 'Lista nézeti elemek maximális száma: 100', + 'LBL_MAX_HISTORY_VIEWED_MSG' => 'Kérjük, hogy adj meg egy számot 1 és 5 között', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG' => 'Maximális szöveghossz: 100 karakter', + 'LBL_MB' => 'MB', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Mini Naptár megjelenítés', + 'LBL_WORLD_CLOCK_DISPLAY' => 'Világ óra megjelenítés', + 'LBL_CALCULATOR_DISPLAY' => 'Számológép megjelenítés', + 'LBL_USE_RTE' => 'RTE használata', + 'LBL_HELPDESK_SUPPORT_EMAILID' => 'Ügyfélszolgálat E-mail címe', + 'LBL_HELPDESK_SUPPORT_NAME' => 'Ügyfélszolgálat E-mail feladó neve', + 'LBL_MAX_UPLOAD_SIZE' => 'Max. Feltöltési méret (Max 5MB)', + 'LBL_MAX_HISTORY_VIEWED' => 'Max. mutatott előzmények', + 'LBL_DEFAULT_MODULE' => 'Alapértelmezett Modul', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW' => 'Max. szöveghossz a lista nézetben', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW' => 'Max. elemek száma oldalanként a lista nézetben', + 'LBL_CONFIG_FILE' => 'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' => 'Épp a vtiger CRM konfigurációs beállításait szerkeszted.', + 'LBL_DOUBLE_CHECK_INFO' => 'Kérlek, hogy kétszeresen is ellenőrizd az adatokat mielőtt elmented a beállításokat.', + 'LBL_HELP_INFO' => 'Ezt használjuk \'Küldő e-mail\' címnek például egy új felhasználó számára a belépési adatok küldésekor, vagy ügyfélszolgálati kéréskor ezzel az e-mail címmel válaszolunk a kérést beküldőnek, ez küldi ki az emlékeztető e-maileket.', + 'LBL_RESTRICTED_CHARACTERS' => 'A speciális karakterek, mint \' " és ; nem megengedettek.' +); +?> \ No newline at end of file diff --git a/modules/ConfigEditor/language/nl_nl.lang.php b/modules/ConfigEditor/language/nl_nl.lang.php new file mode 100644 index 0000000..32ba40a --- /dev/null +++ b/modules/ConfigEditor/language/nl_nl.lang.php @@ -0,0 +1,69 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.3 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/ConfigEditor/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + *********************************************************************************/ + +$mod_strings = Array ( + + 'ConfigEditor' => 'ConfigEditor', + 'LBL_CONFIG_EDITOR' => 'Configuratiebewerker', + 'LBL_SETTINGS' => 'Instellingen', + 'LBL_CONFIG_EDIT'=>'Bewerk de Configuratie van vtiger CRM', + 'SINGLE_ConfigEditor' => 'ConfigEditor', + 'LBL_TRUE'=> 'aan', + 'LBL_FALSE'=> 'uit', + 'LBL_MAX_UPLOAD_SIZE_MSG'=> 'Maximale upload omvang is 5MB', + 'LBL_INVALID_EMAIL_MSG'=>'Ongeldig e-mailadres', + 'LBL_EMPTY_NAME_MSG'=> 'Supportnaam mag niet leeg zijn', + 'LBL_MAX_LISTVIEW_ENTRIES_MSG'=>'Maximale regels in de lijsten is 100', + 'LBL_MAX_HISTORY_VIEWED_MSG'=>'Geef a.u.b. een getal in de range 1-5', + 'LBL_MAX_TEXTLENGTH_LISTVIEW_MSG'=>'Maximale tekst lengte is 100', + 'LBL_MB'=>'MB', + 'LBL_MINI_CALENDAR_DISPLAY' => 'Minikalender tonen', + 'LBL_WORLD_CLOCK_DISPLAY'=>'Wereldklok tonen', + 'LBL_CALCULATOR_DISPLAY'=>'Calculator tonen', + 'LBL_USE_RTE'=>'Gebruik RTE', + 'LBL_HELPDESK_SUPPORT_EMAILID'=>'Helpdesk support e-mail', + 'LBL_HELPDESK_SUPPORT_NAME'=>'Helpdesk support naam', + 'LBL_MAX_UPLOAD_SIZE'=>'Maximale uploadomvang (Max 5MB)', + 'LBL_MAX_HISTORY_VIEWED'=>'Max. geschiedenis getoond', + 'LBL_DEFAULT_MODULE'=>'Standaard Module', + 'LBL_MAX_TEXT_LENGTH_IN_LISTVIEW'=>'Max. tekstlengte in lijsten', + 'LBL_MAX_ENTRIES_PER_PAGE_IN_LISTVIEW'=>'Max. regels per pagina in de lijsten', + 'LBL_CONFIG_FILE'=>'config.inc.php', + 'LBL_CONFIG_EDIT_CAUTION_INFO' =>'U bewerkt momenteel de configuratieinstellingen van vtiger CRM.', + 'LBL_DOUBLE_CHECK_INFO'=>'Controleer alles goed alvorens de waarden op te slaan.', + 'LBL_HELP_INFO'=>"Dit wordt gebruikt als 'From e-mailadres' om een e-mail te sturen naar nieuw aangemaakte gebruikers met login credentials, + voor het sturen van e-mails naar ticket eigenaren over toegewezen tickets, e-mails met herinneringen en notificaties.", + +); + +?> \ No newline at end of file diff --git a/modules/Contacts/CallRelatedList.php b/modules/Contacts/CallRelatedList.php new file mode 100644 index 0000000..5c6b9ba --- /dev/null +++ b/modules/Contacts/CallRelatedList.php @@ -0,0 +1,110 @@ +retrieve_entity_info($RECORD,$currentmodule); + $focus->id = $RECORD; + $focus->name=$focus->column_fields['firstname'].' '.$focus->column_fields['lastname']; + $log->debug("id is ".$focus->id); + $log->debug("name is ".$focus->name); + } + + global $adb; + $sql = $adb->pquery('select accountid from vtiger_contactdetails where contactid=?', array($focus->id)); + $accountid = $adb->query_result($sql,0,'accountid'); + if($accountid == 0) $accountid=''; + + global $mod_strings; + global $app_strings; + global $theme; + global $currentModule; + global $current_user; + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $smarty = new vtigerCRM_Smarty; + $smarty->assign("accountid",$accountid); + + + if(isset($_request['isduplicate']) && $_request['isduplicate'] == 'true') { + $focus->id = ""; + } + if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') { + $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode'])); + } + $parent_email = getEmailParentsList('Contacts',$_REQUEST['record'], $focus); + $smarty->assign("HIDDEN_PARENTS_LIST",$parent_email); + + if(isset($_REQUEST['record']) && $_REQUEST['record']!='') { + $userid = $current_user->id; + $sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 4 and vtiger_field.presence in (0,2)"; + $result = $adb->pquery($sql, array()); + $num_fieldnames = $adb->num_rows($result); + for($i = 0; $i < $num_fieldnames; $i++) { + $fieldname = $adb->query_result($result,$i,"fieldname"); + $permit= getFieldVisibilityPermission("Contacts",$userid,$fieldname); + } + } + $smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); + $smarty->assign("CONTACT_PERMISSION",CheckFieldPermission('contact_id','Calendar')); + $smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); + $smarty->assign("CATEGORY",$category); + $smarty->assign("ID",$focus->id); + $smarty->assign("NAME",$focus->name); + $smarty->assign("EMAIL",$focus->column_fields['email']); + $smarty->assign("SECONDARY_EMAIL",$focus->column_fields['secondaryemail']); + + // Module Sequence Numbering + $mod_seq_field = getModuleSequenceField($currentModule); + if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; + } else { + $mod_seq_id = $focus->id; + } + $smarty->assign('MOD_SEQ_ID', $mod_seq_id); + // END + + $related_array = getRelatedLists($currentModule,$focus); + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + $relationId = vtlib_purify($_REQUEST['relation_id']); + RelatedListViewSession::addRelatedModuleToSession($relationId, + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); + + $smarty->assign("RELATEDLISTS", $related_array); + $smarty->assign("MODULE",$currentmodule); + $smarty->assign("SINGLE_MOD",$app_strings['Contact']); + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $smarty->assign("MOD",$mod_strings); + $smarty->assign("APP",$app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + + $check_button = Button_Check($module); + $smarty->assign("CHECK", $check_button); + $smarty->display("RelatedLists.tpl"); +} +?> \ No newline at end of file diff --git a/modules/Contacts/Contacts.js b/modules/Contacts/Contacts.js new file mode 100644 index 0000000..7218704 --- /dev/null +++ b/modules/Contacts/Contacts.js @@ -0,0 +1,240 @@ +/********************************************************************************* + +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +document.write(" +pquery($sql, array($templateid)); +$temparray = $adb->fetch_array($result); + +$fileContent = $temparray['data']; +$filename=html_entity_decode($temparray['filename'], ENT_QUOTES, $default_charset); +// Fix For: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$filename= $randomfilename . "_word.doc"; + +$filesize=$temparray['filesize']; +$wordtemplatedownloadpath =$root_directory ."/test/wordtemplatedownload/"; + +$handle = fopen($wordtemplatedownloadpath .$filename,"wb"); +fwrite($handle,base64_decode($fileContent),$filesize); +fclose($handle); + + +//<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>> +$mass_merge = $_REQUEST['allselectedboxes']; +$single_record = $_REQUEST['record']; + +if($mass_merge != "") +{ + $mass_merge = explode(";",$mass_merge); + $temp_mass_merge = $mass_merge; + if(array_pop($temp_mass_merge)=="") + array_pop($mass_merge); + //$mass_merge = implode(",",$mass_merge); +}else if($single_record != "") +{ + $mass_merge = $single_record; +}else +{ + die("Record Id is not found, cannot merge the document"); +} + +//<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>> + +global $current_user; +require('user_privileges/user_privileges_'.$current_user->id.'.php'); +if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || $module == "Users" || $module == "Emails") +{ + $query1="select vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid in (4,6) and vtiger_field.block <> 75 order by vtiger_field.tablename and vtiger_field.presence in (0,2)"; + $params1 = array(); +} +else +{ + $profileList = getCurrentUserProfileList(); + $query1="select vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid INNER JOIN vtiger_profile2field ON vtiger_profile2field.fieldid=vtiger_field.fieldid INNER JOIN vtiger_def_org_field ON vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid in (4,6) and vtiger_field.block <> 75 AND vtiger_profile2field.visible=0 AND vtiger_def_org_field.visible=0 AND vtiger_profile2field.profileid IN (". generateQuestionMarks($profileList) .") and vtiger_field.presence in (0,2) GROUP BY vtiger_field.fieldid order by vtiger_field.tablename"; + $params1 = array($profileList); + //Postgres 8 fixes + if( $adb->dbType == "pgsql") + $query1 = fixPostgresQuery( $query1, $log, 0); +} +$result = $adb->pquery($query1, $params1); +$y=$adb->num_rows($result); +$userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); +$accountUserNameSql = getSqlForNameInDisplayFormat(array('first_name'=>'usersAccounts.first_name', 'last_name' => + 'usersAccounts.last_name'), 'Users'); + +for ($x=0; $x<$y; $x++) +{ + $tablename = $adb->query_result($result,$x,"tablename"); + $columnname = $adb->query_result($result,$x,"columnname"); + $modulename = $adb->query_result($result,$x,"name"); + + if($tablename == "crmentity") + { + if($modulename == "Accounts") + { + $tablename = "crmentityAccounts"; + } + } + $querycolumns[$x] = $tablename.".".$columnname; + if($columnname == "smownerid") + { + if($modulename == "Accounts") + { + $querycolumns[$x]="case when (usersAccounts.user_name not like '') then $accountUserNameSql else groupsAccounts.groupname end as username"; + } + if($modulename == "Contacts") + { + $querycolumns[$x]="case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as usercname,vtiger_users.first_name,vtiger_users.last_name,vtiger_users.user_name,vtiger_users.secondaryemail,vtiger_users.title,vtiger_users.phone_work,vtiger_users.department,vtiger_users.phone_mobile,vtiger_users.phone_other,vtiger_users.phone_fax,vtiger_users.email1,vtiger_users.phone_home,vtiger_users.email2,vtiger_users.address_street,vtiger_users.address_city,vtiger_users.address_state,vtiger_users.address_postalcode,vtiger_users.address_country"; + } + } + if($columnname == "parentid") + { + $querycolumns[$x] = "accountAccounts.accountname"; + } + if($columnname == "accountid") + { + $querycolumns[$x] = "accountContacts.accountname"; + } + if($columnname == "reportsto") + { + $querycolumns[$x] = "contactdetailsContacts.lastname"; + } + + + if($modulename == "Accounts") + { + $field_label[$x] = "ACCOUNT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + } + + if($modulename == "Contacts") + { + $field_label[$x] = "CONTACT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + if($columnname == "smownerid") + { + $field_label[$x] = $field_label[$x].",USER_FIRSTNAME,USER_LASTNAME,USER_USERNAME,USER_SECONDARYEMAIL,USER_TITLE,USER_OFFICEPHONE,USER_DEPARTMENT,USER_MOBILE,USER_OTHERPHONE,USER_FAX,USER_EMAIL,USER_HOMEPHONE,USER_OTHEREMAIL,USER_PRIMARYADDRESS,USER_CITY,USER_STATE,USER_POSTALCODE,USER_COUNTRY"; + } + } + + +} +$csvheader = implode(",",$field_label); +//echo $csvheader; +//<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>> + +if(count($querycolumns) > 0) +{ + $selectcolumns = implode($querycolumns,","); + + + $query = "select $selectcolumns from vtiger_contactdetails + inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid + inner join vtiger_contactaddress on vtiger_contactdetails.contactid = vtiger_contactaddress.contactaddressid + inner join vtiger_contactsubdetails on vtiger_contactdetails.contactid = vtiger_contactsubdetails.contactsubscriptionid + inner join vtiger_contactscf on vtiger_contactdetails.contactid = vtiger_contactscf.contactid + inner join vtiger_customerdetails on vtiger_contactdetails.contactid = vtiger_customerdetails.customerid + left join vtiger_contactdetails as contactdetailsContacts on contactdetailsContacts.contactid = vtiger_contactdetails.reportsto + left join vtiger_account as accountContacts on accountContacts.accountid = vtiger_contactdetails.accountid + left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + left join vtiger_account on vtiger_account.accountid = vtiger_contactdetails.accountid + left join vtiger_crmentity as crmentityAccounts on crmentityAccounts.crmid=vtiger_account.accountid + left join vtiger_accountbillads on vtiger_account.accountid=vtiger_accountbillads.accountaddressid + left join vtiger_accountshipads on vtiger_account.accountid=vtiger_accountshipads.accountaddressid + left join vtiger_accountscf on vtiger_account.accountid = vtiger_accountscf.accountid + left join vtiger_account as accountAccounts on accountAccounts.accountid = vtiger_account.parentid + left join vtiger_users as usersAccounts on usersAccounts.id = crmentityAccounts.smownerid + LEFT JOIN vtiger_groups as groupsAccounts + ON groupsAccounts.groupid = vtiger_crmentity.smownerid + where vtiger_crmentity.deleted=0 and (crmentityAccounts.deleted is NULL or crmentityAccounts.deleted <> 1) and vtiger_contactdetails.contactid in(". generateQuestionMarks($mass_merge) .")"; + + + $result = $adb->pquery($query, array($mass_merge)); + $avail_pick_arr = getAccessPickListValues('Contacts'); +while($columnValues = $adb->fetch_array($result)) +{ + $y=$adb->num_fields($result); + for($x=0; $x<$y; $x++) + { + $value = $columnValues[$x]; + foreach($columnValues as $key=>$val) + { + if($val == $value && $value != '') + { + if(array_key_exists($key,$avail_pick_arr)) + { + if(!in_array($val,$avail_pick_arr[$key])) + { + $value = "Not Accessible"; + } + } + } + } + //<<<<<<<<<<<<<<< For blank Fields >>>>>>>>>>>>>>>>>>>>>>>>>>>> + if(trim($value) == "--None--" || trim($value) == "--none--") + { + $value = ""; + } + //<<<<<<<<<<<<<<< End >>>>>>>>>>>>>>>>>>>>>>>>>>>> + $actual_values[$x] = $value; + $actual_values[$x] = str_replace('"'," ",$actual_values[$x]); + //if value contains any line feed or carriage return replace the value with ".value." + if (preg_match ("/(\r?\n)/", $actual_values[$x])) + { + $actual_values[$x] = '"'.$actual_values[$x].'"'; + } + $actual_values[$x] = decode_html(str_replace(","," ",$actual_values[$x])); + } + $mergevalue[] = implode($actual_values,","); +} +$csvdata = implode($mergevalue,"###"); +}else +{ + die("No fields to do Merge"); +} +// Fix for: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$datafilename = $randomfilename . "_data.csv"; + +$handle = fopen($wordtemplatedownloadpath.$datafilename,"wb"); +fwrite($handle,$csvheader."\r\n"); +fwrite($handle,str_replace("###","\r\n",$csvdata)); +fclose($handle); + +?> + + + diff --git a/modules/Contacts/Popup.php b/modules/Contacts/Popup.php new file mode 100644 index 0000000..98ea8ec --- /dev/null +++ b/modules/Contacts/Popup.php @@ -0,0 +1,23 @@ + diff --git a/modules/Contacts/ProcessDuplicates.php b/modules/Contacts/ProcessDuplicates.php new file mode 100644 index 0000000..877dbd8 --- /dev/null +++ b/modules/Contacts/ProcessDuplicates.php @@ -0,0 +1,133 @@ +pquery("SELECT count(*) AS count FROM vtiger_crmentity WHERE crmid=? and deleted=0", array($merge_id)); + $count = $adb->query_result($result,0,'count'); + + if($count > 0) + { + // First, save the primary record + $focus->mode="edit"; + setObjectValuesFromRequest($focus); + $focus->save($module); + $rec_values=$focus->column_fields; + + // Remove the id of primary record from the list of records to be deleted. + $del_value=explode(",",$recordids,-1); + $offset = array_search($merge_id,$del_value); + unset($del_value[$offset]); + + // Transfer the related lists of the records to be deleted, to the primary record's related list + if(method_exists($focus, 'transferRelatedRecords')){ + $focus->transferRelatedRecords($module,$del_value,$merge_id); + } else { + transferRelatedRecords($module,$del_value,$merge_id); + } + + // Delete the records by id specified in the list + foreach($del_value as $value) + { + DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$value,""); + } + } + + ?> + +assign("EDIT_DUPLICATE",""); + if($record_count == 2) { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + else { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[2]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[2]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + + $all_values_array=getRecordValues($exploded_id,$module); + $all_values=$all_values_array[0]; + $js_arr_val=$all_values_array[1]; + $fld_array=$all_values_array[2]; + $js_arr=implode(",",$js_arr_val); + + $imported_records = Array(); + $sql="select bean_id from vtiger_users_last_import where bean_type=? and deleted=0"; + $result = $adb->pquery($sql, array($module)); + $num_rows=$adb->num_rows($result); + $count=0; + for($i=0; $i<$num_rows;$i++) + { + foreach($exploded_id as $value) + if($value == $adb->query_result($result,$i,"bean_id")) + $count++; + array_push($imported_records,$adb->query_result($result,$i,"bean_id")); + } + + if ($record_count == $count) + $no_existing=1; + else + $no_existing=0; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("RECORD_COUNT",$record_count); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("MODULENAME", $module); + $smarty->assign("PARENT_TAB", $parent_tab); + $smarty->assign("JS_ARRAY", $js_arr); + $smarty->assign("ID_ARRAY", $exploded_id); + $smarty->assign("IDSTRING",$idstring); + $smarty->assign("ALLVALUES", $all_values); + $smarty->assign("FIELD_ARRAY", $fld_array); + $smarty->assign("IMPORTED_RECORDS", $imported_records); + $smarty->assign("NO_EXISTING", $no_existing); + $smarty->display("MergeFields.tpl"); +} + +?> \ No newline at end of file diff --git a/modules/Contacts/QuickCreate.php b/modules/Contacts/QuickCreate.php new file mode 100644 index 0000000..8d5998b --- /dev/null +++ b/modules/Contacts/QuickCreate.php @@ -0,0 +1,12 @@ + diff --git a/modules/Contacts/Save.php b/modules/Contacts/Save.php new file mode 100644 index 0000000..ac0c954 --- /dev/null +++ b/modules/Contacts/Save.php @@ -0,0 +1,160 @@ +email_opt_out = 'off'; +if (!isset($_REQUEST['do_not_call'])) $focus->do_not_call = 'off'; + +//Checking If image is given or not +//$image_upload_array=SaveImage($_FILES,'contact',$focus->id,$focus->mode); +$image_name_val=$image_upload_array['imagename']; +$image_error="false"; +$errormessage=$image_upload_array['errormessage']; +$saveimage=$image_upload_array['saveimage']; + +//code added for returning back to the current view after edit from list view +if($_REQUEST['return_viewname'] == '') $return_viewname='0'; +if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']); + +if($image_error=="true") //If there is any error in the file upload then moving all the data to EditView. +{ + //re diverting the page and reassigning the same values as image error occurs + if($_REQUEST['activity_mode'] != '')$activity_mode=vtlib_purify($_REQUEST['activity_mode']); + if($_REQUEST['return_module'] != '')$return_module=vtlib_purify($_REQUEST['return_module']); + if($_REQUEST['return_action'] != '')$return_action=vtlib_purify($_REQUEST['return_action']); + if($_REQUEST['return_id'] != '')$return_id=vtlib_purify($_REQUEST['return_id']); + + $log->debug("There is an error during the upload of contact image."); + $field_values_passed.=""; + foreach($focus->column_fields as $fieldname => $val) + { + if(isset($_REQUEST[$fieldname])) + { + $log->debug("Assigning the previous values given for the contact to respective vtiger_fields "); + $field_values_passed.="&"; + $value = $_REQUEST[$fieldname]; + $focus->column_fields[$fieldname] = $value; + $field_values_passed.=$fieldname."=".$value; + + } + } + $values_pass=$field_values_passed; + $encode_field_values=base64_encode($values_pass); + + $error_module = "Contacts"; + $error_action = "EditView"; + + $return_action .= '&activity_mode='.vtlib_purify($_request['activity_mode']); + + if($mode=="edit") { + $return_id=vtlib_purify($_REQUEST['record']); + } + header("location: index.php?action=$error_action&module=$error_module&record=$return_id&return_id=$return_id&return_action=$return_action&return_module=$return_module&activity_mode=$activity_mode&return_viewname=$return_viewname".$search."&saveimage=$saveimage&error_msg=$errormessage&image_error=$image_error&encode_val=$encode_field_values"); +} +if($saveimage=="true") +{ + $focus->column_fields['imagename']=$image_name_val; + $log->debug("Assign the Image name to the vtiger_field name "); +} + +//if image added then we have to set that $_FILES['name'] in imagename field then only the image will be displayed +if($_FILES['imagename']['name'] != '') +{ + if(isset($_REQUEST['imagename_hidden'])) { + $focus->column_fields['imagename'] = vtlib_purify($_REQUEST['imagename_hidden']); + } else { + $focus->column_fields['imagename'] = $_FILES['imagename']['name']; + } +} +elseif($focus->id != '') +{ + $result = $adb->pquery("select imagename from vtiger_contactdetails where contactid = ?", array($focus->id)); + $focus->column_fields['imagename'] = $adb->query_result($result,0,'imagename'); +} + +if($_REQUEST['assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} +//Saving the contact +if($image_error=="false") +{ + $focus->save("Contacts"); + $return_id = $focus->id; + + if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']); + else $return_module = "Contacts"; + if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']); + else $return_action = "DetailView"; + if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']); + + if(isset($_REQUEST['activity_mode']) && $_REQUEST['activity_mode'] != '') $activitymode = vtlib_purify($_REQUEST['activity_mode']); + + $local_log->debug("Saved record with id of ".$return_id); + if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == "Campaigns") + { + if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") + { + $campContStatusResult = $adb->pquery("select campaignrelstatusid from vtiger_campaigncontrel where campaignid=? AND contactid=?",array($_REQUEST['return_id'], $focus->id)); + $contactStatus = $adb->query_result($campContStatusResult,0,'campaignrelstatusid'); + $sql = "delete from vtiger_campaigncontrel where contactid = ?"; + $adb->pquery($sql, array($focus->id)); + if(isset($contactStatus) && $contactStatus!=''){ + $sql = "insert into vtiger_campaigncontrel values (?,?,?)"; + $adb->pquery($sql, array($_REQUEST['return_id'], $focus->id,$contactStatus)); + } + else + { + $sql = "insert into vtiger_campaigncontrel values (?,?,1)"; + $adb->pquery($sql, array($_REQUEST['return_id'], $focus->id)); + } + } + } + + $log->info("This Page is redirected to : ".$return_module." / ".$return_action."& return id =".$return_id); + + //code added for returning back to the current view after edit from list view + if($_REQUEST['return_viewname'] == '') $return_viewname='0'; + if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']); + + $parenttab = getParentTab(); + + + header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&activity_mode=$activitymode&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber'])); +} + +?> \ No newline at end of file diff --git a/modules/Contacts/Settings.php b/modules/Contacts/Settings.php new file mode 100644 index 0000000..48a80c0 --- /dev/null +++ b/modules/Contacts/Settings.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Contacts/TagCloud.php b/modules/Contacts/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Contacts/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Contacts/UnifiedSearch.php b/modules/Contacts/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Contacts/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Contacts/contactSeedData.php b/modules/Contacts/contactSeedData.php new file mode 100644 index 0000000..ff2881a --- /dev/null +++ b/modules/Contacts/contactSeedData.php @@ -0,0 +1,21190 @@ + diff --git a/modules/Contacts/imgs/2tbarPrivateChat.gif b/modules/Contacts/imgs/2tbarPrivateChat.gif new file mode 100644 index 0000000..f0d7a1f Binary files /dev/null and b/modules/Contacts/imgs/2tbarPrivateChat.gif differ diff --git a/modules/Contacts/imgs/2tbarPublicChat.gif b/modules/Contacts/imgs/2tbarPublicChat.gif new file mode 100644 index 0000000..9c8d42d Binary files /dev/null and b/modules/Contacts/imgs/2tbarPublicChat.gif differ diff --git a/modules/Contacts/imgs/box_BL.gif b/modules/Contacts/imgs/box_BL.gif new file mode 100644 index 0000000..d81412a Binary files /dev/null and b/modules/Contacts/imgs/box_BL.gif differ diff --git a/modules/Contacts/imgs/box_BR.gif b/modules/Contacts/imgs/box_BR.gif new file mode 100644 index 0000000..44b171d Binary files /dev/null and b/modules/Contacts/imgs/box_BR.gif differ diff --git a/modules/Contacts/imgs/box_M.gif b/modules/Contacts/imgs/box_M.gif new file mode 100644 index 0000000..e1fa15e Binary files /dev/null and b/modules/Contacts/imgs/box_M.gif differ diff --git a/modules/Contacts/imgs/box_ML.gif b/modules/Contacts/imgs/box_ML.gif new file mode 100644 index 0000000..559ccf0 Binary files /dev/null and b/modules/Contacts/imgs/box_ML.gif differ diff --git a/modules/Contacts/imgs/box_MR.gif b/modules/Contacts/imgs/box_MR.gif new file mode 100644 index 0000000..dd798fc Binary files /dev/null and b/modules/Contacts/imgs/box_MR.gif differ diff --git a/modules/Contacts/imgs/box_T.gif b/modules/Contacts/imgs/box_T.gif new file mode 100644 index 0000000..d09eb43 Binary files /dev/null and b/modules/Contacts/imgs/box_T.gif differ diff --git a/modules/Contacts/imgs/box_TL.gif b/modules/Contacts/imgs/box_TL.gif new file mode 100644 index 0000000..87ce198 Binary files /dev/null and b/modules/Contacts/imgs/box_TL.gif differ diff --git a/modules/Contacts/imgs/box_TR.gif b/modules/Contacts/imgs/box_TR.gif new file mode 100644 index 0000000..70b5c27 Binary files /dev/null and b/modules/Contacts/imgs/box_TR.gif differ diff --git a/modules/Contacts/imgs/btn_close.gif b/modules/Contacts/imgs/btn_close.gif new file mode 100644 index 0000000..1d7b0f8 Binary files /dev/null and b/modules/Contacts/imgs/btn_close.gif differ diff --git a/modules/Contacts/imgs/btn_hide.gif b/modules/Contacts/imgs/btn_hide.gif new file mode 100644 index 0000000..8419cd1 Binary files /dev/null and b/modules/Contacts/imgs/btn_hide.gif differ diff --git a/modules/Contacts/imgs/btn_send.gif b/modules/Contacts/imgs/btn_send.gif new file mode 100644 index 0000000..300880e Binary files /dev/null and b/modules/Contacts/imgs/btn_send.gif differ diff --git a/modules/Contacts/imgs/bx_B.gif b/modules/Contacts/imgs/bx_B.gif new file mode 100644 index 0000000..f6d8e81 Binary files /dev/null and b/modules/Contacts/imgs/bx_B.gif differ diff --git a/modules/Contacts/imgs/close.gif b/modules/Contacts/imgs/close.gif new file mode 100644 index 0000000..1e157ce Binary files /dev/null and b/modules/Contacts/imgs/close.gif differ diff --git a/modules/Contacts/imgs/hide.gif b/modules/Contacts/imgs/hide.gif new file mode 100644 index 0000000..96ef9a1 Binary files /dev/null and b/modules/Contacts/imgs/hide.gif differ diff --git a/modules/Contacts/imgs/icone_chat.gif b/modules/Contacts/imgs/icone_chat.gif new file mode 100644 index 0000000..35c0a95 Binary files /dev/null and b/modules/Contacts/imgs/icone_chat.gif differ diff --git a/modules/Contacts/imgs/icone_keyb.gif b/modules/Contacts/imgs/icone_keyb.gif new file mode 100644 index 0000000..d15e643 Binary files /dev/null and b/modules/Contacts/imgs/icone_keyb.gif differ diff --git a/modules/Contacts/imgs/site_bg.gif b/modules/Contacts/imgs/site_bg.gif new file mode 100644 index 0000000..a638838 Binary files /dev/null and b/modules/Contacts/imgs/site_bg.gif differ diff --git a/modules/Contacts/imgs/user_icon.gif b/modules/Contacts/imgs/user_icon.gif new file mode 100644 index 0000000..724727c Binary files /dev/null and b/modules/Contacts/imgs/user_icon.gif differ diff --git a/modules/Contacts/index.php b/modules/Contacts/index.php new file mode 100644 index 0000000..010dcf0 --- /dev/null +++ b/modules/Contacts/index.php @@ -0,0 +1,27 @@ + diff --git a/modules/Contacts/language/de_de.lang.php b/modules/Contacts/language/de_de.lang.php new file mode 100644 index 0000000..46e33f2 --- /dev/null +++ b/modules/Contacts/language/de_de.lang.php @@ -0,0 +1,242 @@ +'Personen', + 'LBL_INVITEE'=>'Vorgesetzter', + 'LBL_MODULE_TITLE'=>'Personen: Home', + 'LBL_SEARCH_FORM_TITLE'=>'Personen suchen', + 'LBL_LIST_FORM_TITLE'=>'Personen', + 'LBL_NEW_FORM_TITLE'=>'Neue Person', + 'LBL_CONTACT_OPP_FORM_TITLE'=>'Kontakt-Potential:', + 'LBL_CONTACT'=>'Person:', + + 'LBL_LIST_NAME'=>'Name', + 'LBL_LIST_LAST_NAME'=>'Nachname', + 'LBL_LIST_FIRST_NAME'=>'Vorname', + 'LBL_LIST_CONTACT_NAME'=>'Person', + 'LBL_LIST_TITLE'=>'Funktion', + 'LBL_LIST_ACCOUNT_NAME'=>'Organisation', + 'LBL_LIST_EMAIL_ADDRESS'=>'E-Mail', + 'LBL_LIST_PHONE'=>'Telefon', + 'LBL_LIST_CONTACT_ROLE'=>'Rolle', + + //DON'T CONVERT THESE THEY ARE MAPPINGS + 'db_last_name' => 'LBL_LIST_LAST_NAME', + 'db_first_name' => 'LBL_LIST_FIRST_NAME', + 'db_title' => 'LBL_LIST_TITLE', + 'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', + 'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', + //END DON'T CONVERT + + 'LBL_EXISTING_CONTACT' => 'bestehenden Personeneintrag verwenden', + 'LBL_CREATED_CONTACT' => 'Neue Person erstellt', + 'LBL_EXISTING_ACCOUNT' => 'Bestehende Organisation verwendet', + 'LBL_CREATED_ACCOUNT' => 'Neue Organisation erstellt', + 'LBL_CREATED_CALL' => 'Neuer Anruf erstellt', + 'LBL_CREATED_MEETING' => 'Neues Meeting erstellt', + 'LBL_ADDMORE_BUSINESSCARD' =>'Weitere Visitenkarte erfassen', + + 'LBL_BUSINESSCARD' => 'Visitenkarte', + + 'LBL_NAME'=>'Name:', + 'LBL_CONTACT_NAME'=>'Person:', + 'LBL_CONTACT_INFORMATION'=>'Person', + 'LBL_CUSTOM_INFORMATION'=>'zusätzliche Information', + 'LBL_FIRST_NAME'=>'Vorname:', + 'LBL_OFFICE_PHONE'=>'Tel. Zentrale:', + 'LBL_ACCOUNT_NAME'=>'Organisation:', + 'LBL_ANY_PHONE'=>'anderes Telefon:', + 'LBL_PHONE'=>'Telefon:', + 'LBL_LAST_NAME'=>'Nachname:', + 'LBL_MOBILE_PHONE'=>'Handy:', + 'LBL_HOME_PHONE'=>'Telefon privat:', + 'LBL_LEAD_SOURCE'=>'Leadquelle:', + 'LBL_OTHER_PHONE'=>'anderes Telefon:', + 'LBL_FAX_PHONE'=>'Fax:', + 'LBL_TITLE'=>'Funktion:', + 'LBL_DEPARTMENT'=>'Abteilung:', + 'LBL_BIRTHDATE'=>'Geburtstag:', + 'LBL_EMAIL_ADDRESS'=>'E-Mail:', + 'LBL_OTHER_EMAIL_ADDRESS'=>'weitere E-Mail:', + 'LBL_ANY_EMAIL'=>'andere E-Mail:', + 'LBL_REPORTS_TO'=>'Vorgesetzter:', + 'LBL_ASSISTANT'=>'Assistent:', + 'LBL_YAHOO_ID'=>'Yahoo E-Mail:', + 'LBL_ASSISTANT_PHONE'=>'Telefon Assistent:', + 'LBL_DO_NOT_CALL'=>'nicht anrufen:', + 'LBL_EMAIL_OPT_OUT'=>'E-Mail Opt aus:', + 'LBL_PRIMARY_ADDRESS'=>'primäre Adresse:', + 'LBL_ALTERNATE_ADDRESS'=>'andere Adresse:', + 'LBL_ANY_ADDRESS'=>'weitere Adresse:', + 'LBL_CITY'=>'Ort:', + 'LBL_STATE'=>'Bundesland:', + 'LBL_POSTAL_CODE'=>'PLZ:', + 'LBL_COUNTRY'=>'Land:', + 'LBL_DESCRIPTION_INFORMATION'=>'Zusatzinformationen', + 'LBL_IMAGE_INFORMATION'=>'Bild vom Kontakt', + 'LBL_ADDRESS_INFORMATION'=>'Adresse', + 'LBL_DESCRIPTION'=>'Beschreibung:', + 'LBL_CONTACT_ROLE'=>'Rolle:', + 'LBL_OPP_NAME'=>'Verkaufspotential:', + 'LBL_DUPLICATE'=>'Eventuell doppelter Personeneintrag', + 'MSG_DUPLICATE' => 'Das Anlegen dieses Eintrags erzeugt eventuelle einen doppelten Eintrag. Sie können entweder einen Eintrag aus der untenstehenden Liste wählen oder mit dem Erstellen eines Personeneintrages fortfahren', + + 'LNK_NEW_APPOINTMENT' => 'Neues Meeting', + 'LBL_ADD_BUSINESSCARD' => 'Visitenkarte erfassen', + 'NTC_DELETE_CONFIRMATION'=>'Möchten Sie diesen Eintrag löschen?', + 'NTC_REMOVE_CONFIRMATION'=>'Möchten Sie diesen Eintrag vom Vorgang löschen?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Möchten Sie den Eintrag bezüglich Vorgesetzer löschen?', + 'ERR_DELETE_RECORD'=>"Um Einträge zu löschen, muss mindestens ein Eintrag markiert sein.", + 'NTC_COPY_PRIMARY_ADDRESS'=>'Primäre Adresse zu Alternativer Adresse kopieren', + 'NTC_COPY_ALTERNATE_ADDRESS'=>'Alternative Adresse zu Primäre Adresse kopieren', + + 'LBL_SELECT_CONTACT'=>'Person wählen', + //Added for search heading + 'LBL_GENERAL_INFORMATION'=>'Allgemeine Information', + + //for v4 release added + 'LBL_NEW_POTENTIAL'=>'Neues Verkaufspotential', + 'LBL_POTENTIAL_TITLE'=>'Verkaufspotentiale', + + 'LBL_NEW_TASK'=>'Neue Aufgabe', + 'LBL_TASK_TITLE'=>'Aufgaben', + 'LBL_NEW_CALL'=>'Neuer Anruf', + 'LBL_CALL_TITLE'=>'Anrufe', + 'LBL_NEW_MEETING'=>'Neues Meeting', + 'LBL_MEETING_TITLE'=>'Meetings', + 'LBL_NEW_EMAIL'=>'Neue E-Mail', + 'LBL_EMAIL_TITLE'=>'E-Mails', + 'LBL_NEW_NOTE'=>'Neue Notiz', + 'LBL_NOTE_TITLE'=>'Notizen', + + // Added for 4GA + 'LBL_TOOL_FORM_TITLE'=>'Personen: Werkzeuge', + + 'Salutation'=>'Anrede', + 'First Name'=>'Vorname', + 'Office Phone'=>'Tel. direkt', + 'Last Name'=>'Nachname', + 'Mobile'=>'Handy', + 'Account Name'=>'Organisation', + 'Home Phone'=>'Telefon privat', + 'Lead Source'=>'Leadquelle', + 'Other Phone'=>'anderes Tel.', + 'Title'=>'Funktion', + 'Fax'=>'Fax', + 'Department'=>'Abteilung', + 'Birthdate'=>'Geburtsdatum', + 'Email'=>'E-Mail', + 'Reports To'=>'Vorgesetzter', + 'Assistant'=>'Assistent', + 'Yahoo Id'=>'Yahoo E-Mail', + 'Assistant Phone'=>'Telefon Assistent', + 'Do Not Call'=>'nicht anrufen', + 'Email Opt Out'=>'E-Mail Opt aus', + 'Assigned To'=>'zuständig ', + 'Campaign Source'=>'Kampagnenquelle', + 'Reference' =>'Referenz', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Mailing Street'=>'Straße', + 'Other Street'=>'weitere Straße', + 'Mailing City'=>'Ort', + 'Mailing State'=>'Bundesland', + 'Mailing Zip'=>'PLZ', + 'Mailing Country'=>'Land', + 'Mailing Po Box'=>'Postfachnr.', + 'Other Po Box'=>'weitere Postfachnr.', + 'Other City'=>'weiterer Ort', + 'Other State'=>'weiteres Bundesland', + 'Other Zip'=>'weitere PLZ', + 'Other Country'=>'weiteres Land', + 'Contact Image'=>'Photo', + 'Description'=>'Beschreibung', + + // Added fields for Add Business Card + 'LBL_NEW_CONTACT'=>'Neue Person', + 'LBL_NEW_ACCOUNT'=>'Neue Firma', + 'LBL_NOTE_SUBJECT'=>'Betreff:', + 'LBL_NOTE'=>'Notiz:', + 'LBL_WEBSITE'=>'Webseite:', + 'LBL_NEW_APPOINTMENT'=>'Neue Aktivität', + 'LBL_SUBJECT'=>'Thema:', + 'LBL_START_DATE'=>'Startdatum:', + 'LBL_START_TIME'=>'Startuhrzeit:', + + //Added field after 4_0_1 + 'Portal User'=>'Portal Nutzer', + 'LBL_CUSTOMER_PORTAL_INFORMATION'=>'Kundenportal', + 'Support Start Date'=>'Support Startdatum', + 'Support End Date'=>'Support Enddatum', + //Added for 4.2 Release -- CustomView + 'Name'=>'Name', + 'LBL_ALL'=>'Alle', + 'LBL_MAXIMUM_LIMIT_ERROR'=>'Leider ist Ihrer Datei zu groß. Bitte reduzieren Sie Ihre Dateigröße auf 800000 Bytes', + 'LBL_UPLOAD_ERROR'=>'Probleme bei der Dateiübertragung. Bitte noch einmal versuchen!', + 'LBL_IMAGE_ERROR'=>'Die Datei hat nicht das richtige Format. Verwenden Sie Dateien mit der Endung .gif, .jpg oder .png', + 'LBL_INVALID_IMAGE'=>'Ungültige Datei ODER die Datei ist leer.', + + //Added after 5Alpha5 + 'Notify Owner'=>'Besitzer benachrichtigen', + + //Added for Picklist Values + '--None--'=>'--ohne--', + + 'Mr.'=>'Sehr geehrter Herr', + 'Ms.'=>'Sehr geehrte Frau', + 'Mrs.'=>'Sehr geehrte Frau', + 'Dr.'=>'Sehr geehrter Herr Dr.', + 'Prof.'=>'Sehr geehrter Herr Prof.', + + 'Cold Call'=>'kalter Anruf', + 'Existing Customer'=>'existierender Kunde', + 'Self Generated'=>'selbst erstellt', + 'Employee'=>'Mitarbeiter', + 'Partner'=>'Partner', + 'Public Relations'=>'Public Relations', + 'Direct Mail'=>'per Brief', + 'Conference'=>'Konferenz', + 'Trade Show'=>'Messe', + 'Web Site'=>'Web Seite', + 'Word of mouth'=>'Empfehlung', + 'Other'=>'andere', + 'User List'=>'Nutzerliste', + + //Added for 5.0.3 + 'Customer Portal Login Details'=>'Kundenportal Login Details', + 'Dear'=>'Hallo', + 'Your Customer Portal Login details are given below:'=>'Hiermit erhalten Sie die Zugangsdaten zu unserem Kundenportal:', + 'User Id :'=>'Benutzername:', + 'Password :'=>'Passwort:', + 'Please Login Here'=>'klicken Sie hier für das deutsche Kundenportal', + 'Note :'=>'Hinweis:', + 'We suggest you to change your password after logging in first time'=>'Wir empfehlen Ihnen das Passwort nach dem ersten Login zu wechseln.', + 'Support Team'=>'Support Team', + + 'TITLE_AJAX_CSS_POPUP_CHAT'=>'CRM Chat', + + // Added after 5.0.4 GA + + // Module Sequence Numbering + 'Contact Id' => 'Kontaktnr.', + 'Secondary Email'=>'Secondary Email', + // END + + 'Contacts ID'=>'Contacts ID', +); + +?> \ No newline at end of file diff --git a/modules/Contacts/language/en_gb.lang.php b/modules/Contacts/language/en_gb.lang.php new file mode 100644 index 0000000..948e610 --- /dev/null +++ b/modules/Contacts/language/en_gb.lang.php @@ -0,0 +1,198 @@ + 'Contacts', + 'LBL_INVITEE' => 'Direct Reports', + 'LBL_MODULE_TITLE' => 'Contacts: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Contact Search', + 'LBL_LIST_FORM_TITLE' => 'Contact List', + 'LBL_NEW_FORM_TITLE' => 'New Contact', + 'LBL_CONTACT_OPP_FORM_TITLE' => 'Contact-Opportunity:', + 'LBL_CONTACT' => 'Contact:', + 'LBL_LIST_NAME' => 'Name', + 'LBL_LIST_LAST_NAME' => 'Last Name', + 'LBL_LIST_FIRST_NAME' => 'First Name', + 'LBL_LIST_CONTACT_NAME' => 'Contact Name', + 'LBL_LIST_TITLE' => 'Title', + 'LBL_LIST_ACCOUNT_NAME' => 'Organisation Name', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email', + 'LBL_LIST_PHONE' => 'Phone', + 'LBL_LIST_CONTACT_ROLE' => 'Role', + 'db_last_name' => 'LBL_LIST_LAST_NAME', + 'db_first_name' => 'LBL_LIST_FIRST_NAME', + 'db_title' => 'LBL_LIST_TITLE', + 'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', + 'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', + 'LBL_EXISTING_CONTACT' => 'Used an existing contact', + 'LBL_CREATED_CONTACT' => 'Created a new contact', + 'LBL_EXISTING_ACCOUNT' => 'Used an existing Organisation', + 'LBL_CREATED_ACCOUNT' => 'Created a new vtiger_account', + 'LBL_CREATED_CALL' => 'Created a new call', + 'LBL_CREATED_MEETING' => 'Created a new meeting', + 'LBL_ADDMORE_BUSINESSCARD' => 'Add another business card', + 'LBL_BUSINESSCARD' => 'Business Card', + 'LBL_NAME' => 'Name:', + 'LBL_CONTACT_NAME' => 'Contact Name:', + 'LBL_CONTACT_INFORMATION' => 'Contact Information', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_FIRST_NAME' => 'First Name:', + 'LBL_OFFICE_PHONE' => 'Office Phone:', + 'LBL_ACCOUNT_NAME' => 'Organisation Name:', + 'LBL_ANY_PHONE' => 'Any Phone:', + 'LBL_PHONE' => 'Phone:', + 'LBL_LAST_NAME' => 'Last Name:', + 'LBL_MOBILE_PHONE' => 'Mobile:', + 'LBL_HOME_PHONE' => 'Home:', + 'LBL_LEAD_SOURCE' => 'Lead Source:', + 'LBL_OTHER_PHONE' => 'Other Phone:', + 'LBL_FAX_PHONE' => 'Fax:', + 'LBL_TITLE' => 'Title:', + 'LBL_DEPARTMENT' => 'Department:', + 'LBL_BIRTHDATE' => 'Birthdate:', + 'LBL_EMAIL_ADDRESS' => 'Email:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:', + 'LBL_ANY_EMAIL' => 'Any Email:', + 'LBL_REPORTS_TO' => 'Reports To:', + 'LBL_ASSISTANT' => 'Assistant:', + 'LBL_YAHOO_ID' => 'Yahoo! ID:', + 'LBL_ASSISTANT_PHONE' => 'Assistant Phone:', + 'LBL_DO_NOT_CALL' => 'Do Not Call:', + 'LBL_EMAIL_OPT_OUT' => 'Email Opt Out:', + 'LBL_PRIMARY_ADDRESS' => 'Primary Address:', + 'LBL_ALTERNATE_ADDRESS' => 'Other Address:', + 'LBL_ANY_ADDRESS' => 'Any Address:', + 'LBL_CITY' => 'City:', + 'LBL_STATE' => 'County:', + 'LBL_POSTAL_CODE' => 'Postcode:', + 'LBL_COUNTRY' => 'Country:', + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', + 'LBL_IMAGE_INFORMATION' => 'Contact Image Information:', + 'LBL_ADDRESS_INFORMATION' => 'Address Information', + 'LBL_DESCRIPTION' => 'Description:', + 'LBL_CONTACT_ROLE' => 'Role:', + 'LBL_OPP_NAME' => 'Opportunity Name:', + 'LBL_DUPLICATE' => 'Potential Duplicate Contacts', + 'MSG_DUPLICATE' => 'Creating this Contact may potentialy create a duplicate Contact. You may either select a Contact from the list below or you may click on Create New Contact to continue creating a new contact with the previously entered data.', + 'LNK_NEW_APPOINTMENT' => 'New Appointment', + 'LBL_ADD_BUSINESSCARD' => 'Add Business Card', + 'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?', + 'NTC_REMOVE_CONFIRMATION' => 'Are you sure you want to remove this contact from this case?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Are you sure you want to remove this record as a direct report?', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the contact', + 'NTC_COPY_PRIMARY_ADDRESS' => 'Copy primary address to alternate address', + 'NTC_COPY_ALTERNATE_ADDRESS' => 'Copy alternate address to primary address', + 'LBL_SELECT_CONTACT' => 'Select Contact', + 'LBL_GENERAL_INFORMATION' => 'General Information', + 'LBL_NEW_POTENTIAL' => 'New Opportunity', + 'LBL_POTENTIAL_TITLE' => 'Opportunities', + 'LBL_NEW_TASK' => 'New Task', + 'LBL_TASK_TITLE' => 'Tasks', + 'LBL_NEW_CALL' => 'New Call', + 'LBL_CALL_TITLE' => 'Calls', + 'LBL_NEW_MEETING' => 'New Meeting', + 'LBL_MEETING_TITLE' => 'Meetings', + 'LBL_NEW_EMAIL' => 'New Email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_NOTE' => 'New Document', + 'LBL_NOTE_TITLE' => 'Documents', + 'LBL_TOOL_FORM_TITLE' => 'Contact Tools', + 'Salutation' => 'Salutation', + 'First Name' => 'First Name', + 'Office Phone' => 'Office Phone', + 'Last Name' => 'Last Name', + 'Mobile' => 'Mobile', + 'Account Name' => 'Organisation Name', + 'Home Phone' => 'Home Phone', + 'Lead Source' => 'Lead Source', + 'Other Phone' => 'Other Phone', + 'Title' => 'Job Title', + 'Fax' => 'Fax', + 'Department' => 'Department', + 'Birthdate' => 'Birthdate', + 'Email' => 'Email', + 'Reports To' => 'Reports To', + 'Assistant' => 'Assistant Name', + 'Yahoo Id' => 'Yahoo ID', + 'Assistant Phone' => 'Assistant Phone', + 'Do Not Call' => 'Do Not Call', + 'Email Opt Out' => 'Email Opt Out', + 'Assigned To' => 'Assigned To', + 'Campaign Source' => 'Campaign Source', + 'Reference' => 'Reference', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Mailing Street' => 'Invoice Street', + 'Other Street' => 'Delivery Street', + 'Mailing City' => 'Invoice City', + 'Mailing State' => 'Invoice County', + 'Mailing Zip' => 'Invoice Postcode', + 'Mailing Country' => 'Invoice Country', + 'Mailing Po Box' => 'Invoice PO Box', + 'Other Po Box' => 'Delivery PO Box', + 'Other City' => 'Delivery City', + 'Other State' => 'Delivery County', + 'Other Zip' => 'Delivery Postcode', + 'Other Country' => 'Delivery Country', + 'Contact Image' => 'Contact Image', + 'Description' => 'Description', + 'LBL_NEW_CONTACT' => 'New Contact', + 'LBL_NEW_ACCOUNT' => 'New Organisation', + 'LBL_NOTE_SUBJECT' => 'Document Subject:', + 'LBL_NOTE' => 'Note:', + 'LBL_WEBSITE' => 'Website:', + 'LBL_NEW_APPOINTMENT' => 'New Appointment', + 'LBL_SUBJECT' => 'Subject:', + 'LBL_START_DATE' => 'Start Date:', + 'LBL_START_TIME' => 'Start Time:', + 'Portal User' => 'Portal User', + 'LBL_CUSTOMER_PORTAL_INFORMATION' => 'Customer Portal Information', + 'Support Start Date' => 'Support Start Date', + 'Support End Date' => 'Support End Date', + 'Name' => 'Name', + 'LBL_ALL' => 'All', + 'LBL_MAXIMUM_LIMIT_ERROR' => 'Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than 800000 bytes', + 'LBL_UPLOAD_ERROR' => 'Problem with file upload. Please try again.', + 'LBL_IMAGE_ERROR' => 'The given file is not of type image(.gif/.jpg/.png)', + 'LBL_INVALID_IMAGE' => 'Invalid file or file has no data', + 'Notify Owner' => 'Notify Owner', + '--None--' => '--None--', + 'Mr.' => 'Mr.', + 'Ms.' => 'Ms.', + 'Mrs.' => 'Mrs.', + 'Dr.' => 'Dr.', + 'Prof.' => 'Prof.', + 'Cold Call' => 'Cold Call', + 'Existing Customer' => 'Existing Customer', + 'Self Generated' => 'Self Generated', + 'Employee' => 'Employee', + 'Partner' => 'Partner', + 'Public Relations' => 'Public Relations', + 'Direct Mail' => 'Direct Mail', + 'Conference' => 'Conference', + 'Trade Show' => 'Trade Show', + 'Web Site' => 'Web Site', + 'Word of mouth' => 'Word of mouth', + 'Other' => 'Other', + 'User List' => 'User List', + 'Customer Portal Login Details' => 'Customer Portal Login Details', + 'Dear' => 'Dear', + 'Your Customer Portal Login details are given below' => 'Your Customer Portal Login details are given below: ', + 'User Id :' => 'User ID: ', + 'Password :' => 'Password: ', + 'Please Login Here' => 'Please Login Here', + 'Note :' => 'Note: ', + 'We suggest you to change your password after loggi' => 'We suggest you to change your password after logging in first time.', + 'Support Team' => 'Support Team', + 'TITLE_AJAX_CSS_POPUP_CHAT' => 'Ajax Css-Popup chat', + 'Contact Id' => 'Contact No.', + 'Secondary Email' => 'Secondary Email', + 'Contacts ID' => 'Contacts ID', +); +?> \ No newline at end of file diff --git a/modules/Contacts/language/en_us.lang.php b/modules/Contacts/language/en_us.lang.php new file mode 100644 index 0000000..37f474c --- /dev/null +++ b/modules/Contacts/language/en_us.lang.php @@ -0,0 +1,251 @@ +'Contacts', +'LBL_INVITEE'=>'Direct Reports', +'LBL_MODULE_TITLE'=>'Contacts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Contact Search', +'LBL_LIST_FORM_TITLE'=>'Contact List', +'LBL_NEW_FORM_TITLE'=>'New Contact', +'LBL_CONTACT_OPP_FORM_TITLE'=>'Contact-Opportunity:', +'LBL_CONTACT'=>'Contact:', + +'LBL_LIST_NAME'=>'Name', +'LBL_LIST_LAST_NAME'=>'Last Name', +'LBL_LIST_FIRST_NAME'=>'First Name', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_TITLE'=>'Title', +'LBL_LIST_ACCOUNT_NAME'=>'Organization Name', +'LBL_LIST_EMAIL_ADDRESS'=>'Email', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_CONTACT_ROLE'=>'Role', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//END DON'T CONVERT + +'LBL_EXISTING_CONTACT' => 'Used an existing contact', +'LBL_CREATED_CONTACT' => 'Created a new contact', +'LBL_EXISTING_ACCOUNT' => 'Used an existing vtiger_account', +'LBL_CREATED_ACCOUNT' => 'Created a new vtiger_account', +'LBL_CREATED_CALL' => 'Created a new call', +'LBL_CREATED_MEETING' => 'Created a new meeting', +'LBL_ADDMORE_BUSINESSCARD' =>'Add another business card', + +'LBL_BUSINESSCARD' => 'Business Card', + +'LBL_NAME'=>'Name:', +'LBL_CONTACT_NAME'=>'Contact Name:', +'LBL_CONTACT_INFORMATION'=>'Contact Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_FIRST_NAME'=>'First Name:', +'LBL_OFFICE_PHONE'=>'Office Phone:', +'LBL_ACCOUNT_NAME'=>'Organization Name:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_PHONE'=>'Phone:', +'LBL_LAST_NAME'=>'Last Name:', +'LBL_MOBILE_PHONE'=>'Mobile:', +'LBL_HOME_PHONE'=>'Home:', +'LBL_LEAD_SOURCE'=>'Lead Source:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_FAX_PHONE'=>'Fax:', +'LBL_TITLE'=>'Title:', +'LBL_DEPARTMENT'=>'Department:', +'LBL_BIRTHDATE'=>'Birthdate:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_REPORTS_TO'=>'Reports To:', +'LBL_ASSISTANT'=>'Assistant:', +'LBL_YAHOO_ID'=>'Yahoo! ID:', +'LBL_ASSISTANT_PHONE'=>'Assistant Phone:', +'LBL_DO_NOT_CALL'=>'Do Not Call:', +'LBL_EMAIL_OPT_OUT'=>'Email Opt Out:', +'LBL_PRIMARY_ADDRESS'=>'Primary Address:', +'LBL_ALTERNATE_ADDRESS'=>'Other Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_IMAGE_INFORMATION'=>'Contact Image Information:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_DESCRIPTION'=>'Description:', +'LBL_CONTACT_ROLE'=>'Role:', +'LBL_OPP_NAME'=>'Opportunity Name:', +'LBL_DUPLICATE'=>'Opportunities Duplicate Contacts', +'MSG_DUPLICATE' => 'Creating this contact may vtiger_potentialy create a duplicate contact. You may either select a contact from the list below or you may click on Create New Contact to continue creating a new contact with the previously entered data.', + +'LNK_NEW_APPOINTMENT' => 'New Appointment', +'LBL_ADD_BUSINESSCARD' => 'Add Business Card', +'NTC_DELETE_CONFIRMATION'=>'Are you sure you want to delete this record?', +'NTC_REMOVE_CONFIRMATION'=>'Are you sure you want to remove this contact from this case?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Are you sure you want to remove this record as a direct vtiger_report?', +'ERR_DELETE_RECORD'=>"en_us A record number must be specified to delete the contact.", +'NTC_COPY_PRIMARY_ADDRESS'=>'Copy primary address to alternate address', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copy alternate address to primary address', + +'LBL_SELECT_CONTACT'=>'Select Contact', +//Added for search heading +'LBL_GENERAL_INFORMATION'=>'General Information', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Opportunity', +'LBL_POTENTIAL_TITLE'=>'Opportunities', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'New Document', +'LBL_NOTE_TITLE'=>'Documents', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Contact Tools', + +'Salutation'=>'Salutation', +'First Name'=>'First Name', +'Office Phone'=>'Office Phone', +'Last Name'=>'Last Name', +'Mobile'=>'Mobile', +'Account Name'=>'Organization Name', +'Home Phone'=>'Home Phone', +'Lead Source'=>'Lead Source', +'Other Phone'=>'Other Phone', +'Title'=>'Title', +'Fax'=>'Fax', +'Department'=>'Department', +'Birthdate'=>'Birthdate', +'Email'=>'Email', +'Reports To'=>'Reports To', +'Assistant'=>'Assistant', +'Yahoo Id'=>'Yahoo Id', +'Assistant Phone'=>'Assistant Phone', +'Do Not Call'=>'Do Not Call', +'Email Opt Out'=>'Email Opt Out', +'Assigned To'=>'Assigned To', +'Campaign Source'=>'Campaign Source', +'Reference' =>'Reference', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Mailing Street'=>'Mailing Street', +'Other Street'=>'Other Street', +'Mailing City'=>'Mailing City', +'Mailing State'=>'Mailing State', +'Mailing Zip'=>'Mailing Postal Code', +'Mailing Country'=>'Mailing Country', +'Mailing Po Box'=>'Mailing PO Box', +'Other Po Box'=>'Other PO Box', +'Other City'=>'Other City', +'Other State'=>'Other State', +'Other Zip'=>'Other Postal Code', +'Other Country'=>'Other Country', +'Contact Image'=>'Contact Image', +'Description'=>'Description', + +// Added vtiger_fields for Add Business Card +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_NEW_ACCOUNT'=>'New Organization', +'LBL_NOTE_SUBJECT'=>'Document Subject:', +'LBL_NOTE'=>'Note:', +'LBL_WEBSITE'=>'Website:', +'LBL_NEW_APPOINTMENT'=>'New Appointment', +'LBL_SUBJECT'=>'Subject:', +'LBL_START_DATE'=>'Start Date:', +'LBL_START_TIME'=>'Start Time:', + +//Added vtiger_field after 4_0_1 +'Portal User'=>'Portal User', +'LBL_CUSTOMER_PORTAL_INFORMATION'=>'Customer Portal Information', +'Support Start Date'=>'Support Start Date', +'Support End Date'=>'Support End Date', +//Added for 4.2 Release -- CustomView +'Name'=>'Name', +'LBL_ALL'=>'All', +'LBL_MAXIMUM_LIMIT_ERROR'=>'Sorry, the uploaded file exceeds the maximum vtiger_filesize limit. Please try a file smaller than 800000 bytes', +'LBL_UPLOAD_ERROR'=>'Problems in file upload. Please try again!', +'LBL_IMAGE_ERROR'=>'The given file is not of type image(.gif/.jpg/.png)', +'LBL_INVALID_IMAGE'=>'Invalid file OR File has no data', + +//Added after 5Alpha5 +'Notify Owner'=>'Notify Owner', + +//Added for Picklist Values +'--None--'=>'--None--', + +'Mr.'=>'Mr.', +'Ms.'=>'Ms.', +'Mrs.'=>'Mrs.', +'Dr.'=>'Dr.', +'Prof.'=>'Prof.', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Existing Customer', +'Self Generated'=>'Self Generated', +'Employee'=>'Employee', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct Mail', +'Conference'=>'Conference', +'Trade Show'=>'Trade Show', +'Web Site'=>'Web Site', +'Word of mouth'=>'Word of mouth', +'Other'=>'Other', +'User List'=>'User List', + +//Added for 5.0.3 +'Customer Portal Login Details'=>'Customer Portal Login Details', +'Dear'=>'Dear', +'Your Customer Portal Login details are given below:'=>'Your Customer Portal Login details are given below:', +'User Id :'=>'User Id :', +'Password :'=>'Password :', +'Please Login Here'=>'Please Login Here', +'Note :'=>'Note :', +'We suggest you to change your password after logging in first time'=>'We suggest you to change your password after logging in first time.', +'Support Team'=>'Support Team', + +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Ajax Css-Popup chat', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Contact Id' => 'Contact Id', +'Secondary Email'=>'Secondary Email', +// END + +'Contacts ID'=>'Contacts ID', +); + +?> diff --git a/modules/Contacts/language/es_es.lang.php b/modules/Contacts/language/es_es.lang.php new file mode 100644 index 0000000..83d33a0 --- /dev/null +++ b/modules/Contacts/language/es_es.lang.php @@ -0,0 +1,252 @@ +'Contactos', +'LBL_INVITEE'=>'Informes', +'LBL_MODULE_TITLE'=>'Contactos: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Contacto', +'LBL_LIST_FORM_TITLE'=>'Lista de Contactos', +'LBL_NEW_FORM_TITLE'=>'Nuevo Contacto', +'LBL_CONTACT_OPP_FORM_TITLE'=>'Contacto-Oportunidad:', +'LBL_CONTACT'=>'Contacto:', + +'LBL_LIST_NAME'=>'Nombre', +'LBL_LIST_LAST_NAME'=>'Apellidos', +'LBL_LIST_FIRST_NAME'=>'Nombre', +'LBL_LIST_CONTACT_NAME'=>'Contacto', +'LBL_LIST_TITLE'=>'Cargo', +'LBL_LIST_ACCOUNT_NAME'=>'Cuentas', +'LBL_LIST_EMAIL_ADDRESS'=>'Email', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_CONTACT_ROLE'=>'Rol', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//END DON'T CONVERT + +'LBL_EXISTING_CONTACT' => 'El contacto ya existe', +'LBL_CREATED_CONTACT' => 'Nuevo contacto creado', +'LBL_EXISTING_ACCOUNT' => 'Usar cuenta existente', +'LBL_CREATED_ACCOUNT' => 'Nueva cuenta creada', +'LBL_CREATED_CALL' => 'Nueva llamada creada', +'LBL_CREATED_MEETING' => 'Nueva reunión creada', +'LBL_ADDMORE_BUSINESSCARD' => 'Añadir otra Tarjeta de Visita', + +'LBL_BUSINESSCARD' => 'Tarjeta de Visita', + +'LBL_NAME'=>'Nombre:', +'LBL_CONTACT_NAME'=>'Contacto:', +'LBL_CONTACT_INFORMATION'=>'Datos Personales', +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', +'LBL_FIRST_NAME'=>'Nombre:', +'LBL_OFFICE_PHONE'=>'Tel. Oficina:', +'LBL_ACCOUNT_NAME'=>'Cuenta:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_PHONE'=>'Teléfono:', +'LBL_LAST_NAME'=>'Apellidos:', +'LBL_MOBILE_PHONE'=>'Tel. Móvil:', +'LBL_HOME_PHONE'=>'Tel. Particular:', +'LBL_LEAD_SOURCE'=>'Origen del Pre-Contacto:', +'LBL_OTHER_PHONE'=>'Tel. Directo:', +'LBL_FAX_PHONE'=>'Fax:', +'LBL_TITLE'=>'Cargo:', +'LBL_DEPARTMENT'=>'Departamento:', +'LBL_BIRTHDATE'=>'Fecha de Nacimiento:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email Adicional:', +'LBL_REPORTS_TO'=>'Informa a:', +'LBL_ASSISTANT'=>'Secretaria:', +'LBL_YAHOO_ID'=>'Mensajería Instantanea:', +'LBL_ASSISTANT_PHONE'=>'Teléfono Secretária:', +'LBL_DO_NOT_CALL'=>'No Llamar por Teléfono:', +'LBL_EMAIL_OPT_OUT'=>'No Enviar emails:', +'LBL_PRIMARY_ADDRESS'=>'Dirección (Principal):', +'LBL_ALTERNATE_ADDRESS'=>'Dirección (Otra):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Población:', +'LBL_STATE'=>'Provincia:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Información Adicional', +'LBL_IMAGE_INFORMATION'=>'Información de Foto del Contacto:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_DESCRIPTION'=>'Descripción:', +'LBL_CONTACT_ROLE'=>'Rol:', +'LBL_OPP_NAME'=>'Oportunidad:', +'LBL_DUPLICATE'=>'Posible Contacto Duplicado', +'MSG_DUPLICATE'=>'Creando este contacto puede duplicar un contacto existente. Seleccione un contacto de la lista inferior o pulse en el boton Crear Nuevo Contacto para crear un nuevo contacto con los datos introducidos.', + +'LNK_NEW_APPOINTMENT' => 'Añadir Evento', +'LBL_ADD_BUSINESSCARD' => 'Añadir Tarjeta de Visita', +'NTC_DELETE_CONFIRMATION'=>'¿Está seguro que desea eliminar este registro?', +'NTC_REMOVE_CONFIRMATION'=>'¿Está seguro que desea eliminar este contacto de este caso?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'¿Está seguro que desea eliminar este expediente como informe directo?', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para poder eliminar el contacto.', +'NTC_COPY_PRIMARY_ADDRESS'=>'Copiar Principal a Alternativa', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copiar Alternativa a Principal', + +'LBL_SELECT_CONTACT'=>'Seleccionar Contacto', +//Added for search heading +'LBL_GENERAL_INFORMATION'=>'Información General', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Añadir Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Añadir Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Añadir Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'Añadir Documento', +'LBL_NOTE_TITLE'=>'Documentos', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Contacto', + +'Salutation'=>'Saludo', +'First Name'=>'Nombre', +'Office Phone'=>'Tel. Empresa', +'Last Name'=>'Apellidos', +'Mobile'=>'Tel. Móvil', +'Account Name'=>'Cuenta', +'Home Phone'=>'Tel. Particular', +'Lead Source'=>'Origen de Pre-Contacto', +'Other Phone'=>'Tel. Directo', +'Title'=>'Cargo', +'Fax'=>'Fax', +'Department'=>'Departamento', +'Birthdate'=>'Fecha de Nacimiento', +'Email'=>'Email', +'Reports To'=>'Informa a', +'Assistant'=>'Secretaria', +'Yahoo Id'=>'Mensajería Instantanea', +'Assistant Phone'=>'Teléfono de la Secretaria', +'Do Not Call'=>'No Llamar por Teléfono', +'Email Opt Out'=>'No Enviar Emails', +'Assigned To'=>'Asignado a', +'Campaign Source'=>'Origen de Campaña', +'Reference' => 'Referencias', +'Created Time'=>'Fecha de Alta', +'Modified Time'=>'Fecha de Modificación', +'Mailing Street'=>'Dirección (Factura)', +'Other Street'=>'Dirección (Envío)', +'Mailing City'=>'Población (Factura)', +'Mailing State'=>'Provincia (Factura)', +'Mailing Zip'=>'Código Postal (Factura)', +'Mailing Country'=>'País (Factura)', +'Mailing Po Box'=>'Apdo de Correos (Factura)', +'Other Po Box'=>'Apdo de Correos (Envío)', +'Other City'=>'Población (Envío)', +'Other State'=>'Provincia (Envío)', +'Other Zip'=>'Código Postal (Envío)', +'Other Country'=>'País (Envío)', +'Contact Image'=>'Imagen del Contacto', +'Description'=>'Descripción', + +// Added vtiger_fields for Add Business Card +'LBL_NEW_CONTACT'=>'Añadir Contacto', +'LBL_NEW_ACCOUNT'=>'Añadir Cuenta', +'LBL_NOTE_SUBJECT'=>'Asunto:', +'LBL_NOTE'=>'Nota:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_NEW_APPOINTMENT'=>'Añadir Evento', +'LBL_SUBJECT'=>'Asunto:', +'LBL_START_DATE'=>'Fecha de Inicio:', +'LBL_START_TIME'=>'Hora de Inicio:', + +//Added vtiger_field after 4_0_1 +'Portal User'=>'Usuario de Portal', +'LBL_CUSTOMER_PORTAL_INFORMATION'=>'Información del Cliente', +'Support Start Date'=>'Inicio de Soporte', +'Support End Date'=>'Vencimiento de Soporte ', +//Added for 4.2 Release -- CustomView +'Name'=>'Nombre', +'LBL_ALL'=>'Todos', +'LBL_MAXIMUM_LIMIT_ERROR'=>'El archivo excede el tamaño máximo permitido. Pruebe con un archivo inferior a 800000 bytes', +'LBL_UPLOAD_ERROR'=>'Problemas al subir el archivo. ¡Inténtelo otra vez!', +'LBL_IMAGE_ERROR'=>'El archivo no es de tipo imágen(.gif/.jpg/.png)', +'LBL_INVALID_IMAGE'=>'Archivo inválido o no tiene datos', + +//Added after 5Alpha5 +'Notify Owner'=>'Notificar al Propietario', + +//Added for Picklist Values +'--None--'=>'-----', + +'Mr.'=>'Sr.', +'Ms.'=>'Sra.', +'Mrs.'=>'Srta.', +'Dr.'=>'Dr.', +'Prof.'=>'Prof.', + +'Cold Call'=>'Llamada', +'Existing Customer'=>'Cliente', +'Self Generated'=>'Autogenerada', +'Employee'=>'Trabajador', +'Partner'=>'Socio', +'Public Relations'=>'Relaciones Públicas', +'Direct Mail'=>'Mailing', +'Conference'=>'Conferencia', +'Trade Show'=>'Feria', +'Web Site'=>'Web', +'Word of mouth'=>'Boca a Boca', +'Other'=>'Otro', +'User List'=>'Lista de Usuarios', + +//Added for 5.0.3 +'Customer Portal Login Details'=>'Detalles de Identificación para Portal de Cliente', +'Dear'=>'Estimado', +'Your Customer Portal Login details are given below:'=>'Los datos de Identificación par el Portal de Cliente son:', +'User Id :'=>'Usuario:', +'Password :'=>'Contraseña:', +'Please Login Here'=>'Por favor entre aquí.', +'Note :'=>'Nota:', +'We suggest you to change your password after logging in first time'=>'Le sugerimos que cambie la contraseña al identificarse por primera vez', +'Support Team'=>'El Equipo de Soporte Técnico', + +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chat', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Contact Id' => 'Id Contacto', +// END +'Secondary Email'=>'Email Segundario', + +'Contacts ID'=>'Id Contacto', + +); + +?> diff --git a/modules/Contacts/language/es_mx.lang.php b/modules/Contacts/language/es_mx.lang.php new file mode 100644 index 0000000..2558f0d --- /dev/null +++ b/modules/Contacts/language/es_mx.lang.php @@ -0,0 +1,253 @@ +'Contactos', +'LBL_INVITEE'=>'Informes', +'LBL_MODULE_TITLE'=>'Contactos: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Contacto', +'LBL_LIST_FORM_TITLE'=>'Lista de Contactos', +'LBL_NEW_FORM_TITLE'=>'Nuevo Contacto', +'LBL_CONTACT_OPP_FORM_TITLE'=>'Contacto-Oportunidad:', +'LBL_CONTACT'=>'Contacto:', + +'LBL_LIST_NAME'=>'Nombre', +'LBL_LIST_LAST_NAME'=>'Apellidos', +'LBL_LIST_FIRST_NAME'=>'Nombre', +'LBL_LIST_CONTACT_NAME'=>'Contacto', +'LBL_LIST_TITLE'=>'Cargo', +'LBL_LIST_ACCOUNT_NAME'=>'Cuentas', +'LBL_LIST_EMAIL_ADDRESS'=>'Email', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_CONTACT_ROLE'=>'Rol', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//END DON'T CONVERT + +'LBL_EXISTING_CONTACT' => 'El contacto ya existe', +'LBL_CREATED_CONTACT' => 'Nuevo contacto creado', +'LBL_EXISTING_ACCOUNT' => 'Usar cuenta existente', +'LBL_CREATED_ACCOUNT' => 'Nueva cuenta creada', +'LBL_CREATED_CALL' => 'Nueva llamada creada', +'LBL_CREATED_MEETING' => 'Nueva reunión creada', +'LBL_ADDMORE_BUSINESSCARD' => 'Agregar otra Tarjeta de Visita', + +'LBL_BUSINESSCARD' => 'Tarjeta de Visita', + +'LBL_NAME'=>'Nombre:', +'LBL_CONTACT_NAME'=>'Contacto:', +'LBL_CONTACT_INFORMATION'=>'Datos Personales', +'LBL_CUSTOM_INFORMATION'=>'Información Personalizada', +'LBL_FIRST_NAME'=>'Nombre:', +'LBL_OFFICE_PHONE'=>'Tel. Oficina:', +'LBL_ACCOUNT_NAME'=>'Cuenta:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_PHONE'=>'Teléfono:', +'LBL_LAST_NAME'=>'Apellidos:', +'LBL_MOBILE_PHONE'=>'Tel. Móvil:', +'LBL_HOME_PHONE'=>'Tel. Particular:', +'LBL_LEAD_SOURCE'=>'Origen del Prospecto:', +'LBL_OTHER_PHONE'=>'Tel. Directo:', +'LBL_FAX_PHONE'=>'Fax:', +'LBL_TITLE'=>'Cargo:', +'LBL_DEPARTMENT'=>'Departamento:', +'LBL_BIRTHDATE'=>'Fecha de Nacimiento:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email Adicional:', +'LBL_REPORTS_TO'=>'Informa a:', +'LBL_ASSISTANT'=>'Secretaria:', +'LBL_YAHOO_ID'=>'Mensajería Instantanea:', +'LBL_ASSISTANT_PHONE'=>'Teléfono Secretária:', +'LBL_DO_NOT_CALL'=>'No Llamar por Teléfono:', +'LBL_EMAIL_OPT_OUT'=>'No Enviar emails:', +'LBL_PRIMARY_ADDRESS'=>'Dirección (Principal):', +'LBL_ALTERNATE_ADDRESS'=>'Dirección (Otra):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Deleg./Mpio.:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descripción Adicional', +'LBL_IMAGE_INFORMATION'=>'Información de Foto del Contacto:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_DESCRIPTION'=>'Descripción:', +'LBL_CONTACT_ROLE'=>'Rol:', +'LBL_OPP_NAME'=>'Oportunidad:', +'LBL_DUPLICATE'=>'Posible Contacto Duplicado', +'MSG_DUPLICATE'=>'Al crear este contacto puede duplicar un contacto existente. Seleccione un contacto de la lista inferior o pulse en el boton Crear Nuevo Contacto para crear un nuevo registro con los datos introducidos.', + +'LNK_NEW_APPOINTMENT' => 'Agregar Evento', +'LBL_ADD_BUSINESSCARD' => 'Agregar Tarjeta de Visita', +'NTC_DELETE_CONFIRMATION'=>'¿Está seguro que desea eliminar este registro?', +'NTC_REMOVE_CONFIRMATION'=>'¿Está seguro que desea eliminar este contacto de este caso?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'¿Está seguro que desea eliminar este expediente como informe directo?', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para poder eliminar el contacto.', +'NTC_COPY_PRIMARY_ADDRESS'=>'Copiar Principal a Alternativa', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copiar Alternativa a Principal', + +'LBL_SELECT_CONTACT'=>'Seleccionar Contacto', +//Added for search heading +'LBL_GENERAL_INFORMATION'=>'Información General', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Agregar Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Agregar Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Agregar Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'Agregar Documento', +'LBL_NOTE_TITLE'=>'Documentos', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Contacto', + +'Salutation'=>'Saludo', +'First Name'=>'Nombre', +'Office Phone'=>'Tel. Empresa', +'Last Name'=>'Apellidos', +'Mobile'=>'Tel. Móvil', +'Account Name'=>'Cuenta', +'Home Phone'=>'Tel. Particular', +'Lead Source'=>'Origen de Prospecto', +'Other Phone'=>'Tel. Directo', +'Title'=>'Cargo', +'Fax'=>'Fax', +'Department'=>'Departamento', +'Birthdate'=>'Fecha de Nacimiento', +'Email'=>'Email', +'Reports To'=>'Informa a', +'Assistant'=>'Secretaria', +'Yahoo Id'=>'Mensajería Instantanea', +'Assistant Phone'=>'Teléfono de la Secretaria', +'Do Not Call'=>'No Llamar por Teléfono', +'Email Opt Out'=>'No Enviar Emails', +'Assigned To'=>'Asignado a', +'Campaign Source'=>'Origen de Campaña', +'Reference' => 'Referencias', +'Created Time'=>'Fecha de Alta', +'Modified Time'=>'Fecha de Modificación', +'Mailing Street'=>'Dirección (Factura)', +'Other Street'=>'Dirección (Envío)', +'Mailing City'=>'Deleg./Mpio. (Factura)', +'Mailing State'=>'Estado (Factura)', +'Mailing Zip'=>'Código Postal (Factura)', +'Mailing Country'=>'País (Factura)', +'Mailing Po Box'=>'Colonia (Factura)', +'Other Po Box'=>'Colonia (Envío)', +'Other City'=>'Deleg./Mpio. (Envío)', +'Other State'=>'Estado (Envío)', +'Other Zip'=>'Código Postal (Envío)', +'Other Country'=>'País (Envío)', +'Contact Image'=>'Imagen del Contacto', +'Description'=>'Descripción', + +// Added vtiger_fields for Add Business Card +'LBL_NEW_CONTACT'=>'Agregar Contacto', +'LBL_NEW_ACCOUNT'=>'Agregar Cuenta', +'LBL_NOTE_SUBJECT'=>'Asunto:', +'LBL_NOTE'=>'Nota:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_NEW_APPOINTMENT'=>'Agregar Evento', +'LBL_SUBJECT'=>'Asunto:', +'LBL_START_DATE'=>'Fecha de Inicio:', +'LBL_START_TIME'=>'Hora de Inicio:', + +//Added vtiger_field after 4_0_1 +'Portal User'=>'Usuario de Portal', +'LBL_CUSTOMER_PORTAL_INFORMATION'=>'Información del Cliente', +'Support Start Date'=>'Inicio de Soporte', +'Support End Date'=>'Vencimiento de Soporte ', +//Added for 4.2 Release -- CustomView +'Name'=>'Nombre', +'LBL_ALL'=>'Todos', +'LBL_MAXIMUM_LIMIT_ERROR'=>'El archivo excede el tamaño máximo permitido. Pruebe con un archivo inferior a 800Kbytes', +'LBL_UPLOAD_ERROR'=>'Problemas al subir el archivo. ¡Inténtelo otra vez!', +'LBL_IMAGE_ERROR'=>'El archivo no es de tipo imágen(.gif/.jpg/.png)', +'LBL_INVALID_IMAGE'=>'Archivo inválido o no tiene datos', + +//Added after 5Alpha5 +'Notify Owner'=>'Notificar al Propietario', + +//Added for Picklist Values +'--None--'=>'-----', + +'Mr.'=>'Sr.', +'Ms.'=>'Sra.', +'Mrs.'=>'Srta.', +'Dr.'=>'Dr.', +'Prof.'=>'Prof.', + +'Cold Call'=>'Llamada en frío', +'Existing Customer'=>'Cliente', +'Self Generated'=>'Autogenerada', +'Employee'=>'Trabajador', +'Partner'=>'Socio', +'Public Relations'=>'Relaciones Públicas', +'Direct Mail'=>'Mailing', +'Conference'=>'Conferencia', +'Trade Show'=>'Feria', +'Web Site'=>'Web', +'Word of mouth'=>'Boca a Boca', +'Other'=>'Otro', +'User List'=>'Lista de Usuarios', + +//Added for 5.0.3 +'Customer Portal Login Details'=>'Detalles de Identificación para Portal de Cliente', +'Dear'=>'Estimado', +'Your Customer Portal Login details are given below:'=>'Los datos de Identificación par el Portal de Cliente son:', +'User Id :'=>'Usuario:', +'Password :'=>'Contraseña:', +'Please Login Here'=>'Por favor entre aquí.', +'Note :'=>'Nota:', +'We suggest you to change your password after logging in first time'=>'Le sugerimos que cambie la contraseña al identificarse por primera vez', +'Support Team'=>'El Equipo de Soporte Técnico', + +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chat', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Contact Id' => 'Id Contacto', +// END +'Secondary Email'=>'Email Segundario', + +'Contacts ID'=>'Id Contacto', + +); + +?> diff --git a/modules/Contacts/language/fr_fr.lang.php b/modules/Contacts/language/fr_fr.lang.php new file mode 100644 index 0000000..575beac --- /dev/null +++ b/modules/Contacts/language/fr_fr.lang.php @@ -0,0 +1,207 @@ + 'Contacts', + 'LBL_INVITEE' => 'Supérieur hiérarchique', + 'LBL_MODULE_TITLE' => 'Contact : accueil', + 'LBL_SEARCH_FORM_TITLE' => 'Rechercher contacts', + 'LBL_LIST_FORM_TITLE' => 'Liste contacts', + 'LBL_NEW_FORM_TITLE' => 'Nouveau contact', + 'LBL_CONTACT_OPP_FORM_TITLE' => 'Contact-Affaire :', + 'LBL_CONTACT' => 'Contact :', + 'LBL_LIST_NAME' => 'Nom', + 'LBL_LIST_LAST_NAME' => 'Nom', + 'LBL_LIST_FIRST_NAME' => 'Prénom', + 'LBL_LIST_CONTACT_NAME' => 'Nom', + 'LBL_LIST_TITLE' => 'Fonction', + 'LBL_LIST_ACCOUNT_NAME' => 'Compte', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email', + 'LBL_LIST_PHONE' => 'Téléphone', + 'LBL_LIST_CONTACT_ROLE' => 'Rôle', + 'db_last_name' => LBL_LIST_LAST_NAME, + 'db_first_name' => LBL_LIST_FIRST_NAME, + 'db_title' => LBL_LIST_TITLE, + 'db_email1' => LBL_LIST_EMAIL_ADDRESS, + 'db_email2' => LBL_LIST_EMAIL_ADDRESS, + 'LBL_EXISTING_CONTACT' => 'Un contact existant à été utilisé', + 'LBL_CREATED_CONTACT' => 'Un nouveau contact à été créé', + 'LBL_EXISTING_ACCOUNT' => 'Un compte existant à été créé', + 'LBL_CREATED_ACCOUNT' => 'Un compte à été créé', + 'LBL_CREATED_CALL' => 'Un appel à été créé', + 'LBL_CREATED_MEETING' => 'Un rendez-vous à été créé', + 'LBL_ADDMORE_BUSINESSCARD' => 'Ajouter une autre carte de visite', + 'LBL_BUSINESSCARD' => 'Carte de visite', + 'LBL_NAME' => 'Nom :', + 'LBL_CONTACT_NAME' => 'Nom contact :', + 'LBL_CONTACT_INFORMATION' => 'Détail contact ', + 'LBL_CUSTOM_INFORMATION' => 'Informations personnalisées', + 'LBL_FIRST_NAME' => 'Prénom :', + 'LBL_OFFICE_PHONE' => 'Téléphone (bureau) :', + 'LBL_ACCOUNT_NAME' => 'Compte :', + 'LBL_ANY_PHONE' => 'Téléphone (alt.) :', + 'LBL_PHONE' => 'Téléphone :', + 'LBL_LAST_NAME' => 'Nom :', + 'LBL_MOBILE_PHONE' => 'Téléphone (mobile)', + 'LBL_HOME_PHONE' => 'Téléphone (domicile) :', + 'LBL_LEAD_SOURCE' => 'Origine :', + 'LBL_OTHER_PHONE' => 'Téléphone (alt.) :', + 'LBL_FAX_PHONE' => 'Fax :', + 'LBL_TITLE' => 'Fonction :', + 'LBL_DEPARTMENT' => 'Service/Division :', + 'LBL_BIRTHDATE' => 'Anniversaire :', + 'LBL_EMAIL_ADDRESS' => 'Email :', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email (alt.) :', + 'LBL_ANY_EMAIL' => 'Email (al.) :', + 'LBL_REPORTS_TO' => 'Supérieur hiérarchique :', + 'LBL_ASSISTANT' => 'Assistant :', + 'LBL_YAHOO_ID' => 'Yahoo ID :', + 'LBL_ASSISTANT_PHONE' => 'Téléphone (assistant) :', + 'LBL_DO_NOT_CALL' => 'Ne pas appeler :', + 'LBL_EMAIL_OPT_OUT' => 'Ne pas contacter par email :', + 'LBL_PRIMARY_ADDRESS' => 'Adresse (principale) :', + 'LBL_ALTERNATE_ADDRESS' => 'Adresse (alt.) :', + 'LBL_ANY_ADDRESS' => 'Adresse (alt.) :', + 'LBL_CITY' => 'Ville :', + 'LBL_STATE' => 'Département :', + 'LBL_POSTAL_CODE' => 'Code postal :', + 'LBL_COUNTRY' => 'Pays :', + 'LBL_DESCRIPTION_INFORMATION' => 'Informations complémentaires', + 'LBL_IMAGE_INFORMATION' => 'Image/Photo du contact', + 'LBL_ADDRESS_INFORMATION' => 'Adresse', + 'LBL_DESCRIPTION' => 'Description :', + 'LBL_CONTACT_ROLE' => 'Rôle :', + 'LBL_OPP_NAME' => 'Affaire :', + 'LBL_DUPLICATE' => 'Doublon possible', + 'MSG_DUPLICATE' => 'La création de ce contact peut engendrer un doublon. Vous pouvez soit choisir un contact dans la liste ci-dessous ou cliquer sur Créer nouveau contact pour continuer la création d\'un nouveau contact avec les données que vous venez d\'entrer.', + 'LNK_NEW_APPOINTMENT' => 'Nouveau rendez-vous', + 'LBL_ADD_BUSINESSCARD' => 'Ajouter carte de visite', + 'NTC_DELETE_CONFIRMATION' => 'Etes-vous certain de vouloir supprimer cet enregistrement ?', + 'NTC_REMOVE_CONFIRMATION' => 'Etes vous certain de vouloir retirer ce contact ?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Etes-vous certain de vouloir retirer cet enregistrement du lien hiérarchique ?', + 'ERR_DELETE_RECORD' => 'Un numéro d\'enregistrement doit être spécifié pour supprimer ce contact.', + 'NTC_COPY_PRIMARY_ADDRESS' => 'Utiliser l\'adresse principale comme adresse alternative', + 'NTC_COPY_ALTERNATE_ADDRESS' => 'Utiliser l\'adresse alternative comme adresse principale', + 'LBL_SELECT_CONTACT' => 'Sélectionner contact', + 'LBL_GENERAL_INFORMATION' => 'Information', + 'LBL_NEW_POTENTIAL' => 'Nouvelle affaire', + 'LBL_POTENTIAL_TITLE' => 'Affaire', + 'LBL_NEW_TASK' => 'Nouvelle tâche', + 'LBL_TASK_TITLE' => 'Tâches', + 'LBL_NEW_CALL' => 'Nouvel appel', + 'LBL_CALL_TITLE' => 'Appels', + 'LBL_NEW_MEETING' => 'Nouveau rendez-vous', + 'LBL_MEETING_TITLE' => 'Rendez-vous', + 'LBL_NEW_EMAIL' => 'Nouvel email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_NOTE' => 'Nouvelle note', + 'LBL_NOTE_TITLE' => 'Notes', + 'LBL_TOOL_FORM_TITLE' => 'Outils', + 'Salutation' => 'Salutation', + 'First Name' => 'Prénom', + 'Office Phone' => 'Téléphone (bureau)', + 'Last Name' => 'Nom', + 'Mobile' => 'Téléphone (mobile)', + 'Account Name' => 'Compte', + 'Home Phone' => 'Téléphone (domicile)', + 'Lead Source' => 'Origine', + 'Other Phone' => 'Téléphone (Alt.)', + 'Title' => 'Fonction', + 'Fax' => 'Fax', + 'Department' => 'Service/Division', + 'Birthdate' => 'Anniversaire', + 'Email' => 'Email', + 'Reports To' => 'Supérieur hiérarchique', + 'Assistant' => 'Assistant', + 'Yahoo Id' => 'Yahoo ID', + 'Assistant Phone' => 'Téléphone (assistant)', + 'Do Not Call' => 'Ne pas appeler', + 'Email Opt Out' => 'Ne pas contacter par email', + 'Assigned To' => 'Assigné à', + 'Campaign Source' => 'Campagne', + 'Reference' => 'Référent', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Mailing Street' => 'Adresse', + 'Other Street' => 'Adresse (alt.)', + 'Mailing City' => 'Ville', + 'Mailing State' => 'Département', + 'Mailing Zip' => 'Code postal', + 'Mailing Country' => 'Pays', + 'Mailing Po Box' => 'Boite postale', + 'Other Po Box' => 'Boite postale (alt.)', + 'Other City' => 'Ville (alt.)', + 'Other State' => 'Département (alt.)', + 'Other Zip' => 'Code postal (alt.)', + 'Other Country' => 'Pays (alt.)', + 'Contact Image' => 'Photo', + 'Description' => 'Description', + 'LBL_NEW_CONTACT' => 'Nouveau contact', + 'LBL_NEW_ACCOUNT' => 'Nouveau compte', + 'LBL_NOTE_SUBJECT' => 'Objet note :', + 'LBL_NOTE' => 'Note :', + 'LBL_WEBSITE' => 'Site Web :', + 'LBL_NEW_APPOINTMENT' => 'Nouveau rendez-vous', + 'LBL_SUBJECT' => 'Objet :', + 'LBL_START_DATE' => 'Date de début :', + 'LBL_START_TIME' => 'Heure de début :', + 'Portal User' => 'Accès portail de service', + 'LBL_CUSTOMER_PORTAL_INFORMATION' => 'Portail de service client', + 'Support Start Date' => 'Début assistance', + 'Support End Date' => 'Fin assistance', + 'Name' => 'Nom', + 'LBL_ALL' => 'Tout', + 'LBL_MAXIMUM_LIMIT_ERROR' => 'Désolé, le fichier que vous tentez de télécharger dépasse la taille limite. Veuillez réessayer avec un fichier dont la taille est inférieure à 800 000 bytes', + 'LBL_UPLOAD_ERROR' => 'Problème de téléchargement. Veuillez réessayer !', + 'LBL_IMAGE_ERROR' => 'Le fichier n\'est pas de type image (.gif, .jpg, .png)', + 'LBL_INVALID_IMAGE' => 'Fichier non valide ou vide.', + 'Notify Owner' => 'Notifier collaborateur assigné', + '--None--' => '--Aucun--', + 'Mr.' => 'M', + 'Ms.' => 'Mme', + 'Mrs.' => 'Mlle', + 'Dr.' => 'Dr', + 'Prof.' => 'Prof', + 'Cold Call' => 'Appel direct', + 'Existing Customer' => 'Client existant', + 'Self Generated' => 'Auto généré', + 'Employee' => 'Employée', + 'Partner' => 'Partenaire', + 'Public Relations' => 'Relation publique', + 'Direct Mail' => 'Email direct', + 'Conference' => 'Conférence', + 'Trade Show' => 'Salon', + 'Web Site' => 'Site Web', + 'Word of mouth' => 'Bouche à oreille', + 'Other' => 'Autre', + 'User List' => 'Liste des collaborateurs', + 'Customer Portal Login Details' => 'Détail login au portail client', + 'Dear' => 'Cher(ère)', + 'Your Customer Portal Login details are given below:' => 'Veuillez noter vos identifiants de connexion à notre portail de services :', + 'User Id :' => 'Nom d\'utilisateur :', + 'Password :' => 'Mot de passe :', + 'Please Login Here' => 'Veuillez vous connecter ici', + 'Note :' => 'Note :', + 'We suggest you to change your password after logging in first time' => 'Nous vous suggérons de modifier votre mot de passe dès votre première connexion.', + 'Support Team' => 'L\'équipe support', + 'TITLE_AJAX_CSS_POPUP_CHAT' => 'Chat', + 'LBL_DUPLICATE_DATA_IN' => 'Dupliquer ', + 'LBL_DELETE' => 'Supprimer', + 'LBL_MERGE_SELECT' => 'Fusionner la sélection', + 'LBL_MERGE' => 'Fusionner', + 'LBL_MERGE_DATA_IN' => 'Fusionner les enregistrements', + 'LBL_ACTION' => 'Action', + 'LBL_FIELDLISTS' => 'Liste des champs', + 'LBL_RECORD' => 'Enregistrement #', + 'Contact Id' => 'N° Contact', + +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Contacts/language/hu_hu.lang.php b/modules/Contacts/language/hu_hu.lang.php new file mode 100644 index 0000000..7d3f58b --- /dev/null +++ b/modules/Contacts/language/hu_hu.lang.php @@ -0,0 +1,223 @@ + 'Kapcsolatok', + 'LBL_INVITEE' => 'Közvetlen Jelentések', + 'LBL_MODULE_TITLE' => 'Kapcsolatok: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Kapcsolat Keresés', + 'LBL_LIST_FORM_TITLE' => 'Kapcsolat Lista', + 'LBL_NEW_FORM_TITLE' => 'Új Kapcsolat', + 'LBL_CONTACT_OPP_FORM_TITLE' => 'Kapcsolat-Lehetőség:', + 'LBL_CONTACT' => 'Kapcsolat:', + 'LBL_LIST_NAME' => 'Név', + 'LBL_LIST_LAST_NAME' => 'Vezetéknév', + 'LBL_LIST_FIRST_NAME' => 'Keresztnév', + 'LBL_LIST_CONTACT_NAME' => 'Kapcsolat neve', + 'LBL_LIST_TITLE' => 'Beosztás', + 'LBL_LIST_ACCOUNT_NAME' => 'Cég neve', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email', + 'LBL_LIST_PHONE' => 'Telefon', + 'LBL_LIST_CONTACT_ROLE' => 'Munkakör', + 'db_last_name' => 'LBL_LIST_LAST_NAME', + 'db_first_name' => 'LBL_LIST_FIRST_NAME', + 'db_title' => 'LBL_LIST_TITLE', + 'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', + 'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', + 'LBL_EXISTING_CONTACT' => 'Egy létező Kapcsolat használata', + 'LBL_CREATED_CONTACT' => 'Új Kapcsolat létrehozása', + 'LBL_EXISTING_ACCOUNT' => 'Egy létező Cég használata', + 'LBL_CREATED_ACCOUNT' => 'Új Cég létrehozása', + 'LBL_CREATED_CALL' => 'Új Hívás létrehozása', + 'LBL_CREATED_MEETING' => 'Új Megbeszélés létrehozása', + 'LBL_ADDMORE_BUSINESSCARD' => 'Egy másik névkártya hozzáadása', + 'LBL_BUSINESSCARD' => 'Névkártya', + 'LBL_NAME' => 'Név:', + 'LBL_CONTACT_NAME' => 'Kapcsolat neve:', + 'LBL_CONTACT_INFORMATION' => 'Kapcsolat adatok', + 'LBL_CUSTOM_INFORMATION' => 'Egyedi adatok', + 'LBL_FIRST_NAME' => 'Keresztnév:', + 'LBL_OFFICE_PHONE' => 'Telefon, irodai:', + 'LBL_ACCOUNT_NAME' => 'Cégnév:', + 'LBL_ANY_PHONE' => 'Telefon, bármelyik:', + 'LBL_PHONE' => 'Telefon:', + 'LBL_LAST_NAME' => 'Vezetéknév:', + 'LBL_MOBILE_PHONE' => 'Mobil:', + 'LBL_HOME_PHONE' => 'Kezdőlap:', + 'LBL_LEAD_SOURCE' => 'Kapcsolat forrása:', + 'LBL_OTHER_PHONE' => 'Telefon, másik:', + 'LBL_FAX_PHONE' => 'Fax:', + 'LBL_TITLE' => 'Beosztás:', + 'LBL_DEPARTMENT' => 'Részleg:', + 'LBL_BIRTHDATE' => 'Születésnap:', + 'LBL_EMAIL_ADDRESS' => 'Email:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email, másik:', + 'LBL_ANY_EMAIL' => 'Email, bármelyik:', + 'LBL_REPORTS_TO' => 'Jelent neki:', + 'LBL_ASSISTANT' => 'Asszisztens:', + 'LBL_YAHOO_ID' => 'Yahoo! ID:', + 'LBL_ASSISTANT_PHONE' => 'Telefon, asszisztens:', + 'LBL_DO_NOT_CALL' => 'Ne hívd:', + 'LBL_EMAIL_OPT_OUT' => 'Email Leiratkozva:', + 'LBL_PRIMARY_ADDRESS' => 'Elsődleges Cím:', + 'LBL_ALTERNATE_ADDRESS' => 'Egyéb Cím:', + 'LBL_ANY_ADDRESS' => 'Cím, bármelyik:', + 'LBL_CITY' => 'Város:', + 'LBL_STATE' => 'Állam/megye:', + 'LBL_POSTAL_CODE' => 'Irányítószám:', + 'LBL_COUNTRY' => 'Ország:', + 'LBL_DESCRIPTION_INFORMATION' => 'Leírás', + 'LBL_IMAGE_INFORMATION' => 'Kapcsolat képe', + 'LBL_ADDRESS_INFORMATION' => 'Cím adatok', + 'LBL_DESCRIPTION' => 'Leírás:', + 'LBL_CONTACT_ROLE' => 'Munkakör:', + 'LBL_OPP_NAME' => 'Lehetőség neve:', + 'LBL_DUPLICATE' => 'lehetséges Kapcsolatok Duplikáció', + 'MSG_DUPLICATE' => 'Creating this contact may vtiger_potentialy create a duplicate contact. You may either select a contact from the list below or you may click on Create New Contact to continue creating a new contact with the previously entered data.', + 'LNK_NEW_APPOINTMENT' => 'Új Időpont-egyeztetés', + 'LBL_ADD_BUSINESSCARD' => 'Névkártya hozzáadása', + 'NTC_DELETE_CONFIRMATION' => 'Biztos vagy abban, hogy törölni kívánod ezt a rekordot?', + 'NTC_REMOVE_CONFIRMATION' => 'Biztos vagy abban, hogy el kívánod távolítani ezt a Kapcsolatot ebből az Esetből?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Biztos vagy abban, hogy el kívánod távolítani ezt a rekordot mint közvetlen VTiger Jelentést?', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a Kapcsolat törléséhez.', + 'NTC_COPY_PRIMARY_ADDRESS' => 'Az elsődleges Cím másolása az alternatív Címhez', + 'NTC_COPY_ALTERNATE_ADDRESS' => 'Az alternatív Cím másolása az elsődleges Címhez', + 'LBL_SELECT_CONTACT' => 'Kapcsolat kiválasztása', + 'LBL_GENERAL_INFORMATION' => 'Általános információ', + 'LBL_NEW_POTENTIAL' => 'Új Lehetőség', + 'LBL_POTENTIAL_TITLE' => 'Lehetőségek', + 'LBL_NEW_TASK' => 'Új Feladat', + 'LBL_TASK_TITLE' => 'Feladatok', + 'LBL_NEW_CALL' => 'Új Hívás', + 'LBL_CALL_TITLE' => 'Hívások', + 'LBL_NEW_MEETING' => 'Új Megbeszélés', + 'LBL_MEETING_TITLE' => 'Megbeszélések', + 'LBL_NEW_EMAIL' => 'Új Email', + 'LBL_EMAIL_TITLE' => 'Emailek', + 'LBL_NEW_NOTE' => 'Új Dokumentum', + 'LBL_NOTE_TITLE' => 'Dokumentumok', + 'LBL_TOOL_FORM_TITLE' => 'Kapcsolat Eszközök', + 'Salutation' => 'Megszólítás', + 'First Name' => 'Keresztnév', + 'Office Phone' => 'Telefon, irodai', + 'Last Name' => 'Vezetéknév', + 'Mobile' => 'Mobil', + 'Account Name' => 'Cégnév', + 'Home Phone' => 'Telefon, otthoni', + 'Lead Source' => 'Kapcsolat forrása', + 'Other Phone' => 'Telefon, másik', + 'Title' => 'Beosztás', + 'Fax' => 'Fax', + 'Department' => 'Részleg', + 'Birthdate' => 'Születésnap', + 'Email' => 'Email', + 'Reports To' => 'Jelent neki', + 'Assistant' => 'Asszisztens', + 'Yahoo Id' => 'Yahoo azonosító', + 'Assistant Phone' => 'Telefon, asszisztens', + 'Do Not Call' => 'Ne hívd', + 'Email Opt Out' => 'Email leiratkozott', + 'Assigned To' => 'Felelős', + 'Campaign Source' => 'Kampány Forrás', + 'Reference' => 'Referencia', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Mailing Street' => 'Utca (Levelezés)', + 'Other Street' => 'Utca (Másik)', + 'Mailing City' => 'Város (Levelezés)', + 'Mailing State' => 'Állam/Megye (Levelezés)', + 'Mailing Zip' => 'Irányítószám (Levelezés)', + 'Mailing Country' => 'Ország (Levelezés)', + 'Mailing Po Box' => 'Postafiók (Levelezés)', + 'Other Po Box' => 'Postafiók (Másik)', + 'Other City' => 'Város (Másik)', + 'Other State' => 'Állam/Megye (Másik)', + 'Other Zip' => 'Irányítószám (Másik)', + 'Other Country' => 'Ország (Másik)', + 'Contact Image' => 'Kapcsolat képe', + 'Description' => 'Leírás:', + 'LBL_NEW_CONTACT' => 'Új Kapcsolat', + 'LBL_NEW_ACCOUNT' => 'Új Cég', + 'LBL_NOTE_SUBJECT' => 'Dokumentum tárgya:', + 'LBL_NOTE' => 'Megjegyzés:', + 'LBL_WEBSITE' => 'Weboldal:', + 'LBL_NEW_APPOINTMENT' => 'Új időpont-egyeztetés', + 'LBL_SUBJECT' => 'Tárgy:', + 'LBL_START_DATE' => 'Kezdés dátuma:', + 'LBL_START_TIME' => 'Kezdés ideje:', + 'Portal User' => 'Portál felhasználó', + 'LBL_CUSTOMER_PORTAL_INFORMATION' => 'Ügyfélszolgálati Portál adatok', + 'Support Start Date' => 'Hozzáférés kezdő dátuma', + 'Support End Date' => 'Hozzáférés záró dátuma', + 'Name' => 'Név', + 'LBL_ALL' => 'Minden', + 'LBL_MAXIMUM_LIMIT_ERROR' => 'Sajnos, a feltöltendő fájl mérete meghaladja a maximálisan feltölthető fájl méretét. Kérjük, hogy próbálj egy 800 kB-nél kisebb méretű fájlt feltölteni.', + 'LBL_UPLOAD_ERROR' => 'Hiba a fájl feltöltés közben. Kérjük, hogy próbáld újra!', + 'LBL_IMAGE_ERROR' => 'Az adott fájl nem egy képfájl(.gif/.jpg/.png)', + 'LBL_INVALID_IMAGE' => 'Érvénytelen fájl, vagy a fájl nem tartalmaz adatot', + 'Notify Owner' => 'Tulajdonos értesítése', + '--None--' => '--nincs--', + 'Mr.' => 'Mr.', + 'Ms.' => 'Ms.', + 'Mrs.' => 'Mrs.', + 'Dr.' => 'Dr.', + 'Prof.' => 'Prof.', + 'Cold Call' => 'Hideg Hívás', + 'Existing Customer' => 'Meglévő Vevő', + 'Self Generated' => 'Ő keresett meg', + 'Employee' => 'Alkalmazott', + 'Partner' => 'Partner', + 'Public Relations' => 'Public Relations', + 'Direct Mail' => 'Direct Mail', + 'Conference' => 'Konferencia', + 'Trade Show' => 'Kereskedelmi bemutató', + 'Web Site' => 'Weboldal', + 'Word of mouth' => 'Szóbeszéd', + 'Other' => 'Más, egyéb', + 'User List' => 'Felhasználó lista', + 'Customer Portal Login Details' => 'Ügyfél Portál Bejelentkezési Adatok', + 'Dear' => 'Kedves', + 'Your Customer Portal Login details are given below' => 'Az Ön Ügyfél Portál Bejelentkezési Adatai itt alább láthatók:', + 'User Id :' => 'Felhasználó ID :', + 'Password :' => 'Jelszó :', + 'Please Login Here' => 'Kérjük, lépjen be itt', + 'Note :' => 'Megjegyzés :', + 'We suggest you to change your password after loggi' => 'Javasoljuk, hogy cserélje a jelszavát az első belépést követően.', + 'Support Team' => 'Ügyfélszolgálat', + 'TITLE_AJAX_CSS_POPUP_CHAT' => 'Azonnali üzenetküldő (chat)', + 'Contact Id' => 'Kapcsolat No.', + 'Secondary Email' => 'Másodlagos E-mail', + 'Contacts ID' => 'Kapcsolat AZ', + 'Send SMS' => 'SMS küldés', + 'Projects' => 'Projektek', + 'Service Places' => 'Szolgáltatási helyek', + 'Address Inherit' => 'Származtatott cím', + 'LBL_DUPLICATE_DATA_IN' => 'Duplikált adat ebben: ', + 'LBL_DELETE' => 'Törlés', + 'LBL_MERGE_SELECT' => 'Válaszd ki az összefűzendő adatokat', + 'LBL_MERGE' => 'Összefűzés', + 'LBL_MERGE_DATA_IN' => 'Adatok összefűzése ebben: ', + 'LBL_ACTION' => 'Műveletek', + 'LBL_FIELDLISTS' => 'Mezőlista', + 'LBL_RECORD' => 'Rekord', + 'Phone' => 'Telefon' +); +?> \ No newline at end of file diff --git a/modules/Contacts/language/nl_nl.lang.php b/modules/Contacts/language/nl_nl.lang.php new file mode 100644 index 0000000..af5d694 --- /dev/null +++ b/modules/Contacts/language/nl_nl.lang.php @@ -0,0 +1,261 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.6 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Contacts/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +// Mike Crowe Mod --------------------------------------------------------Added for general search +'LBL_MODULE_NAME'=>'Contacten', +'LBL_INVITEE'=>'Medewerker', +'LBL_MODULE_TITLE'=>'Contacten: Home', +'LBL_SEARCH_FORM_TITLE'=>'Contact zoeken', +'LBL_LIST_FORM_TITLE'=>'Contactlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuw contact', +'LBL_CONTACT_OPP_FORM_TITLE'=>'Contact-gelegenheid:', +'LBL_CONTACT'=>'Contact:', + +'LBL_LIST_NAME'=>'Naam', +'LBL_LIST_LAST_NAME'=>'Achternaam', +'LBL_LIST_FIRST_NAME'=>'Voornaam', +'LBL_LIST_CONTACT_NAME'=>'Contactnaam', +'LBL_LIST_TITLE'=>'Titel', +'LBL_LIST_ACCOUNT_NAME'=>'Accountnaam', +'LBL_LIST_EMAIL_ADDRESS'=>'E-mail', +'LBL_LIST_PHONE'=>'Telefoon', +'LBL_LIST_CONTACT_ROLE'=>'Contact bron', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//END DON'T CONVERT + +'LBL_EXISTING_CONTACT' => 'Gebruikte en bestaande contacten', +'LBL_CREATED_CONTACT' => 'Nieuwe account aangemaakt', +'LBL_EXISTING_ACCOUNT' => 'Bestaande klant gebruikt', +'LBL_CREATED_ACCOUNT' => 'Nieuwe account aangemaakt', +'LBL_CREATED_CALL' => 'Nieuw telefoonafspraak aangemaakt', +'LBL_CREATED_MEETING' => 'Nieuwe vergadering aangemaakt', +'LBL_ADDMORE_BUSINESSCARD' =>'Visitekaart toevoegen', + +'LBL_BUSINESSCARD' => 'Visitekaart', + +'LBL_NAME'=>'Naam:', +'LBL_CONTACT_NAME'=>'Contactnaam:', +'LBL_CONTACT_INFORMATION'=>'Contact informatie', +'LBL_CUSTOM_INFORMATION'=>'Algemene informatie', +'LBL_FIRST_NAME'=>'Voornaam:', +'LBL_OFFICE_PHONE'=>'Telefoon Kantoor:', +'LBL_ACCOUNT_NAME'=>'Accountnaam:', +'LBL_ANY_PHONE'=>'Telefoon prive:', +'LBL_PHONE'=>'Telefoon:', +'LBL_LAST_NAME'=>'Achternaam:', +'LBL_MOBILE_PHONE'=>'Telefoon Mobiel:', +'LBL_HOME_PHONE'=>'Thuis:', +'LBL_LEAD_SOURCE'=>'Lead bron:', +'LBL_OTHER_PHONE'=>'Telefoon:', +'LBL_FAX_PHONE'=>'Fax:', +'LBL_TITLE'=>'Titel:', +'LBL_DEPARTMENT'=>'Afdeling:', +'LBL_BIRTHDATE'=>'Verjaardag:', +'LBL_EMAIL_ADDRESS'=>'E-mail:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Prive e-mail:', +'LBL_ANY_EMAIL'=>'Bedrijfs e-mail:', +'LBL_REPORTS_TO'=>'Rapporteert aan:', +'LBL_ASSISTANT'=>'Assistent:', +'LBL_YAHOO_ID'=>'Secundair e-mailadres:', +'LBL_ASSISTANT_PHONE'=>'Telefoon assistent:', +'LBL_DO_NOT_CALL'=>'Niet bellen:', +'LBL_EMAIL_OPT_OUT'=>'E-mail optie uit:', +'LBL_PRIMARY_ADDRESS'=>'Hoofdadres:', +'LBL_ALTERNATE_ADDRESS'=>'Postadres:', +'LBL_ANY_ADDRESS'=>'Privé adres:', +'LBL_CITY'=>'Plaats:', +'LBL_STATE'=>'Provincie:', +'LBL_POSTAL_CODE'=>'Postcode:', +'LBL_COUNTRY'=>'Land:', +'LBL_DESCRIPTION_INFORMATION'=>'Omschrijving', +'LBL_IMAGE_INFORMATION'=>'Afbeelding:', +'LBL_ADDRESS_INFORMATION'=>'Adresinformatie', +'LBL_DESCRIPTION'=>'Omschrijving:', +'LBL_CONTACT_ROLE'=>'Rol:', +'LBL_OPP_NAME'=>'Verkoopkans naam:', +'LBL_DUPLICATE'=>'Mogelijke gedupliceerde contacten', +'MSG_DUPLICATE' => 'Bij het aanmaken van deze contactgegevens creert u waarschijnlijk een duplicaat van de gegevens. U kunt een contact selecteren van de lijst of u klikt op Nieuw contact om verder te gaan met de ingevoerde gegevens.', + +'LNK_NEW_APPOINTMENT' => 'Nieuwe afspraak', +'LBL_ADD_BUSINESSCARD' => 'Business kaart toevoegen', +'NTC_DELETE_CONFIRMATION'=>'Weet u zeker dat u dit veld wilt verwijderen?', +'NTC_REMOVE_CONFIRMATION'=>'Weet u zeker dat u dit contact wilt verwijderen?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Weet u zeker dat u deze medewerker wilt verwijderen?', +'ERR_DELETE_RECORD'=>"en_us Een veld moet gespecificeerd zijn om de contactpersoon te verwijderen.", +'NTC_COPY_PRIMARY_ADDRESS'=>'Kopieer Bezoekadres naar Postadres', +'NTC_COPY_ALTERNATE_ADDRESS'=>' Kopieer Postadres naar Bezoekadres', + +'LBL_SELECT_CONTACT'=>'Selecteer Contact', +//Added for search heading +'LBL_GENERAL_INFORMATION'=>'Algemene informatie', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nieuwe Verkoopkans', +'LBL_POTENTIAL_TITLE'=>'Verkoopkansen', + +'LBL_NEW_TASK'=>'Nieuwe taak', +'LBL_TASK_TITLE'=>'Taken', +'LBL_NEW_CALL'=>'Nieuw telefoongesprek', +'LBL_CALL_TITLE'=>'Telefoongesprekken', +'LBL_NEW_MEETING'=>'Nieuwe vergadering', +'LBL_MEETING_TITLE'=>'Vergaderingen', +'LBL_NEW_EMAIL'=>'Nieuwe e-mail', +'LBL_EMAIL_TITLE'=>'E-mail', +'LBL_NEW_NOTE'=>'Nieuwe notitie', +'LBL_NOTE_TITLE'=>'Notities', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Contact gereedschap', + +'Salutation'=>'Aanhef', +'First Name'=>'Voornaam', +'Office Phone'=>'Telefoon Kantoor', +'Last Name'=>'Achternaam', +'Mobile'=>'Telefoon Mobiel', +'Account Name'=>'Accountnaam', +'Home Phone'=>'Telefoon Thuis', +'Lead Source'=>'Lead bron', +'Phone'=>'Telefoonnummer', +'Title'=>'Titel', +'Fax'=>'Fax', +'Department'=>'Afdeling', +'Birthdate'=>'Verjaardag', +'Email'=>'E-mail', +'Reports To'=>'Rapporteert aan', +'Assistant'=>'Assistent', +'Yahoo Id'=>'Tweede e-mailadres', +'Assistant Phone'=>'Telefoon assistent', +'Do Not Call'=>'Niet bellen', +'Email Opt Out'=>'E-mail optie uit', +'Assigned To'=>'Toegewezen aan', +'Campaign Source'=>'Campagne bron', +'Reference' =>'Referentie', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', +'Mailing Street'=>'Postadres straat', +'Other Street'=>'Bezoekadres straat', +'Mailing City'=>'Postadres Plaats', +'Mailing State'=>'Postadres Provincie', +'Mailing Zip'=>'Postadres Postcode', +'Mailing Country'=>'Postadres Land', +'Mailing Po Box'=>'Postbus', +'Other Po Box'=>'Bezoekadres postbus ', +'Other City'=>'Bezoekadres Plaats', +'Other State'=>'Bezoekadres Provincie', +'Other Zip'=>'Bezoekadres Postcode', +'Other Country'=>'Bezoekadres Land', +'Contact Image'=>'Contact foto', +'Description'=>'Omschrijving', + +// Added fields for Add Business Card +'LBL_NEW_CONTACT'=>'Nieuw contact', +'LBL_NEW_ACCOUNT'=>'Nieuw account', +'LBL_NOTE_SUBJECT'=>'Notitie onderwerp:', +'LBL_NOTE'=>'Notitie:', +'LBL_WEBSITE'=>'Website:', +'LBL_NEW_APPOINTMENT'=>'Nieuwe afspraak', +'LBL_SUBJECT'=>'Onderwerp:', +'LBL_START_DATE'=>'Startdatum:', +'LBL_START_TIME'=>'Starttijd:', + +//Added field after 4_0_1 +'Portal User'=>'Toegang Portaal', +'LBL_CUSTOMER_PORTAL_INFORMATION'=>'Klantportaal informatie', +'Support Start Date'=>'Startdatum toegang', +'Support End Date'=>'Einddatum toegang', +//Added for 4.2 Release -- CustomView +'Name'=>'Naam', +'LBL_ALL'=>'Alles', +'LBL_MAXIMUM_LIMIT_ERROR'=>'FOUT, uw bestand is te groot. Probeer opnieuw a.u.b. Probeer een bestand kleiner dan 800000 bytes', +'LBL_UPLOAD_ERROR'=>'Problemen met het versturen van uw bestand. Probeer opnieuw a.u.b!', +'LBL_IMAGE_ERROR'=>'Dit bestand is geen foto(.gif/.jpg/.png)', +'LBL_INVALID_IMAGE'=>'Dit bestand bevat geen data', + +//Added after 5Alpha5 +'Notify Owner'=>'Bericht eigenaar', + +//Added for Picklist Values +'--None--'=>'--Geen--', + +'Mr.'=>'heer', +'Ms.'=>'mevrouw', +'Mrs.'=>'mejuffrouw', +'Dr.'=>'dr.', +'Prof.'=>'prof.', + +'Cold Call'=>'Koud bellen', +'Existing Customer'=>'Bestaande klant', +'Self Generated'=>'Eigen inspanning', +'Employee'=>'Medewerker', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct mail', +'Conference'=>'Conferentie', +'Trade Show'=>'Beurs', +'Web Site'=>'Website', +'Word of mouth'=>'Mond tot mond', +'Other'=>'Anders', + +'User List'=>'Gebruikerslijst', + +//Added for 5.0.3 +'Customer Portal Login Details'=>'Inlog gegevens van klant Portaal', +'Dear'=>'Beste', +'Your Customer Portal Login details are given below:'=>'Uw klant Portaal inlog gegevens zijn hieronder weergegeven:', +'User Id :'=>'Gebruikers Id :', +'Password :'=>'Wachtwoord :', +'Please Login Here'=>'aub Hier inloggen', +'Note :'=>'Notitie :', +'We suggest you to change your password after logging in first time'=>'Wij stellen u voor om het wachtwoord na de eerste keer inloggen te wijzigen.', +'Support Team'=>'Ondersteuningsteam', + +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chatkanaal', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Contact Id' => 'Contact Nr', +'Secondary Email'=>'Tweede E-mail', +// END +); + +?> diff --git a/modules/Contacts/language/pt_br.lang.php b/modules/Contacts/language/pt_br.lang.php new file mode 100644 index 0000000..0f28de7 --- /dev/null +++ b/modules/Contacts/language/pt_br.lang.php @@ -0,0 +1,251 @@ +'Contatos', +'LBL_INVITEE'=>'Subordinado à', +'LBL_MODULE_TITLE'=>'Contatos: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisar Contatos', +'LBL_LIST_FORM_TITLE'=>'Lista Contatos', +'LBL_NEW_FORM_TITLE'=>'Novo Contato', +'LBL_CONTACT_OPP_FORM_TITLE'=>'Contato-Oportunidade:', +'LBL_CONTACT'=>'Contato:', + +'LBL_LIST_NAME'=>'Nome', +'LBL_LIST_LAST_NAME'=>'Sobrenome', +'LBL_LIST_FIRST_NAME'=>'Nome', +'LBL_LIST_CONTACT_NAME'=>'Nome Contato', +'LBL_LIST_TITLE'=>'Título', +'LBL_LIST_ACCOUNT_NAME'=>'Nome Organização', +'LBL_LIST_EMAIL_ADDRESS'=>'Email', +'LBL_LIST_PHONE'=>'Fone', +'LBL_LIST_CONTACT_ROLE'=>'Função', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_last_name' => 'LBL_LIST_LAST_NAME', +'db_first_name' => 'LBL_LIST_FIRST_NAME', +'db_title' => 'LBL_LIST_TITLE', +'db_email1' => 'LBL_LIST_EMAIL_ADDRESS', +'db_email2' => 'LBL_LIST_EMAIL_ADDRESS', +//END DON'T CONVERT + +'LBL_EXISTING_CONTACT' => 'Usou um Contato existente', +'LBL_CREATED_CONTACT' => 'Criou um novo Contato', +'LBL_EXISTING_ACCOUNT' => 'Usou uma vtiger_account existente', +'LBL_CREATED_ACCOUNT' => 'Criou uma nova vtiger_account', +'LBL_CREATED_CALL' => 'Criou uma nova Chamada', +'LBL_CREATED_MEETING' => 'Criou uma nova Reunião', +'LBL_ADDMORE_BUSINESSCARD' => 'Adicione outro Cartão Pessoal', + +'LBL_BUSINESSCARD' => 'Cartão Pessoal', + +'LBL_NAME'=>'Nome:', +'LBL_CONTACT_NAME'=>'Nome Contato:', +'LBL_CONTACT_INFORMATION'=>'Informação do Contato', +'LBL_CUSTOM_INFORMATION'=>'Informação Customizada', +'LBL_FIRST_NAME'=>'Nome:', +'LBL_OFFICE_PHONE'=>'Telefone Escritório:', +'LBL_ACCOUNT_NAME'=>'Nome Organização:', +'LBL_ANY_PHONE'=>'Outro Telefone:', +'LBL_PHONE'=>'Telefone:', +'LBL_LAST_NAME'=>'Sobrenome:', +'LBL_MOBILE_PHONE'=>'Celular:', +'LBL_HOME_PHONE'=>'Telefone Residencial:', +'LBL_LEAD_SOURCE'=>'Origem do Lead:', +'LBL_OTHER_PHONE'=>'Telefone Alternativo:', +'LBL_FAX_PHONE'=>'Fax:', +'LBL_TITLE'=>'Título:', +'LBL_DEPARTMENT'=>'Departamento:', +'LBL_BIRTHDATE'=>'Nascimento:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email Alternativo:', +'LBL_ANY_EMAIL'=>'Outro Email:', +'LBL_REPORTS_TO'=>'Reporta-se à:', +'LBL_ASSISTANT'=>'Assistente:', +'LBL_YAHOO_ID'=>'ID Yahoo!:', +'LBL_ASSISTANT_PHONE'=>'Telefone do Assistente:', +'LBL_DO_NOT_CALL'=>'Recusa Chamada:', +'LBL_EMAIL_OPT_OUT'=>'Recusa Email:', +'LBL_PRIMARY_ADDRESS'=>'Enderenço Principal:', +'LBL_ALTERNATE_ADDRESS'=>'Endereço Alternativo:', +'LBL_ANY_ADDRESS'=>'Outro Endereço:', +'LBL_CITY'=>'Cidade:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'CEP:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descrição', +'LBL_IMAGE_INFORMATION'=>'Informação Imagem Contato:', +'LBL_ADDRESS_INFORMATION'=>'Informação Endereço', +'LBL_DESCRIPTION'=>'Descrição:', +'LBL_CONTACT_ROLE'=>'Função:', +'LBL_OPP_NAME'=>'Nome Oportunidade:', +'LBL_DUPLICATE'=>'Possível Duplicação de Contatos', +'MSG_DUPLICATE' => 'Criando este Contato pode ser que vtiger_potentialy crie um contato duplicado. Você pode selecionar um Contato na lista abaixo ou clicar sobre Criar Novo Contato para continuar criando um novo Contato com os dados previamente inseridos.', + +'LNK_NEW_APPOINTMENT' => 'Novo Compromisso', +'LBL_ADD_BUSINESSCARD' => 'Adicionar Cartão Pessoal', +'NTC_DELETE_CONFIRMATION'=>'Você tem certeza que deseja deletar este registro?', +'NTC_REMOVE_CONFIRMATION'=>'Você ter certeza que deseja remover este Contato desde Case?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Você tem certeza que deseja remover este registro como um vtiger_report?', +'ERR_DELETE_RECORD'=>"en_us Defina um número de registro para deletar o Contato.", +'NTC_COPY_PRIMARY_ADDRESS'=>'Copiar endereço Principal para endereço Alternativo', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copiar endereço Alternativo para endereço Principal', + +'LBL_SELECT_CONTACT'=>'Selecionar Contato', +//Added for search heading +'LBL_GENERAL_INFORMATION'=>'Informação Geral', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nova Oportunidade', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nova Tarefa', +'LBL_TASK_TITLE'=>'Tarefa', +'LBL_NEW_CALL'=>'Nova Chamada', +'LBL_CALL_TITLE'=>'Chamadas', +'LBL_NEW_MEETING'=>'Nova Reunião', +'LBL_MEETING_TITLE'=>'Reuniões', +'LBL_NEW_EMAIL'=>'Novo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'Novo Documento', +'LBL_NOTE_TITLE'=>'Documentos', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Ferramentas Contato', + +'Salutation'=>'Saudação', +'First Name'=>'Nome', +'Office Phone'=>'Telefone Escritório', +'Last Name'=>'Sobrenome', +'Mobile'=>'Celular', +'Account Name'=>'Nome Organização', +'Home Phone'=>'Telefone Residencial', +'Lead Source'=>'Origem do Lead', +'Other Phone'=>'Telefone Alternativo', +'Title'=>'Cargo', +'Fax'=>'Fax', +'Department'=>'Departamento', +'Birthdate'=>'Aniversário', +'Email'=>'Email', +'Reports To'=>'Reporta-se à', +'Assistant'=>'Assistente', +'Yahoo Id'=>'ID Yahoo!', +'Assistant Phone'=>'Telefone Assistente', +'Do Not Call'=>'Recusa Chamada', +'Email Opt Out'=>'Recusa Email', +'Assigned To'=>'Responsável', +'Campaign Source'=>'Fonte Campanha', +'Reference' =>'Referência', +'Created Time'=>'Data Criação', +'Modified Time'=>'Data Modificação', +'Mailing Street'=>'Endereço Correspondência', +'Other Street'=>'Endereço Alternativo', +'Mailing City'=>'Cidade Correspondência', +'Mailing State'=>'Estado Correspondência', +'Mailing Zip'=>'CEP Correspondência', +'Mailing Country'=>'País Correspondência', +'Mailing Po Box'=>'Cx Postal Correspondência', +'Other Po Box'=>'Cx Postal Alternativo', +'Other City'=>'Cidade Alternativo', +'Other State'=>'Estado Alternativo', +'Other Zip'=>'CEP Alternativo', +'Other Country'=>'País Alternativo', +'Contact Image'=>'Imagem Contato', +'Description'=>'Descrição', + +// Added vtiger_fields for Add Business Card +'LBL_NEW_CONTACT'=>'Novo Contato', +'LBL_NEW_ACCOUNT'=>'Nova Organização', +'LBL_NOTE_SUBJECT'=>'Assunto Documento:', +'LBL_NOTE'=>'Nota:', +'LBL_WEBSITE'=>'Website:', +'LBL_NEW_APPOINTMENT'=>'Novo Compromisso', +'LBL_SUBJECT'=>'Assunto:', +'LBL_START_DATE'=>'Data Inicial:', +'LBL_START_TIME'=>'Hora Inicial:', + +//Added vtiger_field after 4_0_1 +'Portal User'=>'Portal Usuário', +'LBL_CUSTOMER_PORTAL_INFORMATION'=>'Informação Portal Cliente', +'Support Start Date'=>'Data Início Suporte', +'Support End Date'=>'Data Término Suporte', +//Added for 4.2 Release -- CustomView +'Name'=>'Nome', +'LBL_ALL'=>'Todos', +'LBL_MAXIMUM_LIMIT_ERROR'=>'Desculpe, o arquivo transferido excedeu limite máximo do vtiger_filesize. Por favor, tente um arquivo menor que 800000 bytes', +'LBL_UPLOAD_ERROR'=>'Problemas na transferência do arquivo. Por favor tente novamente!', +'LBL_IMAGE_ERROR'=>'O referido arquivo não é do tipo imagem(.gif/.jpg/.png)', +'LBL_INVALID_IMAGE'=>'Arquivo inválido OU não possui dados', + +//Added after 5Alpha5 +'Notify Owner'=>'Notificar Proprietário', + +//Added for Picklist Values +'--None--'=>'--Nada--', + +'Mr.'=>'Sr.', +'Ms.'=>'Sra.', +'Mrs.'=>'Srta.', +'Dr.'=>'Dr.', +'Prof.'=>'Prof.', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Cliente Existente', +'Self Generated'=>'Auto Gerado', +'Employee'=>'Empregado', +'Partner'=>'Parceiro', +'Public Relations'=>'Relações Públicas', +'Direct Mail'=>'Mala Direta', +'Conference'=>'Conferência', +'Trade Show'=>'Feira Negócios', +'Web Site'=>'Website', +'Word of mouth'=>'Boca-boca', +'Other'=>'Outro', +'User List'=>'Lista Usuário', + +//Added for 5.0.3 +'Customer Portal Login Details'=>'Detalhes Login Portal Cliente', +'Dear'=>'Prezado', +'Your Customer Portal Login details are given below:'=>'Os detalhes do seu Login no Portal do Cliente são apresentados abaixo: ', +'User Id :'=>'Usuário:', +'Password :'=>'Senha:', +'Please Login Here'=>'Por gentileza, faça o Login aqui', +'Note :'=>'Nota :', +'We suggest you to change your password after logging in first time'=>'Sugerimos que você altere sua senha após o primeiro acesso.', +'Support Team'=>'Equipe Suporte', + +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Bate-papo Ajax Css-Popup', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Contact Id' => 'Cód. Contato', +'Secondary Email'=>'Email Alternativo', +// END + +'Contacts ID'=>'ID Contatos', +); + +?> diff --git a/modules/Contacts/language/zh_cn.lang.php b/modules/Contacts/language/zh_cn.lang.php new file mode 100644 index 0000000..8d0524a --- /dev/null +++ b/modules/Contacts/language/zh_cn.lang.php @@ -0,0 +1,250 @@ +'联系人', +'LBL_INVITEE'=>'*受邀者', +'LBL_MODULE_TITLE'=>'联系人: 首页', +'LBL_SEARCH_FORM_TITLE'=>'查找联系人', +'LBL_LIST_FORM_TITLE'=>'联系人列表', +'LBL_NEW_FORM_TITLE'=>'新增联系人', +'LBL_CONTACT_OPP_FORM_TITLE'=>'联系人-销售机会:', +'LBL_CONTACT'=>'联系人:', + +'LBL_LIST_NAME'=>'姓名', +'LBL_LIST_LAST_NAME'=>'姓名', +'LBL_LIST_FIRST_NAME'=>'英文名', +'LBL_LIST_CONTACT_NAME'=>'联系人姓名', +'LBL_LIST_TITLE'=>'职务', +'LBL_LIST_ACCOUNT_NAME'=>'客户名称', +'LBL_LIST_EMAIL_ADDRESS'=>'Email', +'LBL_LIST_PHONE'=>'电话', +'LBL_LIST_CONTACT_ROLE'=>'职位', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_last_name'=>'LBL_LIST_LAST_NAME', +'db_first_name'=>'LBL_LIST_FIRST_NAME', +'db_title'=>'LBL_LIST_TITLE', +'db_email1'=>'LBL_LIST_EMAIL_ADDRESS', +'db_email2'=>'LBL_LIST_EMAIL_ADDRESS', +//END DON'T CONVERT + +'LBL_EXISTING_CONTACT'=>'使用现有的联系人', +'LBL_CREATED_CONTACT'=>'新增联系人', +'LBL_EXISTING_ACCOUNT'=>'使用现有的客户', +'LBL_CREATED_ACCOUNT'=>'新增客户', +'LBL_CREATED_CALL'=>'新增电话', +'LBL_CREATED_MEETING'=>'新增会议', +'LBL_ADDMORE_BUSINESSCARD'=>'新增更多名片', + +'LBL_BUSINESSCARD'=>'名片', + +'LBL_NAME'=>'姓名:', +'LBL_CONTACT_NAME'=>'联系人姓名:', +'LBL_CONTACT_INFORMATION'=>'联系人信息', +'LBL_CUSTOM_INFORMATION'=>'自定义信息', +'LBL_FIRST_NAME'=>'英文名:', +'LBL_OFFICE_PHONE'=>'办公室电话:', +'LBL_ACCOUNT_NAME'=>'客户名称:', +'LBL_ANY_PHONE'=>'其它电话:', +'LBL_PHONE'=>'电话:', +'LBL_LAST_NAME'=>'姓名:', +'LBL_MOBILE_PHONE'=>'手机:', +'LBL_HOME_PHONE'=>'家庭电话:', +'LBL_LEAD_SOURCE'=>'潜在客户来源:', +'LBL_OTHER_PHONE'=>'其它电话:', +'LBL_FAX_PHONE'=>'传真:', +'LBL_TITLE'=>'职务:', +'LBL_DEPARTMENT'=>'部门:', +'LBL_BIRTHDATE'=>'生日:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_OTHER_EMAIL_ADDRESS'=>'其它Email:', +'LBL_ANY_EMAIL'=>'其它Email:', +'LBL_REPORTS_TO'=>'经理:', +'LBL_ASSISTANT'=>'助理:', +'LBL_YAHOO_ID'=>'Yahoo!帐号:', +'LBL_ASSISTANT_PHONE'=>'助理电话:', +'LBL_DO_NOT_CALL'=>'拒绝电话打扰:', +'LBL_EMAIL_OPT_OUT'=>'拒绝邮件打扰:', +'LBL_PRIMARY_ADDRESS'=>'主要地址:', +'LBL_ALTERNATE_ADDRESS'=>'其它地址:', +'LBL_ANY_ADDRESS'=>'其它地址:', +'LBL_CITY'=>'城市:', +'LBL_STATE'=>'省份:', +'LBL_POSTAL_CODE'=>'邮政编码:', +'LBL_COUNTRY'=>'国家:', +'LBL_DESCRIPTION_INFORMATION'=>'详细信息', +'LBL_IMAGE_INFORMATION'=>'联系人照片', +'LBL_ADDRESS_INFORMATION'=>'地址信息', +'LBL_DESCRIPTION'=>'描述:', +'LBL_CONTACT_ROLE'=>'职位:', +'LBL_OPP_NAME'=>'销售机会名称:', +'LBL_DUPLICATE'=>'可能有重复的联系人', +'MSG_DUPLICATE'=>'新增这个联系人可能造成重复,您可以点击创建联系人来建立新的联系人或是点选取消。', + +'LNK_NEW_APPOINTMENT'=>'新增行程', +'LBL_ADD_BUSINESSCARD'=>'新增名片', +'NTC_DELETE_CONFIRMATION'=>'您确定要删除这个记录?', +'NTC_REMOVE_CONFIRMATION'=>'您确定要从这个事件中移除这位联系人?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'您确定要将此记录从直接报告人处删除吗?', +'ERR_DELETE_RECORD'=>'在删除联系人前必须输入正确的记录编号.', +'NTC_COPY_PRIMARY_ADDRESS'=>'复制主地址内容到备用地址', +'NTC_COPY_ALTERNATE_ADDRESS'=>'复制备用地址内容到主地址', + +'LBL_SELECT_CONTACT'=>'选择联系人', +//Added for search heading +'LBL_GENERAL_INFORMATION'=>'一般信息', + + + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'新增销售机会', +'LBL_POTENTIAL_TITLE'=>'销售机会', + +'LBL_NEW_TASK'=>'新增任务', +'LBL_TASK_TITLE'=>'任务', +'LBL_NEW_CALL'=>'新增电话记录', +'LBL_CALL_TITLE'=>'电话记录', +'LBL_NEW_MEETING'=>'新增会议', +'LBL_MEETING_TITLE'=>'会议', +'LBL_NEW_EMAIL'=>'撰写新邮件', +'LBL_EMAIL_TITLE'=>'电子邮件', +'LBL_NEW_NOTE'=>'新增备忘录', +'LBL_NOTE_TITLE'=>'备忘录', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'联系人编辑区', + +'Salutation'=>'称谓', +'First Name'=>'英文名', +'Office Phone'=>'办公室电话', +'Last Name'=>'姓名', +'Mobile'=>'手机', +'Account Name'=>'客户名称', +'Home Phone'=>'家庭电话', +'Lead Source'=>'潜在客户来源', +'Phone'=>'电话', +'Title'=>'职位', +'Fax'=>'传真', +'Department'=>'部门', +'Birthdate'=>'生日', +'Email'=>'Email', +'Reports To'=>'经理', +'Assistant'=>'助理', +'Yahoo Id'=>'Yahoo! 账号', +'Assistant Phone'=>'助理电话', +'Do Not Call'=>'拒绝电话打扰', +'Email Opt Out'=>'拒绝邮件打扰', +'Assigned To'=>'负责人', +'Campaign Source'=>'活动来源', +'Reference'=>'推荐', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', +'Mailing Street'=>'邮寄地址', +'Other Street'=>'其它邮寄地址', +'Mailing City'=>'城市', +'Mailing State'=>'省份', +'Mailing Zip'=>'邮政编码', +'Mailing Country'=>'国家', +'Mailing Po Box'=>'邮政信箱', +'Other Po Box'=>'其它邮政信箱', +'Other City'=>'其它城市', +'Other State'=>'其它省份', +'Other Zip'=>'其它邮政编码', +'Other Country'=>'其它国家', +'Contact Image'=>'照片', +'Description'=>'描述', + +// Added vtiger_fields for Add Business Card +'LBL_NEW_CONTACT'=>'新增联系人', +'LBL_NEW_ACCOUNT'=>'新增客户', +'LBL_NOTE_SUBJECT'=>'备忘录标题:', +'LBL_NOTE'=>'备忘录:', +'LBL_WEBSITE'=>'网站:', +'LBL_NEW_APPOINTMENT'=>'新增行程', +'LBL_SUBJECT'=>'主题:', +'LBL_START_DATE'=>'开始日期:', +'LBL_START_TIME'=>'开始时间:', + +//Added vtiger_field after 4_0_1 +'Portal User'=>'Portal用户', +'LBL_CUSTOMER_PORTAL_INFORMATION'=>'客户Portal信息', +'Support Start Date'=>'售后服务开始日期', +'Support End Date'=>'售后服务结束日期', +//Added for 4.2 Release -- CustomView +'Name'=>'姓名', +'LBL_ALL'=>'全部', +'LBL_MAXIMUM_LIMIT_ERROR'=>'抱歉,文件超过系统限制,请保持上传文件在 800KB 以下', +'LBL_UPLOAD_ERROR'=>'上传失败,请重试!', +'LBL_IMAGE_ERROR'=>'上传的文件不是(.gif/.jpg/.png)格式', +'LBL_INVALID_IMAGE'=>'文件有误或是没有数据', + +//Added after 5Alpha5 +'Notify Owner'=>'提醒负责人', + +//Added for Picklist Values +'--None--'=>'-- 无 --', + +'Mr.'=>'先生', +'Ms.'=>'小姐', +'Mrs.'=>'女士', +'Dr.'=>'博士', +'Prof.'=>'专家', + +'Cold Call'=>'陌生拜访', +'Existing Customer'=>'老客户', +'Self Generated'=>'自动产生', +'Employee'=>'员工', +'Partner'=>'合作伙伴', +'Public Relations'=>'公共关系', +'Direct Mail'=>'邮件营销', +'Conference'=>'研讨会', +'Trade Show'=>'贸易展览', +'Web Site'=>'网站', +'Word of mouth'=>'口碑', +'Other'=>'其它', +'User List'=>'用户列表', + +//Added for 5.0.3 +'Customer Portal Login Details'=>'客户Portal登录信息', +'Dear'=>'您好,工作愉快:', +'Your Customer Portal Login details are given below:'=>'您的顾客提供了以下注册细节:', +'User Id :'=>'帐号:', +'Password :'=>'密码:', +'Please Login Here'=>'请在这里登录', +'Note :'=>'注意 :', +'We suggest you to change your password after logging in first time'=>'请您在第一次登录时修改密码以保证安全.', +'Support Team'=>'客服团队', + +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Ajax Css-Popup chat', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Contact Id'=>'编号', +//END + +); + +?> diff --git a/modules/Contacts/updateRelations.php b/modules/Contacts/updateRelations.php new file mode 100644 index 0000000..29553a5 --- /dev/null +++ b/modules/Contacts/updateRelations.php @@ -0,0 +1,43 @@ + diff --git a/modules/CronTasks/CronSequence.php b/modules/CronTasks/CronSequence.php new file mode 100644 index 0000000..5048703 --- /dev/null +++ b/modules/CronTasks/CronSequence.php @@ -0,0 +1,40 @@ +fatal("$id,$move"); + +if($move == 'Down'){ + $sequence = $adb->pquery("SELECT sequence FROM vtiger_cron_task WHERE id = ?", array($id)); + $oldsequence = $adb->query_result($sequence,0,'sequence'); + + $nexttab = $adb->pquery("SELECT sequence,id FROM vtiger_cron_task WHERE sequence > ? ORDER BY SEQUENCE LIMIT 0,1", array($oldsequence)); + $newsequence = $adb->query_result($nexttab,0,'sequence'); + $rightid = $adb->query_result($nexttab,0,'id'); + + $adb->pquery("UPDATE vtiger_cron_task set sequence=? WHERE id = ?", array($newsequence, $id)); + $adb->pquery("UPDATE vtiger_cron_task set sequence=? WHERE id = ?", array($oldsequence, $rightid)); +}elseif ($move == 'Up') { + $sequence = $adb->pquery("SELECT sequence FROM vtiger_cron_task WHERE id = ?", array($id)); + $oldsequence = $adb->query_result($sequence,0,'sequence'); + + $nexttab = $adb->pquery("SELECT sequence,id FROM vtiger_cron_task WHERE sequence < ? ORDER BY SEQUENCE DESC LIMIT 0,1", array($oldsequence)); + $newsequence = $adb->query_result($nexttab,0,'sequence'); + $leftid = $adb->query_result($nexttab,0,'id'); + + $adb->pquery("UPDATE vtiger_cron_task SET sequence=? WHERE id = ?", array($newsequence, $id)); + $adb->pquery("UPDATE vtiger_cron_task SET sequence=? WHERE id = ?", array($oldsequence, $leftid)); + +} +$loc = "Location: index.php?action=CronTasksAjax&file=ListCronJobs&module=CronTasks&directmode=ajax"; +header($loc); +?> diff --git a/modules/CronTasks/CronTasks.js b/modules/CronTasks/CronTasks.js new file mode 100644 index 0000000..e274fd1 --- /dev/null +++ b/modules/CronTasks/CronTasks.js @@ -0,0 +1,86 @@ +/********************************************************************************* +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. +************************************************************************************/ + +function fetchSaveCron(id) +{ + + var status = $("cron_status").value; + var timeValue= $("CronTime").value; + var time = $("cron_time").value; + var min_freq =parseInt($("min_freq").value,10); + if(!numValidate("CronTime","","any",true)){ + return false; + } + if((timeValue % 1) !=0){ + alert("only integer values are allowed"); + return false; + } + if((timeValue < min_freq && time == "min") || timeValue <= 0 || timeValue == '' ){ + alert($("desc").value); + + } + else{ + $("editdiv").style.display="none"; + $("status").style.display="inline"; + new Ajax.Request( + 'index.php', + { + queue: { + position: 'end', + scope: 'command' + }, + method: 'post', + postBody: 'action=CronTasksAjax&module=CronTasks&file=SaveCron&record='+id+'&status='+status+'&timevalue='+timeValue+'&time='+time, + onComplete: function(response) { + $("status").style.display="none"; + $("notifycontents").innerHTML=response.responseText; + } + } + ); + } +} + +function fetchEditCron(id) +{ + $("status").style.display="inline"; + new Ajax.Request( + 'index.php', + { + queue: { + position: 'end', + scope: 'command' + }, + method: 'post', + postBody: 'action=CronTasksAjax&module=CronTasks&file=EditCron&record='+id, + onComplete: function(response) { + $("status").style.display="none"; + $("editdiv").innerHTML=response.responseText; + } + } + ); +} +function move_module(tabid,move){ + + //$('vtbusy_info').style.display = "block"; + new Ajax.Request( + 'index.php', + { + queue: { + position: 'end', + scope: 'command' + }, + method: 'post', + postBody: 'module=CronTasks&action=CronTasksAjax&file=CronSequence&parenttab=Settings&record='+tabid+'&move='+move, + onComplete: function(response) { + $("notifycontents").innerHTML=response.responseText; + + } + } + ); +} diff --git a/modules/CronTasks/CronTasks.php b/modules/CronTasks/CronTasks.php new file mode 100644 index 0000000..be4e6f5 --- /dev/null +++ b/modules/CronTasks/CronTasks.php @@ -0,0 +1,36 @@ +getUniqueID('vtiger_settings_field'); + $blockid = getSettingsBlockId('LBL_OTHER_SETTINGS'); + $seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid)); + if ($adb->num_rows($seq_res) > 0) { + $cur_seq = $adb->query_result($seq_res, 0, 'max_seq'); + if ($cur_seq != null) $seq = $cur_seq + 1; + } + + $adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence) + VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'Scheduler', 'Cron.png', 'Allows you to Configure Cron Task', 'index.php?module=CronTasks&action=ListCronJobs&parenttab=Settings', $seq)); + } + } +} diff --git a/modules/CronTasks/CronTasksAjax.php b/modules/CronTasks/CronTasksAjax.php new file mode 100644 index 0000000..4529abd --- /dev/null +++ b/modules/CronTasks/CronTasksAjax.php @@ -0,0 +1,12 @@ + diff --git a/modules/CronTasks/EditCron.php b/modules/CronTasks/EditCron.php new file mode 100644 index 0000000..fef2073 --- /dev/null +++ b/modules/CronTasks/EditCron.php @@ -0,0 +1,56 @@ +getName(),$cronTask->getModule()); + $cron_status = $cronTask->getStatus(); + $cron_freq = $cronTask->getFrequency(); + $cron_desc = $cronTask->getDescription(); + $cron = Array(); + $cron['label'] = $label; + if($cron_freq/(60*60)>1){ + $cron['frequency']=(int)($cron_freq/(60*60)); + $cron['time'] = 'hour'; + } + else{ + $cron['frequency']=(int)($cron_freq/60); + $cron['time'] = 'min'; + } + $cron['status'] = $cron_status; + $cron['description'] = $cron_desc; + $cron['id']=$id; + + + $smarty->assign("CRON_DETAILS",$cron); + $smarty->assign("MOD", return_module_language($current_language,'CronTasks')); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH",$image_path); + $smarty->assign("APP", $app_strings); + $smarty->assign("CMOD", $mod_strings); + $smarty->assign("MIN_CRON_FREQUENCY", getMinimumCronFrequency()); + $smarty->display("modules/CronTasks/EditCron.tpl"); +} +else { + header("Location:index.php?module=CronTasks&action=ListCronJobs&directmode=ajax"); +} +?> diff --git a/modules/CronTasks/ListCronJobs.php b/modules/CronTasks/ListCronJobs.php new file mode 100644 index 0000000..0d0d68f --- /dev/null +++ b/modules/CronTasks/ListCronJobs.php @@ -0,0 +1,76 @@ +getId(); + $cron_mod = $cronTask->getName(); + $cron_freq = $cronTask->getFrequency(); + $cron_st = $cronTask->getStatus(); + if($cronTask->getLastStart() != 0) { + $start_ts = $cronTask->getLastStart(); + $end_ts = time(); + $cron_started = dateDiffAsString($start_ts, $end_ts); + } + else { + $cron_started = ''; + } + if($cronTask->getLastEnd() != 0) { + $start_ts = $cronTask->getLastEnd(); + $end_ts = time(); + $cron_end = dateDiffAsString($start_ts, $end_ts); + } + else { + $cron_end = ''; + } + $out ['cronname'] = getTranslatedString($cron_mod,$cronTask->getModule()); + + $out['hours'] = str_pad((int)(($cron_freq/(60*60))),2,0,STR_PAD_LEFT); + $out['mins'] =str_pad((int)(($cron_freq%(60*60))/60),2,0,STR_PAD_LEFT); + $out ['id'] = $cron_id; + $out ['status'] = $cron_st; + $out['laststart']= $cron_started; + $out['lastend'] =$cron_end; + if($out['status'] == Vtiger_Cron::$STATUS_DISABLED ) + $out['status'] = $mod_strings['LBL_INACTIVE']; + elseif($out['status'] == Vtiger_Cron::$STATUS_ENABLED) + $out['status'] = $mod_strings['LBL_ACTIVE']; + else + $out['status'] = $mod_strings['LBL_RUNNING']; + + $output [] = $out; +} + +$smarty->assign("CRON",$output); +$smarty->assign("MOD", return_module_language($current_language,'CronTasks')); +$smarty->assign("MIN_CRON_FREQUENCY",getMinimumCronFrequency()); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("APP", $app_strings); +$smarty->assign("CMOD", $mod_strings); + +if($_REQUEST['directmode'] != '') + $smarty->display("modules/CronTasks/CronContents.tpl"); +else { + $smarty->display("modules/CronTasks/Cron.tpl"); +} +?> diff --git a/modules/CronTasks/SaveCron.php b/modules/CronTasks/SaveCron.php new file mode 100644 index 0000000..d85cc61 --- /dev/null +++ b/modules/CronTasks/SaveCron.php @@ -0,0 +1,33 @@ +updateStatus($_REQUEST['status']); + if($_REQUEST['timevalue'] != '') { + + if($_REQUEST['time'] == 'min') { + + $time = $_REQUEST['timevalue']*60; + } + else { + $time = $_REQUEST['timevalue']*60*60; + } + $cronTask->updateFrequency($time); + } +} +$loc = "Location: index.php?action=CronTasksAjax&file=ListCronJobs&module=CronTasks&directmode=ajax"; +header($loc); +?> diff --git a/modules/CronTasks/language/de_de.lang.php b/modules/CronTasks/language/de_de.lang.php new file mode 100644 index 0000000..11be14b --- /dev/null +++ b/modules/CronTasks/language/de_de.lang.php @@ -0,0 +1,27 @@ + 'Activ', + 'LBL_INACTIVE' => 'Inactiv', + 'LBL_STATUS' => 'Status', + 'LBL_SCHEDULER' => 'Planer', + 'LBL_SETTINGS' => 'Einstellungen', + 'LBL_FREQUENCY'=> 'Frequenz', + 'LBL_HOURMIN' => '(H:M)', + 'LAST_START'=>'letzte Prüfung gestartet', + 'LAST_END'=>'letzte Prüfung beendet', + 'LBL_SEQUENCE'=>'Sequenz', + 'LBL_TOOLS' =>'Werkzeuge', + 'LBL_DAYS'=>'Tage', + 'LBL_HOURS'=>'Stunden', + 'LBL_MINS'=>'Minuten', + 'LBL_RUNNING'=>'Running', + 'LBL_MINIMUM_FREQUENCY'=>'Die Frequenz von Cronjobs ind der "OnDemand" Version sollte größer 15 Minuten sein', + 'LBL_SECONDS'=>'Sekunden zuvor', + 'LBL_MINUTES'=>'Minuten zuvor', + 'LBL_HOURS'=>'Stunden zuvor', + 'LBL_DAYS'=>'Tage zuvor', + 'LBL_MONTHS'=>'Monate zuvor', + 'LBL_YEARS'=>'Jahre zuvor', +); +?> \ No newline at end of file diff --git a/modules/CronTasks/language/en_us.lang.php b/modules/CronTasks/language/en_us.lang.php new file mode 100644 index 0000000..2b6b03f --- /dev/null +++ b/modules/CronTasks/language/en_us.lang.php @@ -0,0 +1,27 @@ + 'Active', + 'LBL_INACTIVE' => 'InActive', + 'LBL_STATUS' => 'Status', + 'LBL_SCHEDULER' => 'Scheduler', + 'LBL_SETTINGS' => 'Settings', + 'LBL_FREQUENCY'=> 'Frequency', + 'LBL_HOURMIN' => '(H:M)', + 'LAST_START'=>'Last Scan Started', + 'LAST_END'=>'Last Scan Ended', + 'LBL_SEQUENCE'=>'Sequence', + 'LBL_TOOLS' =>'Tools', + 'LBL_DAYS'=>'Days', + 'LBL_HOURS'=>'Hours', + 'LBL_MINS'=>'Mins', + 'LBL_RUNNING'=>'Running', + 'LBL_MINIMUM_FREQUENCY'=>'Frequency of any cron job in configured to be greater than', + 'LBL_SECONDS'=>'sec ago', + 'LBL_MINUTES'=>'min(s) ago', + 'LBL_HOURS'=>'hr(s) ago', + 'LBL_DAYS'=>'day(s) ago', + 'LBL_MONTHS'=>'month(s) ago', + 'LBL_YEARS'=>'year(s) ago', +); +?> \ No newline at end of file diff --git a/modules/CronTasks/language/es_es.lang.php b/modules/CronTasks/language/es_es.lang.php new file mode 100644 index 0000000..9d337d9 --- /dev/null +++ b/modules/CronTasks/language/es_es.lang.php @@ -0,0 +1,35 @@ + 'Activo', + 'LBL_INACTIVE' => 'InActivo', + 'LBL_STATUS' => 'Estado', + 'LBL_SCHEDULER' => 'Planificador', + 'LBL_SETTINGS' => 'Configuración', + 'LBL_FREQUENCY'=> 'Frecuencia', + 'LBL_HOURMIN' => '(H:M)', + 'LAST_START'=>'Ultima ejecución empezó hace', + 'LAST_END'=>'Ultima ejecución acabó hace', + 'LBL_SEQUENCE'=>'Secuencia', + 'LBL_TOOLS' =>'Herramientas', + 'LBL_DAYS'=>'Días', + 'LBL_HOURS'=>'Horas', + 'LBL_MINS'=>'Minutos', + 'LBL_RUNNING'=>'En ejecución', + 'LBL_MINIMUM_FREQUENCY'=>'La frecuencia de los trabajos debe ser superior a 15 minutos', + 'LBL_SECONDS'=>'seg', + 'LBL_MINUTES'=>'min', + 'LBL_HOURS'=>'hrs', + 'LBL_DAYS'=>'días', + 'LBL_MONTHS'=>'meses', + 'LBL_YEARS'=>'años', +); +?> \ No newline at end of file diff --git a/modules/CronTasks/language/es_mx.lang.php b/modules/CronTasks/language/es_mx.lang.php new file mode 100644 index 0000000..f6d767b --- /dev/null +++ b/modules/CronTasks/language/es_mx.lang.php @@ -0,0 +1,35 @@ + 'Activo', + 'LBL_INACTIVE' => 'Inactivo', + 'LBL_STATUS' => 'Estado', + 'LBL_SCHEDULER' => 'Planificador', + 'LBL_SETTINGS' => 'Configuración', + 'LBL_FREQUENCY'=> 'Frecuencia', + 'LBL_HOURMIN' => '(H:M)', + 'LAST_START'=>'Ultima ejecución empezó hace', + 'LAST_END'=>'Ultima ejecución acabó hace', + 'LBL_SEQUENCE'=>'Secuencia', + 'LBL_TOOLS' =>'Herramientas', + 'LBL_DAYS'=>'Días', + 'LBL_HOURS'=>'Horas', + 'LBL_MINS'=>'Minutos', + 'LBL_RUNNING'=>'En ejecución', + 'LBL_MINIMUM_FREQUENCY'=>'La frecuencia de los trabajos debe ser superior a 15 minutos', + 'LBL_SECONDS'=>'seg', + 'LBL_MINUTES'=>'min', + 'LBL_HOURS'=>'hrs', + 'LBL_DAYS'=>'días', + 'LBL_MONTHS'=>'meses', + 'LBL_YEARS'=>'años', +); +?> \ No newline at end of file diff --git a/modules/CronTasks/language/fr_fr.lang.php b/modules/CronTasks/language/fr_fr.lang.php new file mode 100644 index 0000000..575bce8 --- /dev/null +++ b/modules/CronTasks/language/fr_fr.lang.php @@ -0,0 +1,34 @@ + 'Actif', + 'LBL_INACTIVE' => 'Inactif', + 'LBL_STATUS' => 'Statut', + 'LBL_SCHEDULER' => 'Planificateur', + 'LBL_SETTINGS' => 'Réglages', + 'LBL_FREQUENCY'=> 'Fréquence', + 'LBL_HOURMIN' => '(H:m)', + 'LAST_START'=>'Dernier scan commencé', + 'LAST_END'=>'Dernier scan terminé', + 'LBL_SEQUENCE'=>'Séquence', + 'LBL_TOOLS' =>'Outils', + 'LBL_DAYS'=>'Jours', + 'LBL_HOURS'=>'Heures', + 'LBL_MINS'=>'Minutes', + 'LBL_RUNNING'=>'En cours d\'éxécution', + 'LBL_MINIMUM_FREQUENCY'=>'La fréquence de planification doit être supérieur à', + 'LBL_SECONDS'=>'sec(s) auparavant', + 'LBL_MINUTES'=>'min(s) auparavant', + 'LBL_HOURS'=>'heure(s) auparavant', + 'LBL_DAYS'=>'jour(s) auparavant', + 'LBL_MONTHS'=>'mois auparavant', + 'LBL_YEARS'=>'année(s) auparavant', +); +?> \ No newline at end of file diff --git a/modules/CronTasks/language/hu_hu.lang.php b/modules/CronTasks/language/hu_hu.lang.php new file mode 100644 index 0000000..5aadd92 --- /dev/null +++ b/modules/CronTasks/language/hu_hu.lang.php @@ -0,0 +1,38 @@ + 'Aktív', + 'LBL_INACTIVE' => 'Inaktív', + 'LBL_STATUS' => 'Állapot', + 'LBL_SCHEDULER' => 'Időzítő', + 'LBL_SETTINGS' => 'Beállítások', + 'LBL_FREQUENCY' => 'Gyakoriság', + 'LBL_HOURMIN' => '(O:p)', + 'LAST_START' => 'Utolsó átvizsgálás elkezdődött', + 'LAST_END' => 'Utolsó átvizsgálás befejeződött', + 'LBL_SEQUENCE' => 'Sorozat', + 'LBL_TOOLS' => 'Eszközök', + 'LBL_DAYS' => 'nappal ezelőtt', + 'LBL_HOURS' => 'órával ezelőtt', + 'LBL_MINS' => 'Perc', + 'LBL_RUNNING' => 'Működés alatt', + 'LBL_MINIMUM_FREQUENCY' => 'Bármely időzített feladat ismétlési gyakorisága 15 percet meg kell, hogy haladja az Ondemand rendszerben', + 'LBL_SECONDS' => 'másodperccel ezelőtt', + 'LBL_MINUTES' => 'perccel ezelőtt', + 'LBL_MONTHS' => 'hónappal ezelőtt', + 'LBL_YEARS' => 'évvel ezelőtt' +); +?> diff --git a/modules/CustomView/ChangeStatus.php b/modules/CustomView/ChangeStatus.php new file mode 100644 index 0000000..c4a224d --- /dev/null +++ b/modules/CustomView/ChangeStatus.php @@ -0,0 +1,54 @@ +isPermittedCustomView($cvid,$now_action,$oCustomView->customviewmodule) == 'yes') + { + $updateStatusSql = "update vtiger_customview set status=? where cvid=? and entitytype=?"; + $updateresult = $adb->pquery($updateStatusSql, array($status, $cvid, $module)); + if(!$updateresult) + echo ':#:FAILURE:#:'; + else + echo ':#:SUCCESS:#:' . $module . ':#:'; + } + else + { + global $theme, $app_strings; + echo "
"; + echo "
+ + + + + + + + + +
+ $app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
+
"; + echo "
"; + exit; + } +} +?> \ No newline at end of file diff --git a/modules/CustomView/CustomView.js b/modules/CustomView/CustomView.js new file mode 100644 index 0000000..62e0e92 --- /dev/null +++ b/modules/CustomView/CustomView.js @@ -0,0 +1,76 @@ + /********************************************************************************* + ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ + +function verify_data() { + var isError = false; + var errorMessage = ""; + if (trim(document.CustomView.viewName.value) == "") { + isError = true; + errorMessage += "\nView Name"; + } + // Here we decide whether to submit the form. + if (isError == true) { + alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage); + return false; + } + //return true; +} + + +function CancelForm() +{ +var cvmodule = document.templatecreate.cvmodule.value; +var viewid = document.templatecreate.cvid.value; +document.location.href = "index.php?module="+cvmodule+"&action=index&viewname="+viewid; +} + + +function check4null(form) +{ + var isError = false; + var errorMessage = ""; + // Here we decide whether to submit the form. + if (trim(form.subject.value) =='') { + isError = true; + errorMessage += "\n subject"; + form.subject.focus(); + } + + // Here we decide whether to submit the form. + if (isError == true) { + alert(alert_arr.MISSING_REQUIRED_FIELDS + errorMessage); + return false; + } + return true; +} + +//added to hide date selection option, if a user doesn't have permission for not permitter standard filter column +//added to fix the ticket #5117 +function standardFilterDisplay() +{ + if(getObj("stdDateFilterField")) + { + if(document.CustomView.stdDateFilterField.selectedIndex > -1 && document.CustomView.stdDateFilterField.options[document.CustomView.stdDateFilterField.selectedIndex].value == "not_accessible") + { + getObj('stdDateFilter').disabled = true; + getObj('startdate').disabled = true; getObj('enddate').disabled = true; + getObj('jscal_trigger_date_start').style.visibility="hidden"; + getObj('jscal_trigger_date_end').style.visibility="hidden"; + } + else + { + getObj('stdDateFilter').disabled = false; + getObj('startdate').disabled = false; + getObj('enddate').disabled = false; + getObj('jscal_trigger_date_start').style.visibility="visible"; + getObj('jscal_trigger_date_end').style.visibility="visible"; + } + } +} \ No newline at end of file diff --git a/modules/CustomView/CustomView.php b/modules/CustomView/CustomView.php new file mode 100644 index 0000000..0166a38 --- /dev/null +++ b/modules/CustomView/CustomView.php @@ -0,0 +1,1952 @@ + "" . $mod_strings['equals'] . "", + "n" => "" . $mod_strings['not equal to'] . "", + "s" => "" . $mod_strings['starts with'] . "", + "ew" => "" . $mod_strings['ends with'] . "", + "c" => "" . $mod_strings['contains'] . "", + "k" => "" . $mod_strings['does not contain'] . "", + "l" => "" . $mod_strings['less than'] . "", + "g" => "" . $mod_strings['greater than'] . "", + "m" => "" . $mod_strings['less or equal'] . "", + "h" => "" . $mod_strings['greater or equal'] . "", + "b" => "" . $mod_strings['before'] . "", + "a" => "" . $mod_strings['after'] . "", + "bw" => "" . $mod_strings['between'] . "", +); + +class CustomView extends CRMEntity { + + var $module_list = Array(); + var $customviewmodule; + var $list_fields; + var $list_fields_name; + var $setdefaultviewid; + var $escapemodule; + var $mandatoryvalues; + var $showvalues; + var $data_type; + // Information as defined for this instance in the database table. + protected $_status = false; + protected $_userid = false; + protected $meta; + protected $moduleMetaInfo; + + /** This function sets the currentuser id to the class variable smownerid, + * modulename to the class variable customviewmodule + * @param $module -- The module Name:: Type String(optional) + * @returns nothing + */ + function CustomView($module = "") { + global $current_user, $adb; + $this->customviewmodule = $module; + $this->escapemodule[] = $module . "_"; + $this->escapemodule[] = "_"; + $this->smownerid = $current_user->id; + $this->moduleMetaInfo = array(); + if ($module != "" && $module != 'Calendar') { + $this->meta = $this->getMeta($module, $current_user); + } + } + + /** + * + * @param String:ModuleName $module + * @return EntityMeta + */ + public function getMeta($module, $user) { + $db = PearDatabase::getInstance(); + if (empty($this->moduleMetaInfo[$module])) { + $handler = vtws_getModuleHandlerFromName($module, $user); + $meta = $handler->getMeta(); + $this->moduleMetaInfo[$module] = $meta; + } + return $this->moduleMetaInfo[$module]; + } + + /** To get the customViewId of the specified module + * @param $module -- The module Name:: Type String + * @returns customViewId :: Type Integer + */ + function getViewId($module) { + global $adb, $current_user; + $now_action = vtlib_purify($_REQUEST['action']); + if (empty($_REQUEST['viewname'])) { + if (isset($_SESSION['lvs'][$module]["viewname"]) && $_SESSION['lvs'][$module]["viewname"] != '') { + $viewid = $_SESSION['lvs'][$module]["viewname"]; + } elseif ($this->setdefaultviewid != "") { + $viewid = $this->setdefaultviewid; + } else { + $defcv_result = $adb->pquery("select default_cvid from vtiger_user_module_preferences where userid = ? and tabid =?", array($current_user->id, getTabid($module))); + if ($adb->num_rows($defcv_result) > 0) { + $viewid = $adb->query_result($defcv_result, 0, 'default_cvid'); + } else { + $query = "select cvid from vtiger_customview where setdefault=1 and entitytype=?"; + $cvresult = $adb->pquery($query, array($module)); + if ($adb->num_rows($cvresult) > 0) { + $viewid = $adb->query_result($cvresult, 0, 'cvid'); + } else + $viewid = ''; + } + } + + if ($viewid == '' || $viewid == 0 || $this->isPermittedCustomView($viewid, $now_action, $module) != 'yes') { + $query = "select cvid from vtiger_customview where viewname='All' and entitytype=?"; + $cvresult = $adb->pquery($query, array($module)); + $viewid = $adb->query_result($cvresult, 0, 'cvid'); + } + } else { + $viewname = vtlib_purify($_REQUEST['viewname']); + if (!is_numeric($viewname)) { + if (strtolower($viewname) == 'all' || $viewname == 0) { + $viewid = $this->getViewIdByName('All', $module); + } else { + $viewid = $this->getViewIdByName($viewname, $module); + } + } else { + $viewid = $viewname; + } + if ($this->isPermittedCustomView($viewid, $now_action, $this->customviewmodule) != 'yes') + $viewid = 0; + } + $_SESSION['lvs'][$module]["viewname"] = $viewid; + return $viewid; + } + + function getViewIdByName($viewname, $module) { + global $adb; + if (isset($viewname)) { + $query = "select cvid from vtiger_customview where viewname=? and entitytype=?"; + $cvresult = $adb->pquery($query, array($viewname, $module)); + $viewid = $adb->query_result($cvresult, 0, 'cvid'); + ; + return $viewid; + } else { + return 0; + } + } + + // return type array + /** to get the details of a customview + * @param $cvid :: Type Integer + * @returns $customviewlist Array in the following format + * $customviewlist = Array('viewname'=>value, + * 'setdefault'=>defaultchk, + * 'setmetrics'=>setmetricschk) + */ + function getCustomViewByCvid($cvid) { + global $adb, $current_user; + $tabid = getTabid($this->customviewmodule); + + require('user_privileges/user_privileges_' . $current_user->id . '.php'); + + $ssql = "select vtiger_customview.* from vtiger_customview inner join vtiger_tab on vtiger_tab.name = vtiger_customview.entitytype"; + $ssql .= " where vtiger_customview.cvid=?"; + $sparams = array($cvid); + + if ($is_admin == false) { + $ssql .= " and (vtiger_customview.status=0 or vtiger_customview.userid = ? or vtiger_customview.status = 3 or vtiger_customview.userid in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '" . $current_user_parent_role_seq . "::%'))"; + array_push($sparams, $current_user->id); + } + $result = $adb->pquery($ssql, $sparams); + + $usercv_result = $adb->pquery("select default_cvid from vtiger_user_module_preferences where userid = ? and tabid = ?", array($current_user->id, $tabid)); + $def_cvid = $adb->query_result($usercv_result, 0, 'default_cvid'); + + while ($cvrow = $adb->fetch_array($result)) { + $customviewlist["viewname"] = $cvrow["viewname"]; + if ((isset($def_cvid) || $def_cvid != '') && $def_cvid == $cvid) { + $customviewlist["setdefault"] = 1; + } else { + $customviewlist["setdefault"] = $cvrow["setdefault"]; + } + $customviewlist["setmetrics"] = $cvrow["setmetrics"]; + $customviewlist["userid"] = $cvrow["userid"]; + $customviewlist["status"] = $cvrow["status"]; + } + return $customviewlist; + } + + /** to get the customviewCombo for the class variable customviewmodule + * @param $viewid :: Type Integer + * $viewid will make the corresponding selected + * @returns $customviewCombo :: Type String + */ + function getCustomViewCombo($viewid = '', $markselected = true) { + global $adb, $current_user; + global $app_strings; + $tabid = getTabid($this->customviewmodule); + + require('user_privileges/user_privileges_' . $current_user->id . '.php'); + + $shtml_user = ''; + $shtml_pending = ''; + $shtml_public = ''; + $shtml_others = ''; + + $selected = 'selected'; + if ($markselected == false) + $selected = ''; + + $ssql = "select vtiger_customview.*, vtiger_users.first_name,vtiger_users.last_name from vtiger_customview inner join vtiger_tab on vtiger_tab.name = vtiger_customview.entitytype + left join vtiger_users on vtiger_customview.userid = vtiger_users.id "; + $ssql .= " where vtiger_tab.tabid=?"; + $sparams = array($tabid); + + if ($is_admin == false) { + $ssql .= " and (vtiger_customview.status=0 or vtiger_customview.userid = ? or vtiger_customview.status = 3 or vtiger_customview.userid in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '" . $current_user_parent_role_seq . "::%'))"; + array_push($sparams, $current_user->id); + } + $ssql .= " ORDER BY viewname"; + $result = $adb->pquery($ssql, $sparams); + while ($cvrow = $adb->fetch_array($result)) { + if ($cvrow['viewname'] == 'All') { + $cvrow['viewname'] = $app_strings['COMBO_ALL']; + } + + $option = ''; + $viewname = $cvrow['viewname']; + if ($cvrow['status'] == CV_STATUS_DEFAULT || $cvrow['userid'] == $current_user->id) { + $disp_viewname = $viewname; + } else { + $userName = getFullNameFromArray('Users', $cvrow); + $disp_viewname = $viewname . " [" . $userName . "] "; + } + + + if ($cvrow['setdefault'] == 1 && $viewid == '') { + $option = ""; + $this->setdefaultviewid = $cvrow['cvid']; + } elseif ($cvrow['cvid'] == $viewid) { + $option = ""; + $this->setdefaultviewid = $cvrow['cvid']; + } else { + $option = ""; + } + + // Add the option to combo box at appropriate section + if ($option != '') { + if ($cvrow['status'] == CV_STATUS_DEFAULT || $cvrow['userid'] == $current_user->id) { + $shtml_user .= $option; + } elseif ($cvrow['status'] == CV_STATUS_PUBLIC) { + if ($shtml_public == '') + $shtml_public = ""; + $shtml_public .= $option; + } elseif ($cvrow['status'] == CV_STATUS_PENDING) { + if ($shtml_pending == '') + $shtml_pending = ""; + $shtml_pending .= $option; + } else { + if ($shtml_others == '') + $shtml_others = ""; + $shtml_others .= $option; + } + } + } + $shtml = $shtml_user; + if ($is_admin == true) + $shtml .= $shtml_pending; + $shtml = $shtml . $shtml_public . $shtml_others; + return $shtml; + } + + /** to get the getColumnsListbyBlock for the given module and Block + * @param $module :: Type String + * @param $block :: Type Integer + * @returns $columnlist Array in the format + * $columnlist = Array ($fieldlabel =>'$fieldtablename:$fieldcolname:$fieldname:$module_$fieldlabel1:$fieldtypeofdata', + $fieldlabel1 =>'$fieldtablename1:$fieldcolname1:$fieldname1:$module_$fieldlabel11:$fieldtypeofdata1', + | + $fieldlabeln =>'$fieldtablenamen:$fieldcolnamen:$fieldnamen:$module_$fieldlabel1n:$fieldtypeofdatan') + */ + function getColumnsListbyBlock($module, $block) { + global $adb, $mod_strings, $app_strings; + $block_ids = explode(",", $block); + $tabid = getTabid($module); + global $current_user; + require('user_privileges/user_privileges_' . $current_user->id . '.php'); + if (empty($this->meta) && $module != 'Calendar') { + $this->meta = $this->getMeta($module, $current_user); + } + if ($tabid == 9) + $tabid = "9,16"; + $display_type = " vtiger_field.displaytype in (1,2,3)"; + + if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) { + $tab_ids = explode(",", $tabid); + $sql = "select * from vtiger_field "; + $sql.= " where vtiger_field.tabid in (" . generateQuestionMarks($tab_ids) . ") and vtiger_field.block in (" . generateQuestionMarks($block_ids) . ") and vtiger_field.presence in (0,2) and"; + $sql.= $display_type; + if ($tabid == 9 || $tabid == 16) { + $sql.= " and vtiger_field.fieldname not in('notime','duration_minutes','duration_hours')"; + } + $sql.= " order by sequence"; + $params = array($tab_ids, $block_ids); + } else { + $tab_ids = explode(",", $tabid); + $profileList = getCurrentUserProfileList(); + $sql = "select * from vtiger_field inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid "; + $sql.= " where vtiger_field.tabid in (" . generateQuestionMarks($tab_ids) . ") and vtiger_field.block in (" . generateQuestionMarks($block_ids) . ") and"; + $sql.= "$display_type and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)"; + + $params = array($tab_ids, $block_ids); + + if (count($profileList) > 0) { + $sql.= " and vtiger_profile2field.profileid in (" . generateQuestionMarks($profileList) . ")"; + array_push($params, $profileList); + } + if ($tabid == 9 || $tabid == 16) { + $sql.= " and vtiger_field.fieldname not in('notime','duration_minutes','duration_hours')"; + } + + $sql.= " group by columnname order by sequence"; + } + if ($tabid == '9,16') + $tabid = "9"; + $result = $adb->pquery($sql, $params); + $noofrows = $adb->num_rows($result); + //Added on 14-10-2005 -- added ticket id in list + if ($module == 'HelpDesk' && $block == 25) { + $module_columnlist['vtiger_crmentity:crmid::HelpDesk_Ticket_ID:I'] = 'Ticket ID'; + } + //Added to include vtiger_activity type in vtiger_activity vtiger_customview list + if ($module == 'Calendar' && $block == 19) { + $module_columnlist['vtiger_activity:activitytype:activitytype:Calendar_Activity_Type:V'] = 'Activity Type'; + } + + if ($module == 'SalesOrder' && $block == 63) + $module_columnlist['vtiger_crmentity:crmid::SalesOrder_Order_No:I'] = $app_strings['Order No']; + + if ($module == 'PurchaseOrder' && $block == 57) + $module_columnlist['vtiger_crmentity:crmid::PurchaseOrder_Order_No:I'] = $app_strings['Order No']; + + if ($module == 'Quotes' && $block == 51) + $module_columnlist['vtiger_crmentity:crmid::Quotes_Quote_No:I'] = $app_strings['Quote No']; + if ($module != 'Calendar') { + $moduleFieldList = $this->meta->getModuleFields(); + } + for ($i = 0; $i < $noofrows; $i++) { + $fieldtablename = $adb->query_result($result, $i, "tablename"); + $fieldcolname = $adb->query_result($result, $i, "columnname"); + $fieldname = $adb->query_result($result, $i, "fieldname"); + $fieldtype = $adb->query_result($result, $i, "typeofdata"); + $fieldtype = explode("~", $fieldtype); + $fieldtypeofdata = $fieldtype[0]; + $fieldlabel = $adb->query_result($result, $i, "fieldlabel"); + $field = $moduleFieldList[$fieldname]; + if (!empty($field) && $field->getFieldDataType() == 'reference') { + $fieldtypeofdata = 'V'; + } else { + //Here we Changing the displaytype of the field. So that its criteria will be + //displayed Correctly in Custom view Advance Filter. + $fieldtypeofdata = ChangeTypeOfData_Filter($fieldtablename, $fieldcolname, $fieldtypeofdata); + } + if ($fieldlabel == "Related To") { + $fieldlabel = "Related to"; + } + if ($fieldlabel == "Start Date & Time") { + $fieldlabel = "Start Date"; + if ($module == 'Calendar' && $block == 19) + $module_columnlist['vtiger_activity:time_start::Calendar_Start_Time:I'] = 'Start Time'; + } + $fieldlabel1 = str_replace(" ", "_", $fieldlabel); + $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $fieldname . ":" . $module . "_" . + $fieldlabel1 . ":" . $fieldtypeofdata; + //added to escape attachments fields in customview as we have multiple attachments + $fieldlabel = getTranslatedString($fieldlabel); //added to support i18n issue + if ($module != 'HelpDesk' || $fieldname != 'filename') + $module_columnlist[$optionvalue] = $fieldlabel; + if ($fieldtype[1] == "M") { + $this->mandatoryvalues[] = "'" . $optionvalue . "'"; + $this->showvalues[] = $fieldlabel; + $this->data_type[$fieldlabel] = $fieldtype[1]; + } + } + return $module_columnlist; + } + + /** to get the getModuleColumnsList for the given module + * @param $module :: Type String + * @returns $ret_module_list Array in the following format + * $ret_module_list = + Array ('module' => + Array('BlockLabel1' => + Array('$fieldtablename:$fieldcolname:$fieldname:$module_$fieldlabel1:$fieldtypeofdata'=>$fieldlabel, + Array('$fieldtablename1:$fieldcolname1:$fieldname1:$module_$fieldlabel11:$fieldtypeofdata1'=>$fieldlabel1, + Array('BlockLabel2' => + Array('$fieldtablename:$fieldcolname:$fieldname:$module_$fieldlabel1:$fieldtypeofdata'=>$fieldlabel, + Array('$fieldtablename1:$fieldcolname1:$fieldname1:$module_$fieldlabel11:$fieldtypeofdata1'=>$fieldlabel1, + | + Array('BlockLabeln' => + Array('$fieldtablename:$fieldcolname:$fieldname:$module_$fieldlabel1:$fieldtypeofdata'=>$fieldlabel, + Array('$fieldtablename1:$fieldcolname1:$fieldname1:$module_$fieldlabel11:$fieldtypeofdata1'=>$fieldlabel1, + + + */ + function getModuleColumnsList($module) { + + $module_info = $this->getCustomViewModuleInfo($module); + foreach ($this->module_list[$module] as $key => $value) { + $columnlist = $this->getColumnsListbyBlock($module, $value); + + if (isset($columnlist)) { + $ret_module_list[$module][$key] = $columnlist; + } + } + return $ret_module_list; + } + + /** to get the getModuleColumnsList for the given customview + * @param $cvid :: Type Integer + * @returns $columnlist Array in the following format + * $columnlist = Array( $columnindex => $columnname, + * $columnindex1 => $columnname1, + * | + * $columnindexn => $columnnamen) + */ + function getColumnsListByCvid($cvid) { + global $adb; + + $sSQL = "select vtiger_cvcolumnlist.* from vtiger_cvcolumnlist"; + $sSQL .= " inner join vtiger_customview on vtiger_customview.cvid = vtiger_cvcolumnlist.cvid"; + $sSQL .= " where vtiger_customview.cvid =? order by vtiger_cvcolumnlist.columnindex"; + $result = $adb->pquery($sSQL, array($cvid)); + while ($columnrow = $adb->fetch_array($result)) { + $columnlist[$columnrow['columnindex']] = $columnrow['columnname']; + } + return $columnlist; + } + + /** to get the standard filter fields or the given module + * @param $module :: Type String + * @returns $stdcriteria_list Array in the following format + * $stdcriteria_list = Array( $tablename:$columnname:$fieldname:$module_$fieldlabel => $fieldlabel, + * $tablename1:$columnname1:$fieldname1:$module_$fieldlabel1 => $fieldlabel1, + * | + * $tablenamen:$columnnamen:$fieldnamen:$module_$fieldlabeln => $fieldlabeln) + */ + function getStdCriteriaByModule($module) { + global $adb; + $tabid = getTabid($module); + + global $current_user; + require('user_privileges/user_privileges_' . $current_user->id . '.php'); + + $module_info = $this->getCustomViewModuleInfo($module); + foreach ($this->module_list[$module] as $key => $blockid) { + $blockids[] = $blockid; + } + + if ($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0) { + $sql = "select * from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid "; + $sql.= " where vtiger_field.tabid=? and vtiger_field.block in (" . generateQuestionMarks($blockids) . ") + and vtiger_field.uitype in (5,6,23,70)"; + $sql.= " and vtiger_field.presence in (0,2) order by vtiger_field.sequence"; + $params = array($tabid, $blockids); + } else { + $profileList = getCurrentUserProfileList(); + $sql = "select * from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid inner join vtiger_profile2field on vtiger_profile2field.fieldid=vtiger_field.fieldid inner join vtiger_def_org_field on vtiger_def_org_field.fieldid=vtiger_field.fieldid "; + $sql.= " where vtiger_field.tabid=? and vtiger_field.block in (" . generateQuestionMarks($blockids) . ") and vtiger_field.uitype in (5,6,23,70)"; + $sql.= " and vtiger_profile2field.visible=0 and vtiger_def_org_field.visible=0 and vtiger_field.presence in (0,2)"; + + $params = array($tabid, $blockids); + + if (count($profileList) > 0) { + $sql.= " and vtiger_profile2field.profileid in (" . generateQuestionMarks($profileList) . ")"; + array_push($params, $profileList); + } + + $sql.= " order by vtiger_field.sequence"; + } + + $result = $adb->pquery($sql, $params); + + while ($criteriatyperow = $adb->fetch_array($result)) { + $fieldtablename = $criteriatyperow["tablename"]; + $fieldcolname = $criteriatyperow["columnname"]; + $fieldlabel = $criteriatyperow["fieldlabel"]; + $fieldname = $criteriatyperow["fieldname"]; + $fieldlabel1 = str_replace(" ", "_", $fieldlabel); + $optionvalue = $fieldtablename . ":" . $fieldcolname . ":" . $fieldname . ":" . $module . "_" . $fieldlabel1; + $stdcriteria_list[$optionvalue] = $fieldlabel; + } + + return $stdcriteria_list; + } + + /** to get the standard filter criteria + * @param $selcriteria :: Type String (optional) + * @returns $filter Array in the following format + * $filter = Array( 0 => array('value'=>$filterkey,'text'=>$mod_strings[$filterkey],'selected'=>$selected) + * 1 => array('value'=>$filterkey1,'text'=>$mod_strings[$filterkey1],'selected'=>$selected) + * | + * n => array('value'=>$filterkeyn,'text'=>$mod_strings[$filterkeyn],'selected'=>$selected) + */ + function getStdFilterCriteria($selcriteria = "") { + global $mod_strings; + $filter = array(); + + $stdfilter = Array("custom" => "" . $mod_strings['Custom'] . "", + "prevfy" => "" . $mod_strings['Previous FY'] . "", + "thisfy" => "" . $mod_strings['Current FY'] . "", + "nextfy" => "" . $mod_strings['Next FY'] . "", + "prevfq" => "" . $mod_strings['Previous FQ'] . "", + "thisfq" => "" . $mod_strings['Current FQ'] . "", + "nextfq" => "" . $mod_strings['Next FQ'] . "", + "yesterday" => "" . $mod_strings['Yesterday'] . "", + "today" => "" . $mod_strings['Today'] . "", + "tomorrow" => "" . $mod_strings['Tomorrow'] . "", + "lastweek" => "" . $mod_strings['Last Week'] . "", + "thisweek" => "" . $mod_strings['Current Week'] . "", + "nextweek" => "" . $mod_strings['Next Week'] . "", + "lastmonth" => "" . $mod_strings['Last Month'] . "", + "thismonth" => "" . $mod_strings['Current Month'] . "", + "nextmonth" => "" . $mod_strings['Next Month'] . "", + "last7days" => "" . $mod_strings['Last 7 Days'] . "", + "last30days" => "" . $mod_strings['Last 30 Days'] . "", + "last60days" => "" . $mod_strings['Last 60 Days'] . "", + "last90days" => "" . $mod_strings['Last 90 Days'] . "", + "last120days" => "" . $mod_strings['Last 120 Days'] . "", + "next30days" => "" . $mod_strings['Next 30 Days'] . "", + "next60days" => "" . $mod_strings['Next 60 Days'] . "", + "next90days" => "" . $mod_strings['Next 90 Days'] . "", + "next120days" => "" . $mod_strings['Next 120 Days'] . "", + ); + + foreach ($stdfilter as $FilterKey => $FilterValue) { + if ($FilterKey == $selcriteria) { + $shtml['value'] = $FilterKey; + $shtml['text'] = $FilterValue; + $shtml['selected'] = "selected"; + } else { + $shtml['value'] = $FilterKey; + $shtml['text'] = $FilterValue; + $shtml['selected'] = ""; + } + $filter[] = $shtml; + } + return $filter; + } + + /** to get the standard filter criteria scripts + * @returns $jsStr : Type String + * This function will return the script to set the start data and end date + * for the standard selection criteria + */ + function getCriteriaJS() { + + $todayDateTime = new DateTimeField(date('Y-m-d H:i:s')); + + $tomorrow = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); + $tomorrowDateTime = new DateTimeField($tomorrow . ' ' . date('H:i:s')); + + $yesterday = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 1, date("Y"))); + $yesterdayDateTime = new DateTimeField($yesterday . ' ' . date('H:i:s')); + + $currentmonth0 = date("Y-m-d", mktime(0, 0, 0, date("m"), "01", date("Y"))); + $currentMonthStartDateTime = new DateTimeField($currentmonth0 . ' ' . date('H:i:s')); + $currentmonth1 = date("Y-m-t"); + $currentMonthEndDateTime = new DateTimeField($currentmonth1 . ' ' . date('H:i:s')); + + $lastmonth0 = date("Y-m-d", mktime(0, 0, 0, date("m") - 1, "01", date("Y"))); + $lastMonthStartDateTime = new DateTimeField($lastmonth0 . ' ' . date('H:i:s')); + $lastmonth1 = date("Y-m-t", strtotime("-1 Month")); + $lastMonthEndDateTime = new DateTimeField($lastmonth1 . ' ' . date('H:i:s')); + + $nextmonth0 = date("Y-m-d", mktime(0, 0, 0, date("m") + 1, "01", date("Y"))); + $nextMonthStartDateTime = new DateTimeField($nextmonth0 . ' ' . date('H:i:s')); + $nextmonth1 = date("Y-m-t", strtotime("+1 Month")); + $nextMonthEndDateTime = new DateTimeField($nextmonth1 . ' ' . date('H:i:s')); + + $lastweek0 = date("Y-m-d", strtotime("-2 week Sunday")); + $lastWeekStartDateTime = new DateTimeField($lastweek0 . ' ' . date('H:i:s')); + $lastweek1 = date("Y-m-d", strtotime("-1 week Saturday")); + $lastWeekEndDateTime = new DateTimeField($lastweek1 . ' ' . date('H:i:s')); + + $thisweek0 = date("Y-m-d", strtotime("-1 week Sunday")); + $thisWeekStartDateTime = new DateTimeField($thisweek0 . ' ' . date('H:i:s')); + $thisweek1 = date("Y-m-d", strtotime("this Saturday")); + $thisWeekEndDateTime = new DateTimeField($thisweek1 . ' ' . date('H:i:s')); + + $nextweek0 = date("Y-m-d", strtotime("this Sunday")); + $nextWeekStartDateTime = new DateTimeField($nextweek0 . ' ' . date('H:i:s')); + $nextweek1 = date("Y-m-d", strtotime("+1 week Saturday")); + $nextWeekEndDateTime = new DateTimeField($nextweek1 . ' ' . date('H:i:s')); + + $next7days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 6, date("Y"))); + $next7DaysDateTime = new DateTimeField($next7days . ' ' . date('H:i:s')); + + $next30days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 29, date("Y"))); + $next30DaysDateTime = new DateTimeField($next30days . ' ' . date('H:i:s')); + + $next60days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 59, date("Y"))); + $next60DaysDateTime = new DateTimeField($next60days . ' ' . date('H:i:s')); + + $next90days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 89, date("Y"))); + $next90DaysDateTime = new DateTimeField($next90days . ' ' . date('H:i:s')); + + $next120days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 119, date("Y"))); + $next120DaysDateTime = new DateTimeField($next120days . ' ' . date('H:i:s')); + + $last7days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 6, date("Y"))); + $last7DaysDateTime = new DateTimeField($last7days . ' ' . date('H:i:s')); + + $last30days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 29, date("Y"))); + $last30DaysDateTime = new DateTimeField($last30days . ' ' . date('H:i:s')); + + $last60days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 59, date("Y"))); + $last60DaysDateTime = new DateTimeField($last60days . ' ' . date('H:i:s')); + + $last90days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 89, date("Y"))); + $last90DaysDateTime = new DateTimeField($last90days . ' ' . date('H:i:s')); + + $last120days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 119, date("Y"))); + $last120DaysDateTime = new DateTimeField($last120days . ' ' . date('H:i:s')); + + $currentFY0 = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y"))); + $currentFYStartDateTime = new DateTimeField($currentFY0 . ' ' . date('H:i:s')); + $currentFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y"))); + $currentFYEndDateTime = new DateTimeField($currentFY1 . ' ' . date('H:i:s')); + + $lastFY0 = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y") - 1)); + $lastFYStartDateTime = new DateTimeField($lastFY0 . ' ' . date('H:i:s')); + $lastFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y") - 1)); + $lastFYEndDateTime = new DateTimeField($lastFY1 . ' ' . date('H:i:s')); + + $nextFY0 = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y") + 1)); + $nextFYStartDateTime = new DateTimeField($nextFY0 . ' ' . date('H:i:s')); + $nextFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y") + 1)); + $nextFYEndDateTime = new DateTimeField($nextFY1 . ' ' . date('H:i:s')); + + if (date("m") <= 3) { + $cFq = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y"))); + $cFqStartDateTime = new DateTimeField($cFq . ' ' . date('H:i:s')); + $cFq1 = date("Y-m-d", mktime(0, 0, 0, "03", "31", date("Y"))); + $cFqEndDateTime = new DateTimeField($cFq1 . ' ' . date('H:i:s')); + + $nFq = date("Y-m-d", mktime(0, 0, 0, "04", "01", date("Y"))); + $nFqStartDateTime = new DateTimeField($nFq . ' ' . date('H:i:s')); + $nFq1 = date("Y-m-d", mktime(0, 0, 0, "06", "30", date("Y"))); + $nFqEndDateTime = new DateTimeField($nFq1 . ' ' . date('H:i:s')); + + $pFq = date("Y-m-d", mktime(0, 0, 0, "10", "01", date("Y") - 1)); + $pFqStartDateTime = new DateTimeField($pFq . ' ' . date('H:i:s')); + $pFq1 = date("Y-m-d", mktime(0, 0, 0, "12", "31", date("Y") - 1)); + $pFqEndDateTime = new DateTimeField($pFq1 . ' ' . date('H:i:s')); + } else if (date("m") > 3 and date("m") <= 6) { + + $pFq = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y"))); + $pFqStartDateTime = new DateTimeField($pFq . ' ' . date('H:i:s')); + $pFq1 = date("Y-m-d", mktime(0, 0, 0, "03", "31", date("Y"))); + $pFqEndDateTime = new DateTimeField($pFq1 . ' ' . date('H:i:s')); + + $cFq = date("Y-m-d", mktime(0, 0, 0, "04", "01", date("Y"))); + $cFqStartDateTime = new DateTimeField($cFq . ' ' . date('H:i:s')); + $cFq1 = date("Y-m-d", mktime(0, 0, 0, "06", "30", date("Y"))); + $cFqEndDateTime = new DateTimeField($cFq1 . ' ' . date('H:i:s')); + + $nFq = date("Y-m-d", mktime(0, 0, 0, "07", "01", date("Y"))); + $nFqStartDateTime = new DateTimeField($nFq . ' ' . date('H:i:s')); + $nFq1 = date("Y-m-d", mktime(0, 0, 0, "09", "30", date("Y"))); + $nFqEndDateTime = new DateTimeField($nFq1 . ' ' . date('H:i:s')); + } else if (date("m") > 6 and date("m") <= 9) { + + $nFq = date("Y-m-d", mktime(0, 0, 0, "10", "01", date("Y"))); + $nFqStartDateTime = new DateTimeField($nFq . ' ' . date('H:i:s')); + $nFq1 = date("Y-m-d", mktime(0, 0, 0, "12", "31", date("Y"))); + $nFqEndDateTime = new DateTimeField($nFq1 . ' ' . date('H:i:s')); + + $pFq = date("Y-m-d", mktime(0, 0, 0, "04", "01", date("Y"))); + $pFqStartDateTime = new DateTimeField($pFq . ' ' . date('H:i:s')); + $pFq1 = date("Y-m-d", mktime(0, 0, 0, "06", "30", date("Y"))); + $pFqEndDateTime = new DateTimeField($pFq1 . ' ' . date('H:i:s')); + + $cFq = date("Y-m-d", mktime(0, 0, 0, "07", "01", date("Y"))); + $cFqStartDateTime = new DateTimeField($cFq . ' ' . date('H:i:s')); + $cFq1 = date("Y-m-d", mktime(0, 0, 0, "09", "30", date("Y"))); + $cFqEndDateTime = new DateTimeField($cFq1 . ' ' . date('H:i:s')); + } else if (date("m") > 9 and date("m") <= 12) { + $nFq = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y") + 1)); + $nFqStartDateTime = new DateTimeField($nFq . ' ' . date('H:i:s')); + $nFq1 = date("Y-m-d", mktime(0, 0, 0, "03", "31", date("Y") + 1)); + $nFqEndDateTime = new DateTimeField($nFq1 . ' ' . date('H:i:s')); + + $pFq = date("Y-m-d", mktime(0, 0, 0, "07", "01", date("Y"))); + $pFqStartDateTime = new DateTimeField($pFq . ' ' . date('H:i:s')); + $pFq1 = date("Y-m-d", mktime(0, 0, 0, "09", "30", date("Y"))); + $pFqEndDateTime = new DateTimeField($pFq1 . ' ' . date('H:i:s')); + + $cFq = date("Y-m-d", mktime(0, 0, 0, "10", "01", date("Y"))); + $cFqStartDateTime = new DateTimeField($cFq . ' ' . date('H:i:s')); + $cFq1 = date("Y-m-d", mktime(0, 0, 0, "12", "31", date("Y"))); + $cFqEndDateTime = new DateTimeField($cFq1 . ' ' . date('H:i:s')); + } + + $sjsStr = ''; + + return $sjsStr; + } + + /** to get the standard filter for the given customview Id + * @param $cvid :: Type Integer + * @returns $stdfilterlist Array in the following format + * $stdfilterlist = Array( 'columnname' => $tablename:$columnname:$fieldname:$module_$fieldlabel,'stdfilter'=>$stdfilter,'startdate'=>$startdate,'enddate'=>$enddate) + */ + function getStdFilterByCvid($cvid) { + global $adb; + + $sSQL = "select vtiger_cvstdfilter.* from vtiger_cvstdfilter inner join vtiger_customview on vtiger_customview.cvid = vtiger_cvstdfilter.cvid"; + $sSQL .= " where vtiger_cvstdfilter.cvid=?"; + + $result = $adb->pquery($sSQL, array($cvid)); + $stdfilterrow = $adb->fetch_array($result); + + $stdfilterlist = array(); + $stdfilterlist["columnname"] = $stdfilterrow["columnname"]; + $stdfilterlist["stdfilter"] = $stdfilterrow["stdfilter"]; + + if ($stdfilterrow["stdfilter"] == "custom" || $stdfilterrow["stdfilter"] == "") { + if ($stdfilterrow["startdate"] != "0000-00-00" && $stdfilterrow["startdate"] != "") { + $startDateTime = new DateTimeField($stdfilterrow["startdate"] . ' ' . date('H:i:s')); + $stdfilterlist["startdate"] = $startDateTime->getDisplayDate(); + } + if ($stdfilterrow["enddate"] != "0000-00-00" && $stdfilterrow["enddate"] != "") { + $endDateTime = new DateTimeField($stdfilterrow["enddate"] . ' ' . date('H:i:s')); + $stdfilterlist["enddate"] = $endDateTime->getDisplayDate(); + } + } else { //if it is not custom get the date according to the selected duration + $datefilter = $this->getDateforStdFilterBytype($stdfilterrow["stdfilter"]); + $startDateTime = new DateTimeField($datefilter[0] . ' ' . date('H:i:s')); + $stdfilterlist["startdate"] = $startDateTime->getDisplayDate(); + $endDateTime = new DateTimeField($datefilter[1] . ' ' . date('H:i:s')); + $stdfilterlist["enddate"] = $endDateTime->getDisplayDate(); + } + return $stdfilterlist; + } + + /** to get the Advanced filter for the given customview Id + * @param $cvid :: Type Integer + * @returns $advfilterlist Array + */ + function getAdvFilterByCvid($cvid) { + + global $adb, $log, $default_charset; + + $advft_criteria = array(); + + $sql = 'SELECT * FROM vtiger_cvadvfilter_grouping WHERE cvid = ? ORDER BY groupid'; + $groupsresult = $adb->pquery($sql, array($cvid)); + + $i = 1; + $j = 0; + while ($relcriteriagroup = $adb->fetch_array($groupsresult)) { + $groupId = $relcriteriagroup["groupid"]; + $groupCondition = $relcriteriagroup["group_condition"]; + + $ssql = 'select vtiger_cvadvfilter.* from vtiger_customview + inner join vtiger_cvadvfilter on vtiger_cvadvfilter.cvid = vtiger_customview.cvid + left join vtiger_cvadvfilter_grouping on vtiger_cvadvfilter.cvid = vtiger_cvadvfilter_grouping.cvid + and vtiger_cvadvfilter.groupid = vtiger_cvadvfilter_grouping.groupid'; + $ssql.= " where vtiger_customview.cvid = ? AND vtiger_cvadvfilter.groupid = ? order by vtiger_cvadvfilter.columnindex"; + + $result = $adb->pquery($ssql, array($cvid, $groupId)); + $noOfColumns = $adb->num_rows($result); + if ($noOfColumns <= 0) + continue; + + while ($relcriteriarow = $adb->fetch_array($result)) { + $columnIndex = $relcriteriarow["columnindex"]; + $criteria = array(); + $criteria['columnname'] = html_entity_decode($relcriteriarow["columnname"], ENT_QUOTES, $default_charset); + $criteria['comparator'] = $relcriteriarow["comparator"]; + $advfilterval = html_entity_decode($relcriteriarow["value"], ENT_QUOTES, $default_charset); + $col = explode(":", $relcriteriarow["columnname"]); + $temp_val = explode(",", $relcriteriarow["value"]); + if ($col[4] == 'D' || ($col[4] == 'T' && $col[1] != 'time_start' && $col[1] != 'time_end') || ($col[4] == 'DT')) { + $val = Array(); + for ($x = 0; $x < count($temp_val); $x++) { + if ($col[4] == 'D') { + $date = new DateTimeField(trim($temp_val[$x])); + $val[$x] = $date->getDisplayDate(); + } elseif ($col[4] == 'DT') { + $date = new DateTimeField(trim($temp_val[$x])); + $val[$x] = $date->getDisplayDateTimeValue(); + } else { + $date = new DateTimeField(trim($temp_val[$x])); + $val[$x] = $date->getDisplayTime(); + } + } + $advfilterval = implode(",", $val); + } + $criteria['value'] = $advfilterval; + $criteria['column_condition'] = $relcriteriarow["column_condition"]; + + $advft_criteria[$i]['columns'][$j] = $criteria; + $advft_criteria[$i]['condition'] = $groupCondition; + $j++; + } + if (!empty($advft_criteria[$i]['columns'][$j - 1]['column_condition'])) { + $advft_criteria[$i]['columns'][$j - 1]['column_condition'] = ''; + } + $i++; + } + // Clear the condition (and/or) for last group, if any. + if (!empty($advft_criteria[$i - 1]['condition'])) + $advft_criteria[$i - 1]['condition'] = ''; + return $advft_criteria; + } + + /** + * Cache information to perform re-lookups + * + * @var String + */ + protected $_fieldby_tblcol_cache = array(); + + /** + * Function to check if field is present based on + * + * @param String $columnname + * @param String $tablename + */ + function isFieldPresent_ByColumnTable($columnname, $tablename) { + global $adb; + + if (!isset($this->_fieldby_tblcol_cache[$tablename])) { + $query = 'SELECT columnname FROM vtiger_field WHERE tablename = ? and presence in (0,2)'; + + $result = $adb->pquery($query, array($tablename)); + $numrows = $adb->num_rows($result); + + if ($numrows) { + $this->_fieldby_tblcol_cache[$tablename] = array(); + for ($index = 0; $index < $numrows; ++$index) { + $this->_fieldby_tblcol_cache[$tablename][] = $adb->query_result($result, $index, 'columnname'); + } + } + } + // If still the field was not found (might be disabled or deleted?) + if (!isset($this->_fieldby_tblcol_cache[$tablename])) { + return false; + } + return in_array($columnname, $this->_fieldby_tblcol_cache[$tablename]); + } + + /** to get the customview Columnlist Query for the given customview Id + * @param $cvid :: Type Integer + * @returns $getCvColumnList as a string + * This function will return the columns for the given customfield in comma seperated values in the format + * $tablename.$columnname,$tablename1.$columnname1, ------ $tablenamen.$columnnamen + * + */ + function getCvColumnListSQL($cvid) { + global $adb; + $columnslist = $this->getColumnsListByCvid($cvid); + if (isset($columnslist)) { + foreach ($columnslist as $columnname => $value) { + $tablefield = ""; + if ($value != "") { + $list = explode(":", $value); + + //Added For getting status for Activities -Jaguar + $sqllist_column = $list[0] . "." . $list[1]; + if ($this->customviewmodule == "Calendar") { + if ($list[1] == "status" || $list[1] == "eventstatus") { + $sqllist_column = "case when (vtiger_activity.status not like '') then vtiger_activity.status else vtiger_activity.eventstatus end as activitystatus"; + } + } + //Added for assigned to sorting + if ($list[1] == "smownerid") { + $userNameSql = getSqlForNameInDisplayFormat(array('first_name' => + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $sqllist_column = "case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name"; + } + if ($list[0] == "vtiger_contactdetails" && $list[1] == "lastname") + $sqllist_column = "vtiger_contactdetails.lastname,vtiger_contactdetails.firstname"; + $sqllist[] = $sqllist_column; + //Ends + + $tablefield[$list[0]] = $list[1]; + + //Changed as the replace of module name may replace the string if the fieldname has module name in it -- Jeri + $fieldinfo = explode('_', $list[3], 2); + $fieldlabel = $fieldinfo[1]; + $fieldlabel = str_replace("_", " ", $fieldlabel); + + if ($this->isFieldPresent_ByColumnTable($list[1], $list[0])) { + + $this->list_fields[$fieldlabel] = $tablefield; + $this->list_fields_name[$fieldlabel] = $list[2]; + } + } + } + $returnsql = implode(",", $sqllist); + } + return $returnsql; + } + + /** to get the customview stdFilter Query for the given customview Id + * @param $cvid :: Type Integer + * @returns $stdfiltersql as a string + * This function will return the standard filter criteria for the given customfield + * + */ + function getCVStdFilterSQL($cvid) { + global $adb; + + $stdfiltersql = ''; + $stdfilterlist = array(); + + $sSQL = "select vtiger_cvstdfilter.* from vtiger_cvstdfilter inner join vtiger_customview on vtiger_customview.cvid = vtiger_cvstdfilter.cvid"; + $sSQL .= " where vtiger_cvstdfilter.cvid=?"; + + $result = $adb->pquery($sSQL, array($cvid)); + $stdfilterrow = $adb->fetch_array($result); + + $stdfilterlist = array(); + $stdfilterlist["columnname"] = $stdfilterrow["columnname"]; + $stdfilterlist["stdfilter"] = $stdfilterrow["stdfilter"]; + + if ($stdfilterrow["stdfilter"] == "custom" || $stdfilterrow["stdfilter"] == "") { + if ($stdfilterrow["startdate"] != "0000-00-00" && $stdfilterrow["startdate"] != "") { + $stdfilterlist["startdate"] = $stdfilterrow["startdate"]; + } + if ($stdfilterrow["enddate"] != "0000-00-00" && $stdfilterrow["enddate"] != "") { + $stdfilterlist["enddate"] = $stdfilterrow["enddate"]; + } + } else { //if it is not custom get the date according to the selected duration + $datefilter = $this->getDateforStdFilterBytype($stdfilterrow["stdfilter"]); + $stdfilterlist["startdate"] = $datefilter[0]; + $stdfilterlist["enddate"] = $datefilter[1]; + } + + if (isset($stdfilterlist)) { + + foreach ($stdfilterlist as $columnname => $value) { + + if ($columnname == "columnname") { + $filtercolumn = $value; + } elseif ($columnname == "stdfilter") { + $filtertype = $value; + } elseif ($columnname == "startdate") { + $startDateTime = new DateTimeField($value . ' ' . date('H:i:s')); + $userStartDate = $startDateTime->getDisplayDate(); + $userStartDateTime = new DateTimeField($userStartDate . ' 00:00:00'); + $startDateTime = $userStartDateTime->getDBInsertDateTimeValue(); + } elseif ($columnname == "enddate") { + $endDateTime = new DateTimeField($value . ' ' . date('H:i:s')); + $userEndDate = $endDateTime->getDisplayDate(); + $userEndDateTime = new DateTimeField($userEndDate . ' 23:59:00'); + $endDateTime = $userEndDateTime->getDBInsertDateTimeValue(); + } + if ($startDateTime != "" && $endDateTime != "") { + $columns = explode(":", $filtercolumn); + // Fix for http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5423 + if ($columns[1] == 'birthday') { + $tableColumnSql = "DATE_FORMAT(" . $columns[0] . "." . $columns[1] . ", '%m%d')"; + $startDateTime = "DATE_FORMAT('$startDate', '%m%d')"; + $endDateTime = "DATE_FORMAT('$endDate', '%m%d')"; + $stdfiltersql = $tableColumnSql . " BETWEEN " . $startDateTime . " and " . $endDateTime; + } else { + if ($this->customviewmodule == 'Calendar' && ($columns[1] == 'date_start' || $columns[1] == 'due_date')) { + $tableColumnSql = ''; + if ($columns[1] == 'date_start') { + $tableColumnSql = "CAST((CONCAT(date_start,' ',time_start)) AS DATETIME)"; + } else { + $tableColumnSql = "CAST((CONCAT(due_date,' ',time_end)) AS DATETIME)"; + } + } else { + $tableColumnSql = $columns[0] . "." . $columns[1]; + } + $stdfiltersql = $tableColumnSql . " BETWEEN '" . $startDateTime . "' and '" . $endDateTime . "'"; + } + } + } + } + return $stdfiltersql; + } + + /** to get the customview AdvancedFilter Query for the given customview Id + * @param $cvid :: Type Integer + * @returns $advfiltersql as a string + * This function will return the advanced filter criteria for the given customfield + * + */ + // Needs to be modified according to the new advanced filter (support for grouping). + // Not modified as of now, as this function is not used for now (Instead Query Generator is used for better performance). + function getCVAdvFilterSQL($cvid) { + global $current_user; + + $advfilter = $this->getAdvFilterByCvid($cvid); + + $advcvsql = ""; + + foreach ($advfilter as $groupid => $groupinfo) { + + $groupcolumns = $groupinfo["columns"]; + $groupcondition = $groupinfo["condition"]; + $advfiltergroupsql = ""; + + foreach ($groupcolumns as $columnindex => $columninfo) { + $columnname = $columninfo['columnname']; + $comparator = $columninfo['comparator']; + $value = $columninfo['value']; + $columncondition = $columninfo['column_condition']; + + $columns = explode(":", $columnname); + $datatype = (isset($columns[4])) ? $columns[4] : ""; + + if ($columnname != "" && $comparator != "") { + $valuearray = explode(",", trim($value)); + + if (isset($valuearray) && count($valuearray) > 1 && $comparator != 'bw') { + $advorsql = ""; + for ($n = 0; $n < count($valuearray); $n++) { + $advorsql[] = $this->getRealValues($columns[0], $columns[1], $comparator, trim($valuearray[$n]), $datatype); + } + //If negative logic filter ('not equal to', 'does not contain') is used, 'and' condition should be applied instead of 'or' + if ($comparator == 'n' || $comparator == 'k') + $advorsqls = implode(" and ", $advorsql); + else + $advorsqls = implode(" or ", $advorsql); + $advfiltersql = " (" . $advorsqls . ") "; + } + elseif ($comparator == 'bw' && count($valuearray) == 2) { + $advfiltersql = "(" . $columns[0] . "." . $columns[1] . " between '" . getValidDBInsertDateTimeValue(trim($valuearray[0]), $datatype) . "' and '" . getValidDBInsertDateTimeValue(trim($valuearray[1]), $datatype) . "')"; + } else { + //Added for getting vtiger_activity Status -Jaguar + if ($this->customviewmodule == "Calendar" && ($columns[1] == "status" || $columns[1] == "eventstatus")) { + if (getFieldVisibilityPermission("Calendar", $current_user->id, 'taskstatus') == '0') { + $advfiltersql = "case when (vtiger_activity.status not like '') then vtiger_activity.status else vtiger_activity.eventstatus end" . $this->getAdvComparator($comparator, trim($value), $datatype); + } + else + $advfiltersql = "vtiger_activity.eventstatus" . $this->getAdvComparator($comparator, trim($value), $datatype); + } + elseif ($this->customviewmodule == "Documents" && $columns[1] == 'folderid') { + $advfiltersql = "vtiger_attachmentsfolder.foldername" . $this->getAdvComparator($comparator, trim($value), $datatype); + } elseif ($this->customviewmodule == "Assets") { + if ($columns[1] == 'account') { + $advfiltersql = "vtiger_account.accountname" . $this->getAdvComparator($comparator, trim($value), $datatype); + } + if ($columns[1] == 'product') { + $advfiltersql = "vtiger_products.productname" . $this->getAdvComparator($comparator, trim($value), $datatype); + } + if ($columns[1] == 'invoiceid') { + $advfiltersql = "vtiger_invoice.subject" . $this->getAdvComparator($comparator, trim($value), $datatype); + } + } else { + $advfiltersql = $this->getRealValues($columns[0], $columns[1], $comparator, trim($value), $datatype); + } + } + + $advfiltergroupsql .= $advfiltersql; + if ($columncondition != NULL && $columncondition != '' && count($groupcolumns) > $columnindex) { + $advfiltergroupsql .= ' ' . $columncondition . ' '; + } + } + } + + if (trim($advfiltergroupsql) != "") { + $advfiltergroupsql = "( $advfiltergroupsql ) "; + if ($groupcondition != NULL && $groupcondition != '' && $advfilter > $groupid) { + $advfiltergroupsql .= ' ' . $groupcondition . ' '; + } + + $advcvsql .= $advfiltergroupsql; + } + } + if (trim($advcvsql) != "") + $advcvsql = '(' . $advcvsql . ')'; + return $advcvsql; + } + + /** to get the realvalues for the given value + * @param $tablename :: type string + * @param $fieldname :: type string + * @param $comparator :: type string + * @param $value :: type string + * @returns $value as a string in the following format + * $tablename.$fieldname comparator + */ + function getRealValues($tablename, $fieldname, $comparator, $value, $datatype) { + //we have to add the fieldname/tablename.fieldname and the corresponding value (which we want) we can add here. So that when these LHS field comes then RHS value will be replaced for LHS in the where condition of the query + global $adb, $mod_strings, $currentModule, $current_user; + //Added for proper check of contact name in advance filter + if ($tablename == "vtiger_contactdetails" && $fieldname == "lastname") + $fieldname = "contactid"; + + $contactid = "vtiger_contactdetails.lastname"; + if ($currentModule != "Contacts" && $currentModule != "Leads" && $currentModule != 'Campaigns') { + $contactid = getSqlForNameInDisplayFormat(array('lastname' => 'vtiger_contactdetails.lastname', 'firstname' => 'vtiger_contactdetails.firstname'), 'Contacts'); + } + $change_table_field = Array( + "product_id" => "vtiger_products.productname", + "contactid" => 'trim(' . $contactid . ')', + "contact_id" => 'trim(' . $contactid . ')', + "accountid" => "", //in cvadvfilter accountname is stored for Contact, Potential, Quotes, SO, Invoice + "account_id" => "", //Same like accountid. No need to change + "vendorid" => "vtiger_vendor.vendorname", + "vendor_id" => "vtiger_vendor.vendorname", + "potentialid" => "vtiger_potential.potentialname", + "vtiger_account.parentid" => "vtiger_account2.accountname", + "quoteid" => "vtiger_quotes.subject", + "salesorderid" => "vtiger_salesorder.subject", + "campaignid" => "vtiger_campaign.campaignname", + "vtiger_contactdetails.reportsto" => getSqlForNameInDisplayFormat(array('lastname' => 'vtiger_contactdetails2.lastname', 'firstname' => 'vtiger_contactdetails2.firstname'), 'Contacts'), + "vtiger_pricebook.currency_id" => "vtiger_currency_info.currency_name", + ); + + if ($fieldname == "smownerid" || $fieldname == 'modifiedby') { + if($fieldname == "smownerid") { + $tableNameSuffix = ''; + } elseif($fieldname == "modifiedby") { + $tableNameSuffix = '2'; + } + $userNameSql = getSqlForNameInDisplayFormat(array('first_name' => + 'vtiger_users'.$tableNameSuffix.'.first_name', 'last_name' => 'vtiger_users'.$tableNameSuffix.'.last_name'), 'Users'); + $temp_value = '( trim(' . $userNameSql . ')' . $this->getAdvComparator($comparator, $value, $datatype); + $temp_value.= " OR vtiger_groups$tableNameSuffix.groupname" . $this->getAdvComparator($comparator, $value, $datatype) . ')'; + $value = $temp_value; // Hot fix: removed unbalanced closing bracket ")"; + } elseif ($fieldname == "inventorymanager") { + $value = $tablename . "." . $fieldname . $this->getAdvComparator($comparator, getUserId_Ol($value), $datatype); + } elseif ($change_table_field[$fieldname] != '') {//Added to handle special cases + $value = $change_table_field[$fieldname] . $this->getAdvComparator($comparator, $value, $datatype); + } elseif ($change_table_field[$tablename . "." . $fieldname] != '') {//Added to handle special cases + $tmp_value = ''; + if ((($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($value) == '') || (($comparator == 'n' || $comparator == 'k') && trim($value) != '')) { + $tmp_value = $change_table_field[$tablename . "." . $fieldname] . ' IS NULL or '; + } + $value = $tmp_value . $change_table_field[$tablename . "." . $fieldname] . $this->getAdvComparator($comparator, $value, $datatype); + } elseif (($fieldname == "crmid" && $tablename != 'vtiger_crmentity') || $fieldname == "parent_id" || $fieldname == 'parentid') { + //For crmentity.crmid the control should not come here. This is only to get the related to modules + $value = $this->getSalesRelatedName($comparator, $value, $datatype, $tablename, $fieldname); + } else { + //For checkbox type values, we have to convert yes/no as 1/0 to get the values + $field_uitype = getUItype($this->customviewmodule, $fieldname); + if ($field_uitype == 56) { + if (strtolower($value) == 'yes') + $value = 1; + elseif (strtolower($value) == 'no') + $value = 0; + } else if (is_uitype($field_uitype, '_picklist_')) { /* Fix for tickets 4465 and 4629 */ + // Get all the keys for the for the Picklist value + $mod_keys = array_keys($mod_strings, $value); + + // Iterate on the keys, to get the first key which doesn't start with LBL_ (assuming it is not used in PickList) + foreach ($mod_keys as $mod_idx => $mod_key) { + $stridx = strpos($mod_key, 'LBL_'); + // Use strict type comparision, refer strpos for more details + if ($stridx !== 0) { + $value = $mod_key; + break; + } + } + } + //added to fix the ticket + if ($this->customviewmodule == "Calendar" && ($fieldname == "status" || $fieldname == "taskstatus" || $fieldname == "eventstatus")) { + if (getFieldVisibilityPermission("Calendar", $current_user->id, 'taskstatus') == '0') { + $value = " (case when (vtiger_activity.status not like '') then vtiger_activity.status else vtiger_activity.eventstatus end)" . $this->getAdvComparator($comparator, $value, $datatype); + } + else + $value = " vtiger_activity.eventstatus " . $this->getAdvComparator($comparator, $value, $datatype); + } elseif ($comparator == 'e' && (trim($value) == "NULL" || trim($value) == '')) { + $value = '(' . $tablename . "." . $fieldname . ' IS NULL OR ' . $tablename . "." . $fieldname . ' = \'\')'; + } else { + $value = $tablename . "." . $fieldname . $this->getAdvComparator($comparator, $value, $datatype); + } + //end + } + return $value; + } + + /** to get the related name for the given module + * @param $comparator :: type string, + * @param $value :: type string, + * @param $datatype :: type string, + * @returns $value :: string + */ + function getSalesRelatedName($comparator, $value, $datatype, $tablename, $fieldname) { + global $log; + $log->info("in getSalesRelatedName " . $comparator . "==" . $value . "==" . $datatype . "==" . $tablename . "==" . $fieldname); + global $adb; + + $adv_chk_value = $value; + $value = '('; + $sql = "select distinct(setype) from vtiger_crmentity c INNER JOIN " . $adb->sql_escape_string($tablename) . " t ON t." . $adb->sql_escape_string($fieldname) . " = c.crmid"; + $res = $adb->pquery($sql, array()); + for ($s = 0; $s < $adb->num_rows($res); $s++) { + $modulename = $adb->query_result($res, $s, "setype"); + if ($modulename == 'Vendors') { + continue; + } + if ($s != 0) + $value .= ' or '; + if ($modulename == 'Accounts') { + //By Pavani : Related to problem in calender, Ticket: 4284 and 4675 + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + if ($tablename == 'vtiger_seactivityrel' && $fieldname == 'crmid') { + $value .= 'vtiger_account2.accountname IS NULL or '; + } else { + $value .= 'vtiger_account.accountname IS NULL or '; + } + } + if ($tablename == 'vtiger_seactivityrel' && $fieldname == 'crmid') { + $value .= 'vtiger_account2.accountname'; + } else { + $value .= 'vtiger_account.accountname'; + } + } + if ($modulename == 'Leads') { + $concatSql = getSqlForNameInDisplayFormat(array('lastname' => 'vtiger_leaddetails.lastname', 'firstname' => 'vtiger_leaddetails.firstname'), 'Leads'); + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= " $concatSql IS NULL or "; + } + $value .= " $concatSql"; + } + if ($modulename == 'Potentials') { + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + + $value .= ' vtiger_potential.potentialname IS NULL or '; + } + $value .= ' vtiger_potential.potentialname'; + } + if ($modulename == 'Products') { + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= ' vtiger_products.productname IS NULL or '; + } + $value .= ' vtiger_products.productname'; + } + if ($modulename == 'Invoice') { + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= ' vtiger_invoice.subject IS NULL or '; + } + $value .= ' vtiger_invoice.subject'; + } + if ($modulename == 'PurchaseOrder') { + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= ' vtiger_purchaseorder.subject IS NULL or '; + } + $value .= ' vtiger_purchaseorder.subject'; + } + if ($modulename == 'SalesOrder') { + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= ' vtiger_salesorder.subject IS NULL or '; + } + $value .= ' vtiger_salesorder.subject'; + } + if ($modulename == 'Quotes') { + + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= ' vtiger_quotes.subject IS NULL or '; + } + $value .= ' vtiger_quotes.subject'; + } + if ($modulename == 'Contacts') { + $concatSql = getSqlForNameInDisplayFormat(array('lastname' => 'vtiger_contactdetails.lastname', 'firstname' => 'vtiger_contactdetails.firstname'), 'Contacts'); + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= " $concatSql IS NULL or "; + } + $value .= " $concatSql"; + } + if ($modulename == 'HelpDesk') { + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= ' vtiger_troubletickets.title IS NULL or '; + } + $value .= ' vtiger_troubletickets.title'; + } + if ($modulename == 'Campaigns') { + if (($comparator == 'e' || $comparator == 's' || $comparator == 'c') && trim($adv_chk_value) == '') { + $value .= ' vtiger_campaign.campaignname IS NULL or '; + } + $value .= ' vtiger_campaign.campaignname'; + } + + $value .= $this->getAdvComparator($comparator, $adv_chk_value, $datatype); + } + $value .= ")"; + $log->info("in getSalesRelatedName " . $comparator . "==" . $value . "==" . $datatype . "==" . $tablename . "==" . $fieldname); + return $value; + } + + /** to get the comparator value for the given comparator and value + * @param $comparator :: type string + * @param $value :: type string + * @returns $rtvalue in the format $comparator $value + */ + function getAdvComparator($comparator, $value, $datatype = '') { + + global $adb, $default_charset; + $value = html_entity_decode(trim($value), ENT_QUOTES, $default_charset); + $value = $adb->sql_escape_string($value); + + if ($comparator == "e") { + if (trim($value) == "NULL") { + $rtvalue = " is NULL"; + } elseif (trim($value) != "") { + $rtvalue = " = " . $adb->quote($value); + } elseif (trim($value) == "" && ($datatype == "V" || $datatype == "E")) { + $rtvalue = " = " . $adb->quote($value); + } else { + $rtvalue = " is NULL"; + } + } + if ($comparator == "n") { + if (trim($value) == "NULL") { + $rtvalue = " is NOT NULL"; + } elseif (trim($value) != "") { + $rtvalue = " <> " . $adb->quote($value); + } elseif (trim($value) == "" && $datatype == "V") { + $rtvalue = " <> " . $adb->quote($value); + } elseif (trim($value) == "" && $datatype == "E") { + $rtvalue = " <> " . $adb->quote($value); + } else { + $rtvalue = " is NOT NULL"; + } + } + if ($comparator == "s") { + if (trim($value) == "" && ($datatype == "V" || $datatype == "E")) { + $rtvalue = " like '" . formatForSqlLike($value, 3) . "'"; + } else { + $rtvalue = " like '" . formatForSqlLike($value, 2) . "'"; + } + } + if ($comparator == "ew") { + if (trim($value) == "" && ($datatype == "V" || $datatype == "E")) { + $rtvalue = " like '" . formatForSqlLike($value, 3) . "'"; + } else { + $rtvalue = " like '" . formatForSqlLike($value, 1) . "'"; + } + } + if ($comparator == "c") { + if (trim($value) == "" && ($datatype == "V" || $datatype == "E")) { + $rtvalue = " like '" . formatForSqlLike($value, 3) . "'"; + } else { + $rtvalue = " like '" . formatForSqlLike($value) . "'"; + } + } + if ($comparator == "k") { + if (trim($value) == "" && ($datatype == "V" || $datatype == "E")) { + $rtvalue = " not like ''"; + } else { + $rtvalue = " not like '" . formatForSqlLike($value) . "'"; + } + } + if ($comparator == "l") { + $rtvalue = " < " . $adb->quote($value); + } + if ($comparator == "g") { + $rtvalue = " > " . $adb->quote($value); + } + if ($comparator == "m") { + $rtvalue = " <= " . $adb->quote($value); + } + if ($comparator == "h") { + $rtvalue = " >= " . $adb->quote($value); + } + if ($comparator == "b") { + $rtvalue = " < " . $adb->quote($value); + } + if ($comparator == "a") { + $rtvalue = " > " . $adb->quote($value); + } + + return $rtvalue; + } + + /** to get the date value for the given type + * @param $type :: type string + * @returns $datevalue array in the following format + * $datevalue = Array(0=>$startdate,1=>$enddate) + */ + function getDateforStdFilterBytype($type) { + $thisyear = date("Y"); + $today = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d"), date("Y"))); + $tomorrow = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); + $yesterday = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 1, date("Y"))); + + $currentmonth0 = date("Y-m-d", mktime(0, 0, 0, date("m"), "01", date("Y"))); + $currentmonth1 = date("Y-m-t"); + $lastmonth0 = date("Y-m-d", mktime(0, 0, 0, date("m") - 1, "01", date("Y"))); + $lastmonth1 = date("Y-m-t", strtotime("-1 Month")); + $nextmonth0 = date("Y-m-d", mktime(0, 0, 0, date("m") + 1, "01", date("Y"))); + $nextmonth1 = date("Y-m-t", strtotime("+1 Month")); + + $lastweek0 = date("Y-m-d", strtotime("-2 week Sunday")); + $lastweek1 = date("Y-m-d", strtotime("-1 week Saturday")); + + $thisweek0 = date("Y-m-d", strtotime("-1 week Sunday")); + $thisweek1 = date("Y-m-d", strtotime("this Saturday")); + + $nextweek0 = date("Y-m-d", strtotime("this Sunday")); + $nextweek1 = date("Y-m-d", strtotime("+1 week Saturday")); + + $next7days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 6, date("Y"))); + $next30days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 29, date("Y"))); + $next60days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 59, date("Y"))); + $next90days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 89, date("Y"))); + $next120days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") + 119, date("Y"))); + + $last7days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 6, date("Y"))); + $last30days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 29, date("Y"))); + $last60days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 59, date("Y"))); + $last90days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 89, date("Y"))); + $last120days = date("Y-m-d", mktime(0, 0, 0, date("m"), date("d") - 119, date("Y"))); + + $currentFY0 = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y"))); + $currentFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y"))); + $lastFY0 = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y") - 1)); + $lastFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y") - 1)); + $nextFY0 = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y") + 1)); + $nextFY1 = date("Y-m-t", mktime(0, 0, 0, "12", date("d"), date("Y") + 1)); + + if (date("m") <= 4) { + $cFq = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y"))); + $cFq1 = date("Y-m-d", mktime(0, 0, 0, "04", "30", date("Y"))); + $nFq = date("Y-m-d", mktime(0, 0, 0, "05", "01", date("Y"))); + $nFq1 = date("Y-m-d", mktime(0, 0, 0, "08", "31", date("Y"))); + $pFq = date("Y-m-d", mktime(0, 0, 0, "09", "01", date("Y") - 1)); + $pFq1 = date("Y-m-d", mktime(0, 0, 0, "12", "31", date("Y") - 1)); + } else if (date("m") > 4 and date("m") <= 8) { + $pFq = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y"))); + $pFq1 = date("Y-m-d", mktime(0, 0, 0, "04", "30", date("Y"))); + $cFq = date("Y-m-d", mktime(0, 0, 0, "05", "01", date("Y"))); + $cFq1 = date("Y-m-d", mktime(0, 0, 0, "08", "31", date("Y"))); + $nFq = date("Y-m-d", mktime(0, 0, 0, "09", "01", date("Y"))); + $nFq1 = date("Y-m-d", mktime(0, 0, 0, "12", "31", date("Y"))); + } else { + $nFq = date("Y-m-d", mktime(0, 0, 0, "01", "01", date("Y") + 1)); + $nFq1 = date("Y-m-d", mktime(0, 0, 0, "04", "30", date("Y") + 1)); + $pFq = date("Y-m-d", mktime(0, 0, 0, "05", "01", date("Y"))); + $pFq1 = date("Y-m-d", mktime(0, 0, 0, "08", "31", date("Y"))); + $cFq = date("Y-m-d", mktime(0, 0, 0, "09", "01", date("Y"))); + $cFq1 = date("Y-m-d", mktime(0, 0, 0, "12", "31", date("Y"))); + } + + if ($type == "today") { + + $datevalue[0] = $today; + $datevalue[1] = $today; + } elseif ($type == "yesterday") { + + $datevalue[0] = $yesterday; + $datevalue[1] = $yesterday; + } elseif ($type == "tomorrow") { + + $datevalue[0] = $tomorrow; + $datevalue[1] = $tomorrow; + } elseif ($type == "thisweek") { + + $datevalue[0] = $thisweek0; + $datevalue[1] = $thisweek1; + } elseif ($type == "lastweek") { + + $datevalue[0] = $lastweek0; + $datevalue[1] = $lastweek1; + } elseif ($type == "nextweek") { + + $datevalue[0] = $nextweek0; + $datevalue[1] = $nextweek1; + } elseif ($type == "thismonth") { + + $datevalue[0] = $currentmonth0; + $datevalue[1] = $currentmonth1; + } elseif ($type == "lastmonth") { + + $datevalue[0] = $lastmonth0; + $datevalue[1] = $lastmonth1; + } elseif ($type == "nextmonth") { + + $datevalue[0] = $nextmonth0; + $datevalue[1] = $nextmonth1; + } elseif ($type == "next7days") { + + $datevalue[0] = $today; + $datevalue[1] = $next7days; + } elseif ($type == "next30days") { + + $datevalue[0] = $today; + $datevalue[1] = $next30days; + } elseif ($type == "next60days") { + + $datevalue[0] = $today; + $datevalue[1] = $next60days; + } elseif ($type == "next90days") { + + $datevalue[0] = $today; + $datevalue[1] = $next90days; + } elseif ($type == "next120days") { + + $datevalue[0] = $today; + $datevalue[1] = $next120days; + } elseif ($type == "last7days") { + + $datevalue[0] = $last7days; + $datevalue[1] = $today; + } elseif ($type == "last30days") { + + $datevalue[0] = $last30days; + $datevalue[1] = $today; + } elseif ($type == "last60days") { + + $datevalue[0] = $last60days; + $datevalue[1] = $today; + } else if ($type == "last90days") { + + $datevalue[0] = $last90days; + $datevalue[1] = $today; + } elseif ($type == "last120days") { + + $datevalue[0] = $last120days; + $datevalue[1] = $today; + } elseif ($type == "thisfy") { + + $datevalue[0] = $currentFY0; + $datevalue[1] = $currentFY1; + } elseif ($type == "prevfy") { + + $datevalue[0] = $lastFY0; + $datevalue[1] = $lastFY1; + } elseif ($type == "nextfy") { + + $datevalue[0] = $nextFY0; + $datevalue[1] = $nextFY1; + } elseif ($type == "nextfq") { + + $datevalue[0] = $nFq; + $datevalue[1] = $nFq1; + } elseif ($type == "prevfq") { + + $datevalue[0] = $pFq; + $datevalue[1] = $pFq1; + } elseif ($type == "thisfq") { + $datevalue[0] = $cFq; + $datevalue[1] = $cFq1; + } else { + $datevalue[0] = ""; + $datevalue[1] = ""; + } + + return $datevalue; + } + + /** to get the customview query for the given customview + * @param $viewid (custom view id):: type Integer + * @param $listquery (List View Query):: type string + * @param $module (Module Name):: type string + * @returns $query + */ + //CHANGE : TO IMPROVE PERFORMANCE + function getModifiedCvListQuery($viewid, $listquery, $module) { + if ($viewid != "" && $listquery != "") { + + $listviewquery = substr($listquery, strpos($listquery, 'FROM'), strlen($listquery)); + if ($module == "Calendar" || $module == "Emails") { + $query = "select " . $this->getCvColumnListSQL($viewid) . ", vtiger_activity.activityid, vtiger_activity.activitytype as type, vtiger_activity.priority, case when (vtiger_activity.status not like '') then vtiger_activity.status else vtiger_activity.eventstatus end as status, vtiger_crmentity.crmid,vtiger_contactdetails.contactid " . $listviewquery; + if ($module == "Calendar") + $query = str_replace('vtiger_seactivityrel.crmid,', '', $query); + }else if ($module == "Documents") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid,vtiger_notes.* " . $listviewquery; + } else if ($module == "Products") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid,vtiger_products.* " . $listviewquery; + } else if ($module == "Vendors") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid " . $listviewquery; + } else if ($module == "PriceBooks") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid " . $listviewquery; + } else if ($module == "Faq") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid " . $listviewquery; + } else if ($module == "Potentials" || $module == "Contacts") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid,vtiger_account.accountid " . $listviewquery; + } else if ($module == "Invoice" || $module == "SalesOrder" || $module == "Quotes") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid,vtiger_contactdetails.contactid,vtiger_account.accountid " . $listviewquery; + } else if ($module == "PurchaseOrder") { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid,vtiger_contactdetails.contactid " . $listviewquery; + } else { + $query = "select " . $this->getCvColumnListSQL($viewid) . " ,vtiger_crmentity.crmid " . $listviewquery; + } + $stdfiltersql = $this->getCVStdFilterSQL($viewid); + $advfiltersql = $this->getCVAdvFilterSQL($viewid); + if (isset($stdfiltersql) && $stdfiltersql != '') { + $query .= ' and ' . $stdfiltersql; + } + if (isset($advfiltersql) && $advfiltersql != '') { + $query .= ' and ' . $advfiltersql; + } + } + return $query; + } + + /** to get the Key Metrics for the home page query for the given customview to find the no of records + * @param $viewid (custom view id):: type Integer + * @param $listquery (List View Query):: type string + * @param $module (Module Name):: type string + * @returns $query + */ + function getMetricsCvListQuery($viewid, $listquery, $module) { + if ($viewid != "" && $listquery != "") { + $listviewquery = substr($listquery, strpos($listquery, 'FROM'), strlen($listquery)); + + $query = "select count(*) AS count " . $listviewquery; + + $stdfiltersql = $this->getCVStdFilterSQL($viewid); + $advfiltersql = $this->getCVAdvFilterSQL($viewid); + if (isset($stdfiltersql) && $stdfiltersql != '') { + $query .= ' and ' . $stdfiltersql; + } + if (isset($advfiltersql) && $advfiltersql != '') { + $query .= ' and ' . $advfiltersql; + } + } + + return $query; + } + + /** to get the custom action details for the given customview + * @param $viewid (custom view id):: type Integer + * @returns $calist array in the following format + * $calist = Array ('subject'=>$subject, + 'module'=>$module, + 'content'=>$content, + 'cvid'=>$custom view id) + */ + function getCustomActionDetails($cvid) { + global $adb; + + $sSQL = "select vtiger_customaction.* from vtiger_customaction inner join vtiger_customview on vtiger_customaction.cvid = vtiger_customview.cvid"; + $sSQL .= " where vtiger_customaction.cvid=?"; + $result = $adb->pquery($sSQL, array($cvid)); + + while ($carow = $adb->fetch_array($result)) { + $calist["subject"] = $carow["subject"]; + $calist["module"] = $carow["module"]; + $calist["content"] = $carow["content"]; + $calist["cvid"] = $carow["cvid"]; + } + return $calist; + } + + /* This function sets the block information for the given module to the class variable module_list + * and return the array + */ + + function getCustomViewModuleInfo($module) { + global $adb; + global $current_language; + $current_mod_strings = return_specified_module_language($current_language, $module); + $block_info = Array(); + $modules_list = explode(",", $module); + if ($module == "Calendar") { + $module = "Calendar','Events"; + $modules_list = array('Calendar', 'Events'); + } + + // Tabid mapped to the list of block labels to be skipped for that tab. + $skipBlocksList = array( + getTabid('Contacts') => array('LBL_IMAGE_INFORMATION'), + getTabid('HelpDesk') => array('LBL_COMMENTS'), + getTabid('Products') => array('LBL_IMAGE_INFORMATION'), + getTabid('Faq') => array('LBL_COMMENT_INFORMATION'), + getTabid('Quotes') => array('LBL_RELATED_PRODUCTS'), + getTabid('PurchaseOrder') => array('LBL_RELATED_PRODUCTS'), + getTabid('SalesOrder') => array('LBL_RELATED_PRODUCTS'), + getTabid('Invoice') => array('LBL_RELATED_PRODUCTS') + ); + + $Sql = "select distinct block,vtiger_field.tabid,name,blocklabel from vtiger_field inner join vtiger_blocks on vtiger_blocks.blockid=vtiger_field.block inner join vtiger_tab on vtiger_tab.tabid=vtiger_field.tabid where displaytype != 3 and vtiger_tab.name in (" . generateQuestionMarks($modules_list) . ") and vtiger_field.presence in (0,2) order by block"; + $result = $adb->pquery($Sql, array($modules_list)); + if ($module == "Calendar','Events") + $module = "Calendar"; + + $pre_block_label = ''; + while ($block_result = $adb->fetch_array($result)) { + $block_label = $block_result['blocklabel']; + $tabid = $block_result['tabid']; + // Skip certain blocks of certain modules + if (array_key_exists($tabid, $skipBlocksList) && in_array($block_label, $skipBlocksList[$tabid])) + continue; + + if (trim($block_label) == '') { + $block_info[$pre_block_label] = $block_info[$pre_block_label] . "," . $block_result['block']; + } else { + $lan_block_label = $current_mod_strings[$block_label]; + if (isset($block_info[$lan_block_label]) && $block_info[$lan_block_label] != '') { + $block_info[$lan_block_label] = $block_info[$lan_block_label] . "," . $block_result['block']; + } else { + $block_info[$lan_block_label] = $block_result['block']; + } + } + $pre_block_label = $lan_block_label; + } + $this->module_list[$module] = $block_info; + return $this->module_list; + } + + /** + * Get the userid, status information of this custom view. + * + * @param Integer $viewid + * @return Array + */ + function getStatusAndUserid($viewid) { + global $adb; + + if ($this->_status === false || $this->_userid === false) { + $query = "SELECT status, userid FROM vtiger_customview WHERE cvid=?"; + $result = $adb->pquery($query, array($viewid)); + if ($result && $adb->num_rows($result)) { + $this->_status = $adb->query_result($result, 0, 'status'); + $this->_userid = $adb->query_result($result, 0, 'userid'); + } else { + return false; + } + } + return array('status' => $this->_status, 'userid' => $this->_userid); + } + + //Function to check if the current user is able to see the customView + function isPermittedCustomView($record_id, $action, $module) { + global $log, $adb; + global $current_user; + $log->debug("Entering isPermittedCustomView($record_id,$action,$module) method...."); + + require('user_privileges/user_privileges_' . $current_user->id . '.php'); + $permission = "yes"; + + if ($record_id != '') { + $status_userid_info = $this->getStatusAndUserid($record_id); + + if ($status_userid_info) { + $status = $status_userid_info['status']; + $userid = $status_userid_info['userid']; + + if ($status == CV_STATUS_DEFAULT) { + $log->debug("Entering when status=0"); + if ($action == 'ListView' || $action == $module . "Ajax" || $action == 'index' || $action == 'DetailView') { + $permission = "yes"; + } + else + $permission = "no"; + } + elseif ($is_admin) { + $permission = 'yes'; + } elseif ($action != 'ChangeStatus') { + if ($userid == $current_user->id) { + $log->debug("Entering when $userid=$current_user->id"); + $permission = "yes"; + } elseif ($status == CV_STATUS_PUBLIC) { + $log->debug("Entering when status=3"); + if ($action == 'ListView' || $action == $module . "Ajax" || $action == 'index' || $action == 'DetailView') { + $permission = "yes"; + } + else + $permission = "no"; + } + elseif ($status == CV_STATUS_PRIVATE || $status == CV_STATUS_PENDING) { + $log->debug("Entering when status=1 or 2"); + if ($userid == $current_user->id) + $permission = "yes"; + else { + /* if($action == 'ListView' || $action == $module."Ajax" || $action == 'index') + { */ + $log->debug("Entering when status=1 or status=2 & action = ListView or $module.Ajax or index"); + $sql = "select vtiger_users.id from vtiger_customview inner join vtiger_users where vtiger_customview.cvid = ? and vtiger_customview.userid in (select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '%" . $current_user_parent_role_seq . "::%')"; + $result = $adb->pquery($sql, array($record_id)); + + while ($row = $adb->fetchByAssoc($result)) { + $temp_result[] = $row['id']; + } + $user_array = $temp_result; + if (sizeof($user_array) > 0) { + if (!in_array($current_user->id, $user_array)) + $permission = "no"; + else + $permission = "yes"; + } + else + $permission = "no"; + /* } + else + { + $log->debug("Entering when status=1 or 2 & action = Editview or Customview"); + $permission = "no"; + } */ + } + } + else + $permission = "yes"; + } + else { + $log->debug("Entering else condition............"); + $permission = "no"; + } + } else { + $log->debug("Enters when count =0"); + $permission = 'no'; + } + } + $log->debug("Permission @@@@@@@@@@@@@@@@@@@@@@@@@@@ : $permission"); + $log->debug("Exiting isPermittedCustomView($record_id,$action,$module) method...."); + return $permission; + } + + function isPermittedChangeStatus($status) { + global $current_user, $log; + global $current_language; + $custom_strings = return_module_language($current_language, "CustomView"); + + $log->debug("Entering isPermittedChangeStatus($status) method.............."); + require('user_privileges/user_privileges_' . $current_user->id . '.php'); + $status_details = Array(); + if ($is_admin) { + if ($status == CV_STATUS_PENDING) { + $changed_status = CV_STATUS_PUBLIC; + $status_label = $custom_strings['LBL_STATUS_PUBLIC_APPROVE']; + } elseif ($status == CV_STATUS_PUBLIC) { + $changed_status = CV_STATUS_PENDING; + $status_label = $custom_strings['LBL_STATUS_PUBLIC_DENY']; + } + $status_details = Array('Status' => $status, 'ChangedStatus' => $changed_status, 'Label' => $status_label); + } + $log->debug("Exiting isPermittedChangeStatus($status) method.............."); + return $status_details; + } + +} + +?> \ No newline at end of file diff --git a/modules/CustomView/CustomViewAjax.php b/modules/CustomView/CustomViewAjax.php new file mode 100644 index 0000000..de74ef2 --- /dev/null +++ b/modules/CustomView/CustomViewAjax.php @@ -0,0 +1,13 @@ + diff --git a/modules/CustomView/Delete.php b/modules/CustomView/Delete.php new file mode 100644 index 0000000..ae42e0f --- /dev/null +++ b/modules/CustomView/Delete.php @@ -0,0 +1,31 @@ +pquery($deletesql, array($cvid)); + $_SESSION['lvs'][$module]["viewname"] = ''; +} +if(isset($smodule) && $smodule != '') +{ + $smodule_url = "&smodule=".$smodule; +} + +header("Location: index.php?action=ListView&parenttab=$parenttab&module=$module".$smodule_url); +?> \ No newline at end of file diff --git a/modules/CustomView/EditView.php b/modules/CustomView/EditView.php new file mode 100644 index 0000000..38e32ae --- /dev/null +++ b/modules/CustomView/EditView.php @@ -0,0 +1,365 @@ +>>>>> +global $oCustomView; +//<<<<<>>>>>> + +$error_msg = ''; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; +require_once('modules/CustomView/CustomView.php'); + +$cv_module = vtlib_purify($_REQUEST['module']); + +$recordid = vtlib_purify($_REQUEST['record']); + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("CATEGORY", getParentTab()); +$smarty->assign("APP", $app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("MODULE",$cv_module); +$smarty->assign("MODULELABEL",getTranslatedString($cv_module,$cv_module)); +$smarty->assign("CVMODULE", $cv_module); +$smarty->assign("CUSTOMVIEWID",$recordid); +$smarty->assign("DATEFORMAT",$current_user->date_format); +$smarty->assign("JS_DATEFORMAT",parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + +if($recordid == "") { + $oCustomView = new CustomView(); + $modulecollist = $oCustomView->getModuleColumnsList($cv_module); + $log->info('CustomView :: Successfully got ColumnsList for the module'.$cv_module); + if(isset($modulecollist)) { + $choosecolslist = getByModule_ColumnsList($cv_module,$modulecollist); + } + for($i=1;$i<10;$i++) { + $smarty->assign("CHOOSECOLUMN".$i,$choosecolslist); + } + + $stdfilterhtml = $oCustomView->getStdFilterCriteria(); + $stdfiltercolhtml = getStdFilterHTML($cv_module); + $stdfilterjs = $oCustomView->getCriteriaJS(); + + $smarty->assign("STDFILTERCOLUMNS",$stdfiltercolhtml); + $smarty->assign("STDCOLUMNSCOUNT",count($stdfiltercolhtml)); + $smarty->assign("STDFILTERCRITERIA",$stdfilterhtml); + $smarty->assign("STDFILTER_JAVASCRIPT",$stdfilterjs); + + $advfilterhtml = getAdvCriteriaHTML(); + $modulecolumnshtml = getByModule_ColumnsHTML($cv_module,$modulecollist); + $smarty->assign("FOPTION",$advfilterhtml); + $smarty->assign("COLUMNS_BLOCK",$modulecolumnshtml); + + $smarty->assign("MANDATORYCHECK",implode(",",array_unique($oCustomView->mandatoryvalues))); + $smarty->assign("SHOWVALUES",implode(",",$oCustomView->showvalues)); + $data_type[] = $oCustomView->data_type; + $smarty->assign("DATATYPE",$data_type); + +} else { + $oCustomView = new CustomView($cv_module); + $now_action = vtlib_purify($_REQUEST['action']); + if($oCustomView->isPermittedCustomView($recordid,$now_action,$oCustomView->customviewmodule) == 'yes') { + $customviewdtls = $oCustomView->getCustomViewByCvid($recordid); + $log->info('CustomView :: Successfully got ViewDetails for the Viewid'.$recordid); + $modulecollist = $oCustomView->getModuleColumnsList($cv_module); + $selectedcolumnslist = $oCustomView->getColumnsListByCvid($recordid); + $log->info('CustomView :: Successfully got ColumnsList for the Viewid'.$recordid); + + $smarty->assign("VIEWNAME",$customviewdtls["viewname"]); + + if($customviewdtls["setdefault"] == 1) { + $smarty->assign("CHECKED","checked"); + } + if($customviewdtls["setmetrics"] == 1) { + $smarty->assign("MCHECKED","checked"); + } + $status = $customviewdtls["status"]; + $smarty->assign("STATUS",$status); + + for($i=1;$i<10;$i++) { + $choosecolslist = getByModule_ColumnsList($cv_module,$modulecollist,$selectedcolumnslist[$i-1]); + $smarty->assign("CHOOSECOLUMN".$i,$choosecolslist); + } + + $stdfilterlist = $oCustomView->getStdFilterByCvid($recordid); + $log->info('CustomView :: Successfully got Standard Filter for the Viewid'.$recordid); + $stdfilterlist["stdfilter"] = ($stdfilterlist["stdfilter"] != "") ? ($stdfilterlist["stdfilter"]) : ("custom"); + $stdfilterhtml = $oCustomView->getStdFilterCriteria($stdfilterlist["stdfilter"]); + $stdfiltercolhtml = getStdFilterHTML($cv_module,$stdfilterlist["columnname"]); + $stdfilterjs = $oCustomView->getCriteriaJS(); + + $smarty->assign("STARTDATE",$stdfilterlist["startdate"]); + $smarty->assign("ENDDATE",$stdfilterlist["enddate"]); + + $smarty->assign("STDFILTERCOLUMNS",$stdfiltercolhtml); + $smarty->assign("STDCOLUMNSCOUNT",count($stdfiltercolhtml)); + $smarty->assign("STDFILTERCRITERIA",$stdfilterhtml); + $smarty->assign("STDFILTER_JAVASCRIPT",$stdfilterjs); + + $advfilterlist = $oCustomView->getAdvFilterByCvid($recordid); + $advfilterhtml = getAdvCriteriaHTML(); + $modulecolumnshtml = getByModule_ColumnsHTML($cv_module,$modulecollist); + $smarty->assign("FOPTION",$advfilterhtml); + $smarty->assign("COLUMNS_BLOCK",$modulecolumnshtml); + $smarty->assign("CRITERIA_GROUPS",$advfilterlist); + + $smarty->assign("MANDATORYCHECK",implode(",",array_unique($oCustomView->mandatoryvalues))); + $smarty->assign("SHOWVALUES",implode(",",$oCustomView->showvalues)); + $smarty->assign("EXIST","true"); + $cactionhtml = ""; + + if($cv_module == "Leads" || $cv_module == "Accounts" || $cv_module == "Contacts") + { + $smarty->assign("CUSTOMACTIONBUTTON",$cactionhtml); + } + $data_type[] = $oCustomView->data_type; + $smarty->assign("DATATYPE",$data_type); + } + else + { + echo "
"; + echo "
+ + + + + + + + +
$app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
+
"; + echo "
"; + exit; + } +} + +$smarty->assign("RETURN_MODULE", $cv_module); +if($cv_module == "Calendar") + $return_action = "ListView"; +else + $return_action = "index"; + +if($recordid == '') + $act = $mod_strings['LBL_NEW']; +else + $act = $mod_strings['LBL_EDIT']; + +$smarty->assign("ACT", $act); +$smarty->assign("RETURN_ACTION", $return_action); + +$smarty->display("CustomView.tpl"); + +function getByModule_ColumnsHTML($module,$columnslist,$selected="") { + $columnsList = getByModule_ColumnsList($module,$columnslist,$selected); + return generateSelectColumnsHTML($columnsList,$module); +} + +function generateSelectColumnsHTML($columnsList, $module) { + $shtml = ''; + + foreach($columnsList as $blocklabel=>$blockcolumns) { + $shtml .= ""; + foreach($blockcolumns as $columninfo) { + $shtml .= ""; + } + } + return $shtml; +} + +function getByModule_ColumnsList($module,$columnslist,$selected="") { + global $oCustomView, $current_language,$theme; + global $app_list_strings; + $advfilter = array(); + $mod_strings = return_specified_module_language($current_language,$module); + + $check_dup = Array(); + foreach($oCustomView->module_list[$module] as $key=>$value) + { + $advfilter = array(); + $label = $key; + if(isset($columnslist[$module][$key])) + { + foreach($columnslist[$module][$key] as $field=>$fieldlabel) + { + if(!in_array($fieldlabel,$check_dup)) + { + if(isset($mod_strings[$fieldlabel])) + { + if($selected == $field) + { + $advfilter_option['value'] = $field; + $advfilter_option['text'] = $mod_strings[$fieldlabel]; + $advfilter_option['selected'] = "selected"; + }else + { + $advfilter_option['value'] = $field; + $advfilter_option['text'] = $mod_strings[$fieldlabel]; + $advfilter_option['selected'] = ""; + } + }else + { + if($selected == $field) + { + $advfilter_option['value'] = $field; + $advfilter_option['text'] = $fieldlabel; + $advfilter_option['selected'] = "selected"; + }else + { + $advfilter_option['value'] = $field; + $advfilter_option['text'] = $fieldlabel; + $advfilter_option['selected'] = ""; + } + } + $advfilter[] = $advfilter_option; + $check_dup [] = $fieldlabel; + } + } + $advfilter_out[$label]= $advfilter; + } + } + // Special case handling only for Calendar moudle - Not required for other modules. + if($module == 'Calendar') { + $finalfield = Array(); + $finalfield1 = Array(); + $finalfield2 = Array(); + $newLabel = $mod_strings['LBL_CALENDAR_INFORMATION']; + + if(isset($advfilter_out[$mod_strings['LBL_TASK_INFORMATION']])) { + $finalfield1 = $advfilter_out[$mod_strings['LBL_TASK_INFORMATION']]; + } + if(isset($advfilter_out[$mod_strings['LBL_EVENT_INFORMATION']])) { + $finalfield2 = $advfilter_out[$mod_strings['LBL_EVENT_INFORMATION']]; + } + $finalfield[$newLabel] = array_merge($finalfield1,$finalfield2); + if (isset ($advfilter_out[$mod_strings['LBL_CUSTOM_INFORMATION']])) { + $finalfield[$mod_strings['LBL_CUSTOM_INFORMATION']] = $advfilter_out[$mod_strings['LBL_CUSTOM_INFORMATION']]; + } + $advfilter_out=$finalfield; + } + return $advfilter_out; +} + + /** to get the standard filter criteria + * @param $module(module name) :: Type String + * @param $elected (selection status) :: Type String (optional) + * @returns $filter Array in the following format + * $filter = Array( 0 => array('value'=>$tablename:$colname:$fieldname:$fieldlabel,'text'=>$mod_strings[$field label],'selected'=>$selected), + * 1 => array('value'=>$$tablename1:$colname1:$fieldname1:$fieldlabel1,'text'=>$mod_strings[$field label1],'selected'=>$selected), + */ +function getStdFilterHTML($module,$selected="") +{ + global $app_list_strings, $current_language,$app_strings,$current_user; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + global $oCustomView; + $stdfilter = array(); + $result = $oCustomView->getStdCriteriaByModule($module); + $mod_strings = return_module_language($current_language,$module); + + if(isset($result)) + { + foreach($result as $key=>$value) + { + if($value == 'Start Date & Time') + { + $value = 'Start Date'; + } + $use_module_label = getTranslatedString($module, $module); + if(isset($app_list_strings['moduleList'][$module])) { + $use_module_label = $app_list_strings['moduleList'][$module]; + } + if(isset($mod_strings[$value])) + { + if($key == $selected) + { + + $filter['value'] = $key; + $filter['text'] = $use_module_label." - ".getTranslatedString($value); + $filter['selected'] = "selected"; + }else + { + $filter['value'] = $key; + $filter['text'] = $use_module_label." - ".getTranslatedString($value); + $filter['selected'] =""; + } + } + else + { + if($key == $selected) + { + $filter['value'] = $key; + + $filter['text'] = $use_module_label." - ".$value; + $filter['selected'] = 'selected'; + }else + { + $filter['value'] = $key; + $filter['text'] = $use_module_label." - ".$value; + $filter['selected'] =''; + } + } + $stdfilter[]=$filter; + //added to fix ticket #5117. If a user doesn't have permission for a field and it has been used to fileter a custom view, it should be get displayed to him as Not Accessible. + if(!$is_admin && $selected != '' && $filter['selected'] == '') + { + $keys = explode(":",$selected); + if(getFieldVisibilityPermission($module,$current_user->id,$keys[2]) != '0') + { + $filter['value'] = "not_accessible"; + $filter['text'] = $app_strings["LBL_NOT_ACCESSIBLE"]; + $filter['selected'] = "selected"; + $stdfilter[]=$filter; + } + } + + } + + } + return $stdfilter; +} + + /** to get the Advanced filter criteria + * @param $selected :: Type String (optional) + * @returns $AdvCriteria Array in the following format + * $AdvCriteria = Array( 0 => array('value'=>$tablename:$colname:$fieldname:$fieldlabel,'text'=>$mod_strings[$field label],'selected'=>$selected), + * 1 => array('value'=>$$tablename1:$colname1:$fieldname1:$fieldlabel1,'text'=>$mod_strings[$field label1],'selected'=>$selected), + * | + * n => array('value'=>$$tablenamen:$colnamen:$fieldnamen:$fieldlabeln,'text'=>$mod_strings[$field labeln],'selected'=>$selected)) + */ +function getAdvCriteriaHTML($selected="") +{ + global $adv_filter_options; + + foreach($adv_filter_options as $key=>$value) + { + if($selected == $key) + { + $shtml .= ""; + }else + { + $shtml .= ""; + } + } + + return $shtml; +} +?> \ No newline at end of file diff --git a/modules/CustomView/Forms.php b/modules/CustomView/Forms.php new file mode 100644 index 0000000..6de4e15 --- /dev/null +++ b/modules/CustomView/Forms.php @@ -0,0 +1,253 @@ +$unused) + { + $print_required_array .= "required['$required'] = '". $all_fields[$required] . "';\n"; + + } + + $the_script = << + + + +EOQ; + + return $the_script; +} + + + + +function get_validate_upload_js () +{ + global $mod_strings; + + $err_missing_required_fields = $mod_strings['ERR_MISSING_REQUIRED_FIELDS']; + $lbl_select_file = $mod_strings['ERR_SELECT_FILE']; + $lbl_custom = $mod_strings['LBL_CUSTOM']; + + $the_script = << + + + +EOQ; + + return $the_script; +} + +function getFieldSelect(&$column_fields,$colnum,&$required_fields,$suggest_field,$translated_fields,$module) +{ + global $mod_strings; + global $app_strings; + global $outlook_contacts_field_map; + require_once('include/database/PearDatabase.php'); + global $adb; + + $output = "\n"; + + return $output; + +} + + +function get_readonly_js () +{ +?> + + + diff --git a/modules/CustomView/ListViewTop.php b/modules/CustomView/ListViewTop.php new file mode 100644 index 0000000..2335a09 --- /dev/null +++ b/modules/CustomView/ListViewTop.php @@ -0,0 +1,175 @@ +Array(0=>'image name', + * 1=>'Key Metrics', + * 2=>'home_metrics' + * ), + * 'Header'=>Array(0=>'Metrics', + * 1=>'Count' + * ), + * 'Entries'=>Array($cvid=>Array( + * 0=>$customview name, + * 1=>$no of records for the view + * ), + * $cvid=>Array( + * 0=>$customview name, + * 1=>$no of records for the view + * ), + * | + * | + * $cvid=>Array( + * 0=>$customview name, + * 1=>$no of records for the view + * ) + * ) + * + */ +function getKeyMetrics($maxval,$calCnt) +{ + require_once("data/Tracker.php"); + require_once('modules/CustomView/CustomView.php'); + require_once('include/logging.php'); + require_once('include/ListView/ListView.php'); + + global $app_strings; + global $adb; + global $log; + global $current_language; + $metricviewnames = "'Hot Leads'"; + + $current_module_strings = return_module_language($current_language, "CustomView"); + $log = LoggerManager::getLogger('metrics'); + + $metriclists = getMetricList(); + + // Determine if the KeyMetrics widget should appear or not? + if($calCnt == 'calculateCnt') { + return count($metriclists); + } + + $log->info("Metrics :: Successfully got MetricList to be displayed"); + if(isset($metriclists)) + { + global $current_user; + foreach ($metriclists as $key => $metriclist) { + if($metriclist['module'] == "Calendar") { + $listquery = getListQuery($metriclist['module']); + $oCustomView = new CustomView($metriclist['module']); + $metricsql = $oCustomView->getModifiedCvListQuery($metriclist['id'],$listquery,$metriclist['module']); + $metricsql = mkCountQuery($metricsql); + $metricresult = $adb->query($metricsql); + if($metricresult) + { + $rowcount = $adb->fetch_array($metricresult); + $metriclists[$key]['count'] = $rowcount['count']; + } + + } else { + $queryGenerator = new QueryGenerator($metriclist['module'], $current_user); + $queryGenerator->initForCustomViewById($metriclist['id']); + $metricsql = $queryGenerator->getQuery(); + $metricsql = mkCountQuery($metricsql); + $metricresult = $adb->query($metricsql); + if($metricresult) + { + $rowcount = $adb->fetch_array($metricresult); + $metriclists[$key]['count'] = $rowcount['count']; + } + } + } + $log->info("Metrics :: Successfully build the Metrics"); + } + $title=array(); + $title[]='keyMetrics.gif'; + $title[]=$app_strings['LBL_HOME_KEY_METRICS']; + $title[]='home_metrics'; + $header=Array(); + $header[]=$app_strings['LBL_HOME_METRICS']; + $header[]=$app_strings['LBL_MODULE']; + $header[]=$app_strings['LBL_HOME_COUNT']; + $entries=Array(); + if(isset($metriclists)) + { + $oddRow = true; + foreach($metriclists as $metriclist) + { + $value=array(); + $CVname = (strlen($metriclist['name']) > 20) ? (substr($metriclist['name'],0,20).'...') : $metriclist['name']; + $value[]=''.$CVname . ' ('. $metriclist['user'] .')'; + $value[]=''.getTranslatedString($metriclist['module']). ''; + $value[]=''.$metriclist['count'].''; + $entries[$metriclist['id']]=$value; + } + + } + $values=Array('Title'=>$title,'Header'=>$header,'Entries'=>$entries); + if ( ($display_empty_home_blocks ) || (count($value)!= 0) ) + return $values; + +} + + /** to get the details of a customview Entries + * @returns $metriclists Array in the following format + * $customviewlist []= Array('id'=>custom view id, + * 'name'=>custom view name, + * 'module'=>modulename, + 'count'=>'' + ) + */ +function getMetricList() +{ + global $adb, $current_user; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + + $ssql = "select vtiger_customview.* from vtiger_customview inner join vtiger_tab on vtiger_tab.name = vtiger_customview.entitytype"; + $ssql .= " where vtiger_customview.setmetrics = 1 "; + $sparams = array(); + + if($is_admin == false){ + $ssql .= " and (vtiger_customview.status=0 or vtiger_customview.userid = ? or vtiger_customview.status =3 or vtiger_customview.userid in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%'))"; + array_push($sparams, $current_user->id); + } + $ssql .= " order by vtiger_customview.entitytype"; + $result = $adb->pquery($ssql, $sparams); + while($cvrow=$adb->fetch_array($result)) + { + $metricslist = Array(); + + if(vtlib_isModuleActive($cvrow['entitytype'])){ + $metricslist['id'] = $cvrow['cvid']; + $metricslist['name'] = $cvrow['viewname']; + $metricslist['module'] = $cvrow['entitytype']; + $metricslist['user'] = getUserFullName($cvrow['userid']); + $metricslist['count'] = ''; + if(isPermitted($cvrow['entitytype'],"index") == "yes"){ + $metriclists[] = $metricslist; + } + } + } + + return $metriclists; +} + +?> diff --git a/modules/CustomView/PopulateCustomView.php b/modules/CustomView/PopulateCustomView.php new file mode 100644 index 0000000..d830a81 --- /dev/null +++ b/modules/CustomView/PopulateCustomView.php @@ -0,0 +1,647 @@ +'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Leads','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Hot Leads', + 'setdefault'=>'0','setmetrics'=>'1','status'=>'3','userid'=>'1', + 'cvmodule'=>'Leads','stdfilterid'=>'','advfilterid'=>'0'), + + Array('viewname'=>'This Month Leads', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Leads','stdfilterid'=>'0','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Accounts','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Prospect Accounts', + 'setdefault'=>'0','setmetrics'=>'1','status'=>'3','userid'=>'1', + 'cvmodule'=>'Accounts','stdfilterid'=>'','advfilterid'=>'1'), + + Array('viewname'=>'New This Week', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Accounts','stdfilterid'=>'1','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Contacts','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Contacts Address', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Contacts','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Todays Birthday', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Contacts','stdfilterid'=>'2','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Potentials','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Potentials Won', + 'setdefault'=>'0','setmetrics'=>'1','status'=>'3','userid'=>'1', + 'cvmodule'=>'Potentials','stdfilterid'=>'','advfilterid'=>'2'), + + Array('viewname'=>'Prospecting', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Potentials','stdfilterid'=>'','advfilterid'=>'3'), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'HelpDesk','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Open Tickets', + 'setdefault'=>'0','setmetrics'=>'1','status'=>'3','userid'=>'1', + 'cvmodule'=>'HelpDesk','stdfilterid'=>'','advfilterid'=>'4'), + + Array('viewname'=>'High Prioriy Tickets', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'HelpDesk','stdfilterid'=>'','advfilterid'=>'5'), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Quotes','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Open Quotes', + 'setdefault'=>'0','setmetrics'=>'1','status'=>'3','userid'=>'1', + 'cvmodule'=>'Quotes','stdfilterid'=>'','advfilterid'=>'6'), + + Array('viewname'=>'Rejected Quotes', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Quotes','stdfilterid'=>'','advfilterid'=>'7'), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Calendar','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Emails','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Invoice','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Documents','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'PriceBooks','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Products','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'PurchaseOrder','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'SalesOrder','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Vendors','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Faq','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Campaigns','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'All', + 'setdefault'=>'1','setmetrics'=>'0','status'=>'0','userid'=>'1', + 'cvmodule'=>'Webmails','stdfilterid'=>'','advfilterid'=>''), + + Array('viewname'=>'Drafted FAQ', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Faq','stdfilterid'=>'','advfilterid'=>'8'), + + Array('viewname'=>'Published FAQ', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Faq','stdfilterid'=>'','advfilterid'=>'9'), + + Array('viewname'=>'Open Purchase Orders', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'PurchaseOrder','stdfilterid'=>'','advfilterid'=>'10'), + + Array('viewname'=>'Received Purchase Orders', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'PurchaseOrder','stdfilterid'=>'','advfilterid'=>'11'), + + Array('viewname'=>'Open Invoices', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Invoice','stdfilterid'=>'','advfilterid'=>'12'), + + Array('viewname'=>'Paid Invoices', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'Invoice','stdfilterid'=>'','advfilterid'=>'13'), + + Array('viewname'=>'Pending Sales Orders', + 'setdefault'=>'0','setmetrics'=>'0','status'=>'3','userid'=>'1', + 'cvmodule'=>'SalesOrder','stdfilterid'=>'','advfilterid'=>'14'), + ); + + +$cvcolumns = Array(Array('vtiger_leaddetails:lead_no:lead_no:Leads_Lead_No:V', + 'vtiger_leaddetails:lastname:lastname:Leads_Last_Name:V', + 'vtiger_leaddetails:firstname:firstname:Leads_First_Name:V', + 'vtiger_leaddetails:company:company:Leads_Company:V', + 'vtiger_leadaddress:phone:phone:Leads_Phone:V', + 'vtiger_leadsubdetails:website:website:Leads_Website:V', + 'vtiger_leaddetails:email:email:Leads_Email:E', + 'vtiger_crmentity:smownerid:assigned_user_id:Leads_Assigned_To:V'), + + Array('vtiger_leaddetails:firstname:firstname:Leads_First_Name:V', + 'vtiger_leaddetails:lastname:lastname:Leads_Last_Name:V', + 'vtiger_leaddetails:company:company:Leads_Company:V', + 'vtiger_leaddetails:leadsource:leadsource:Leads_Lead_Source:V', + 'vtiger_leadsubdetails:website:website:Leads_Website:V', + 'vtiger_leaddetails:email:email:Leads_Email:E'), + + Array('vtiger_leaddetails:firstname:firstname:Leads_First_Name:V', + 'vtiger_leaddetails:lastname:lastname:Leads_Last_Name:V', + 'vtiger_leaddetails:company:company:Leads_Company:V', + 'vtiger_leaddetails:leadsource:leadsource:Leads_Lead_Source:V', + 'vtiger_leadsubdetails:website:website:Leads_Website:V', + 'vtiger_leaddetails:email:email:Leads_Email:E'), + + Array('vtiger_account:account_no:account_no:Accounts_Account_No:V', + 'vtiger_account:accountname:accountname:Accounts_Account_Name:V', + 'vtiger_accountbillads:bill_city:bill_city:Accounts_City:V', + 'vtiger_account:website:website:Accounts_Website:V', + 'vtiger_account:phone:phone:Accounts_Phone:V', + 'vtiger_crmentity:smownerid:assigned_user_id:Accounts_Assigned_To:V'), + + Array('vtiger_account:accountname:accountname:Accounts_Account_Name:V', + 'vtiger_account:phone:phone:Accounts_Phone:V', + 'vtiger_account:website:website:Accounts_Website:V', + 'vtiger_account:rating:rating:Accounts_Rating:V', + 'vtiger_crmentity:smownerid:assigned_user_id:Accounts_Assigned_To:V'), + + Array('vtiger_account:accountname:accountname:Accounts_Account_Name:V', + 'vtiger_account:phone:phone:Accounts_Phone:V', + 'vtiger_account:website:website:Accounts_Website:V', + 'vtiger_accountbillads:bill_city:bill_city:Accounts_City:V', + 'vtiger_crmentity:smownerid:assigned_user_id:Accounts_Assigned_To:V'), + + Array('vtiger_contactdetails:contact_no:contact_no:Contacts_Contact_Id:V', + 'vtiger_contactdetails:firstname:firstname:Contacts_First_Name:V', + 'vtiger_contactdetails:lastname:lastname:Contacts_Last_Name:V', + 'vtiger_contactdetails:title:title:Contacts_Title:V', + 'vtiger_contactdetails:accountid:account_id:Contacts_Account_Name:I', + 'vtiger_contactdetails:email:email:Contacts_Email:E', + 'vtiger_contactdetails:phone:phone:Contacts_Office_Phone:V', + 'vtiger_crmentity:smownerid:assigned_user_id:Contacts_Assigned_To:V'), + + Array('vtiger_contactdetails:firstname:firstname:Contacts_First_Name:V', + 'vtiger_contactdetails:lastname:lastname:Contacts_Last_Name:V', + 'vtiger_contactaddress:mailingstreet:mailingstreet:Contacts_Mailing_Street:V', + 'vtiger_contactaddress:mailingcity:mailingcity:Contacts_Mailing_City:V', + 'vtiger_contactaddress:mailingstate:mailingstate:Contacts_Mailing_State:V', + 'vtiger_contactaddress:mailingzip:mailingzip:Contacts_Mailing_Zip:V', + 'vtiger_contactaddress:mailingcountry:mailingcountry:Contacts_Mailing_Country:V'), + + Array('vtiger_contactdetails:firstname:firstname:Contacts_First_Name:V', + 'vtiger_contactdetails:lastname:lastname:Contacts_Last_Name:V', + 'vtiger_contactdetails:title:title:Contacts_Title:V', + 'vtiger_contactdetails:accountid:account_id:Contacts_Account_Name:I', + 'vtiger_contactdetails:email:email:Contacts_Email:E', + 'vtiger_contactsubdetails:otherphone:otherphone:Contacts_Phone:V', + 'vtiger_crmentity:smownerid:assigned_user_id:Contacts_Assigned_To:V'), + + Array('vtiger_potential:potential_no:potential_no:Potentials_Potential_No:V', + 'vtiger_potential:potentialname:potentialname:Potentials_Potential_Name:V', + 'vtiger_potential:related_to:related_to:Potentials_Related_To:V', + 'vtiger_potential:sales_stage:sales_stage:Potentials_Sales_Stage:V', + 'vtiger_potential:leadsource:leadsource:Potentials_Lead_Source:V', + 'vtiger_potential:closingdate:closingdate:Potentials_Expected_Close_Date:D', + 'vtiger_crmentity:smownerid:assigned_user_id:Potentials_Assigned_To:V'), + + Array('vtiger_potential:potentialname:potentialname:Potentials_Potential_Name:V', + 'vtiger_potential:related_to:related_to:Potentials_Related_To:V', + 'vtiger_potential:amount:amount:Potentials_Amount:N', + 'vtiger_potential:closingdate:closingdate:Potentials_Expected_Close_Date:D', + 'vtiger_crmentity:smownerid:assigned_user_id:Potentials_Assigned_To:V'), + + Array('vtiger_potential:potentialname:potentialname:Potentials_Potential_Name:V', + 'vtiger_potential:related_to:related_to:Potentials_Related_To:V', + 'vtiger_potential:amount:amount:Potentials_Amount:N', + 'vtiger_potential:leadsource:leadsource:Potentials_Lead_Source:V', + 'vtiger_potential:closingdate:closingdate:Potentials_Expected_Close_Date:D', + 'vtiger_crmentity:smownerid:assigned_user_id:Potentials_Assigned_To:V'), + + Array(//'vtiger_crmentity:crmid::HelpDesk_Ticket_ID:I', + 'vtiger_troubletickets:ticket_no:ticket_no:HelpDesk_Ticket_No:V', + 'vtiger_troubletickets:title:ticket_title:HelpDesk_Title:V', + 'vtiger_troubletickets:parent_id:parent_id:HelpDesk_Related_To:I', + 'vtiger_troubletickets:status:ticketstatus:HelpDesk_Status:V', + 'vtiger_troubletickets:priority:ticketpriorities:HelpDesk_Priority:V', + 'vtiger_crmentity:smownerid:assigned_user_id:HelpDesk_Assigned_To:V'), + + Array('vtiger_troubletickets:title:ticket_title:HelpDesk_Title:V', + 'vtiger_troubletickets:parent_id:parent_id:HelpDesk_Related_To:I', + 'vtiger_troubletickets:priority:ticketpriorities:HelpDesk_Priority:V', + 'vtiger_troubletickets:product_id:product_id:HelpDesk_Product_Name:I', + 'vtiger_crmentity:smownerid:assigned_user_id:HelpDesk_Assigned_To:V'), + + Array('vtiger_troubletickets:title:ticket_title:HelpDesk_Title:V', + 'vtiger_troubletickets:parent_id:parent_id:HelpDesk_Related_To:I', + 'vtiger_troubletickets:status:ticketstatus:HelpDesk_Status:V', + 'vtiger_troubletickets:product_id:product_id:HelpDesk_Product_Name:I', + 'vtiger_crmentity:smownerid:assigned_user_id:HelpDesk_Assigned_To:V'), + + Array('vtiger_quotes:quote_no:quote_no:Quotes_Quote_No:V', + 'vtiger_quotes:subject:subject:Quotes_Subject:V', + 'vtiger_quotes:quotestage:quotestage:Quotes_Quote_Stage:V', + 'vtiger_quotes:potentialid:potential_id:Quotes_Potential_Name:I', + 'vtiger_quotes:accountid:account_id:Quotes_Account_Name:I', + 'vtiger_quotes:total:hdnGrandTotal:Quotes_Total:I', + 'vtiger_crmentity:smownerid:assigned_user_id:Quotes_Assigned_To:V'), + + Array('vtiger_quotes:subject:subject:Quotes_Subject:V', + 'vtiger_quotes:quotestage:quotestage:Quotes_Quote_Stage:V', + 'vtiger_quotes:potentialid:potential_id:Quotes_Potential_Name:I', + 'vtiger_quotes:accountid:account_id:Quotes_Account_Name:I', + 'vtiger_quotes:validtill:validtill:Quotes_Valid_Till:D', + 'vtiger_crmentity:smownerid:assigned_user_id:Quotes_Assigned_To:V'), + + Array('vtiger_quotes:subject:subject:Quotes_Subject:V', + 'vtiger_quotes:potentialid:potential_id:Quotes_Potential_Name:I', + 'vtiger_quotes:accountid:account_id:Quotes_Account_Name:I', + 'vtiger_quotes:validtill:validtill:Quotes_Valid_Till:D', + 'vtiger_crmentity:smownerid:assigned_user_id:Quotes_Assigned_To:V'), + + Array('vtiger_activity:status:taskstatus:Calendar_Status:V', + 'vtiger_activity:activitytype:activitytype:Calendar_Type:V', + 'vtiger_activity:subject:subject:Calendar_Subject:V', + 'vtiger_seactivityrel:crmid:parent_id:Calendar_Related_to:V', + 'vtiger_activity:date_start:date_start:Calendar_Start_Date:D', + 'vtiger_activity:due_date:due_date:Calendar_End_Date:D', + 'vtiger_crmentity:smownerid:assigned_user_id:Calendar_Assigned_To:V'), + + Array('vtiger_activity:subject:subject:Emails_Subject:V', + 'vtiger_emaildetails:to_email:saved_toid:Emails_To:V', + 'vtiger_activity:date_start:date_start:Emails_Date_Sent:D'), + + Array('vtiger_invoice:invoice_no:invoice_no:Invoice_Invoice_No:V', + 'vtiger_invoice:subject:subject:Invoice_Subject:V', + 'vtiger_invoice:salesorderid:salesorder_id:Invoice_Sales_Order:I', + 'vtiger_invoice:invoicestatus:invoicestatus:Invoice_Status:V', + 'vtiger_invoice:total:hdnGrandTotal:Invoice_Total:I', + 'vtiger_crmentity:smownerid:assigned_user_id:Invoice_Assigned_To:V'), + + Array('vtiger_notes:note_no:note_no:Notes_Note_No:V', + 'vtiger_notes:title:notes_title:Notes_Title:V', + 'vtiger_notes:filename:filename:Notes_File:V', + 'vtiger_crmentity:modifiedtime:modifiedtime:Notes_Modified_Time:DT', + 'vtiger_crmentity:smownerid:assigned_user_id:Notes_Assigned_To:V'), + + Array('vtiger_pricebook:pricebook_no:pricebook_no:PriceBooks_PriceBook_No:V', + 'vtiger_pricebook:bookname:bookname:PriceBooks_Price_Book_Name:V', + 'vtiger_pricebook:active:active:PriceBooks_Active:V', + 'vtiger_pricebook:currency_id:currency_id:PriceBooks_Currency:I'), + + Array('vtiger_products:product_no:product_no:Products_Product_No:V', + 'vtiger_products:productname:productname:Products_Product_Name:V', + 'vtiger_products:productcode:productcode:Products_Part_Number:V', + 'vtiger_products:commissionrate:commissionrate:Products_Commission_Rate:V', + 'vtiger_products:qtyinstock:qtyinstock:Products_Quantity_In_Stock:V', + 'vtiger_products:qty_per_unit:qty_per_unit:Products_Qty/Unit:V', + 'vtiger_products:unit_price:unit_price:Products_Unit_Price:V'), + + Array('vtiger_purchaseorder:purchaseorder_no:purchaseorder_no:PurchaseOrder_PurchaseOrder_No:V', + 'vtiger_purchaseorder:subject:subject:PurchaseOrder_Subject:V', + 'vtiger_purchaseorder:vendorid:vendor_id:PurchaseOrder_Vendor_Name:I', + 'vtiger_purchaseorder:tracking_no:tracking_no:PurchaseOrder_Tracking_Number:V', + 'vtiger_purchaseorder:total:hdnGrandTotal:PurchaseOrder_Total:V', + 'vtiger_crmentity:smownerid:assigned_user_id:PurchaseOrder_Assigned_To:V'), + + Array('vtiger_salesorder:salesorder_no:salesorder_no:SalesOrder_SalesOrder_No:V', + 'vtiger_salesorder:subject:subject:SalesOrder_Subject:V', + 'vtiger_salesorder:accountid:account_id:SalesOrder_Account_Name:I', + 'vtiger_salesorder:quoteid:quote_id:SalesOrder_Quote_Name:I', + 'vtiger_salesorder:total:hdnGrandTotal:SalesOrder_Total:V', + 'vtiger_crmentity:smownerid:assigned_user_id:SalesOrder_Assigned_To:V'), + + Array('vtiger_vendor:vendor_no:vendor_no:Vendors_Vendor_No:V', + 'vtiger_vendor:vendorname:vendorname:Vendors_Vendor_Name:V', + 'vtiger_vendor:phone:phone:Vendors_Phone:V', + 'vtiger_vendor:email:email:Vendors_Email:E', + 'vtiger_vendor:category:category:Vendors_Category:V'), + + + + + Array(//'vtiger_faq:id::Faq_FAQ_Id:I', + 'vtiger_faq:faq_no:faq_no:Faq_Faq_No:V', + 'vtiger_faq:question:question:Faq_Question:V', + 'vtiger_faq:category:faqcategories:Faq_Category:V', + 'vtiger_faq:product_id:product_id:Faq_Product_Name:I', + 'vtiger_crmentity:createdtime:createdtime:Faq_Created_Time:DT', + 'vtiger_crmentity:modifiedtime:modifiedtime:Faq_Modified_Time:DT'), + //this sequence has to be maintained + Array('vtiger_campaign:campaign_no:campaign_no:Campaigns_Campaign_No:V', + 'vtiger_campaign:campaignname:campaignname:Campaigns_Campaign_Name:V', + 'vtiger_campaign:campaigntype:campaigntype:Campaigns_Campaign_Type:N', + 'vtiger_campaign:campaignstatus:campaignstatus:Campaigns_Campaign_Status:N', + 'vtiger_campaign:expectedrevenue:expectedrevenue:Campaigns_Expected_Revenue:V', + 'vtiger_campaign:closingdate:closingdate:Campaigns_Expected_Close_Date:D', + 'vtiger_crmentity:smownerid:assigned_user_id:Campaigns_Assigned_To:V'), + + + Array('subject:subject:subject:Subject:V', + 'from:fromname:fromname:From:N', + 'to:tpname:toname:To:N', + 'body:body:body:Body:V'), + + Array ('vtiger_faq:question:question:Faq_Question:V', + 'vtiger_faq:status:faqstatus:Faq_Status:V', + 'vtiger_faq:product_id:product_id:Faq_Product_Name:I', + 'vtiger_faq:category:faqcategories:Faq_Category:V', + 'vtiger_crmentity:createdtime:createdtime:Faq_Created_Time:DT'), + + Array( 'vtiger_faq:question:question:Faq_Question:V', + 'vtiger_faq:answer:faq_answer:Faq_Answer:V', + 'vtiger_faq:status:faqstatus:Faq_Status:V', + 'vtiger_faq:product_id:product_id:Faq_Product_Name:I', + 'vtiger_faq:category:faqcategories:Faq_Category:V', + 'vtiger_crmentity:createdtime:createdtime:Faq_Created_Time:DT'), + + Array( 'vtiger_purchaseorder:subject:subject:PurchaseOrder_Subject:V', + 'vtiger_purchaseorder:postatus:postatus:PurchaseOrder_Status:V', + 'vtiger_purchaseorder:vendorid:vendor_id:PurchaseOrder_Vendor_Name:I', + 'vtiger_crmentity:smownerid:assigned_user_id:PurchaseOrder_Assigned_To:V', + 'vtiger_purchaseorder:duedate:duedate:PurchaseOrder_Due_Date:V'), + + Array ('vtiger_purchaseorder:subject:subject:PurchaseOrder_Subject:V', + 'vtiger_purchaseorder:vendorid:vendor_id:PurchaseOrder_Vendor_Name:I', + 'vtiger_crmentity:smownerid:assigned_user_id:PurchaseOrder_Assigned_To:V', + 'vtiger_purchaseorder:postatus:postatus:PurchaseOrder_Status:V', + 'vtiger_purchaseorder:carrier:carrier:PurchaseOrder_Carrier:V', + 'vtiger_poshipads:ship_street:ship_street:PurchaseOrder_Shipping_Address:V'), + + Array( 'vtiger_invoice:invoice_no:invoice_no:Invoice_Invoice_No:V', + 'vtiger_invoice:subject:subject:Invoice_Subject:V', + 'vtiger_invoice:accountid:account_id:Invoice_Account_Name:I', + 'vtiger_invoice:salesorderid:salesorder_id:Invoice_Sales_Order:I', + 'vtiger_invoice:invoicestatus:invoicestatus:Invoice_Status:V', + 'vtiger_crmentity:smownerid:assigned_user_id:Invoice_Assigned_To:V', + 'vtiger_crmentity:createdtime:createdtime:Invoice_Created_Time:DT'), + + Array( 'vtiger_invoice:invoice_no:invoice_no:Invoice_Invoice_No:V', + 'vtiger_invoice:subject:subject:Invoice_Subject:V', + 'vtiger_invoice:accountid:account_id:Invoice_Account_Name:I', + 'vtiger_invoice:salesorderid:salesorder_id:Invoice_Sales_Order:I', + 'vtiger_invoice:invoicestatus:invoicestatus:Invoice_Status:V', + 'vtiger_invoiceshipads:ship_street:ship_street:Invoice_Shipping_Address:V', + 'vtiger_crmentity:smownerid:assigned_user_id:Invoice_Assigned_To:V'), + + Array( 'vtiger_salesorder:subject:subject:SalesOrder_Subject:V', + 'vtiger_salesorder:accountid:account_id:SalesOrder_Account_Name:I', + 'vtiger_salesorder:sostatus:sostatus:SalesOrder_Status:V', + 'vtiger_crmentity:smownerid:assigned_user_id:SalesOrder_Assigned_To:V', + 'vtiger_soshipads:ship_street:ship_street:SalesOrder_Shipping_Address:V', + 'vtiger_salesorder:carrier:carrier:SalesOrder_Carrier:V'), + + ); + + + +$cvstdfilters = Array(Array('columnname'=>'vtiger_crmentity:modifiedtime:modifiedtime:Leads_Modified_Time', + 'datefilter'=>'thismonth', + 'startdate'=>'2005-06-01', + 'enddate'=>'2005-06-30'), + + Array('columnname'=>'vtiger_crmentity:createdtime:createdtime:Accounts_Created_Time', + 'datefilter'=>'thisweek', + 'startdate'=>'2005-06-19', + 'enddate'=>'2005-06-25'), + + Array('columnname'=>'vtiger_contactsubdetails:birthday:birthday:Contacts_Birthdate', + 'datefilter'=>'today', + 'startdate'=>'2005-06-25', + 'enddate'=>'2005-06-25') + ); + +$cvadvfilters = Array( + Array( + Array('columnname'=>'vtiger_leaddetails:leadstatus:leadstatus:Leads_Lead_Status:V', + 'comparator'=>'e', + 'value'=>'Hot' + ) + ), + Array( + Array('columnname'=>'vtiger_account:account_type:accounttype:Accounts_Type:V', + 'comparator'=>'e', + 'value'=>'Prospect' + ) + ), + Array( + Array('columnname'=>'vtiger_potential:sales_stage:sales_stage:Potentials_Sales_Stage:V', + 'comparator'=>'e', + 'value'=>'Closed Won' + ) + ), + Array( + Array('columnname'=>'vtiger_potential:sales_stage:sales_stage:Potentials_Sales_Stage:V', + 'comparator'=>'e', + 'value'=>'Prospecting' + ) + ), + Array( + Array('columnname'=>'vtiger_troubletickets:status:ticketstatus:HelpDesk_Status:V', + 'comparator'=>'n', + 'value'=>'Closed' + ) + ), + Array( + Array('columnname'=>'vtiger_troubletickets:priority:ticketpriorities:HelpDesk_Priority:V', + 'comparator'=>'e', + 'value'=>'High' + ) + ), + Array( + Array('columnname'=>'vtiger_quotes:quotestage:quotestage:Quotes_Quote_Stage:V', + 'comparator'=>'n', + 'value'=>'Accepted' + ), + Array('columnname'=>'vtiger_quotes:quotestage:quotestage:Quotes_Quote_Stage:V', + 'comparator'=>'n', + 'value'=>'Rejected' + ) + ), + Array( + Array('columnname'=>'vtiger_quotes:quotestage:quotestage:Quotes_Quote_Stage:V', + 'comparator'=>'e', + 'value'=>'Rejected' + ) + ), + + Array( + Array('columnname'=>'vtiger_faq:status:faqstatus:Faq_Status:V', + 'comparator'=>'e', + 'value'=>'Draft' + ) + ), + + Array( + Array('columnname'=>'vtiger_faq:status:faqstatus:Faq_Status:V', + 'comparator'=>'e', + 'value'=>'Published' + ) + ), + + Array( + Array('columnname'=>'vtiger_purchaseorder:postatus:postatus:PurchaseOrder_Status:V', + 'comparator'=>'e', + 'value'=>'Created, Approved, Delivered' + ) + ), + + Array( + Array('columnname'=>'vtiger_purchaseorder:postatus:postatus:PurchaseOrder_Status:V', + 'comparator'=>'e', + 'value'=>'Received Shipment' + ) + ), + + Array( + Array('columnname'=>'vtiger_invoice:invoicestatus:invoicestatus:Invoice_Status:V', + 'comparator'=>'e', + 'value'=>'Created, Approved, Sent' + ) + ), + + Array( + Array('columnname'=>'vtiger_invoice:invoicestatus:invoicestatus:Invoice_Status:V', + 'comparator'=>'e', + 'value'=>'Paid' + ) + ), + + Array( + Array('columnname'=>'vtiger_salesorder:sostatus:sostatus:SalesOrder_Status:V', + 'comparator'=>'e', + 'value'=>'Created, Approved' + ) + ) + + ); + +foreach($customviews as $key=>$customview) +{ + $queryid = insertCustomView($customview['viewname'],$customview['setdefault'],$customview['setmetrics'],$customview['cvmodule'],$customview['status'],$customview['userid']); + insertCvColumns($queryid,$cvcolumns[$key]); + + if(isset($cvstdfilters[$customview['stdfilterid']])) + { + $i = $customview['stdfilterid']; + insertCvStdFilter($queryid,$cvstdfilters[$i]['columnname'],$cvstdfilters[$i]['datefilter'],$cvstdfilters[$i]['startdate'],$cvstdfilters[$i]['enddate']); + } + if(isset($cvadvfilters[$customview['advfilterid']])) + { + insertCvAdvFilter($queryid,$cvadvfilters[$customview['advfilterid']]); + } +} + + /** to store the details of the customview in vtiger_customview table + * @param $viewname :: Type String + * @param $setdefault :: Type Integer + * @param $setmetrics :: Type Integer + * @param $cvmodule :: Type String + * @returns $customviewid of the stored custom view :: Type integer + */ +function insertCustomView($viewname,$setdefault,$setmetrics,$cvmodule,$status,$userid) +{ + global $adb; + + $genCVid = $adb->getUniqueID("vtiger_customview"); + + if($genCVid != "") + { + + $customviewsql = "insert into vtiger_customview(cvid,viewname,setdefault,setmetrics,entitytype,status,userid) values(?,?,?,?,?,?,?)"; + $customviewparams = array($genCVid, $viewname, $setdefault, $setmetrics, $cvmodule, $status, $userid); + $customviewresult = $adb->pquery($customviewsql, $customviewparams); + } + return $genCVid; +} + + /** to store the custom view columns of the customview in vtiger_cvcolumnlist table + * @param $cvid :: Type Integer + * @param $columnlist :: Type Array of columnlists + */ +function insertCvColumns($CVid,$columnslist) +{ + global $adb; + if($CVid != "") + { + for($i=0;$ipquery($columnsql, $columnparams); + } + } +} + + /** to store the custom view stdfilter of the customview in vtiger_cvstdfilter table + * @param $cvid :: Type Integer + * @param $filtercolumn($tablename:$columnname:$fieldname:$fieldlabel) :: Type String + * @param $filtercriteria(filter name) :: Type String + * @param $startdate :: Type String + * @param $enddate :: Type String + * returns nothing + */ +function insertCvStdFilter($CVid,$filtercolumn,$filtercriteria,$startdate,$enddate) +{ + global $adb; + if($CVid != "") + { + $stdfiltersql = "insert into vtiger_cvstdfilter(cvid,columnname,stdfilter,startdate,enddate) values (?,?,?,?,?)"; + $stdfilterparams = array($CVid, $filtercolumn, $filtercriteria, $startdate, $enddate); + $stdfilterresult = $adb->pquery($stdfiltersql, $stdfilterparams); + } +} + + /** to store the custom view advfilter of the customview in vtiger_cvadvfilter table + * @param $cvid :: Type Integer + * @param $filters :: Type Array('columnname'=>$tablename:$columnname:$fieldname:$fieldlabel,'comparator'=>$comparator,'value'=>$value) + * returns nothing + */ + +function insertCvAdvFilter($CVid,$filters) +{ + global $adb; + if($CVid != "") + { + $columnIndexArray = array(); + foreach($filters as $i=>$filter) + { + $advfiltersql = "insert into vtiger_cvadvfilter(cvid,columnindex,columnname,comparator,value) values (?,?,?,?,?)"; + $advfilterparams = array($CVid, $i, $filter['columnname'], $filter['comparator'], $filter['value']); + $advfilterresult = $adb->pquery($advfiltersql, $advfilterparams); + } + $conditionExpression = implode(' and ', $columnIndexArray); + $adb->pquery('INSERT INTO vtiger_cvadvfilter_grouping VALUES(?,?,?,?)', array(1, $CVid, '', $conditionExpression)); + } +} +?> diff --git a/modules/CustomView/Save.php b/modules/CustomView/Save.php new file mode 100644 index 0000000..4ee0d82 --- /dev/null +++ b/modules/CustomView/Save.php @@ -0,0 +1,341 @@ +id; + + if(isset($_REQUEST["setDefault"])) { + $setdefault = 1; + } else { + $setdefault = 0; + } + + if(isset($_REQUEST["setMetrics"])) { + $setmetrics = 1; + } else { + $setmetrics = 0; + } + + //$allKeys = array_keys($HTTP_POST_VARS); + //this is will cause only the chosen fields to be added to the vtiger_cvcolumnlist table + $allKeys = array_keys($_REQUEST); + + //<<<<<<>>>>>>>>> + for ($i=0;$i>>>>>>>> + + //<<<<<<>>>>>>>> + $std_filter_list = array(); + $stdfiltercolumn = $_REQUEST["stdDateFilterField"]; + $std_filter_list["columnname"] = $stdfiltercolumn; + $stdcriteria = $_REQUEST["stdDateFilter"]; + $std_filter_list["stdfilter"] = $stdcriteria; + $startdate = $_REQUEST["startdate"]; + $enddate = $_REQUEST["enddate"]; + if(empty($startdate) && empty($enddate)) { + unset($std_filter_list); + } else { + $dbCurrentDateTime = new DateTimeField(date('Y-m-d H:i:s')); + $startDateTime = new DateTimeField($startdate.' '. $dbCurrentDateTime->getDisplayTime()); + $endDateTime = new DateTimeField($enddate.' '. $dbCurrentDateTime->getDisplayTime()); + $std_filter_list["startdate"] = $startDateTime->getDBInsertDateValue(); + $std_filter_list["enddate"] = $endDateTime->getDBInsertDateValue(); + } + //<<<<<<>>>>>>>> + + //<<<<<<>>>>>>>> + $json = new Zend_Json(); + + $advft_criteria = $_REQUEST['advft_criteria']; + $advft_criteria = $json->decode($advft_criteria); + + $advft_criteria_groups = $_REQUEST['advft_criteria_groups']; + $advft_criteria_groups = $json->decode($advft_criteria_groups); + //<<<<<<>>>>>>> + + $moduleHandler = vtws_getModuleHandlerFromName($cvmodule,$current_user); + $moduleMeta = $moduleHandler->getMeta(); + $moduleFields = $moduleMeta->getModuleFields(); + if(!$cvid) { + $genCVid = $adb->getUniqueID("vtiger_customview"); + if($genCVid != "") { + $customviewsql = "INSERT INTO vtiger_customview(cvid, viewname, setdefault, setmetrics, entitytype, status, userid) + VALUES (?,?,?,?,?,?,?)"; + $customviewparams = array($genCVid, $viewname, 0, $setmetrics, $cvmodule, $status, $userid); + $customviewresult = $adb->pquery($customviewsql, $customviewparams); + $log->info("CustomView :: Save :: vtiger_customview created successfully"); + + if($setdefault == 1) { + $sql_result = $adb->pquery("SELECT * FROM vtiger_user_module_preferences WHERE userid = ? and tabid = ?",array($current_user->id, $cv_tabid)); + if($adb->num_rows($sql_result) > 0) { + $updatedefaultsql = "UPDATE vtiger_user_module_preferences SET default_cvid = ? WHERE userid = ? and tabid = ?"; + $updatedefaultresult = $adb->pquery($updatedefaultsql, array($genCVid, $current_user->id, $cv_tabid)); + } else { + $insertdefaultsql = "INSERT INTO vtiger_user_module_preferences(userid, tabid, default_cvid) values (?,?,?)"; + $insertdefaultresult = $adb->pquery($insertdefaultsql, array($userid, $cv_tabid, $genCVid)); + } + } else { + $sql_result = $adb->pquery("SELECT * FROM vtiger_user_module_preferences WHERE userid = ? and tabid = ?",array($current_user->id, $cv_tabid)); + if($adb->num_rows($sql_result) > 0) { + $deletedefaultsql = "DELETE FROM vtiger_user_module_preferences WHERE userid = ? and tabid = ?"; + $deletedefaultresult = $adb->pquery($deletedefaultsql, array($current_user->id, $cv_tabid)); + } + } + + $log->info("CustomView :: Save :: setdefault upated successfully"); + + if($customviewresult) { + if(isset($columnslist)) { + for($i=0;$ipquery($columnsql, $columnparams); + } + $log->info("CustomView :: Save :: vtiger_cvcolumnlist created successfully"); + if($std_filter_list["columnname"] !="") { + $stdfiltersql = "INSERT INTO vtiger_cvstdfilter(cvid,columnname,stdfilter,startdate,enddate) VALUES (?,?,?,?,?)"; + $stdfilterparams = array($genCVid, $std_filter_list["columnname"], $std_filter_list["stdfilter"], $adb->formatDate($std_filter_list["startdate"], true), $adb->formatDate($std_filter_list["enddate"], true)); + $stdfilterresult = $adb->pquery($stdfiltersql, $stdfilterparams); + $log->info("CustomView :: Save :: vtiger_cvstdfilter created successfully"); + } + + foreach($advft_criteria as $column_index => $column_condition) { + + if(empty($column_condition)) continue; + + $adv_filter_column = $column_condition["columnname"]; + $adv_filter_comparator = $column_condition["comparator"]; + $adv_filter_value = $column_condition["value"]; + $adv_filter_column_condition = $column_condition["columncondition"]; + $adv_filter_groupid = $column_condition["groupid"]; + + $column_info = explode(":",$adv_filter_column); + + $fieldName = $column_info[2]; + $fieldObj = $moduleFields[$fieldName]; + $fieldType = $fieldObj->getFieldDataType(); + + if($fieldType == 'currency') { + if($fieldObj->getUIType() == '71') { + $adv_filter_value = CurrencyField::convertToDBFormat($adv_filter_value, null, true); + } else { + $adv_filter_value = CurrencyField::convertToDBFormat($adv_filter_value); + } + } + + $temp_val = explode(",",$adv_filter_value); + if(($fieldType == 'date' || ($fieldType == 'time' && $fieldName != 'time_start' && $fieldName != 'time_end') || ($fieldType == 'datetime')) && ($fieldType != '' && $adv_filter_value != '' )) { + $val = Array(); + for($x=0;$xgetDBInsertDateTimeValue(); + } else { + $val[$x] = $date->getDBInsertTimeValue(); + } + } + } + $adv_filter_value = implode(",",$val); + } + + $irelcriteriasql = "INSERT INTO vtiger_cvadvfilter(cvid,columnindex,columnname,comparator,value,groupid,column_condition) values (?,?,?,?,?,?,?)"; + $irelcriteriaresult = $adb->pquery($irelcriteriasql, array($genCVid, $column_index, $adv_filter_column, $adv_filter_comparator, $adv_filter_value, $adv_filter_groupid, $adv_filter_column_condition)); + + // Update the condition expression for the group to which the condition column belongs + $groupConditionExpression = ''; + if(!empty($advft_criteria_groups[$adv_filter_groupid]["conditionexpression"])) { + $groupConditionExpression = $advft_criteria_groups[$adv_filter_groupid]["conditionexpression"]; + } + $groupConditionExpression = $groupConditionExpression .' '. $column_index .' '. $adv_filter_column_condition; + $advft_criteria_groups[$adv_filter_groupid]["conditionexpression"] = $groupConditionExpression; + } + + foreach($advft_criteria_groups as $group_index => $group_condition_info) { + + if(empty($group_condition_info)) continue; + if(empty($group_condition_info["conditionexpression"])) continue; // Case when the group doesn't have any column criteria + + $irelcriteriagroupsql = "insert into vtiger_cvadvfilter_grouping(groupid,cvid,group_condition,condition_expression) values (?,?,?,?)"; + $irelcriteriagroupresult = $adb->pquery($irelcriteriagroupsql, array($group_index, $genCVid, $group_condition_info["groupcondition"], $group_condition_info["conditionexpression"])); + } + $log->info("CustomView :: Save :: vtiger_cvadvfilter created successfully"); + } + } + $cvid = $genCVid; + } + } else { + if($is_admin == true || $current_user->id) { + $updatecvsql = "UPDATE vtiger_customview + SET viewname = ?, setmetrics = ?, status = ? WHERE cvid = ?"; + $updatecvparams = array($viewname, $setmetrics, $status, $cvid); + $updatecvresult = $adb->pquery($updatecvsql, $updatecvparams); + $log->info("CustomView :: Save :: vtiger_customview upated successfully".$cvid); + + if($setdefault == 1) { + $sql_result = $adb->pquery("SELECT * FROM vtiger_user_module_preferences WHERE userid = ? and tabid = ?",array($current_user->id, $cv_tabid)); + if($adb->num_rows($sql_result) > 0) { + $updatedefaultsql = "UPDATE vtiger_user_module_preferences SET default_cvid = ? WHERE userid = ? and tabid = ?"; + $updatedefaultresult = $adb->pquery($updatedefaultsql, array($cvid, $current_user->id, $cv_tabid)); + } else { + $insertdefaultsql = "INSERT INTO vtiger_user_module_preferences(userid, tabid, default_cvid) values (?,?,?)"; + $insertdefaultresult = $adb->pquery($insertdefaultsql, array($userid, $cv_tabid, $cvid)); + } + } else { + $sql_result = $adb->pquery("SELECT * FROM vtiger_user_module_preferences WHERE userid = ? and tabid = ?",array($current_user->id, $cv_tabid)); + if($adb->num_rows($sql_result) > 0) { + $deletedefaultsql = "DELETE FROM vtiger_user_module_preferences WHERE userid = ? and tabid = ?"; + $deletedefaultresult = $adb->pquery($deletedefaultsql, array($current_user->id, $cv_tabid)); + } + } + $log->info("CustomView :: Save :: setdefault upated successfully".$cvid); + + $deletesql = "DELETE FROM vtiger_cvcolumnlist WHERE cvid = ?"; + $deleteresult = $adb->pquery($deletesql, array($cvid)); + + $deletesql = "DELETE FROM vtiger_cvstdfilter WHERE cvid = ?"; + $deleteresult = $adb->pquery($deletesql, array($cvid)); + + $deletesql = "DELETE FROM vtiger_cvadvfilter WHERE cvid = ?"; + $deleteresult = $adb->pquery($deletesql, array($cvid)); + + $deletesql = "DELETE FROM vtiger_cvadvfilter_grouping WHERE cvid = ?"; + $deleteresult = $adb->pquery($deletesql, array($cvid)); + + $log->info("CustomView :: Save :: vtiger_cvcolumnlist,cvstdfilter,cvadvfilter,cvadvfilter_grouping deleted successfully before update".$genCVid); + + $genCVid = $cvid; + if($updatecvresult) { + if(isset($columnslist)) { + for($i=0;$ipquery($columnsql, $columnparams); + } + $log->info("CustomView :: Save :: vtiger_cvcolumnlist update successfully".$genCVid); + if($std_filter_list["columnname"] !="") { + $stdfiltersql = "INSERT INTO vtiger_cvstdfilter (cvid,columnname,stdfilter,startdate,enddate) VALUES (?,?,?,?,?)"; + $stdfilterparams = array($genCVid, $std_filter_list["columnname"], $std_filter_list["stdfilter"], $adb->formatDate($std_filter_list["startdate"], true), $adb->formatDate($std_filter_list["enddate"], true)); + $stdfilterresult = $adb->pquery($stdfiltersql, $stdfilterparams); + $log->info("CustomView :: Save :: vtiger_cvstdfilter update successfully".$genCVid); + } + + foreach($advft_criteria as $column_index => $column_condition) { + + if(empty($column_condition)) continue; + + $adv_filter_column = $column_condition["columnname"]; + $adv_filter_comparator = $column_condition["comparator"]; + $adv_filter_value = $column_condition["value"]; + $adv_filter_column_condition = $column_condition["columncondition"]; + $adv_filter_groupid = $column_condition["groupid"]; + + $column_info = explode(":",$adv_filter_column); + + $fieldName = $column_info[2]; + $fieldObj = $moduleFields[$fieldName]; + $fieldType = $fieldObj->getFieldDataType(); + + if($fieldType == 'currency') { + // Some of the currency fields like Unit Price, Total, Sub-total etc of Inventory modules, do not need currency conversion + if($fieldObj->getUIType() == '72') { + $adv_filter_value = CurrencyField::convertToDBFormat($adv_filter_value, null, true); + } else { + $adv_filter_value = CurrencyField::convertToDBFormat($adv_filter_value); + } + } + + $temp_val = explode(",",$adv_filter_value); + if(($fieldType == 'date' || ($fieldType == 'time' && $fieldName != 'time_start' && $fieldName != 'time_end') || ($fieldType == 'datetime')) && ($fieldType != '' && $adv_filter_value != '' )) { + $val = Array(); + for($x=0;$xgetDBInsertDateTimeValue(); + } else { + $val[$x] = $date->getDBInsertTimeValue(); + } + } + } + $adv_filter_value = implode(",",$val); + } + + $irelcriteriasql = "INSERT INTO vtiger_cvadvfilter(cvid,columnindex,columnname,comparator,value,groupid,column_condition) values (?,?,?,?,?,?,?)"; + $irelcriteriaresult = $adb->pquery($irelcriteriasql, array($genCVid, $column_index, $adv_filter_column, $adv_filter_comparator, $adv_filter_value, $adv_filter_groupid, $adv_filter_column_condition)); + + // Update the condition expression for the group to which the condition column belongs + $groupConditionExpression = ''; + if(!empty($advft_criteria_groups[$adv_filter_groupid]["conditionexpression"])) { + $groupConditionExpression = $advft_criteria_groups[$adv_filter_groupid]["conditionexpression"]; + } + $groupConditionExpression = $groupConditionExpression .' '. $column_index .' '. $adv_filter_column_condition; + $advft_criteria_groups[$adv_filter_groupid]["conditionexpression"] = $groupConditionExpression; + } + + foreach($advft_criteria_groups as $group_index => $group_condition_info) { + + if(empty($group_condition_info)) continue; + if(empty($group_condition_info["conditionexpression"])) continue; // Case when the group doesn't have any column criteria + + $irelcriteriagroupsql = "insert into vtiger_cvadvfilter_grouping(groupid,cvid,group_condition,condition_expression) values (?,?,?,?)"; + $irelcriteriagroupresult = $adb->pquery($irelcriteriagroupsql, array($group_index, $genCVid, $group_condition_info["groupcondition"], $group_condition_info["conditionexpression"])); + } + $log->info("CustomView :: Save :: vtiger_cvadvfilter update successfully".$cvid); + } + } + } + } +} + +header("Location: index.php?action=$return_action&parenttab=$parenttab&module=$cvmodule&viewname=$cvid"); +?> \ No newline at end of file diff --git a/modules/CustomView/SaveAction.php b/modules/CustomView/SaveAction.php new file mode 100644 index 0000000..0502631 --- /dev/null +++ b/modules/CustomView/SaveAction.php @@ -0,0 +1,52 @@ +pquery($customactionsql, $customactionparams); + if($customactionresult == false) + { + include('modules/Vtiger/header.php'); + $errormessage = "Error Message
    +
  • Error while inserting the record +

" ; + echo $errormessage; + + } + + }elseif($mode == "edit") + { + $updatecasql = "update vtiger_customaction set subject=?, content=? where cvid=?"; + $updatecaresult = $adb->pquery($updatecasql, array($subject, $body, $cvid)); + if($updatecaresult == false) + { + include('modules/Vtiger/header.php'); + $errormessage = "Error Message
    +
  • Error while inserting the record +

" ; + echo $errormessage; + } + } +} +header("Location: index.php?action=index&module=$cvmodule&viewname=$cvid"); +?> \ No newline at end of file diff --git a/modules/CustomView/SendMailAction.php b/modules/CustomView/SendMailAction.php new file mode 100644 index 0000000..7aa6f66 --- /dev/null +++ b/modules/CustomView/SendMailAction.php @@ -0,0 +1,172 @@ +getCustomActionDetails($viewid); + if(isset($CustomActionDtls)) + { + $subject = $CustomActionDtls["subject"]; + $contents = $CustomActionDtls["content"]; + } +} + +if(trim($subject) != "") +{ + if(isset($storearray) && $camodule != "") + { + foreach($storearray as $id) + { + if($id == '') continue; + if($camodule == "Contacts") + { + $sql="select * from vtiger_contactdetails inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid where vtiger_crmentity.deleted =0 and vtiger_contactdetails.contactid=?"; + $result = $adb->pquery($sql, array($id)); + $camodulerow = $adb->fetch_array($result); + if(isset($camodulerow)) + { + $emailid = $camodulerow["email"]; + $otheremailid = $camodulerow["otheremail"]; + $secondaryemail = $camodulerow["secondaryemail"]; + + if(trim($emailid) != "") + { + SendMailtoCustomView($camodule,$id,$emailid,$current_user->id,$subject,$contents); + }elseif(trim($otheremailid) != "") + { + SendMailtoCustomView($camodule,$id,$otheremailid,$current_user->id,$subject,$contents); + }elseif(trim($secondaryemail) != "") + { + SendMailtoCustomView($camodule,$id,$secondaryemail,$current_user->id,$subject,$contents); + } + else + { + $adb->println("There is no email id for this Contact. Please give any email id."); + } + } + + }elseif($camodule == "Leads") + { + $sql="select * from vtiger_leaddetails inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_leaddetails.leadid where vtiger_crmentity.deleted =0 and vtiger_leaddetails.leadid=?"; + $result = $adb->pquery($sql, array($id)); + $camodulerow = $adb->fetch_array($result); + if(isset($camodulerow)) + { + $emailid = $camodulerow["email"]; + $secondaryemail = $camodulerow["secondaryemail"]; + + if(trim($emailid) != "") + { + SendMailtoCustomView($camodule,$id,$emailid,$current_user->id,$subject,$contents); + } + elseif($trim($secondaryemail) != "") + { + SendMailtoCustomView($camodule,$id,$secondaryemail,$current_user->id,$subject,$contents); + } + else + { + $adb->println("There is no email id for this Lead. Please give any email id."); + } + } + }elseif($camodule == "Accounts") + { + $sql="select * from vtiger_account inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_account.accountid where vtiger_crmentity.deleted =0 and vtiger_account.accountid=?"; + $result = $adb->pquery($sql, array($id)); + $camodulerow = $adb->fetch_array($result); + if(isset($camodulerow)) + { + $emailid = $camodulerow["email1"]; + $otheremailid = $camodulerow["email2"]; + + if(trim($emailid) != "") + { + SendMailtoCustomView($camodule,$id,$emailid,$current_user->id,$subject,$contents); + } + elseif(trim($otheremailid) != "") + { + SendMailtoCustomView($camodule,$id,$otheremailid,$current_user->id,$subject,$contents); + } + else + { + $adb->println("There is no email id for this Account. Please give any email id."); + } + } + } + } + } +} + +function SendMailtoCustomView($module,$id,$to,$current_user_id,$subject,$contents) +{ + + require_once("modules/Emails/class.phpmailer.php"); + + $mail = new PHPMailer(); + + $mail->Subject = $subject; + $mail->Body = nl2br($contents); + $mail->IsSMTP(); + + if($current_user_id != '') + { + global $adb; + $sql = "select * from vtiger_users where id= ?"; + $result = $adb->pquery($sql, array($current_user_id)); + $from = $adb->query_result($result,0,'email1'); + $initialfrom = $adb->query_result($result,0,'user_name'); + } + global $adb; + $mailserverresult=$adb->pquery("select * from vtiger_systems where server_type=?", array('email')); + $mail_server = $adb->query_result($mailserverresult,0,'server'); + $mail_server_username = $adb->query_result($mailserverresult,0,'server_username'); + $mail_server_password = $adb->query_result($mailserverresult,0,'server_password'); + $smtp_auth = $adb->query_result($mailserverresult,0,'smtp_auth'); + + $adb->println("Mail Server Details : '".$mail_server."','".$mail_server_username."','".$mail_server_password."'"); + $_REQUEST['server']=$mail_server; + + $mail->Host = $mail_server; + $mail->SMTPAuth = $smtp_auth; + $mail->Username = $mail_server_username; + $mail->Password = $mail_server_password; + $mail->From = $from; + $mail->FromName = $initialfrom; + + $mail->AddAddress($to); + $mail->AddReplyTo($from); + $mail->WordWrap = 50; + + $mail->IsHTML(true); + $mail->AltBody = "This is the body in plain text for non-HTML mail clients"; + + $adb->println("Mail sending process : To => '".$to."', From => '".$from."'"); + if(!$mail->Send()) + { + $adb->println("(CustomView/SendMailAction.php) Error in Mail Sending : ".$mail->ErrorInfo); + $errormsg = "Mail Could not be sent..."; + } + else + { + $adb->println("(CustomView/SendMailAction.php) Mail has been Sent to => ".$to); + } + +} +header("Location: index.php?action=index&module=$camodule&viewname=$viewid"); +?> \ No newline at end of file diff --git a/modules/CustomView/index.php b/modules/CustomView/index.php new file mode 100644 index 0000000..1b6d929 --- /dev/null +++ b/modules/CustomView/index.php @@ -0,0 +1,17 @@ + diff --git a/modules/CustomView/language/de_de.lang.php b/modules/CustomView/language/de_de.lang.php new file mode 100644 index 0000000..f89c3a0 --- /dev/null +++ b/modules/CustomView/language/de_de.lang.php @@ -0,0 +1,276 @@ +'benutzerdefinierte Ansicht', + 'LBL_STEP_1_TITLE'=>'Information', + 'LBL_VIEW_NAME'=>'Name:', + 'LBL_SETDEFAULT'=>'als Vorgabe setzen', + 'LBL_LIST_IN_METRICS'=>'auf der Startseite anzeigen', + 'LBL_STEP_2_TITLE'=>'wähle Spalten', + 'LBL_STEP_3_TITLE'=>'Standardfilter', + 'LBL_STEP_4_TITLE'=>'erweiterte Filter', + 'LBL_STEP_5_TITLE'=>'Zugriffsinformation', + 'LBL_SF_COLUMNS'=>'Spalte', + 'LBL_SF_STARTDATE'=>'Startdatum', + 'LBL_SF_ENDDATE'=>'Enddatum', + 'LBL_AF_HDR1'=>'setze Suchbegriffe um die Ergebnisliste einzuschränken.', + 'LBL_AF_HDR2'=>'benutze "oder " Filter durch Eingabe mehrerer Einträge in der + dritten Spalte.', + 'LBL_AF_HDR3'=>'Sie können bis zu 10 durch Komma getrennte Werte eingeben. + Beispiel: Die Eingabe von SG, ZH, TG, AR sucht nach SG oder ZH oder TG oder AR.', + 'LBL_AF_HDR4'=>'Wenn Sie einen Aktivitätentyp ausgewählt haben, müssen Sie + "Anruf","Meeting" oder "Aufgabe" auswählen.', + + //strings added for vtiger 5, date format... + 'LBL_NONE'=>'Keine', + 'View_Name'=>'Namen sehen', + 'LBL_AND'=>'AND', + 'LBL_DATE_FORMAT_CUSTOMVIEW'=>'Y-m-d', + //Strings added for filter + 'Custom'=>'benutzerdefiniert', + 'Previous FY'=>'vorheriges Jahr', + 'Current FY'=>'dieses Jahr', + 'Next FY'=>'nächstes Jahr', + 'Previous FQ'=>'vorheriges Quartal', + 'Current FQ'=>'dieses Quartal', + 'Next FQ'=>'nächstes Quartal', + 'Yesterday'=>'gestern', + 'Today'=>'heute', + 'Tomorrow'=>'morgen', + 'Last Week'=>'letzte Woche', + 'Current Week'=>'diese Woche', + 'Next Week'=>'nächste Woche', + 'Last Month'=>'vorheriger Monat', + 'Current Month'=>'dieser Monat', + 'Next Month'=>'nächster Monat', + 'Last 7 Days'=>'letzten 7 Tage', + 'Last 30 Days'=>'letzten 30 Tage', + 'Last 60 Days'=>'letzten 60 Tage', + 'Last 90 Days'=>'letzten 90 Tage', + 'Last 120 Days'=>'letzten 120 Tage', + 'Next 30 Days'=>'nächsten 30 Tage', + 'Next 60 Days'=>'nächsten 60 Tage', + 'Next 90 Days'=>'nächsten 90 Tage', + 'Next 120 Days'=>'nächsten 120 Tage', + + 'equals'=>'gleich zu', + 'contains'=>'enthält', + 'does not contain'=>'enthält nicht', + 'less than'=>'weniger als', + 'greater than'=>'größer als', + 'less or equal'=>'weniger oder gleich zu', + 'greater or equal'=>'größer oder gleich zu', + + //Strings added to translate field label groups + 'Address'=>'Adresse', + 'Information'=>'Information', + 'Description'=>'Beschreibung', + 'Custom Information'=>'benutzerdefinierte Felder', + '- Event Information'=>'- Ereignisdetails', + '- Event Description'=>'- Ereignisbeschreibung', + '- Task Information'=>'- Aufgabeninformation', + '- Task Description'=>'- Aufgabenbeschreibung', + + //Strings added for helpdesk module fields + 'Title'=>'Titel', + 'Assigned To'=>'zuständig', + 'Related to'=>'bezogen auf', + 'Priority'=>'Priorität', + 'Product Name'=>'Produktname', + 'Severity'=>'Gewichtung', + 'Status'=>'Status', + 'Category'=>'Kategorie', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Attachment'=>'Anhang', + + //Strings added for Leads module fields + 'First Name'=>'Vorname', + 'Phone'=>'Telefon', + 'Last Name'=>'Nachname', + 'Company'=>'Unternehmen', + 'Lead Source'=>'Lead Quelle', + 'Website'=>'Webseite', + 'Industry'=>'Branche', + 'Lead Status'=>'Lead Status', + 'Annual Revenue'=>'Jahresumsatz', + 'Rating'=>'Bewertung', + 'No Of Employees'=>'Anzahl Mitarbeiter', + 'Street'=>'Straße', + 'Po Box'=>'Postfachnr.', + 'Postal Code'=>'PLZ', + 'City'=>'Ort', + 'Country'=>'Land', + 'State'=>'Bundesland', + + //Strings added for Accounts module fields + 'Account Name'=>'Organisation', + 'Ticker Symbol'=>'Org. Namenszusatz', + 'Other Phone'=>'weiteres Telefon', + 'Member Of'=>'Mitglied von', + 'Employees'=>'Mitarbeiter', + 'Other Email'=>'weitere E-Mail', + 'Ownership'=>'Eigentümer', + 'industry'=>'Branche', + 'SIC Code'=>'SIC Code', + 'Email Opt Out'=>'E-Mail Opt. aus', + 'Billing Address'=>'Rechnungsadresse Strasse', + 'Shipping Address'=>'Lieferadresse Strasse', + 'Shipping Po Box'=>'Lieferadresse Postfachnr.', + 'Billing Po Box'=>'Rechnungsadresse Postfachnr.', + 'Billing City'=>'Rechnungsadresse Ort', + 'Shipping City'=>'Lieferadresse Ort', + 'Billing State'=>'Rechnungsadresse Bundesland', + 'Shipping State'=>'Lieferadresse Bundesland', + 'Billing Code'=>'Rechnungsadresse PLZ', + 'Shipping Code'=>'Lieferadresse PLZ', + 'Shipping Country'=>'Lieferadresse Land', + 'Billing Country'=>'Rechnungsadresse Land', + + + //Strings added for Contacts module fields + + 'Office Phone'=>'Telefon Büro', + 'Home Phone'=>'Telefon privat', + 'Birthdate'=>'Geburtstag', + 'Reports To'=>'berichtet an', + 'Assistant Phone'=>'Telefon Assistent', + 'Do Not Call'=>'nicht anrufen', + 'Mailing Street'=>'Straße', + 'Other Street'=>'weitere Straße', + 'Mailing Po Box'=>'Postfach', + 'Other Po Box'=>'weitere Postfachnr.', + 'Mailing City'=>'Ort', + 'Other City'=>'weiterer Ort', + 'Mailing State'=>'Bundesland', + 'Other State'=>'weiteres Bundesland', + 'Mailing Zip'=>'PLZ', + 'Other Zip'=>'weitere PLZ', + 'Mailing Country'=>'Land', + 'Other Country'=>'weiteres Land', + + + //Strings added for Potential module fields + + 'Potential Name'=>'Potentialname', + 'Amount'=>'Betrag', + 'Expected Close Date'=>'erwarteter Abschluß', + 'Next Step'=>'nächster Schritt', + 'Sales Stage'=>'Verkaufsstufe', + 'Probability'=>'Wahrscheinlichkeit', + + + //Strings added for Quotes module fields + 'Subject'=>'Betreff', + 'Quote Stage'=>'Angebotsstufe', + 'Valid Till'=>'gültig bis', + 'Team'=>'Team', + 'Contact Name'=>'Person', + 'Carrier'=>'Transporteur', + 'Shipping'=>'Versand', + 'Inventory Manager'=>'Lagerhaltung', + + //Strings added for Sales Orders module fields + 'Customer No'=>'Kundennummer', + 'Quote Name'=>'Angebotsname', + 'Purchase Order'=>'Einkaufsbestellung', + 'Due Date'=>'fällig', + 'Pending'=>'unerledigt', + 'Sales Commission'=>'Provision', + 'Excise Duty'=>'Abgaben', + + //Strings added for Invoices module fields + 'Sales Order'=>'Verkaufsbestellung', + 'Invoice Date'=>'Rechnungsdatum', + + //Strings added for Product module fields + 'Product Active'=>'Produkt Aktiv', + 'Product Category'=>'Produktkategorie', + 'Sales Start Date'=>'Verkaufsstartdatum', + 'Sales End Date'=>'Verkaufsendedatum', + 'Support Start Date'=>'Support Startdatum', + 'Support Expiry Date'=>'Support Endedatum', + 'Vendor Name'=>'Lieferantenname', + 'Mfr PartNo'=>'Teilenummer des Herstellers', + 'Vendor PartNo'=>'Teilenummer des Lieferanten', + + 'Serial No'=>'Seriennummer', + 'Product Sheet'=>'Produktunterlagen', + 'GL Account'=>'FiBu Konto', + + //Strings added for Price book module fields + 'Price Book Name'=>'Preislistenname', + 'Active'=>'aktiv', + + //Strings added for tasks & events module fields + 'Start Date & Time'=>'Starttermin', + + //error message + 'Missing required fields'=>'Pflichtfelder nicht ausgefüllt', + //Strings added for campaigns + 'Campaign Name'=>'Kampagnenname', + 'Campaign Type'=>'Kampagnentyp', + 'Product'=>'Produkt', + 'Campaign Status'=>'Kampagnenstatus', + 'Expected Revenue'=>'erwarteter Umsatz', + 'Budget Cost'=>'Budget', + 'Actual Cost'=>'aktuelle Kosten', + 'Expected Response'=>'erwarteter Rücklauf', + 'Num Sent'=>'gesendete Anzahl', + 'Target Audience'=>'Zielgruppe', + 'TargetSize'=>'Größe der Zielgruppe', + 'Sponsor'=>'Sponsor', + 'Expected Sales Count'=>'erwartete Verkaufsmenge', + 'Expected Response Count'=>'erwartete Rücklaufmenge', + 'Expected ROI'=>'erwartetes ROI', + 'Actual Sales Count'=>'aktuelle Verkaufsmenge', + 'Actual Response Count'=>'aktuelle Rücklaufmenge', + 'Actual ROI'=>'aktuelles ROI', + + + + //Added for customview.tpl + + 'LBL_Select_a_Column'=>'Spalte auswählen', + 'Missing_required_fields'=>'Pflichtfelder nicht ausgefüllt', + 'Details'=>'Details', + 'New_Custom_View'=>'neue benutzerdefinierte Ansicht', + 'Edit_Custom_View'=>'Ansicht bearbeiten', + 'LBL_AF_HDR5'=>'Der einfache Zeitfilter erlaubt die Datenauswahl an Hand von + der Zeit der Erstellung oder der Zeit der Veränderung', + 'Select_Duration'=>'wähle Dauer', + 'Simple_Time_Filter'=>'einfacher Zeitfilter', + 'Start_Date'=>'Startdatum', + 'End_Date'=>'Endedatum', + 'LBL_RULE'=>'Regel', + + // Added/Updated for vtiger CRM 5.0.4 + 'not equal to'=>'nicht gleich zu', + 'starts with'=>'beginnt mit', + 'ends with'=>'endet mit', + //'Product Code'=>'Produktcode', + + // Added after 5.0.4 GA + + //Added for Role based Custom filters + 'LBL_SET_AS_PUBLIC'=>'öffentlich machen ', + 'LBL_NEW'=>'neu', + 'LBL_EDIT'=>'bearbeiten', + 'LBL_STATUS_PUBLIC_APPROVE'=>'bestätigen', + 'LBL_STATUS_PUBLIC_DENY'=>'ablehnen', + + 'LBL_ADVANCED_FILTER' => 'Regel', +); +?> \ No newline at end of file diff --git a/modules/CustomView/language/en_gb.lang.php b/modules/CustomView/language/en_gb.lang.php new file mode 100644 index 0000000..4757455 --- /dev/null +++ b/modules/CustomView/language/en_gb.lang.php @@ -0,0 +1,217 @@ + 'Custom View', + 'LBL_STEP_1_TITLE' => 'View Information', + 'LBL_VIEW_NAME' => 'View Name:', + 'LBL_SETDEFAULT' => 'Set as Default', + 'LBL_LIST_IN_METRICS' => 'List in Metrics', + 'LBL_STEP_2_TITLE' => 'Choose Columns', + 'LBL_STEP_3_TITLE' => 'Standard Filters', + 'LBL_STEP_4_TITLE' => 'Advanced Filters', + 'LBL_STEP_5_TITLE' => 'Access Information', + 'LBL_SF_COLUMNS' => 'Column', + 'LBL_SF_STARTDATE' => 'Start Date', + 'LBL_SF_ENDDATE' => 'End Date', + 'LBL_AF_HDR1' => 'Set the search conditions to further restrict the list.', + 'LBL_AF_HDR2' => 'You can use "or" filters by entering multiple items in the third column.', + 'LBL_AF_HDR3' => 'You can enter up to 10 items, separated by commas. For example: CA, NY, TX, FL searches for CA or NY or TX or FL.', + 'LBL_AF_HDR4' => 'If "Activity Type" is selected, provide any one of the following values "Call","Meeting" or "Task".', + 'LBL_NONE' => 'None', + 'View_Name' => 'View Name', + 'LBL_AND' => 'And', + 'LBL_DATE_FORMAT_CUSTOMVIEW' => 'Y-m-d', + 'Custom' => 'Custom', + 'Previous FY' => 'Previous FY', + 'Current FY' => 'Current FY', + 'Next FY' => 'Next FY', + 'Previous FQ' => 'Previous FQ', + 'Current FQ' => 'Current FQ', + 'Next FQ' => 'Next FQ', + 'Yesterday' => 'Yesterday', + 'Today' => 'Today', + 'Tomorrow' => 'Tomorrow', + 'Last Week' => 'Last Week', + 'Current Week' => 'Current Week', + 'Next Week' => 'Next Week', + 'Last Month' => 'Last Month', + 'Current Month' => 'Current Month', + 'Next Month' => 'Next Month', + 'Last 7 Days' => 'Last 7 Days', + 'Last 30 Days' => 'Last 30 Days', + 'Last 60 Days' => 'Last 60 Days', + 'Last 90 Days' => 'Last 90 Days', + 'Last 120 Days' => 'Last 120 Days', + 'Next 30 Days' => 'Next 30 Days', + 'Next 60 Days' => 'Next 60 Days', + 'Next 90 Days' => 'Next 90 Days', + 'Next 120 Days' => 'Next 120 Days', + 'equals' => 'equals', + 'contains' => 'Contains', + 'does not contain' => 'does not contain', + 'less than' => 'less than', + 'greater than' => 'greater than', + 'less or equal' => 'less or equal', + 'greater or equal' => 'greater or equal', + 'Address' => 'Address', + 'Information' => 'Information', + 'Description' => 'Description', + 'Custom Information' => 'Custom Information', + '- Event Information' => '- Event Information', + '- Event Description' => '- Event Description', + '- Task Information' => '- Task Information', + '- Task Description' => '- Task Description', + 'Title' => 'Title', + 'Assigned To' => 'Assigned To', + 'Related to' => 'Related to', + 'Priority' => 'Priority', + 'Product Name' => 'Product Name', + 'Severity' => 'Severity', + 'Status' => 'Status', + 'Category' => 'Category', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Attachment' => 'Attachment', + 'First Name' => 'First Name', + 'Phone' => 'Phone', + 'Last Name' => 'Last Name', + 'Company' => 'Company', + 'Lead Source' => 'Lead Source', + 'Website' => 'Website', + 'Industry' => 'Industry', + 'Lead Status' => 'Lead Status', + 'Annual Revenue' => 'Annual Revenue', + 'Rating' => 'Rating', + 'No Of Employees' => 'No of Employees', + 'Street' => 'Street', + 'Po Box' => 'PO Box', + 'Postal Code' => 'Postcode', + 'City' => 'City', + 'Country' => 'Country', + 'State' => 'County', + 'Account Name' => 'Organisation Name', + 'Ticker Symbol' => 'Ticker Symbol', + 'Other Phone' => 'Other Phone', + 'Member Of' => 'Member Of', + 'Employees' => 'Employees', + 'Other Email' => 'Other Email', + 'Ownership' => 'Ownership', + 'SIC Code' => 'SIC Code', + 'Email Opt Out' => 'Email Opt Out', + 'Billing Address' => 'Invoice Address', + 'Shipping Address' => 'Delivery Address', + 'Shipping Po Box' => 'Delivery PO Box', + 'Billing Po Box' => 'Invoice PO Box', + 'Billing City' => 'Invoice City', + 'Shipping City' => 'Delivery City', + 'Billing State' => 'Invoice County', + 'Shipping State' => 'Delivery County', + 'Billing Code' => 'Invoice Postcode', + 'Shipping Code' => 'Delivery Postcode', + 'Shipping Country' => 'Delivery Country', + 'Billing Country' => 'Invoice Country', + 'Office Phone' => 'Office Phone', + 'Home Phone' => 'Home Phone', + 'Birthdate' => 'Birthdate', + 'Reports To' => 'Reports To', + 'Assistant Phone' => 'Assistant Phone', + 'Do Not Call' => 'Do Not Call', + 'Mailing Street' => 'Delivery Street', + 'Other Street' => 'Invoice Street', + 'Mailing Po Box' => 'Delivery PO Box', + 'Other Po Box' => 'Invoice PO Box', + 'Mailing City' => 'Delivery City', + 'Other City' => 'Invoice City', + 'Mailing State' => 'Delivery County', + 'Other State' => 'Invoice County', + 'Mailing Zip' => 'Delivery Postcode', + 'Other Zip' => 'Invoice Postcode', + 'Mailing Country' => 'Delivery Country', + 'Other Country' => 'Invoice Country', + 'Potential Name' => 'Opportunity Name', + 'Amount' => 'Amount', + 'Expected Close Date' => 'Expected Close Date', + 'Next Step' => 'Next Step', + 'Sales Stage' => 'Sales Stage', + 'Probability' => 'Probability', + 'Subject' => 'Subject', + 'Quote Stage' => 'Quote Stage', + 'Valid Till' => 'Valid until', + 'Team' => 'Team', + 'Contact Name' => 'Contact Name', + 'Carrier' => 'Carrier', + 'Shipping' => 'Shipping', + 'Inventory Manager' => 'Inventory Manager', + 'Customer No' => 'Customer No.', + 'Quote Name' => 'Quote Name', + 'Purchase Order' => 'Purchase Order', + 'Due Date' => 'Due Date', + 'Pending' => 'Pending', + 'Sales Commission' => 'Sales Commission', + 'Excise Duty' => 'Excise Duty', + 'Sales Order' => 'Sales Order', + 'Invoice Date' => 'Invoice Date', + 'Product Active' => 'Product Active', + 'Product Category' => 'Product Category', + 'Sales Start Date' => 'Sales Start Date', + 'Sales End Date' => 'Sales End Date', + 'Support Start Date' => 'Support Start Date', + 'Support Expiry Date' => 'Support Expiry Date', + 'Vendor Name' => 'Vendor Name', + 'Mfr PartNo' => 'Mfr. Part No.', + 'Vendor PartNo' => 'Vendor Part No.', + 'Serial No' => 'Serial No.', + 'Product Sheet' => 'Product Sheet', + 'GL Account' => 'GL Account', + 'Price Book Name' => 'Price Book Name', + 'Active' => 'Active', + 'Start Date & Time' => 'Start Date & Time', + 'Missing required fields' => 'Missing required vtiger fields', + 'Campaign Name' => 'Campaign Name', + 'Campaign Type' => 'Campaign Type', + 'Product' => 'Product', + 'Campaign Status' => 'Campaign Status', + 'Expected Revenue' => 'Expected Revenue', + 'Budget Cost' => 'Budget Cost', + 'Actual Cost' => 'Actual Cost', + 'Expected Response' => 'Expected Response', + 'Num Sent' => 'Num Sent', + 'Target Audience' => 'Target Audience', + 'TargetSize' => 'Target Size', + 'Sponsor' => 'Sponsor', + 'Expected Sales Count' => 'Expected Sales Count', + 'Expected Response Count' => 'Expected Response Count', + 'Expected ROI' => 'Expected ROI', + 'Actual Sales Count' => 'Actual Sales Count', + 'Actual Response Count' => 'Actual Response Count', + 'Actual ROI' => 'Actual ROI', + 'LBL_Select_a_Column' => 'Select a Column', + 'Missing_required_fields' => 'Missing required fields', + 'Details' => 'Details', + 'New_Custom_View' => 'New Custom view', + 'Edit_Custom_View' => 'Edit Custom View', + 'LBL_AF_HDR5' => 'Simple Time Filter allows you to select date based on Organisation Created Time or Organisation Modified Time', + 'Select_Duration' => 'Select Duration', + 'Simple_Time_Filter' => 'Simple Time Filter', + 'Start_Date' => 'Start Date', + 'End_Date' => 'End Date', + 'LBL_RULE' => 'RULE', + 'not equal to' => 'Not equal to', + 'starts with' => 'Starts with', + 'ends with' => 'Ends with', + 'LBL_SET_AS_PUBLIC' => 'Set as Public ', + 'LBL_NEW' => 'New', + 'LBL_EDIT' => 'Edit', + 'LBL_STATUS_PUBLIC_APPROVE' => 'Approve', + 'LBL_STATUS_PUBLIC_DENY' => 'Deny', + 'LBL_ADVANCED_FILTER' => 'Rule', +); +?> \ No newline at end of file diff --git a/modules/CustomView/language/en_us.lang.php b/modules/CustomView/language/en_us.lang.php new file mode 100644 index 0000000..902ccd9 --- /dev/null +++ b/modules/CustomView/language/en_us.lang.php @@ -0,0 +1,287 @@ +'Custom View', +'LBL_STEP_1_TITLE'=>'View Information', +'LBL_VIEW_NAME'=>'View Name:', +'LBL_SETDEFAULT'=>'Set as Default', +'LBL_LIST_IN_METRICS'=>'List in Metrics', +'LBL_STEP_2_TITLE'=>'Choose Columns', +'LBL_STEP_3_TITLE'=>'Standard Filters', +'LBL_STEP_4_TITLE'=>'Advanced Filters', +'LBL_STEP_5_TITLE'=>'Access Information', +'LBL_SF_COLUMNS'=>'Column', +'LBL_SF_STARTDATE'=>'Start Date', +'LBL_SF_ENDDATE'=>'End Date', +'LBL_AF_HDR1'=>'Set the search conditions to further restrict the list.', +'LBL_AF_HDR2'=>'You can use "or" filters by entering multiple +items in the third column.', +'LBL_AF_HDR3'=>'You can enter up to 10 items, separated by commas. For +example: CA, NY, TX, FL searches for CA or NY or TX or FL.', +'LBL_AF_HDR4'=>'If "Activity Type" is selected, give any one of the +following values "Call","Meeting" or "Task".', + +//strings added for vtiger 5, date format... +'LBL_NONE'=>'None', +'View_Name'=>'View_Name', +'LBL_AND'=>'And', +'LBL_DATE_FORMAT_CUSTOMVIEW'=>'Y-m-d', +//Strings added for filter +'Custom'=>'Custom', +'Previous FY'=>'Previous FY', +'Current FY'=>'Current FY', +'Next FY'=>'Next FY', +'Previous FQ'=>'Previous FQ', +'Current FQ'=>'Current FQ', +'Next FQ'=>'Next FQ', +'Yesterday'=>'Yesterday', +'Today'=>'Today', +'Tomorrow'=>'Tomorrow', +'Last Week'=>'Last Week', +'Current Week'=>'Current Week', +'Next Week'=>'Next Week', +'Last Month'=>'Last Month', +'Current Month'=>'Current Month', +'Next Month'=>'Next Month', +'Last 7 Days'=>'Last 7 Days', +'Last 30 Days'=>'Last 30 Days', +'Last 60 Days'=>'Last 60 Days', +'Last 90 Days'=>'Last 90 Days', +'Last 120 Days'=>'Last 120 Days', +'Next 30 Days'=>'Next 30 Days', +'Next 60 Days'=>'Next 60 Days', +'Next 90 Days'=>'Next 90 Days', +'Next 120 Days'=>'Next 120 Days', + +'equals'=>'equals', +'contains'=>'Contains', +'does not contain'=>'does not contain', +'less than'=>'less than', +'greater than'=>'greater than', +'less or equal'=>'less or equal', +'greater or equal'=>'greater or equal', + +//Strings added to translate field label vtiger_groups +'Address'=>'Address', +'Information'=>'Information', +'Description'=>'Description', +'Custom Information'=>'Custom Information', +'- Event Information'=>'- Event Information', +'- Event Description'=>'- Event Description', +'- Task Information'=>'- Task Information', +'- Task Description'=>'- Task Description', + +//Strings added for helpdesk module fields +'Title'=>'Title', +'Assigned To'=>'Assigned To', +'Related to'=>'Related to', +'Priority'=>'Priority', +'Product Name'=>'Product Name', +'Severity'=>'Severity', +'Status'=>'Status', +'Category'=>'Category', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Attachment'=>'Attachment', + +//Strings added for Leads module fields +'First Name'=>'First Name', +'Phone'=>'Phone', +'Last Name'=>'Last Name', +'Company'=>'Company', +'Lead Source'=>'Lead Source', +'Website'=>'Website', +'Industry'=>'Industry', +'Lead Status'=>'Lead Status', +'Annual Revenue'=>'Annual Revenue', +'Rating'=>'Rating', +'No Of Employees'=>'No of Employees', +'Street'=>'Street', +'Po Box'=>'PO Box', +'Postal Code'=>'Postal Code', +'City'=>'City', +'Country'=>'Country', +'State'=>'State', + +//Strings added for Accounts module fields +'Account Name'=>'Organization Name', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Other Phone', +'Member Of'=>'Member Of', +'Employees'=>'Employees', +'Other Email'=>'Other Email', +'Ownership'=>'Ownership', +'industry'=>'industry', +'SIC Code'=>'SIC Code', +'Email Opt Out'=>'Email Opt Out', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Shipping Po Box'=>'Shipping PO Box', +'Billing Po Box'=>'Billing PO Box', +'Billing City'=>'Billing City', +'Shipping City'=>'Shipping City', +'Billing State'=>'Billing State', +'Shipping State'=>'Shipping State', +'Billing Code'=>'Billing Code', +'Shipping Code'=>'Shipping Code', +'Shipping Country'=>'Shipping Country', +'Billing Country'=>'Billing Country', + + +//Strings added for Contacts module fields + +'Office Phone'=>'Office Phone', +'Home Phone'=>'Home Phone', +'Birthdate'=>'Birthdate', +'Reports To'=>'Reports To', +'Assistant Phone'=>'Assistant Phone', +'Do Not Call'=>'Do Not Call', +'Mailing Street'=>'Mailing Street', +'Other Street'=>'Other Street', +'Mailing Po Box'=>'Mailing PO Box', +'Other Po Box'=>'Other PO Box', +'Mailing City'=>'Mailing City', +'Other City'=>'Other City', +'Mailing State'=>'Mailing State', +'Other State'=>'Other State', +'Mailing Zip'=>'Mailing Zip', +'Other Zip'=>'Other Zip', +'Mailing Country'=>'Mailing Country', +'Other Country'=>'Other Country', + + +//Strings added for Potential module fields + +'Potential Name'=>'Opportunity Name', +'Amount'=>'Amount', +'Expected Close Date'=>'Expected Close Date', +'Next Step'=>'Next Step', +'Sales Stage'=>'Sales Stage', +'Probability'=>'Probability', + + +//Strings added for Quotes module fields +'Subject'=>'Subject', +'Quote Stage'=>'Quote Stage', +'Valid Till'=>'Valid Till', +'Team'=>'Team', +'Contact Name'=>'Contact Name', +'Carrier'=>'Carrier', +'Shipping'=>'Shipping', +'Inventory Manager'=>'Inventory Manager', + +//Strings added for Sales Orders module fields +'Customer No'=>'Customer No', +'Quote Name'=>'Quote Name', +'Purchase Order'=>'Purchase Order', +'Due Date'=>'Due Date', +'Pending'=>'Pending', +'Sales Commission'=>'Sales Commission', +'Excise Duty'=>'Excise Duty', + +//Strings added for Invoices module fields +'Sales Order'=>'Sales Order', +'Invoice Date'=>'Invoice Date', + +//Strings added for Product module fields +'Product Active'=>'Product Active', +'Product Category'=>'Product Category', +'Sales Start Date'=>'Sales Start Date', +'Sales End Date'=>'Sales End Date', +'Support Start Date'=>'Support Start Date', +'Support Expiry Date'=>'Support Expiry Date', +'Vendor Name'=>'Vendor Name', +'Mfr PartNo'=>'Mfr PartNo', +'Vendor PartNo'=>'Vendor PartNo', + +'Serial No'=>'Serial No', +'Product Sheet'=>'Product Sheet', +'GL Account'=>'GL Organization', + +//Strings added for Price book module fields +'Price Book Name'=>'Price Book Name', +'Active'=>'Active', + +//Strings added for tasks & events module fields +'Start Date & Time'=>'Start Date & Time', + +//error message +'Missing required fields'=>'Missing required vtiger_fields', +//Strings added for campaigns +'Campaign Name'=>'Campaign Name', +'Campaign Type'=>'Campaign Type', +'Product'=>'Product', +'Campaign Status'=>'Campaign Status', +'Expected Revenue'=>'Expected Revenue', +'Budget Cost'=>'Budget Cost', +'Actual Cost'=>'Actual Cost', +'Expected Response'=>'Expected Response', +'Num Sent'=>'Num Sent', +'Target Audience'=>'Target Audience', +'TargetSize'=>'TargetSize', +'Sponsor'=>'Sponsor', +'Expected Sales Count'=>'Expected Sales Count', +'Expected Response Count'=>'Expected Response Count', +'Expected ROI'=>'Expected ROI', +'Actual Sales Count'=>'Actual Sales Count', +'Actual Response Count'=>'Actual Response Count', +'Actual ROI'=>'Actual ROI', + + + +//Added for customview.tpl + +'LBL_Select_a_Column'=>'Select a Column', +'Missing_required_fields'=>'Missing required fields', +'Details'=>'Details', +'New_Custom_View'=>'New Custom view', +'Edit_Custom_View'=>'Edit Custom View', +'LBL_AF_HDR5'=>'Simple Time Filter allows you to select date based on +Organization Created Time or Organization Modified Time', +'Select_Duration'=>'Select Duration', +'Simple_Time_Filter'=>'Simple Time Filter', +'Start_Date'=>'Start Date', +'End_Date'=>'End Date', +'LBL_RULE'=>'RULE', + +// Added/Updated for vtiger CRM 5.0.4 +'not equal to'=>'Not equal to', +'starts with'=>'Starts with', +'ends with'=>'Ends with', +//'Product Code'=>'Product Code', + +// Added after 5.0.4 GA + +//Added for Role based Custom filters +'LBL_SET_AS_PUBLIC'=>'Set as Public ', +'LBL_NEW'=>'New', +'LBL_EDIT'=>'Edit', +'LBL_STATUS_PUBLIC_APPROVE'=>'Approve', +'LBL_STATUS_PUBLIC_DENY'=>'Deny', + +'LBL_ADVANCED_FILTER' => 'Rule', +); +?> diff --git a/modules/CustomView/language/es_es.lang.php b/modules/CustomView/language/es_es.lang.php new file mode 100644 index 0000000..62be63e --- /dev/null +++ b/modules/CustomView/language/es_es.lang.php @@ -0,0 +1,284 @@ +'Vista personalizada', +'LBL_STEP_1_TITLE'=>'Ver la Información', +'LBL_VIEW_NAME'=>'Nombre de la Vista:', +'LBL_SETDEFAULT'=>'Fijar por defecto', +'LBL_LIST_IN_METRICS'=>'Listar en métricas', +'LBL_STEP_2_TITLE'=>'Elegir columnas', +'LBL_STEP_3_TITLE'=>'Filtros Estandar', +'LBL_STEP_4_TITLE'=>'Filtros Avanzados', +'LBL_STEP_5_TITLE'=>'Información de Acceso', +'LBL_SF_COLUMNS'=>'Columna', +'LBL_SF_STARTDATE'=>'Fecha de Inicio', +'LBL_SF_ENDDATE'=>'Vencimiento', +'LBL_AF_HDR1'=>'Fije las condiciones de la búsqueda para restringir la lista.', +'LBL_AF_HDR2'=>'Puede utilizar filtros "or" introduciendo varios elementos en el tercer campo.', +'LBL_AF_HDR3'=>'Puede incorporar hasta 10 artículos, separados por comas.', +'LBL_AF_HDR4'=>'Si "Evento" está selecionado, dele un valor de los siguientes "Llamada", "Reunión" o "Tarea"', + +//strings added for vtiger 5, date format... +'LBL_NONE'=>'Ninguno', +'View_Name'=>'Ver_Nombre', +'LBL_AND'=>'y', +'LBL_DATE_FORMAT_CUSTOMVIEW'=>'A-m-d', +//Strings added for filter +'Custom'=>'Personalizado', +'Previous FY'=>'Año Anterior', +'Current FY'=>'Año Actual', +'Next FY'=>'Año Siguiente', +'Previous FQ'=>'Cuatrimestre Anterior', +'Current FQ'=>'Cuatrimestre Actual', +'Next FQ'=>'Cuatrimestre Siguiente', +'Yesterday'=>'Ayer', +'Today'=>'Hoy', +'Tomorrow'=>'Mañana', +'Last Week'=>'Semana Anterior', +'Current Week'=>'Semana Actual', +'Next Week'=>'Semana Siguiente', +'Last Month'=>'Último Mes', +'Current Month'=>'Mes Actual', +'Next Month'=>'Mes Siguiente', +'Last 7 Days'=>'Últimos 7 Días', +'Last 30 Days'=>'Últimos 30 Días', +'Last 60 Days'=>'Últimos 60 Días', +'Last 90 Days'=>'Últimos 90 Días', +'Last 120 Days'=>'Últimos 120 Días', +'Next 30 Days'=>'Siguientes 30 Días', +'Next 60 Days'=>'Siguientes 60 Días', +'Next 90 Days'=>'Siguientes 90 Días', +'Next 120 Days'=>'Siguientes 120 Días', + +'equals'=>'iguales', +'contains'=>'Contiene', +'does not contain'=>'No contiene', +'less than'=>'menor que', +'greater than'=>'mayor que', +'less or equal'=>'menor o igual', +'greater or equal'=>'mayor o igual', + +//Strings added to translate field label vtiger_groups +'Address'=>'Dirección', +'Information'=>'Información', +'Description'=>'Descripción', +'Custom Information'=>'Información Personalizada', +'- Event Information'=>'- Información de Evento', +'- Event Description'=>'- Descripción de Evento', +'- Task Information'=>'- Información de Tarea', +'- Task Description'=>'- Descripción de Tarea', + +//Strings added for helpdesk module fields +'Title'=>'Asunto', +'Assigned To'=>'Asignado A', +'Related to'=>'Relacionado con', +'Priority'=>'Prioridad', +'Product Name'=>'Producto', +'Severity'=>'Urgencia', +'Status'=>'Estado', +'Category'=>'Categoria', +'Created Time'=>'Creado', +'Modified Time'=>'Modificado', +'Attachment'=>'Adjunto', + +//Strings added for Leads module fields +'First Name'=>'Nombre', +'Phone'=>'Teléfono', +'Last Name'=>'Apellidos', +'Company'=>'Cuenta', +'Lead Source'=>'Origen de Pre-Contacto', +'Website'=>'Página Web', +'Industry'=>'Industria', +'Lead Status'=>'Estado de Pre-Contacto', +'Annual Revenue'=>'Facturación Anual', +'Rating'=>'Importancia', +'No Of Employees'=>'Número de Empleados', +'Street'=>'Dirección', +'Po Box'=>'Apdo. de Correos', +'Postal Code'=>'Código Postal', +'City'=>'Población', +'Country'=>'País', +'State'=>'Provincia', + +//Strings added for Accounts module fields +'Account Name'=>'Cuenta', +'Ticker Symbol'=>'Abreviatura de bolsa', +'Other Phone'=>'Tel. Directo', +'Member Of'=>'Miembro de', +'Employees'=>'Empleados', +'Other Email'=>'Email (Otro)', +'Ownership'=>'Propietario', +'industry'=>'Actividad', +'SIC Code'=>'CIF', +'Email Opt Out'=>'No Enviar Email', +'Billing Address'=>'Dirección (Factura)', +'Shipping Address'=>'Dirección (Envío)', +'Shipping Po Box'=>'Apdo. de Correos (Envío)', +'Billing Po Box'=>'Apdo. de Correos (Factura)', +'Billing City'=>'Población (Factura)', +'Shipping City'=>'Población (Envío)', +'Billing State'=>'Provincia (Factura)', +'Shipping State'=>'Provincia (Envío)', +'Billing Code'=>'Código Postal (Factura)', +'Shipping Code'=>'Código Postal (Envío)', +'Shipping Country'=>'País (Envío)', +'Billing Country'=>'País (Factura)', + + +//Strings added for Contacts module fields + +'Office Phone'=>'Tel. Oficina', +'Home Phone'=>'Tel. Particular', +'Birthdate'=>'Cumpleaños', +'Reports To'=>'Informa a', +'Assistant Phone'=>'Teléfono de la Secretaria', +'Do Not Call'=>'No Llamar', +'Mailing Street'=>'Dirección (Envío)', +'Other Street'=>'Dirección (Otra)', +'Mailing Po Box'=>'Apdo. Postal (Envío)', +'Other Po Box'=>'Apdo. Postal (Otra)', +'Mailing City'=>'Población (Envío)', +'Other City'=>'Población (Otra)', +'Mailing State'=>'Provincia (Envío)', +'Other State'=>'Provincia (Otra)', +'Mailing Zip'=>'Código Postal (Envío)', +'Other Zip'=>'Código Postal (Otra)', +'Mailing Country'=>'País (Envío)', +'Other Country'=>'País (Otra)', + + +//Strings added for Potential module fields + +'Potential Name'=>'Nombre de Oportunidad', +'Amount'=>'Importe', +'Expected Close Date'=>'Fecha Estimada de Cierre', +'Next Step'=>'Siguiente Paso', +'Sales Stage'=>'Etapa de Venta', +'Probability'=>'Probabilidad', + + +//Strings added for Quotes module fields +'Subject'=>'Asunto', +'Quote Stage'=>'Etapa de Presupuesto', +'Valid Till'=>'Validez', +'Team'=>'Equipo', +'Contact Name'=>'Persona de Contacto', +'Carrier'=>'Transportista', +'Shipping'=>'Tipo de Envío', +'Inventory Manager'=>'Gestor de Inventario', + +//Strings added for Sales Orders module fields +'Customer No'=>'Nº de Cliente', +'Quote Name'=>'Nombre del Presupuesto', +'Purchase Order'=>'Orden de Compra', +'Due Date'=>'Fecha de Entrega', +'Pending'=>'Pendiente', +'Sales Commission'=>'Comisión de Venta', +'Excise Duty'=>'Arancel', + +//Strings added for Invoices module fields +'Sales Order'=>'Pedido', +'Invoice Date'=>'Fecha de Factura', + +//Strings added for Product module fields +'Product Active'=>'Producto Activo', +'Product Category'=>'Categoría de Producto', +'Sales Start Date'=>'Inicio de Comercialización', +'Sales End Date'=>'Fin de Comercialización', +'Support Start Date'=>'Inicio de Soporte', +'Support Expiry Date'=>'Fin de Soporte', +'Vendor Name'=>'Proveedor', +'Mfr PartNo'=>'Nº Fabricante', +'Vendor PartNo'=>'Nº Albarán', + +'Serial No'=>'Nº Serie', +'Product Sheet'=>'Hoja de Producto', +'GL Account'=>'Cuenta Contable', + +//Strings added for Price book module fields +'Price Book Name'=>'Tarifas', +'Active'=>'Activo', + +//Strings added for tasks & events module fields +'Start Date & Time'=>'Fecha de Inicio', + +//error message +'Missing required fields'=>'Faltan Campos Obligatorios', +//Strings added for campaigns +'Campaign Name'=>'Nombre de Campaña', +'Campaign Type'=>'Tipo de Campaña', +'Product'=>'Producto', +'Campaign Status'=>'Estado de la Campaña', +'Expected Revenue'=>'Beneficio Esperado', +'Budget Cost'=>'Coste Presupuestado', +'Actual Cost'=>'Coste', +'Expected Response'=>'Respuesta Esperada', +'Num Sent'=>'Nº Envío', +'Target Audience'=>'Público Objetivo', +'TargetSize'=>'Tamaño Objetivo', +'Sponsor'=>'Esponsor', +'Expected Sales Count'=>'Expectativas de Venta', +'Expected Response Count'=>'Respuesta Esperada', +'Expected ROI'=>'Expectativas de ROI', +'Actual Sales Count'=>'Ventas Reales', +'Actual Response Count'=>'Respuesta Real', +'Actual ROI'=>'ROI Real', + + + +//Added for customview.tpl + +'LBL_Select_a_Column'=>'Seleccione una Columna', +'Missing_required_fields'=>'Faltan Campos Obligatorios', +'Details'=>'Detalles', +'New_Custom_View'=>'Nueva Vista Personalizada', +'Edit_Custom_View'=>'Editar Vista Personalizada', +'LBL_AF_HDR5'=>'El Filtro de Tiempo permite seleccionar una fecha basándose en la fecha de Creación o', + +'Select_Duration'=>'Seleccionar Duración', +'Simple_Time_Filter'=>'Filtro de Tiempo Sencillo', +'Start_Date'=>'Inicio', +'End_Date'=>'Vencimiento', +'LBL_RULE'=>'REGLA', + +// Added/Updated for vtiger CRM 5.0.4 +'not equal to'=>'Distinto de', +'starts with'=>'Empieza con', +'ends with'=>'Termina en', +//'Product Code'=>'Código de Producto', + +// Added after 5.0.4 GA + +//Added for Role based Custom filters +'LBL_SET_AS_PUBLIC'=>'Hacer Público ', +'LBL_NEW'=>'Nuevo', +'LBL_EDIT'=>'Editar', +'LBL_STATUS_PUBLIC_APPROVE'=>'Aprobar', +'LBL_STATUS_PUBLIC_DENY'=>'Denegar', + +'LBL_ADVANCED_FILTER' => 'Regla', +); +?> diff --git a/modules/CustomView/language/es_mx.lang.php b/modules/CustomView/language/es_mx.lang.php new file mode 100644 index 0000000..e3bf9b7 --- /dev/null +++ b/modules/CustomView/language/es_mx.lang.php @@ -0,0 +1,285 @@ +'Vista personalizada', +'LBL_STEP_1_TITLE'=>'Ver la Información', +'LBL_VIEW_NAME'=>'Nombre de la Vista:', +'LBL_SETDEFAULT'=>'Fijar por defecto', +'LBL_LIST_IN_METRICS'=>'Listar en métricas', +'LBL_STEP_2_TITLE'=>'Elegir columnas', +'LBL_STEP_3_TITLE'=>'Filtros Estandar', +'LBL_STEP_4_TITLE'=>'Filtros Avanzados', +'LBL_STEP_5_TITLE'=>'Información de Acceso', +'LBL_SF_COLUMNS'=>'Columna', +'LBL_SF_STARTDATE'=>'Fecha de Inicio', +'LBL_SF_ENDDATE'=>'Vencimiento', +'LBL_AF_HDR1'=>'Fije las condiciones de la búsqueda para restringir la lista.', +'LBL_AF_HDR2'=>'Puede utilizar filtros "or" introduciendo varios elementos en el tercer campo.', +'LBL_AF_HDR3'=>'Puede incorporar hasta 10 artículos, separados por comas.', +'LBL_AF_HDR4'=>'Si "Evento" está selecionado, dele un valor de los siguientes "Llamada", "Reunión" o "Tarea"', + +//strings added for vtiger 5, date format... +'LBL_NONE'=>'Ninguno', +'View_Name'=>'Ver_Nombre', +'LBL_AND'=>'y', +'LBL_DATE_FORMAT_CUSTOMVIEW'=>'A-m-d', +//Strings added for filter +'Custom'=>'Personalizado', +'Previous FY'=>'Año Anterior', +'Current FY'=>'Año Actual', +'Next FY'=>'Año Siguiente', +'Previous FQ'=>'Cuatrimestre Anterior', +'Current FQ'=>'Cuatrimestre Actual', +'Next FQ'=>'Cuatrimestre Siguiente', +'Yesterday'=>'Ayer', +'Today'=>'Hoy', +'Tomorrow'=>'Mañana', +'Last Week'=>'Semana Anterior', +'Current Week'=>'Semana Actual', +'Next Week'=>'Semana Siguiente', +'Last Month'=>'Último Mes', +'Current Month'=>'Mes Actual', +'Next Month'=>'Mes Siguiente', +'Last 7 Days'=>'Últimos 7 Días', +'Last 30 Days'=>'Últimos 30 Días', +'Last 60 Days'=>'Últimos 60 Días', +'Last 90 Days'=>'Últimos 90 Días', +'Last 120 Days'=>'Últimos 120 Días', +'Next 30 Days'=>'Siguientes 30 Días', +'Next 60 Days'=>'Siguientes 60 Días', +'Next 90 Days'=>'Siguientes 90 Días', +'Next 120 Days'=>'Siguientes 120 Días', + +'equals'=>'iguales', +'contains'=>'Contiene', +'does not contain'=>'No contiene', +'less than'=>'menor que', +'greater than'=>'mayor que', +'less or equal'=>'menor o igual', +'greater or equal'=>'mayor o igual', + +//Strings added to translate field label vtiger_groups +'Address'=>'Dirección', +'Information'=>'Información', +'Description'=>'Descripción', +'Custom Information'=>'Información Personalizada', +'- Event Information'=>'- Información de Evento', +'- Event Description'=>'- Descripción de Evento', +'- Task Information'=>'- Información de Tarea', +'- Task Description'=>'- Descripción de Tarea', + +//Strings added for helpdesk module fields +'Title'=>'Asunto', +'Assigned To'=>'Asignado A', +'Related to'=>'Relacionado con', +'Priority'=>'Prioridad', +'Product Name'=>'Producto', +'Severity'=>'Importancia', +'Status'=>'Estado', +'Category'=>'Categoria', +'Created Time'=>'Creado', +'Modified Time'=>'Modificado', +'Attachment'=>'Adjunto', + +//Strings added for Leads module fields +'First Name'=>'Nombre', +'Phone'=>'Teléfono', +'Last Name'=>'Apellidos', +'Company'=>'Cuenta', +'Lead Source'=>'Origen de Prospecto', +'Website'=>'Página Web', +'Industry'=>'Industria', +'Lead Status'=>'Estado de Prospecto', +'Annual Revenue'=>'Facturación Anual', +'Rating'=>'Importancia', +'No Of Employees'=>'Número de Empleados', +'Street'=>'Dirección', +'Po Box'=>'Colonia', +'Postal Code'=>'Código Postal', +'City'=>'Deleg./Mpio.', +'Country'=>'País', +'State'=>'Estado', + +//Strings added for Accounts module fields +'Account Name'=>'Cuenta', +'Ticker Symbol'=>'Símbolo de bolsa', +'Other Phone'=>'Tel. Directo', +'Member Of'=>'Miembro de', +'Employees'=>'Empleados', +'Other Email'=>'Email (Otro)', +'Ownership'=>'Propietario', +'industry'=>'Actividad', +'SIC Code'=>'RFC', +'Email Opt Out'=>'No Enviar Email', +'Billing Address'=>'Dirección (Factura)', +'Shipping Address'=>'Dirección (Envío)', +'Shipping Po Box'=>'Colonia (Envío)', +'Billing Po Box'=>'Colonia (Factura)', +'Billing City'=>'Deleg./Mpio. (Factura)', +'Shipping City'=>'Deleg./Mpio. (Envío)', +'Billing State'=>'Estado (Factura)', +'Shipping State'=>'Estado (Envío)', +'Billing Code'=>'Código Postal (Factura)', +'Shipping Code'=>'Código Postal (Envío)', +'Shipping Country'=>'País (Envío)', +'Billing Country'=>'País (Factura)', + + +//Strings added for Contacts module fields + +'Office Phone'=>'Tel. Oficina', +'Home Phone'=>'Tel. Particular', +'Birthdate'=>'Cumpleaños', +'Reports To'=>'Informa a', +'Assistant Phone'=>'Teléfono de la Secretaria', +'Do Not Call'=>'No Llamar', +'Mailing Street'=>'Dirección (Envío)', +'Other Street'=>'Dirección (Otra)', +'Mailing Po Box'=>'Apdo. Postal (Envío)', +'Other Po Box'=>'Apdo. Postal (Otra)', +'Mailing City'=>'Deleg./Mpio. (Envío)', +'Other City'=>'Deleg./Mpio. (Otra)', +'Mailing State'=>'Estado (Envío)', +'Other State'=>'Estado (Otra)', +'Mailing Zip'=>'Código Postal (Envío)', +'Other Zip'=>'Código Postal (Otra)', +'Mailing Country'=>'País (Envío)', +'Other Country'=>'País (Otra)', + + +//Strings added for Potential module fields + +'Potential Name'=>'Nombre de Oportunidad', +'Amount'=>'Importe', +'Expected Close Date'=>'Fecha Estimada de Cierre', +'Next Step'=>'Siguiente Paso', +'Sales Stage'=>'Etapa de Venta', +'Probability'=>'Probabilidad', + + +//Strings added for Quotes module fields +'Subject'=>'Asunto', +'Quote Stage'=>'Etapa de Cotización', +'Valid Till'=>'Validez', +'Team'=>'Equipo', +'Contact Name'=>'Persona de Contacto', +'Carrier'=>'Transportista', +'Shipping'=>'Tipo de Envío', +'Inventory Manager'=>'Responsable de Inventario', + +//Strings added for Sales Orders module fields +'Customer No'=>'Nº de Cliente', +'Quote Name'=>'Nombre de la Cotización', +'Purchase Order'=>'Orden de Compra', +'Due Date'=>'Fecha de Entrega', +'Pending'=>'Pendiente', +'Sales Commission'=>'Comisión de Venta', +'Excise Duty'=>'Impuestos', + +//Strings added for Invoices module fields +'Sales Order'=>'Pedido', +'Invoice Date'=>'Fecha de Factura', + +//Strings added for Product module fields +'Product Active'=>'Producto Activo', +'Product Category'=>'Categoría de Producto', +'Sales Start Date'=>'Inicio de Comercialización', +'Sales End Date'=>'Fin de Comercialización', +'Support Start Date'=>'Inicio de Soporte', +'Support Expiry Date'=>'Fin de Soporte', +'Vendor Name'=>'Proveedor', +'Mfr PartNo'=>'Nº de Parte del Fabricante', +'Vendor PartNo'=>'Nº de Parte del Proveedor', + +'Serial No'=>'Nº Serie', +'Product Sheet'=>'Hoja de Producto', +'GL Account'=>'Cuenta Contable', + +//Strings added for Price book module fields +'Price Book Name'=>'Listas de precios', +'Active'=>'Activo', + +//Strings added for tasks & events module fields +'Start Date & Time'=>'Fecha de Inicio', + +//error message +'Missing required fields'=>'Faltan Campos Obligatorios', +//Strings added for campaigns +'Campaign Name'=>'Nombre de Campaña', +'Campaign Type'=>'Tipo de Campaña', +'Product'=>'Producto', +'Campaign Status'=>'Estado de la Campaña', +'Expected Revenue'=>'Beneficio Esperado', +'Budget Cost'=>'Costo Presupuestado', +'Actual Cost'=>'Costo Actual', +'Expected Response'=>'Respuesta Estimada', +'Num Sent'=>'Nº Envío', +'Target Audience'=>'Público Objetivo', +'TargetSize'=>'Tamaño Objetivo', +'Sponsor'=>'Patrocinador', +'Expected Sales Count'=>'Cuenta de Ventas Estimada', +'Expected Response Count'=>'Cuenta de Respuesta Estimada', +'Expected ROI'=>'Expectativas de ROI', +'Actual Sales Count'=>'Ventas Reales', +'Actual Response Count'=>'Respuesta Real', +'Actual ROI'=>'ROI Real', + + + +//Added for customview.tpl + +'LBL_Select_a_Column'=>'Seleccione una Columna', +'Missing_required_fields'=>'Faltan Campos Obligatorios', +'Details'=>'Detalles', +'New_Custom_View'=>'Nueva Vista Personalizada', +'Edit_Custom_View'=>'Editar Vista Personalizada', +'LBL_AF_HDR5'=>'El Filtro de Tiempo permite seleccionar una fecha basándose en la fecha de Creación o', + +'Select_Duration'=>'Seleccionar Duración', +'Simple_Time_Filter'=>'Filtro de Tiempo Sencillo', +'Start_Date'=>'Inicio', +'End_Date'=>'Vencimiento', +'LBL_RULE'=>'REGLA', + +// Added/Updated for vtiger CRM 5.0.4 +'not equal to'=>'no igual a', +'starts with'=>'Empieza con', +'ends with'=>'Termina en', +//'Product Code'=>'Código de Producto', + +// Added after 5.0.4 GA + +//Added for Role based Custom filters +'LBL_SET_AS_PUBLIC'=>'Hacer Público ', +'LBL_NEW'=>'Nuevo', +'LBL_EDIT'=>'Editar', +'LBL_STATUS_PUBLIC_APPROVE'=>'Aprobar', +'LBL_STATUS_PUBLIC_DENY'=>'Denegar', + +'LBL_ADVANCED_FILTER' => 'Regla', +); +?> diff --git a/modules/CustomView/language/fr_fr.lang.php b/modules/CustomView/language/fr_fr.lang.php new file mode 100644 index 0000000..7ff9f38 --- /dev/null +++ b/modules/CustomView/language/fr_fr.lang.php @@ -0,0 +1,219 @@ + 'Filtres', + 'LBL_STEP_1_TITLE' => 'Information', + 'LBL_VIEW_NAME' => 'Nom du filtre :', + 'LBL_SETDEFAULT' => 'Définir par défaut', + 'LBL_LIST_IN_METRICS' => 'Indicateur clé', + 'LBL_STEP_2_TITLE' => 'Sélectionner colonne', + 'LBL_STEP_3_TITLE' => 'Filtres standards', + 'LBL_STEP_4_TITLE' => 'Filtres avancés', + 'LBL_STEP_5_TITLE' => 'Information d\'accès', + 'LBL_SF_COLUMNS' => 'Colonne', + 'LBL_SF_STARTDATE' => 'Date de début', + 'LBL_SF_ENDDATE' => 'Date de fin', + 'LBL_AF_HDR1' => 'Définir les options de recherche.', + 'LBL_AF_HDR2' => 'Vous pouvez utiliser le filtre "or" en saisissant simplement plusieurs conditions.', + 'LBL_AF_HDR3' => 'Vous pouvez saisir jusqu\'à 10 conditions, séparées par des virgules. Par exemple : CA, NY, TX, FL pour rechercher CA ou NY ou TX ou FL.', + 'LBL_AF_HDR4' => 'Si \"Type d\'activité\" est sélectionné, donnez une de ces valeurs \"Call\",\"Meeting\" ou \"Task\".', + 'LBL_NONE' => 'Aucun', + 'View_Name' => 'Nom du filtre', + 'LBL_AND' => 'et', + 'LBL_DATE_FORMAT_CUSTOMVIEW' => 'd-m-Y', + 'Custom' => 'Personnalisé', + 'Previous FY' => 'Année précédente', + 'Current FY' => 'Cette année', + 'Next FY' => 'L\'année prochaine', + 'Previous FQ' => 'Premier trimestre, année précédente', + 'Current FQ' => 'Trimestre courant, année précédente', + 'Next FQ' => 'Prochain trimestre, année précédente', + 'Yesterday' => 'Hier', + 'Today' => 'Aujourd\'hui', + 'Tomorrow' => 'Demain', + 'Last Week' => 'La semaine dernière', + 'Current Week' => 'Cette semaine', + 'Next Week' => 'La semaine prochaine', + 'Last Month' => 'Le mois dernier', + 'Current Month' => 'Mois en cours', + 'Next Month' => 'Le mois prochain', + 'Last 7 Days' => 'Les 7 derniers jours', + 'Last 30 Days' => 'Les 30 derniers jours', + 'Last 60 Days' => 'Les 60 derniers jours', + 'Last 90 Days' => 'Les 90 derniers jours', + 'Last 120 Days' => 'Les 120 derniers jours', + 'Next 30 Days' => 'Les 30 prochains jours', + 'Next 60 Days' => 'Les 60 prochains jours', + 'Next 90 Days' => 'Les 90 prochains jours', + 'Next 120 Days' => 'Les 120 prochains jours', + 'equals' => 'égal', + 'contains' => 'Contient', + 'does not contain' => 'Ne contient pas', + 'less than' => 'Inférieur à', + 'greater than' => 'Supérieur à', + 'less or equal' => 'Inférieur ou égal', + 'greater or equal' => 'Supérieur ou égal', + 'Address' => 'Adresse', + 'Information' => 'Détail', + 'Description' => 'Description', + 'Custom Information' => 'Informations personnalisées', + '- Event Information' => '- Détail activité', + '- Event Description' => '- Description activité', + '- Task Information' => '- Détail tâche', + '- Task Description' => '- Description tâche', + 'Title' => 'Titre', + 'Assigned To' => 'Assigné à', + 'Related to' => 'Relatif à', + 'Priority' => 'Priorité', + 'Product Name' => 'Produit', + 'Severity' => 'Engagement', + 'Status' => 'Statut', + 'Category' => 'Catégorie', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Attachment' => 'Pièce jointe', + 'First Name' => 'Prénom', + 'Phone' => 'Téléphone', + 'Last Name' => 'Nom', + 'Company' => 'Société', + 'Lead Source' => 'Origine', + 'Website' => 'Site Web', + 'Industry' => 'Secteur', + 'Lead Status' => 'Statut', + 'Annual Revenue' => 'C.A. annuel', + 'Rating' => 'Evaluation', + 'No Of Employees' => 'Effectif', + 'Street' => 'Adresse', + 'Po Box' => 'Boite postale', + 'Postal Code' => 'Code postal', + 'City' => 'Ville', + 'Country' => 'Pays', + 'State' => 'Département', + 'Account Name' => 'Nom compte', + 'Ticker Symbol' => 'Symbole boursier', + 'Other Phone' => 'Téléphone (alt.)', + 'Member Of' => 'Filiale de', + 'Employees' => 'Effectif', + 'Other Email' => 'Autre email', + 'Ownership' => 'Propriétaire', + 'industry' => 'Secteur', + 'SIC Code' => 'Code APE', + 'Email Opt Out' => 'Ne pas contacter par email', + 'Billing Address' => 'Adresse (facturation)', + 'Shipping Address' => 'Adresse (livraison)', + 'Shipping Po Box' => 'Boite postale (livraison)', + 'Billing Po Box' => 'Boite postale (facturation)', + 'Billing City' => 'Ville (facturation)', + 'Shipping City' => 'Ville (livraison)', + 'Billing State' => 'Département (facturation)', + 'Shipping State' => 'Département (livraison)', + 'Billing Code' => 'Code postal (facturation)', + 'Shipping Code' => 'Code postal (livraison)', + 'Shipping Country' => 'Pays (livraison)', + 'Billing Country' => 'Pays (facturation)', + 'Office Phone' => 'Téléphone (bureau)', + 'Home Phone' => 'Téléphone (domicile)', + 'Birthdate' => 'Anniversaire', + 'Reports To' => 'Supérieur hiérarchique', + 'Assistant Phone' => 'Téléphone (assistant)', + 'Do Not Call' => 'Ne pas appleler', + 'Mailing Street' => 'Adresse', + 'Other Street' => 'Adresse (alt.)', + 'Mailing Po Box' => 'Boite postale', + 'Other Po Box' => 'Boite postale (alt.)', + 'Mailing City' => 'Ville', + 'Other City' => 'Ville (alt.)', + 'Mailing State' => 'Département', + 'Other State' => 'Département (alt.)', + 'Mailing Zip' => 'Code postal', + 'Other Zip' => 'Code postal (alt.)', + 'Mailing Country' => 'Pays', + 'Other Country' => 'Pays (alt.)', + 'Potential Name' => 'Objet', + 'Amount' => 'Montant', + 'Expected Close Date' => 'Echéance', + 'Next Step' => 'Etape suivante', + 'Sales Stage' => 'Phase vente', + 'Probability' => 'Probabilité', + 'Subject' => 'Objet', + 'Quote Stage' => 'Phase', + 'Valid Till' => 'Echeance', + 'Team' => 'Equipe', + 'Contact Name' => 'Contact', + 'Carrier' => 'Transporteur', + 'Shipping' => 'Livraison', + 'Inventory Manager' => 'Responsable produit', + 'Customer No' => 'Ref client', + 'Quote Name' => 'Objet', + 'Purchase Order' => 'Commande fournisseur', + 'Due Date' => 'Echéance', + 'Pending' => 'En attente', + 'Sales Commission' => 'Commission', + 'Excise Duty' => 'Remise', + 'Sales Order' => 'Bon de commande', + 'Invoice Date' => 'Date facturation', + 'Product Active' => 'Actif', + 'Product Category' => 'Catégorie', + 'Sales Start Date' => 'Mise en vente', + 'Sales End Date' => 'Fin de vente', + 'Support Start Date' => 'Début de support', + 'Support Expiry Date' => 'Date fin support', + 'Vendor Name' => 'Fournisseur', + 'Mfr PartNo' => 'Fournisseur pièce n°', + 'Vendor PartNo' => 'Fournisseur pièce n°', + 'Serial No' => 'N° de série', + 'Product Sheet' => 'Fiche produit', + 'GL Account' => 'Comptabilité', + 'Price Book Name' => 'Grille tarifaire', + 'Active' => 'Active', + 'Start Date & Time' => 'Date & heure de début', + 'Missing required fields' => 'Des champs requis n\'ont pas été remplis', + 'Campaign Name' => 'Objet', + 'Campaign Type' => 'Type', + 'Product' => 'Produit', + 'Campaign Status' => 'Statut', + 'Expected Revenue' => 'Revenus attendus', + 'Budget Cost' => 'Coût', + 'Actual Cost' => 'Coût actuel', + 'Expected Response' => 'Réponse attendue', + 'Num Sent' => 'Nombre d\'envois', + 'Target Audience' => 'Cible visée', + 'TargetSize' => 'Panel', + 'Sponsor' => 'Sponsor', + 'Expected Sales Count' => 'Ventes attendues', + 'Expected Response Count' => 'Réponses attendues', + 'Expected ROI' => 'ROI attendu', + 'Actual Sales Count' => 'Nb de ventes ', + 'Actual Response Count' => 'Nb de réponses', + 'Actual ROI' => 'ROI', + 'LBL_Select_a_Column' => 'Sélectionnez une colonne', + 'Missing_required_fields' => 'Champs requis manquants', + 'Details' => 'Détails', + 'New_Custom_View' => 'Nouveau filtre', + 'Edit_Custom_View' => 'Editer filtre', + 'LBL_AF_HDR5' => 'Le filtre basique sur le temps vous permet d\'effectuer des tris sur Les dates de création ou Les dates de modifications', + 'Select_Duration' => 'Sélectionnez durée', + 'Simple_Time_Filter' => 'Filtre de temps', + 'Start_Date' => 'Date de début', + 'End_Date' => 'Echéance', + 'LBL_RULE' => 'Règles', + 'not equal to' => 'Différent de', + 'starts with' => 'Commence par', + 'ends with' => 'Fini par', + 'LBL_SET_AS_PUBLIC' => 'Définir comme public ', + 'LBL_NEW' => 'Nouveau', + 'LBL_EDIT' => 'Editer', + 'LBL_STATUS_PUBLIC_APPROVE' => 'Accepter', + 'LBL_STATUS_PUBLIC_DENY' => 'Interdire', + 'LBL_ADVANCED_FILTER' => 'Règle', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/CustomView/language/hu_hu.lang.php b/modules/CustomView/language/hu_hu.lang.php new file mode 100644 index 0000000..b29dd1a --- /dev/null +++ b/modules/CustomView/language/hu_hu.lang.php @@ -0,0 +1,232 @@ + 'Egyedi nézet', + 'LBL_STEP_1_TITLE' => 'Nézet Információ', + 'LBL_VIEW_NAME' => 'Nézet neve:', + 'LBL_SETDEFAULT' => 'Alapértelmezettként beállít', + 'LBL_LIST_IN_METRICS' => 'Mérőszámok listája', + 'LBL_STEP_2_TITLE' => 'Válassz oszlopokat', + 'LBL_STEP_3_TITLE' => 'Standard Szűrők', + 'LBL_STEP_4_TITLE' => 'Haladó Szűrők', + 'LBL_STEP_5_TITLE' => 'Hozzáférés Információ', + 'LBL_SF_COLUMNS' => 'Oszlop', + 'LBL_SF_STARTDATE' => 'Kezdés Dátuma', + 'LBL_SF_ENDDATE' => 'Befejezés dátuma', + 'LBL_AF_HDR1' => 'Add meg a keresési feltételeket a lista további szűkítéséhez.', + 'LBL_AF_HDR2' => 'Használhatod az "or" (vagy) operátort, ha több értéket is akarsz a harmadik oszlopba írni.', + 'LBL_AF_HDR3' => 'Legfeljebb 10 tételt vesszővel elválasztva is megadhatsz. Például: CA, NY, TX, FL megadása esetén keresni fog CA vagy NY vagy TX vagy FL értékekre', + 'LBL_AF_HDR4' => 'Ha a "Tevékenység Típus"-t választod, akkor a következők valamelyik add meg "Call","Meeting" vagy "Task".', + 'LBL_NONE' => 'Nincs', + 'View_Name' => 'Nézet neve', + 'LBL_AND' => 'és', + 'LBL_DATE_FORMAT_CUSTOMVIEW' => 'É-h-n', + 'Custom' => 'Egyedi', + 'Previous FY' => 'Előző pü.Év', + 'Current FY' => 'Aktuális pü.Év', + 'Next FY' => 'Következő pü.Év', + 'Previous FQ' => 'Előző pü.nÉv', + 'Current FQ' => 'Aktuális pü.nÉv', + 'Next FQ' => 'Következő pü.nÉv', + 'Yesterday' => 'Tegnap', + 'Today' => 'Ma', + 'Tomorrow' => 'Holnap', + 'Last Week' => 'Elmúlt hét', + 'Current Week' => 'Aktuális hét', + 'Next Week' => 'Következő hét', + 'Last Month' => 'Elmúlt hónap', + 'Current Month' => 'Aktuális hónap', + 'Next Month' => 'Következő hónap', + 'Last 7 Days' => 'Elmúlt 7 nap', + 'Last 30 Days' => 'Elmúlt 30 nap', + 'Last 60 Days' => 'Elmúlt 60 nap', + 'Last 90 Days' => 'Elmúlt 90 nap', + 'Last 120 Days' => 'Elmúlt 120 nap', + 'Next 30 Days' => 'Következő 30 nap', + 'Next 60 Days' => 'Következő 60 nap', + 'Next 90 Days' => 'Következő 90 nap', + 'Next 120 Days' => 'Következő 120 nap', + 'equals' => 'egyenlő ezzel', + 'contains' => 'tartalmazza ezt', + 'does not contain' => 'nem tartalmazza ezt', + 'less than' => 'kisebb, mint ez', + 'greater than' => 'nagyobb, mint ez', + 'less or equal' => 'kisebb vagy egyenlő, mint ez', + 'greater or equal' => 'nagyobb vagy egyenlő, mint ez', + 'Address' => 'Cím', + 'Information' => 'Információ', + 'Description' => 'Megjegyzés', + 'Custom Information' => 'Egyedi Információ', + '- Event Information' => '- Esemény Információ', + '- Event Description' => '- Esemény Leírás', + '- Task Information' => '- Feladat Információ', + '- Task Description' => '- Feladat Leírás', + 'Title' => 'Megnevezés', + 'Assigned To' => 'Felelős', + 'Related to' => 'Kapcsolódik', + 'Priority' => 'Prioritás', + 'Product Name' => 'Termék neve', + 'Severity' => 'Komolyság', + 'Status' => 'Állapot', + 'Category' => 'Kategória', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Attachment' => 'Melléklet', + 'First Name' => 'Keresztnév', + 'Phone' => 'Telefon', + 'Last Name' => 'Vezetéknév', + 'Company' => 'Cég', + 'Lead Source' => 'Jelölt Forrás', + 'Website' => 'Weboldal', + 'Industry' => 'Iparág', + 'Lead Status' => 'Jelölt Állapot', + 'Annual Revenue' => 'Éves jövedelem', + 'Rating' => 'Értékelés', + 'No Of Employees' => 'Alkalmazottak száma', + 'Street' => 'Utca', + 'Po Box' => 'Postafiók', + 'Postal Code' => 'Irányítószám', + 'City' => 'Város', + 'Country' => 'Ország', + 'State' => 'Állam/megye', + 'Account Name' => 'Cég neve', + 'Ticker Symbol' => 'Tőzsdei rövidítés', + 'Other Phone' => 'Telefon, másik', + 'Member Of' => 'Tagja', + 'Employees' => 'Alkalmazottak', + 'Other Email' => 'Email cím, másik', + 'Ownership' => 'Tulajdonos', + 'SIC Code' => 'TEÁOR', + 'Email Opt Out' => 'Email leiratkozott', + 'Billing Address' => 'Számlázási cím - Utca', + 'Shipping Address' => 'Szállítási cím - Utca', + 'Shipping Po Box' => 'Szállítási cím - Postafiók', + 'Billing Po Box' => 'Számlázási cím - Postafiók', + 'Billing City' => 'Számlázási cím - Város', + 'Shipping City' => 'Szállítási cím - Város', + 'Billing State' => 'Számlázási cím - Állam/megye', + 'Shipping State' => 'Szállítási cím - Állam/megye', + 'Billing Code' => 'Számlázási cím - Irányítószám', + 'Shipping Code' => 'Szállítási cím - Irányítószám', + 'Shipping Country' => 'Szállítási cím - Ország', + 'Billing Country' => 'Számlázási cím - Ország', + 'Office Phone' => 'Telefon, irodai', + 'Home Phone' => 'Telefon, otthoni', + 'Birthdate' => 'Születésnap', + 'Reports To' => 'Jelent neki', + 'Assistant Phone' => 'Telefon, asszisztens', + 'Do Not Call' => 'Ne hívd', + 'Mailing Street' => 'Utca (Levelezés)', + 'Other Street' => 'Utca (másik)', + 'Mailing Po Box' => 'Postafiók (Levelezés)', + 'Other Po Box' => 'Postafiók (másik)', + 'Mailing City' => 'Város (Levelezés)', + 'Other City' => 'Város (másik)', + 'Mailing State' => 'Állam/megye (Levelezés)', + 'Other State' => 'Állam/megye (másik)', + 'Mailing Zip' => 'Írányítószám (Levelezés)', + 'Other Zip' => 'Írányítószám (másik)', + 'Mailing Country' => 'Ország (Levelezés)', + 'Other Country' => 'Ország (másik)', + 'Potential Name' => 'Lehetőség neve', + 'Amount' => 'Összeg', + 'Expected Close Date' => 'Várható lezárási dátum', + 'Next Step' => 'Következő lépés', + 'Sales Stage' => 'Értékesítési fázis', + 'Probability' => 'Valószínűség', + 'Subject' => 'Tárgy', + 'Quote Stage' => 'Ajánlati fázis', + 'Valid Till' => 'Érvényes eddig: ', + 'Team' => 'Csapat', + 'Contact Name' => 'Kapcsolat neve', + 'Carrier' => 'Futár', + 'Shipping' => 'Szállítás', + 'Inventory Manager' => 'Termelési menedzser', + 'Customer No' => 'Vevő száma', + 'Quote Name' => 'Ajánlat neve', + 'Purchase Order' => 'Beszerzések', + 'Due Date' => 'Határidő', + 'Pending' => 'Függőben', + 'Sales Commission' => 'Értékesítési jutalék', + 'Excise Duty' => 'Jövedéki adó', + 'Sales Order' => 'Megrendelés', + 'Invoice Date' => 'Díjbekérő dátuma', + 'Product Active' => 'Aktív Termék', + 'Product Category' => 'Termék kategória', + 'Sales Start Date' => 'Értékesítés kezdő dátuma', + 'Sales End Date' => 'Értékesítés befejező dátuma', + 'Support Start Date' => 'Támogatás kezdő dátuma', + 'Support Expiry Date' => 'Támogatás befejező dátuma', + 'Vendor Name' => 'Beszállító neve', + 'Mfr PartNo' => 'Mfr PartNo', + 'Vendor PartNo' => 'Beszállító PartNo', + 'Serial No' => 'Sorozat szám', + 'Product Sheet' => 'Termék adatlap', + 'GL Account' => 'Főkönyvi szám', + 'Price Book Name' => 'Csomagár megnevezése', + 'Active' => 'Aktív', + 'Start Date & Time' => 'Kezdés Dátuma és Ideje', + 'Missing required fields' => 'Hiányzó kötelező vtiger_fields (VTiger mezők)', + 'Campaign Name' => 'Kampány neve', + 'Campaign Type' => 'Kampány típusa', + 'Product' => 'Termék', + 'Campaign Status' => 'Kampány állapot', + 'Expected Revenue' => 'Várható jövedelem', + 'Budget Cost' => 'Tervezett költség', + 'Actual Cost' => 'Jelenlegi költség', + 'Expected Response' => 'Várható reakció', + 'Num Sent' => 'Küldött db', + 'Target Audience' => 'Célközönség', + 'TargetSize' => 'Cél méret', + 'Sponsor' => 'Szponzor', + 'Expected Sales Count' => 'Várható megrendelések száma', + 'Expected Response Count' => 'Várható visszajelzési darabszám', + 'Expected ROI' => 'Várható megtérülés', + 'Actual Sales Count' => 'Jelenleg: megrendelések száma', + 'Actual Response Count' => 'Jelenlegi visszajelzési darabszám', + 'Actual ROI' => 'Jelenlegi megtérülés', + 'LBL_Select_a_Column' => 'Válassz egy Oszlopot', + 'Missing_required_fields' => 'Hiányzó kötelező mezők', + 'Details' => 'Részletes adatok', + 'New_Custom_View' => 'Új Egyedi Nézet', + 'Edit_Custom_View' => 'Egyedi Nézet Szerkesztése', + 'LBL_AF_HDR5' => 'Az Egyszerű idő szűrő lehetővé teszi neked, hogy dátumokat válassz a Cég - Létrehozva: Idő vagy a Cég - Módosítva: Idő alapján.', + 'Select_Duration' => 'Válassz időtartamot', + 'Simple_Time_Filter' => 'Egyszerű idő szűrő', + 'Start_Date' => 'Kezdés Dátuma', + 'End_Date' => 'Befejezés dátuma', + 'LBL_RULE' => 'Szabály', + 'not equal to' => 'nem egyenlő ezzel', + 'starts with' => 'kezdődik ezzel', + 'ends with' => 'végződik ezzel', + 'LBL_SET_AS_PUBLIC' => 'Beállít, mint Nyilvános ', + 'LBL_NEW' => 'Új', + 'LBL_EDIT' => 'Szerkeszt', + 'LBL_STATUS_PUBLIC_APPROVE' => 'Elfogad', + 'LBL_STATUS_PUBLIC_DENY' => 'Visszautasít', + 'LBL_ADVANCED_FILTER' => 'Munkakör', + 'None' => 'üres', + 'yyyy-mm-dd' => 'éééé-hh-nn', + 'not_equal_to' => 'nem egyenlő', + 'starts_with' => 'ezzel kezdődik', + 'does_not_contain' => 'nem tartalmazza', + 'less_than' => 'kisebb mint', + 'greater_than' => 'nagyobb mint', + 'less_or_equal' => 'kisebb vagy egyenlő', + 'greater_or_equal' => 'nagyobb vagy egyenlő', + 'Product Code' => 'Termék kód' +); +?> \ No newline at end of file diff --git a/modules/CustomView/language/nl_nl.lang.php b/modules/CustomView/language/nl_nl.lang.php new file mode 100644 index 0000000..d2d738d --- /dev/null +++ b/modules/CustomView/language/nl_nl.lang.php @@ -0,0 +1,293 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.3 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/CustomView/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Standaard overzicht', +'LBL_STEP_1_TITLE'=>'Bekijk informatie', +'LBL_VIEW_NAME'=>'Bekijk naam:', +'LBL_SETDEFAULT'=>'Maak standaard', +'LBL_LIST_IN_METRICS'=>'Lijst van Kerngetallen', +'LBL_STEP_2_TITLE'=>'Kies kolommen', +'LBL_STEP_3_TITLE'=>'Standaard filters', +'LBL_STEP_4_TITLE'=>'Geavanceerde filters', +'LBL_STEP_5_TITLE'=>'Raadpleeg informatie', +'LBL_SF_COLUMNS'=>'Kolom', +'LBL_SF_STARTDATE'=>'Startdatum', +'LBL_SF_ENDDATE'=>'Einddatum', +'LBL_AF_HDR1'=>'Selecteer Zoek argumenten om de lijst gedetailleerder te maken.', +'LBL_AF_HDR2'=>'U kunt "+" en filters gebruiken door in de derde kolom trefwoorden in te voeren.', +'LBL_AF_HDR3'=>'U kunt tot 10 trefwoorden invoeren gescheiden door een komma.', +'LBL_AF_HDR4'=>'Als "Activiteit" is geselecteerd, kunt u verder kiezen uit "Telefoon","Vergadering" of "Taak".', + +//strings added for vtiger 5, date format... +'LBL_NONE'=>'Geen', +'View_Name'=>'Bekijk_naam', +'LBL_AND'=>'En', +'LBL_DATE_FORMAT_CUSTOMVIEW'=>'d-m-j', +//Strings added for filter +'Custom'=>'Standaard', +'Previous FY'=>'Vorige FJ', +'Current FY'=>'Huidige FJ', +'Next FY'=>'Volgende FJ', +'Previous FQ'=>'Vorige KWT', +'Current FQ'=>'Huidige KWT', +'Next FQ'=>'Volgende KWT', +'Yesterday'=>'Gisteren', +'Today'=>'Vandaag', +'Tomorrow'=>'Morgen', +'Last Week'=>'Verleden week', +'Current Week'=>'Deze week', +'Next Week'=>'Volgende week', +'Last Month'=>'Verleden maand', +'Current Month'=>'Deze maand', +'Next Month'=>'Volgende maand', +'Last 7 Days'=>'Laatste 7 dagen', +'Last 30 Days'=>'Laatste 30 dagen', +'Last 60 Days'=>'Laatste 60 dagen', +'Last 90 Days'=>'Laatste 90 dagen', +'Last 120 Days'=>'Laatste 120 dagen', +'Next 30 Days'=>'Volgende 30 dagen', +'Next 60 Days'=>'Volgende 60 dagen', +'Next 90 Days'=>'Volgende 90 dagen', +'Next 120 Days'=>'Volgende 120 dagen', + +'equals'=>'gelijk aan', +'not_equal_to'=>'niet gelijk aan', +'starts_with'=>'start met', +'contains'=>'bevat', +'does_not_contain'=>'bevat niet', +'less_than'=>'kleiner dan', +'greater_than'=>'groter dan', +'less_or_equal'=>'kleiner of gelijk', +'greater_or_equal'=>'groter of gelijk', + +//Strings added to translate field label groups +'Address'=>'Adres', +'Information'=>'Informatie', +'Description'=>'Omschrijving', +'Custom Information'=>'Standaard informatie', +'- Event Information'=>'- Activiteit informatie', +'- Event Description'=>'- Activiteit omschrijving', +'- Task Information'=>'- Taak informatie', +'- Task Description'=>'- Taak omschrijving', + +//Strings added for helpdesk module fields +'Title'=>'Titel', +'Assigned To'=>'Toegewezen aan', +'Related to'=>'Gerelateerd aan', +'Priority'=>'Prioriteit', +'Product Name'=>'Productnaam', +'Severity'=>'Striktheid', +'Status'=>'Status', +'Category'=>'Categorie', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', +'Attachment'=>'Bijlage', + +//Strings added for Leads module fields +'First Name'=>'Voornaam', +'Phone'=>'Telefoon', +'Last Name'=>'Achternaam', +'Company'=>'Bedrijf', +'Lead Source'=>'Lead bron', +'Website'=>'Website', +'Industry'=>'Industrie', +'Lead Status'=>'Lead status', +'Annual Revenue'=>'Jaarlijkse omzet', +'Rating'=>'Beoordeling', +'No Of Employees'=>'Aantal werknemers', +'Street'=>'Straat', +'Po Box'=>'Postbus', +'Postal Code'=>'Postcode', +'City'=>'Plaats', +'Country'=>'Land', +'State'=>'Provincie', + +//Strings added for Accounts module fields +'Account Name'=>'Accountnaam', +'Ticker Symbol'=>'Ticker Symbol', +'Other Phone'=>'Telefoon', +'Member Of'=>'Onderdeel van', +'Employees'=>'Werknemers', +'Other Email'=>'Prive e-mail', +'Ownership'=>'Eigenaar', +'industry'=>'Industrie', +'SIC Code'=>'SBI code', +'Email Opt Out'=>'E-mail optie uit', +'Billing Address'=>'Postadres straat', +'Shipping Address'=>'Afleveradres straat', +'Shipping Po Box'=>'Afleveradres Postcode', +'Billing Po Box'=>'Postadres Postbus', +'Billing City'=>'Postadres Plaats', +'Shipping City'=>'Afleveradres Plaats', +'Billing State'=>'Postadres Provincie', +'Shipping State'=>'Afleveradres Provincie', +'Billing Code'=>'Postadres Code', +'Shipping Code'=>'Afleveradres Code', +'Shipping Country'=>'Afleveradres Land', +'Billing Country'=>'Postadres Land', + + +//Strings added for Contacts module fields + +'Office Phone'=>'Telefoon Kantoor', +'Home Phone'=>'Telefoon Thuis', +'Birthdate'=>'Verjaardag', +'Reports To'=>'Rapporteert aan', +'Assistant Phone'=>'Telefoon assistent', +'Do Not Call'=>'Niet bellen', +'Mailing Street'=>'Postadres', +'Other Street'=>'Bezoekadres', +'Mailing Po Box'=>'Postbus', +'Other Po Box'=>'Bezoekadres postbus', +'Mailing City'=>'Postadres Plaats', +'Other City'=>'Bezoekadres Plaats', +'Mailing State'=>'Postadres Provincie', +'Other State'=>'Bezoekadres Provincie', +'Mailing Zip'=>'Postadres Postcode', +'Other Zip'=>'Bezoekadres Postcode', +'Mailing Country'=>'Postadres Land', +'Other Country'=>'Bezoekadres Land', + + +//Strings added for Potential module fields + +'Potential Name'=>'Verkoopkans naam', +'Amount'=>'Bedrag', +'Expected Close Date'=>'Verwachte sluitingsdatum', +'Next Step'=>'Volgende stap', +'Sales Stage'=>'Verkoopstadium', +'Probability'=>'Waarschijnlijkheid', + + +//Strings added for Quotes module fields +'Subject'=>'Onderwerp', +'Quote Stage'=>'Offerte stadium', +'Valid Till'=>'Geldig tot', +'Team'=>'Team', +'Contact Name'=>'Contactnaam', +'Carrier'=>'Vervoerder', +'Shipping'=>'Versturen', +'Inventory Manager'=>'Inventaris manager', + +//Strings added for Sales Orders module fields +'Customer No'=>'Klantnummer', +'Quote Name'=>'Offerte naam', +'Purchase Order'=>'Inkooporder', +'Due Date'=>'Vervaldatum', +'Pending'=>'In afwachting', +'Sales Commission'=>' Verkoop provisie', +'Excise Duty'=>'Accijnzen', // inland taxes + +//Strings added for Invoices module fields +'Sales Order'=>'Verkooporder', +'Invoice Date'=>'Factuurdatum', + +//Strings added for Product module fields +'Product Code'=>'Product code', +'Product Active'=>'Product actief', +'Product Category'=>'Product categorie', +'Sales Start Date'=>'Verkoop begindatum', +'Sales End Date'=>'Verkoop einddatum', +'Support Start Date'=>'Ondersteuning startdatum', +'Support Expiry Date'=>'Einddatum ondersteuning', +'Vendor Name'=>'Verkoper naam', +'Mfr PartNo'=>'Fabrikant partnummer', +'Vendor PartNo'=>'Leverancier partnummer', + +'Serial No'=>'Serienummer ', +'Product Sheet'=>'Productblad', +'GL Account'=>'Grootboekrekening', + +//Strings added for Price book module fields +'Price Book Name'=>'Naam prijzenboek', +'Active'=>'Actief', + +//Strings added for tasks & events module fields +'Start Date & Time'=>'Startdatum & tijd', + +//error message +'Missing required fields'=>'Niet alle velden zijn ingevuld', +//Strings added for campaigns +'Campaign Name'=>'Campagnenaam', +'Campaign Type'=>'Campagnetype', +'Product'=>'Product', +'Campaign Status'=>'Campagne status', +'Expected Revenue'=>'Verwachte omzet', +'Budget Cost'=>'Budget kosten', +'Actual Cost'=>'Actuele kosten', +'Expected Response'=>'Verwachte reactie', +'Num Sent'=>'Aantal verstuurd', +'Target Audience'=>'Doelgroep', +'TargetSize'=>'Omvang doelgroep', +'Sponsor'=>'Sponsor', +'Expected Sales Count'=>'Verwachte verkopen', +'Expected Response Count'=>'Verwachte reacties', +'Expected ROI'=>'Verwachte opbrengst', +'Actual Sales Count'=>'Actuele verkopen', +'Actual Response Count'=>'Actuele reacties', +'Actual ROI'=>'Actuele opbrengst', + + + +//Added for customview.tpl + +'LBL_Select_a_Column'=>'Selecteer een kolom', +'Missing_required_fields'=>'Niet alle velden zijn ingevuld', +'Details'=>'Details', +'New_Custom_View'=>'Nieuw standaard overzicht', +'Edit_Custom_View'=>'Verander overzicht', +'LBL_AF_HDR5'=>'De tijd filter geeft u de mogelijkheid om te zoeken op Account gemaakt op of Account gewijzigd op', +'Select_Duration'=>'Selecteer tijdsduur', +'Simple_Time_Filter'=>'Tijd filter', +'Start_Date'=>'Startdatum', +'End_Date'=>'Einddatum', +'LBL_RULE'=>'REGEL', + +/// Added/Updated for vtiger CRM 5.0.4 +'not equal to'=>'Niet gelijk aan', +'starts with'=>'begint met', +'ends with'=>'eindigt op', +//'Product Code'=>'Product Code', + +// Added after 5.0.4 GA + +//Added for Role based Custom filters +'LBL_SET_AS_PUBLIC'=>'Maak publiek toegankelijk ', +'LBL_NEW'=>'Nieuw', +'LBL_EDIT'=>'Bewerk', +'LBL_STATUS_PUBLIC_APPROVE'=>'Goedkeuren', +'LBL_STATUS_PUBLIC_DENY'=>'Verbieden', + +); +?> diff --git a/modules/CustomView/language/pt_br.lang.php b/modules/CustomView/language/pt_br.lang.php new file mode 100644 index 0000000..849d9f7 --- /dev/null +++ b/modules/CustomView/language/pt_br.lang.php @@ -0,0 +1,287 @@ +'Customizar Visualização', +'LBL_STEP_1_TITLE'=>'Dados Visualização', +'LBL_VIEW_NAME'=>'Nome Visualização:', +'LBL_SETDEFAULT'=>'Definir como Padrão', +'LBL_LIST_IN_METRICS'=>'Listar em Métricas', +'LBL_STEP_2_TITLE'=>'Selecionar Coluna', +'LBL_STEP_3_TITLE'=>'Filtros Padrões', +'LBL_STEP_4_TITLE'=>'Filtros Avançados', +'LBL_STEP_5_TITLE'=>'Informação Acesso', +'LBL_SF_COLUMNS'=>'Coluna', +'LBL_SF_STARTDATE'=>'Data Inicial', +'LBL_SF_ENDDATE'=>'Data Final', +'LBL_AF_HDR1'=>'Defina as condições da pesquisa para restringir melhor a lista.', +'LBL_AF_HDR2'=>'Você pode usar filtros "ou" entrar com múltiplos +itens na terceira coluna.', +'LBL_AF_HDR3'=>'Você pode entrar com mais de 10 itens, separados por vírgulas. Por +exemplo: PR, SP, MG, RS para procurar PR ou SP ou MG ou RS.', +'LBL_AF_HDR4'=>'Se "Tipo Atividade" for selecionado, atribua um dos +seguintes valores "Chamada", "Reunião" ou "Tarefa".', + +//strings added for vtiger 5, date format... +'LBL_NONE'=>'Nada', +'View_Name'=>'View_Name', +'LBL_AND'=>'E', +'LBL_DATE_FORMAT_CUSTOMVIEW'=>'Y-m-d', +//Strings added for filter +'Custom'=>'Customizar', +'Previous FY'=>'Ano Fiscal Anterior', +'Current FY'=>'Ano Fiscal Atual', +'Next FY'=>'Próxima Ano Fiscal', +'Previous FQ'=>'Trimestre Fiscal Anterior', +'Current FQ'=>'Trimestre Fiscal Atual', +'Next FQ'=>'Próximo Trimestre Fiscal', +'Yesterday'=>'Ontem', +'Today'=>'Hoje', +'Tomorrow'=>'Amanhã', +'Last Week'=>'Últma Semana', +'Current Week'=>'Semana Atual', +'Next Week'=>'Próxima Semana', +'Last Month'=>'Último Mês', +'Current Month'=>'Mês atual', +'Next Month'=>'Próximo Mês', +'Last 7 Days'=>'Últimos 7 Dias', +'Last 30 Days'=>'Últimos 30 Dias', +'Last 60 Days'=>'Últimos 60 Dias', +'Last 90 Days'=>'Últimos 90 Dias', +'Last 120 Days'=>'Últimos 120 Dias', +'Next 30 Days'=>'Próximos 30 Dias', +'Next 60 Days'=>'Próximos 60 Dias', +'Next 90 Days'=>'Próximos 90 Dias', +'Next 120 Days'=>'Próximos 120 Dias', + +'equals'=>'igual', +'contains'=>'Contem', +'does not contain'=>'não contem', +'less than'=>'menor que', +'greater than'=>'maior que', +'less or equal'=>'menor ou igual', +'greater or equal'=>'maior ou igual', + +//Strings added to translate field label vtiger_groups +'Address'=>'Endereço', +'Information'=>'Informação', +'Description'=>'Descrição', +'Custom Information'=>'Informação Customizada', +'- Event Information'=>'- Informação Evento', +'- Event Description'=>'- Descrição Evento', +'- Task Information'=>'- Informação Tarefa', +'- Task Description'=>'- Descrição Tarefa', + +//Strings added for helpdesk module fields +'Title'=>'Título', +'Assigned To'=>'Responsável', +'Related to'=>'Relacionado à', +'Priority'=>'Prioridade', +'Product Name'=>'Nome Produto', +'Severity'=>'Gravidade', +'Status'=>'Status', +'Category'=>'Categoria', +'Created Time'=>'Data Criação', +'Modified Time'=>'Data Modificação', +'Attachment'=>'Anexo', + +//Strings added for Leads module fields +'First Name'=>'Nome', +'Phone'=>'Fone', +'Last Name'=>'Sobrenome', +'Company'=>'Empresa', +'Lead Source'=>'Fonte Lead', +'Website'=>'Website', +'Industry'=>'Atividade', +'Lead Status'=>'Status Lead', +'Annual Revenue'=>'Receita Anual', +'Rating'=>'Avaliação', +'No Of Employees'=>'No. Empregados', +'Street'=>'Rua', +'Po Box'=>'Cx Postal', +'Postal Code'=>'CEP', +'City'=>'Cidade', +'Country'=>'País', +'State'=>'Estado', + +//Strings added for Accounts module fields +'Account Name'=>'Nome Organização', +'Ticker Symbol'=>'Cód. Bolsa', +'Other Phone'=>'Fone Alternativo', +'Member Of'=>'Membro de', +'Employees'=>'Empregados', +'Other Email'=>'Email Alternativo', +'Ownership'=>'Proprietário', +'industry'=>'atividade', +'SIC Code'=>'Cod CNAE', +'Email Opt Out'=>'Recusa Email', +'Billing Address'=>'Endereço Faturamento', +'Shipping Address'=>'Endereço Entrega', +'Shipping Po Box'=>'Cx Postal Entrega', +'Billing Po Box'=>'Cx Postal Faturamento', +'Billing City'=>'Cidade Faturamento', +'Shipping City'=>'Cidade Entrega', +'Billing State'=>'Estado Faturamento', +'Shipping State'=>'Estado Faturamento', +'Billing Code'=>'CEP Faturamento', +'Shipping Code'=>'CEP Entrega', +'Shipping Country'=>'País Entrega', +'Billing Country'=>'País Faturamento', + + +//Strings added for Contacts module fields + +'Office Phone'=>'Fone Escritório', +'Home Phone'=>'Fone Residencial', +'Birthdate'=>'Aniversário', +'Reports To'=>'Reporta-se à', +'Assistant Phone'=>'Fone Assistente', +'Do Not Call'=>'Recusa Chamada', +'Mailing Street'=>'Endereço Correspondência', +'Other Street'=>'Endereço Alternativo', +'Mailing Po Box'=>'Cx Postal Correspondência', +'Other Po Box'=>'Cx Postal Alternativo', +'Mailing City'=>'Cidade Correspondência', +'Other City'=>'Cidade Alternativo', +'Mailing State'=>'Estado Correspondência', +'Other State'=>'Estado Alternativo', +'Mailing Zip'=>'CEP Correspondência', +'Other Zip'=>'CEP Alternativo', +'Mailing Country'=>'País Correspondência', +'Other Country'=>'País Alternativo', + + +//Strings added for Potential module fields + +'Potential Name'=>'Nome Oportunidade', +'Amount'=>'Montante', +'Expected Close Date'=>'Data Prevista Fechamento', +'Next Step'=>'Próximo Passo', +'Sales Stage'=>'Estágio Vendas', +'Probability'=>'Probabilidade', + + +//Strings added for Quotes module fields +'Subject'=>'Assunto', +'Quote Stage'=>'Estágio Cotação', +'Valid Till'=>'Válido até', +'Team'=>'Equipe', +'Contact Name'=>'Nome Contato', +'Carrier'=>'Entregador', +'Shipping'=>'Entrega', +'Inventory Manager'=>'Almoxarife', + +//Strings added for Sales Orders module fields +'Customer No'=>'Cód. Cliente', +'Quote Name'=>'Nome Cotação', +'Purchase Order'=>'Pedido Compra', +'Due Date'=>'Data Vencimento', +'Pending'=>'Pendente', +'Sales Commission'=>'Comissão Vendas', +'Excise Duty'=>'IPI', + +//Strings added for Invoices module fields +'Sales Order'=>'Pedido Vendas', +'Invoice Date'=>'Data Fatura', + +//Strings added for Product module fields +'Product Active'=>'Produto Ativo', +'Product Category'=>'Categoria Produto', +'Sales Start Date'=>'Data Início Vendas', +'Sales End Date'=>'Data Final Vendas', +'Support Start Date'=>'Data Início Suporte', +'Support Expiry Date'=>'Data Final Suporte', +'Vendor Name'=>'Nome Fornecedor', +'Mfr PartNo'=>'Cód Fabricante', +'Vendor PartNo'=>'Cód Fornecedor', + +'Serial No'=>'No. Serial', +'Product Sheet'=>'Ficha Produto', +'GL Account'=>'Conta Plano Contas', + +//Strings added for Price book module fields +'Price Book Name'=>'Nome Lista Preço', +'Active'=>'Ativo', + +//Strings added for tasks & events module fields +'Start Date & Time'=>'Data & Hora Início', + +//error message +'Missing required fields'=>'vtiger_fields requeridos ausentes', +//Strings added for campaigns +'Campaign Name'=>'Nome Campanha', +'Campaign Type'=>'Tipo Campanha', +'Product'=>'Produto', +'Campaign Status'=>'Status Campanha', +'Expected Revenue'=>'Receita Esperada', +'Budget Cost'=>'Custo Orçado', +'Actual Cost'=>'Custo Atual', +'Expected Response'=>'Resposta Esperada', +'Num Sent'=>'Número Envio', +'Target Audience'=>'Público Alvo', +'TargetSize'=>'Tamanho Alvo', +'Sponsor'=>'Patrocinador', +'Expected Sales Count'=>'Previsão Vendas', +'Expected Response Count'=>'Previsão Resposta', +'Expected ROI'=>'Previsão ROI', +'Actual Sales Count'=>'Vendas Atual', +'Actual Response Count'=>'Resposta Atual', +'Actual ROI'=>'ROI Atual', + + + +//Added for customview.tpl + +'LBL_Select_a_Column'=>'Selecione uma Coluna', +'Missing_required_fields'=>'Campos requeridos ausentes', +'Details'=>'Detalhes', +'New_Custom_View'=>'Nova Visualização Customizada', +'Edit_Custom_View'=>'Editar Visualização Customizada', +'LBL_AF_HDR5'=>'O Filtro Simples de Data permite-lhe selecionar dados baseados na +Data Criação da Organização ou Data Modificação da Organização', +'Select_Duration'=>'Selecione Duração', +'Simple_Time_Filter'=>'Filtro Simples de Data', +'Start_Date'=>'Data Inicial', +'End_Date'=>'Data Final', +'LBL_RULE'=>'REGRA', + +// Added/Updated for vtiger CRM 5.0.4 +'not equal to'=>'Diferente de', +'starts with'=>'Início com', +'ends with'=>'Final com', +//'Product Code'=>'Product Code', + +// Added after 5.0.4 GA + +//Added for Role based Custom filters +'LBL_SET_AS_PUBLIC'=>'Definir como Público', +'LBL_NEW'=>'Novo', +'LBL_EDIT'=>'Editar', +'LBL_STATUS_PUBLIC_APPROVE'=>'Aprovar', +'LBL_STATUS_PUBLIC_DENY'=>'Negar', + +'LBL_ADVANCED_FILTER' => 'Regra', +); +?> diff --git a/modules/CustomView/language/zh_cn.lang.php b/modules/CustomView/language/zh_cn.lang.php new file mode 100644 index 0000000..a1db287 --- /dev/null +++ b/modules/CustomView/language/zh_cn.lang.php @@ -0,0 +1,281 @@ + '自定义视图', +'LBL_STEP_1_TITLE' => '视图信息', +'LBL_VIEW_NAME' => '视图名称:', +'LBL_SETDEFAULT' => '设为默认', +'LBL_LIST_IN_METRICS' => '在首页关键指标显示', +'LBL_STEP_2_TITLE' => '选择字段', +'LBL_STEP_3_TITLE' => '基本查询', +'LBL_STEP_4_TITLE' => '高级查询', +'LBL_STEP_5_TITLE' => '存取信息', +'LBL_SF_COLUMNS' => '字段', +'LBL_SF_STARTDATE' => '开始日期', +'LBL_SF_ENDDATE' => '结束日期', +'LBL_AF_HDR1' => '设定查询条件来缩小范围', +'LBL_AF_HDR2' => '您可以在第三个字段输入多个查询条件,用","分隔查询条件。 例如NH,OSSEZ,北京会尝试搜寻NH或OSSEZ或北京。', +'LBL_AF_HDR3' => '您最多可以输入10个项目,以逗号分隔。例如CA,NY,TX,FL会尝试搜寻CA或NY或TX或FL。', +'LBL_AF_HDR4' => '如果选择了"活动类型",请输入 "Call"、"Meeting" 或是 "Task"。', + +//strings added for vtiger 5, date format... +'LBL_NONE' => '无', +'View_Name' => '视图名称', +'LBL_AND' => 'AND', +'LBL_DATE_FORMAT_CUSTOMVIEW' => '年-月-日', +//Strings added for filter +'Custom' => '自定义', +'Previous FY' => '上财年', +'Current FY' => '本财年', +'Next FY' => '下财年', +'Previous FQ' => '上财季', +'Current FQ' => '本财季', +'Next FQ' => '下财季', +'Yesterday' => '昨天', +'Today' => '今天', +'Tomorrow' => '明天', +'Last Week' => '上周', +'Current Week' => '本周', +'Next Week' => '下周', +'Last Month' => '上月', +'Current Month' => '本月', +'Next Month' => '下月', +'Last 7 Days' => '过去 7 天', +'Last 30 Days' => '过去 30 天', +'Last 60 Days' => '过去 60 天', +'Last 90 Days' => '过去 90 天', +'Last 120 Days' => '过去 120 天', +'Next 7 Days' => '未来 7 天', +'Next 30 Days' => '未来 30 天', +'Next 60 Days' => '未来 60 天', +'Next 90 Days' => '未来 90 天', +'Next 120 Days' => '未来 120 天', + +'equals' => '等于', +'not_equal_to' => '不等于', +'starts_with' => '开始于', +'contains' => '包含', +'does_not_contain' => '不包含', +'less_than' => '少于', +'greater_than' => '大于', +'less_or_equal' => '少于或等于', +'greater_or_equal' => '大于或等于', + +//Strings added to translate field label vtiger_groups +'Address' => '地址', +'Information' => '信息', +'Description' => '描述', +'Custom Information' => '自定义信息', +'- Event Information' => '- 事件信息', +'- Event Description' => '- 事件描述', +'- Task Information' => '- 任务信息', +'- Task Description' => '- 任务描述', + +//Strings added for helpdesk module fields +'Title' => '标题', +'Assigned To' => '负责人', +'Related to' => '关联于', +'Priority' => '优先级', +'Product Name' => '产品名称', +'Severity' => '严重程度', +'Status' => '状态', +'Category' => '类别', +'Created Time' => '创建时间', +'Modified Time' => '修改时间', +'Attachment' => '附件', + +//Strings added for Leads module fields +'First Name' => '英文名', +'Phone' => '电话', +'Last Name' => '姓名', +'Company' => '公司', +'Lead Source' => '潜在客户来源', +'Website' => '网站', +'Industry' => '行业', +'Lead Status' => '潜在客户状态', +'Annual Revenue' => '年营业额', +'Rating' => '评价', +'No Of Employees' => '员工数', +'Street' => '邮寄地址', +'Po Box' => '邮政信箱', +'Postal Code' => '邮政编码', +'City' => '城市', +'Country' => '国家', +'State' => '省份', + +//Strings added for Accounts module fields +'Account Name' => '客户名称', +'Ticker Symbol' => '股票代码', +'Other Phone' => '其它电话', +'Member Of' => '上级单位', +'Employees' => '员工数', +'Other Email' => '其它Email', +'Ownership' => '所有制', +'industry' => '行业', +'SIC Code' => '行业编码', +'Email Opt Out' => '拒绝邮件打扰', +'Billing Address' => '付款地址', +'Shipping Address' => '收货地址', +'Shipping Po Box' => '收货邮政信箱', +'Billing Po Box' => '付款邮政信箱', +'Billing City' => '付款城市', +'Shipping City' => '收货城市', +'Billing State' => '付款省份', +'Shipping State' => '收货省份', +'Billing Code' => '付款邮政编码', +'Shipping Code' => '收货邮政编码', +'Shipping Country' => '收货国家', +'Billing Country' => '付款国家', + + +//Strings added for Contacts module fields + + 'Office Phone' => '办公室电话', +'Home Phone' => '家庭电话', +'Birthdate' => '生日', +'Reports To' => '经理', +'Assistant Phone' => '助理电话', +'Do Not Call' => '拒绝电话打扰', +'Mailing Street' => '邮寄地址', +'Other Street' => '其它邮寄地址', +'Mailing Po Box' => '邮政信箱', +'Other Po Box' => '其他邮政信箱', +'Mailing City' => '城市', +'Other City' => '城市', +'Mailing State' => '省份', +'Other State' => '省份', +'Mailing Zip' => '邮政编码', +'Other Zip' => '邮政编码', +'Mailing Country' => '国家', +'Other Country' => '国家', + + +//Strings added for Potential module fields + + 'Potential Name' => '销售机会名称', +'Amount' => '金额', +'Expected Close Date' => '预期完成日期', +'Next Step' => '下一步', +'Sales Stage' => '销售阶段', +'Probability' => '可能性', + + +//Strings added for Quotes module fields + 'Subject' => '主题', +'Quote Stage' => '报价单状态', +'Valid Till' => '有效日期', +'Team' => '团队', +'Contact Name' => '联系人名称', +'Carrier' => '物流公司', +'Shipping' => '运费', +'Inventory Manager' => '库存经理', + +//Strings added for Sales Orders module fields +'Customer No' => '客户编号', +'Quote Name' => '报价单名称', +'Purchase Order' => '采购订单', +'Due Date' => '交付日期', +'Pending' => '待定', +'Sales Commission' => '佣金率', +'Excise Duty' => '关税', + +//Strings added for Invoices module fields +'Sales Order' => '销售订单', +'Invoice Date' => '发货日期', + +//Strings added for Product module fields +'Product Code' => '产品代号', +'Product Active' => '产品状态', +'Product Category' => '产品类别', +'Sales Start Date' => '开始销售日期', +'Sales End Date' => '结束销售日期', +'Support Start Date' => '售后服务开始日期', +'Support Expiry Date' => '售后服务结束日期', +'Vendor Name' => '供应商名称', +'Mfr PartNo' => '生产厂家部件编号', +'Vendor PartNo' => '供应商部件编号', + +'Serial No' => '序列号', +'Product Sheet' => '产品型录', +'GL Account' => '会计科目', + +//Strings added for Price book module fields +'Price Book Name' => '价格表名称', +'Active' => '启用', + +//Strings added for tasks & events module fields +'Start Date & Time' => '开始日期与时间', + +//error message +'Missing required fields' => '必填字段为空', +//Strings added for campaigns +'Campaign Name' => '营销活动', +'Campaign Type' => '营销活动类型', +'Product' => '产品', +'Campaign Status' => '活动状态', +'Expected Revenue' => '预期收益', +'Budget Cost' => '成本预算', +'Actual Cost' => '实际成本', +'Expected Response' => '预期反应', +'Num Sent' => '寄送数量', +'Target Audience' => '目标族群', +'TargetSize' => '目标规模', +'Sponsor' => '主办方', +'Expected Sales Count' => '预期销售数量', +'Expected Response Count' => '预期回应数量', +'Expected ROI' => '预期回报率', +'Actual Sales Count' => '实际销售数量', +'Actual Response Count' => '实际回应数量', +'Actual ROI' => '实际回报率', + + + +//Added for customview.tpl + +'LBL_Select_a_Column' => '选择字段', +'Missing_required_fields' => '必填字段为空', +'Details' => '详细信息', +'New_Custom_View' => '创建视图', +'LBL_AF_HDR5' => '时间过滤器可以让您选择介于客户建立时间与异动时间之间的日期', +'Select_Duration' => '选择时间段', +'Simple_Time_Filter' => '简易时间过滤', +'Start_Date' => '开始日期', +'End_Date' => '结束日期', +'LBL_RULE' => '规则', +// Added/Updated for vtiger CRM 5.0.4 +'not equal to'=>'不等于', +'starts with'=>'开始于', +'ends with'=>'结束于', +//'Product Code'=>'产品编号', + +// Added after 5.0.4 GA + +//Added for Role based Custom filters +'LBL_SET_AS_PUBLIC'=>'设为公开 ', +'LBL_NEW'=>'新增', +'LBL_EDIT'=>'修改', +'LBL_STATUS_PUBLIC_APPROVE'=>'允许', +'LBL_STATUS_PUBLIC_DENY'=>'拒绝' +); +?> diff --git a/modules/CustomerPortal/AdvancedSettings.php b/modules/CustomerPortal/AdvancedSettings.php new file mode 100644 index 0000000..7a1419e --- /dev/null +++ b/modules/CustomerPortal/AdvancedSettings.php @@ -0,0 +1,57 @@ +id.'.php'); + +if(!$is_admin) { + echo "
"; + echo "
+ + + + + + + + + +
+ $app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
+
"; + echo "
"; + exit; +} + +$mode = $_REQUEST['mode']; +if($mode !='' && $mode == 'save') { + cp_saveAdvancedSettings($_REQUEST); +} +$category = getParentTab(); +$smarty = new vtigerCRM_Smarty(); +$smarty->assign("THEME", $theme); +$smarty->assign('MOD', $mod_strings); +$smarty->assign('APP', $app_strings); +$smarty->assign('MODULE', $currentModule); +$smarty->assign('CATEGORY', $category); +$smarty->assign('BUTTONS', $list_buttons); +$smarty->assign('CHECK', $tool_buttons); +$smarty->assign('IMAGE_PATH', "themes/$theme/images/"); +$smarty->assign('MODULE_VIEWALL',cp_getContactsViewInfo()); + +$smarty->assign('USERS', cp_getUsers()); +$smarty->assign('USERID',cp_getCurrentUser()); +$smarty->display(vtlib_getModuleTemplate($currentModule,'AdvancedSettings.tpl')); +?> diff --git a/modules/CustomerPortal/CustomerPortal.js b/modules/CustomerPortal/CustomerPortal.js new file mode 100644 index 0000000..1920fe1 --- /dev/null +++ b/modules/CustomerPortal/CustomerPortal.js @@ -0,0 +1,63 @@ +/********************************************************************************* + ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ + +function moveUp(moduleObj,sequence) { + var oldSequence = moduleObj[sequence]['sequence']; + var changeSequence = oldSequence - 1; + + moduleObj[sequence]['sequence'] = moduleObj[changeSequence]['sequence']; + moduleObj[changeSequence]['sequence']=oldSequence; + + temp = new Object(); + temp=moduleObj[sequence]; + moduleObj[sequence]=moduleObj[changeSequence]; + moduleObj[changeSequence]=temp; + + renderModuleSettings(moduleObj); +} + +function moveDown(moduleObj,sequence) { + var oldSequence = moduleObj[sequence]['sequence']; + var changeSequence = parseInt(oldSequence) + 1; + + moduleObj[sequence]['sequence'] = moduleObj[changeSequence]['sequence']; + moduleObj[changeSequence]['sequence']=oldSequence; + + temp = new Object(); + temp=moduleObj[sequence]; + moduleObj[sequence]=moduleObj[changeSequence]; + moduleObj[changeSequence]=temp; + renderModuleSettings(moduleObj); +} + +Object.prototype.size = function () { + var len = this.length ? --this.length : -1; + for (var k in this) + len++; + return len; +} + +function visibleValueChange(sequence,tabid,moduleObj) { + if(moduleObj[sequence]['sequence'] == sequence && moduleObj[sequence]['tabid'] == tabid){ + if(moduleObj[sequence]['visible'] == 1) + moduleObj[sequence]['visible'] = '0'; + else + moduleObj[sequence]['visible'] = '1'; + } +} + +function prefValueChange(sequence,tabid,moduleObj) { + if(moduleObj[sequence]['sequence'] == sequence && moduleObj[sequence]['tabid'] == tabid){ + if(moduleObj[sequence]['value'] == 1) + moduleObj[sequence]['value'] = '0'; + else + moduleObj[sequence]['value'] = '1'; + } +} diff --git a/modules/CustomerPortal/CustomerPortal.php b/modules/CustomerPortal/CustomerPortal.php new file mode 100644 index 0000000..e5d64a4 --- /dev/null +++ b/modules/CustomerPortal/CustomerPortal.php @@ -0,0 +1,72 @@ +pquery($query,array()); + $tabseq = $adb->query_result($res,0,'max_tabseq'); + $i = ++$tabseq; + foreach($portalModules as $module) { + $tabIdResult = $adb->pquery('SELECT tabid FROM vtiger_tab WHERE name=?', array($module)); + $tabId = $adb->query_result($tabIdResult, 0, 'tabid'); + if($tabId) { + ++$i; + $adb->query("INSERT INTO vtiger_customerportal_tabs (tabid,visible,sequence) VALUES ($tabId,1,$i)"); + $adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES ($tabId,'showrelatedinfo',1)"); + } + } + + $adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (0,'userid',1)"); + $adb->query("INSERT INTO vtiger_customerportal_prefs(tabid,prefkey,prefvalue) VALUES (0,'defaultassignee',1)"); + + // Mark the module as Standard module + $adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName)); + + $fieldid = $adb->getUniqueID('vtiger_settings_field'); + $blockid = getSettingsBlockId('LBL_OTHER_SETTINGS'); + $seq_res = $adb->pquery("SELECT max(sequence) AS max_seq FROM vtiger_settings_field WHERE blockid = ?", array($blockid)); + if ($adb->num_rows($seq_res) > 0) { + $cur_seq = $adb->query_result($seq_res, 0, 'max_seq'); + if ($cur_seq != null) $seq = $cur_seq + 1; + } + + $adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence) + VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'LBL_CUSTOMER_PORTAL', 'portal_icon.png', 'PORTAL_EXTENSION_DESCRIPTION', 'index.php?module=CustomerPortal&action=index&parenttab=Settings', $seq)); + + + } else if($eventType == 'module.disabled') { + // TODO Handle actions when this module is disabled. + } else if($eventType == 'module.enabled') { + // TODO Handle actions when this module is enabled. + } else if($eventType == 'module.preuninstall') { + // TODO Handle actions when this module is about to be deleted. + } else if($eventType == 'module.preupdate') { + // TODO Handle actions before this module is updated. + } else if($eventType == 'module.postupdate') { + // TODO Handle actions after this module is updated. + } + } +} +?> diff --git a/modules/CustomerPortal/CustomerPortalAjax.php b/modules/CustomerPortal/CustomerPortalAjax.php new file mode 100644 index 0000000..4529abd --- /dev/null +++ b/modules/CustomerPortal/CustomerPortalAjax.php @@ -0,0 +1,12 @@ + diff --git a/modules/CustomerPortal/CustomerPortalHandler.php b/modules/CustomerPortal/CustomerPortalHandler.php new file mode 100644 index 0000000..729d97f --- /dev/null +++ b/modules/CustomerPortal/CustomerPortalHandler.php @@ -0,0 +1,17 @@ + diff --git a/modules/CustomerPortal/ListView.php b/modules/CustomerPortal/ListView.php new file mode 100644 index 0000000..8dc42a3 --- /dev/null +++ b/modules/CustomerPortal/ListView.php @@ -0,0 +1,70 @@ +id.'.php'); + +if(!$is_admin) { + echo "
"; + echo "
+ + + + + + + + + +
+ $app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
+
"; + echo "
"; + exit; +} + +$mode = $_REQUEST['mode']; +if($mode !='' && $mode == 'save') { + cp_saveCustomerPortalSettings($_REQUEST); +} +$category = getParentTab(); +$smarty = new vtigerCRM_Smarty(); +$portalmodules = cp_getPortalModuleinfo(); +$moduleInfo = json_encode($portalmodules); + +$smarty->assign('PORTALMODULES',$moduleInfo); +$smarty->assign("THEME", $theme); +$smarty->assign('MOD', $mod_strings); +$smarty->assign('APP', $app_strings); +$smarty->assign('MODULE', $currentModule); +$smarty->assign('CATEGORY', $category); +$smarty->assign('BUTTONS', $list_buttons); +$smarty->assign('CHECK', $tool_buttons); +$smarty->assign('IMAGE_PATH', "themes/$theme/images/"); +$smarty->assign('MODE',$mode); +$smarty->assign('USERS', cp_getUsers()); +$smarty->assign('GROUPS', cp_getUserGroups()); +$smarty->assign('USERID', cp_getCurrentUser()); +$smarty->assign('DEFAULTASSIGNEE', cp_getCurrentDefaultAssignee()); + +if($_REQUEST['ajax'] != true) { + $smarty->display(vtlib_getModuleTemplate($currentModule,'BasicSetttings.tpl')); +} +else { + $smarty->display(vtlib_getModuleTemplate($currentModule,'BasicSetttingsContents.tpl')); +} +?> \ No newline at end of file diff --git a/modules/CustomerPortal/PortalUtils.php b/modules/CustomerPortal/PortalUtils.php new file mode 100644 index 0000000..290a2e9 --- /dev/null +++ b/modules/CustomerPortal/PortalUtils.php @@ -0,0 +1,117 @@ +query("SELECT vtiger_customerportal_tabs.*, vtiger_customerportal_prefs.prefvalue, vtiger_tab.name from vtiger_customerportal_tabs + INNER JOIN vtiger_customerportal_prefs ON vtiger_customerportal_prefs.tabid = vtiger_customerportal_tabs.tabid and vtiger_customerportal_prefs.prefkey='showrelatedinfo' + INNER JOIN vtiger_tab ON vtiger_customerportal_tabs.tabid = vtiger_tab.tabid and vtiger_tab.presence = 0 ORDER BY vtiger_customerportal_tabs.sequence"); + $rows = $adb->num_rows($query); + for($i = 0;$i < $rows; $i++){ + $portalmodules[$i+1]['tabid'] = $adb->query_result($query,$i,'tabid'); + $portalmodules[$i+1]['visible'] = $adb->query_result($query,$i,'visible'); + $portalmodules[$i+1]['sequence'] = $i+1; + $portalmodules[$i+1]['name'] = getTranslatedString($adb->query_result($query,$i,'name')); + $portalmodules[$i+1]['value'] = $adb->query_result($query,$i,'prefvalue'); + } + return $portalmodules; +} + +/* Function to save Advanced info fro Customer Portal + */ +function cp_saveCustomerPortalSettings($input) { + global $adb; + $portalmodules = cp_getPortalModuleinfo(); + for($i=1;$i<=count($portalmodules);$i++) { + $modules = str_replace(" ","_",$portalmodules[$i]['name']); + $view = $input['view_'.$modules]; + $visible = $input['enable_disable_'.$modules]; + $sequence = $input['seq_'.$modules]; + $tabid = $portalmodules[$i]['tabid']; + if($view == 'showall'){ + $adb->pquery("UPDATE vtiger_customerportal_prefs SET prefvalue = 1 WHERE prefkey = 'showrelatedinfo' and tabid = ?", array($tabid)); + }else { + $adb->pquery("UPDATE vtiger_customerportal_prefs SET prefvalue = 0 WHERE prefkey = 'showrelatedinfo' and tabid = ?", array($tabid)); + } + if($visible == 'on' ) { + $updatevisibility = $adb->pquery("UPDATE vtiger_customerportal_tabs SET visible = 1 WHERE tabid = ?", array($tabid)); + } else { + $updatevisibility = $adb->pquery("UPDATE vtiger_customerportal_tabs SET visible = 0 WHERE tabid = ?", array($tabid)); + } + $adb->pquery("UPDATE vtiger_customerportal_tabs set sequence=? WHERE tabid = ?", array($sequence, $tabid)); + } + + //user update + $userid = $input['userid']; + $adb->pquery("UPDATE vtiger_customerportal_prefs SET prefvalue = ? WHERE prefkey = 'userid' and tabid = 0", array($userid)); + + //update Group + $defaultAssignee = $input['defaultAssignee']; + $adb->pquery("UPDATE vtiger_customerportal_prefs SET prefvalue = ? WHERE prefkey = 'defaultAssignee' and tabid = 0", array($defaultAssignee)); + +} + +/* It gives you a list of users + */ +function cp_getUsers(){ + global $adb; + $res = $adb->query("SELECT id,user_name,last_name,first_name from vtiger_users WHERE status='Active'"); + $norows = $adb->num_rows($res); + $users = array(); + for($i = 0;$i < $norows;$i++) { + $users[$i]['id'] = $adb->query_result($res,$i,'id'); + $users[$i]['name'] = getFullNameFromQResult($res, $i, 'Users'); + } + return $users; +} + +/* Function to get the customer portal user id + */ +function cp_getCurrentUser() { + global $adb; + $res = $adb->query("SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'userid' AND tabid = 0"); + $userid = $adb->query_result($res,0,'prefvalue'); + if($userid != '') { + return $userid; + } + return false; +} + +/* Function to get the customer portal default assignee + */ +function cp_getCurrentDefaultAssignee() { + global $adb; + $res = $adb->query("SELECT prefvalue FROM vtiger_customerportal_prefs WHERE prefkey = 'defaultassignee' AND tabid = 0"); + $defaultassignee = $adb->query_result($res,0,'prefvalue'); + if($defaultassignee != '') { + return $defaultassignee; + } + return false; +} + +/* It gives you a list of users Groups + * + */ +function cp_getUserGroups() { + global $adb; + $res = $adb->query("SELECT groupid,groupname from vtiger_groups"); + $norows = $adb->num_rows($res); + for($i = 0;$i < $norows;$i++) { + $groups[$i]['groupid'] = $adb->query_result($res,$i,'groupid'); + $groups[$i]['groupname'] = $adb->query_result($res,$i,'groupname'); + } + return $groups; +} +?> \ No newline at end of file diff --git a/modules/CustomerPortal/index.php b/modules/CustomerPortal/index.php new file mode 100644 index 0000000..93f50e2 --- /dev/null +++ b/modules/CustomerPortal/index.php @@ -0,0 +1,36 @@ +id.'.php'); + +if(!$is_admin) { + echo "
"; + echo "
+ + + + + + + + + +
+ $app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
+
"; + echo "
"; + exit; +} +include_once("modules/$currentModule/ListView.php"); + +?> diff --git a/modules/CustomerPortal/language/de_de.lang.php b/modules/CustomerPortal/language/de_de.lang.php new file mode 100644 index 0000000..fada1b4 --- /dev/null +++ b/modules/CustomerPortal/language/de_de.lang.php @@ -0,0 +1,26 @@ + 'Kundenportal', +'LBL_BASIC_SETTINGS'=>'Grundeinstellungen', +'LBL_CUSTOMERPORTAL_SETTINGS'=>'Einstellungen Kundenportal', +'LBL_ADVANCED_SETTINGS'=>'erweiterte Einstellungen', +'LBL_MODULE'=>'Module', +'LBL_VIEW_ALL_RECORD'=>'Alle bezogenen Daten ansehen?', +'LBL_MODULE_INFORMATION'=>'Module Information', +'LBL_USER_INFORMATION'=>'Benutzer Information', +'LBL_YES'=>'Ja', +'LBL_NO'=>'Nein', +'LBL_USER_DESCRIPTION'=>'Das oben ausgewählte Nutzerprofil wird genutzt, um zu entscheiden, welche Felder im Kundenportal angezeigt werden Sie können die Ansicht von Feldern im Kundenportal ab- oder zuschalten.', +'LBL_GROUP_DESCRIPTION'=>'NOTE : Trouble Tickets will be Assigned to the above selected Assignee by default Group/User from the Customer Portal.', +'LBL_SELECT_USERS'=>'Nutzer auswählen', +'LBL_DEFAULT_USERS'=>'Standard zugewiesener', +'LBL_DISABLE'=>'abschalten', +'LBL_ENABLE' =>'zulassen', +'LBL_MODULE' => 'Modul', +'LBL_SEQUENCE' =>'Sequenz', +'LBL_VISIBLE'=>'sichtbar' + +); + +?> diff --git a/modules/CustomerPortal/language/en_gb.lang.php b/modules/CustomerPortal/language/en_gb.lang.php new file mode 100644 index 0000000..7594b3f --- /dev/null +++ b/modules/CustomerPortal/language/en_gb.lang.php @@ -0,0 +1,41 @@ + 'Customer Portal', + 'LBL_BASIC_SETTINGS' => 'Basic Settings', + 'LBL_CUSTOMERPORTAL_SETTINGS' => 'Customer Portal Settings', + 'LBL_ADVANCED_SETTINGS' => 'Advanced Settings', + 'LBL_MODULE' => 'Module', + 'LBL_VIEW_ALL_RECORD' => 'View all related records?', + 'LBL_MODULE_INFORMATION' => 'Module Information', + 'LBL_USER_INFORMATION' => 'User Information', + 'LBL_YES' => 'Yes', + 'LBL_NO' => 'No', + 'LBL_USER_DESCRIPTION' => 'The selected User\'s profile (above) will be used to control the fields that appear in the Customer Portal.
You can enable/disable the fields that are shown in the Customer Portal.', + 'LBL_GROUP_DESCRIPTION' => 'NOTE : Trouble Tickets will be Assigned to the above selected Assignee by default Group/User from the Customer Portal', + 'LBL_SELECT_USERS' => 'User\'s Profile', + 'LBL_DEFAULT_USERS' => 'Default Assignee', + 'LBL_DISABLE' => 'Disable', + 'LBL_ENABLE' => 'Enable', + 'LBL_SEQUENCE' => 'Sequence', + 'LBL_VISIBLE' => 'Visible', + 'YES' => 'Yes', + 'NO' => 'No', + 'SELECT_USERS' => 'Select Users', + 'Module' => 'Module', + 'Sequence' => 'Sequence', + 'Visible' => 'Visible', + 'Project' => 'Project', + 'ProjectTask' => 'Project Task', + 'ProjectMilestone' => 'Project Milestone', + 'Save' => 'Save' +); +?> \ No newline at end of file diff --git a/modules/CustomerPortal/language/en_us.lang.php b/modules/CustomerPortal/language/en_us.lang.php new file mode 100644 index 0000000..19759b5 --- /dev/null +++ b/modules/CustomerPortal/language/en_us.lang.php @@ -0,0 +1,26 @@ + 'CustomerPortal', +'LBL_BASIC_SETTINGS'=>'Basic Settings', +'LBL_CUSTOMERPORTAL_SETTINGS'=>'CustomerPortal Settings', +'LBL_ADVANCED_SETTINGS'=>'Advanced Settings', +'LBL_MODULE'=>'Module', +'LBL_VIEW_ALL_RECORD'=>'View All Related Records ?', +'LBL_MODULE_INFORMATION'=>'Module Information', +'LBL_USER_INFORMATION'=>'User Information', +'LBL_YES'=>'Yes', +'LBL_NO'=>'No', +'LBL_USER_DESCRIPTION'=>'NOTE : The above selected User\'s profile will be selected to control the fields that appear in the Customer Portal.', +'LBL_GROUP_DESCRIPTION'=>'NOTE : Trouble Tickets will be Assigned to the above selected Assignee by default Group/User from the Customer Portal.', +'LBL_SELECT_USERS'=>'Users Profile', +'LBL_DEFAULT_USERS'=>'Default Assignee', +'LBL_DISABLE'=>'Disable', +'LBL_ENABLE' =>'Enable', +'LBL_MODULE' => 'Module', +'LBL_SEQUENCE' =>'Sequence', +'LBL_VISIBLE'=>'Visible' + +); + +?> diff --git a/modules/CustomerPortal/language/es_es.lang.php b/modules/CustomerPortal/language/es_es.lang.php new file mode 100644 index 0000000..b2052ce --- /dev/null +++ b/modules/CustomerPortal/language/es_es.lang.php @@ -0,0 +1,28 @@ + 'Portal Cliente', +'LBL_BASIC_SETTINGS'=>'Configuración Básica', +'LBL_CUSTOMERPORTAL_SETTINGS'=>'Configuración Portal', +'LBL_ADVANCED_SETTINGS'=>'Configuración Avanzada', +'LBL_MODULE'=>'Módulo', +'LBL_VIEW_ALL_RECORD'=>'¿Mostrar todos los registros relacionados?', +'LBL_MODULE_INFORMATION'=>'Información Módulo', +'LBL_USER_INFORMATION'=>'Información Usuario', +'LBL_YES'=>'Sí', +'LBL_NO'=>'No', +'LBL_USER_DESCRIPTION'=>'NOTA : El perfil del usuario seleccionado arriba controlará qué campos aparecen en el Portal de Cliente.', +'LBL_GROUP_DESCRIPTION'=>'NOTA : Las incidencias se asignarán al usuario/grupo por defecto seleccionado.', +'LBL_SELECT_USERS'=>'Perfil Usuarios', +'LBL_DEFAULT_USERS'=>'Asignado por defecto', +'LBL_DISABLE'=>'Deshabilitar', +'LBL_ENABLE' =>'Habilitar', +'LBL_MODULE' => 'Módulo', +'LBL_SEQUENCE' =>'Secuencia', +'LBL_VISIBLE'=>'Visible' +); + +?> diff --git a/modules/CustomerPortal/language/es_mx.lang.php b/modules/CustomerPortal/language/es_mx.lang.php new file mode 100644 index 0000000..f066e6d --- /dev/null +++ b/modules/CustomerPortal/language/es_mx.lang.php @@ -0,0 +1,31 @@ + 'Portal Cliente', +'LBL_BASIC_SETTINGS'=>'Configuración Básica', +'LBL_CUSTOMERPORTAL_SETTINGS'=>'Configuración Portal', +'LBL_ADVANCED_SETTINGS'=>'Configuración Avanzada', +'LBL_MODULE'=>'Módulo', +'LBL_VIEW_ALL_RECORD'=>'¿Mostrar todos los registros relacionados?', +'LBL_MODULE_INFORMATION'=>'Información Módulo', +'LBL_USER_INFORMATION'=>'Información Usuario', +'LBL_YES'=>'Sí', +'LBL_NO'=>'No', +'LBL_USER_DESCRIPTION'=>'NOTA : El perfil del usuario seleccionado arriba controlará qué campos aparecen en el Portal de Cliente.', +'LBL_GROUP_DESCRIPTION'=>'NOTA : Los casos se asignarán al usuario/grupo seleccionado por defecto.', +'LBL_SELECT_USERS'=>'Perfil Usuarios', +'LBL_DEFAULT_USERS'=>'Asignado por defecto', +'LBL_DISABLE'=>'Deshabilitar', +'LBL_ENABLE' =>'Habilitar', +'LBL_MODULE' => 'Módulo', +'LBL_SEQUENCE' =>'Secuencia', +'LBL_VISIBLE'=>'Visible' + + +); + +?> diff --git a/modules/CustomerPortal/language/fr_fr.lang.php b/modules/CustomerPortal/language/fr_fr.lang.php new file mode 100644 index 0000000..b598354 --- /dev/null +++ b/modules/CustomerPortal/language/fr_fr.lang.php @@ -0,0 +1,43 @@ + 'Portail de service Client', + 'LBL_BASIC_SETTINGS'=>'Configuration de base', + 'LBL_ADVANCED_SETTINGS'=>'Configuration Avancée', + 'LBL_MODULE'=>'Module', + 'LBL_VIEW_ALL_RECORD'=>'Voir toutes les infos relatifs ?', + 'YES'=>'Oui', + 'NO'=>'Non', + 'LBL_USER_DESCRIPTION'=>'Le profil d\'utilisateur choisi controlera les champs apparaissant dans le portail client. + You can enable/disable the fields that show in the customer Portal.', + 'SELECT_USERS'=>'Choisir parmi les utilisateurs', + 'LBL_DISABLE'=>'Inactif', + 'LBL_ENABLE' =>'Actif', + 'Module' => 'Module', + 'Sequence' =>'Séquence', + 'Visible'=>'Visible', + 'CustomerPortal' => 'Portail de service Client', + + 'LBL_CUSTOMERPORTAL_SETTINGS'=>'Réglages Portail de service Client', + 'LBL_MODULE'=>'Module', + 'LBL_VIEW_ALL_RECORD'=>'View All Related Records ?', + 'LBL_MODULE_INFORMATION'=>'Information du module', + 'LBL_USER_INFORMATION'=>'Information utilisateur', + 'LBL_YES'=>'Oui', + 'LBL_NO'=>'Non', + 'LBL_GROUP_DESCRIPTION'=>'NOTE : Les Tickets seront assignés à l\'utilisateur assigné par défaut choisi pour le portail client.', + 'LBL_SELECT_USERS'=>'Profil utilisateur', + 'LBL_DEFAULT_USERS'=>'Assignation par défaut', + 'LBL_MODULE' => 'Module', + 'LBL_SEQUENCE' =>'Séquence', + 'LBL_VISIBLE'=>'Visible', +); + +?> \ No newline at end of file diff --git a/modules/CustomerPortal/language/hu_hu.lang.php b/modules/CustomerPortal/language/hu_hu.lang.php new file mode 100644 index 0000000..43b94ab --- /dev/null +++ b/modules/CustomerPortal/language/hu_hu.lang.php @@ -0,0 +1,46 @@ + 'Ügyfél Portál', + 'LBL_BASIC_SETTINGS' => 'Alap Beállítások', + 'LBL_CUSTOMERPORTAL_SETTINGS' => 'Ügyfél Portál Beállítások', + 'LBL_ADVANCED_SETTINGS' => 'Haladó Beállítások', + 'LBL_MODULE' => 'Modul', + 'LBL_VIEW_ALL_RECORD' => 'Minden kapcsolódó rekordot mutasson?', + 'LBL_MODULE_INFORMATION' => 'Modul adatok', + 'LBL_USER_INFORMATION' => 'Felhasználói adatok', + 'LBL_YES' => 'Igen', + 'LBL_NO' => 'Nem', + 'LBL_USER_DESCRIPTION' => 'A fentiekben kiválasztott Felhasználói Profil fogja kontrollálni a Vevői Portálon megjelenő mezőket. A Vevői Portálon a mezők megjelenését engedélyezheted vagy tilthatod.', + 'LBL_GROUP_DESCRIPTION' => 'Megjegyzés: Az Ügyfél Portálról érkező Kérést/Jegyet a fentebb kiválasztott alapértelmezett Felhasználóhoz/Csoporthoz fogjuk automatikusan hozzárendelni.', + 'LBL_SELECT_USERS' => 'Felhasználói profil', + 'LBL_DEFAULT_USERS' => 'Alapértelmezett hozzárendelés', + 'LBL_DISABLE' => 'Tilt', + 'LBL_ENABLE' => 'Engedélyez', + 'LBL_SEQUENCE' => 'Sorozat', + 'LBL_VISIBLE' => 'Látható', + 'YES' => 'Igen', + 'NO' => 'Nem', + 'SELECT_USERS' => 'Felhasználó kiválasztása', + 'Module' => 'Modul', + 'Sequence' => 'Sorozat', + 'Visible' => 'Látható', + 'Project' => 'Projekt', + 'ProjectTask' => 'Projekt Feladatok', + 'ProjectMilestone' => 'Projekt Mérföldkövek', + 'Save' => 'Módosítások mentése' +); +?> \ No newline at end of file diff --git a/modules/CustomerPortal/language/nl_nl.lang.php b/modules/CustomerPortal/language/nl_nl.lang.php new file mode 100644 index 0000000..5a35562 --- /dev/null +++ b/modules/CustomerPortal/language/nl_nl.lang.php @@ -0,0 +1,59 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.3 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/CustomerPortal/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array ( + 'CustomerPortal' => 'Klantportaal', + 'LBL_BASIC_SETTINGS'=>'Basisinstellingen', + 'LBL_CUSTOMERPORTAL_SETTINGS'=>'Instellingen klantportaal', + 'LBL_ADVANCED_SETTINGS'=>'Geavanceerde Instellingen', + 'LBL_MODULE'=>'Module', + 'LBL_VIEW_ALL_RECORD'=>'Bekijk gerelateerde Items ?', + 'LBL_MODULE_INFORMATION'=>'Module-informatie', + 'LBL_USER_INFORMATION'=>'Gebruikersinformatie', + 'YES'=>'Ja', + 'NO'=>'Nee', + + 'LBL_USER_DESCRIPTION'=>'Het hierboven geselecteerde gebruikersprofiel wordt gebruikt in de Klantportaal.', +'LBL_GROUP_DESCRIPTION'=>'NOTE : Tickets worden toegewezen aan de bovenvermelde gebruiker in de standaard Groep/Gebruiker van het klantportaal.', +'LBL_SELECT_USERS'=>'Selecteer de gebruikers', +'LBL_DEFAULT_USERS'=>'Standaard gebruiker', + + 'SELECT_USERS'=>'Selecteer de gebruikers', + 'LBL_DISABLE'=>'Deactiveer', + 'LBL_ENABLE' =>'Activeer', + 'Module' => 'Module', + 'Sequence' =>'Volgorde', + 'Visible'=>'Zichtbaar' +); + +?> diff --git a/modules/CustomerPortal/schema.xml b/modules/CustomerPortal/schema.xml new file mode 100644 index 0000000..07fd58f --- /dev/null +++ b/modules/CustomerPortal/schema.xml @@ -0,0 +1,13 @@ + + + + + vtiger_customerportal_fields + +
+
+
diff --git a/modules/Dashboard/Chart_lead_source_by_outcome.php b/modules/Dashboard/Chart_lead_source_by_outcome.php new file mode 100644 index 0000000..7c1cbd4 --- /dev/null +++ b/modules/Dashboard/Chart_lead_source_by_outcome.php @@ -0,0 +1,161 @@ +id.'.php'); +require('user_privileges/user_privileges_'.$current_user->id.'.php'); + +// Get _dom arrays from Database +$comboFieldNames = Array('leadsource'=>'lead_source_dom'); +$comboFieldArray = getComboArray($comboFieldNames); + +$log = LoggerManager::getLogger('lead_source_by_outcome'); + +if (isset($_REQUEST['lsbo_refresh'])) { $refresh = $_REQUEST['lsbo_refresh']; } +else { $refresh = false; } + +// added for auto refresh +$refresh = true; +// + +$tempx = array(); +$datax = array(); +//get list of sales stage keys to display +if (isset($_SESSION['lsbo_lead_sources']) && count($_SESSION['lsbo_lead_sources']) > 0 && !isset($_REQUEST['lsbo_lead_sources'])) { + $tempx = $_SESSION['lsbo_lead_sources']; + $log->debug("_SESSION['lsbo_lead_sources'] is:"); + $log->debug($_SESSION['lsbo_lead_sources']); +} +elseif (isset($_REQUEST['lsbo_lead_sources']) && count($_REQUEST['lsbo_lead_sources']) > 0) { + $tempx = $_REQUEST['lsbo_lead_sources']; + $current_user->setPreference('lsbo_lead_sources', $_REQUEST['lsbo_lead_sources']); + $log->debug("_REQUEST['lsbo_lead_sources'] is:"); + $log->debug($_REQUEST['lsbo_lead_sources']); + $log->debug("_SESSION['lsbo_lead_sources'] is:"); + $log->debug($_SESSION['lsbo_lead_sources']); +} + +//set $datax using selected sales stage keys +if (count($tempx) > 0) { + foreach ($tempx as $key) { + $datax[$key] = $comboFieldArray['lead_source_dom'][$key]; + } +} +else { + $datax = $comboFieldArray['lead_source_dom']; +} +$log->debug("datax is:"); +$log->debug($datax); + +$ids = array(); +//get list of user ids for which to display data +if (isset($_SESSION['lsbo_ids']) && count($_SESSION['lsbo_ids']) != 0 && !isset($_REQUEST['lsbo_ids'])) { + $ids = $_SESSION['lsbo_ids']; + $log->debug("_SESSION['lsbo_ids'] is:"); + $log->debug($_SESSION['lsbo_ids']); +} +elseif (isset($_REQUEST['lsbo_ids']) && count($_REQUEST['lsbo_ids']) > 0) { + $ids = $_REQUEST['lsbo_ids']; + $current_user->setPreference('lsbo_ids', $_REQUEST['lsbo_ids']); + $log->debug("_REQUEST['lsbo_ids'] is:"); + $log->debug($_REQUEST['lsbo_ids']); + $log->debug("_SESSION['lsbo_ids'] is:"); + $log->debug($_SESSION['lsbo_ids']); +} +else { + $ids = get_user_array(false); + $ids = array_keys($ids); +} + +//create unique prefix based on selected vtiger_users for image vtiger_files +$id_hash = ''; +if (isset($ids)) { + sort($ids); + $id_hash = crc32(implode('',$ids)); +} +$log->debug("ids is:"); +$log->debug($ids); + +$cache_file_name = $id_hash."_lead_source_by_outcome_".$current_language."_".crc32(implode('',$datax)).".png"; +$log->debug("cache file name is: $cache_file_name"); + +if(isPermitted('Potentials','index')=="yes") +{ +$draw_this = new jpgraph(); +$width = 850; +$height = 500; +if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') +{ + $width = 350; + $height = 250; +} + +echo $draw_this->lead_source_by_outcome($datax, $ids, $tmp_dir.$cache_file_name, $refresh,$width,$height); +echo "

".$current_module_strings['LBL_LEAD_SOURCE_BY_OUTCOME_DESC']."

"; +if (isset($_REQUEST['lsbo_edit']) && $_REQUEST['lsbo_edit'] == 'true') { +?> +
+ + + + + + + + + + + + + + + + + +

+
+getDBInsertDateValue(); + } + else { + $file_date = ''; + } +?> +
+ +[] +[] +
+ \ No newline at end of file diff --git a/modules/Dashboard/Chart_my_pipeline_by_sales_stage.php b/modules/Dashboard/Chart_my_pipeline_by_sales_stage.php new file mode 100644 index 0000000..d9d4da8 --- /dev/null +++ b/modules/Dashboard/Chart_my_pipeline_by_sales_stage.php @@ -0,0 +1,185 @@ +'sales_stage_dom'); +$comboFieldArray = getComboArray($comboFieldNames); + +//get the dates to display +if (isset($_SESSION['mypbss_date_start']) && $_SESSION['mypbss_date_start'] != '' && !isset($_REQUEST['mypbss_date_start'])) { + $date_start = $_SESSION['mypbss_date_start']; + $log->debug("_SESSION['mypbss_date_start'] is:"); + $log->debug($_SESSION['mypbss_date_start']); +} +elseif (isset($_REQUEST['mypbss_date_start']) && $_REQUEST['mypbss_date_start'] != '') { + $date_start = $_REQUEST['mypbss_date_start']; + $current_user->setPreference('mypbss_date_start', $_REQUEST['mypbss_date_start']); + $log->debug("_REQUEST['mypbss_date_start'] is:"); + $log->debug($_REQUEST['mypbss_date_start']); + $log->debug("_SESSION['mypbss_date_start'] is:"); + $log->debug($_SESSION['mypbss_date_start']); +} +else { + $date_start = date("Y-m-d", time()); +} + +if (isset($_SESSION['mypbss_date_end']) && $_SESSION['mypbss_date_end'] != '' && !isset($_REQUEST['mypbss_date_end'])) { + $date_end = $_SESSION['mypbss_date_end']; + $log->debug("_SESSION['mypbss_date_end'] is:"); + $log->debug($_SESSION['mypbss_date_end']); +} +elseif (isset($_REQUEST['mypbss_date_end']) && $_REQUEST['mypbss_date_end'] != '') { + $date_end = $_REQUEST['mypbss_date_end']; + $current_user->setPreference('mypbss_date_end', $_REQUEST['mypbss_date_end']); + $log->debug("_REQUEST['mypbss_date_end'] is:"); + $log->debug($_REQUEST['mypbss_date_end']); + $log->debug("_SESSION['mypbss_date_end'] is:"); + $log->debug($_SESSION['mypbss_date_end']); +} +else { + $date_end = '2100-01-01'; +} + +$tempx = array(); +$datax = array(); +//get list of sales stage keys to display +if (isset($_SESSION['mypbss_sales_stages']) && count($_SESSION['mypbss_sales_stages']) > 0 && !isset($_REQUEST['mypbss_sales_stages'])) { + $tempx = $_SESSION['mypbss_sales_stages']; + $log->debug("_SESSION['mypbss_sales_stages'] is:"); + $log->debug($_SESSION['mypbss_sales_stages']); +} +elseif (isset($_REQUEST['mypbss_sales_stages']) && count($_REQUEST['mypbss_sales_stages']) > 0) { + $tempx = $_REQUEST['mypbss_sales_stages']; + $current_user->setPreference('mypbss_sales_stages', $_REQUEST['mypbss_sales_stages']); + $log->debug("_REQUEST['mypbss_sales_stages'] is:"); + $log->debug($_REQUEST['mypbss_sales_stages']); + $log->debug("_SESSION['mypbss_sales_stages'] is:"); + $log->debug($_SESSION['mypbss_sales_stages']); +} + +//set $datax using selected sales stage keys +if (count($tempx) > 0) { + foreach ($tempx as $key) { + $datax[$key] = $comboFieldArray['sales_stage_dom'][$key];//$app_list_strings['sales_stage_dom'][$key]; + } +} +else { + $datax = $comboFieldArray['sales_stage_dom'];//app_list_strings['sales_stage_dom']; +} +$log->debug("datax is:"); +$log->debug($datax); + +$ids = array($current_user->id); +//create unique prefix based on selected vtiger_users for image vtiger_files +$id_hash = ''; +if (isset($ids)) { + sort($ids); + $id_hash = crc32(implode('',$ids)); +} +$log->debug("ids is:"); +$log->debug($ids); + +$cache_file_name = $id_hash."_pipeline_".$current_language."_".crc32(implode('',$datax)).$date_start.$date_end.".png"; +$log->debug("cache file name is: $cache_file_name"); + +if (substr(phpversion(), 0, 1) == "5") { // php5 } + echo "Charts not supported in PHP 5."; +} +else { +$draw_this = new jpgraph(); +echo $draw_this->pipeline_by_sales_stage($datax, $date_start, $date_end, $ids, $tmp_dir.$cache_file_name, $refresh); +echo "

".$current_module_strings['LBL_PIPELINE_FORM_TITLE_DESC']."

"; +if (isset($_REQUEST['mypbss_edit']) && $_REQUEST['mypbss_edit'] == 'true') { + $cal_lang = "en"; + $cal_dateformat = parse_calendardate($app_strings['NTC_DATE_FORMAT']); + $cal_dateformat = '%Y-%m-%d'; // fix providedd by Jlee for date bug in Dashboard + + +?> + + + + +
+ + + + + + + + + + + + + + + + + +

'>

'>

+
+ + +getDBInsertDateValue(); + } + else { + $file_date = ''; + } +?> +
+ +[] +[] +
+ diff --git a/modules/Dashboard/Chart_outcome_by_month.php b/modules/Dashboard/Chart_outcome_by_month.php new file mode 100644 index 0000000..0bffeaf --- /dev/null +++ b/modules/Dashboard/Chart_outcome_by_month.php @@ -0,0 +1,198 @@ +id.'.php'); +require('user_privileges/user_privileges_'.$current_user->id.'.php'); + +$log = LoggerManager::getLogger('outcome_by_month'); + +if (isset($_REQUEST['obm_refresh'])) { $refresh = $_REQUEST['obm_refresh']; } +else { $refresh = false; } + +// added for auto refresh +$refresh = true; +// + +$date_start = array(); +$datax = array(); +//get the dates to display +//added to fix the issue4307 +if(isset($_REQUEST['obm_date_start']) && $_REQUEST['obm_date_start'] == '') +{ + $_SESSION['obm_date_start'] = ""; +} +elseif(isset($_REQUEST['obm_date_start']) && $_REQUEST['obm_date_start'] != '') + $_SESSION['obm_date_start'] = $_REQUEST['obm_date_start']; +if(isset($_REQUEST['obm_date_end']) && $_REQUEST['obm_date_end'] == '') +{ + $_SESSION['obm_date_end'] = ""; +} +elseif(isset($_REQUEST['obm_date_end']) && $_REQUEST['obm_date_end'] != '') + $_SESSION['obm_date_end'] = $_REQUEST['obm_date_end']; +if (isset($_SESSION['obm_date_start']) && $_SESSION['obm_date_start'] != '' && !isset($_REQUEST['obm_date_start'])) { + $date_start = $_SESSION['obm_date_start']; + $log->debug("_SESSION['obm_date_start'] is:"); + $log->debug($_SESSION['obm_date_start']); +} +elseif (isset($_REQUEST['obm_date_start']) && $_REQUEST['obm_date_start'] != '') { + $date_start = $_REQUEST['obm_date_start']; + $current_user->setPreference('obm_date_start', $_REQUEST['obm_date_start']); + $log->debug("_REQUEST['obm_date_start'] is:"); + $log->debug($_REQUEST['obm_date_start']); + $log->debug("_SESSION['obm_date_start'] is:"); + $log->debug($_SESSION['obm_date_start']); +} +else { + $date_start = '2000-01-01'; +} + +if (isset($_SESSION['obm_date_end']) && $_SESSION['obm_date_end'] != '' && !isset($_REQUEST['obm_date_end'])) { + $date_end = $_SESSION['obm_date_end']; + $log->debug("_SESSION['obm_date_end'] is:"); + $log->debug($_SESSION['obm_date_end']); +} +elseif (isset($_REQUEST['obm_date_end']) && $_REQUEST['obm_date_end'] != '') { + $date_end = $_REQUEST['obm_date_end']; + $current_user->setPreference('obm_date_end', $_REQUEST['obm_date_end']); + $log->debug("_REQUEST['obm_date_end'] is:"); + $log->debug($_REQUEST['obm_date_end']); + $log->debug("_SESSION['obm_date_end'] is:"); + $log->debug($_SESSION['obm_date_end']); +} +else { + $date_end = '2100-01-01'; +} + +$ids = array(); +//get list of user ids for which to display data +if (isset($_SESSION['obm_ids']) && count($_SESSION['obm_ids']) != 0 && !isset($_REQUEST['obm_ids'])) { + $ids = $_SESSION['obm_ids']; + $log->debug("_SESSION['obm_ids'] is:"); + $log->debug($_SESSION['obm_ids']); +} +elseif (isset($_REQUEST['obm_ids']) && count($_REQUEST['obm_ids']) > 0) { + $ids = $_REQUEST['obm_ids']; + $current_user->setPreference('obm_ids', $_REQUEST['obm_ids']); + $log->debug("_REQUEST['obm_ids'] is:"); + $log->debug($_REQUEST['obm_ids']); + $log->debug("_SESSION['obm_ids'] is:"); + $log->debug($_SESSION['obm_ids']); +} +else { + $ids = get_user_array(false); + $ids = array_keys($ids); +} + +//create unique prefix based on selected vtiger_users for image vtiger_files +$id_hash = ''; +if (isset($ids)) { + sort($ids); + $id_hash = crc32(implode('',$ids)); +} +$log->debug("ids is:"); +$log->debug($ids); + +$cache_file_name = $id_hash."_outcome_by_month_".$current_language."_".crc32($date_start.$date_end).".png"; +$log->debug("cache file name is: $cache_file_name"); + +if(isPermitted('Potentials','index')=="yes") +{ +$draw_this = new jpgraph(); +$width = 850; +$height = 500; +if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') +{ + $width = 350; + $height = 250; +} + +echo $draw_this->outcome_by_month($date_start, $date_end, $ids, $tmp_dir.$cache_file_name, $refresh,$width,$height); +echo "

".$current_module_strings['LBL_MONTH_BY_OUTCOME_DESC']."

"; +if (isset($_REQUEST['obm_edit']) && $_REQUEST['obm_edit'] == 'true') { + $cal_lang = "en"; + $cal_dateformat = parse_calendardate($app_strings['NTC_DATE_FORMAT']); + $cal_dateformat = '%Y-%m-%d'; // fix providedd by Jlee for date bug in Dashboard + +?> + + + + +
+ + + + + + + + + + + + + + + + + + + + + +

'>

'>

+
+ + +getDBInsertDateValue(); + } + else { + $file_date = ''; + } +?> +
+ +[] +[] +
+ \ No newline at end of file diff --git a/modules/Dashboard/Chart_pipeline_by_lead_source.php b/modules/Dashboard/Chart_pipeline_by_lead_source.php new file mode 100644 index 0000000..1bfbc72 --- /dev/null +++ b/modules/Dashboard/Chart_pipeline_by_lead_source.php @@ -0,0 +1,162 @@ +id.'.php'); +require('user_privileges/user_privileges_'.$current_user->id.'.php'); + +// Get _dom arrays from Database +$comboFieldNames = Array('leadsource'=>'lead_source_dom'); +$comboFieldArray = getComboArray($comboFieldNames); + +$log = LoggerManager::getLogger('CSIM_pipeline_by_lead_source'); + +if (isset($_REQUEST['pbls_refresh'])) { $refresh = $_REQUEST['pbls_refresh']; } +else { $refresh = false; } + +// added for auto refresh +$refresh = true; +// + +$tempx = array(); +$datax = array(); +//get list of sales stage keys to display +if (isset($_SESSION['pbls_lead_sources']) && count($_SESSION['pbls_lead_sources']) > 0 && !isset($_REQUEST['pbls_lead_sources'])) { + $tempx = $_SESSION['pbls_lead_sources']; + $log->debug("_SESSION['pbls_lead_sources'] is:"); + $log->debug($_SESSION['pbls_lead_sources']); +} +elseif (isset($_REQUEST['pbls_lead_sources']) && count($_REQUEST['pbls_lead_sources']) > 0) { + $tempx = $_REQUEST['pbls_lead_sources']; + $current_user->setPreference('pbls_lead_sources', $_REQUEST['pbls_lead_sources']); + $log->debug("_REQUEST['pbls_lead_sources'] is:"); + $log->debug($_REQUEST['pbls_lead_sources']); + $log->debug("_SESSION['pbls_lead_sources'] is:"); + $log->debug($_SESSION['pbls_lead_sources']); +} + +//set $datax using selected sales stage keys +if (count($tempx) > 0) { + foreach ($tempx as $key) { + $datax[$key] = $comboFieldArray['lead_source_dom'][$key]; + } +} +else { + $datax = $comboFieldArray['lead_source_dom']; +} +$log->debug("datax is:"); +$log->debug($datax); + +$ids = array(); +//get list of user ids for which to display data +if (isset($_SESSION['pbls_ids']) && count($_SESSION['pbls_ids']) != 0 && !isset($_REQUEST['pbls_ids'])) { + $ids = $_SESSION['pbls_ids']; + $log->debug("_SESSION['pbls_ids'] is:"); + $log->debug($_SESSION['pbls_ids']); +} +elseif (isset($_REQUEST['pbls_ids']) && count($_REQUEST['pbls_ids']) > 0) { + $ids = $_REQUEST['pbls_ids']; + $current_user->setPreference('pbls_ids', $ids); + $log->debug("_REQUEST['pbls_ids'] is:"); + $log->debug($_REQUEST['pbls_ids']); + $log->debug("_SESSION['pbls_ids'] is:"); + $log->debug($_SESSION['pbls_ids']); +} +else { + $ids = get_user_array(false); + $ids = array_keys($ids); +} + +//create unique prefix based on selected vtiger_users for image vtiger_files +$id_hash = ''; +if (isset($ids)) { + sort($ids); + $id_hash = crc32(implode('',$ids)); +} +$log->debug("ids is:"); +$log->debug($ids); + +$cache_file_name = $id_hash."_pipeline_by_lead_source_".$current_language."_".crc32(implode('',$datax)).".png"; +$log->debug("cache file name is: $cache_file_name"); + +if(isPermitted('Potentials','index')=="yes") +{ +$draw_this = new jpgraph(); +$width = 850; +$height = 500; +if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') +{ + $width = 350; + $height = 250; +} + + +echo $draw_this->pipeline_by_lead_source($datax, $ids, $tmp_dir.$cache_file_name, $refresh,$width,$height); +echo "

".$current_module_strings['LBL_LEAD_SOURCE_FORM_DESC']."

"; +if (isset($_REQUEST['pbls_edit']) && $_REQUEST['pbls_edit'] == 'true') { +?> +
+ + + + + + + + + + + + + + + + + +

+
+getDBInsertDateValue(); + } + else { + $file_date = ''; + } +?> +
+ +[] +[] +
+ \ No newline at end of file diff --git a/modules/Dashboard/Chart_pipeline_by_sales_stage.php b/modules/Dashboard/Chart_pipeline_by_sales_stage.php new file mode 100644 index 0000000..34cc6a0 --- /dev/null +++ b/modules/Dashboard/Chart_pipeline_by_sales_stage.php @@ -0,0 +1,236 @@ +id.'.php'); +require('user_privileges/user_privileges_'.$current_user->id.'.php'); +$log = LoggerManager::getLogger('pipeline_by_sales_stage'); + +if (isset($_REQUEST['pbss_refresh'])) { $refresh = $_REQUEST['pbss_refresh']; } +else { $refresh = false; } + +// added for auto refresh +$refresh = true; +// + +// Get _dom Arrays from Database +$comboFieldNames = Array('sales_stage'=>'sales_stage_dom'); +$comboFieldArray = getComboArray($comboFieldNames); +//added to fix the issue 4307 +if(isset($_REQUEST['pbss_date_start']) && $_REQUEST['pbss_date_start'] == '') +{ + $_SESSION['pbss_date_start'] = ""; +} +elseif(isset($_REQUEST['pbss_date_start']) && $_REQUEST['pbss_date_start'] != '') + $_SESSION['pbss_date_start']=$_REQUEST['pbss_date_start']; +if(isset($_REQUEST['pbss_date_end']) && $_REQUEST['pbss_date_end'] == '') +{ + $_SESSION['pbss_date_end'] = ""; +} +elseif(isset($_REQUEST['pbss_date_start']) && $_REQUEST['pbss_date_end'] != '') + $_SESSION['pbss_date_end'] = $_REQUEST['pbss_date_end']; +//get the dates to display +if (isset($_SESSION['pbss_date_start']) && $_SESSION['pbss_date_start'] != '' && !isset($_REQUEST['pbss_date_start'])) { + $date_start = $_SESSION['pbss_date_start']; + $log->debug("_SESSION['pbss_date_start'] is:"); + $log->debug($_SESSION['pbss_date_start']); +} +elseif (isset($_REQUEST['pbss_date_start']) && $_REQUEST['pbss_date_start'] != '') { + $date_start = $_REQUEST['pbss_date_start']; + $current_user->setPreference('pbss_date_start', $_REQUEST['pbss_date_start']); + $log->debug("_REQUEST['pbss_date_start'] is:"); + $log->debug($_REQUEST['pbss_date_start']); + $log->debug("_SESSION['pbss_date_start'] is:"); + $log->debug($_SESSION['pbss_date_start']); +} +else { + $date_start = "2001-01-01"; +} + +if (isset($_SESSION['pbss_date_end']) && $_SESSION['pbss_date_end'] != '' && !isset($_REQUEST['pbss_date_end'])) { + $date_end = $_SESSION['pbss_date_end']; + $log->debug("_SESSION['pbss_date_end'] is:"); + $log->debug($_SESSION['pbss_date_end']); +} +elseif (isset($_REQUEST['pbss_date_end']) && $_REQUEST['pbss_date_end'] != '') { + $date_end = $_REQUEST['pbss_date_end']; + $current_user->setPreference('pbss_date_end', $_REQUEST['pbss_date_end']); + $log->debug("_REQUEST['pbss_date_end'] is:"); + $log->debug($_REQUEST['pbss_date_end']); + $log->debug("_SESSION['pbss_date_end'] is:"); + $log->debug($_SESSION['pbss_date_end']); +} +else { + $date_end = '2100-01-01'; +} + +$tempx = array(); +$datax = array(); +//get list of sales stage keys to display +if (isset($_SESSION['pbss_sales_stages']) && count($_SESSION['pbss_sales_stages']) > 0 && !isset($_REQUEST['pbss_sales_stages'])) { + $tempx = $_SESSION['pbss_sales_stages']; + $log->debug("_SESSION['pbss_sales_stages'] is:"); + $log->debug($_SESSION['pbss_sales_stages']); +} +elseif (isset($_REQUEST['pbss_sales_stages']) && count($_REQUEST['pbss_sales_stages']) > 0) { + $tempx = $_REQUEST['pbss_sales_stages']; + $current_user->setPreference('pbss_sales_stages', $_REQUEST['pbss_sales_stages']); + $log->debug("_REQUEST['pbss_sales_stages'] is:"); + $log->debug($_REQUEST['pbss_sales_stages']); + $log->debug("_SESSION['pbss_sales_stages'] is:"); + $log->debug($_SESSION['pbss_sales_stages']); +} + +//set $datax using selected sales stage keys +if (count($tempx) > 0) { + foreach ($tempx as $key) { + $datax[$key] = $comboFieldArray['sales_stage_dom'][$key]; + } +} +else { + $datax = $comboFieldArray['sales_stage_dom']; +} +$log->debug("datax is:"); +$log->debug($datax); + +$ids = array(); +//get list of user ids for which to display data +if (isset($_SESSION['pbss_ids']) && count($_SESSION['pbss_ids']) != 0 && !isset($_REQUEST['pbss_ids'])) { + $ids = $_SESSION['pbss_ids']; + $log->debug("_SESSION['pbss_ids'] is:"); + $log->debug($_SESSION['pbss_ids']); +} +elseif (isset($_REQUEST['pbss_ids']) && count($_REQUEST['pbss_ids']) > 0) { + $ids = $_REQUEST['pbss_ids']; + $current_user->setPreference('pbss_ids', $_REQUEST['pbss_ids']); + $log->debug("_REQUEST['pbss_ids'] is:"); + $log->debug($_REQUEST['pbss_ids']); + $log->debug("_SESSION['pbss_ids'] is:"); + $log->debug($_SESSION['pbss_ids']); +} +else { + $ids = get_user_array(false); + $ids = array_keys($ids); +} + +//create unique prefix based on selected users for image files +$id_hash = ''; +if (isset($ids)) { + sort($ids); + $id_hash = crc32(implode('',$ids)); +} +$log->debug("ids is:"); +$log->debug($ids); + +$cache_file_name = $id_hash."_pipeline_".$current_language."_".crc32(implode('',$datax)).$date_start.$date_end.".png"; +$log->debug("cache file name is: $cache_file_name"); + +if(isPermitted('Potentials','index')=="yes") +{ +$draw_this = new jpgraph(); +$width = 850; +$height = 500; +if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') +{ + $width = 350; + $height = 250; +} + + +echo $draw_this->pipeline_by_sales_stage($datax, $date_start, $date_end, $ids, $tmp_dir.$cache_file_name, $refresh,$width,$height); +echo "

".$current_module_strings['LBL_SALES_STAGE_FORM_DESC']."

"; +if (isset($_REQUEST['pbss_edit']) && $_REQUEST['pbss_edit'] == 'true') { + $cal_lang = "en"; + $cal_dateformat = parse_calendardate($app_strings['NTC_DATE_FORMAT']); + $cal_dateformat = '%Y-%m-%d'; // fix providedd by Jlee for date bug in Dashboard + +?> + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +

'>

'>

+
+ + +getDBInsertDateValue(); + } + else { + $file_date = ''; + } +?> +
+ +[] +[] +
+ diff --git a/modules/Dashboard/DashboardAjax.php b/modules/Dashboard/DashboardAjax.php new file mode 100644 index 0000000..3dfc7b7 --- /dev/null +++ b/modules/Dashboard/DashboardAjax.php @@ -0,0 +1,14 @@ + diff --git a/modules/Dashboard/DashboardHome.php b/modules/Dashboard/DashboardHome.php new file mode 100644 index 0000000..ca8984e --- /dev/null +++ b/modules/Dashboard/DashboardHome.php @@ -0,0 +1,170 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + +
1  
+ +
+ + + + + + + + + +
1234
+
 
+ + + + + + + + +
2  
+
+ + + + + + + + + +
1234
+
 
+ + + + + + + + +
3  
+
+ + + + + + + + + +
1234
+
 
+ + + + + + + + +
4  
+
+ + + + + + + + + +
1234
+
 
+ diff --git a/modules/Dashboard/DashboardHome_matrix.php b/modules/Dashboard/DashboardHome_matrix.php new file mode 100644 index 0000000..c1786a8 --- /dev/null +++ b/modules/Dashboard/DashboardHome_matrix.php @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + +
1  
+
+
+ + + + + + + +
+ + + + + + + + +
2  
+
+

+ + + + + + + + +
+ + + + + + + + +
3  
+
+
+ + + + + + + +
+ + + + + + + + +
4  
+
+

+ diff --git a/modules/Dashboard/Entity_charts.php b/modules/Dashboard/Entity_charts.php new file mode 100644 index 0000000..3d009e2 --- /dev/null +++ b/modules/Dashboard/Entity_charts.php @@ -0,0 +1,851 @@ +pquery($acc_qry, array($acc_id)); + $no_acc_rows=$adb->num_rows($acc_result); + + if($no_acc_rows!=0) + { + while($acc_row = $adb->fetch_array($acc_result)) + { + $name_val=$acc_row['accountname']; + } + $name=$name_val; + } + else + $name=""; + return $name; +} + + +/** + * Performance Optimization: Module Chart for Home Page Dashboard + */ +function module_Chart_HomePageDashboard($userinfo) { + + global $adb, $app_strings; + + $user_id = $userinfo->id; + + $graph_details = Array(); + $modrecords = Array(); + + // List of modules which needs to be considered for chart + $module_list = Array('Accounts','Potentials','Contacts','Leads','Quotes','SalesOrder','PurchaseOrder','Invoice','HelpDesk','Calendar','Campaigns'); + // List of special module to handle + $spl_modules = Array('Leads', 'HelpDesk', 'Potentials', 'Calendar'); + + // Leads module + $leadcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_leaddetails le on le.leadid = se.crmid + WHERE se.deleted = 0 AND se.smownerid = $user_id AND (le.converted = 0 OR le.converted IS NULL)"); + $modrecords['Leads'] = $adb->query_result($leadcountres, 0, 'count'); + + // HelpDesk module + $helpdeskcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_troubletickets tt ON tt.ticketid = se.crmid + WHERE se.deleted = 0 AND se.smownerid = $user_id AND (tt.status != 'Closed' OR tt.status IS NULL)"); + $modrecords['HelpDesk']=$adb->query_result($helpdeskcountres,0,'count'); + + // Potentials module + $potcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_potential pot ON pot.potentialid = se.crmid + WHERE se.deleted = 0 AND se.smownerid = $user_id AND (pot.sales_stage NOT IN ('".$app_strings['LBL_CLOSE_WON']."','". + $app_strings['LBL_CLOSE_LOST']."') OR pot.sales_stage IS NULL)"); + $modrecords['Potentials']= $adb->query_result($potcountres,0,'count'); + + // Calendar moudule + $calcountres = $adb->query("SELECT count(*) as count FROM vtiger_crmentity se INNER JOIN vtiger_activity act ON act.activityid = se.crmid + WHERE se.deleted = 0 AND se.smownerid = $user_id AND act.activitytype != 'Emails' AND + ((act.status!='Completed' AND act.status!='Deferred') OR act.status IS NULL) + AND ((act.eventstatus!='Held' AND act.eventstatus!='Not Held') OR act.eventstatus IS NULL)"); + $modrecords['Calendar']= $adb->query_result($calcountres,0,'count'); + + // Ignore the special module + $nor_modules = array_diff($module_list, $spl_modules); + // Prepare module string to use in SQL (check permission) + $inmodulestr = ''; + foreach($nor_modules as $modulename) { + if(isPermitted("$modulename","index",'') == 'yes') { + if($inmodulestr != '') $inmodulestr .= ",'$modulename'"; + else $inmodulestr = "'$modulename'"; + } + } + + // Get count for module that needs special conditions + $query = "SELECT setype, count(setype) setype_count FROM vtiger_crmentity se WHERE + se.deleted = 0 AND se.smownerid=$user_id AND se.setype in ($inmodulestr) GROUP BY se.setype"; + $queryres = $adb->query($query); + while($resrow = $adb->fetch_array($queryres)) { + $modrecords[$resrow['setype']] = $resrow['setype_count']; + } + + // Get module custom filter info + $cvidres = $adb->query("SELECT cvid,entitytype FROM vtiger_customview WHERE viewname='All' AND entitytype in ('". + implode("','", array_keys($modrecords)). "')"); + + $cvidinfo = Array(); + while($cvidrow = $adb->fetch_array($cvidres)) { + $cvidinfo[$cvidrow['entitytype']] = $cvidrow['cvid']; + } + + $name_val = ''; + $cnt_val = ''; + $target_val = ''; + $urlstring = ''; + $cnt_table = ''; + $test_target_val=''; + + $total_records= 0; + foreach($module_list as $modulename) { + if(isset($modrecords[$modulename])) { + $modrec_count = $modrecords[$modulename]; + if($modrec_count > 0) { + if($name_val != '') $name_val .= '::'; + $name_val .= $modulename; + + if($cnt_val != '') $cnt_val .= '::'; + $cnt_val .= $modrec_count; + + $modviewid = $cvidinfo[$modulename]; + $username = getFullNameFromArray('Users', $userinfo->column_fields); + if($target_val!= '') $target_val.= '::'; + $target_val.= urlencode("index.php?module=$modulename&action=ListView&from_homepagedb=true&type=dbrd&query=true&owner=$username&viewname=$modviewid"); + if($test_target_val!='') $test_target_val.= 'K'; + $test_target_val.=urlencode("index.php?module=$modulename&action=ListView&from_homepagedb=true&type=dbrd&query=true&owner=$username&viewname=$modviewid"); + + $urlstring .= 'K'; + $cnt_table .= ""; + + $total_records += $modrec_count; + } + } + } + $cnt_table .= '
StatusTotal
$modulename$modrec_count
'; + + $graph_details[] = $name_val; + $graph_details[] = $cnt_val; + $graph_details[] = " $userinfo->user_name : $total_records "; + $graph_details[] = $target_val; + $graph_details[] = ''; + $graph_details[] = $urlstring; + $graph_details[] = $cnt_table; + $graph_details[] = $test_target_val; + + return $graph_details; +} +/** END **/ + +/* Function returns the values to render the graph for a particular type + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * Contributor(s): ______________________________________.. +*/ + +// TO get the Values for a particular graph type +function module_Chart($user_id,$date_start="2000-01-01",$end_date="2017-01-01",$query,$graph_for,$title,$added_qry="",$module="",$graph_type) +{ + + global $adb,$current_user,$mod_strings, $default_charset; + global $days,$date_array,$period_type; + + if($added_qry!="") + $query.=$added_qry; + + $result=$adb->query($query); + + $no_of_rows=$adb->num_rows($result); + $mod_count_array=array(); + $search_str_array=array(); + $mod_name_array=array(); + $count_by_date[]=array(); + $mod_tot_cnt_array=array(); + + $mod_name_val=""; + $mod_cnt_crtd_date=""; + $target_val=""; + $bar_target_val=""; + $test_target_val=""; + + if($no_of_rows!=0) + { + while($row = $adb->fetch_array($result)) + { + if($graph_for == 'sostatus'||$graph_for == 'leadsource'||$graph_for == 'leadstatus'||$graph_for == 'industry'||$graph_for == 'productcategory'||$graph_for =='postatus'||$graph_for == 'invoicestatus'||$graph_for == 'ticketstatus'||$graph_for == 'priority'||$graph_for == 'category'||$graph_for == 'quotestage'||$graph_for == 'salesstage') + { + $mod_name= getTranslatedString($row[$graph_for]); + $search_str = $row[$graph_for]; + } + else + { + $mod_name= $row[$graph_for]; + $search_str = $row[$graph_for]; + } + if($mod_name=="") + { + $mod_name=$mod_strings["Un Assigned"]; + $search_str = " "; + } + $crtd_time=$row['createdtime']; + $crtd_time_array=explode(" ",$crtd_time); + $crtd_date=$crtd_time_array[0]; + if(!isset($mod_tot_cnt_array[$crtd_date])) + $mod_tot_cnt_array[$crtd_date]=0; + + $mod_tot_cnt_array[$crtd_date]+=1; + + if (in_array($mod_name,$mod_name_array) == false) + { $uniqueid[$mod_name]='0'; + array_push($mod_name_array,$mod_name); // getting all the unique Names into the array + if($graph_for == "productname") + { + if($row['qtyinstock'] =='') + $mod_count_array[$mod_name] = 1; + else + $mod_count_array[$mod_name]=$row['qtyinstock']; + } + } + else + { + if($graph_for == "productname") + { + $uniqueid[$mod_name]=$uniqueid[$mod_name]+1; $mod_name=$mod_name.'['.$uniqueid[$mod_name].']'; array_push($mod_name_array,$mod_name); // getting all the unique Names into the array + + if($row['qtyinstock'] =='') + $mod_count_array[$mod_name] = 1; + else + $mod_count_array[$mod_name]=$row['qtyinstock']; + } + } + if (in_array($search_str,$search_str_array) == false) + { + array_push($search_str_array,$search_str); + } + + //Counting the number of values for a type of graph + if($graph_for == "productname") + { + if($row['qtyinstock'] =='') + $mod_count_array[$mod_name] = 1; + else + $mod_count_array[$mod_name]=$row['qtyinstock']; + + } + else + { + if(!isset($mod_count_array[$mod_name])) + $mod_count_array[$mod_name]=0; + $mod_count_array[$mod_name]++; + } + + //Counting the number of values for a type of graph for a particular date + if(!isset($count_by_date[$mod_name][$crtd_date])) + $count_by_date[$mod_name][$crtd_date]=0; + + $count_by_date[$mod_name][$crtd_date]+=1; + } + $mod_by_mod_cnt=count($mod_name_array); + + if($mod_by_mod_cnt!=0) + { + $url_string=""; + + $mod_cnt_table=" + "; + + //Assigning the Header values to the vtiger_table and giving the dates as graphformat + for($i=0; $i<$days; $i++) + { + $tdate=$date_array[$i]; + $values=Graph_n_table_format($period_type,$tdate); + $graph_format=$values[0]; + $table_format=$values[1]; + $mod_cnt_table.= ""; + } + $mod_cnt_table .= "" ; + + //For all type of the array + for ($i=0;$ipquery($query, array($mod_name)); + $name_val = $adb->query_result($result,0,"productname"); + if($name_val!="") + { + $mod_name=$name_val; + $search_str=$name_val; + } + } + if($graph_for =="purchaseorderid") + { + $query = "SELECT subject FROM vtiger_purchaseorder WHERE purchaseorderid=?"; + $result = $adb->pquery($query, array($mod_name)); + $name_val = $adb->query_result($result,0,"subject"); + $id_name = $mod_name; + if($name_val!="") + { + $mod_name=$name_val; + $search_str=$name_val; + } + } + if($graph_for =="quoteid") + { + $query = "SELECT subject FROM vtiger_quotes WHERE quoteid=?"; + $result = $adb->pquery($query, array($mod_name)); + $name_val = $adb->query_result($result,0,"subject"); + $id_name = $mod_name; + if($name_val!="") + { + $mod_name=$name_val; + $search_str=$name_val; + } + } + if($graph_for =="invoiceid") + { + $query = "SELECT subject FROM vtiger_invoice WHERE invoiceid=?"; + $result = $adb->pquery($query, array($mod_name)); + $name_val = $adb->query_result($result,0,"subject"); + $id_name = $mod_name; + if($name_val!="") + { + $mod_name=$name_val; + $search_str=$name_val; + } + } + if($graph_for =="campaignid") + { + //this will return the list of the names of the campaign``:w for the y-axis + $query = "SELECT campaignname FROM vtiger_campaign WHERE campaignid=?"; + $result = $adb->pquery($query, array($mod_name)); + $name_val = $adb->query_result($result,0,"campaignname"); + $id_name = $mod_name; + if($name_val!="") + { + $mod_name=$name_val; + $search_str=$name_val; + } + } + if($graph_for =="parent_id" || $graph_for =="related_to") + { + $seType = getSalesEntityType($mod_name); + if($seType == 'Contacts') { + $query = "SELECT lastname, firstname FROM vtiger_contactdetails + WHERE contactid=?"; + $result = $adb->pquery($query, array($mod_name)); + $name_val = $adb->query_result($result,0,"lastname"); + if($name_val!="") { + if(getFieldVisibilityPermission('Contacts', $current_user->id, + 'firstname') == '0') { + $first_name = $adb->query_result($result,0,"firstname"); + if($first_name != '') { + $name_val .= " ".$first_name; + } + } + } + } else { + $query = "SELECT accountname FROM vtiger_account WHERE accountid=?"; + $result = $adb->pquery($query, array($mod_name)); + $name_val = $adb->query_result($result,0,"accountname"); + } + $mod_name=$name_val; + $search_str=$name_val; + } + //Passing name to graph + $mod_name = str_replace(":", ":", $mod_name); + if($mod_name_val!="") $mod_name_val.="::$mod_name"; + else $mod_name_val="$mod_name"; + + + //Passing count to graph + if($mod_cnt_val!="") $mod_cnt_val.="::$mod_count_val"; + else $mod_cnt_val="$mod_count_val"; + if($module!="") + { + //Check for Ticket Priority + if(($graph_type=="ticketsbypriority")) + { + $graph_for="ticketpriorities"; + } + + //added to get valid url in dashbord for tickets by team + if($graph_for == "smownerid"){ + $searchField = "assigned_user_id"; + } elseif($graph_for == 'category') { + $searchField = 'ticketcategories'; + } elseif($graph_for == 'priority') { + $searchField = 'ticketpriorities'; + } elseif($graph_for == "accountid") { + $searchField = "account_id"; + } else{ + $searchField = $graph_for; + } + $cvid = getCvIdOfAll($module); + if($module == "Home") + { + $cvid = getCvIdOfAll($mod_name); + $link_val="index.php?module=".$mod_name."&action=ListView&from_homepagedb=true&type=dbrd&query=true&owner=".$current_user->user_name."&viewname=".$cvid; + } + else if($module == "Contacts" || ($module=="Products" && ($graph_for == "quoteid" || $graph_for == "invoiceid" || $graph_for == "purchaseorderid"))) + $link_val="index.php?module=".$module."&action=ListView&from_dashboard=true&type=dbrd&query=true&".$searchField."=".$id_name."&viewname=".$cvid; + else { + $esc_search_str = urlencode($search_str); + //$esc_search_str = htmlentities($search_str, ENT_QUOTES, $default_charset); + $link_val="index.php?module=".$module."&action=index&from_dashboard=true&search_text=".$esc_search_str."&search_field=".$searchField."&searchtype=BasicSearch&query=true&type=entchar&operator=e&viewname=".$cvid; + } + + //Adding the links to the graph + $link_val = str_replace(':', ':', $link_val); + if($i==0) + $bar_target_val .=$link_val; + else + $bar_target_val .="::".$link_val; + } + //The data as per given date + if($i==0) + $urlstring .=$mod_cnt_crtd_date; + else + $urlstring .="K".$mod_cnt_crtd_date; + + if($i==0) + $test_target_val.=$link_val; + else + $test_target_val.="K".$link_val; + } + $mod_cnt_table .=""; + //For all Days getting the vtiger_table + for($k=0; $k<$days;$k++) + { + $tdate=$date_array[$k]; + if(!isset($mod_tot_cnt_array[$tdate])) + $mod_tot_cnt_array[$tdate]="0"; + $tot= $mod_tot_cnt_array[$tdate]; + if($period_type!="yday") + $mod_cnt_table.=""; + } + if($graph_for == "productname") + { + $cnt_total=array_sum($mod_count_array); + } + else + { + $cnt_total=array_sum($mod_tot_cnt_array); + } + + $mod_cnt_table.="
Status $table_formatTotal
Total$tot$cnt_total
"; + $mod_cnt_table.="
"; + $title_of_graph="$title : $cnt_total"; + $bar_target_val=urlencode($bar_target_val); + $test_target_val=urlencode($test_target_val); + + + $Prod_mod_val=array($mod_name_val,$mod_cnt_val,$title_of_graph,$bar_target_val,$mod_graph_date,$urlstring,$mod_cnt_table,$test_target_val); + return $Prod_mod_val; + } + else + { + $data=0; + + } + + } + else + { + $data=0; + return "

The data is not available with the specified time period

"; + } + return $data; +} + + +/** Saving the images of the graph in the /cache/images + * otherwise it will render the graph with the given details + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * Contributor(s): ______________________________________.. +*/ + + +function save_image_map($filename,$image_map) +{ + + + global $log; + + if (!$handle = fopen($filename, 'w')) { + $log->debug(" Cannot open file ($filename)"); + return; + } + + // Write $somecontent to our opened file. + if (fwrite($handle, $image_map) === FALSE) { + $log->debug(" Cannot write to file ($filename)"); + return false; + } + + fclose($handle); + return true; +} + +function get_graph_by_type($graph_by,$graph_title,$module,$where,$query,$width=900,$height=900,$frompage='') +{ + global $user_id,$date_start,$end_date,$type,$mod_strings; + $time = time(); + //Giving the Cached image name + $cache_file_name=abs(crc32($user_id))."_".$type."_".crc32($date_start.$end_date).$time.".png"; + $html_imagename=$graph_by; //Html image name for the graph + + $graph_details=module_Chart($user_id,$date_start,$end_date,$query,$graph_by,$graph_title,$where,$module,$type); + if($graph_details!=0) + { + $name_val=$graph_details[0]; + $cnt_val=$graph_details[1]; + $graph_title=$graph_details[2]; + $target_val=$graph_details[3]; + $graph_date=$graph_details[4]; + $urlstring=$graph_details[5]; + $cnt_table=$graph_details[6]; + $test_target_val=$graph_details[7]; + + if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') + { + $width = 250; + $height = 250; + }else + { + $width = 850; + $height = 500; + } + + $top=20; + $left=140; + $bottom=120; + $title=$graph_title; + if($frompage != '') + { + //echo $width.'------'.$height.'------'.$left.'------'.$right.'------'.$top.'------'.$bottom.'------'.$title.'------'.$test_target_val.'------'.$date_start.'------'.$end_date; + //die; + return get_graph_homepg($cache_file_name,$html_imagename,$cnt_val,$name_val,280,285,$left,$right,$top,$bottom,$title,$target_val,$graph_date,$urlstring,$test_target_val,$date_start,$end_date); + + }else + { + return get_graph($cache_file_name,$html_imagename,$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$graph_date,$urlstring,$test_target_val,$date_start,$end_date); + } + } + else + { + sleep(1); + echo '

'.$mod_strings['LBL_NO_DATA'].'

'; + } + +} + +/** Returns the Horizontal,vertical, pie graphs and Accumulated Graphs +for the details +* Portions created by vtiger are Copyright (C) vtiger. +* All Rights Reserved. +* Contributor(s): ______________________________________.. +*/ + + +// Function for get graphs +function get_graph($cache_file_name,$html_imagename,$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,$graph_date,$urlstring,$test_target_val,$date_start,$end_date) +{ + + global $tmp_dir; + global $graph_title, $mod_strings; + global $theme; + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $val=explode(":",$title); + $display_title=$val[0]; + + if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') + { + $sHTML .="
"; + } + +$sHTML .= " + + + + + + + + + "; + +$sHTML .= " + + + + + "; + + if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') + { + $sHTML .="
+ + + + + + + +
1".$display_title."
".$mod_strings['LBL_HORZ_BAR_CHART']."
+
"; + if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') + { + $sHTML .= " "; + + }else + { + $sHTML .= " + + + + + + +
".$mod_strings['VIEWCHART']." : 12
"; + } + $sHTML .="
"; + + + $sHTML .= render_graph($tmp_dir."hor_".$cache_file_name,$html_imagename."_hor",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"horizontal"); +//Commented by Minnie -- same content displayed in two graphs +/*$sHTML .= "

+ + + + + + + +
2".$graph_title."
Vertical Bar Chart
+
"; + + $sHTML .= render_graph($tmp_dir."vert_".$cache_file_name,$html_imagename."_vert",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"vertical");*/ + +$sHTML .= "
"; + }else + { + $sHTML .= ""; + } + +$sHTML .= " + + + + + + "; + +if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') +{ + $sHTML .="
 
+ + + + + + + +
2".$graph_title."
".$mod_strings['LBL_PIE_CHART']."
+
"; + if(isset($_REQUEST['display_view']) && $_REQUEST['display_view'] == 'MATRIX') + { + $sHTML .= " "; + + }else + { + $sHTML .= " + + + + + + +
".$mod_strings['VIEWCHART']." : 12
"; + } + $sHTML .="
"; + + $sHTML .= render_graph($tmp_dir."pie_".$cache_file_name,$html_imagename."_pie",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"pie"); + +$sHTML .= "
 
+ + + + + + + +
1".$graph_title."
Horizontal Bar Chart
+
"; + + $sHTML .= render_graph($tmp_dir."hor_".$cache_file_name,$html_imagename."_hor",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"horizontal"); +//Commented by Minnie -- same content displayed in to graphs +/*$sHTML .= "

+ + + + + + + +
2".$graph_title."
Vertical Bar Chart
+
"; + + $sHTML .= render_graph($tmp_dir."vert_".$cache_file_name,$html_imagename."_vert",$cnt_val,$name_val,$width,$height,$left,$right,$top,$bottom,$title,$target_val,"vertical");*/ + +$sHTML .= "

+ + + + + + + +
2".$graph_title."
Pie Chart
+
"; + + $sHTML .= render_graph($tmp_dir."pie_".$cache_file_name,$html_imagename."_pie",$cnt_val,$name_val,$width,$height,40,$right,$top,$bottom,$title,$target_val,"pie"); + +$sHTML .= "

'; + //Charts for Lead Source + if($profileTabsPermission[getTabid("Leads")] == 0 && ($type == "leadsource") && (getFieldVisibilityPermission('Leads',$user_id,'leadsource') == "0")) + { + $graph_by="leadsource"; + $graph_title= $mod_strings['leadsource']; + $module="Leads"; + $where=""; + $query=getDashboardQuery($leads_query,$module); + //$html .= get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + // To display the charts for Lead status + elseif ($profileTabsPermission[getTabid("Leads")] == 0 && ($type == "leadstatus")&& (getFieldVisibilityPermission('Leads',$user_id,'leadstatus') == "0")) + { + $graph_by="leadstatus"; + $graph_title= $mod_strings['leadstatus']; + $module="Leads"; + $where=""; + $query=getDashboardQuery($leads_query,$module); + if(!$is_admin) + $query .= ' and vtiger_leaddetails.leadstatus '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Charts for Lead Industry + elseif ($profileTabsPermission[getTabid("Leads")] == 0 && ($type == "leadindustry") && (getFieldVisibilityPermission('Leads',$user_id,'industry') == "0")) + { + $graph_by="industry"; + $graph_title=$mod_strings['leadindustry']; + $module="Leads"; + $where=""; + $query=getDashboardQuery($leads_query,$module); + if(!$is_admin) + $query .= ' and vtiger_leaddetails.industry '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Sales by Lead Source + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyleadsource")&& (getFieldVisibilityPermission('Potentials',$user_id,'leadsource') == "0")) + { + $graph_by="leadsource"; + $graph_title=$mod_strings['salesbyleadsource']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like 'Closed Won' "; + $query=getDashboardQuery($potential_query,$module); + if(!$is_admin) + $query .= ' and vtiger_potential.leadsource '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Sales by Account + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyaccount") && (getFieldVisibilityPermission('Potentials',$user_id,'related_to') == "0")) + { + $graph_by="related_to"; + $graph_title=$mod_strings['salesbyaccount']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like 'Closed Won' "; + $query=getDashboardQuery($potential_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Sales by User + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyuser")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['salesbyuser']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like 'Closed Won' and (vtiger_groups.groupname is NULL)"; + $query=getDashboardQuery($potential_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Sales by team + elseif ($profileTabsPermission[getTabid("Potentials")] == 0 && ($type == "salesbyteam")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['salesbyteam']; + $module="Potentials"; + $where=" and vtiger_potential.sales_stage like 'Closed Won' and (vtiger_groups.groupname != NULL || vtiger_groups.groupname != '')"; + $query=getDashboardQuery($potential_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Charts for Account by Industry + elseif ($profileTabsPermission[getTabid("Accounts")] == 0 && ($type == "accountindustry") && (getFieldVisibilityPermission('Accounts',$user_id,'industry') == "0")) + { + $graph_by="industry"; + $graph_title=$mod_strings['accountindustry']; + $module="Accounts"; + $where=""; + $query=getDashboardQuery($account_query,$module); + if(!$is_admin) + $query .= ' and vtiger_account.industry '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Charts for Products by Category + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productcategory") && (getFieldVisibilityPermission('Products',$user_id,'productcategory') == "0")) + { + $graph_by="productcategory"; + $graph_title=$mod_strings['productcategory']; + $module="Products"; + $where=""; + $query=getDashboardQuery($product_category,$module); + if(!$is_admin) + $query .= ' and vtiger_products.productcategory '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Charts for Products by Quantity in stock + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbyqtyinstock") && (getFieldVisibilityPermission('Products',$user_id,'qtyinstock') == "0")) + { + $graph_by="productname"; + $graph_title=$mod_strings['productbyqtyinstock']; + $module="Products"; + $where=""; + $query=getDashboardQuery($products_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Charts for Products by PO + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbypo") && $profileTabsPermission[getTabid("PurchaseOrder")] == 0) + { + $graph_by="purchaseorderid"; + $graph_title=$mod_strings['productbypo']; + $module="Products"; + $where=""; + $query=getDashboardQuery($probyPO,"PurchaseOrder"); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Charts for Products by Quotes + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbyquotes") && $profileTabsPermission[getTabid("Quotes")] == 0) + { + $graph_by="quoteid"; + $graph_title=$mod_strings['productbyquotes']; + $module="Products"; + $where=""; + $query=getDashboardQuery($probyQ,"Quotes"); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Charts for Products by Invoice + elseif ($profileTabsPermission[getTabid("Products")] == 0 && ($type == "productbyinvoice") && $profileTabsPermission[getTabid("Invoice")] == 0) + { + $graph_by="invoiceid"; + $graph_title=$mod_strings['productbyinvoice']; + $module="Products"; + $where=""; + $query=getDashboardQuery($probyInv,"Invoice"); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + + // Sales Order by Accounts + elseif ($profileTabsPermission[getTabid("SalesOrder")] == 0 && ($type == "sobyaccounts") && (getFieldVisibilityPermission('SalesOrder',$user_id,'account_id') == "0")) + { + $graph_by="accountid"; + $graph_title=$mod_strings['sobyaccounts']; + $module="SalesOrder"; + $where=""; + $query=getDashboardQuery($so_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Sales Order by Status + elseif ($profileTabsPermission[getTabid("SalesOrder")] == 0 && ($type == "sobystatus") && (getFieldVisibilityPermission('SalesOrder',$user_id,'sostatus') == "0")) + { + $graph_by="sostatus"; + $graph_title=$mod_strings['sobystatus']; + $module="SalesOrder"; + $where=""; + $query=getDashboardQuery($so_query,$module); + if(!$is_admin) + $query .= ' and vtiger_salesorder.sostatus '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Purchase Order by Status + elseif ($profileTabsPermission[getTabid("PurchaseOrder")] == 0 && ($type == "pobystatus") && (getFieldVisibilityPermission('PurchaseOrder',$user_id,'postatus') == "0")) + { + $graph_by="postatus"; + $graph_title=$mod_strings['pobystatus']; + $module="PurchaseOrder"; + $where=""; + $query=getDashboardQuery($po_query,$module); + if(!$is_admin) + $query .= ' and vtiger_purchaseorder.postatus '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Quotes by Accounts + elseif ($profileTabsPermission[getTabid("Quotes")] == 0 && ($type == "quotesbyaccounts") && (getFieldVisibilityPermission('Quotes',$user_id,'account_id') == "0")) + { + $graph_by="accountid"; + $graph_title= $mod_strings['quotesbyaccounts']; + $module="Quotes"; + $where=""; + $query=getDashboardQuery($quotes_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Quotes by Stage + elseif ($profileTabsPermission[getTabid("Quotes")] == 0 && ($type == "quotesbystage") && (getFieldVisibilityPermission('Quotes',$user_id,'quotestage') == "0")) + { + $graph_by="quotestage"; + $graph_title=$mod_strings['quotesbystage']; + $module="Quotes"; + $where=""; + $query=getDashboardQuery($quotes_query,$module); + if(!$is_admin) + $query .= ' and vtiger_quotes.quotestage '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Invoice by Accounts + elseif ($profileTabsPermission[getTabid("Invoice")] == 0 && ($type == "invoicebyacnts") && (getFieldVisibilityPermission('Invoice',$user_id,'account_id') == "0")) + { + $graph_by="accountid"; + $graph_title=$mod_strings['invoicebyacnts']; + $module="Invoice"; + $where=""; + $query=getDashboardQuery($invoice_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Invoices by status + elseif ($profileTabsPermission[getTabid("Invoice")] == 0 && ($type == "invoicebystatus") && (getFieldVisibilityPermission('Invoice',$user_id,'invoicestatus') == "0")) + { + $graph_by="invoicestatus"; + $graph_title=$mod_strings['invoicebystatus']; + $module="Invoice"; + $where=""; + $query=getDashboardQuery($invoice_query,$module); + if(!$is_admin) + $query .= ' and vtiger_invoice.invoicestatus '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by Status + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbystatus") && (getFieldVisibilityPermission('HelpDesk',$user_id,'ticketstatus') == "0")) + { + $graph_by="ticketstatus"; + $graph_title=$mod_strings['ticketsbystatus']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + if(!$is_admin) + $query .= ' and vtiger_troubletickets.status '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by Priority + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbypriority") && (getFieldVisibilityPermission('HelpDesk',$user_id,'ticketpriorities') == "0")) + { + $graph_by="priority"; + $graph_title=$mod_strings['ticketsbypriority']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + if(!$is_admin) + $query .= ' and vtiger_troubletickets.priority '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by Category + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbycategory") && (getFieldVisibilityPermission('HelpDesk',$user_id,'ticketcategories') == "0")) + { + $graph_by="category"; + $graph_title=$mod_strings['ticketsbycategory']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + if(!$is_admin) + $query .= ' and vtiger_troubletickets.category '.picklist_check($module,$graph_by); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by User + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyuser")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['ticketsbyuser']; + $module="HelpDesk"; + $where=" and (vtiger_groups.groupname is NULL)"; + $query=getDashboardQuery($helpdesk_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by Team + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyteam")) + { + $graph_by="smownerid"; + $graph_title=$mod_strings['ticketsbyteam']; + $module="HelpDesk"; + $where=" and (vtiger_groups.groupname != NULL || vtiger_groups.groupname != ' ')"; + $query=getDashboardQuery($helpdesk_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by Product + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyproduct") && (getFieldVisibilityPermission('HelpDesk',$user_id,'product_id') == "0")) + { + $graph_by="product_id"; + $graph_title=$mod_strings['ticketsbyproduct']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($helpdesk_query,$module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Campaigns by Contact + elseif ($profileTabsPermission[getTabid("Contacts")] == 0 && ($type == "contactbycampaign") && $profileTabsPermission[getTabid("Campaigns")] == 0) + { + $graph_by="campaignid"; + $graph_title=$mod_strings['contactbycampaign']; + $module="Contacts"; + $where=""; + $query=getDashboardQuery($campaign_query,"Campaigns"); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by Account + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbyaccount") && (getFieldVisibilityPermission('HelpDesk',$user_id,'parent_id') == "0")) + { + $graph_by="parent_id"; + $graph_title=$mod_strings['ticketsbyaccount']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($tickets_by_account, $module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + //Tickets by Contact + elseif ($profileTabsPermission[getTabid("HelpDesk")] == 0 && ($type == "ticketsbycontact") && (getFieldVisibilityPermission('HelpDesk',$user_id,'parent_id') == "0")) + { + $graph_by="parent_id"; + $graph_title=$mod_strings['ticketsbycontact']; + $module="HelpDesk"; + $where=""; + $query=getDashboardQuery($tickets_by_contact, $module); + echo get_graph_by_type($graph_by,$graph_title,$module,$where,$query); + } + else + { + //echo $mod_strings['LBL_NO_PERMISSION_FIELD']; + sleep(1); + echo '

'.$mod_strings['LBL_NO_PERMISSION_FIELD'].'

'; + } + } +} + +/**This function generates the security parameters for a given module based on the assigned profile +*Param $module - module name +*Returns an string value +*/ + +function getDashboardQuery($query, $module) { + global $current_user; + $secQuery = getNonAdminAccessControlQuery($module, $current_user); + if(strlen($secQuery) > 1) { + $query = appendFromClauseToQuery($query, $secQuery); + } + return $query; +} + +/**This function generates the security parameters for a given user base picklist values +*Param $graph - name of the graph +*Returns an string value +*/ + +function picklist_check($module,$graph_by) +{ + global $current_user,$adb; + $pick_query = ''; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + $roleid=$current_user->roleid; + $subrole = getRoleSubordinates($roleid); + if(count($subrole)> 0) + { + $roleids = $subrole; + array_push($roleids, $roleid); + } + else + { + $roleids = $roleid; + } + if($graph_by == 'sostatus' || $graph_by == 'leadsource' || $graph_by == 'leadstatus' ||$graph_by == 'industry' || $graph_by == 'productcategory' || $graph_by == 'postatus' || $graph_by == 'invoicestatus' || $graph_by == 'ticketstatus' || $graph_by == 'priority' || $graph_by == 'category' || $graph_by == 'quotestage') + { + $temp_fieldname = $graph_by; + if($graph_by == 'priority') + $temp_fieldname = 'ticketpriorities'; + if($graph_by == 'category') + $temp_fieldname = 'ticketcategories'; + + if(count($roleids) > 1) + $pick_query = " in (select distinct $temp_fieldname from vtiger_".$temp_fieldname." inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_".$temp_fieldname.".picklist_valueid where roleid in (\"". implode($roleids,"\",\"") ."\")) "; + else + $pick_query = " in (select distinct $temp_fieldname from vtiger_".$temp_fieldname." inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_".$temp_fieldname.".picklist_valueid where roleid in ('$roleids')) "; + } + return $pick_query; +} +?> + diff --git a/modules/Dashboard/homestuff.php b/modules/Dashboard/homestuff.php new file mode 100644 index 0000000..1e7be33 --- /dev/null +++ b/modules/Dashboard/homestuff.php @@ -0,0 +1,90 @@ + $mod_strings['leadsource'], + "leadstatus" => $mod_strings['leadstatus'], + "leadindustry" => $mod_strings['leadindustry'], + "salesbyleadsource" => $mod_strings['salesbyleadsource'], + "salesbyaccount" => $mod_strings['salesbyaccount'], + "salesbyuser" => $mod_strings['salesbyuser'], + "salesbyteam" => $mod_strings['salesbyteam'], + "accountindustry" => $mod_strings['accountindustry'], + "productcategory" => $mod_strings['productcategory'], + "productbyqtyinstock" => $mod_strings['productbyqtyinstock'], + "productbypo" => $mod_strings['productbypo'], + "productbyquotes" => $mod_strings['productbyquotes'], + "productbyinvoice" => $mod_strings['productbyinvoice'], + "sobyaccounts" => $mod_strings['sobyaccounts'], + "sobystatus" => $mod_strings['sobystatus'], + "pobystatus" => $mod_strings['pobystatus'], + "quotesbyaccounts" => $mod_strings['quotesbyaccounts'], + "quotesbystage" => $mod_strings['quotesbystage'], + "invoicebyacnts" => $mod_strings['invoicebyacnts'], + "invoicebystatus" => $mod_strings['invoicebystatus'], + "ticketsbystatus" => $mod_strings['ticketsbystatus'], + "ticketsbypriority" => $mod_strings['ticketsbypriority'], + "ticketsbycategory" => $mod_strings['ticketsbycategory'], + "ticketsbyuser" => $mod_strings['ticketsbyuser'], + "ticketsbyteam" => $mod_strings['ticketsbyteam'], + "ticketsbyproduct"=> $mod_strings['ticketsbyproduct'], + "contactbycampaign"=> $mod_strings['contactbycampaign'], + "ticketsbyaccount"=> $mod_strings['ticketsbyaccount'], + "ticketsbycontact"=> $mod_strings['ticketsbycontact'], + ); + + $log = LoggerManager::getLogger('dashboard'); + if(isset($type) && $type != '') + { + $dashboard_type = $type; + }else + { + $dashboard_type = 'DashboardHome'; + } + + if(!isset($type)) + { + }else + { + require_once('modules/Dashboard/display_charts.php'); + $_REQUEST['type'] = $type; + $_REQUEST['Chart_Type'] = $Chart_Type; + $_REQUEST['from_page'] = 'HomePage'; + $dashval=dashBoardDisplayChart(); + return $dashval; + } +} + +?> \ No newline at end of file diff --git a/modules/Dashboard/horizontal_bargraph.php b/modules/Dashboard/horizontal_bargraph.php new file mode 100644 index 0000000..14ba624 --- /dev/null +++ b/modules/Dashboard/horizontal_bargraph.php @@ -0,0 +1,246 @@ +=14) + $name=substr($name, 0, 44); + if($pos>=2) + { + $val=explode(" ",$name); + $n=count($val)-1; + + $x=""; + for($j=0;$j $width, 'height' => $height, 'usemap' => true)); + $imagemap = $canvas->getImageMap(); + $graph =& Image_Graph::factory('graph', $canvas); + $font =& $graph->addNew('font', calculate_font_name($lang_crm)); + // set the font size to 12 + $font->setSize(8); + + if($theme == "blue") + { + $font_color = "#212473"; + } + else + { + $font_color = "#000000"; + } + $font->setColor($font_color); + + $graph->setFont($font); + $titlestr =& Image_Graph::factory('title', array($title,8)); + $plotarea =& Image_Graph::factory('plotarea',array( + 'axis', + 'axis', + 'horizontal' + )); + $graph->add( + Image_Graph::vertical($titlestr, + $plotarea, + 5 + ) + ); + + + // Now create a bar plot + $max=0; + // To create unique lables we need to keep track of lable name and its count + $uniquex = array(); + + $xlabels = array(); + $dataset = & Image_Graph::factory('dataset'); + if($theme == 'woodspice') + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED, '#804000', 'white')); + elseif($theme == 'bluelagoon') + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED, 'blue', 'white')); + elseif($theme == 'softed') + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED, 'blue', 'white')); + else + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL_MIRRORED, 'black', 'white')); + + for($i=0;$i=$max) $max=$datay[$i]; + $dataset->addPoint( + $x, + $datay[$i], + array( + 'url' => $target[$i], + 'alt' => $alts[$i] + ) + ); + // build the xaxis label array to allow intermediate ticks + + $xlabels[$x] = $datax[$i]; + $xlabels[$x+1] = ''; + + // To have unique names even in case of duplicates let us add the id + $datax_appearance = $uniquex[$datax[$i]]; + if($datax_appearance == null) { + $uniquex[$datax[$i]] = 1; + } else { + $xlabels[$x] = $datax[$i] .' ['. $datax_appearance.']'; + $uniquex[$datax[$i]] = $datax_appearance + 1; + } + } + + $bplot = & $plotarea->addNew('bar', $dataset); + $bplot->setFillStyle($fill); + + //You can change the width of the bars if you like + $bplot->setBarWidth(50/count($datax),"%"); + $bplot->setPadding(array('top'=>10)); + + // We want to display the value of each bar at the top + //$bplot->value->Show(); + //$bplot->value->SetFont(FF_FONT2,FS_BOLD,12); + //$bplot->value->SetAlign('left','center'); + //$bplot->value->SetColor("black","gray4"); + //$bplot->value->SetFormat('%d'); + + //$graph->SetBackgroundGradient('#E5E5E5','white',GRAD_VER,BGRAD_PLOT); + $bplot->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', 'white'))); + //$bplot->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', '#E5E5E5'))); + //$bplot->SetFillGradient("navy","lightsteelblue",GRAD_MIDVER); + + //$graph->SetFrame(false); + //$graph->SetMarginColor('cadetblue2'); + //$graph->ygrid->SetFill(true,'azure1','azure2'); + //$graph->xgrid->Show(); + + // Add the bar to the graph + //$graph->Add($bplot); + + // Setup title + //$titlestr->setText($title); + + // Setup X-axis + $xaxis =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_X); + $yaxis =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); + $yaxis->setFontSize(10); + + // Invert X-axis and put Y-axis at bottom + $xaxis->setInverted(true); + $yaxis->setAxisIntersection('max'); + + // set grid + $gridY =& $plotarea->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); + $gridY->setLineColor('#FFFFFF@0.5'); + $gridY2 =& $plotarea->addNew('bar_grid', null, IMAGE_GRAPH_AXIS_Y); + $gridY2->setFillColor('#FFFFFF@0.2'); + + + // Add some grace to y-axis so the bars doesn't go + // all the way to the end of the plot area + $yaxis->forceMaximum(round(($max * 1.1) + 0.5)); + $ticks = get_tickspacing(round(($max * 1.1) + 0.5)); + + // First make the labels look right + $yaxis->setLabelInterval($ticks[0]); + $yaxis->setTickOptions(-5,0); + $yaxis->setLabelInterval($ticks[1],2); + $yaxis->setTickOptions(-2,0,2); + + // Create the xaxis labels + $array_data =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', + array($xlabels) + ); + + // The fix the tick marks + $xaxis->setDataPreprocessor($array_data); + $xaxis->forceMinimum(0); + $xaxis->forceMaximum(2*count($datay)); + $xaxis->setLabelInterval(1); + $xaxis->setTickOptions(0,0); + $xaxis->setLabelInterval(2,2); + $xaxis->setTickOptions(5,0,2); + + // set markers + $marker =& $graph->addNew('value_marker', IMAGE_GRAPH_VALUE_Y); + $marker->setFillColor('000000@0.0'); + $marker->setBorderColor('000000@0.0'); + $marker->setFontSize(10); + // shift markers 10 pix right + $marker_pointing =& $graph->addNew('Image_Graph_Marker_Pointing', array(40,0,& $marker)); + $marker_pointing->setLineColor('000000@0.0'); + $bplot->setMarker($marker_pointing); + + + //Getting the graph in the form of html page + $img = $graph->done( + array( + 'tohtml' => true, + 'border' => 0, + 'filename' => $cache_file_name, + 'filepath' => '', + 'urlpath' => '' + )); + save_image_map($cache_file_name.'.map', $img); + + return $img; +} + +?> diff --git a/modules/Dashboard/index.php b/modules/Dashboard/index.php new file mode 100644 index 0000000..ccf9b0b --- /dev/null +++ b/modules/Dashboard/index.php @@ -0,0 +1,389 @@ + $mod_strings['DashboardHome'], + "leadsource" => $mod_strings['leadsource'], + "leadstatus" => $mod_strings['leadstatus'], + "leadindustry" => $mod_strings['leadindustry'], + "salesbyleadsource" => $mod_strings['salesbyleadsource'], + "salesbyaccount" => $mod_strings['salesbyaccount'], + "salesbyuser" => $mod_strings['salesbyuser'], + "salesbyteam" => $mod_strings['salesbyteam'], + "accountindustry" => $mod_strings['accountindustry'], + "productcategory" => $mod_strings['productcategory'], + "productbyqtyinstock" => $mod_strings['productbyqtyinstock'], + "productbypo" => $mod_strings['productbypo'], + "productbyquotes" => $mod_strings['productbyquotes'], + "productbyinvoice" => $mod_strings['productbyinvoice'], + "sobyaccounts" => $mod_strings['sobyaccounts'], + "sobystatus" => $mod_strings['sobystatus'], + "pobystatus" => $mod_strings['pobystatus'], + "quotesbyaccounts" => $mod_strings['quotesbyaccounts'], + "quotesbystage" => $mod_strings['quotesbystage'], + "invoicebyacnts" => $mod_strings['invoicebyacnts'], + "invoicebystatus" => $mod_strings['invoicebystatus'], + "ticketsbystatus" => $mod_strings['ticketsbystatus'], + "ticketsbypriority" => $mod_strings['ticketsbypriority'], + "ticketsbycategory" => $mod_strings['ticketsbycategory'], + "ticketsbyuser" => $mod_strings['ticketsbyuser'], + "ticketsbyteam" => $mod_strings['ticketsbyteam'], + "ticketsbyproduct"=> $mod_strings['ticketsbyproduct'], + "contactbycampaign"=> $mod_strings['contactbycampaign'], + "ticketsbyaccount"=> $mod_strings['ticketsbyaccount'], + "ticketsbycontact"=> $mod_strings['ticketsbycontact'], + ); + +$log = LoggerManager::getLogger('dashboard'); +if(isset($_REQUEST['type']) && $_REQUEST['type'] != '') +{ + $dashboard_type = $_REQUEST['type']; +}else +{ + $dashboard_type = 'DashboardHome'; +} +?> + +
+ + + + + + + + + + + + +
+ + + + + +
+ + + + + +
+
+
  + + + + + + + + + + + + + +
<?php echo $app_strings['LBL_CALENDAR_ALT']; ?><?php echo $app_strings['LBL_CLOCK_ALT']; ?><?php echo $app_strings['LBL_CALCULATOR_ALT']; ?><?php echo $app_strings['LBL_CHAT_ALT']; ?> + + <?php echo $app_strings['LBL_LAST_VIEWED']; ?>
+
  + + + + + +
+
  + +
+
+
+ + + + + + + + + + +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + +
  + + + + +
+ +
+ +
 
+ +
 
  + + + + + +
+ > > + <?php echo $mod_strings['NORMALVIEW'];?> | <?php echo $mod_strings['GRIDVIEW'];?>
+
 
 
+ + + + + + + +
  +
+ + + + + + +
+ + +  
+ + +
 
 
+ + + + + + + + + +
  + + + +
+
  
+ +
+ + + + + + +
 
+
+ +
+
+ + + + + + + + diff --git a/modules/Dashboard/language/de_de.lang.php b/modules/Dashboard/language/de_de.lang.php new file mode 100644 index 0000000..e0eaf97 --- /dev/null +++ b/modules/Dashboard/language/de_de.lang.php @@ -0,0 +1,183 @@ +'Pipeline nach Verkaufsstufen', + 'LBL_SALES_STAGE_FORM_DESC'=>'Zeigt die Summe aller Angebote gruppiert nach Verkaufsstufen für die ausgewählten Benutzer. Das erwartete Abschlussdatum muss innerhalb des definierten Zeitraums liegen.', + 'LBL_MONTH_BY_OUTCOME'=>'Pipeline nach Umsatz pro Monat', + 'LBL_MONTH_BY_OUTCOME_DESC'=>'Zeigt die Abschlussumme aller Angebote pro Monat für die ausgewählten Benutzer. Das erwartete Abschlussdatum muss innerhalb des definierten Zeitraums liegen. Das Ergebnis ist davon abhängig, wie die Verkaufstufen gesetzt wurden.', + 'LBL_LEAD_SOURCE_FORM_TITLE'=>'Alle Verkaufspotentiale gruppiert nach Leadquelle', + 'LBL_LEAD_SOURCE_FORM_DESC'=>'Zeigt die Summe aller Verkaufspotentiale nach Leadquelle für die ausgewählten Benutzer.', + 'LBL_LEAD_SOURCE_BY_OUTCOME'=>'Alle Verkaufspotentiale nach Leadquelle und Umsatz', + 'LBL_LEAD_SOURCE_BY_OUTCOME_DESC'=>'Zeigt die Summe aller Verkaufspotentiale nach Leadquellen bezüglich Umsatz für die ausgewählten Benutzer. Das erwartete Abschlussdatum muss innerhalb des definierten Zeitraums liegen. Das Ergebnis ist davon abhängig, wie die Verkaufstufen gesetzt wurden.', + 'LBL_PIPELINE_FORM_TITLE_DESC'=>'Zeigt die Summe aller Angebote nach Verkaufsstufen innerhalb des definierten Zeitraumes.', + 'LBL_DATE_RANGE'=>'Zeitraum von', + 'LBL_DATE_RANGE_TO'=>'bis ', + 'ERR_NO_OPPS'=>'Bitte erstellen Sie Verkaufspotentiale um Grafiken zu erzeugen.', + 'LBL_TOTAL_PIPELINE'=>'Pipeline Total: ', + 'LBL_ALL_OPPORTUNITIES'=>'total Verkaufspotentiale: ', + 'LBL_OPP_SIZE'=>'Angaben pro', + 'LBL_OPP_SIZE_VALUE'=>'1K', + 'NTC_NO_LEGENDS'=>'keine', + 'LBL_LEAD_SOURCE_OTHER'=>'andere', + 'LBL_EDIT'=>'ändern', + 'LBL_REFRESH'=>'aktualisieren', + 'LBL_CREATED_ON'=>'letzte Aktualisierung ', + 'LBL_OPPS_IN_STAGE'=>'Potentiale bei denen die Verkaufsstufe ist: ', + 'LBL_OPPS_IN_LEAD_SOURCE'=>'Potentiale bei denen die Leadquelle ist: ', + 'LBL_OPPS_OUTCOME'=>'Potentiale bei denen das Ergebnis ist: ', + 'LBL_USERS'=>'Benutzer:', + 'LBL_SALES_STAGES'=>'Verkaufsstufen:', + 'LBL_LEAD_SOURCES'=>'Leadquellen:', + 'LBL_DATE_START'=>'Start:', + 'LBL_DATE_END'=>'Ende:', + //Added for 5.0 + 'LBL_NO_PERMISSION'=>'Ihr Profil berechtigt Sie nicht, die graphische Anzeige für diese Modul zu sehen.', + 'LBL_NO_PERMISSION_FIELD'=>'Ihr Profil berechtigt Sie nicht, die graphische Anzeige für diese Modul oder Feld zu sehen.', + + "leadsource" => "Leads nach Quelle", + "leadstatus" => "Leads nach Status", + "leadindustry" => "Leads nach Branche", + "salesbyleadsource" => "Verkauf nach Leadquelle", + "salesbyaccount" => "Verkauf nach Organisationen", + "salesbyuser" => "Verkauf durch Nutzer", + "salesbyteam"=>"Verkauf durch Teams", + "accountindustry" => "Organisationen nach Branche", + "productcategory" => "Produkte nach Kategorie", + "productbyqtyinstock" => "Produkte nach Menge im Lager", + "productbypo" => "Produkte nach Verkaufsbestellungen", + "productbyquotes" => "Produkte nach Angeboten", + "productbyinvoice" => "Produkte nach Rechnungen", + "sobyaccounts" => "Verkaufsbestellungen nach Organisationen", + "sobystatus" => "Verkaufsbestellungen nach Status", + "pobystatus" => "Einkaufsbestellungen nach Status", + "quotesbyaccounts" => "Angebote nach Organisationen", + "quotesbystage" => "Angebote nach Stufe", + "invoicebyacnts" => "Rechnungen nach Organsiationen", + "invoicebystatus" => "Rechnungen nach Status", + "ticketsbystatus" => "Tickets nach Status", + "ticketsbypriority" => "Tickets nach Priorität", + "ticketsbycategory" => "Tickets nach Kategorie", + "ticketsbyuser"=>"Tickets nach Benutzern", + "ticketsbyteam"=>"Tickets nach Team", + "ticketsbyproduct"=>"Tickets nach Produkt", + "contactbycampaign"=>"Kontakte aus Kampagnen", + "ticketsbyaccount"=>"Tickets nach Organisationen", + "ticketsbycontact"=>"Tickets nach Personen", + + 'LBL_DASHBRD_HOME'=>'Cockpit Home', + 'LBL_HORZ_BAR_CHART'=>'horizontales Balkendiagrmm', + 'LBL_VERT_BAR_CHART'=>'vertikales Balkendiagramm', + 'LBL_PIE_CHART'=>'Tortendiagramm', + 'LBL_NO_DATA'=>'keine Daten verfügbar', + 'DashboardHome'=>'Cockpit Home', + 'GRIDVIEW'=>'zsammenfassende Ansicht', + 'NORMALVIEW'=>'normale Ansicht', + 'VIEWCHART'=>'Diagramm ansehen', + 'LBL_DASHBOARD'=>'Cockpit', + + // Added/Updated for vtiger CRM 5.0.4 + "Approved"=>"bestätigt", + "Created"=>"erzeugt", + "Cancelled"=>"abgebrochen", + "Delivered"=>"gesendet", + "Received Shipment"=>"Lieferung empfangen", + "Sent"=>"gesendet", + "Credit Invoice"=>"Gutschrift", + "Paid"=>"bezahlt", + "Un Assigned"=>"nicht zugeordnet", + "Cold Call"=>"kalter Anruf", + "Existing Customer"=>"existierender Kunde", + "Self Generated"=>"selbst erzeugt", + "Employee"=>"Angestellter", + "Partner"=>"Partner", + "Public Relations"=>"Public Relations", + "Direct Mail"=>"Mailing", + "Conference"=>"Konferenz", + "Trade Show"=>"Messe", + "Web Site"=>"Webseite", + "Word of mouth"=>"Empfehlung", + "Other"=>"andere", + "--None--"=>"--ohne--", + "Attempted to Contact"=>"Kontaktierung versucht", + "Cold"=>"kalt", + "Contact in Future"=>"in der Zukunft kontaktieren", + "Contacted"=>"kontaktiert", + "Hot"=>"heiß", + "Junk Lead"=>"wertloser Lead", + "Lost Lead"=>"verlorener Lead", + "Not Contacted"=>"nicht kontaktiert", + "Pre Qualified"=>"vorqualifiziert", + "Qualified"=>"qualifiziert", + "Warm"=>"warm", + "Apparel"=>"Bekleidungsindustrie", + "Banking"=>"Banken", + "Biotechnology"=>"Biotechnologie", + "Chemicals"=>"Chemie", + "Communications"=>"Kommunikation", + "Construction"=>"Anlagenbau", + "Consulting"=>"Beratung", + "Education"=>"Bildung", + "Electronics"=>"Elektronik", + "Energy"=>"Energie", + "Engineering"=>"Ingenieurwesen", + "Entertainment"=>"Unterhaltung", + "Environmental"=>"Umwelt", + "Finance"=>"Finanzen", + "Food & Beverage"=>"Nahrungsmittel", + "Government"=>"Regierung", + "Healthcare"=>"Gesundheitswesen", + "Hospitality"=>"Beherbergung", + "Insurance"=>"Versicherung", + "Machinery"=>"Maschinen", + "Manufacturing"=>"Fertigung", + "Media"=>"Medien", + "Not For Profit"=>"Wohlfahrt", + "Recreation"=>"Freizeit und Erholung", + "Retail"=>"Einzelhandel", + "Shipping"=>"Spedition", + "Technology"=>"Technologie", + "Telecommunications"=>"Telekommunikation", + "Transportation"=>"Transport", + "Utilities"=>"Versorgungseinrichtung", + "Hardware"=>"Hardware", + "Software"=>"Software", + "CRM Applications"=>"Dienstleistung", + "Open"=>"offen", + "In Progress"=>"In Bearbeitung", + "Wait For Response"=>"warte auf Zuarbeit", + "Closed"=>"geschlossen", + "Low"=>"gering", + "Normal"=>"normal", + "High"=>"hoch", + "Urgent"=>"dringend", + "Big Problem"=>"großes Problem", + "Small Problem"=>"geringes Problem", + "Other Problem"=>"anderes Problem", + "Accepted"=>"akzeptiert", + "Rejected"=>"abgelehnt", + "Prospecting"=>"Vorschau", + "Qualification"=>"Qualifikation", + "Needs Analysis"=>"Bedarfsanalyse", + "Value Proposition"=>"Werthaltigkeit", + "Id. Decision Makers"=>"Entscheider finden", + "Perception Analysis"=>"Angebotspr?fung", + "Proposal/Price Quote"=>"Angebot", + "Negotiation/Review"=>"Verhandlung", + "Closed Won"=>"gewonnen - geschlossen", + "Closed Lost"=>"verloren - geschlossen", +); + +?> \ No newline at end of file diff --git a/modules/Dashboard/language/en_gb.lang.php b/modules/Dashboard/language/en_gb.lang.php new file mode 100644 index 0000000..3442c49 --- /dev/null +++ b/modules/Dashboard/language/en_gb.lang.php @@ -0,0 +1,172 @@ + 'Pipeline by Sales Stage', + 'LBL_SALES_STAGE_FORM_DESC' => 'Shows cumulative Opportunity amounts by selected sales stages for selected users where the expected closed date is within the specificed date range.', + 'LBL_MONTH_BY_OUTCOME' => 'Pipeline by Month by Outcome', + 'LBL_MONTH_BY_OUTCOME_DESC' => 'Shows cumulative Opportunity amounts by month by outcome for selected users where the expected closed date is within the specificed date range. Outcome is based on whether the sales stage is Closed Won, Closed Lost or any other value.', + 'LBL_LEAD_SOURCE_FORM_TITLE' => 'All Opportunities by Lead Source', + 'LBL_LEAD_SOURCE_FORM_DESC' => 'Shows cumulative Opportunity amounts by selected Lead Source for selected users.', + 'LBL_LEAD_SOURCE_BY_OUTCOME' => 'All Opportunities By Lead Source By Outcome', + 'LBL_LEAD_SOURCE_BY_OUTCOME_DESC' => 'Shows cumulative Opportunity amounts by selected Lead Source by outcome for selected users where the expected closed date is within the specificed date range. Outcome is based on whether the sales stage is Closed Won, Closed Lost or any other value.', + 'LBL_PIPELINE_FORM_TITLE_DESC' => 'Shows cumulative amounts by selected sales stages for your Opportunities where the expected closed date is within the specificed date range.', + 'LBL_DATE_RANGE' => 'Date range is', + 'LBL_DATE_RANGE_TO' => 'to', + 'ERR_NO_OPPS' => 'Please create some Opportunities to see Opportunity graphs.', + 'LBL_TOTAL_PIPELINE' => 'Pipeline total is ', + 'LBL_ALL_OPPORTUNITIES' => 'Total amount of all opportunities is ', + 'LBL_OPP_SIZE' => 'Opportunity size in ', + 'LBL_OPP_SIZE_VALUE' => '1K', + 'NTC_NO_LEGENDS' => 'None', + 'LBL_LEAD_SOURCE_OTHER' => 'Other', + 'LBL_EDIT' => 'Edit', + 'LBL_REFRESH' => 'Refresh', + 'LBL_CREATED_ON' => 'Last run on ', + 'LBL_OPPS_IN_STAGE' => 'opportunities where sales stage is', + 'LBL_OPPS_IN_LEAD_SOURCE' => 'opportunities where lead source is', + 'LBL_OPPS_OUTCOME' => 'opportunities where outcome is', + 'LBL_USERS' => 'Users:', + 'LBL_SALES_STAGES' => 'Sales Stages:', + 'LBL_LEAD_SOURCES' => 'Lead Sources:', + 'LBL_DATE_START' => 'Begin Date:', + 'LBL_DATE_END' => 'End Date:', + 'LBL_NO_PERMISSION' => 'Sorry, you do not have access to view the graph for this module', + 'LBL_NO_PERMISSION_FIELD' => 'Sorry, you do not have access to view the graph for this module or for the field', + 'leadsource' => 'Leads by Source', + 'leadstatus' => 'Leads by Status', + 'leadindustry' => 'Leads by Industry', + 'salesbyleadsource' => 'Sales by Lead Source', + 'salesbyaccount' => 'Sales by Organisation', + 'salesbyuser' => 'Sales by User', + 'salesbyteam' => 'Sales by Team', + 'accountindustry' => 'Organisation By Industry', + 'productcategory' => 'Products by Category', + 'productbyqtyinstock' => 'Products by Quantity in stock', + 'productbypo' => 'Products by Purchase Order', + 'productbyquotes' => 'Products by Quotes', + 'productbyinvoice' => 'Products by Invoice', + 'sobyaccounts' => 'Sales Order by Organisation', + 'sobystatus' => 'Sales Order by Status', + 'pobystatus' => 'Purchase Order by Status', + 'quotesbyaccounts' => 'Quotes by Organisation', + 'quotesbystage' => 'Quotes by Stage', + 'invoicebyacnts' => 'Invoices by Organisations', + 'invoicebystatus' => 'Invoices by Status', + 'ticketsbystatus' => 'Tickets by Status', + 'ticketsbypriority' => 'Tickets by Priority', + 'ticketsbycategory' => 'Tickets by Category', + 'ticketsbyuser' => 'Tickets by User', + 'ticketsbyteam' => 'Tickets by Team', + 'ticketsbyproduct' => 'Tickets by Product', + 'contactbycampaign' => 'Contacts by Campaign', + 'ticketsbyaccount' => 'Tickets by Organisation', + 'ticketsbycontact' => 'Tickets by Contact', + 'LBL_DASHBRD_HOME' => 'Dashboard Home', + 'LBL_HORZ_BAR_CHART' => 'Horizontal Bar Chart', + 'LBL_VERT_BAR_CHART' => 'Vertical Bar Chart', + 'LBL_PIE_CHART' => 'Pie Chart', + 'LBL_NO_DATA' => 'No data available', + 'DashboardHome' => 'Dashboard Home', + 'GRIDVIEW' => 'Grid view', + 'NORMALVIEW' => 'Normal view', + 'VIEWCHART' => 'View Chart', + 'LBL_DASHBOARD' => 'Dashboard', + 'Approved' => 'Approved', + 'Created' => 'Created', + 'Cancelled' => 'Cancelled', + 'Delivered' => 'Delivered', + 'Received Shipment' => 'Received Shipments', + 'Sent' => 'Sent', + 'Credit Invoice' => 'Credit Invoice', + 'Paid' => 'Paid', + 'Un Assigned' => 'Unassigned', + 'Cold Call' => 'Cold Call', + 'Existing Customer' => 'Existing Customer', + 'Self Generated' => 'Self Generated', + 'Employee' => 'Employee', + 'Partner' => 'Partner', + 'Public Relations' => 'Public Relations', + 'Direct Mail' => 'Direct Mail', + 'Conference' => 'Conference', + 'Trade Show' => 'Trade Show', + 'Web Site' => 'Web Site', + 'Word of mouth' => 'Word of mouth', + 'Other' => 'Other', + '--None--' => 'None', + 'Attempted to Contact' => 'Attempted to Contact', + 'Cold' => 'Cold', + 'Contact in Future' => 'Contact in Future', + 'Contacted' => 'Contacted', + 'Hot' => 'Hot', + 'Junk Lead' => 'Junk Lead', + 'Lost Lead' => 'Lost Lead', + 'Not Contacted' => 'Not Contacted', + 'Pre Qualified' => 'Pre Qualified', + 'Qualified' => 'Qualified', + 'Warm' => 'Warm', + 'Apparel' => 'Apparel', + 'Banking' => 'Banking', + 'Biotechnology' => 'Biotechnology', + 'Chemicals' => 'Chemicals', + 'Communications' => 'Communications', + 'Construction' => 'Constructions', + 'Consulting' => 'Consulting', + 'Education' => 'Education', + 'Electronics' => 'Electronics', + 'Energy' => 'Energy', + 'Engineering' => 'Engineering', + 'Entertainment' => 'Entertainment', + 'Environmental' => 'Environmental', + 'Finance' => 'Finance', + 'Food & Beverage' => 'Food & Beverage', + 'Government' => 'Government', + 'Healthcare' => 'Healthcare', + 'Hospitality' => 'Hospitality', + 'Insurance' => 'Insurance', + 'Machinery' => 'Machinery', + 'Manufacturing' => 'Manufacturing', + 'Media' => 'Media', + 'Not For Profit' => 'Not For Profit', + 'Recreation' => 'Recreation', + 'Retail' => 'Retail', + 'Shipping' => 'Shipping', + 'Technology' => 'Technology', + 'Telecommunications' => 'Telecommunications', + 'Transportation' => 'Transportation', + 'Utilities' => 'Utilities', + 'Hardware' => 'Hardware', + 'Software' => 'Software', + 'CRM Applications' => 'CRM Applications', + 'Open' => 'Open', + 'In Progress' => 'In Progress', + 'Wait For Response' => 'Wait For Response', + 'Closed' => 'Closed', + 'Low' => 'Low', + 'Normal' => 'Normal', + 'High' => 'High', + 'Urgent' => 'Urgent', + 'Big Problem' => 'Big Problem', + 'Small Problem' => 'Small Problem', + 'Other Problem' => 'Other Problem', + 'Accepted' => 'Accepted', + 'Rejected' => 'Rejected', + 'Prospecting' => 'Prospecting', + 'Qualification' => 'Qualifications', + 'Needs Analysis' => 'Needs Analysis', + 'Value Proposition' => 'Value Propositions', + 'Id. Decision Makers' => 'Id. Decision Makers', + 'Perception Analysis' => 'Perception Analysis', + 'Proposal/Price Quote' => 'Proposal/Price Quotes', + 'Negotiation/Review' => 'Negotiation/Review', + 'Closed Won' => 'Closed Won', + 'Closed Lost' => 'Closed Lost', +); +?> \ No newline at end of file diff --git a/modules/Dashboard/language/en_us.lang.php b/modules/Dashboard/language/en_us.lang.php new file mode 100644 index 0000000..431d8c9 --- /dev/null +++ b/modules/Dashboard/language/en_us.lang.php @@ -0,0 +1,191 @@ +'Pipeline By Sales Stage', +'LBL_SALES_STAGE_FORM_DESC'=>'Shows cumulative opportunity amounts by selected sales stages for selected users where the expected closed date is within the specificed date range.', +'LBL_MONTH_BY_OUTCOME'=>'Pipeline By Month By Outcome', +'LBL_MONTH_BY_OUTCOME_DESC'=>'Shows cumulative opportunity amounts by month by outcome for selected users where the expected closed date is within the specificed date range. Outcome is based on whether the sales stage is Closed Won, Closed Lost or any other value.', +'LBL_LEAD_SOURCE_FORM_TITLE'=>'All Opportunities By Lead Source', +'LBL_LEAD_SOURCE_FORM_DESC'=>'Shows cumulative opportunity amounts by selected lead source for selected users.', +'LBL_LEAD_SOURCE_BY_OUTCOME'=>'All Opportunities By Lead Source By Outcome', +'LBL_LEAD_SOURCE_BY_OUTCOME_DESC'=>'Shows cumulative opportunity amounts by selected lead source by outcome for selected users where the expected closed date is within the specificed date range. Outcome is based on whether the sales stage is Closed Won, Closed Lost or any other value.', +'LBL_PIPELINE_FORM_TITLE_DESC'=>'Shows cumulative amounts by selected sales stages for your opportunities where the expected closed date is within the specificed date range.', +'LBL_DATE_RANGE'=>'Date range is', +'LBL_DATE_RANGE_TO'=>'to', +'ERR_NO_OPPS'=>'Please create some Opportunities to see Opportunity graphs.', +'LBL_TOTAL_PIPELINE'=>'Pipeline total is ', +'LBL_ALL_OPPORTUNITIES'=>'Total amount of all opportunities is ', +'LBL_OPP_SIZE'=>'Opportunity size in ', +'LBL_OPP_SIZE_VALUE'=>'1K', +'NTC_NO_LEGENDS'=>'None', +'LBL_LEAD_SOURCE_OTHER'=>'Other', +'LBL_EDIT'=>'Edit', +'LBL_REFRESH'=>'Refresh', +'LBL_CREATED_ON'=>'Last run on ', +'LBL_OPPS_IN_STAGE'=>'opportunities where sales stage is', +'LBL_OPPS_IN_LEAD_SOURCE'=>'opportunities where lead source is', +'LBL_OPPS_OUTCOME'=>'opportunities where outcome is', +'LBL_USERS'=>'Users:', +'LBL_SALES_STAGES'=>'Sales Stages:', +'LBL_LEAD_SOURCES'=>'Lead Sources:', +'LBL_DATE_START'=>'Begin Date:', +'LBL_DATE_END'=>'End Date:', +//Added for 5.0 +'LBL_NO_PERMISSION'=>'Sorry, you don\'t have access to view the Graph for this module', +'LBL_NO_PERMISSION_FIELD'=>'Sorry, you don\'t have access to view the Graph for this module or for the Field', + +"leadsource" => "Leads By Source", +"leadstatus" => "Leads By Status", +"leadindustry" => "Leads By Industry", +"salesbyleadsource" => "Sales by LeadSource", +"salesbyaccount" => "Sales by Organizations", +"salesbyuser" => "Sales by User", +"salesbyteam"=>"Sales by Team", +"accountindustry" => "Organization By Industry", +"productcategory" => "Products by Category", +"productbyqtyinstock" => "Products by Quantity in stock", +"productbypo" => "Products by PurchaseOrder", +"productbyquotes" => "Products by Quotes", +"productbyinvoice" => "Products by Invoice", +"sobyaccounts" => "Sales Order by Organizations", +"sobystatus" => "Sales Order by Status", +"pobystatus" => "Purchase Order by Status", +"quotesbyaccounts" => "Quotes by Organizations", +"quotesbystage" => "Quotes by Stage", +"invoicebyacnts" => "Invoices by Organizations", +"invoicebystatus" => "Invoices by Status", +"ticketsbystatus" => "Tickets by Status", +"ticketsbypriority" => "Tickets by Priority", +"ticketsbycategory" => "Tickets by Category", +"ticketsbyuser"=>"Tickets by User", +"ticketsbyteam"=>"Tickets by Team", +"ticketsbyproduct"=>"Tickets by Product", +"contactbycampaign"=>"Contacts by Campaign", +"ticketsbyaccount"=>"Tickets by Organization", +"ticketsbycontact"=>"Tickets by Contact", + +'LBL_DASHBRD_HOME'=>'Dashboard Home', +'LBL_HORZ_BAR_CHART'=>'Horizontal Bar Chart', +'LBL_VERT_BAR_CHART'=>'Vertical Bar Chart', +'LBL_PIE_CHART'=>'Pie Chart', +'LBL_NO_DATA'=>'No data available', +'DashboardHome'=>'Dashboard Home', +'GRIDVIEW'=>'Grid view', +'NORMALVIEW'=>'Normal view', +'VIEWCHART'=>'View Chart', +'LBL_DASHBOARD'=>'Dashboard', + +// Added/Updated for vtiger CRM 5.0.4 +"Approved"=>"Approved", +"Created"=>"Created", +"Cancelled"=>"Cancelled", +"Delivered"=>"Delivered", +"Received Shipment"=>"Received Shipments", +"Sent"=>"Sent", +"Credit Invoice"=>"Credit Invoice", +"Paid"=>"Paid", +"Un Assigned"=>"Un Assigned", +"Cold Call"=>"Cold Call", +"Existing Customer"=>"Existing Customer", +"Self Generated"=>"Self Generated", +"Employee"=>"Employee", +"Partner"=>"Partner", +"Public Relations"=>"Public Relations", +"Direct Mail"=>"Direct Mail", +"Conference"=>"Conference", +"Trade Show"=>"Trade Show", +"Web Site"=>"Web Site", +"Word of mouth"=>"Word of mouth", +"Other"=>"Other", +"--None--"=>"None", +"Attempted to Contact"=>"Attempted to Contact", +"Cold"=>"Cold", +"Contact in Future"=>"Contact in Future", +"Contacted"=>"Contacted", +"Hot"=>"Hot", +"Junk Lead"=>"Junk Lead", +"Lost Lead"=>"Lost Lead", +"Not Contacted"=>"Not Contacted", +"Pre Qualified"=>"Pre Qualified", +"Qualified"=>"Qualified", +"Warm"=>"Warm", +"Apparel"=>"Apparel", +"Banking"=>"Banking", +"Biotechnology"=>"Biotechnology", +"Chemicals"=>"Chemicals", +"Communications"=>"Communications", +"Construction"=>"Constructions", +"Consulting"=>"Consulting", +"Education"=>"Education", +"Electronics"=>"Electronics", +"Energy"=>"Energy", +"Engineering"=>"Engineering", +"Entertainment"=>"Entertainment", +"Environmental"=>"Environmental", +"Finance"=>"Finance", +"Food & Beverage"=>"Food & Beverage", +"Government"=>"Government", +"Healthcare"=>"Healthcare", +"Hospitality"=>"Hospitality", +"Insurance"=>"Insurance", +"Machinery"=>"Machinery", +"Manufacturing"=>"Manufacturing", +"Media"=>"Media", +"Not For Profit"=>"Not For Profit", +"Recreation"=>"Recreation", +"Retail"=>"Retail", +"Shipping"=>"Shipping", +"Technology"=>"Technology", +"Telecommunications"=>"Telecommunications", +"Transportation"=>"Transportation", +"Utilities"=>"Utilities", +"Hardware"=>"Hardware", +"Software"=>"Software", +"CRM Applications"=>"CRM Applications", +"Open"=>"Open", +"In Progress"=>"In Progress", +"Wait For Response"=>"Wait For Response", +"Closed"=>"Closed", +"Low"=>"Low", +"Normal"=>"Normal", +"High"=>"High", +"Urgent"=>"Urgent", +"Big Problem"=>"Big Problem", +"Small Problem"=>"Small Problem", +"Other Problem"=>"Other Problem", +"Accepted"=>"Accepted", +"Rejected"=>"Rejected", +"Prospecting"=>"Prospecting", +"Qualification"=>"Qualifications", +"Needs Analysis"=>"Needs Analysis", +"Value Proposition"=>"Value Propositions", +"Id. Decision Makers"=>"Id. Decision Makers", +"Perception Analysis"=>"Perception Analysis", +"Proposal/Price Quote"=>"Proposal/Price Quotes", +"Negotiation/Review"=>"Negotiation/Review", +"Closed Won"=>"Closed Won", +"Closed Lost"=>"Closed Lost", + +); + +?> diff --git a/modules/Dashboard/language/es_es.lang.php b/modules/Dashboard/language/es_es.lang.php new file mode 100644 index 0000000..63129ad --- /dev/null +++ b/modules/Dashboard/language/es_es.lang.php @@ -0,0 +1,191 @@ +'Oportunidades por fase de venta', +'LBL_SALES_STAGE_FORM_DESC'=>'Muestra suma acumulada de oportunidades de negocio por etapa para los usuarios seleccionados con fecha estimada de cierre dentro del tiempo especificado.', +'LBL_MONTH_BY_OUTCOME'=>'Oportunidades por resultados mensuales', +'LBL_MONTH_BY_OUTCOME_DESC'=>'Muestra la suma acumulada por resultados mensuales para los usuarios seleccionados dentro del rango de tiempo especificado. Resultados en base a oportunidades de negocio en estado "Cerrado".', +'LBL_LEAD_SOURCE_FORM_TITLE'=>'Todas las oportunidades por origen de contacto', +'LBL_LEAD_SOURCE_FORM_DESC'=>'Muestra la suma acumulada por origen de contacto para los usuarios seleccionados.', +'LBL_LEAD_SOURCE_BY_OUTCOME'=>'Todas la oportunidades por origen de contacto y resultados', +'LBL_LEAD_SOURCE_BY_OUTCOME_DESC'=>'Muestra la suma acumulada de resultados por origen de contacto, para los usuarios seleccionados, del rango especificado. Resultados en base a oportunidades de negocio en estado "Cerrado".', +'LBL_PIPELINE_FORM_TITLE_DESC'=>'Muestra la suma acumulada por estado de venta de sus oportunidades con fecha estimada de cierre dentro del rango de tiempo especificado.', +'LBL_DATE_RANGE'=>'Rango de tiempo es', +'LBL_DATE_RANGE_TO'=>'a', +'ERR_NO_OPPS'=>'Por favor, genere alguna oportunidad para ver sus gráficos.', +'LBL_TOTAL_PIPELINE'=>'El total de oportunidades es ', +'LBL_ALL_OPPORTUNITIES'=>'La suma total de todas las oportunides es ', +'LBL_OPP_SIZE'=>'Sumas expresadas en Miles de €', +'LBL_OPP_SIZE_VALUE'=>'1K', +'NTC_NO_LEGENDS'=>'Ninguna', +'LBL_LEAD_SOURCE_OTHER'=>'Otras', +'LBL_EDIT'=>'Editar', +'LBL_REFRESH'=>'Actualizar', +'LBL_CREATED_ON'=>'Ejecutado por última vez el ', +'LBL_OPPS_IN_STAGE'=>'Oportunidades por el estado de venta', +'LBL_OPPS_IN_LEAD_SOURCE'=>'Oportunidades por origen de los Pre-contactos', +'LBL_OPPS_OUTCOME'=>'Oportunidades por resultados', +'LBL_USERS'=>'Usuarios:', +'LBL_SALES_STAGES'=>'Fase de venta:', +'LBL_LEAD_SOURCES'=>'Origen de los Pre-Contactos:', +'LBL_DATE_START'=>'Fecha de inicio:', +'LBL_DATE_END'=>'Fecha de fin:', +//Added for 5.0 +'LBL_NO_PERMISSION'=>'Su perfil no permite ver la gráfica de este módulo', +'LBL_NO_PERMISSION_FIELD'=>'Su perfil no permite ver la gráfica de este módulo o campo', + +'leadsource' => 'Pre-Contactos por Origen', +'leadstatus' => 'Pre-Contactos por Estado', +'leadindustry' => 'Pre-Contactos por Actividad', +'salesbyleadsource' => 'Ventas por Origen de Pre-Contacto', +'salesbyaccount' => 'Ventas por Cuenta', +'salesbyuser' => 'Ventas por Usuario', +'salesbyteam' => 'Ventas por Equipo', +'accountindustry' => 'Cuentas por Actividad', +'productcategory' => 'Productos por Categoría', +'productbyqtyinstock' => 'Productos por Cantidad en stock', +'productbypo' => 'Productos por Ordenes de Compra', +'productbyquotes' => 'Productos por Presupuestos', +'productbyinvoice' => 'Productos por Facturas', +'sobyaccounts' => 'Pedidos por Cuenta', +'sobystatus' => 'Pedidos por Estado', +'pobystatus' => 'Ordenes de Compra por Cuenta', +'quotesbyaccounts' => 'Presupuestos por Cuenta', +'quotesbystage' => 'Presupuestos por Estado', +'invoicebyacnts' => 'Facturas por Cuenta', +'invoicebystatus' => 'Facturas por Estado', +'ticketsbystatus' => 'Tickets por Estado', +'ticketsbypriority' => 'Tickets por Prioridad', +'ticketsbycategory' => 'Tickets por Categoría', +'ticketsbyuser'=>'Tickets por Usuario', +'ticketsbyteam'=>'Tickets por Equipo', +'ticketsbyproduct'=>'Tickets por Producto', +'contactbycampaign'=>'Contactos por Campaña', +'ticketsbyaccount'=>'Tickets por Cuenta', +'ticketsbycontact'=>'Tickets por Contacto', + +'LBL_DASHBRD_HOME'=>'Estadísticas', +'LBL_HORZ_BAR_CHART'=>'Gráfico de barras horizontal', +'LBL_VERT_BAR_CHART'=>'Gráfico de barras vertical', +'LBL_PIE_CHART'=>'Gráfico de tarta', +'LBL_NO_DATA'=>'Sin Datos Disponibles', +'DashboardHome'=>'Estadísticas', +'GRIDVIEW'=>'Vista Rejilla', +'NORMALVIEW'=>'Vista normal', +'VIEWCHART'=>'Ver Gráfica', +'LBL_DASHBOARD'=>'Estadísticas', + +// Added/Updated for vtiger CRM 5.0.4 +"Approved"=>"Aprobado", +"Created"=>"Creado", +"Cancelled"=>"Cancelado", +"Delivered"=>"Solicitado", +"Received Shipment"=>"Envios Recibidos", +"Sent"=>"Enviado", +"Credit Invoice"=>"Factura Proforma", +"Paid"=>"Pagado", +"Un Assigned"=>"Sin Asignar", +"Cold Call"=>"Puerta Fría", +"Existing Customer"=>"Cliente", +"Self Generated"=>"Autogenerado", +"Employee"=>"Empleado", +"Partner"=>"Socio", +"Public Relations"=>"Relaciones Públicas", +"Direct Mail"=>"Correo Directo", +"Conference"=>"Conferencia", +"Trade Show"=>"Feria", +"Web Site"=>"Página Web", +"Word of mouth"=>"Boca a Boca", +"Other"=>"Otro", +"--None--"=>"Ninguno", +"Attempted to Contact"=>"Intentado Contactar", +"Cold"=>"Frio", +"Contact in Future"=>"Contactar más Adelante", +"Contacted"=>"Contactado", +"Hot"=>"Caliente", +"Junk Lead"=>"Contacto Basura", +"Lost Lead"=>"Contacto Fallido", +"Not Contacted"=>"No Contactado", +"Pre Qualified"=>"Pre Clasificado", +"Qualified"=>"Clasificado", +"Warm"=>"Tibio", +"Apparel"=>"Apparel", +"Banking"=>"Bancos", +"Biotechnology"=>"Biotecnología", +"Chemicals"=>"Química", +"Communications"=>"Comunicaciones", +"Construction"=>"Constructión", +"Consulting"=>"Consultoría", +"Education"=>"Educación", +"Electronics"=>"Electrónica", +"Energy"=>"Energía", +"Engineering"=>"Ingeniería", +"Entertainment"=>"Entretenimiento", +"Environmental"=>"Medio Ambiente", +"Finance"=>"Financiero", +"Food & Beverage"=>"Alimentación", +"Government"=>"Gobierno", +"Healthcare"=>"Salud", +"Hospitality"=>"Hospitalidad", +"Insurance"=>"Seguros", +"Machinery"=>"Maquinaria", +"Manufacturing"=>"Fabricación", +"Media"=>"Media", +"Not For Profit"=>"No Lucrativo", +"Recreation"=>"Recreo", +"Retail"=>"Retail", +"Shipping"=>"Envío", +"Technology"=>"Tecnología", +"Telecommunications"=>"Telecomunicaciones", +"Transportation"=>"Transporte", +"Utilities"=>"Utilidades", +"Hardware"=>"Hardware", +"Software"=>"Software", +"CRM Applications"=>"Aplicaciones de CRM", +"Open"=>"Abierto", +"In Progress"=>"En Progreso", +"Wait For Response"=>"Esperando Respuesta", +"Closed"=>"Cerrado", +"Low"=>"Baja", +"Normal"=>"Normal", +"High"=>"Alta", +"Urgent"=>"Urgente", +"Big Problem"=>"Gran Dificultad", +"Small Problem"=>"Pequeña Dificultad", +"Other Problem"=>"Otra Dificultad", +"Accepted"=>"Aceptado", +"Rejected"=>"Rechazado", +"Prospecting"=>"Buscando", +"Qualification"=>"Valorando", +"Needs Analysis"=>"Necesita Análisis", +"Value Proposition"=>"Valorando Proposición", +"Id. Decision Makers"=>"Identificando Responsable", +"Perception Analysis"=>"Analizando", +"Proposal/Price Quote"=>"Propuesta/Presupuesto", +"Negotiation/Review"=>"Negociando/Revisando", +"Closed Won"=>"Cerrado Ganado", +"Closed Lost"=>"Cerrado Perdido", + +); + +?> diff --git a/modules/Dashboard/language/es_mx.lang.php b/modules/Dashboard/language/es_mx.lang.php new file mode 100644 index 0000000..768d509 --- /dev/null +++ b/modules/Dashboard/language/es_mx.lang.php @@ -0,0 +1,192 @@ +'Oportunidades por fase de venta', +'LBL_SALES_STAGE_FORM_DESC'=>'Muestra suma acumulada de oportunidades de negocio por etapa para los usuarios seleccionados con fecha estimada de cierre dentro del tiempo especificado.', +'LBL_MONTH_BY_OUTCOME'=>'Oportunidades por resultados mensuales', +'LBL_MONTH_BY_OUTCOME_DESC'=>'Muestra la suma acumulada por resultados mensuales para los usuarios seleccionados dentro del rango de tiempo especificado. Resultados en base a oportunidades de negocio en estado "Cerrado".', +'LBL_LEAD_SOURCE_FORM_TITLE'=>'Todas las oportunidades por origen de contacto', +'LBL_LEAD_SOURCE_FORM_DESC'=>'Muestra la suma acumulada por origen de contacto para los usuarios seleccionados.', +'LBL_LEAD_SOURCE_BY_OUTCOME'=>'Todas la oportunidades por origen de contacto y resultados', +'LBL_LEAD_SOURCE_BY_OUTCOME_DESC'=>'Muestra la suma acumulada de resultados por origen de contacto, para los usuarios seleccionados, del rango especificado. Resultados en base a oportunidades de negocio en estado "Cerrado".', +'LBL_PIPELINE_FORM_TITLE_DESC'=>'Muestra la suma acumulada por estado de venta de sus oportunidades con fecha estimada de cierre dentro del rango de tiempo especificado.', +'LBL_DATE_RANGE'=>'Rango de tiempo es', +'LBL_DATE_RANGE_TO'=>'a', +'ERR_NO_OPPS'=>'Por favor, genere alguna oportunidad para ver sus gráficos.', +'LBL_TOTAL_PIPELINE'=>'El total de oportunidades es ', +'LBL_ALL_OPPORTUNITIES'=>'La suma total de todas las oportunides es ', +'LBL_OPP_SIZE'=>'Sumas expresadas en Miles', +'LBL_OPP_SIZE_VALUE'=>'1K', +'NTC_NO_LEGENDS'=>'Ninguna', +'LBL_LEAD_SOURCE_OTHER'=>'Otras', +'LBL_EDIT'=>'Editar', +'LBL_REFRESH'=>'Actualizar', +'LBL_CREATED_ON'=>'Ejecutado por última vez el ', +'LBL_OPPS_IN_STAGE'=>'Oportunidades por el estado de venta', +'LBL_OPPS_IN_LEAD_SOURCE'=>'Oportunidades por origen de los Prospectos', +'LBL_OPPS_OUTCOME'=>'Oportunidades por resultados', +'LBL_USERS'=>'Usuarios:', +'LBL_SALES_STAGES'=>'Fase de venta:', +'LBL_LEAD_SOURCES'=>'Origen de los Prospectos:', +'LBL_DATE_START'=>'Fecha de inicio:', +'LBL_DATE_END'=>'Fecha de fin:', +//Added for 5.0 +'LBL_NO_PERMISSION'=>'Su perfil no permite ver la gráfica de este módulo', +'LBL_NO_PERMISSION_FIELD'=>'Su perfil no permite ver la gráfica de este módulo o campo', + +'leadsource' => 'Prospectos por Origen', +'leadstatus' => 'Prospectos por Estado', +'leadindustry' => 'Prospectos por Actividad', +'salesbyleadsource' => 'Ventas por Origen de Prospecto', +'salesbyaccount' => 'Ventas por Cuenta', +'salesbyuser' => 'Ventas por Usuario', +'salesbyteam' => 'Ventas por Equipo', +'accountindustry' => 'Cuentas por Actividad', +'productcategory' => 'Productos por Categoría', +'productbyqtyinstock' => 'Productos por Cantidad en stock', +'productbypo' => 'Productos por Órdenes de Compra', +'productbyquotes' => 'Productos por Cotizaciones', +'productbyinvoice' => 'Productos por Facturas', +'sobyaccounts' => 'Pedidos por Cuenta', +'sobystatus' => 'Pedidos por Estado', +'pobystatus' => 'Órdenes de Compra por Cuenta', +'quotesbyaccounts' => 'Cotizaciones por Cuenta', +'quotesbystage' => 'Cotizaciones por Estado', +'invoicebyacnts' => 'Facturas por Cuenta', +'invoicebystatus' => 'Facturas por Estado', +'ticketsbystatus' => 'Tickets por Estado', +'ticketsbypriority' => 'Tickets por Prioridad', +'ticketsbycategory' => 'Tickets por Categoría', +'ticketsbyuser'=>'Tickets por Usuario', +'ticketsbyteam'=>'Tickets por Equipo', +'ticketsbyproduct'=>'Tickets por Producto', +'contactbycampaign'=>'Contactos por Campaña', +'ticketsbyaccount'=>'Tickets por Cuenta', +'ticketsbycontact'=>'Tickets por Contacto', + +'LBL_DASHBRD_HOME'=>'Estadísticas', +'LBL_HORZ_BAR_CHART'=>'Gráfico de barras horizontal', +'LBL_VERT_BAR_CHART'=>'Gráfico de barras vertical', +'LBL_PIE_CHART'=>'Gráfico de tarta', +'LBL_NO_DATA'=>'Sin Datos Disponibles', +'DashboardHome'=>'Estadísticas', +'GRIDVIEW'=>'Vista Cuadrícula', +'NORMALVIEW'=>'Vista normal', +'VIEWCHART'=>'Ver Gráfica', +'LBL_DASHBOARD'=>'Estadísticas', + +// Added/Updated for vtiger CRM 5.0.4 +"Approved"=>"Aprobado", +"Created"=>"Creado", +"Cancelled"=>"Cancelado", +"Delivered"=>"Entregado", +"Received Shipment"=>"Envios Recibidos", +"Sent"=>"Enviado", +"Credit Invoice"=>"Factura Crédito", +"Paid"=>"Pagado", +"Un Assigned"=>"Sin Asignar", +"Cold Call"=>"Llamada en Frío", +"Existing Customer"=>"Cliente", +"Self Generated"=>"Autogenerado", +"Employee"=>"Empleado", +"Partner"=>"Socio", +"Public Relations"=>"Relaciones Públicas", +"Direct Mail"=>"Correo Directo", +"Conference"=>"Conferencia", +"Trade Show"=>"Feria", +"Web Site"=>"Página Web", +"Word of mouth"=>"Boca a Boca", +"Other"=>"Otro", +"--None--"=>"Ninguno", +"Attempted to Contact"=>"Intentado Contactar", +"Cold"=>"Frio", +"Contact in Future"=>"Contactar más Adelante", +"Contacted"=>"Contactado", +"Hot"=>"Caliente", +"Junk Lead"=>"Contacto Basura", +"Lost Lead"=>"Contacto Fallido", +"Not Contacted"=>"No Contactado", +"Pre Qualified"=>"Pre Clasificado", +"Qualified"=>"Clasificado", +"Warm"=>"Tibio", +"Apparel"=>"Ropa", +"Banking"=>"Bancos", +"Biotechnology"=>"Biotecnología", +"Chemicals"=>"Química", +"Communications"=>"Comunicaciones", +"Construction"=>"Constructión", +"Consulting"=>"Consultoría", +"Education"=>"Educación", +"Electronics"=>"Electrónica", +"Energy"=>"Energía", +"Engineering"=>"Ingeniería", +"Entertainment"=>"Entretenimiento", +"Environmental"=>"Medio Ambiente", +"Finance"=>"Financiero", +"Food & Beverage"=>"Alimentación", +"Government"=>"Gobierno", +"Healthcare"=>"Salud", +"Hospitality"=>"Hospitalidad", +"Insurance"=>"Seguros", +"Machinery"=>"Maquinaria", +"Manufacturing"=>"Fabricación", +"Media"=>"Media", +"Not For Profit"=>"No Lucrativo", +"Recreation"=>"Recreo", +"Retail"=>"Retail", +"Shipping"=>"Envío", +"Technology"=>"Tecnología", +"Telecommunications"=>"Telecomunicaciones", +"Transportation"=>"Transporte", +"Utilities"=>"Utilidades", +"Hardware"=>"Hardware", +"Software"=>"Software", +"CRM Applications"=>"Aplicaciones de CRM", +"Open"=>"Abierto", +"In Progress"=>"En Progreso", +"Wait For Response"=>"Esperando Respuesta", +"Closed"=>"Cerrado", +"Low"=>"Baja", +"Normal"=>"Normal", +"High"=>"Alta", +"Urgent"=>"Urgente", +"Big Problem"=>"Problema Grave", +"Small Problem"=>"Problema Simple", +"Other Problem"=>"Otro Problema", +"Accepted"=>"Aceptado", +"Rejected"=>"Rechazado", +"Prospecting"=>"Buscando", +"Qualification"=>"Valorando", +"Needs Analysis"=>"Necesita Análisis", +"Value Proposition"=>"Evaluando Propuesta", +"Id. Decision Makers"=>"Identificando Responsable", +"Perception Analysis"=>"Análisis de Percepción", +"Proposal/Price Quote"=>"Propuesta/Cotización", +"Negotiation/Review"=>"Negociando/Revisando", +"Closed Won"=>"Cerrado Ganado", +"Closed Lost"=>"Cerrado Perdido", + +); + +?> diff --git a/modules/Dashboard/language/fr_fr.lang.php b/modules/Dashboard/language/fr_fr.lang.php new file mode 100644 index 0000000..25acec5 --- /dev/null +++ b/modules/Dashboard/language/fr_fr.lang.php @@ -0,0 +1,174 @@ + 'Total portefeuille par étapes de ventes', + 'LBL_SALES_STAGE_FORM_DESC' => 'Affiche les montants cumulés des affaires par étapes de ventes choisies pour un collaborateur donné où la date de clôture est dans le laps de temps donné.', + 'LBL_MONTH_BY_OUTCOME' => 'Résultat mensuel par vente', + 'LBL_MONTH_BY_OUTCOME_DESC' => 'Affiche les montants cumulés des affaires par mois et par catégorie pour les collaborateurs choisis où la date de clôture est dans le laps temps spécifié. Le résultat dépend du choix de l\'étape de ventes.', + 'LBL_LEAD_SOURCE_FORM_TITLE' => 'Total du portefeuille par source de prospects', + 'LBL_LEAD_SOURCE_FORM_DESC' => 'Affiche les montants cumulés par source de prospects choisis pour les collaborateurs sélectionnés.', + 'LBL_LEAD_SOURCE_BY_OUTCOME' => 'Toutes les affaires par catégorie', + 'LBL_LEAD_SOURCE_BY_OUTCOME_DESC' => 'Affiche les montants cumulés des affaires par source de prospects choisies et par catégorie pour les utilisateurs sélectionnés où la date de clôture est dans la fourchette choisie. Le résultat dépend de l\'étape de vente définie.', + 'LBL_PIPELINE_FORM_TITLE_DESC' => 'Affiche les montants cumulés par étapes de ventes sélectionnées pour les affaires où la date de clôture est dans la fourchette de dates spécifiée.', + 'LBL_DATE_RANGE' => 'Pour la période du', + 'LBL_DATE_RANGE_TO' => 'au', + 'ERR_NO_OPPS' => 'Créer des affaires pour voir les graphiques des affaires.', + 'LBL_TOTAL_PIPELINE' => 'Total portefeuille ', + 'LBL_ALL_OPPORTUNITIES' => 'Le montant total affaires est ', + 'LBL_OPP_SIZE' => 'Volume en KEur.', + 'LBL_OPP_SIZE_VALUE' => '1K', + 'NTC_NO_LEGENDS' => 'Aucun', + 'LBL_LEAD_SOURCE_OTHER' => 'Autre', + 'LBL_EDIT' => 'Editer', + 'LBL_REFRESH' => 'Rafraichir', + 'LBL_CREATED_ON' => 'Dernier rafraîchissement le ', + 'LBL_OPPS_IN_STAGE' => 'Affaires où l\'étape de ventes est', + 'LBL_OPPS_IN_LEAD_SOURCE' => 'Affaires où la source du prospect est', + 'LBL_OPPS_OUTCOME' => 'Affaires où la catégorie est', + 'LBL_USERS' => 'Collaborateurs :', + 'LBL_SALES_STAGES' => 'Phase vente :', + 'LBL_LEAD_SOURCES' => 'Origines :', + 'LBL_DATE_START' => 'Date de début :', + 'LBL_DATE_END' => 'Date de fin :', + 'LBL_NO_PERMISSION' => 'Votre profil ne vous permet pas d\'afficher les graphiques pour ce module', + 'LBL_NO_PERMISSION_FIELD' => 'Votre profil ne vous permet pas d\'afficher les graphiques pour ce module ou pour ce champ', + 'leadsource' => 'Prospects par origine', + 'leadstatus' => 'Prospects par statut', + 'leadindustry' => 'Prospects par secteur', + 'salesbyleadsource' => 'Ventes par origine de prospect', + 'salesbyaccount' => 'Ventes par compte', + 'salesbyuser' => 'Ventes par collaborateur', + 'salesbyteam' => 'Ventes par équipe', + 'accountindustry' => 'Comptes par secteur', + 'productcategory' => 'Produits par catégorie', + 'productbyqtyinstock' => 'Produits par quantité en stock', + 'productbypo' => 'Produits par commande', + 'productbyquotes' => 'Produits par devis', + 'productbyinvoice' => 'Produits par facture', + 'sobyaccounts' => 'Ventes par compte', + 'sobystatus' => 'Commandes par statut', + 'pobystatus' => 'Commandes fourn. par statut', + 'quotesbyaccounts' => 'Devis par compte', + 'quotesbystage' => 'Devis par phase', + 'invoicebyacnts' => 'Factures par compte', + 'invoicebystatus' => 'Factures par statut', + 'ticketsbystatus' => 'Tickets par statut', + 'ticketsbypriority' => 'Tickets par priorité', + 'ticketsbycategory' => 'Tickets par catégorie', + 'ticketsbyuser' => 'Tickets par collaborateur', + 'ticketsbyteam' => 'Tickets par équipe', + 'ticketsbyproduct' => 'Tickets par produit', + 'contactbycampaign' => 'Contacts par campagne', + 'ticketsbyaccount' => 'Tickets par compte', + 'ticketsbycontact' => 'Tickets par contact', + 'LBL_DASHBRD_HOME' => 'Tableaux de bord', + 'LBL_HORZ_BAR_CHART' => 'Barres horizontales', + 'LBL_VERT_BAR_CHART' => 'Barres verticales', + 'LBL_PIE_CHART' => 'Camembert', + 'LBL_NO_DATA' => 'Aucune donnée disponible', + 'DashboardHome' => 'Tableaux de bord', + 'GRIDVIEW' => 'Matrice', + 'NORMALVIEW' => 'Normale', + 'VIEWCHART' => 'Afficher n°', + 'LBL_DASHBOARD' => 'Tableaux de bord', + 'Approved' => 'Approuvé', + 'Created' => 'Créé', + 'Cancelled' => 'Annulé', + 'Delivered' => 'Livré', + 'Received Shipment' => 'Expédition livrée', + 'Sent' => 'Envoyée', + 'Credit Invoice' => 'Facture au crédit', + 'AutoCreated' => 'Crée automatiquement', + 'Paid' => 'Payé', + 'Un Assigned' => 'Non assigné', + 'Cold Call' => 'Appel froid', + 'Existing Customer' => 'Client existant', + 'Self Generated' => 'Généré seul', + 'Employee' => 'Salarié', + 'Partner' => 'Partenaire', + 'Public Relations' => 'Relation publique', + 'Direct Mail' => 'Mailling', + 'Conference' => 'Conférence', + 'Trade Show' => 'Salon', + 'Web Site' => 'Site Web', + 'Word of mouth' => 'Bouche à oreille', + 'Other' => 'Autre', + '--None--' => 'Aucun', + 'Attempted to Contact' => 'En attente de contact', + 'Cold' => 'Froid', + 'Contact in Future' => 'A contacter', + 'Contacted' => 'Contacté', + 'Hot' => 'Chaud', + 'Junk Lead' => 'Lead abandonné', + 'Lost Lead' => 'Lead perdu', + 'Not Contacted' => 'Non contacté', + 'Pre Qualified' => 'Pré qualifié', + 'Qualified' => 'Qualifié', + 'Warm' => 'Chaud', + 'Apparel' => 'Habillement', + 'Banking' => 'Banque', + 'Biotechnology' => 'Biotechnologie', + 'Chemicals' => 'Chimie', + 'Communications' => 'Communications', + 'Construction' => 'Bâtiment', + 'Consulting' => 'Consulting', + 'Education' => 'Education', + 'Electronics' => 'Electronique', + 'Energy' => 'Energie', + 'Engineering' => 'Ingénierie', + 'Entertainment' => 'Spectacle', + 'Environmental' => 'Environnement', + 'Finance' => 'Finance', + 'Food & Beverage' => 'Alimentation', + 'Government' => 'Administration', + 'Healthcare' => 'Santé', + 'Hospitality' => 'Hôpital', + 'Insurance' => 'Assurance', + 'Machinery' => 'Mécanique', + 'Manufacturing' => 'Industrie', + 'Media' => 'Média', + 'Not For Profit' => 'Association', + 'Recreation' => 'Divertissement', + 'Retail' => 'Vente de détail', + 'Shipping' => 'Transport', + 'Technology' => 'Technologie', + 'Telecommunications' => 'Télécommunications', + 'Transportation' => 'Transport', + 'Utilities' => 'Utilitaires', + 'Hardware' => 'Matériel', + 'Software' => 'Logiciel', + 'CRM Applications' => 'Applications CRM', + 'Open' => 'Ouvert', + 'In Progress' => 'En cours', + 'Wait For Response' => 'En attente de la réponse', + 'Closed' => 'Fermé', + 'Low' => 'Basse', + 'Normal' => 'Normal', + 'High' => 'Haute', + 'Urgent' => 'Urgent', + 'Big Problem' => 'Gros problème', + 'Small Problem' => 'Petit problème', + 'Other Problem' => 'Autre problème', + 'Accepted' => 'Accepté', + 'Rejected' => 'Rejeté', + 'Prospecting' => 'Prospection', + 'Qualification' => 'Qualification', + 'Needs Analysis' => 'Nécessite une analyse', + 'Value Proposition' => 'Valeur de la proposition', + 'Id. Decision Makers' => 'Décideur', + 'Perception Analysis' => 'Analyse de perception', + 'Proposal/Price Quote' => 'Proposition tarifaire', + 'Negotiation/Review' => 'En négociation', + 'Closed Won' => 'Fermé gagné', + 'Closed Lost' => 'Fermé perdu', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Dashboard/language/hu_hu.lang.php b/modules/Dashboard/language/hu_hu.lang.php new file mode 100644 index 0000000..30c46d4 --- /dev/null +++ b/modules/Dashboard/language/hu_hu.lang.php @@ -0,0 +1,181 @@ + 'Tölcsér értékesítési fázisok szerint', + 'LBL_SALES_STAGE_FORM_DESC' => 'A kumulált Lehetőségek összegének mutatása a kiválasztott értékesítési fázis szerint a kiválasztott Felhasználóknak, ahol a várható lezárási dátum a megadott dátum intervallumban van.', + 'LBL_MONTH_BY_OUTCOME' => 'Tölcsér Hónap és Kihozatal szerint', + 'LBL_MONTH_BY_OUTCOME_DESC' => 'A kumulált Lehetőségek összegének mutatása Hónap és Kihozatal szerint a kiválasztott Felhasználóknak, ahol a várható lezárási dátum a megadott dátum intervallumban van. A Kihozatal azon alapul, hogy az értékesítési fázis Lezárt - Megkötött, Lezárt - Elvesztett vagy bármilyen más érték.', + 'LBL_LEAD_SOURCE_FORM_TITLE' => 'Minden lehetőség a Jelölt Forrás szerint', + 'LBL_LEAD_SOURCE_FORM_DESC' => 'A kumulált Lehetőségek összegének mutatása a kiválasztott Jelölt Forrás szerint a kiválasztott Felhasználóknak.', + 'LBL_LEAD_SOURCE_BY_OUTCOME' => 'Minden Lehetőség Jelölt Forrás és Kihozatal szerint', + 'LBL_LEAD_SOURCE_BY_OUTCOME_DESC' => 'A kumulált Lehetőségek összegének mutatása a kiválasztott Jelölt Forrás és Kihozatal szerint a kiválasztott Felhasználóknak, ahol a várható lezárási dátum a megadott dátum intervallumban van. A Kihozatal azon alapul, hogy az értékesítési fázis Lezárt - Megkötött, Lezárt - Elvesztett vagy bármilyen más érték.', + 'LBL_PIPELINE_FORM_TITLE_DESC' => 'A kumulált Lehetőségek összegének mutatása a kiválasztott értékesítési fázis szerint, ahol a várható lezárási dátum a megadott dátum intervallumban van.', + 'LBL_DATE_RANGE' => 'Dátum intervallum: ', + 'LBL_DATE_RANGE_TO' => '-tól eddig: ', + 'ERR_NO_OPPS' => 'Kérjük, hogy hozz létre néhány Lehetőséget, hogy a grafikus megjelenítést láthasd.', + 'LBL_TOTAL_PIPELINE' => 'Tölcsér teljes összege ', + 'LBL_ALL_OPPORTUNITIES' => 'Az összes lehetöség teljes összege ', + 'LBL_OPP_SIZE' => 'Diagram beosztása: ', + 'LBL_OPP_SIZE_VALUE' => ' 1ezer', + 'NTC_NO_LEGENDS' => 'Nincs', + 'LBL_LEAD_SOURCE_OTHER' => 'Másik', + 'LBL_EDIT' => 'Szerkeszt', + 'LBL_REFRESH' => 'Frissít', + 'LBL_CREATED_ON' => 'Utolsó futás: ', + 'LBL_OPPS_IN_STAGE' => 'lehetőségek, ahol az értékesítési fázis: ', + 'LBL_OPPS_IN_LEAD_SOURCE' => 'lehetőségek, ahol a Jelölt forrás: ', + 'LBL_OPPS_OUTCOME' => 'lehetőségek, ahol a kihozatal: ', + 'LBL_USERS' => 'Felhasználók:', + 'LBL_SALES_STAGES' => 'Értékesítési Fázisok:', + 'LBL_LEAD_SOURCES' => 'Jelölt Források:', + 'LBL_DATE_START' => 'Kezdő Dátum:', + 'LBL_DATE_END' => 'Befejező Dátum:', + 'LBL_NO_PERMISSION' => 'Sajnáljuk, de nincs hozzáférésed a modul grafikonjának megtekintéséhez', + 'LBL_NO_PERMISSION_FIELD' => 'Sajnáljuk, de nincs hozzáférésed a modul vagy mező grafikonjának megtekintéséhez', + 'leadsource' => 'Jelöltek forrás szerint', + 'leadstatus' => 'Jelöltek állapot szerint', + 'leadindustry' => 'Jelöltek iparág szerint', + 'salesbyleadsource' => 'Megrendelés Jelölt forrás szerint', + 'salesbyaccount' => 'Megrendelés Cégenként', + 'salesbyuser' => 'Megrendelés Felhasználók szerint', + 'salesbyteam' => 'Megrendelés Csapatok szerint', + 'accountindustry' => 'Cégek iparág szerint', + 'productcategory' => 'Termékek Kategória szerint', + 'productbyqtyinstock' => 'Termékek Készlet szerint', + 'productbypo' => 'Termékek Rendelések szerint', + 'productbyquotes' => 'Termékek Ajánlatok szerint', + 'productbyinvoice' => 'Termékek Díjbekérők szerint', + 'sobyaccounts' => 'Megrendelések Cégenként', + 'sobystatus' => 'Megrendelések állapot szerint', + 'pobystatus' => 'Beszerzések állapot szerint', + 'quotesbyaccounts' => 'Ajánlatok Cégenként', + 'quotesbystage' => 'Ajánlatok fázis szerint', + 'invoicebyacnts' => 'Díjbekérők Cégenként', + 'invoicebystatus' => 'Díjbekérők állapot szerint', + 'ticketsbystatus' => 'Kérések állapot szerint', + 'ticketsbypriority' => 'Kérések prioritás szerint', + 'ticketsbycategory' => 'Kérések kategória szerint', + 'ticketsbyuser' => 'Kérések felhasználók szerint', + 'ticketsbyteam' => 'Kérések csapatok szerint', + 'ticketsbyproduct' => 'Kérések termékek szerint', + 'contactbycampaign' => 'Kapcsolatok Kampányok szerint', + 'ticketsbyaccount' => 'Kérések cégenként', + 'ticketsbycontact' => 'Kérések/Jegyek a Kapcsolatok szerint', + 'LBL_DASHBRD_HOME' => 'Műszerfal Kezdőlap', + 'LBL_HORZ_BAR_CHART' => 'Vízszintes oszlop Diagram', + 'LBL_VERT_BAR_CHART' => 'Függőleges oszlop Diagram', + 'LBL_PIE_CHART' => 'Tortaszelet Diagram', + 'LBL_NO_DATA' => 'Nincs elérhető adat', + 'DashboardHome' => 'Műszerfal Kezdőlap', + 'GRIDVIEW' => 'Rács nézet', + 'NORMALVIEW' => 'Normál nézet', + 'VIEWCHART' => 'Diagram nézet', + 'LBL_DASHBOARD' => 'Műszerfal', + 'Approved' => 'Jóváhagyott', + 'Created' => 'Létrehozott', + 'Cancelled' => 'Törölt', + 'Delivered' => 'Kiszállított', + 'Received Shipment' => 'Fogadott szállítmány', + 'Sent' => 'Elküldött', + 'Credit Invoice' => 'Utalásos Díjbekérő', + 'Paid' => 'Fizetett', + 'Un Assigned' => 'Nincs Felelöse', + 'Cold Call' => 'Hideg Hívás', + 'Existing Customer' => 'Meglévö ügyfél', + 'Self Generated' => 'Saját magától jelentkezett', + 'Employee' => 'Alkalmazott', + 'Partner' => 'Partner', + 'Public Relations' => 'Public Relations', + 'Direct Mail' => 'Direct Mail', + 'Conference' => 'Konferencia', + 'Trade Show' => 'Árubemutató', + 'Web Site' => 'Weboldal', + 'Word of mouth' => 'Szóbeszéd', + 'Other' => 'Egyéb', + '--None--' => 'Nincs', + 'Attempted to Contact' => 'Megkísérelt kapcsolatfelvétel', + 'Cold' => 'Hideg', + 'Contact in Future' => 'Jövöbeni kapcsolatfelvétel', + 'Contacted' => 'Kapcsolatba léptünk', + 'Hot' => 'Forró', + 'Junk Lead' => 'Alkalmatlan Jelölt', + 'Lost Lead' => 'Elvesztett Jelölt', + 'Not Contacted' => 'Nem lépett kapcsolatba', + 'Pre Qualified' => 'Elözetesen minösített', + 'Qualified' => 'Minösített', + 'Warm' => 'Meleg', + 'Apparel' => 'Ruházat - Felszerelés', + 'Banking' => 'Bank', + 'Biotechnology' => 'Biotechnológia', + 'Chemicals' => 'Vegyipar', + 'Communications' => 'Kommunikáció', + 'Construction' => 'Építőipar', + 'Consulting' => 'Tanácsadás', + 'Education' => 'Oktatás', + 'Electronics' => 'Elektronika', + 'Energy' => 'Energia szektor', + 'Engineering' => 'Mérnöki tevékenység', + 'Entertainment' => 'Szórakoztató ipar', + 'Environmental' => 'Környezetvédelem', + 'Finance' => 'Pénzügyek', + 'Food & Beverage' => 'Élelmiszer ipar', + 'Government' => 'Államigazgatás', + 'Healthcare' => 'Egészségügy', + 'Hospitality' => 'Vendéglátás', + 'Insurance' => 'Biztosítás', + 'Machinery' => 'Gépipar', + 'Manufacturing' => 'Gyártás', + 'Media' => 'Média', + 'Not For Profit' => 'Non-Profit', + 'Recreation' => 'Wellness', + 'Retail' => 'Kiskereskedelem', + 'Shipping' => 'Szállítás', + 'Technology' => 'Technológia', + 'Telecommunications' => 'Telekommunikáció', + 'Transportation' => 'Közlekedés', + 'Utilities' => 'Szolgáltatás', + 'Hardware' => 'Hardware', + 'Software' => 'Software', + 'CRM Applications' => 'CRM Alkalmazások', + 'Open' => 'Nyitott', + 'In Progress' => 'Folyamatban', + 'Wait For Response' => 'Válaszra vár', + 'Closed' => 'Lezárt', + 'Low' => 'Alacsony', + 'Normal' => 'Normál', + 'High' => 'Magas', + 'Urgent' => 'Sürgös', + 'Big Problem' => 'Nagy Probléma', + 'Small Problem' => 'Kis Probléma', + 'Other Problem' => 'Más Probléma', + 'Accepted' => 'Elfogadott', + 'Rejected' => 'Visszautasított', + 'Prospecting' => 'Kiválasztás', + 'Qualification' => 'Minösítés', + 'Needs Analysis' => 'Elemzés szükséges', + 'Value Proposition' => 'Ajánlat meghatározás', + 'Id. Decision Makers' => 'Döntéshozók meghatározása', + 'Perception Analysis' => 'Kifogáskezelés', + 'Proposal/Price Quote' => 'Javaslat/Árajánlat', + 'Negotiation/Review' => 'Tárgyalás/Felülvizsgálat', + 'Closed Won' => 'Lezárt - megkötött', + 'Closed Lost' => 'Lezárt - elveszített', + 'AutoCreated' => 'Automatikusan létrehozva', + 'LBL_AMOUNT_FORM_TITLE_TKS' => 'Összeg', + 'LBL_TOTAL_PIPELINE_TKS' => 'Marketing tölcsér', + 'LBL_SALES_STAGE_FORM_DESC_TKS' => 'Értékesítési állapot' +); +?> \ No newline at end of file diff --git a/modules/Dashboard/language/nl_nl.lang.php b/modules/Dashboard/language/nl_nl.lang.php new file mode 100644 index 0000000..e114553 --- /dev/null +++ b/modules/Dashboard/language/nl_nl.lang.php @@ -0,0 +1,208 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.7 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Dashboard/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_SALES_STAGE_FORM_TITLE'=>'Pipeline per verkoop stadium', +'LBL_SALES_STAGE_FORM_DESC'=>'Laat de cumulatieve bedragen van uw verkoopkansen zien. Geselecteerd op verkoop stadium en verkoopdatum.', +'LBL_MONTH_BY_OUTCOME'=>'Pipeline per maand en resultaat', +'LBL_MONTH_BY_OUTCOME_DESC'=>'Laat de cumulatieve bedragen van uw verkoopkansen zien. Geselecteerd per maand, verkoop stadium en resultaat.', +'LBL_LEAD_SOURCE_FORM_TITLE'=>'Alle Verkoopkansen per lead bron', +'LBL_LEAD_SOURCE_FORM_DESC'=>'Laat de cumulatieve bedragen van uw verkoopkansen zien. Geselecteerd op lead bron.', +'LBL_LEAD_SOURCE_BY_OUTCOME'=>'Alle verkoopkansen per lead bron en resultaat', +'LBL_LEAD_SOURCE_BY_OUTCOME_DESC'=>'Laat de cumulatieve bedragen van uw verkoopkansen zien. Geselecteerd per maand, verkoop stadium en resultaat.', +'LBL_PIPELINE_FORM_TITLE_DESC'=>'Laat de cumulatieve bedragen zien per verkoop stadium van uw verkoopkansen met de verwachte verkoopdatum.', +'LBL_DATE_RANGE'=>'Datum selectie is', +'LBL_DATE_RANGE_TO'=>'tot', // van ... tot ... +'ERR_NO_OPPS'=>'Maak een aantal verkoopkansen aan voor u de grafieken kunt maken/zien.', +'LBL_TOTAL_PIPELINE'=>'De totale pipeline is ', +'LBL_ALL_OPPORTUNITIES'=>'Totaalbedrag van alle verkoopkansen is ', +'LBL_OPP_SIZE'=>'Verkoopkans grootte in ', +'LBL_OPP_SIZE_VALUE'=>'1K', +'NTC_NO_LEGENDS'=>'Geen', +'LBL_LEAD_SOURCE_OTHER'=>'Anders', +'LBL_EDIT'=>'Bewerk', +'LBL_REFRESH'=>'Ververs', +'LBL_CREATED_ON'=>'Laatst gemaakt op ', +'LBL_OPPS_IN_STAGE'=>'verkoopkansen per verkoopstadium', +'LBL_OPPS_IN_LEAD_SOURCE'=>'verkoopkansen per leadbron', +'LBL_OPPS_OUTCOME'=>'verkoopkansen per resultaat', +'LBL_USERS'=>'Gebruikers:', +'LBL_SALES_STAGES'=>'Verkoop stadium:', +'LBL_LEAD_SOURCES'=>'Lead bronnen:', +'LBL_DATE_START'=>'Startdatum:', +'LBL_DATE_END'=>'Einddatum:', +//Added for 5.0 +'LBL_NO_PERMISSION'=>'U heeft geen toegang tot deze module', +'LBL_NO_PERMISSION_FIELD'=>'U heeft geen toegang tot deze module of velden', + +"leadsource" => "Lead bron", +"leadstatus" => "Leads per status", +"leadindustry" => "Leads per industrie", +"salesbyleadsource" => "Verkopen per lead bron", +"salesbyaccount" => "Verkoop aan accounts", +"salesbyuser" => "Verkoop door gebruiker", +"salesbyteam"=>"Verkoop door team", +"salesbyaccount" => "Verkopen per accounts", +"productcategory" => "Producten per categorie", +"productbyqtyinstock" => "Producten naar hoeveelheid in voorraad", +"productbypo" => "Producten met inkooporder", +"productbyquotes" => "Producten met offertes", +"productbyinvoice" => "Producten met factuur", +"sobyaccounts" => "Verkooporders per accounts", +"sobystatus" => "Verkooporders per status", +"pobystatus" => "Inkooporders per status", +"quotesbyaccounts" => "Offertes per accounts", +"quotesbystage" => "Offertes per status", +"invoicebyacnts" => "Facturen per accounts", +"invoicebystatus" => "Facturen per status", +"ticketsbystatus" => "Tickets per status", +"ticketsbypriority" => "Tickets per prioriteit", +"ticketsbycategory" => "Tickets per categorie", +"ticketsbyuser"=>"Tickets per gebruiker", +"ticketsbyteam"=>"Tickets per team", +"ticketsbyproduct"=>"Tickets per product", +"contactbycampaign"=>"Contacten per campagne", +"ticketsbyaccount"=>"Tickets per account", +"ticketsbycontact"=>"Tickets per contact", +"accountindustry"=>"Accounts per Industrie", + +'LBL_DASHBRD_HOME'=>'Dashboard Home', +'LBL_HORZ_BAR_CHART'=>'Horizontale kolommengrafiek', +'LBL_VERT_BAR_CHART'=>'Verticale kolommengrafiek', +'LBL_PIE_CHART'=>'Cirkeldiagram', +'LBL_NO_DATA'=>'Geen gegevens beschikbaar', +'DashboardHome'=>'Dashboard Home', +'GRIDVIEW'=>'Rooster view', +'NORMALVIEW'=>'Normale view', +'VIEWCHART'=>'Grafiek bekijken', +'LBL_DASHBOARD'=>'Dashboard', + +// Added/Updated for vtiger CRM 5.0.4 +"Approved"=>"Goedgekeurd", +"Created"=>"Gemaakt", +"Cancelled"=>"Geannuleerd", +"Delivered"=>"Afgeleverd", +"Received Shipment"=>"Goederen ontvangen", +"Sent"=>"Verstuurd", +"Credit Invoice"=>"Credit factuur", +"Paid"=>"Betaald", +"Un Assigned"=>"Niet toegewezen", + +"Cold Call"=>"Koud bellen", +"Existing Customer"=>"Bestaande klant", +"Self Generated"=>"Eigen inspanning", +"Employee"=>"Werknemer", +"Partner"=>"Partner", +"Public Relations"=>"Public Relations", +"Direct Mail"=>"Direct mail", +"Conference"=>"Conferentie", +"Trade Show"=>"Beurs", +"Web Site"=>"Website", +"Word of mouth"=>"Mond tot mond", +"Other"=>"Anders", +"--None--"=>"--Geen--", + +"Attempted to Contact"=>"Poging om contact te zoeken", +"Cold"=>"Koud", +"Contact in Future"=>"Contacteer in de toekomst", +"Contacted"=>"Gecontacteerd", +"Hot"=>"Heet", +"Junk Lead"=>"Junk Lead", +"Lost Lead"=>"Lead verloren", +"Not Contacted"=>"Niet gecontacteerd", +"Pre Qualified"=>"Voorgekwalificeerd", +"Qualified"=>"Gekwalificeerd", +"Warm"=>"Warm", +"Apparel"=>"Kleding", +"Banking"=>"Bank", +"Biotechnology"=>"Biotechnologie", +"Chemicals"=>"Chemisch", +"Communications"=>"Communicatie", +"Construction"=>"Constructie", +"Consulting"=>"Consulting", +"Education"=>"Onderwijs", +"Electronics"=>"Electronica", +"Energy"=>"Energie", +"Engineering"=>"Engineering", +"Entertainment"=>"Entertainment", +"Environmental"=>"Milieu", +"Finance"=>"Financieel", +"Food & Beverage"=>"Voedingsmiddelen en Dranken", +"Government"=>"Overheid", +"Healthcare"=>"Gezondheidszorg", +"Hospitality"=>"Hotels en Conferentie gelegenheden", +"Insurance"=>"Verzekeringen", +"Machinery"=>"Machinerie", +"Manufacturing"=>"Productie", +"Media"=>"Media", +"Not For Profit"=>"Non profit", +"Recreation"=>"Recreatie", +"Retail"=>"Detailhandel", +"Shipping"=>"Distributie", +"Technology"=>"Technologie", +"Telecommunications"=>"Telecommunicatie", +"Transportation"=>"Transport", +"Utilities"=>"Nutsbedrijven", +"Hardware"=>"Hardware", +"Software"=>"Software", +"CRM Applications"=>"CRM applicaties", +"Open"=>"Open", +"In Progress"=>"In behandeling", +"Wait For Response"=>"Wacht op antwoord", +"Closed"=>"Gesloten", +"Low"=>"Laag", +"Normal"=>"Normaal", +"High"=>"Hoog", +"Urgent"=>"Spoed", +"Big Problem"=>"Groot probleem", +"Small Problem"=>"Klein probleem", +"Other Problem"=>"Ander probleem", +"Accepted"=>"Geaccepteerd", +"Rejected"=>"Geweigerd", +"Prospecting"=>"Kennismaking", +"Qualification"=>"Kwalificatie", +"Needs Analysis"=>"Behoeftenonderzoek", +"Value Proposition"=>"Waardevoorstel", +"Id. Decision Makers"=>"Identificeer Beslissers", +"Perception Analysis"=>"Perceptieonderzoek", +"Proposal/Price Quote"=>"Voorstel/Prijsopgave", +"Negotiation/Review"=>"Onderhandeling/Afronding", +"Closed Won"=>"Gesloten Gewonnen", +"Closed Lost"=>"Gesloten Verloren", +// Vicus - T6909 +'LBL_AMOUNT_FORM_TITLE_TKS'=>'Pijplijn op gewaardeerde omzet (waarde x slagingskans)', +'LBL_TOTAL_PIPELINE_TKS'=>'Totaal gewaardeerde omzet is ', +'LBL_SALES_STAGE_FORM_DESC_TKS'=>'Toont cummulatieve opportunity bedragen bij geselecteerde verkoopstadia voor geselecteerde gebruikers waar de verwachte slutiignsdatum ligt binnen de gespecificeerde datumrange.' + +); +?> diff --git a/modules/Dashboard/language/pt_br.lang.php b/modules/Dashboard/language/pt_br.lang.php new file mode 100644 index 0000000..94beb85 --- /dev/null +++ b/modules/Dashboard/language/pt_br.lang.php @@ -0,0 +1,191 @@ +'Funil Estágio de Vendas', +'LBL_SALES_STAGE_FORM_DESC'=>'Mostra as quantidades acumuladas da Oportunidade, por Estágio de Venda e Usuários selecionados, onde a data prevista de fechamento está dentro do intervalo de data especificado.', +'LBL_MONTH_BY_OUTCOME'=>'Funil de Vendas por Resultado Mensal', +'LBL_MONTH_BY_OUTCOME_DESC'=>'Mostra as quantidades acumuladas da Oportunidade, por Resultado Mensal, para usuários selecionados onde a expectativa da data de fechamento está dentro do intervalo de data especificado. O resultado é baseado no estágio das vendas, se foi Fechada com Sucesso, se o Fechamento foi Perdido ou algum outro valor.', +'LBL_LEAD_SOURCE_FORM_TITLE'=>'Todas as Oportunidades por Fonte de Lead', +'LBL_LEAD_SOURCE_FORM_DESC'=>'Mostra quantidades acumuladas da Oportunidade, por fonte selecionada de Lead, para usuários selecionados.', +'LBL_LEAD_SOURCE_BY_OUTCOME'=>'Todas as Oportunidades por Fonte de Lead e por Resultado', +'LBL_LEAD_SOURCE_BY_OUTCOME_DESC'=>'Mostra as quantidades acumuladas da Oportunidade por fonte selecionada de Lead, para usuários selecionados onde a data de fechamento prevista está dentro do limite de data especificado.O resultado é baseado no Estágio das Vendas, se foi Fechada com Sucesso, se o Fechamento foi Perdido ou algum outro valor.', +'LBL_PIPELINE_FORM_TITLE_DESC'=>'Mostra as quantidades acumuladas, por Estágios de Vendas selecionados, para suas Oportunidades onde a data de fechamento prevista está dentro do limite de data especificado.', +'LBL_DATE_RANGE'=>'A data limite é de ', +'LBL_DATE_RANGE_TO'=>'até ', +'ERR_NO_OPPS'=>'Por favor, crie algumas Oportunidades para ver o Gráfico de Oportunidades.', +'LBL_TOTAL_PIPELINE'=>'Total Funil de Vendas é', +'LBL_ALL_OPPORTUNITIES'=>'Resultado Total para todas as Oportunidades é', +'LBL_OPP_SIZE'=>'Valor Oportunidades em ', +'LBL_OPP_SIZE_VALUE'=>'1M', +'NTC_NO_LEGENDS'=>'Nada', +'LBL_LEAD_SOURCE_OTHER'=>'Outro', +'LBL_EDIT'=>'Editar', +'LBL_REFRESH'=>'Atualizar', +'LBL_CREATED_ON'=>'Última execução', +'LBL_OPPS_IN_STAGE'=>'Oportunidades cujo Estágio de Vendas é', +'LBL_OPPS_IN_LEAD_SOURCE'=>'Oportunidades cuja Origem do Lead é', +'LBL_OPPS_OUTCOME'=>'Oportunidades cujo Resultado é', +'LBL_USERS'=>'Usuários:', +'LBL_SALES_STAGES'=>'Estágios de Vendas:', +'LBL_LEAD_SOURCES'=>'Origem do Lead:', +'LBL_DATE_START'=>'Data Inicial:', +'LBL_DATE_END'=>'Data Final:', +//Added for 5.0 +'LBL_NO_PERMISSION'=>'Seu perfil não permite que você veja o Gráfico deste Módulo', +'LBL_NO_PERMISSION_FIELD'=>'Seu perfil não permite que você veja o Gráfico deste Módulo ou deste Campo', + +"leadsource" => "Leads por Fonte", +"leadstatus" => "Leads por Status", +"leadindustry" => "Leads por Atividade", +"salesbyleadsource" => "Vendas por Fonte Lead", +"salesbyaccount" => "Vendas por Organização", +"salesbyuser" => "Vendas por Usuário", +"salesbyteam"=>"Vendas por Equipe", +"accountindustry" => "Organizações por Atividade", +"productcategory" => "Produtos por Categoria", +"productbyqtyinstock" => "Produtos por Quantidade em Estoque", +"productbypo" => "Produtos por Pedido Compra", +"productbyquotes" => "Produtos por Cotação", +"productbyinvoice" => "Produtos por Fatura", +"sobyaccounts" => "Pedidos Vendas por Organização", +"sobystatus" => "Pedidos Vendas por Status", +"pobystatus" => "Pedido Compra por Status", +"quotesbyaccounts" => "Cotações por Organização", +"quotesbystage" => "Cotações por Estágio", +"invoicebyacnts" => "Faturas por Organização", +"invoicebystatus" => "Faturas por Status", +"ticketsbystatus" => "Tickets por Status", +"ticketsbypriority" => "Tickets por Prioridade", +"ticketsbycategory" => "Tickets por Categoria", +"ticketsbyuser"=>"Tickets por Usuário", +"ticketsbyteam"=>"Tickets por Equipe", +"ticketsbyproduct"=>"Tickets por Produto", +"contactbycampaign"=>"Contatos por Campanha", +"ticketsbyaccount"=>"Tickets por Organização", +"ticketsbycontact"=>"Tickets por Contato", + +'LBL_DASHBRD_HOME'=>'Painel Principal', +'LBL_HORZ_BAR_CHART'=>'Gráfico Barras Horizontal', +'LBL_VERT_BAR_CHART'=>'Gráfico Barras Vertical', +'LBL_PIE_CHART'=>'Gráfico Pizza', +'LBL_NO_DATA'=>'Dados não disponíveis', +'DashboardHome'=>'Página Painel', +'GRIDVIEW'=>'Visualizar Grade', +'NORMALVIEW'=>'Visualizar Normal', +'VIEWCHART'=>'Visualizar Gráfico', +'LBL_DASHBOARD'=>'Painel', + +// Added/Updated for vtiger CRM 5.0.4 +"Approved"=>"Aprovado", +"Created"=>"Criado", +"Cancelled"=>"Cancelado", +"Delivered"=>"Entregue", +"Received Shipment"=>"Entrega Recebida", +"Sent"=>"Enviar", +"Credit Invoice"=>"Crédito Fatura", +"Paid"=>"Pago", +"Un Assigned"=>"Un Assigned", +"Cold Call"=>"Cold Call", +"Existing Customer"=>"Cliente Existente", +"Self Generated"=>"Auto-Gerado", +"Employee"=>"Empregado", +"Partner"=>"Parceiro", +"Public Relations"=>"Relações Públicas", +"Direct Mail"=>"Mala Direta", +"Conference"=>"Conferência", +"Trade Show"=>"Feiras Negócios", +"Web Site"=>"Web Site", +"Word of mouth"=>"Boca-Boca", +"Other"=>"Outro", +"--None--"=>"Nada", +"Attempted to Contact"=>"Tentativa Contato", +"Cold"=>"Frio", +"Contact in Future"=>"Contactar no Futuro", +"Contacted"=>"Contactado", +"Hot"=>"Quente", +"Junk Lead"=>"Descartado", +"Lost Lead"=>"Perdido", +"Not Contacted"=>"Não Contactado", +"Pre Qualified"=>"Pré-Qualificado", +"Qualified"=>"Qualificado", +"Warm"=>"Morno", +"Apparel"=>"Vestuário", +"Banking"=>"Banco", +"Biotechnology"=>"Biotecnologia", +"Chemicals"=>"Química", +"Communications"=>"Comunicações", +"Construction"=>"Construção", +"Consulting"=>"Consultoria", +"Education"=>"Educação", +"Electronics"=>"Eletrônica", +"Energy"=>"Energia", +"Engineering"=>"Engenharia", +"Entertainment"=>"Entretenimento", +"Environmental"=>"Meio Ambiente", +"Finance"=>"Finanças", +"Food & Beverage"=>"Alimentação & Bebidas", +"Government"=>"Governo", +"Healthcare"=>"Saúde", +"Hospitality"=>"Hotelaria", +"Insurance"=>"Seguros", +"Machinery"=>"Mecânica", +"Manufacturing"=>"Indústria", +"Media"=>"Mídia", +"Not For Profit"=>"ONG", +"Recreation"=>"Recreação", +"Retail"=>"Comércio", +"Shipping"=>"Transporte Marítimo", +"Technology"=>"Tecnologia", +"Telecommunications"=>"Telecomunicações", +"Transportation"=>"Transportes", +"Utilities"=>"Serviço Público", +"Hardware"=>"Hardware", +"Software"=>"Software", +"CRM Applications"=>"Aplicações CRM", +"Open"=>"Aberto", +"In Progress"=>"Em Andamento", +"Wait For Response"=>"Aguarando Resposta", +"Closed"=>"Fechado", +"Low"=>"Baixa", +"Normal"=>"Normal", +"High"=>"Alta", +"Urgent"=>"Urgente", +"Big Problem"=>"Problema Grande", +"Small Problem"=>"Problema Pequeno", +"Other Problem"=>"Outro Problema", +"Accepted"=>"Aceito", +"Rejected"=>"Rejeitado", +"Prospecting"=>"Prospectando", +"Qualification"=>"Qualificação", +"Needs Analysis"=>"Necessita Análise", +"Value Proposition"=>"Proposta Valor", +"Id. Decision Makers"=>"Identif. Decisor", +"Perception Analysis"=>"Análise Percepção", +"Proposal/Price Quote"=>"Proposta/Cotação", +"Negotiation/Review"=>"Negocição/Análise", +"Closed Won"=>"Fechado Vencido", +"Closed Lost"=>"Fechado Perdido", + +); + +?> diff --git a/modules/Dashboard/line_graph.php b/modules/Dashboard/line_graph.php new file mode 100644 index 0000000..88dfd67 --- /dev/null +++ b/modules/Dashboard/line_graph.php @@ -0,0 +1,104 @@ +SetMarginColor('white'); +$graph->SetScale("textlin"); +$graph->SetMargin($left,$right,$top,$bottom); +$graph->tabtitle->Set($title ); +$graph->tabtitle->SetFont(FF_FONT2,FS_BOLD,13); +$graph->yaxis->HideZeroLabel(); +$graph->xgrid->Show(); + +$thick=6; +// Create the lines of the Graph +for($i=0;$iSetColor($color_val); + $$temp->SetLegend($name); + + $x_thick=$thick-$i; + if($x_thick<=1) + $x_thick=1; + + $$temp->SetWeight($x_thick); + $graph->Add($$temp); + + $max=0; + for($j=0;$j=$max) + $max=$x; + else + $max=$max; + } +} + + +if($max>=5) +{ + $graph->yaxis->SetLabelFormat('%d'); +} +$graph->legend->Pos(0,0.4,"right","center"); + +// Set some other color then the boring default +$graph->SetColor("#6F96FF"); +//$graph->SetColor("#CCDFCC"); +$graph->SetMarginColor("#2447A7"); +//$graph->SetMarginColor("#98C098"); +$graph->xaxis->SetTickLabels($datax); +$graph->xaxis->SetLabelAngle(90); + +// Output line +$graph->Stroke(); + + + +?> diff --git a/modules/Dashboard/loadDashBoard.php b/modules/Dashboard/loadDashBoard.php new file mode 100644 index 0000000..96b535c --- /dev/null +++ b/modules/Dashboard/loadDashBoard.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Dashboard/pie_graph.php b/modules/Dashboard/pie_graph.php new file mode 100644 index 0000000..60a3666 --- /dev/null +++ b/modules/Dashboard/pie_graph.php @@ -0,0 +1,191 @@ +=14) + $name=substr($name, 0, 34); + if($pos>=2) + { + $val=explode(" ",$name); + $n=count($val)-1; + + $x=""; + for($j=0;$j $width, 'height' => $height, 'usemap' => true)); + $imagemap = $canvas->getImageMap(); + $graph =& Image_Graph::factory('graph', $canvas); + $font =& $graph->addNew('font', calculate_font_name($lang_crm)); + // set the font size to 11 pixels + $font->setSize(8); + $font->setColor($font_color); + + $graph->setFont($font); + // create the plotarea layout + $title =& Image_Graph::factory('title', array($title,10)); + $plotarea =& Image_Graph::factory('plotarea',array( + 'category', + 'axis' + )); + $footer =& Image_Graph::factory('title', array('Footer',8)); + $legend_box =& Image_Graph::factory('legend'); + $graph->add( + Image_Graph::vertical($title, + $plotarea, + 5 + ) + ); + + // To create unique lables we need to keep track of lable name and its count + $uniquex = array(); + + + // Generate colours + $colors = color_generator(count($datay),'#33DDFF','#3322FF'); + $dataset = & Image_Graph::factory('dataset'); + $fills =& Image_Graph::factory('Image_Graph_Fill_Array'); + $sum = 0; + for($i=0;$iaddPoint( + $datalabel, + $datay[$i], + array( + 'url' => $target[$i], + 'alt' => $alts[$i] + ) + ); + $sum += $datay[$i]; + $fills->addColor($colors[$i]); + } + + // create an array with % values + $pcvalues = array(); + for($i=0;$iaddNew('pie', $dataset); + $plotarea->setPadding(array('top'=>20,'bottom'=>0,'left'=>0,'right'=>50)); + $plotarea->hideAxis(); + $gbplot->setFillStyle($fills); + + // format the data values + $marker_array =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', array($pcvalues)); + + // set markers + $marker =& $graph->addNew('value_marker', IMAGE_GRAPH_VALUE_Y); + $marker->setDataPreprocessor($marker_array); + $marker->setFillColor('#FFFFFF'); + $marker->setBorderColor($font_color); + $marker->setFontColor($font_color); + $marker->setFontSize(8); + $pointingMarker =& $graph->addNew('Image_Graph_Marker_Pointing_Angular', array(20, &$marker)); + $gbplot->setMarker($pointingMarker); + + // set legend + $legend_box =& $plotarea->addNew('legend'); + $legend_box->setPadding(array('top'=>20,'bottom'=>0,'left'=>0,'right'=>0)); + $legend_box->setFillColor('#F5F5F5'); + $legend_box->showShadow(); + + $img = $graph->done( + array( + 'tohtml' => true, + 'border' => 0, + 'filename' => $cache_file_name, + 'filepath' => '', + 'urlpath' => '' + )); + save_image_map($cache_file_name.'.map', $img); + + return $img; + +} +?> + diff --git a/modules/Dashboard/vertical_bargraph.php b/modules/Dashboard/vertical_bargraph.php new file mode 100644 index 0000000..f854174 --- /dev/null +++ b/modules/Dashboard/vertical_bargraph.php @@ -0,0 +1,222 @@ +=15) + $name=substr($name, 0, 15); + if($pos>=2) + { + $val=explode(" ",$name); + $n=count($val)-1; + + $x=""; + for($j=0;$j $width, 'height' => $height, 'usemap' => true)); + $imagemap = $canvas->getImageMap(); + $graph =& Image_Graph::factory('graph', $canvas); + $font =& $graph->addNew('font', calculate_font_name($lang_crm)); + // set the font size to 12 + $font->setSize(8); + + if($theme == "blue") + { + $font_color = "#212473"; + } + else + { + $font_color = "#000000"; + } + $font->setColor($font_color); + + $graph->setFont($font); + $titlestr =& Image_Graph::factory('title', array($title,10)); + $plotarea =& Image_Graph::factory('plotarea',array( + 'axis', + 'axis', + 'vertical' + )); + $graph->add( + Image_Graph::vertical($titlestr, + $plotarea, + 5 + ) + ); + + + // Now create a bar plot + $max=0; + $xlabels = array(); + $dataset = & Image_Graph::factory('dataset'); + if($theme == 'woodspice') + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED, '#804000', 'white')); + elseif($theme == 'bluelagoon') + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED, 'blue', 'white')); + elseif($theme == 'softed') + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED, 'blue', 'white')); + else + $fill =& Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL_MIRRORED, 'black', 'white')); + + + for($i=0;$i=$max) $max=$datay[$i]; + $dataset->addPoint( + $x, + $datay[$i], + array( + 'url' => $target[$i], + 'alt' => $alts[$i] + ) + ); + // build the xaxis label array to allow intermediate ticks + $xlabels[$x] = $datax[$i]; + $xlabels[$x+1] = ''; + } + + + //$bplot = new BarPlot($datay); + $bplot = & $plotarea->addNew('bar', $dataset); + $bplot->setFillStyle($fill); + + //You can change the width of the bars if you like + $bplot->setBarWidth(50/count($datax),"%"); + $bplot->setPadding(array('top'=>20)); + + $bplot->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', 'white'))); + + // Setup X-axis + $xaxis =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_X); + $yaxis =& $plotarea->getAxis(IMAGE_GRAPH_AXIS_Y); + $yaxis->setFontSize(10); + + // set grid + $gridY =& $plotarea->addNew('line_grid', IMAGE_GRAPH_AXIS_Y); + $gridY->setLineColor('#FFFFFF@0.5'); + $gridY2 =& $plotarea->addNew('bar_grid', null, IMAGE_GRAPH_AXIS_Y); + $gridY2->setFillColor('#FFFFFF@0.2'); + + + // Add some grace to y-axis so the bars doesn't go + // all the way to the end of the plot area + if($max<=10) + $yaxis->forceMaximum(round(($max * 1.1) + 1.5)); + elseif($max>10 && $max<=100) + $yaxis->forceMaximum(round(($max * 1.1) + 1.5)); + elseif($max>100 && $max<=1000) + $yaxis->forceMaximum(round(($max * 1.1) + 10.5)); + else + $yaxis->forceMaximum(round(($max * 1.1) + 100.5)); + $ticks = get_tickspacing(round(($max * 1.1) + 2.0)); + + // First make the labels look right + $yaxis->setLabelInterval($ticks[0]); + $yaxis->setTickOptions(5,0); + $yaxis->setLabelInterval($ticks[1],2); + $yaxis->setTickOptions(2,0,2); + + // Create the xaxis labels + $array_data =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', + array($xlabels) + ); + + // Then fix the tick marks + $xaxis->setDataPreprocessor($array_data); + $xaxis->forceMinimum(0); + $xaxis->forceMaximum(2*count($datay)); + $xaxis->setFontAngle('vertical'); + $xaxis->setLabelInterval(1); + $xaxis->setTickOptions(0,0); + $xaxis->setLabelInterval(2,2); + $xaxis->setTickOptions(5,0,2); + + // set markers + $marker =& $graph->addNew('value_marker', IMAGE_GRAPH_VALUE_Y); + $marker->setFillColor('000000@0.0'); + $marker->setBorderColor('000000@0.0'); + $marker->setFontSize(10); + // shift markers 10 pix right + $marker_pointing =& $graph->addNew('Image_Graph_Marker_Pointing', array(0,-10,& $marker)); + $marker_pointing->setLineColor('000000@0.0'); + $bplot->setMarker($marker_pointing); + + + //Getting the graph in the form of html page + $img = $graph->done( + array( + 'tohtml' => true, + 'border' => 0, + 'filename' => $cache_file_name, + 'filepath' => '', + 'urlpath' => '' + )); + save_image_map($cache_file_name.'.map', $img); + + return $img; +} + +?> diff --git a/modules/Documents/CustomView.php b/modules/Documents/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/Documents/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/Documents/Delete.php b/modules/Documents/Delete.php new file mode 100644 index 0000000..8540181 --- /dev/null +++ b/modules/Documents/Delete.php @@ -0,0 +1,28 @@ + \ No newline at end of file diff --git a/modules/Documents/DeleteFolder.php b/modules/Documents/DeleteFolder.php new file mode 100644 index 0000000..fa147ef --- /dev/null +++ b/modules/Documents/DeleteFolder.php @@ -0,0 +1,54 @@ +is_admin != 'on') +{ + echo 'NOT_PERMITTED'; + die; +} +else +{ + $local_log =& LoggerManager::getLogger('index'); + if(isset($_REQUEST['folderid']) && $_REQUEST['folderid'] != '') + $folderId = $_REQUEST['folderid']; + else + { + echo 'FAILURE'; + die; + } + if(isset($_REQUEST['deletechk']) && $_REQUEST['deletechk'] == 'true') + { + $query = "select notesid from vtiger_notes INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_notes.notesid WHERE vtiger_notes.folderid = ? and vtiger_crmentity.deleted = 0"; + $result = $adb->pquery($query,array($folderId)); + if($adb->num_rows($result) > 0) + { + echo 'FAILURE'; + } + else + { + header("Location: index.php?action=DocumentsAjax&file=ListView&mode=ajax&module=Documents"); + exit; + } + } + else + { + $sql="delete from vtiger_attachmentsfolder where (folderid=? and folderid != 1)"; + $adb->pquery($sql,array($folderId)); + header("Location: index.php?action=DocumentsAjax&file=ListView&mode=ajax&module=Documents"); + exit; + } +} +?> \ No newline at end of file diff --git a/modules/Documents/DetailView.php b/modules/Documents/DetailView.php new file mode 100644 index 0000000..8f75a8f --- /dev/null +++ b/modules/Documents/DetailView.php @@ -0,0 +1,177 @@ +retrieve_entity_info($_REQUEST['record'],"Documents"); + $focus->id = $_REQUEST['record']; + $focus->name=$focus->column_fields['notes_title']; +} +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; +} + +//needed when creating a new note with default values passed in +if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) { + $focus->contact_name = $_REQUEST['contact_name']; +} +if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) { + $focus->contact_id = $_REQUEST['contact_id']; +} +if (isset($_REQUEST['opportunity_name']) && is_null($focus->parent_name)) { + $focus->parent_name = $_REQUEST['opportunity_name']; +} +if (isset($_REQUEST['opportunity_id']) && is_null($focus->parent_id)) { + $focus->parent_id = $_REQUEST['opportunity_id']; +} +if (isset($_REQUEST['account_name']) && is_null($focus->parent_name)) { + $focus->parent_name = $_REQUEST['account_name']; +} +if (isset($_REQUEST['account_id']) && is_null($focus->parent_id)) { + $focus->parent_id = $_REQUEST['account_id']; +} + +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$smarty = new vtigerCRM_Smarty; +$filename=$focus->column_fields['filename']; +$folderid = $focus->column_fields['folderid']; +$filestatus = $focus->column_fields['filestatus']; +$filelocationtype = $focus->column_fields['filelocationtype']; + +$fileattach = "select attachmentsid from vtiger_seattachmentsrel where crmid = ?"; +$res = $adb->pquery($fileattach,array($focus->id)); +$fileid = $adb->query_result($res,0,'attachmentsid'); + +if($filelocationtype == 'I'){ + $pathQuery = $adb->pquery("select path from vtiger_attachments where attachmentsid = ?",array($fileid)); + $filepath = $adb->query_result($pathQuery,0,'path'); +} +else{ + $filepath = $filename; +} + + +$smarty->assign("FILEID",$fileid); +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); + +$allblocks = getBlocks($currentModule,"detail_view",'',$focus->column_fields); +$smarty->assign("BLOCKS", $allblocks); +$flag = 0; +foreach($allblocks as $blocks) +{ + foreach($blocks as $block_entries) + { + if(!empty($block_entries[getTranslatedString('File Name',$currentModule)]['value'])) + $flag = 1; + } +} +if($flag == 1) + $smarty->assign("FILE_EXIST","yes"); +elseif($flag == 0) + $smarty->assign("FILE_EXIST","no"); + +$smarty->assign("UPDATEINFO",updateInfo($focus->id)); + +if (isset($focus->name)) $smarty->assign("NAME", $focus->name); +else $smarty->assign("NAME", ""); + +$smarty->assign("FILENAME", $filename); + +if (isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module'])); +if (isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action'])); +if (isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id'])); + +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); +$smarty->assign("ID", $focus->id); + +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; +} else { + $mod_seq_id = $focus->id; +} +$smarty->assign('MOD_SEQ_ID', $mod_seq_id); +// END + +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + + +$smarty->assign("SINGLE_MOD", 'Document'); + +if(isPermitted("Documents","EditView",$_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + +if(isPermitted("Documents","Delete",$_REQUEST['record']) == 'yes') + $smarty->assign("DELETE","permitted"); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule)); + + +$tabid = getTabid("Documents"); + $validationData = getDBValidationData($focus->tab_name,$tabid); + $data = split_validationdataArray($validationData); + + $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); + $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); + $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); + if(is_admin($current_user)) +{ + $smarty->assign("CHECK_INTEGRITY_PERMISSION","yes"); + $smarty->assign("ADMIN","yes"); +} +$smarty->assign("FILE_STATUS",$filestatus); + $smarty->assign("DLD_TYPE",$filelocationtype); + $smarty->assign("NOTESID",$focus->id); + $smarty->assign("FOLDERID",$folderid); + $smarty->assign("DLD_PATH",$filepath); + +$smarty->assign("MODULE",$currentModule); +$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record'])); + +if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){ + $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id); + VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id); +} + +// Record Change Notification +$focus->markAsViewed($current_user->id); +// END + +// Gather the custom link information to display +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action'])); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params)); +// END + +$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true)); + +$smarty->display("DetailView.tpl"); + +?> diff --git a/modules/Documents/DetailViewAjax.php b/modules/Documents/DetailViewAjax.php new file mode 100644 index 0000000..7e9f41d --- /dev/null +++ b/modules/Documents/DetailViewAjax.php @@ -0,0 +1,47 @@ +retrieve_entity_info($crmid,"Documents"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Documents"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){ + require_once 'include/ListView/RelatedListViewContents.php'; +} +?> \ No newline at end of file diff --git a/modules/Documents/Documents.js b/modules/Documents/Documents.js new file mode 100644 index 0000000..b7076aa --- /dev/null +++ b/modules/Documents/Documents.js @@ -0,0 +1,374 @@ +/********************************************************************************* +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ + +//Added after 504 for renaming a folder +function UpdateAjaxSave(label,fid,fldname,fileOrFolder) +{ + fldVal=$('txtbox_'+label).value; + if(fldVal.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0) + { + alert(alert_arr.FOLDERNAME_EMPTY); + return false; + } + if(fldVal.replace(/^\s+/g, '').replace(/\s+$/g, '').length>=21) + { + alert(alert_arr.FOLDER_NAME_TOO_LONG); + return false; + } + if(fldVal.match(/['"\\%+?]/)) + { + alert(alert_arr.NO_SPECIAL_CHARS_DOCS); + return false; + } + if(fileOrFolder == 'file') + var url='action=DocumentsAjax&mode=ajax&file=Save&module=Documents&fileid='+fid+'&fldVal='+fldVal+'&fldname='+fldname+'&act=ajaxEdit'; + else + { + var foldername = encodeURIComponent(fldVal); + foldername = foldername.replace(/^\s+/g, '').replace(/\s+$/g, ''); + foldername = foldername.replace(/&/gi,'*amp*'); + var url='action=DocumentsAjax&mode=ajax&file=SaveFolder&module=Documents&record='+fid+'&foldername='+fldVal+'&savemode=Save'; + } + if(fldname == 'status') + { + fldVal = $('txtbox_'+label).options[$('txtbox_'+label).options.selectedIndex].text; + gtempselectedIndex = $('txtbox_'+label).options.selectedIndex; + } + $('status').style.display="block"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: url, + onComplete: function(response) { + var item = response.responseText; + $('status').style.display="none"; + if(item.indexOf("Failure") > -1 ) + { + $("lblError").innerHTML="
"+alert_arr.LBL_UNABLE_TO_UPDATE+"
"; + setTimeout(hidelblError,3000); + } + else if(item.indexOf('DUPLICATE_FOLDERNAME') > -1) + { + alert(alert_arr.DUPLICATE_FOLDER_NAME); + } + else + { + $('dtlview_'+label).innerHTML = fldVal; + eval("hndCancel('dtlview_"+label+"','editarea_"+label+"','"+label+"')"); + if(fldname == 'status') + $('txtbox_'+label).selectedIndex = gtempselectedIndex; + else + $('txtbox_'+label).value = fldVal; + eval(item); + + } + + } + } + ); + +} + +function closeFolderCreate() +{ + $('folder_id').value = ''; + $('folder_name').value = ''; + $('folder_desc').value=''; + fninvsh('orgLay') +} + +function AddFolder() +{ + var fldrname=getObj('folder_name').value; + var fldrdesc=getObj('folder_desc').value; + if(fldrname.replace(/^\s+/g, '').replace(/\s+$/g, '').length==0) + { + alert(alert_arr.FOLDERNAME_EMPTY); + return false; + } + if(fldrname.replace(/^\s+/g, '').replace(/\s+$/g, '').length>=21) + { + alert(alert_arr.FOLDER_NAME_TOO_LONG); + return false; + } + if(fldrdesc.replace(/^\s+/g, '').replace(/\s+$/g, '').length>=51) + { + alert(alert_arr.FOLDER_DESCRIPTION_TOO_LONG); + return false; + } + if(fldrname.match(/['"\\%+]/) || fldrdesc.match(/['"\\%+]/)) + { + alert(alert_arr.NO_SPECIAL_CHARS_DOCS+alert_arr.NAME_DESC); + return false; + } + if(fldrname.match(/[?]+$/) || fldrname.match(/[?]+/)) + { + alert(alert_arr.NO_SPECIAL_CHARS_DOCS); + return false; + } + fninvsh('orgLay'); + var foldername = encodeURIComponent(getObj('folder_name').value); + var folderdesc = encodeURIComponent(getObj('folder_desc').value); + foldername = foldername.replace(/^\s+/g, '').replace(/\s+$/g, ''); + foldername = foldername.replace(/&/gi,'*amp*'); + folderdesc = folderdesc.replace(/^\s+/g, '').replace(/\s+$/g, ''); + folderdesc = folderdesc.replace(/&/gi,'*amp*'); + getObj('folder_name').value = ''; + getObj('folder_desc').value = ''; + var mode = getObj('fldrsave_mode').value; + if(mode == 'save') + { + url ='&savemode=Save&foldername='+foldername+'&folderdesc='+folderdesc; + } + getObj('fldrsave_mode').value = 'save'; + $('status').style.display = 'block'; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'action=DocumentsAjax&mode=ajax&file=SaveFolder&module=Documents'+url, + onComplete: function(response) { + var item = response.responseText; + $('status').style.display = 'none'; + if(item.indexOf('Failure') > -1) + { + $('lblError').innerHTML = "
"+alert_arr.LBL_UNABLE_TO_ADD_FOLDER+"
"; + setTimeOutFn(); + } + else if(item.indexOf('DUPLICATE_FOLDERNAME') > -1) + { + alert(alert_arr.DUPLICATE_FOLDER_NAME); + } + else + { + getObj("ListViewContents").innerHTML = item; + } + } + } + ); +} + + +function DeleteFolderCheck(folderId) +{ + gtempfolderId = folderId; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module=Documents&action=DocumentsAjax&mode=ajax&file=DeleteFolder&deletechk=true&folderid="+folderId, + onComplete: function(response) { + var item = response.responseText; + if(item.indexOf("NOT_PERMITTED") > -1) { + alert(alert_arr.NOT_PERMITTED); + return false; + } + else if(item.indexOf("FAILURE") > -1) + { + alert(alert_arr.LBL_FOLDER_SHOULD_BE_EMPTY); + } + else { + if(confirm(alert_arr.LBL_ARE_YOU_SURE_YOU_WANT_TO_DELETE_FOLDER)) + { + DeleteFolder(gtempfolderId); + } + } + } + } + ); +} + +function DeleteFolder(folderId) +{ + $('status').style.display = "block"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module=Documents&action=DocumentsAjax&mode=ajax&file=DeleteFolder&folderid="+folderId, + onComplete: function(response) { + var item = response.responseText; + $('status').style.display = "none"; + if(item.indexOf("FAILURE") > -1) + alert(alert_arr.LBL_ERROR_WHILE_DELETING_FOLDER); + else + $('ListViewContents').innerHTML = item; + } + } + ); +} + +function MoveFile(id,foldername) +{ + fninvsh('movefolderlist'); + var searchurl= $('search_url').value; + var viewid =getviewId(); + var idstring = ''; + var select_options = ''; + var excludedRecords = ''; + var obj = document.getElementsByName('folderidVal'); + var folderid='0'; + var numOfRows=0; + var activation='false'; + if(obj){ + for(var i=0;i 1){ + count = numOfRows - excount + 1; + } else { + count = numOfRows; + } + } else { + if (count > 1) { + document.getElementById('idlist').value=select_options; + idstring = select_options; + } else { + alert(alert_arr.SELECT); + return false; + } + //we have to decrese the count value by 1 because when we split with semicolon we will get one extra count + count = count - 1; + } + + if(idstring != '') { + if(count > getMaxMassOperationLimit()) { + confirm_str=alert_arr.MORE_THAN_500; + if(confirm(confirm_str)) { + confirm_status=true; + } else { + return false; + } + } else { + confirm_status=true; + } + + if(confirm_status) { + if(confirm(alert_arr.LBL_ARE_YOU_SURE_TO_MOVE_TO + foldername + alert_arr.LBL_FOLDER)) { + + var url = "&viewname="+viewid+searchurl+"&excludedRecords="+excludedRecords+"&folderidstring="+folderid+"&selectallmode="+activation; + $('status').style.display = "block"; + new Ajax.Request( + 'index.php', + { + queue: { + position: 'end', + scope: 'command' + }, + method: 'post', + postBody: 'action=DocumentsAjax&file=MoveFile&from_folderid=0&module=Documents&folderid='+id+'&idlist='+idstring+url, + onComplete: function(response) { + var item = response.responseText; + $('status').style.display = "none"; + if(item.indexOf("NOT_PERMITTED") > -1 ) { + $("lblError").innerHTML="
"+alert_arr.NOT_PERMITTED+"
"; + setTimeout(hidelblError,3000); + } + else + getObj('ListViewContents').innerHTML = item; + } + + } + ); + } else { + return false; + } + } else { + return false; + } + + } else { + alert(alert_arr.LBL_SELECT_ONE_FILE); + return false; + } +} + +function dldCntIncrease(fileid) +{ + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'action=DocumentsAjax&mode=ajax&file=SaveFile&module=Documents&file_id='+fileid+"&act=updateDldCnt", + onComplete: function(response) { + } + } + ); +} + + +function checkFileIntegrityDetailView(noteid) +{ + $('vtbusy_integrity_info').style.display=''; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Documents&action=DocumentsAjax&mode=ajax&file=SaveFile&act=checkFileIntegrityDetailView¬eid='+noteid, + onComplete: function(response) { + var item = response.responseText; + if(item.indexOf('file_available') > -1) + { + $('vtbusy_integrity_info').style.display='none'; + $('integrity_result').innerHTML='

   '+alert_arr.LBL_FILE_CAN_BE_DOWNLOAD+''; + $('integrity_result').style.display=''; + setTimeout(hideresult,4000); + } + else if(item.indexOf('file_not_available') > -1) + { + $('vtbusy_integrity_info').style.display='none'; + $('integrity_result').innerHTML='

   '+alert_arr.LBL_DOCUMENT_NOT_AVAILABLE+''; + $('integrity_result').style.display=''; + setTimeout(hideresult,6000); + } + else if(item.indexOf('lost_integrity') > -1) + { + $('vtbusy_integrity_info').style.display='none'; + $('integrity_result').innerHTML='

   '+alert_arr.LBL_DOCUMENT_LOST_INTEGRITY+''; + $('integrity_result').style.display=''; + setTimeout(hideresult,6000); + } + } + } + ); +} + +function hideresult() +{ + $('integrity_result').style.display = 'none'; +} + +function add_data_to_relatedlist(entity_id,recordid) { + + opener.document.location.href="index.php?module={RETURN_MODULE}&action=updateRelations&smodule={SMODULE}&destination_module=Products&entityid="+entity_id+"&parentid="+recordid; +} + diff --git a/modules/Documents/Documents.php b/modules/Documents/Documents.php new file mode 100644 index 0000000..2062f02 --- /dev/null +++ b/modules/Documents/Documents.php @@ -0,0 +1,480 @@ +'crmid','vtiger_notes'=>'notesid','vtiger_senotesrel'=>'notesid'); + + var $column_fields = Array(); + + var $sortby_fields = Array('title','modifiedtime','filename','createdtime','lastname','filedownloadcount','smownerid'); + + // This is used to retrieve related vtiger_fields from form posts. + var $additional_column_fields = Array('', '', '', ''); + + // This is the list of vtiger_fields that are in the lists. + var $list_fields = Array( + 'Title'=>Array('notes'=>'title'), + 'File Name'=>Array('notes'=>'filename'), + 'Modified Time'=>Array('crmentity'=>'modifiedtime'), + 'Assigned To' => Array('crmentity'=>'smownerid'), + 'Folder Name' => Array('attachmentsfolder'=>'foldername') + ); + var $list_fields_name = Array( + 'Title'=>'notes_title', + 'File Name'=>'filename', + 'Modified Time'=>'modifiedtime', + 'Assigned To'=>'assigned_user_id', + 'Folder Name' => 'folderid' + ); + + var $search_fields = Array( + 'Title' => Array('notes'=>'notes_title'), + 'File Name' => Array('notes'=>'filename'), + 'Assigned To' => Array('crmentity'=>'smownerid'), + 'Folder Name' => Array('attachmentsfolder'=>'foldername') + ); + + var $search_fields_name = Array( + 'Title' => 'notes_title', + 'File Name' => 'filename', + 'Assigned To' => 'assigned_user_id', + 'Folder Name' => 'folderid' + ); + var $list_link_field= 'notes_title'; + var $old_filename = ''; + //var $groupTable = Array('vtiger_notegrouprelation','notesid'); + + var $mandatory_fields = Array('notes_title','createdtime' ,'modifiedtime','filename','filesize','filetype','filedownloadcount','assigned_user_id'); + + //Added these variables which are used as default order by and sortorder in ListView + var $default_order_by = 'title'; + var $default_sort_order = 'ASC'; + function Documents() { + $this->log = LoggerManager::getLogger('notes'); + $this->log->debug("Entering Documents() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Documents'); + $this->log->debug("Exiting Documents method ..."); + } + + function save_module($module) + { + global $log,$adb,$upload_badext; + $insertion_mode = $this->mode; + if(isset($this->parentid) && $this->parentid != '') + $relid = $this->parentid; + //inserting into vtiger_senotesrel + if(isset($relid) && $relid != '') + { + $this->insertintonotesrel($relid,$this->id); + } + $filetype_fieldname = $this->getFileTypeFieldName(); + $filename_fieldname = $this->getFile_FieldName(); + if($this->column_fields[$filetype_fieldname] == 'I' ){ + if($_FILES[$filename_fieldname]['name'] != ''){ + $errCode=$_FILES[$filename_fieldname]['error']; + if($errCode == 0){ + foreach($_FILES as $fileindex => $files) + { + if($files['name'] != '' && $files['size'] > 0){ + $filename = $_FILES[$filename_fieldname]['name']; + $filename = from_html(preg_replace('/\s+/', '_', $filename)); + $filetype = $_FILES[$filename_fieldname]['type']; + $filesize = $_FILES[$filename_fieldname]['size']; + $filelocationtype = 'I'; + $binFile = sanitizeUploadFileName($filename, $upload_badext); + $filename = ltrim(basename(" ".$binFile)); //allowed filename like UTF-8 characters + } + } + + } + }elseif($this->mode == 'edit') { + $fileres = $adb->pquery("select filetype, filesize,filename,filedownloadcount,filelocationtype from vtiger_notes where notesid=?", array($this->id)); + if ($adb->num_rows($fileres) > 0) { + $filename = $adb->query_result($fileres, 0, 'filename'); + $filetype = $adb->query_result($fileres, 0, 'filetype'); + $filesize = $adb->query_result($fileres, 0, 'filesize'); + $filedownloadcount = $adb->query_result($fileres, 0, 'filedownloadcount'); + $filelocationtype = $adb->query_result($fileres, 0, 'filelocationtype'); + } + }elseif($this->column_fields[$filename_fieldname]) { + $filename = $this->column_fields[$filename_fieldname]; + $filesize = $this->column_fields['filesize']; + $filetype = $this->column_fields['filetype']; + $filelocationtype = $this->column_fields[$filetype_fieldname]; + $filedownloadcount = 0; + } else { + $filelocationtype = 'I'; + $filetype = ''; + $filesize = 0; + $filedownloadcount = null; + } + } else if($this->column_fields[$filetype_fieldname] == 'E' ){ + $filelocationtype = 'E'; + $filename = $this->column_fields[$filename_fieldname]; + // If filename does not has the protocol prefix, default it to http:// + // Protocol prefix could be like (https://, smb://, file://, \\, smb:\\,...) + if(!empty($filename) && !preg_match('/^\w{1,5}:\/\/|^\w{0,3}:?\\\\\\\\/', trim($filename), $match)) { + $filename = "http://$filename"; + } + $filetype = ''; + $filesize = 0; + $filedownloadcount = null; + } + $query = "UPDATE vtiger_notes SET filename = ? ,filesize = ?, filetype = ? , filelocationtype = ? , filedownloadcount = ? WHERE notesid = ?"; + $re=$adb->pquery($query,array($filename,$filesize,$filetype,$filelocationtype,$filedownloadcount,$this->id)); + //Inserting into attachments table + if($filelocationtype == 'I') { + $this->insertIntoAttachment($this->id,'Documents'); + }else{ + $query = "delete from vtiger_seattachmentsrel where crmid = ?"; + $qparams = array($this->id); + $adb->pquery($query, $qparams); + } + } + + + /** + * This function is used to add the vtiger_attachments. This will call the function uploadAndSaveFile which will upload the attachment into the server and save that attachment information in the database. + * @param int $id - entity id to which the vtiger_files to be uploaded + * @param string $module - the current module name + */ + function insertIntoAttachment($id,$module) + { + global $log, $adb; + $log->debug("Entering into insertIntoAttachment($id,$module) method."); + + $file_saved = false; + + foreach($_FILES as $fileindex => $files) + { + if($files['name'] != '' && $files['size'] > 0) + { + $files['original_name'] = vtlib_purify($_REQUEST[$fileindex.'_hidden']); + $file_saved = $this->uploadAndSaveFile($id,$module,$files); + } + } + + $log->debug("Exiting from insertIntoAttachment($id,$module) method."); + } + + /** Function used to get the sort order for Documents listview + * @return string $sorder - first check the $_REQUEST['sorder'] if request value is empty then check in the $_SESSION['NOTES_SORT_ORDER'] if this session value is empty then default sort order will be returned. + */ + function getSortOrder() + { + global $log; + $log->debug("Entering getSortOrder() method ..."); + if(isset($_REQUEST['sorder'])) + $sorder = $this->db->sql_escape_string($_REQUEST['sorder']); + else + $sorder = (($_SESSION['NOTES_SORT_ORDER'] != '')?($_SESSION['NOTES_SORT_ORDER']):($this->default_sort_order)); + $log->debug("Exiting getSortOrder() method ..."); + return $sorder; + } + + /** Function used to get the order by value for Documents listview + * @return string $order_by - first check the $_REQUEST['order_by'] if request value is empty then check in the $_SESSION['NOTES_ORDER_BY'] if this session value is empty then default order by will be returned. + */ + function getOrderBy() + { + global $log; + $log->debug("Entering getOrderBy() method ..."); + + $use_default_order_by = ''; + if(PerformancePrefs::getBoolean('LISTVIEW_DEFAULT_SORTING', true)) { + $use_default_order_by = $this->default_order_by; + } + + if (isset($_REQUEST['order_by'])) + $order_by = $this->db->sql_escape_string($_REQUEST['order_by']); + else + $order_by = (($_SESSION['NOTES_ORDER_BY'] != '')?($_SESSION['NOTES_ORDER_BY']):($use_default_order_by)); + $log->debug("Exiting getOrderBy method ..."); + return $order_by; + } + + /** + * Function used to get the sort order for Documents listview + * @return String $sorder - sort order for a given folder. + */ + function getSortOrderForFolder($folderId) { + if(isset($_REQUEST['sorder']) && $_REQUEST['folderid'] == $folderId) { + $sorder = $this->db->sql_escape_string($_REQUEST['sorder']); + } elseif(is_array($_SESSION['NOTES_FOLDER_SORT_ORDER']) && + !empty($_SESSION['NOTES_FOLDER_SORT_ORDER'][$folderId])) { + $sorder = $_SESSION['NOTES_FOLDER_SORT_ORDER'][$folderId]; + } else { + $sorder = $this->default_sort_order; + } + return $sorder; + } + + /** + * Function used to get the order by value for Documents listview + * @return String order by column for a given folder. + */ + function getOrderByForFolder($folderId) { + $use_default_order_by = ''; + if(PerformancePrefs::getBoolean('LISTVIEW_DEFAULT_SORTING', true)) { + $use_default_order_by = $this->default_order_by; + } + if (isset($_REQUEST['order_by']) && $_REQUEST['folderid'] == $folderId) { + $order_by = $this->db->sql_escape_string($_REQUEST['order_by']); + } elseif(is_array($_SESSION['NOTES_FOLDER_ORDER_BY']) && + !empty($_SESSION['NOTES_FOLDER_ORDER_BY'][$folderId])) { + $order_by = $_SESSION['NOTES_FOLDER_ORDER_BY'][$folderId]; + } else { + $order_by = ($use_default_order_by); + } + return $order_by; + } + + /** Function to export the notes in CSV Format + * @param reference variable - where condition is passed when the query is executed + * Returns Export Documents Query. + */ + function create_export_query($where) + { + global $log,$current_user; + $log->debug("Entering create_export_query(". $where.") method ..."); + + include("include/utils/ExportUtils.php"); + //To get the Permitted fields query and the permitted fields list + $sql = getPermittedFieldsQuery("Documents", "detail_view"); + $fields_list = getFieldsListFromQuery($sql); + + $userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + $query = "SELECT $fields_list, case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as user_name" . + " FROM vtiger_notes + inner join vtiger_crmentity + on vtiger_crmentity.crmid=vtiger_notes.notesid + LEFT JOIN vtiger_attachmentsfolder on vtiger_notes.folderid=vtiger_attachmentsfolder.folderid + LEFT JOIN vtiger_users ON vtiger_crmentity.smownerid=vtiger_users.id " . + " LEFT JOIN vtiger_groups ON vtiger_crmentity.smownerid=vtiger_groups.groupid " + ; + $query .= getNonAdminAccessControlQuery('Documents',$current_user); + $where_auto=" vtiger_crmentity.deleted=0"; + if($where != "") + $query .= " WHERE ($where) AND ".$where_auto; + else + $query .= " WHERE ".$where_auto; + + $log->debug("Exiting create_export_query method ..."); + return $query; + } + + function del_create_def_folder($query) + { + global $adb; + $dbQuery = $query." and vtiger_attachmentsfolder.folderid = 0"; + $dbresult = $adb->pquery($dbQuery,array()); + $noofnotes = $adb->num_rows($dbresult); + if($noofnotes > 0) + { + $folderQuery = "select folderid from vtiger_attachmentsfolder"; + $folderresult = $adb->pquery($folderQuery,array()); + $noofdeffolders = $adb->num_rows($folderresult); + + if($noofdeffolders == 0) + { + $insertQuery = "insert into vtiger_attachmentsfolder values (0,'Default','Contains all attachments for which a folder is not set',1,0)"; + $insertresult = $adb->pquery($insertQuery,array()); + } + } + + } + + function insertintonotesrel($relid,$id) + { + global $adb; + $dbQuery = "insert into vtiger_senotesrel values ( ?, ? )"; + $dbresult = $adb->pquery($dbQuery,array($relid,$id)); + } + + /*function save_related_module($module, $crmid, $with_module, $with_crmid){ + }*/ + + + /* + * Function to get the primary query part of a report + * @param - $module Primary module name + * returns the query string formed on fetching the related data for report for primary module + */ + function generateReportsQuery($module){ + $moduletable = $this->table_name; + $moduleindex = $this->tab_name_index[$moduletable]; + $query = "from $moduletable + inner join vtiger_crmentity on vtiger_crmentity.crmid=$moduletable.$moduleindex + inner join vtiger_attachmentsfolder on vtiger_attachmentsfolder.folderid=$moduletable.folderid + left join vtiger_groups as vtiger_groups".$module." on vtiger_groups".$module.".groupid = vtiger_crmentity.smownerid + left join vtiger_users as vtiger_users".$module." on vtiger_users".$module.".id = vtiger_crmentity.smownerid + left join vtiger_groups on vtiger_groups.groupid = vtiger_crmentity.smownerid + left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid + left join vtiger_users as vtiger_lastModifiedBy".$module." on vtiger_lastModifiedBy".$module.".id = vtiger_crmentity.modifiedby "; + return $query; + + } + + /* + * Function to get the secondary query part of a report + * @param - $module primary module name + * @param - $secmodule secondary module name + * returns the query string formed on fetching the related data for report for secondary module + */ + function generateReportsSecQuery($module,$secmodule){ + $query = $this->getRelationQuery($module,$secmodule,"vtiger_notes","notesid"); + $query .=" left join vtiger_crmentity as vtiger_crmentityDocuments on vtiger_crmentityDocuments.crmid=vtiger_notes.notesid and vtiger_crmentityDocuments.deleted=0 + left join vtiger_attachmentsfolder on vtiger_attachmentsfolder.folderid=vtiger_notes.folderid + left join vtiger_groups as vtiger_groupsDocuments on vtiger_groupsDocuments.groupid = vtiger_crmentityDocuments.smownerid + left join vtiger_users as vtiger_usersDocuments on vtiger_usersDocuments.id = vtiger_crmentityDocuments.smownerid + left join vtiger_users as vtiger_lastModifiedByDocuments on vtiger_lastModifiedByDocuments.id = vtiger_crmentityDocuments.modifiedby "; + + return $query; + } + + /* + * Function to get the relation tables for related modules + * @param - $secmodule secondary module name + * returns the array with table names and fieldnames storing relations between module and this module + */ + function setRelationTables($secmodule){ + $rel_tables = array(); + return $rel_tables[$secmodule]; + } + + // Function to unlink all the dependent entities of the given Entity by Id + function unlinkDependencies($module, $id) { + global $log; + /*//Backup Documents Related Records + $se_q = 'SELECT crmid FROM vtiger_senotesrel WHERE notesid = ?'; + $se_res = $this->db->pquery($se_q, array($id)); + if ($this->db->num_rows($se_res) > 0) { + for($k=0;$k < $this->db->num_rows($se_res);$k++) + { + $se_id = $this->db->query_result($se_res,$k,"crmid"); + $params = array($id, RB_RECORD_DELETED, 'vtiger_senotesrel', 'notesid', 'crmid', $se_id); + $this->db->pquery('INSERT INTO vtiger_relatedlists_rb VALUES (?,?,?,?,?,?)', $params); + } + } + $sql = 'DELETE FROM vtiger_senotesrel WHERE notesid = ?'; + $this->db->pquery($sql, array($id));*/ + + parent::unlinkDependencies($module, $id); + } + + // Function to unlink an entity with given Id from another entity + function unlinkRelationship($id, $return_module, $return_id) { + global $log; + if(empty($return_module) || empty($return_id)) return; + + $sql = 'DELETE FROM vtiger_senotesrel WHERE notesid = ? AND crmid = ?'; + $this->db->pquery($sql, array($id, $return_id)); + + $sql = 'DELETE FROM vtiger_crmentityrel WHERE (crmid=? AND relmodule=? AND relcrmid=?) OR (relcrmid=? AND module=? AND crmid=?)'; + $params = array($id, $return_module, $return_id, $id, $return_module, $return_id); + $this->db->pquery($sql, $params); + } + + +// Function to get fieldname for uitype 27 assuming that documents have only one file type field + + function getFileTypeFieldName(){ + global $adb,$log; + $query = 'SELECT fieldname from vtiger_field where tabid = ? and uitype = ?'; + $tabid = getTabid('Documents'); + $filetype_uitype = 27; + $res = $adb->pquery($query,array($tabid,$filetype_uitype)); + $fieldname = null; + if(isset($res)){ + $rowCount = $adb->num_rows($res); + if($rowCount > 0){ + $fieldname = $adb->query_result($res,0,'fieldname'); + } + } + return $fieldname; + + } + +// Function to get fieldname for uitype 28 assuming that doc has only one file upload type + + function getFile_FieldName(){ + global $adb,$log; + $query = 'SELECT fieldname from vtiger_field where tabid = ? and uitype = ?'; + $tabid = getTabid('Documents'); + $filename_uitype = 28; + $res = $adb->pquery($query,array($tabid,$filename_uitype)); + $fieldname = null; + if(isset($res)){ + $rowCount = $adb->num_rows($res); + if($rowCount > 0){ + $fieldname = $adb->query_result($res,0,'fieldname'); + } + } + return $fieldname; + } + + /** + * Check the existence of folder by folderid + */ + function isFolderPresent($folderid) { + global $adb; + $result = $adb->pquery("SELECT folderid FROM vtiger_attachmentsfolder WHERE folderid = ?", array($folderid)); + if(!empty($result) && $adb->num_rows($result) > 0) return true; + return false; + } + + /** + * Customizing the restore procedure. + */ + function restore($modulename, $id) { + parent::restore($modulename, $id); + + global $adb; + $fresult = $adb->pquery("SELECT folderid FROM vtiger_notes WHERE notesid = ?", array($id)); + if(!empty($fresult) && $adb->num_rows($fresult)) { + $folderid = $adb->query_result($fresult, 0, 'folderid'); + if(!$this->isFolderPresent($folderid)) { + // Re-link to default folder + $adb->pquery("UPDATE vtiger_notes set folderid = 1 WHERE notesid = ?", array($id)); + } + } + } + + function getQueryByModuleField($module, $fieldname, $srcrecord, $query) { + if($module == "MailManager") { + $tempQuery = split('WHERE', $query); + if(!empty($tempQuery[1])) { + $where = " vtiger_notes.filelocationtype = 'I' AND vtiger_notes.filename != '' AND vtiger_notes.filestatus != 0 AND "; + $query = $tempQuery[0].' WHERE '.$where.$tempQuery[1]; + } else{ + $query = $tempQuery[0].' WHERE '.$tempQuery; + } + return $query; + } + } +} +?> \ No newline at end of file diff --git a/modules/Documents/Documents.png b/modules/Documents/Documents.png new file mode 100644 index 0000000..aa0ab7f Binary files /dev/null and b/modules/Documents/Documents.png differ diff --git a/modules/Documents/DocumentsAjax.php b/modules/Documents/DocumentsAjax.php new file mode 100644 index 0000000..ce66087 --- /dev/null +++ b/modules/Documents/DocumentsAjax.php @@ -0,0 +1,13 @@ + diff --git a/modules/Documents/DownloadFile.php b/modules/Documents/DownloadFile.php new file mode 100644 index 0000000..4122bec --- /dev/null +++ b/modules/Documents/DownloadFile.php @@ -0,0 +1,68 @@ +pquery("select crmid from vtiger_seattachmentsrel where attachmentsid = ?",array($fileid)); +$noteid = $adb->query_result($noteQuery,0,'crmid'); +$dbQuery = "SELECT * FROM vtiger_notes WHERE notesid = ? and folderid= ?"; +$result = $adb->pquery($dbQuery,array($noteid,$folderid)) or die("Couldn't get file list"); +if($adb->num_rows($result) == 1) +{ + $fileType = @$adb->query_result($result, 0, "filetype"); + $name = @$adb->query_result($result, 0, "filename"); + $name = html_entity_decode($name, ENT_QUOTES, $default_charset); + $pathQuery = $adb->pquery("select path from vtiger_attachments where attachmentsid = ?",array($fileid)); + $filepath = $adb->query_result($pathQuery,0,'path'); + + $saved_filename = $fileid."_".$name; + if(!$filepath.$saved_filename) + $saved_filename = $fileid."_".$name; + + $filesize = filesize($filepath.$saved_filename); + if(!fopen($filepath.$saved_filename, "r")) + { + echo 'unable to open file'; + $log->debug('Unable to open file'); + } + else + { + $fileContent = fread(fopen($filepath.$saved_filename, "r"), $filesize); + } + if($fileContent != '') + { + $log->debug('About to update download count'); + $sql = "select filedownloadcount from vtiger_notes where notesid= ?"; + $download_count = $adb->query_result($adb->pquery($sql,array($fileid)),0,'filedownloadcount') + 1; + $sql="update vtiger_notes set filedownloadcount= ? where notesid= ?"; + $res=$adb->pquery($sql,array($download_count,$fileid)); + } + + header("Content-type: $fileType"); + header("Content-length: $filesize"); + header("Cache-Control: private"); + header("Content-Disposition: attachment; filename=$name"); + header("Content-Description: PHP Generated Data"); + echo $fileContent; +} +else +{ + echo "Record doesn't exist."; +} +?> \ No newline at end of file diff --git a/modules/Documents/EditView.php b/modules/Documents/EditView.php new file mode 100644 index 0000000..2c2cd73 --- /dev/null +++ b/modules/Documents/EditView.php @@ -0,0 +1,238 @@ +assign("SEARCH", $searchurl); + +//4600 ends + +$smarty->assign("UPLOADSIZE", $upload_maxsize/1000000); //Convert to MB +$smarty->assign("UPLOAD_MAXSIZE",$upload_maxsize); +if($_REQUEST['upload_error'] == true) +{ + echo '
'.$mod_strings['FILE_HAS_NO_DATA'].'.
'; +} + +if(isset($_REQUEST['record']) && $_REQUEST['record'] !='') +{ + $focus->id = $_REQUEST['record']; + $focus->mode = 'edit'; + $focus->retrieve_entity_info($_REQUEST['record'],"Documents"); + $focus->name=$focus->column_fields['notes_title']; +} + +if($focus->mode != 'edit') +{ + if(isset($_REQUEST['parent_id']) && isset($_REQUEST['return_module'])) + { + $owner = getRecordOwnerId($_REQUEST['parent_id']); + if(isset($owner['Users']) && $owner['Users'] != '') { + $permitted_users = get_user_array('true', 'Active',$current_user->id); + if(!in_array($owner['Users'],$permitted_users)){ + $owner['Users'] = $current_user->id; + } + $focus->column_fields['assigntype'] = 'U'; + $focus->column_fields['assigned_user_id'] = $owner['Users']; + } elseif(isset($owner['Groups']) && $owner['Groups'] != '') { + $focus->column_fields['assigntype'] = 'T'; + $focus->column_fields['assigned_user_id'] = $owner['Groups']; + } + } +} +if(empty($_REQUEST['record']) && $focus->mode != 'edit'){ + setObjectValuesFromRequest($focus); +} + +if(isset($_REQUEST['parent_id']) && $focus->mode != 'edit') { + $smarty->assign("PARENTID",vtlib_purify($_REQUEST['parent_id'])); +} + +$dbQuery="select filename from vtiger_notes where notesid = ?"; +$result=$adb->pquery($dbQuery,array($focus->id)); +$filename=$adb->query_result($result,0,'filename'); +if(is_null($filename) || $filename == '') +{ + $smarty->assign("FILE_EXIST","no"); +} +else +{ + $smarty->assign("FILE_NAME",$filename); + $smarty->assign("FILE_EXIST","yes"); +} + +//setting default flag value so due date and time not required +if (!isset($focus->id)) $focus->date_due_flag = 'on'; + +//needed when creating a new case with default values passed in +if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) { + $focus->contact_name = $_REQUEST['contact_name']; +} +if (isset($_REQUEST['contact_id']) /* && is_null($focus->contact_id) */ ) { + $focus->contact_id = $_REQUEST['contact_id']; +} +if (isset($_REQUEST['parent_name']) && is_null($focus->parent_name)) { + $focus->parent_name = $_REQUEST['parent_name']; +} +if (isset($_REQUEST['parent_id']) /* && is_null($focus->parent_id) */ ) { + $focus->parent_id = $_REQUEST['parent_id']; +} +if (isset($_REQUEST['parent_type'])) { + $focus->parent_type = $_REQUEST['parent_type']; +} +elseif (!isset($focus->parent_type)) { + $focus->parent_type = $app_list_strings['record_type_default_key']; +} + +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$disp_view = getView($focus->mode); +if($disp_view == 'edit_view') + $smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields)); +else +{ + $smarty->assign("BASBLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'BAS')); +} +$smarty->assign("OP_MODE",$disp_view); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + + +$log->info("Document detail view"); + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("MODULE",$currentModule); +$smarty->assign("SINGLE_MOD",'Document'); +//Display the RTE or not? -- configure $USE_RTE in config.php +$USE_RTE = vt_hasRTE(); +if(getFieldVisibilityPermission('Documents',$current_user->id,'notecontent') != '0') + $USE_RTE = false; +$smarty->assign("USE_RTE",$USE_RTE); + +if (isset($focus->name)) +$smarty->assign("NAME", $focus->name); +else +$smarty->assign("NAME", ""); + +if($focus->mode == 'edit') +{ + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $smarty->assign("MODE", $focus->mode); +} +else +{ + $smarty->assign("MODE",'create'); +} +$smarty->assign('CREATEMODE', vtlib_purify($_REQUEST['createmode'])); + +if (isset($_REQUEST['return_module'])) +$smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module'])); +else +$smarty->assign("RETURN_MODULE","Documents"); +if (isset($_REQUEST['return_action'])) +$smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action'])); +else +$smarty->assign("RETURN_ACTION","index"); +if (isset($_REQUEST['return_id'])) +$smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id'])); +if (isset($_REQUEST['email_id'])) +$smarty->assign("EMAILID", vtlib_purify($_REQUEST['email_id'])); +if (isset($_REQUEST['ticket_id'])) $smarty->assign("TICKETID", vtlib_purify($_REQUEST['ticket_id'])); +if (isset($_REQUEST['fileid'])) +$smarty->assign("FILEID", vtlib_purify($_REQUEST['fileid'])); +if (isset($_REQUEST['record'])) +{ + $smarty->assign("CANCELACTION", "DetailView"); +} +else +{ + $smarty->assign("CANCELACTION", "index"); +} +if (isset($_REQUEST['return_viewname'])) +$smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname'])); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); +$smarty->assign("ID", $focus->id); +$smarty->assign("OLD_ID", $old_id ); + +if ( empty($focus->filename)) +{ + $smarty->assign("FILENAME_TEXT", ""); + $smarty->assign("FILENAME", ""); +} +else +{ + $smarty->assign("FILENAME_TEXT", "(".$focus->filename.")"); + $smarty->assign("FILENAME", $focus->filename); +} + +if (isset($focus->parent_type) && $focus->parent_type != "") { + $change_parent_button = ""; + $smarty->assign("CHANGE_PARENT_BUTTON", $change_parent_button); +} +if ($focus->parent_type == "Account") $smarty->assign("DEFAULT_SEARCH", "&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); +$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']); + +$tabid = getTabid("Documents"); +$validationData = getDBValidationData($focus->tab_name,$tabid); +$data = split_validationdataArray($validationData); + +$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); +$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); +$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); +$smarty->assign("DUPLICATE",vtlib_purify($_REQUEST['isDuplicate'])); + +global $adb; +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if($focus->mode != 'edit' && $mod_seq_field != null) { + $autostr = getTranslatedString('MSG_AUTO_GEN_ON_SAVE'); + $mod_seq_string = $adb->pquery("SELECT prefix, cur_id from vtiger_modentity_num where semodule = ? and active=1",array($currentModule)); + $mod_seq_prefix = $adb->query_result($mod_seq_string,0,'prefix'); + $mod_seq_no = $adb->query_result($mod_seq_string,0,'cur_id'); + if($adb->num_rows($mod_seq_string) == 0 || $focus->checkModuleSeqNumber($focus->table_name, $mod_seq_field['column'], $mod_seq_prefix.$mod_seq_no)) + echo '
'. getTranslatedString('LBL_DUPLICATE'). ' '. getTranslatedString($mod_seq_field['label']) + .' - '. getTranslatedString('LBL_CLICK') .' '.getTranslatedString('LBL_HERE').' ' + . getTranslatedString('LBL_TO_CONFIGURE'). ' '. getTranslatedString($mod_seq_field['label']) .''; + else + $smarty->assign("MOD_SEQ_ID",$autostr); +} else { + $smarty->assign("MOD_SEQ_ID", $focus->column_fields[$mod_seq_field['name']]); +} +// END + +// Gather the help information associated with fields +$smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule)); +// END + +$picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($currentModule); +$smarty->assign("PICKIST_DEPENDENCY_DATASOURCE", Zend_Json::encode($picklistDependencyDatasource)); + +if($focus->mode == 'edit') + $smarty->display("salesEditView.tpl"); +else + $smarty->display("CreateView.tpl"); +?> \ No newline at end of file diff --git a/modules/Documents/EmailFile.php b/modules/Documents/EmailFile.php new file mode 100644 index 0000000..4d7a14d --- /dev/null +++ b/modules/Documents/EmailFile.php @@ -0,0 +1,41 @@ +pquery($dbQuery,array($notesid)); +$folderid = $adb->query_result($result,0,'folderid'); +$filename = $adb->query_result($result,0,'filename'); +$filestatus = $adb->query_result($result,0,'filestatus'); + +$fileidQuery = "select attachmentsid from vtiger_seattachmentsrel where crmid = ?"; +$fileidRes = $adb->pquery($fileidQuery,array($notesid)); +$fileid = $adb->query_result($fileidRes,0,'attachmentsid'); + +$pathQuery = $adb->pquery("select path from vtiger_attachments where attachmentsid = ?",array($fileid)); +$filepath = $adb->query_result($pathQuery,0,'path'); + +$fileinattachments = $root_directory.$filepath.$fileid.'_'.$filename; +if(!file($fileinattachments))$fileinattachments = $root_directory.$filepath.$fileid."_".$filename; + +$newfileinstorage = $root_directory."/storage/$fileid-".$filename; + +if($filestatus == 1){ + copy($fileinattachments,$newfileinstorage); +} + +echo ""; +exit(); +?> diff --git a/modules/Documents/ExportRecords.php b/modules/Documents/ExportRecords.php new file mode 100644 index 0000000..bc9a872 --- /dev/null +++ b/modules/Documents/ExportRecords.php @@ -0,0 +1,14 @@ + + diff --git a/modules/Documents/ListView.php b/modules/Documents/ListView.php new file mode 100644 index 0000000..1c02414 --- /dev/null +++ b/modules/Documents/ListView.php @@ -0,0 +1,336 @@ +sorder = $sorder; + $modObj->sortby = $order_by; + $_SESSION['lvs'][$currentModule] = get_object_vars($modObj); +} + +//<<<>>>>>> +$oCustomView = new CustomView("Documents"); +$viewid = $oCustomView->getViewId($currentModule); +$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid); +$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid); +//<<<<>>>> +if (!isset($where)) $where = ""; +$url_string = ''; // assigning http url string + +$focus = new Documents(); +// Initialize sort by fields +$focus->initSortbyField('Documents'); +// END +$smarty = new vtigerCRM_Smarty; +$other_text = Array(); + +if($_REQUEST['errormsg'] != '') +{ + $errormsg = vtlib_purify($_REQUEST['errormsg']); + $smarty->assign("ERROR","The User does not have permission to delete ".$errormsg." ".$currentModule); +}else +{ + $smarty->assign("ERROR",""); +} + +if(ListViewSession::hasViewChanged($currentModule,$viewid)) { + $_SESSION['NOTES_ORDER_BY'] = ''; +} +//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>> +$sorder = $focus->getSortOrder(); +$order_by = $focus->getOrderBy(); + +if(empty($_REQUEST['folderid'])) { + $_SESSION['NOTES_ORDER_BY'] = $order_by; + $_SESSION['NOTES_SORT_ORDER'] = $sorder; +} +//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>> + +if(isPermitted('Documents','Delete','') == 'yes') +{ + $smarty->assign("MASS_DELETE","yes"); + $other_text['del'] = $app_strings['LBL_MASS_DELETE']; +} + +if($viewnamedesc['viewname'] == 'All') +{ + $smarty->assign("ALL", 'All'); +} + +//Added to handle approving or denying status-public by the admin in CustomView +$statusdetails = $oCustomView->isPermittedChangeStatus($viewnamedesc['status']); +$smarty->assign("CUSTOMVIEW_PERMISSION",$statusdetails); + +//To check if a user is able to edit/delete a customview +$edit_permit = $oCustomView->isPermittedCustomView($viewid,'EditView',$currentModule); +$delete_permit = $oCustomView->isPermittedCustomView($viewid,'Delete',$currentModule); +$smarty->assign("CV_EDIT_PERMIT",$edit_permit); +$smarty->assign("CV_DELETE_PERMIT",$delete_permit); + +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; +$smarty->assign("CUSTOMVIEW_OPTION",$customviewcombo_html); +$smarty->assign("VIEWID", $viewid); +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("MODULE",$currentModule); +$smarty->assign("SINGLE_MOD",getTranslatedString('SINGLE_'.$currentModule, $currentModule)); +$smarty->assign("BUTTONS",$other_text); +$smarty->assign("CATEGORY",$category); +$smarty->assign('MAX_RECORDS', $list_max_entries_per_page); + +//Retreive the list from Database +//<<<<<<<<>>>>>>>> +global $current_user; +$queryGenerator = new QueryGenerator($currentModule, $current_user); +if ($viewid != "0") { + $queryGenerator->initForCustomViewById($viewid); +} else { + $queryGenerator->initForDefaultCustomView(); +} +//<<<<<<<>>>>>>>> + +$hide_empty_folders = 'no'; + +// Enabling Module Search +$url_string = ''; +if($_REQUEST['query'] == 'true') { + $queryGenerator->addUserSearchConditions($_REQUEST); + $ustring = getSearchURL($_REQUEST); + $url_string .= "&query=true$ustring"; + $smarty->assign('SEARCH_URL', $url_string); +} + +$query = $queryGenerator->getQuery(); +$where = $queryGenerator->getConditionalWhere(); +if(isset($where) && $where != '') { + $_SESSION['export_where'] = $where; +} else { + unset($_SESSION['export_where']); +} + +$focus->query = $query; + +if($viewid ==0) +{ + echo "
"; + echo "
+ + + + + + + + + +
$app_strings[LBL_PERMISSION]
+ $app_strings[LBL_GO_BACK]
+
+
"; + echo "
"; + exit; +} + +//Retreive the List View Table Header +if($viewid !='') +$url_string .="&viewname=".$viewid; + +$controller = new ListViewController($adb, $current_user, $queryGenerator); +$listview_header_search = $controller->getBasicSearchFieldInfoList(); +$smarty->assign("SEARCHLISTHEADER",$listview_header_search); + +$smarty->assign("SELECT_SCRIPT", $view_script); + +$start = Array(); +$request_folderid = ''; + +if($_REQUEST['action'] == 'DocumentsAjax' && isset($_REQUEST['folderid'])) +{ + $request_folderid = vtlib_purify($_REQUEST['folderid']); + $start[$request_folderid] = vtlib_purify($_REQUEST['start']); +} +$focus->del_create_def_folder($focus->query); + +$dbQuery = "select * from vtiger_attachmentsfolder"; +$result = $adb->pquery($dbQuery,array()); +$foldercount = $adb->num_rows($result); +$folders = Array(); +$emptyfolders = Array(); +if($foldercount > 0 ) +{ + for($i=0;$i<$foldercount;$i++) + { + $query = ''; + $displayFolder=''; + $query = $focus->query; + $list_query = ''; + $list_query = $focus->query; + $folder_id = $adb->query_result($result,$i,"folderid"); + $query .= " and vtiger_notes.folderid = $folder_id"; + $sorder = $focus->getSortOrderForFolder($folder_id); + if(!is_array($_SESSION['NOTES_FOLDER_SORT_ORDER'])) { + $_SESSION['NOTES_FOLDER_SORT_ORDER'] = array(); + } + $_SESSION['NOTES_FOLDER_SORT_ORDER'][$folder_id] = $sorder; + $order_by = $focus->getOrderByForFolder($folder_id); + if(!is_array($_SESSION['NOTES_FOLDER_ORDER_BY'])) { + $_SESSION['NOTES_FOLDER_ORDER_BY'] = array(); + } + $_SESSION['NOTES_FOLDER_ORDER_BY'][$folder_id] = $order_by; + if($folder_id != $request_folderid) + { + $start[$folder_id] = 1; + } + + + if(isset($order_by) && $order_by != '') + { + $tablename = getTableNameForField('Documents',$order_by); + $tablename = (($tablename != '')?($tablename."."):''); + + if( $adb->dbType == "pgsql") + { + $query .= ' GROUP BY '.$tablename.$order_by; + $list_query .= ' GROUP BY '.$tablename.$order_by; + $focus->additional_query .= ' GROUP BY '.$tablename.$order_by; + } + + $query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder; + $list_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder; + $focus->additional_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder; + } + //Retreiving the no of rows + $count_result = $adb->query( mkCountQuery( $query)); + $num_records = $adb->query_result($count_result,0,"count"); + if($num_records > 0){ + $displayFolder=true; + } + //navigation start + $max_entries_per_page = $list_max_entries_per_page; + //Postgres 8 fixes + if( $adb->dbType == "pgsql") + $list_query = fixPostgresQuery( $query, $log, 0); + + if($folder_id == $request_folderid){ + $start[$folder_id] = 1; + if(!empty($_REQUEST['start'])){ + $start[$folder_id] = ListViewSession::getRequestStartPage(); + if($start[$folder_id] == 'last'){ + if($num_records > 0){ + $start[$folder_id] = ceil($num_records/$max_entries_per_page); + } + } + if(!is_numeric($start[$folder_id])){ + $start[$folder_id] = 1; + } + } + } + + $navigation_array = VT_getSimpleNavigationValues($start[$folder_id],$max_entries_per_page,$num_records); + if($folder_id == $request_folderid){ + if(!is_array($_SESSION['lvs'][$currentModule]['start'])){ + $_SESSION['lvs'][$currentModule]['start'] = array(); + } + $_SESSION['lvs'][$currentModule]['start'][$folder_id] = $start[$folder_id]; + } + $limit_start_rec = ($start[$folder_id]-1) * $max_entries_per_page; + + if( $adb->dbType == "pgsql") + $list_result = $adb->pquery($query. " OFFSET $limit_start_rec LIMIT $max_entries_per_page", array()); + else + $list_result = $adb->pquery($query. " LIMIT $limit_start_rec, $max_entries_per_page", array()); + //navigation end + + $folder_details=Array(); + $folderid = $adb->query_result($result,$i,"folderid"); + $folder_details['folderid']=$folderid; + $folder_details['foldername']=$adb->query_result($result,$i,"foldername"); + $foldername = $folder_details['foldername']; + $folder_details['description']=$adb->query_result($result,$i,"description"); + $folder_url_string = $url_string . "&folderid=$folderid"; + $folder_details['header'] = $controller->getListViewHeader($focus,$currentModule, + $folder_url_string,$sorder, $order_by); + $folder_files = $controller->getListViewEntries($focus,$currentModule,$list_result, + $navigation_array); + $folder_details['entries']= $folder_files; + $folder_details['navigation'] = getTableHeaderSimpleNavigation($navigation_array, $url_string,"Documents",$folder_id,$viewid); + $folder_details['recordListRange'] = getRecordRangeMessage($list_result, $limit_start_rec, + $num_records); + if ($displayFolder == true) { + $folders[$foldername] = $folder_details; + } else{ + $emptyfolders[$foldername] = $folder_details; + } + if ($folderid == 1) $default_folder_details = $folder_details; + } + if (count($folders) == 0) $folders[$default_folder_details['foldername']] = $default_folder_details; +} +else +{ + $smarty->assign("NO_FOLDERS","yes"); +} + +$smarty->assign("NO_OF_FOLDERS",$foldercount); +$smarty->assign("FOLDERS", $folders); +$smarty->assign("EMPTY_FOLDERS", $emptyfolders); +$smarty->assign("ALL_FOLDERS", array_merge($folders, $emptyfolders)); + +//Added to select Multiple records in multiple pages +$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs'])); +$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs'])); + +$alphabetical = AlphabeticalSearch($currentModule,'index','notes_title','true','basic',"","","","",$viewid); +$fieldnames = $controller->getAdvancedSearchOptionString(); +$criteria = getcriteria_options(); +$smarty->assign("CRITERIA", $criteria); +$smarty->assign("FIELDNAMES", $fieldnames); +$smarty->assign("ALPHABETICAL", $alphabetical); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("RECORD_COUNTS", $record_string); +$adminuser = is_admin($current_user); +$smarty->assign("IS_ADMIN",$adminuser); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +ListViewSession::setSessionQuery($currentModule,$focus->query,$viewid); + +// Gather the custom link information to display +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'ACTION'=>vtlib_purify($_REQUEST['action']), 'CATEGORY'=> $category); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('LISTVIEWBASIC','LISTVIEW'), $customlink_params)); +// END + +if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '' || $_REQUEST['mode'] == 'ajax') + $smarty->display("DocumentsListViewEntries.tpl"); +else + $smarty->display("DocumentsListView.tpl"); +?> \ No newline at end of file diff --git a/modules/Documents/ListViewPagging.php b/modules/Documents/ListViewPagging.php new file mode 100644 index 0000000..333f176 --- /dev/null +++ b/modules/Documents/ListViewPagging.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Documents/MoveFile.php b/modules/Documents/MoveFile.php new file mode 100644 index 0000000..267cd2f --- /dev/null +++ b/modules/Documents/MoveFile.php @@ -0,0 +1,48 @@ +is_admin != 'on') +{ + echo 'NOT_PERMITTED'; + die; +} +else +{ + $new_folderid = $_REQUEST['folderid']; + $idlist = vtlib_purify($_REQUEST['idlist']); + $excludedRecords=vtlib_purify($_REQUEST['excludedRecords']); + + if(isset($_REQUEST['idlist']) && $_REQUEST['idlist']!= '') + { + $id_array = Array(); + $id_array = getSelectedRecords($_REQUEST,'Documents',$idlist,$excludedRecords);//explode(';',$_REQUEST['idlist']); + $id_array = array_filter($id_array); + for($i = 0;$i < count($id_array);$i++) { + ChangeFolder($id_array[$i],$new_folderid); + } + header("Location: index.php?action=DocumentsAjax&file=ListView&mode=ajax&module=Documents"); + } +} + +/** To Change the Documents to another folder + * @param $recordid -- The file id + * @param $new_folderid -- The folderid to which the file to be moved + * @returns nothing + */ +function ChangeFolder($recordid,$new_folderid) +{ + global $adb; + $sql="update vtiger_notes set folderid=".$new_folderid." where notesid in (".$recordid.")"; + $res=$adb->pquery($sql,array()); +} +?> diff --git a/modules/Documents/Popup.php b/modules/Documents/Popup.php new file mode 100644 index 0000000..98ea8ec --- /dev/null +++ b/modules/Documents/Popup.php @@ -0,0 +1,23 @@ + diff --git a/modules/Documents/QuickCreate.php b/modules/Documents/QuickCreate.php new file mode 100644 index 0000000..8d5998b --- /dev/null +++ b/modules/Documents/QuickCreate.php @@ -0,0 +1,12 @@ + diff --git a/modules/Documents/Save.php b/modules/Documents/Save.php new file mode 100644 index 0000000..3f81c58 --- /dev/null +++ b/modules/Documents/Save.php @@ -0,0 +1,64 @@ +date_due_flag = 'off'; + +if(isset($_REQUEST['parentid']) && $_REQUEST['parentid'] != '') + $focus->parentid = $_REQUEST['parentid']; +if($_REQUEST['assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} +//Save the Document + +$focus->save($currentModule); + +$return_id = $focus->id; +$note_id = $return_id; + +$parenttab = getParentTab(); +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']); +else $return_module = "Documents"; +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']); +else $return_action = "DetailView"; +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']); + + +$local_log->debug("Saved record with id of ".$return_id); + +//Redirect to EditView if the given file is not valid. +if($file_upload_error) +{ + $return_module = 'Documents'; + $return_action = 'EditView'; + $return_id = $note_id.'&upload_error=true&return_module='.$return_module.'&return_action='.$return_action.'&return_id='.$return_id; +} + +//code added for returning back to the current view after edit from list view +if($_REQUEST['return_viewname'] == '') $return_viewname='0'; +if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']); +header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']).$search); +?> \ No newline at end of file diff --git a/modules/Documents/SaveFile.php b/modules/Documents/SaveFile.php new file mode 100644 index 0000000..ae22aa8 --- /dev/null +++ b/modules/Documents/SaveFile.php @@ -0,0 +1,74 @@ +query_result($adb->pquery($sql,array($file_id)),0,'filedownloadcount') + 1; + $sql="update vtiger_notes set filedownloadcount= ? where notesid= ?"; + $res=$adb->pquery($sql,array($download_count,$file_id)); +} + +if(isset($_REQUEST['act']) && $_REQUEST['act'] == 'checkFileIntegrityDetailView') +{ + global $adb,$root_directory; + $dbQuery = "SELECT * FROM vtiger_notes where notesid= ?"; + $fileidQuery = "select attachmentsid from vtiger_seattachmentsrel where crmid = ? "; + $result = $adb->pquery($dbQuery,array($_REQUEST['noteid'])); + $fileidResult = $adb->pquery($fileidQuery,array($_REQUEST['noteid'])); + //$activeToinactive_count = 0; + + $file_status = $adb->query_result($result,0,"filestatus"); + $download_type = $adb->query_result($result,0,"filelocationtype"); + $notesid = $adb->query_result($result,0,'notesid'); + $fileid = $adb->query_result($fileidResult,0,"attachmentsid"); + $folderid = $adb->query_result($result,0,"folderid"); + $name = $adb->query_result($result,0,"filename"); + + if($download_type == 'I'){ + $saved_filename = $fileid."_".$name; + $pathQuery = $adb->pquery("select path from vtiger_attachments where attachmentsid = ?",array($fileid)); + $filepath = $adb->query_result($pathQuery,0,'path'); + + } + elseif($download_type == 'E'){ + $saved_filename = $name; + } + else + $saved_filename = ''; + + + if(!fopen($filepath.$saved_filename, "r")) + { + if($file_status == 1) + { + $dbQuery1 = "update vtiger_notes set filestatus = 0 where notesid= ?"; + $result1 = $adb->pquery($dbQuery1,array($notesid)); + echo "lost_integrity"; + } + else + echo "file_not_available"; + }else { + echo "file_available"; + } + +} + +?> \ No newline at end of file diff --git a/modules/Documents/SaveFolder.php b/modules/Documents/SaveFolder.php new file mode 100644 index 0000000..916b2ba --- /dev/null +++ b/modules/Documents/SaveFolder.php @@ -0,0 +1,84 @@ +query_result($adb->pquery($sqlfid,$params),0,'max(folderid)')+1; + $params=array(); + $sqlseq="select max(sequence) from vtiger_attachmentsfolder"; + $sequence=$adb->query_result($adb->pquery($sqlseq,$params),0,'max(sequence)')+1; + $params=array(); + $dbQuery="select * from vtiger_attachmentsfolder"; + $result1=$adb->pquery($dbQuery,array()); + $flag=0; + for($i=0;$i<$adb->num_rows($result1);$i++) + { + $dbfldrname=$adb->query_result($result1,$i,'foldername'); + if($dbfldrname == $foldername) + $flag = 1; + } + if($flag == 0) + { + $sql="insert into vtiger_attachmentsfolder (folderid,foldername,description,createdby,sequence)values ($fid,'".$foldername."','".$folderdesc."',".$current_user->id.",$sequence)"; + $result=$adb->pquery($sql,$params); + if(!$result) + { + echo "Failure"; + } + else + header("Location: index.php?action=DocumentsAjax&file=ListView&mode=ajax&module=Documents"); + } + elseif($flag == 1) + echo "DUPLICATE_FOLDERNAME"; + } + elseif($folderid != "") + { + $dbQuery="select * from vtiger_attachmentsfolder"; + $result1=$adb->pquery($dbQuery,array()); + $flag=0; + for($i=0;$i<$adb->num_rows($result1);$i++) + { + $dbfldrname=$adb->query_result($result1,$i,'foldername'); + if($dbfldrname == $foldername) + $flag = 1; + } + if($flag == 0) + { + $sql="update vtiger_attachmentsfolder set foldername= ? where folderid= ? "; + $result=$adb->pquery($sql,array($foldername,$folderid)); + if(!$result) + { + echo "Failure"; + } + else + echo 'Success'; + } + elseif($flag == 1) + echo "DUPLICATE_FOLDERNAME"; + } + } + +?> diff --git a/modules/Documents/Settings.php b/modules/Documents/Settings.php new file mode 100644 index 0000000..48a80c0 --- /dev/null +++ b/modules/Documents/Settings.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Documents/TagCloud.php b/modules/Documents/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Documents/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Documents/UnifiedSearch.php b/modules/Documents/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Documents/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Documents/index.php b/modules/Documents/index.php new file mode 100644 index 0000000..3ff42ab --- /dev/null +++ b/modules/Documents/index.php @@ -0,0 +1,26 @@ + diff --git a/modules/Documents/language/de_de.lang.php b/modules/Documents/language/de_de.lang.php new file mode 100644 index 0000000..52db992 --- /dev/null +++ b/modules/Documents/language/de_de.lang.php @@ -0,0 +1,138 @@ +'Dokumente', + 'LBL_MODULE_TITLE'=>'Dokumente: Home', + 'LBL_SEARCH_FORM_TITLE'=>'Dokumentsuche', + 'LBL_LIST_FORM_TITLE'=>'Dokumentliste', + 'LBL_NEW_FORM_TITLE'=>'neues Dokument', + + 'LBL_LIST_SUBJECT'=>'Betreff', + 'LBL_LIST_CONTACT_NAME'=>'Personenname', + 'LBL_LIST_RELATED_TO'=>'bezogen auf', + 'LBL_LIST_DATE_MODIFIED'=>'geändert', + + 'LBL_NOTE'=>'Dokument:', + 'LBL_NOTE_SUBJECT'=>'Dokument Betreff:', + 'LBL_CONTACT_NAME'=>'Personenname:', + 'LBL_PHONE'=>'Telefon:', + 'LBL_SUBJECT'=>'Betreff:', + 'LBL_CLOSE'=>'schließen:', + 'LBL_RELATED_TO'=>'bezogen auf:', + 'LBL_EMAIL_ADDRESS'=>'E-Mail Adresse:', + 'LBL_COLON'=>':', + + 'ERR_DELETE_RECORD'=>"Bitte einen Eintrag auswählen.", + 'LBL_LIST_FILENAME'=>"Datei", + + // Added for Note(3.2-patch 3) + + 'LBL_FILENAME'=>'Anhang:', + 'LBL_NOTE_INFORMATION'=>'Dokumentinformation', + 'File Information'=>'Dateiinformation', + + // Added for 4GA + 'LBL_TOOL_FORM_TITLE'=>'Dokumentenwerkzeuge', + // Added for 4GA + 'Contact Name'=>'Personenname', + 'Related To'=>'bezogen auf', + 'Subject'=>'Betreff', + 'Created Time'=>'erzeugt', + 'Modified Time'=>'geändert', + 'Document'=>'Dokument', + 'Note'=>'Notiz', + //Added for 4.2 Release -- CustomView + 'Related to'=>'bezogen auf', + 'Last Modified'=>'geändert', + 'File'=>'Datei', + 'LBL_ALL'=>'alle', + 'Title'=>'Titel', + + //Added after 504 for Downloads Module + 'LBL_FILE_INFORMATION'=>'Dateiinformation', + 'LBL_FILE_NAME'=>'Dateiname', + 'LBL_FILE_TYPE'=>'Dateityp', + 'LBL_FILE_SIZE'=>'Größe', + 'filelocationtype'=>'Download Typ', + 'fileversion'=>'Version', + 'filestatus'=>'aktiv', + 'filedownloadcount'=>'Download Anzahl', + 'os'=>'Plattform', + 'LBL_FOLDER_NAME'=>'Verzeichnisname', + 'LBL_DOWNLOAD_TYPE'=>'Download Typ', + 'LBL_INTERNAL'=>'intern', + 'LBL_EXTERNAL'=>'extern', + 'LBL_EXTERNAL_FILE_NAME'=>'Dateiname', + 'LBL_FILE_LOCATION'=>'Datei Location', + 'LBL_PD'=>'plattformabhängig', + 'LBL_PIND'=>'plattformunabhängig', + 'ChoosePlatform'=>'Plattform auswählen', + 'LBL_ACTIVE'=>'aktiv', + 'LBL_INACTIVE'=>'inaktiv', + 'LBL_UPLOAD_BUTTON'=>'Upload', + 'architecture'=>'Architektur', + 'LBL_DOWNLOAD_FILE'=>'Download Datei', + 'LBL_CHECK_INTEGRITY'=>'prüfe Dateiintegrität', + 'LBL_EMAIL_FILE'=>'E-Mail Datei als Anhang', + 'LBL_CLICK_HERE'=>'klick hier,', + 'LBL_TO_ADD_FOLDER'=>'um ein neues Verzeichnis anzulegen.', + 'LBL_DELETE_FOLDER'=>'Verzeichnis löschen', + 'LBL_FOLDER_DESC'=>'Beschreibung', + 'LBL_ADD_NEW_FOLDER'=>'Verzeichnis hinzufügen', + 'LBL_DELETE_DOCUMENTS'=>'lösche Dokument(e)', + 'LBL_MOVE_TO'=>'verschiebe zu', + 'File Name'=>'Dateiname', + 'File Type'=>'Dateityp', + 'File Size'=>'Größe', + 'LBL_INTERNAL'=>'intern', + 'LBL_URL'=>'URL', + 'LBL_EXTERNAL'=>'extern', + 'LBL_EXTERNAL_LNK'=>'externer Link', + 'LBL_ACTIVE'=>'aktiv', + 'LBL_INACTIVE'=>'inaktiv', + 'LBL_PLATFORM_INDEPENDENT'=>'plattformunabhängig', + 'LNK_DOWNLOAD'=>'download', + 'LBL_MOVE_DOCUMENTS'=>'verschiebe Dokument(e)', + 'LBL_MOVE'=>'Verschieben', + 'Download Type'=>'Download Typ', + 'Version'=>'Version', + 'Active'=>'aktiv', + 'Download Count'=>'Download Anzahl', + 'Platform'=>'Plattform', + 'Assigned To'=>'zuständig', + // Module Sequence Numbering + 'Note No' => 'Dokumentnr.', + // END + + // Documents module + 'LBL_EMPTY_FOLDERS' => 'leere Verzeichnisse', + 'LBL_VIEW_EMPTY_FOLDERS' => 'leere Verzeichnisse ansehen', + 'LBL_NO_DOCUMENTS' => 'in diesem Verzeichnis wurden keine Dokumente abgelegt', + 'LBL_DESCRIPTION' => 'Beschreibung', + 'FILE_HAS_NO_DATA'=>'Die Datei ist leer oder ungültig.', + + 'LBL_MAXIMUM_20'=>'Maximum 20', + 'LBL_MAXIMUM_50'=>'Maximum 50', + + // Added after 5.1.0 GA + 'Folder Name'=>'Verzeichnisname', + 'Document No'=>'Dokumentennr.', + + 'Documents' => 'Dokumente', + 'Documents ID' => 'Dokumenten ID', +); + +?> diff --git a/modules/Documents/language/en_gb.lang.php b/modules/Documents/language/en_gb.lang.php new file mode 100644 index 0000000..c9c24de --- /dev/null +++ b/modules/Documents/language/en_gb.lang.php @@ -0,0 +1,107 @@ + 'Documents', + 'LBL_MODULE_TITLE' => 'Documents: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Document Search', + 'LBL_LIST_FORM_TITLE' => 'Document List', + 'LBL_NEW_FORM_TITLE' => 'New Document', + 'LBL_LIST_SUBJECT' => 'Subject', + 'LBL_LIST_CONTACT_NAME' => 'Contact Name', + 'LBL_LIST_RELATED_TO' => 'Related To', + 'LBL_LIST_DATE_MODIFIED' => 'Last Modified', + 'LBL_NOTE' => 'Document:', + 'LBL_NOTE_SUBJECT' => 'Document Subject:', + 'LBL_CONTACT_NAME' => 'Contact Name:', + 'LBL_PHONE' => 'Phone:', + 'LBL_SUBJECT' => 'Subject:', + 'LBL_CLOSE' => 'Close:', + 'LBL_RELATED_TO' => 'Related To:', + 'LBL_EMAIL_ADDRESS' => 'Email Address:', + 'LBL_COLON' => ':', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the record', + 'LBL_LIST_FILENAME' => 'File Name', + 'LBL_FILENAME' => 'Attachment:', + 'LBL_NOTE_INFORMATION' => 'Basic Information', + 'File Information' => 'File Information', + 'LBL_TOOL_FORM_TITLE' => 'Documents Tools', + 'Contact Name' => 'Contact Name', + 'Related To' => 'Related to', + 'Subject' => 'Subject', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Document' => 'Document', + 'Note' => 'Notes', + 'Last Modified' => 'Last Modified', + 'File' => 'File', + 'LBL_ALL' => 'All', + 'Title' => 'Title', + 'LBL_FILE_INFORMATION' => 'File Information', + 'LBL_FILE_NAME' => 'File Name', + 'LBL_FILE_TYPE' => 'File Type', + 'LBL_FILE_SIZE' => 'Size', + 'filelocationtype' => 'Download Type', + 'fileversion' => 'Version', + 'filestatus' => 'Active', + 'filedownloadcount' => 'Download Count', + 'os' => 'Platform', + 'LBL_FOLDER_NAME' => 'Folder Name', + 'LBL_DOWNLOAD_TYPE' => 'Download Type', + 'LBL_INTERNAL' => 'Internal', + 'LBL_EXTERNAL' => 'External', + 'LBL_EXTERNAL_FILE_NAME' => 'File Name', + 'LBL_FILE_LOCATION' => 'File Location', + 'LBL_PD' => 'Platform Dependent', + 'LBL_PIND' => 'Platform Independent', + 'ChoosePlatform' => 'Choose Platform', + 'LBL_ACTIVE' => 'Active', + 'LBL_INACTIVE' => 'Inactive', + 'LBL_UPLOAD_BUTTON' => 'Upload', + 'architecture' => 'Architecture', + 'LBL_DOWNLOAD_FILE' => 'Download file', + 'LBL_CHECK_INTEGRITY' => 'Check file integrity', + 'LBL_EMAIL_FILE' => 'Email file as attachment', + 'LBL_CLICK_HERE' => 'Click here', + 'LBL_TO_ADD_FOLDER' => 'to add a new folder.', + 'LBL_DELETE_FOLDER' => 'Delete Folder', + 'LBL_FOLDER_DESC' => 'Description', + 'LBL_ADD_NEW_FOLDER' => 'Add Folder', + 'LBL_DELETE_DOCUMENTS' => 'Delete Document(s)', + 'LBL_MOVE_TO' => 'Move to', + 'File Name' => 'File Name', + 'File Type' => 'File Type', + 'File Size' => 'Size', + 'LBL_URL' => 'URL', + 'LBL_EXTERNAL_LNK' => 'External Link', + 'LBL_PLATFORM_INDEPENDENT' => 'Platform Independent', + 'LNK_DOWNLOAD' => 'download', + 'LBL_MOVE_DOCUMENTS' => 'Move Document(s)', + 'LBL_MOVE' => 'Move', + 'Download Type' => 'Download Type', + 'Version' => 'Version', + 'Active' => 'Active', + 'Download Count' => 'Download Count', + 'Platform' => 'Platform', + 'Assigned To' => 'Assigned To', + 'Note No' => 'Document No.', + 'LBL_EMPTY_FOLDERS' => 'Empty Folders', + 'LBL_VIEW_EMPTY_FOLDERS' => 'View Empty Folders', + 'LBL_NO_DOCUMENTS' => 'No Documents', + 'LBL_DESCRIPTION' => 'Description', + 'FILE_HAS_NO_DATA' => 'The selected file has no data or a invalid file', + 'LBL_MAXIMUM_20' => 'Maximum 20', + 'LBL_MAXIMUM_50' => 'Maximum 50', + 'Folder Name' => 'Folder Name', + 'Document No' => 'Document No.', + 'Documents' => 'Documents', + 'Documents ID' => 'Documents ID', +); +?> \ No newline at end of file diff --git a/modules/Documents/language/en_us.lang.php b/modules/Documents/language/en_us.lang.php new file mode 100644 index 0000000..5c7bd33 --- /dev/null +++ b/modules/Documents/language/en_us.lang.php @@ -0,0 +1,145 @@ +'Documents', +'LBL_MODULE_TITLE'=>'Documents: Home', +'LBL_SEARCH_FORM_TITLE'=>'Document Search', +'LBL_LIST_FORM_TITLE'=>'Document List', +'LBL_NEW_FORM_TITLE'=>'New Document', + +'LBL_LIST_SUBJECT'=>'Subject', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_LIST_RELATED_TO'=>'Related To', +'LBL_LIST_DATE_MODIFIED'=>'Last Modified', + +'LBL_NOTE'=>'Document:', +'LBL_NOTE_SUBJECT'=>'Document Subject:', +'LBL_CONTACT_NAME'=>'Contact Name:', +'LBL_PHONE'=>'Phone:', +'LBL_SUBJECT'=>'Subject:', +'LBL_CLOSE'=>'Close:', +'LBL_RELATED_TO'=>'Related To:', +'LBL_EMAIL_ADDRESS'=>'Email Address:', +'LBL_COLON'=>':', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", +'LBL_LIST_FILENAME'=>"File Name", + +// Added for Note(3.2-patch 3) + +'LBL_FILENAME'=>'Attachment:', +'LBL_NOTE_INFORMATION'=>'Basic Information', +'File Information'=>'File Information', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Documents Tools', +// Added for 4GA +'Contact Name'=>'Contact Name', +'Related To'=>'Related to', +'Subject'=>'Subject', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Document'=>'Document', +'Note'=>'Notes', +//Added for 4.2 Release -- CustomView +'Related to'=>'Related to', +'Last Modified'=>'Last Modified', +'File'=>'File', +'LBL_ALL'=>'All', +'Title'=>'Title', + +//Added after 504 for Downloads Module +'LBL_FILE_INFORMATION'=>'File Information', +'LBL_FILE_NAME'=>'File Name', +'LBL_FILE_TYPE'=>'File Type', +'LBL_FILE_SIZE'=>'Size', +'filelocationtype'=>'Download Type', +'fileversion'=>'Version', +'filestatus'=>'Active', +'filedownloadcount'=>'Download Count', +'os'=>'Platform', +'LBL_FOLDER_NAME'=>'Folder Name', +'LBL_DOWNLOAD_TYPE'=>'Download Type', +'LBL_INTERNAL'=>'Internal', +'LBL_EXTERNAL'=>'External', +'LBL_EXTERNAL_FILE_NAME'=>'File Name', +'LBL_FILE_LOCATION'=>'File Location', +'LBL_PD'=>'Platform Dependent', +'LBL_PIND'=>'Platform Independent', +'ChoosePlatform'=>'Choose Platform', +'LBL_ACTIVE'=>'Active', +'LBL_INACTIVE'=>'Inactive', +'LBL_UPLOAD_BUTTON'=>'Upload', +'architecture'=>'Architecture', +'LBL_DOWNLOAD_FILE'=>'Download file', +'LBL_CHECK_INTEGRITY'=>'Check file integrity', +'LBL_EMAIL_FILE'=>'Email file as attachment', +'LBL_CLICK_HERE'=>'Click here', +'LBL_TO_ADD_FOLDER'=>'to add a new folder.', +'LBL_DELETE_FOLDER'=>'Delete Folder', +'LBL_FOLDER_DESC'=>'Description', +'LBL_ADD_NEW_FOLDER'=>'Add Folder', +'LBL_DELETE_DOCUMENTS'=>'Delete Document(s)', +'LBL_MOVE_TO'=>'Move to', +'File Name'=>'File Name', +'File Type'=>'File Type', +'File Size'=>'Size', +'LBL_INTERNAL'=>'Internal', +'LBL_URL'=>'URL', +'LBL_EXTERNAL'=>'External', +'LBL_EXTERNAL_LNK'=>'External Link', +'LBL_ACTIVE'=>'Active', +'LBL_INACTIVE'=>'Inactive', +'LBL_PLATFORM_INDEPENDENT'=>'Platform Independent', +'LNK_DOWNLOAD'=>'download', +'LBL_MOVE_DOCUMENTS'=>'Move Document(s)', +'LBL_MOVE'=>'Move', +'Download Type'=>'Download Type', +'Version'=>'Version', +'Active'=>'Active', +'Download Count'=>'Download Count', +'Platform'=>'Platform', +'Assigned To'=>'Assigned To', +// Module Sequence Numbering +'Note No' => 'Document No', +// END + +// Documents module +'LBL_EMPTY_FOLDERS' => 'Empty Folders', +'LBL_VIEW_EMPTY_FOLDERS' => 'View Empty Folders', +'LBL_NO_DOCUMENTS' => 'No Documents', +'LBL_DESCRIPTION' => 'Description', +'FILE_HAS_NO_DATA'=>'The selected file has no data or a invalid file', + +'LBL_MAXIMUM_20'=>'Maximum 20', +'LBL_MAXIMUM_50'=>'Maximum 50', + +// Added after 5.1.0 GA +'Folder Name'=>'Folder Name', +'Document No'=>'Document No', + +'Documents' => 'Documents', +'Documents ID' => 'Documents ID', +); + +?> diff --git a/modules/Documents/language/es_es.lang.php b/modules/Documents/language/es_es.lang.php new file mode 100644 index 0000000..d08b08d --- /dev/null +++ b/modules/Documents/language/es_es.lang.php @@ -0,0 +1,144 @@ +'Documentos', +'LBL_MODULE_TITLE'=>'Documentos: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Documentos', +'LBL_LIST_FORM_TITLE'=>'Lista de Documentos', +'LBL_NEW_FORM_TITLE'=>'Nuevo Documento', + +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_CONTACT_NAME'=>'Nombre del Contacto', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DATE_MODIFIED'=>'Última Modificación', + +'LBL_NOTE'=>'Documento:', +'LBL_NOTE_SUBJECT'=>'Asunto del Documento:', +'LBL_CONTACT_NAME'=>'Nombre del Contacto:', +'LBL_PHONE'=>'Teléfono:', +'LBL_SUBJECT'=>'Asunto:', +'LBL_CLOSE'=>'Cerrar:', +'LBL_RELATED_TO'=>'Relacionado con:', +'LBL_EMAIL_ADDRESS'=>'Dirección de Email:', +'LBL_COLON'=>':', + +'ERR_DELETE_RECORD'=>"Debe especificar un registro para eliminar la cuenta.", +'LBL_LIST_FILENAME'=>"Nombre Archivo", + +// Added for Note(3.2-patch 3) + +'LBL_FILENAME'=>'Adjunto:', +'LBL_NOTE_INFORMATION'=>'Información Básica', +'File Information'=>'Información Archivo', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Documento', +// Added for 4GA +'Contact Name'=>'Nombre del Contacto', +'Related To'=>'Relacionado con', +'Subject'=>'Asunto', +'Created Time'=>'Fecha de Alta', +'Modified Time'=>'Última Modificación', +'Document'=>'Documento', +'Note'=>'Notas', +//Added for 4.2 Release -- CustomView +'Related to'=>'Relacionado con', +'Last Modified'=>'Última Modificación', +'File'=>'Archivo', +'LBL_ALL'=>'Todo', +'Title'=>' Asunto', + +//Added after 504 for Downloads Module +'LBL_FILE_INFORMATION'=>'Información Fichero', +'LBL_FILE_NAME'=>'Nombre Fichero', +'LBL_FILE_TYPE'=>'Tipo Fichero', +'LBL_FILE_SIZE'=>'Tamaño', +'filelocationtype'=>'Tipo Descarga', +'fileversion'=>'Versión', +'filestatus'=>'Activo', +'filedownloadcount'=>'Número Descargas', +'os'=>'Plataforma', +'LBL_FOLDER_NAME'=>'Nombre Carpeta', +'LBL_DOWNLOAD_TYPE'=>'Tipo Descarga', +'LBL_INTERNAL'=>'Interno', +'LBL_EXTERNAL'=>'Externo', +'Internal'=>'Interno', +'External'=>'Externo', +'LBL_EXTERNAL_FILE_NAME'=>'Nombre Fichero', +'LBL_FILE_LOCATION'=>'Ubicación Fichero', +'LBL_PD'=>'Dependiente Plataforma', +'LBL_PIND'=>'Independiente Plataforma', +'ChoosePlatform'=>'Elija Plataforma', +'LBL_ACTIVE'=>'Activo', +'LBL_INACTIVE'=>'Inactivo', +'LBL_UPLOAD_BUTTON'=>'Subir', +'architecture'=>'Arquitectura', +'LBL_DOWNLOAD_FILE'=>'Descargar fichero', +'LBL_CHECK_INTEGRITY'=>'Comprobar integridad fichero', +'LBL_EMAIL_FILE'=>'Mandar fichero por Email', +'LBL_CLICK_HERE'=>'Haz Click aquí', +'LBL_TO_ADD_FOLDER'=>'para añadir una nueva carpeta.', +'LBL_DELETE_FOLDER'=>'Eliminar Carpeta', +'LBL_FOLDER_DESC'=>'Descripción', +'LBL_ADD_NEW_FOLDER'=>'Añadir Carpeta', +'LBL_DELETE_DOCUMENTS'=>'Eliminar Documento(s)', +'LBL_MOVE_TO'=>'Mover a', +'File Name'=>'Nombre Fichero', +'File Type'=>'Tipo Fichero', +'File Size'=>'Tamaño', +'LBL_INTERNAL'=>'Interno', +'LBL_URL'=>'URL', +'LBL_EXTERNAL'=>'Externo', +'LBL_EXTERNAL_LNK'=>'Enlace Externo', +'LBL_ACTIVE'=>'Activo', +'LBL_INACTIVE'=>'Inactivo', +'LBL_PLATFORM_INDEPENDENT'=>'Independiente Plataforma', +'LNK_DOWNLOAD'=>'descarga', +'LBL_MOVE_DOCUMENTS'=>'Mover Documento(s)', +'LBL_MOVE'=>'Mover', +'Download Type'=>'Tipo Descarga', +'Version'=>'Versión', +'Active'=>'Activo', +'Download Count'=>'Número Descargas', +'Platform'=>'Plataforma', +'Assigned To'=>'Asignado a', +// Module Sequence Numbering +'Note No' => 'Núm. Documento', +// END + +// Documents module +'LBL_EMPTY_FOLDERS' => 'Carpetas Vacías', +'LBL_VIEW_EMPTY_FOLDERS' => 'Ver Carpetas Vacías', +'LBL_NO_DOCUMENTS' => 'Sin Documentos', +'LBL_DESCRIPTION' => 'Descripción', +'FILE_HAS_NO_DATA'=>'El fichero seleccionado no contiene información o es inválido', + +'LBL_MAXIMUM_20'=>'Máximo 20', +'LBL_MAXIMUM_50'=>'Máximo 50', + +'Document No'=>'Número Documento', +'Folder Name'=>"Nombre de carpeta", +'Documents' => 'Documentos', +'Documents ID'=>'Id Documento', +); + +?> diff --git a/modules/Documents/language/es_mx.lang.php b/modules/Documents/language/es_mx.lang.php new file mode 100644 index 0000000..e1040c4 --- /dev/null +++ b/modules/Documents/language/es_mx.lang.php @@ -0,0 +1,144 @@ +'Documentos', +'LBL_MODULE_TITLE'=>'Documentos: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Documentos', +'LBL_LIST_FORM_TITLE'=>'Lista de Documentos', +'LBL_NEW_FORM_TITLE'=>'Nuevo Documento', + +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_CONTACT_NAME'=>'Nombre del Contacto', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DATE_MODIFIED'=>'Última Modificación', + +'LBL_NOTE'=>'Documento:', +'LBL_NOTE_SUBJECT'=>'Asunto del Documento:', +'LBL_CONTACT_NAME'=>'Nombre del Contacto:', +'LBL_PHONE'=>'Teléfono:', +'LBL_SUBJECT'=>'Asunto:', +'LBL_CLOSE'=>'Cerrar:', +'LBL_RELATED_TO'=>'Relacionado con:', +'LBL_EMAIL_ADDRESS'=>'Dirección de Email:', +'LBL_COLON'=>':', + +'ERR_DELETE_RECORD'=>"Debe especificar un registro para eliminar la cuenta.", +'LBL_LIST_FILENAME'=>"Nombre Archivo", + +// Added for Note(3.2-patch 3) + +'LBL_FILENAME'=>'Adjunto:', +'LBL_NOTE_INFORMATION'=>'Información Básica', +'File Information'=>'Información Archivo', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Documentos', +// Added for 4GA +'Contact Name'=>'Nombre del Contacto', +'Related To'=>'Relacionado con', +'Subject'=>'Asunto', +'Created Time'=>'Fecha de Alta', +'Modified Time'=>'Última Modificación', +'Document'=>'Documento', +'Note'=>'Notas', +//Added for 4.2 Release -- CustomView +'Related to'=>'Relacionado con', +'Last Modified'=>'Última Modificación', +'File'=>'Archivo', +'LBL_ALL'=>'Todo', +'Title'=>' Asunto', + +//Added after 504 for Downloads Module +'LBL_FILE_INFORMATION'=>'Información Archivo', +'LBL_FILE_NAME'=>'Nombre Archivo', +'LBL_FILE_TYPE'=>'Tipo Archivo', +'LBL_FILE_SIZE'=>'Tamaño', +'filelocationtype'=>'Tipo Descarga', +'fileversion'=>'Versión', +'filestatus'=>'Activo', +'filedownloadcount'=>'Número de Descargas', +'os'=>'Plataforma', +'LBL_FOLDER_NAME'=>'Nombre Carpeta', +'LBL_DOWNLOAD_TYPE'=>'Tipo Descarga', +'LBL_INTERNAL'=>'Interno', +'LBL_EXTERNAL'=>'Externo', +'Internal'=>'Interno', +'External'=>'Externo', +'LBL_EXTERNAL_FILE_NAME'=>'Nombre Archivo', +'LBL_FILE_LOCATION'=>'Ubicación Archivo', +'LBL_PD'=>'Dependiente Plataforma', +'LBL_PIND'=>'Independiente Plataforma', +'ChoosePlatform'=>'Elija Plataforma', +'LBL_ACTIVE'=>'Activo', +'LBL_INACTIVE'=>'Inactivo', +'LBL_UPLOAD_BUTTON'=>'Subir', +'architecture'=>'Arquitectura', +'LBL_DOWNLOAD_FILE'=>'Descargar archivo', +'LBL_CHECK_INTEGRITY'=>'Comprobar integridad archivo', +'LBL_EMAIL_FILE'=>'Enviar archivo por Email', +'LBL_CLICK_HERE'=>'Haz Click aquí', +'LBL_TO_ADD_FOLDER'=>'para agregar una nueva carpeta.', +'LBL_DELETE_FOLDER'=>'Eliminar Carpeta', +'LBL_FOLDER_DESC'=>'Descripción', +'LBL_ADD_NEW_FOLDER'=>'Agregar Carpeta', +'LBL_DELETE_DOCUMENTS'=>'Eliminar Documento(s)', +'LBL_MOVE_TO'=>'Mover a', +'File Name'=>'Nombre Archivo', +'File Type'=>'Tipo Archivo', +'File Size'=>'Tamaño', +'LBL_INTERNAL'=>'Interno', +'LBL_URL'=>'URL', +'LBL_EXTERNAL'=>'Externo', +'LBL_EXTERNAL_LNK'=>'Enlace Externo', +'LBL_ACTIVE'=>'Activo', +'LBL_INACTIVE'=>'Inactivo', +'LBL_PLATFORM_INDEPENDENT'=>'Plataforma Independiente', +'LNK_DOWNLOAD'=>'descarga', +'LBL_MOVE_DOCUMENTS'=>'Mover Documento(s)', +'LBL_MOVE'=>'Mover', +'Download Type'=>'Tipo Descarga', +'Version'=>'Versión', +'Active'=>'Activo', +'Download Count'=>'Número Descargas', +'Platform'=>'Plataforma', +'Assigned To'=>'Asignado a', +// Module Sequence Numbering +'Note No' => 'Núm. Documento', +// END + +// Documents module +'LBL_EMPTY_FOLDERS' => 'Carpetas Vacías', +'LBL_VIEW_EMPTY_FOLDERS' => 'Ver Carpetas Vacías', +'LBL_NO_DOCUMENTS' => 'Sin Documentos', +'LBL_DESCRIPTION' => 'Descripción', +'FILE_HAS_NO_DATA'=>'El archivo seleccionado no contiene información o es inválido', + +'LBL_MAXIMUM_20'=>'Máximo 20', +'LBL_MAXIMUM_50'=>'Máximo 50', + +'Document No'=>'Número Documento', +'Folder Name'=>"Nombre de carpeta", +'Documents' => 'Documentos', +'Documents ID'=>'Id Documento', +); + +?> diff --git a/modules/Documents/language/fr_fr.lang.php b/modules/Documents/language/fr_fr.lang.php new file mode 100644 index 0000000..dcd72bf --- /dev/null +++ b/modules/Documents/language/fr_fr.lang.php @@ -0,0 +1,124 @@ +'Documents', + 'LBL_MODULE_TITLE'=>'Documents: accueil', + 'LBL_SEARCH_FORM_TITLE'=>'Rechercher document', + 'LBL_LIST_FORM_TITLE'=>'Liste des documents', + 'LBL_NEW_FORM_TITLE'=>'Nouveau document', + 'LBL_LAST_MODIFIED' => 'Modifié le', + 'Last Modified' => 'Modifié le', + 'LBL_LIST_SUBJECT'=>'Sujet', + 'LBL_LIST_CONTACT_NAME'=>'Nom du contact', + 'LBL_LIST_RELATED_TO'=>'Lié à', + 'LBL_LIST_DATE_MODIFIED'=>'Date de dernière modification', + + 'LBL_NOTE'=>'Document:', + 'LBL_NOTE_SUBJECT'=>'Sujet du document', + 'LBL_CONTACT_NAME'=>'Nom du contact', + 'LBL_PHONE'=>'Téléphone', + 'LBL_SUBJECT'=>'Sujet', + 'LBL_CLOSE'=>'Fermer', + 'LBL_RELATED_TO'=>'Lié à', + 'LBL_EMAIL_ADDRESS'=>'Adresse mail', + 'LBL_COLON'=>':', + + 'ERR_DELETE_RECORD'=>"Un numéro d'enregistrement doit être spécifié pour supprimer un compte", + 'LBL_LIST_FILENAME'=>"Fichier", + 'LBL_FILENAME'=>'Pièce jointe', + 'LBL_NOTE_INFORMATION'=>'Information document', + 'File Information'=>'Informations du fichier', + + 'LBL_TOOL_FORM_TITLE'=>'Outils documents', + 'Contact Name'=>'Nom du contact', + 'Related To'=>'Lié à', + 'Subject'=>'Sujet', + 'Created Time'=>'Créé le', + 'Modified Time'=>'Modifié le', + 'Document'=>'Document', + 'Note'=>'Notes', + + 'Related to'=>'Lié à', + 'Last Modified'=>'Date de dernière modification', + 'File'=>'Fichier', + 'LBL_ALL'=>'Tous', + 'Title'=>'Titre', + + 'LBL_FILE_INFORMATION'=>'Information fichier', + 'LBL_FILE_NAME'=>'Nom du fichier', + 'LBL_FILE_TYPE'=>'Type du fichier', + 'LBL_FILE_SIZE'=>'taille', + 'filelocationtype'=>'Type de téléchargement', + 'fileversion'=>'Version', + 'filestatus'=>'Actif', + 'filedownloadcount'=>'Compteur de téléchargement', + 'os'=>'Platforme', + 'LBL_FOLDER_NAME'=>'Répertoire', + 'Folder Name' => 'Répertoire', + 'LBL_DOWNLOAD_TYPE'=>'Type de téléchargement', + 'LBL_INTERNAL'=>'Interne', + 'LBL_EXTERNAL'=>'Externe', + 'LBL_EXTERNAL_FILE_NAME'=>'Nom du fichier', + 'LBL_FILE_LOCATION'=>'Emplacement du fichier', + 'LBL_PD'=>'Dépendant de la plateforme', + 'LBL_PIND'=>'Indépendant de la plateforme', + 'ChoosePlatform'=>'Sélectionnez une plateforme', + 'LBL_ACTIVE'=>'Actif', + 'LBL_INACTIVE'=>'Inactif', + 'LBL_UPLOAD_BUTTON'=>'Envoyer', + 'architecture'=>'Architecture', + 'LBL_DOWNLOAD_FILE'=>'Télécharger le fichier', + 'LBL_CHECK_INTEGRITY'=>'Contrôler l\'intégrité du fichier', + 'LBL_EMAIL_FILE'=>'Envoyer le fichier par mail', + 'LBL_CLICK_HERE'=>'Cliquez ici', + 'LBL_TO_ADD_FOLDER'=>'pour ajouter un nouveau dossier.', + 'LBL_DELETE_FOLDER'=>'Supprimer le dossier', + 'LBL_FOLDER_DESC'=>'Description', + 'LBL_ADD_NEW_FOLDER'=>'Ajouter un dossier', + 'LBL_DELETE_DOCUMENTS'=>'Delete Document(s)', + 'LBL_MOVE_TO'=>'Déplacer vers', + 'File Name'=>'Nom du fichier', + 'File Type'=>'Type du fichier', + 'File Size'=>'Taille', + 'LBL_INTERNAL'=>'Interne', + 'LBL_URL'=>'url', + 'LBL_EXTERNAL'=>'Externe', + 'LBL_EXTERNAL_LNK'=>'Lien externe', + 'LBL_ACTIVE'=>'Actif', + 'LBL_INACTIVE'=>'Inactif', + 'LBL_PLATFORM_INDEPENDENT'=>'Indépendant de la plateforme', + 'LNK_DOWNLOAD'=>'Télécharger', + 'LBL_MOVE_DOCUMENTS'=>'Déplacer le(s) document(s)', + 'LBL_MOVE'=>'Déplacer', + 'Download Type'=>'Type de téléchargement', + 'Version'=>'Version', + 'Active'=>'Actif', + 'Download Count'=>'Compteur de téléchargement', + 'Platform'=>'Platforme', + 'Assigned To'=>'Assigné à', + 'Note No' => 'Document N°', + + 'LBL_EMPTY_FOLDERS' => 'Répertoires vides', + 'LBL_VIEW_EMPTY_FOLDERS' => 'Voir les répertoires vides', + 'LBL_NO_DOCUMENTS' => 'Aucun Documents', + 'LBL_DESCRIPTION' => 'Description', + 'FILE_HAS_NO_DATA'=>'Le fichier sé est invalide ou vide', + + 'LBL_MAXIMUM_20'=>'Maximum 20', + 'LBL_MAXIMUM_50'=>'Maximum 50', + + 'External' => 'Externe', + 'Internal' => 'Interne', + + 'Documents' => 'Documents', + 'Documents ID' => 'Documents ID', +); + +?> \ No newline at end of file diff --git a/modules/Documents/language/hu_hu.lang.php b/modules/Documents/language/hu_hu.lang.php new file mode 100644 index 0000000..10d3cda --- /dev/null +++ b/modules/Documents/language/hu_hu.lang.php @@ -0,0 +1,115 @@ + 'Dokumentumok', + 'LBL_MODULE_TITLE' => 'Dokumentumok: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Dokumentumok Keresés', + 'LBL_LIST_FORM_TITLE' => 'Dokumentum Lista', + 'LBL_NEW_FORM_TITLE' => 'Új Dokumentum', + 'LBL_LIST_SUBJECT' => 'Tárgy', + 'LBL_LIST_CONTACT_NAME' => 'Kapcsolat neve', + 'LBL_LIST_RELATED_TO' => 'Kapcsolódik', + 'LBL_LIST_DATE_MODIFIED' => 'Utoljára Módosítva', + 'LBL_NOTE' => 'Dokumentum:', + 'LBL_NOTE_SUBJECT' => 'Dokumentum tárgya:', + 'LBL_CONTACT_NAME' => 'Kapcsolat neve:', + 'LBL_PHONE' => 'Telefon:', + 'LBL_SUBJECT' => 'Tárgy:', + 'LBL_CLOSE' => 'Lezárás:', + 'LBL_RELATED_TO' => 'Kapcsolódik hozzá:', + 'LBL_EMAIL_ADDRESS' => 'Email Cím:', + 'LBL_COLON' => ':', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a VTiger-fiók törléséhez', + 'LBL_LIST_FILENAME' => 'Fájlnév', + 'LBL_FILENAME' => 'Melléklet:', + 'LBL_NOTE_INFORMATION' => 'Dokumentum adatai', + 'File Information' => 'Fájl adatok', + 'LBL_TOOL_FORM_TITLE' => 'Dokumentumok Eszközök', + 'Contact Name' => 'Kapcsolat neve', + 'Related To' => 'Kapcsolódik', + 'Subject' => 'Tárgy', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Document' => 'Dokumentum', + 'Note' => 'Leírás:', + 'Last Modified' => 'Utoljára Módosítva', + 'File' => 'Fájl', + 'LBL_ALL' => 'Minden', + 'Title' => 'Megnevezés', + 'LBL_FILE_INFORMATION' => 'Fájl adatok', + 'LBL_FILE_NAME' => 'Fájlnév', + 'LBL_FILE_TYPE' => 'Fájl típus', + 'LBL_FILE_SIZE' => 'Méret', + 'filelocationtype' => 'Letöltés típusa', + 'fileversion' => 'Verzió', + 'filestatus' => 'Aktív', + 'filedownloadcount' => 'Letöltés száma', + 'os' => 'Platform', + 'LBL_FOLDER_NAME' => 'Mappa név', + 'LBL_DOWNLOAD_TYPE' => 'Letöltés típusa', + 'LBL_INTERNAL' => 'Belső', + 'LBL_EXTERNAL' => 'Külső', + 'LBL_EXTERNAL_FILE_NAME' => 'Fájlnév', + 'LBL_FILE_LOCATION' => 'Fájl helye', + 'LBL_PD' => 'Platform függő', + 'LBL_PIND' => 'Platform független', + 'ChoosePlatform' => 'Válassz Platformot', + 'LBL_ACTIVE' => 'Aktív', + 'LBL_INACTIVE' => 'Inaktív', + 'LBL_UPLOAD_BUTTON' => 'Feltöltés', + 'architecture' => 'Architektúra', + 'LBL_DOWNLOAD_FILE' => 'Fájl letöltése', + 'LBL_CHECK_INTEGRITY' => 'Fájl épségének ellenőrzése', + 'LBL_EMAIL_FILE' => 'Email mellékletként elküldi a fájlt', + 'LBL_CLICK_HERE' => 'Kattints ide', + 'LBL_TO_ADD_FOLDER' => 'új mappa hozzáadásához.', + 'LBL_DELETE_FOLDER' => 'Mappa Törlése', + 'LBL_FOLDER_DESC' => 'Leírás', + 'LBL_ADD_NEW_FOLDER' => 'Mappa Hozzáadása', + 'LBL_DELETE_DOCUMENTS' => 'Dokumentum(ok) Törlése', + 'LBL_MOVE_TO' => 'Mozgat', + 'File Name' => 'Fájlnév', + 'File Type' => 'Fájl típus', + 'File Size' => 'Méret', + 'LBL_URL' => 'URL', + 'LBL_EXTERNAL_LNK' => 'Külső hivatkozás', + 'LBL_PLATFORM_INDEPENDENT' => 'Platform független', + 'LNK_DOWNLOAD' => 'Letöltés', + 'LBL_MOVE_DOCUMENTS' => 'Dokumentum(ok) Mozgatása', + 'LBL_MOVE' => 'Mozgatás', + 'Download Type' => 'Letöltés típusa', + 'Version' => 'Verzió', + 'Active' => 'Aktív', + 'Download Count' => 'Letöltés száma', + 'Platform' => 'Platform', + 'Assigned To' => 'Felelős', + 'Note No' => 'Dokumentum No.', + 'LBL_EMPTY_FOLDERS' => 'Üres Mappák', + 'LBL_VIEW_EMPTY_FOLDERS' => 'Üres Mappák megtekintése', + 'LBL_NO_DOCUMENTS' => 'Nincs dokumentum', + 'LBL_DESCRIPTION' => 'Leírás', + 'FILE_HAS_NO_DATA' => 'A kiválasztott fájl sérült, vagy nem tartalmaz adatot', + 'LBL_MAXIMUM_20' => 'Maximum 20', + 'LBL_MAXIMUM_50' => 'Maximum 50', + 'Folder Name' => 'Mappa neve', + 'Document No' => 'Dokumentum No.', + 'Documents' => 'Dokumentumok', + 'Documents ID' => 'Dokumentumok AZ', + 'Internal' => 'Belső', + 'External' => 'Külső', + 'LBL_LAST_MODIFIED' => 'Utoljára módosítva' +); +?> \ No newline at end of file diff --git a/modules/Documents/language/nl_nl.lang.php b/modules/Documents/language/nl_nl.lang.php new file mode 100644 index 0000000..87e88d3 --- /dev/null +++ b/modules/Documents/language/nl_nl.lang.php @@ -0,0 +1,156 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.6 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Documents/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Documenten', +'LBL_MODULE_TITLE'=>'Documenten: Home', +'LBL_SEARCH_FORM_TITLE'=>'Documenten Zoeken', +'LBL_LIST_FORM_TITLE'=>'Documentenlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuw Document', + +'LBL_LIST_SUBJECT'=>'Onderwerp', +'LBL_LIST_CONTACT_NAME'=>'Contact Naam', +'LBL_LIST_RELATED_TO'=>'Gerelateerd aan', +'LBL_LIST_DATE_MODIFIED'=>'Laatst Gewijzigd', + +'LBL_NOTE'=>'Document:', +'LBL_NOTE_SUBJECT'=>'Document Onderwerp:', +'LBL_CONTACT_NAME'=>'Contact Naam:', +'LBL_PHONE'=>'Tel:', +'LBL_SUBJECT'=>'Onderwerp:', +'LBL_CLOSE'=>'Sluit:', +'LBL_RELATED_TO'=>'Gerelateerd aan:', +'LBL_EMAIL_ADDRESS'=>'E-mailadres:', +'LBL_COLON'=>':', + +'ERR_DELETE_RECORD'=>"Een geldig recordnummer moet worden opgegeven.", +'LBL_LIST_FILENAME'=>"Bestandsnaam", + +// Added for Note(3.2-patch 3) + +'LBL_FILENAME'=>'Bijlage:', +'LBL_NOTE_INFORMATION'=>'Standaard Informatie', +'File Information'=>'Bestandsinformatie', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Document Gereedschap', +// Added for 4GA +'Contact Name'=>'Contact Naam', +'Related To'=>'Gerelateerd aan', +'Subject'=>'Onderwerp', +'Created Time'=>'Aangemaakt', +'Modified Time'=>'Gewijzigd', +'Document'=>'Document', +'Note'=>'Notitie', +//Added for 4.2 Release -- CustomView +'Related to'=>'Gerelateerd aan', +'Last Modified'=>'Laatste wijziging', +'File'=>'Bestand', +'LBL_ALL'=>'Alle', +'Title'=>'Titel', + +//Added after 504 for Downloads Module +'LBL_FILE_INFORMATION'=>'Bestandsinformatie', +'LBL_FILE_NAME'=>'Bestandsnaam', +'LBL_FILE_TYPE'=>'Bestandstype', +'LBL_FILE_SIZE'=>'Grootte', +'filelocationtype'=>'Download Type', +'fileversion'=>'Versie', +'filestatus'=>'Actief', +'filedownloadcount'=>'Download Teller', +'os'=>'Platform', +'LBL_FOLDER_NAME'=>'Map Naam', +'LBL_DOWNLOAD_TYPE'=>'Download Soort', +'LBL_INTERNAL'=>'Intern', +'LBL_EXTERNAL'=>'Extern', +'LBL_EXTERNAL_FILE_NAME'=>'Bestandsnaam', +'LBL_FILE_LOCATION'=>'Bestandslocatie', +'LBL_PD'=>'Platform afhankelijk', +'LBL_PIND'=>'Platform onafhankelijk', +'ChoosePlatform'=>'Kies Platform', +'LBL_ACTIVE'=>'Actief', +'LBL_INACTIVE'=>'Inactief', +'LBL_UPLOAD_BUTTON'=>'Upload', +'architecture'=>'Architectuur', +'LBL_DOWNLOAD_FILE'=>'Download bestand', +'LBL_CHECK_INTEGRITY'=>'Controleer integriteit', +'LBL_EMAIL_FILE'=>'E-mail bestand als bijlage', +'LBL_CLICK_HERE'=>'Klik hier', +'LBL_TO_ADD_FOLDER'=>'om een nieuwe map te maken.', +'LBL_DELETE_FOLDER'=>'Verwijder map', +'LBL_FOLDER_DESC'=>'Omschrijving', +'LBL_ADD_NEW_FOLDER'=>'Maak map', +'LBL_DELETE_DOCUMENTS'=>'Verwijder Document(en)', +'LBL_MOVE_TO'=>'Verplaats naar', +'File Name'=>'Bestandsnaam', +'File Type'=>'Bestandstype', +'File Size'=>'Grootte', +'LBL_INTERNAL'=>'Intern', +'LBL_URL'=>'URL', +'LBL_EXTERNAL'=>'Extern', +'LBL_EXTERNAL_LNK'=>'Externe Link', +'LBL_ACTIVE'=>'Actief', +'LBL_INACTIVE'=>'Inactief', +'LBL_PLATFORM_INDEPENDENT'=>'Platform Onafhankelijk', +'LNK_DOWNLOAD'=>'download', +'LBL_MOVE_DOCUMENTS'=>'Verplaats Document(en)', +'LBL_MOVE'=>'Verplaats', +'Download Type'=>'Download Type', +'Version'=>'Versie', +'Active'=>'Actief', +'Download Count'=>'Download Teller', +'Platform'=>'Platform', +'Assigned To'=>'Toegewezen aan', +// Module Sequence Numbering +'Note No' => 'Document Nr', +// END + +// Documents module +'LBL_EMPTY_FOLDERS' => 'Lege mappen', +'LBL_VIEW_EMPTY_FOLDERS' => 'Bekijk Lege Mappen', +'LBL_NO_DOCUMENTS' => 'Geen Documenten', +'LBL_DESCRIPTION' => 'Omschrijving', +'FILE_HAS_NO_DATA'=>'Het geselecteerde bestand is leeg of is ongeldig', + +'LBL_MAXIMUM_20'=>'Maximum 20', +'LBL_MAXIMUM_50'=>'Maximum 50', + +// Added after 5.1.0 GA +'Folder Name'=>'Mapnaam', +'Document No'=>'Document Nr', + +'Documents' => 'Documenten', +); + + +?> diff --git a/modules/Documents/language/pt_br.lang.php b/modules/Documents/language/pt_br.lang.php new file mode 100644 index 0000000..413fb7b --- /dev/null +++ b/modules/Documents/language/pt_br.lang.php @@ -0,0 +1,145 @@ +'Documentos', +'LBL_MODULE_TITLE'=>'Documentos: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisar Documento', +'LBL_LIST_FORM_TITLE'=>'Listar Documento', +'LBL_NEW_FORM_TITLE'=>'Novo Documento', + +'LBL_LIST_SUBJECT'=>'Assunto', +'LBL_LIST_CONTACT_NAME'=>'Nome Contato', +'LBL_LIST_RELATED_TO'=>'Relacionado à', +'LBL_LIST_DATE_MODIFIED'=>'Última Modificação', + +'LBL_NOTE'=>'Documento:', +'LBL_NOTE_SUBJECT'=>'Assunto Documento:', +'LBL_CONTACT_NAME'=>'Nome Contato:', +'LBL_PHONE'=>'Telefone:', +'LBL_SUBJECT'=>'Assunto:', +'LBL_CLOSE'=>'Fechar:', +'LBL_RELATED_TO'=>'Relacionado à:', +'LBL_EMAIL_ADDRESS'=>'E-mail:', +'LBL_COLON'=>':', + +'ERR_DELETE_RECORD'=>"Defina um número de registro para deletar a vtiger_account.", +'LBL_LIST_FILENAME'=>"Arquivo", + +// Added for Note(3.2-patch 3) + +'LBL_FILENAME'=>'Anexo:', +'LBL_NOTE_INFORMATION'=>'Informação do Documento', +'File Information'=>'Informação do Arquivo', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Ferramentas Documento', +// Added for 4GA +'Contact Name'=>'Nome Contato', +'Related To'=>'Relacionado à', +'Subject'=>'Assunto', +'Created Time'=>'Data Criação', +'Modified Time'=>'Data Modificação', +'Document'=>'Documento', +'Note'=>'Notas', +//Added for 4.2 Release -- CustomView +'Related to'=>'Relacionado à', +'Last Modified'=>'Última Modificação', +'File'=>'Arquivo', +'LBL_ALL'=>'Todas', +'Title'=>'Título', + +//Added after 504 for Downloads Module +'LBL_FILE_INFORMATION'=>'Informação Arquivo', +'LBL_FILE_NAME'=>'Nome Arquivo', +'LBL_FILE_TYPE'=>'Tipo Arquivo', +'LBL_FILE_SIZE'=>'Tamanho', +'filelocationtype'=>'Tipo Download', +'fileversion'=>'Versão', +'filestatus'=>'Ativo', +'filedownloadcount'=>'Contar Download', +'os'=>'Plataforma', +'LBL_FOLDER_NAME'=>'Nome Pasta', +'LBL_DOWNLOAD_TYPE'=>'Tipo Download', +'LBL_INTERNAL'=>'Interno', +'LBL_EXTERNAL'=>'Externo', +'LBL_EXTERNAL_FILE_NAME'=>'Nome Arquivo', +'LBL_FILE_LOCATION'=>'Localização Arquivo', +'LBL_PD'=>'Plataforma Dependente', +'LBL_PIND'=>'Plataforma Independente', +'ChoosePlatform'=>'Escolha Plataforma', +'LBL_ACTIVE'=>'Ativo', +'LBL_INACTIVE'=>'Inativo', +'LBL_UPLOAD_BUTTON'=>'Transferir', +'architecture'=>'Arquitetura', +'LBL_DOWNLOAD_FILE'=>'Download Arquivo', +'LBL_CHECK_INTEGRITY'=>'Checar integridade arquivo', +'LBL_EMAIL_FILE'=>'Enviar Email com arquivo anexado', +'LBL_CLICK_HERE'=>'Clique aqui', +'LBL_TO_ADD_FOLDER'=>'para adicionar uma nova pasta.', +'LBL_DELETE_FOLDER'=>'Apagar Pasta', +'LBL_FOLDER_DESC'=>'Descrição', +'LBL_ADD_NEW_FOLDER'=>'Adicionar Pasta', +'LBL_DELETE_DOCUMENTS'=>'Apagar Documento(s)', +'LBL_MOVE_TO'=>'Mover para', +'File Name'=>'Nome Arquivo', +'File Type'=>'Tipo Arquivo', +'File Size'=>'Tamanho', +'LBL_INTERNAL'=>'Interno', +'LBL_URL'=>'URL', +'LBL_EXTERNAL'=>'Externo', +'LBL_EXTERNAL_LNK'=>'Link Externo', +'LBL_ACTIVE'=>'Ativo', +'LBL_INACTIVE'=>'Inativo', +'LBL_PLATFORM_INDEPENDENT'=>'Plataforma Independente', +'LNK_DOWNLOAD'=>'download', +'LBL_MOVE_DOCUMENTS'=>'Mover Documento(s)', +'LBL_MOVE'=>'Mover', +'Download Type'=>'Tipo Download', +'Version'=>'Versão', +'Active'=>'Ativo', +'Download Count'=>'Contar Download', +'Platform'=>'Plataforma', +'Assigned To'=>'Atribuído à', +// Module Sequence Numbering +'Note No' => 'No. Documento', +// END + +// Documents module +'LBL_EMPTY_FOLDERS' => 'Pastas Vazias', +'LBL_VIEW_EMPTY_FOLDERS' => 'Visualizar Pastas Vazias', +'LBL_NO_DOCUMENTS' => 'Nenhum Documento', +'LBL_DESCRIPTION' => 'Descrição', +'FILE_HAS_NO_DATA'=>'O arquivo selecionado não possui dados ou o é inválido', + +'LBL_MAXIMUM_20'=>'Máximo 20', +'LBL_MAXIMUM_50'=>'Máximo 50', + +// Added after 5.1.0 GA +'Folder Name'=>'Nome Pasta', +'Document No'=>'No. Documento', + +'Documents' => 'Documentos', +'Documents ID' => 'ID Documentos', +); + +?> diff --git a/modules/Documents/language/zh_cn.lang.php b/modules/Documents/language/zh_cn.lang.php new file mode 100644 index 0000000..5c624a5 --- /dev/null +++ b/modules/Documents/language/zh_cn.lang.php @@ -0,0 +1,145 @@ +'文档', +'LBL_MODULE_TITLE'=>'文档: 首页', +'LBL_SEARCH_FORM_TITLE'=>'文档搜索', +'LBL_LIST_FORM_TITLE'=>'文档列表', +'LBL_NEW_FORM_TITLE'=>'新增文档', + +'LBL_LIST_SUBJECT'=>'主题', +'LBL_LIST_CONTACT_NAME'=>'联系人', +'LBL_LIST_RELATED_TO'=>'负责人', +'LBL_LIST_DATE_MODIFIED'=>'最后修改时间', + +'LBL_NOTE'=>'文档:', +'LBL_NOTE_SUBJECT'=>'文档主题:', +'LBL_CONTACT_NAME'=>'联系人:', +'LBL_PHONE'=>'电话:', +'LBL_SUBJECT'=>'主题:', +'LBL_CLOSE'=>'关闭:', +'LBL_RELATED_TO'=>'负责人:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_COLON'=>':', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", +'LBL_LIST_FILENAME'=>"附件", + +// Added for Note(3.2-patch 3) + +'LBL_FILENAME'=>'附件:', +'LBL_NOTE_INFORMATION'=>'基本信息', +'File Information'=>'附件信息', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'文档工具', +// Added for 4GA +'Contact Name'=>'联系人', +'Related To'=>'关联于', +'Subject'=>'主题', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', +'Document'=>'文档', +'Note'=>'描述', +//Added for 4.2 Release -- CustomView +'Related to'=>'负责人', +'Last Modified'=>'最后修改时间', +'File'=>'附件', +'LBL_ALL'=>'全部', +'Title'=>'标题', + +//Added after 504 for Downloads Module +'LBL_FILE_INFORMATION'=>'附件信息', +'LBL_FILE_NAME'=>'附件', +'LBL_FILE_TYPE'=>'文件类型', +'LBL_FILE_SIZE'=>'大小', +'filelocationtype'=>'下载类型', +'fileversion'=>'版本', +'filestatus'=>'启用', +'filedownloadcount'=>'下载次数', +'os'=>'适用平台', +'LBL_FOLDER_NAME'=>'文件夹名称', +'LBL_DOWNLOAD_TYPE'=>'下载类型', +'LBL_INTERNAL'=>'内部链接', +'LBL_EXTERNAL'=>'外部链接', +'LBL_EXTERNAL_FILE_NAME'=>'附件', +'LBL_FILE_LOCATION'=>'文件位置', +'LBL_PD'=>'平台相关', +'LBL_PIND'=>'跨平台', +'ChoosePlatform'=>'选择平台', +'LBL_ACTIVE'=>'启用', +'LBL_INACTIVE'=>'未启用', +'LBL_UPLOAD_BUTTON'=>'上传', +'architecture'=>'架构', +'LBL_DOWNLOAD_FILE'=>'下载附件', +'LBL_CHECK_INTEGRITY'=>'检查附件完整性', +'LBL_EMAIL_FILE'=>'把附近作为电子邮件附件发送', +'LBL_CLICK_HERE'=>'点击这里', +'LBL_TO_ADD_FOLDER'=>'添加文件夹.', +'LBL_DELETE_FOLDER'=>'删除文件夹', +'LBL_FOLDER_DESC'=>'描述', +'LBL_ADD_NEW_FOLDER'=>'添加文件夹', +'LBL_DELETE_DOCUMENTS'=>'删除文档', +'LBL_MOVE_TO'=>'移动到', +'File Name'=>'附件', +'File Type'=>'文件类型', +'File Size'=>'大小', +'LBL_INTERNAL'=>'内部', +'LBL_URL'=>'URL', +'LBL_EXTERNAL'=>'外部', +'LBL_EXTERNAL_LNK'=>'外部链接', +'LBL_ACTIVE'=>'启用', +'LBL_INACTIVE'=>'未启用', +'LBL_PLATFORM_INDEPENDENT'=>'跨平台', +'LNK_DOWNLOAD'=>'下载', +'LBL_MOVE_DOCUMENTS'=>'移动文档', +'LBL_MOVE'=>'移动', +'Download Type'=>'下载类型', +'Version'=>'版本', +'Active'=>'启用', +'Download Count'=>'下载次数', +'Platform'=>'平台', +'Assigned To'=>'负责人', +// Module Sequence Numbering +'Note No' => '文档编号', +// END + +// Documents module +'LBL_EMPTY_FOLDERS' => '空文件夹', +'LBL_VIEW_EMPTY_FOLDERS' => '查看空文件夹', +'LBL_NO_DOCUMENTS' => '没有文档', +'LBL_DESCRIPTION' => '详细信息', +'FILE_HAS_NO_DATA'=>'选择的文件没有数据或者不是有效的文件', + +'LBL_MAXIMUM_20'=>'字数限制 20', +'LBL_MAXIMUM_50'=>'字数限制 50', + +// Added after 5.1.0 GA +'Folder Name'=>'文件夹名称', +'Document No'=>'文档编号', +'Internal' => '内部文件', +'External' => '外部文件', +); + +?> diff --git a/modules/Emails/CallRelatedList.php b/modules/Emails/CallRelatedList.php new file mode 100644 index 0000000..5b04fa9 --- /dev/null +++ b/modules/Emails/CallRelatedList.php @@ -0,0 +1,66 @@ +retrieve_entity_info($RECORD,$currentmodule); + $focus->id = $RECORD; + $focus->name=$focus->column_fields['subject']; + $log->debug("id is ".$focus->id); + $log->debug("name is ".$focus->name); +} + +global $mod_strings; +global $app_strings; +global $currentModule; +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$smarty = new vtigerCRM_Smarty; + +if (isset($focus->name)) $smarty->assign("NAME", $focus->name); +$related_array=getRelatedLists($currentModule,$focus); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); +if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') { + $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode'])); +} +$smarty->assign("id",$focus->id); +$smarty->assign("RELATEDLISTS", $related_array); + +require_once('include/ListView/RelatedListViewSession.php'); +if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + $relationId = vtlib_purify($_REQUEST['relation_id']); + RelatedListViewSession::addRelatedModuleToSession($relationId, + vtlib_purify($_REQUEST['selected_header'])); + } +$open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); +$smarty->assign("SELECTEDHEADERS", $open_related_modules); + +$smarty->assign("ID",$RECORD ); +$smarty->assign("MODULE",$currentmodule); +$smarty->assign("SINGLE_MOD",$app_strings['Email']); +$smarty->assign("UPDATEINFO",updateInfo($focus->id)); +$smarty->assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +$smarty->display("RelatedLists.tpl"); +?> \ No newline at end of file diff --git a/modules/Emails/Choose.php b/modules/Emails/Choose.php new file mode 100644 index 0000000..98605f8 --- /dev/null +++ b/modules/Emails/Choose.php @@ -0,0 +1,82 @@ +pquery($querystr, array()); +$numrows = $adb->num_rows($result); + +?> +
+ +

The following emails are available for the selected record. Please choose the ones you would like to use.

+
+ + query_result($result,$i,'columnname'); + $temp1=br2nl($myfocus->column_fields[$temp]); + echo ''; + } + ?> + + + +
'.$adb->query_result($result,$i,'fieldlabel').'    '.$temp1.'
+ +
+
diff --git a/modules/Emails/ChooseEmail.php b/modules/Emails/ChooseEmail.php new file mode 100644 index 0000000..5ef825c --- /dev/null +++ b/modules/Emails/ChooseEmail.php @@ -0,0 +1,106 @@ +pquery($querystr, array()); +$numrows = $adb->num_rows($result); + +if ($pmodule=='Accounts') +{ + require_once('modules/Accounts/Accounts.php'); + $myfocus = new Accounts(); + $myfocus->retrieve_entity_info($entityid,"Accounts"); +} +elseif ($pmodule=='Contacts') +{ + require_once('modules/Contacts/Contacts.php'); + $myfocus = new Contacts(); + $myfocus->retrieve_entity_info($entityid,"Contacts"); +} +elseif ($pmodule=='Leads') +{ + require_once('modules/Leads/Leads.php'); + $myfocus = new Leads(); + $myfocus->retrieve_entity_info($entityid,"Leads"); +} +?> + + +
+

The following emails are available for the selected record. Please choose the ones you would like to use.

+
+ + query_result($result,$i,'columnname'); + $temp1=br2nl($myfocus->column_fields[$temp]); + echo ''; + } + ?> +
'.$adb->query_result($result,$i,'fieldlabel').'    '.$temp1.'
+ + +
+
diff --git a/modules/Emails/CustomView.php b/modules/Emails/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/Emails/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/Emails/Delete.php b/modules/Emails/Delete.php new file mode 100644 index 0000000..b8e17de --- /dev/null +++ b/modules/Emails/Delete.php @@ -0,0 +1,36 @@ + \ No newline at end of file diff --git a/modules/Emails/DetailView.php b/modules/Emails/DetailView.php new file mode 100644 index 0000000..f159ffd --- /dev/null +++ b/modules/Emails/DetailView.php @@ -0,0 +1,159 @@ +retrieve_entity_info($_REQUEST['record'],"Emails"); + $log->info("Entity info successfully retrieved for DetailView."); + $focus->id = $_REQUEST['record']; + $query = 'select email_flag,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid = ?'; + $result = $adb->pquery($query, array($focus->id)); + $smarty->assign('FROM_MAIL',$adb->query_result($result,0,'from_email')); + $to_email = $json->decode($adb->query_result($result,0,'to_email')); + $cc_email = $json->decode($adb->query_result($result,0,'cc_email')); + $smarty->assign('TO_MAIL',vt_suppressHTMLTags(@implode(',',$to_email))); + $smarty->assign('CC_MAIL',vt_suppressHTMLTags(@implode(',',$cc_email))); + $bcc_email = $json->decode($adb->query_result($result,0,'bcc_email')); + $smarty->assign('BCC_MAIL',vt_suppressHTMLTags(@implode(',',$bcc_email))); + $smarty->assign('EMAIL_FLAG',$adb->query_result($result,0,'email_flag')); + if($focus->column_fields['name'] != '') + $focus->name = $focus->column_fields['name']; + else + $focus->name = $focus->column_fields['subject']; +} +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') +{ + $focus->id = ""; +} + +//needed when creating a new email with default values passed in +if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) +{ + $focus->contact_name = $_REQUEST['contact_name']; +} +if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) +{ + $focus->contact_id = $_REQUEST['contact_id']; +} +if (isset($_REQUEST['opportunity_name']) && is_null($focus->parent_name)) +{ + $focus->parent_name = $_REQUEST['opportunity_name']; +} +if (isset($_REQUEST['opportunity_id']) && is_null($focus->parent_id)) +{ + $focus->parent_id = $_REQUEST['opportunity_id']; +} +if (isset($_REQUEST['account_name']) && is_null($focus->parent_name)) +{ + $focus->parent_name = $_REQUEST['account_name']; +} +if (isset($_REQUEST['account_id']) && is_null($focus->parent_id)) +{ + $focus->parent_id = $_REQUEST['account_id']; +} +if (isset($_REQUEST['parent_name'])) +{ + $focus->parent_name = $_REQUEST['parent_name']; +} +if (isset($_REQUEST['parent_id'])) +{ + $focus->parent_id = $_REQUEST['parent_id']; +} +if (isset($_REQUEST['parent_type'])) +{ + $focus->parent_type = $_REQUEST['parent_type']; +} +if (isset($_REQUEST['filename']) && is_null($focus->filename)) +{ + $focus->filename = $_REQUEST['filename']; +} +elseif (is_null($focus->parent_type)) +{ + $focus->parent_type = $app_list_strings['record_type_default_key']; +} + +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$log->info("Email detail view"); + +$submenu = array('LBL_EMAILS_TITLE'=>'index.php?module=Emails&action=index','LBL_WEBMAILS_TITLE'=>'index.php?module=squirrelmail-1.4.4&action=redirect'); +$sec_arr = array('index.php?module=Emails&action=index'=>'Emails','index.php?module=squirrelmail-1.4.4&action=redirect'=>'Emails'); + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); + +$smarty->assign("UPDATEINFO",updateInfo($focus->id)); +if (isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module'])); +if (isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action'])); +if (isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id'])); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + +if (isset($focus->name)) $smarty->assign("NAME", $focus->name); + else $smarty->assign("NAME", ""); + +$entries = getBlocks($currentModule,"detail_view",'',$focus->column_fields); +$entries[$mod_strings['LBL_EMAIL_INFORMATION']]['5'][$mod_strings['Description']]['value'] = from_html($entries[$mod_strings['LBL_EMAIL_INFORMATION']]['5'][$mod_strings['Description']]['value']); +//changed this to view description in all langauge - bharath +$smarty->assign("BLOCKS",$entries[$mod_strings['LBL_EMAIL_INFORMATION']]); +$smarty->assign("SINGLE_MOD", 'Email'); + +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +if(isPermitted("Emails","EditView",$_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + +if(isPermitted("Emails","Delete",$_REQUEST['record']) == 'yes') + $smarty->assign("DELETE","permitted"); +$smarty->assign("ID",$focus->id); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +//Constructing the Related Lists from here +$smarty->assign("MODULE",$currentModule); +$smarty->assign("SENDER",$email_id); +if($_REQUEST['mode'] != 'ajax') + $smarty->display("EmailDetailView.tpl"); +else + $smarty->display("EmailDetails.tpl") +?> \ No newline at end of file diff --git a/modules/Emails/EditView.php b/modules/Emails/EditView.php new file mode 100644 index 0000000..c21b351 --- /dev/null +++ b/modules/Emails/EditView.php @@ -0,0 +1,370 @@ +assign("UPLOADSIZE", $upload_maxsize/1000000); // Convert to MB +if($_REQUEST['upload_error'] == true) +{ + echo '
The selected file has no data or a invalid file.
'; +} + +//Email Error handling +if($_REQUEST['mail_error'] != '') +{ + require_once("modules/Emails/mail.php"); + echo parseEmailErrorString($_REQUEST['mail_error']); +} +//added to select the module in combobox of compose-popup +if(isset($_REQUEST['par_module']) && $_REQUEST['par_module']!=''){ + $smarty->assign('select_module',vtlib_purify($_REQUEST['par_module'])); +} +elseif(isset($_REQUEST['pmodule']) && $_REQUEST['pmodule']!='') { + $smarty->assign('select_module',vtlib_purify($_REQUEST['pmodule'])); +} + +if(isset($_REQUEST['record']) && $_REQUEST['record'] !='') +{ + $focus->id = $_REQUEST['record']; + $focus->mode = 'edit'; + $focus->retrieve_entity_info($_REQUEST['record'],"Emails"); + $query = 'select idlists,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid =?'; + $result = $adb->pquery($query, array($focus->id)); + $from_email = $adb->query_result($result,0,'from_email'); + $smarty->assign('FROM_MAIL',$from_email); + $to_email = implode(',',$json->decode($adb->query_result($result,0,'to_email'))); + $smarty->assign('TO_MAIL',$to_email); + $cc_add = implode(',',$json->decode($adb->query_result($result,0,'cc_email'))); + $smarty->assign('CC_MAIL',$cc_add); + $bcc_add = implode(',',$json->decode($adb->query_result($result,0,'bcc_email'))); + $smarty->assign('BCC_MAIL',$bcc_add); + $idlist = $adb->query_result($result,0,'idlists'); + $smarty->assign('IDLISTS',$idlist); + $log->info("Entity info successfully retrieved for EditView."); + $focus->name=$focus->column_fields['name']; +} +elseif(isset($_REQUEST['sendmail']) && $_REQUEST['sendmail'] !='') +{ + + $mailids = get_to_emailids($_REQUEST['pmodule']); + if($mailids['mailds'] != '') + $to_add = trim($mailids['mailds'],",").","; + $smarty->assign('TO_MAIL',$to_add); + $smarty->assign('IDLISTS',$mailids['idlists']); + $focus->mode = ''; +} + +// INTERNAL MAILER +if($_REQUEST["internal_mailer"] == "true") { + $smarty->assign('INT_MAILER',"true"); + $rec_type = $_REQUEST["type"]; + $rec_id = $_REQUEST["rec_id"]; + $fieldname = $_REQUEST["fieldname"]; + + //added for getting list-ids to compose email popup from list view(Accounts,Contacts,Leads) + if(isset($_REQUEST['field_id']) && strlen($_REQUEST['field_id']) != 0) { + if($_REQUEST['par_module'] == "Users") + $id_list = $_REQUEST['rec_id'].'@'.'-1|'; + else + $id_list = $_REQUEST['rec_id'].'@'.$_REQUEST['field_id'].'|'; + $smarty->assign("IDLISTS", $id_list); + } + if($rec_type == "record_id") { + $type = $_REQUEST['par_module']; + //check added for email link in user detail view + $normal_tabs = Array('Users'=>'vtiger_users', 'Leads'=>'vtiger_leaddetails', 'Contacts'=>'vtiger_contactdetails', 'Accounts'=>'vtiger_account', 'Vendors'=>'vtiger_vendor'); + $cf_tabs = Array('Accounts'=>'vtiger_accountscf', 'Campaigns'=>'vtiger_campaignscf', 'Contacts'=>'vtiger_contactscf', 'Invoice'=>'vtiger_invoicecf', 'Leads'=>'vtiger_leadscf', 'Potentials'=>'vtiger_potentialscf', 'Products'=>'vtiger_productcf', 'PurchaseOrder'=>'vtiger_purchaseordercf', 'Quotes'=>'vtiger_quotescf', 'SalesOrder'=>'vtiger_salesordercf', 'HelpDesk'=>'vtiger_ticketcf', 'Vendors'=>'vtiger_vendorcf'); + if(substr($fieldname,0,2)=="cf") + $tablename = $cf_tabs[$type]; + else + $tablename = $normal_tabs[$type]; + if($type == "Users") + $q = "select $fieldname from $tablename where id=?"; + elseif($type == "Leads") + $q = "select $fieldname from $tablename where leadid=?"; + elseif ($type == "Contacts") + $q = "select $fieldname from $tablename where contactid=?"; + elseif ($type == "Accounts") + $q = "select $fieldname from $tablename where accountid=?"; + elseif ($type == "Vendors") + $q = "select $fieldname from $tablename where vendorid=?"; + else { + // vtlib customization: Support for email-type custom field for other modules. + $module_focus = CRMEntity::getInstance($type); + vtlib_setup_modulevars($type, $module_focus); + if(!empty($module_focus->customFieldTable)) { + $q = "select $fieldname from " . $module_focus->customFieldTable[0] . " where " . $module_focus->customFieldTable[1]. "= ?"; + } + // END + } + $email1 = $adb->query_result($adb->pquery($q, array($rec_id)),0,$fieldname); + } elseif ($rec_type == "email_addy") { + $email1 = $_REQUEST["email_addy"]; + } + + $smarty->assign('TO_MAIL',trim($email1,",").","); +} + +//handled for replying emails +if($_REQUEST['reply'] == "true") +{ + $fromadd = $_REQUEST['record']; + $query = "select from_email,idlists,cc_email,bcc_email from vtiger_emaildetails where emailid =?"; + $result = $adb->pquery($query, array($fromadd)); + $from_mail = $adb->query_result($result,0,'from_email'); + $smarty->assign('TO_MAIL',trim($from_mail,",").','); + $cc_add = implode(',',$json->decode($adb->query_result($result,0,'cc_email'))); + $smarty->assign('CC_MAIL',$cc_add); + $bcc_add = implode(',',$json->decode($adb->query_result($result,0,'bcc_email'))); + $smarty->assign('BCC_MAIL',$bcc_add); + $smarty->assign('IDLISTS',preg_replace('/###/',',',$adb->query_result($result,0,'idlists'))); +} + +// Webmails +if(isset($_REQUEST["mailid"]) && $_REQUEST["mailid"] != "") { + $mailid = $_REQUEST["mailid"]; + $mailbox = $_REQUEST["mailbox"]; + require_once('include/utils/UserInfoUtil.php'); + require_once("modules/Webmails/Webmails.php"); + require_once("modules/Webmails/MailParse.php"); + require_once('modules/Webmails/MailBox.php'); + + $mailInfo = getMailServerInfo($current_user); + $temprow = $adb->fetch_array($mailInfo); + + $MailBox = new MailBox($mailbox); + $mbox = $MailBox->mbox; + + $webmail = new Webmails($mbox,$mailid); + $array_tab = Array(); + $webmail->loadMail($array_tab); + $hdr = @imap_headerinfo($mbox, $mailid); + $smarty->assign('WEBMAIL',"true"); + $smarty->assign('mailid',$mailid); + $smarty->assign('mailbox',$mailbox); + $temp_id = $MailBox->boxinfo['mail_id']; + $smarty->assign('from_add',$temp_id); + $webmail->subject = utf8_decode(utf8_encode(imap_utf8($webmail->subject))); + if($_REQUEST["reply"] == "all") { + $smarty->assign('TO_MAIL',$webmail->from.","); + //added to remove the emailid of webmail client from cc list....to fix the issue #3818 + $cc_address = ''; + + $use_to_header = htmlentities($webmail->to_header, ENT_QUOTES, $default_charset); + $use_cc_address= htmlentities($hdr->ccaddress, ENT_QUOTES, $default_charset); + + $cc_array = explode(',',$use_to_header.','.$use_cc_address); + for($i=0;$iassign('CC_MAIL',$cc_address); + // fix #3818 ends + /*if(is_array($webmail->cc_list)) + { + $smarty->assign('CC_MAIL',implode(",",$webmail->cc_list).",".implode(",",$webmail->to)); + } + else + { + //Commenting this to fix #3231 + // $smarty->assign('CC_MAIL',implode(",",$webmail->to)); + }*/ + if(preg_match("/RE:/i", $webmail->subject)) + $smarty->assign('SUBJECT',$webmail->subject); + else + $smarty->assign('SUBJECT',"RE: ".$webmail->subject); + + } elseif($_REQUEST["reply"] == "single"){ + $replyToInfo = $webmail->getReplyToInformation(); + if(!empty($replyToInfo)){ + $smarty->assign('TO_MAIL',$replyToInfo['name']."<".$webmail->reply_to[0].">".","); + $smarty->assign('IDLISTS',$replyToInfo['id'].'@'.$replyToInfo['fieldId'].'|'); + } + else + $smarty->assign('TO_MAIL',$replyToInfo['name']."<".$webmail->reply_to[0].">".","); + + //$smarty->assign('BCC_MAIL',$webmail->to[0]); + if(preg_match("/RE:/i", $webmail->subject)) + $smarty->assign('SUBJECT',$webmail->subject); + else + $smarty->assign('SUBJECT',"RE: ".$webmail->subject); + + } elseif($_REQUEST["forward"] == "true" ) { + //added for attachment handling + $attachment_links = Array(); + for($i=0;$iattname);$i++){ + $attachment_links[$i] = $webmail->anchor_arr[$i].decode_header($webmail->attname[$i])."
"; + } + $smarty->assign('webmail_attachments',$attachment_links); + if(preg_match("/FW:/i", $webmail->subject)) + $smarty->assign('SUBJECT',$webmail->subject); + else + $smarty->assign('SUBJECT',"FW: ".$webmail->subject); + } + $smarty->assign('DESCRIPTION',$webmail->replyBody()); + $focus->mode=''; +} + +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$disp_view = getView($focus->mode); +$details = getBlocks($currentModule,$disp_view,$mode,$focus->column_fields); +//changed this below line to view description in all language - bharath +$smarty->assign("BLOCKS",$details[$mod_strings['LBL_EMAIL_INFORMATION']]); +$smarty->assign("MODULE",$currentModule); +$smarty->assign("SINGLE_MOD",$app_strings['Email']); +//id list of attachments while forwarding +$smarty->assign("ATT_ID_LIST",$att_id_list); + +//needed when creating a new email with default values passed in +if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) +{ + $focus->contact_name = vtlib_purify($_REQUEST['contact_name']); +} +if (isset($_REQUEST['contact_id']) && is_null($focus->contact_id)) +{ + $focus->contact_id = vtlib_purify($_REQUEST['contact_id']); +} +if (isset($_REQUEST['parent_name']) && is_null($focus->parent_name)) +{ + $focus->parent_name = vtlib_purify($_REQUEST['parent_name']); +} +if (isset($_REQUEST['parent_id']) && is_null($focus->parent_id)) +{ + $focus->parent_id = vtlib_purify($_REQUEST['parent_id']); +} +if (isset($_REQUEST['parent_type'])) +{ + $focus->parent_type = vtlib_purify($_REQUEST['parent_type']); +} +if (isset($_REQUEST['filename']) && $_REQUEST['isDuplicate'] != 'true') +{ + $focus->filename = vtlib_purify($_REQUEST['filename']); +} +elseif (is_null($focus->parent_type)) +{ + $focus->parent_type = $app_list_strings['record_type_default_key']; +} + +$log->info("Email detail view"); + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +if (isset($focus->name)) $smarty->assign("NAME", $focus->name); +else $smarty->assign("NAME", ""); + + +if($focus->mode == 'edit') +{ + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + if(((!empty($_REQUEST['forward']) || !empty($_REQUEST['reply'])) && + $focus->column_fields['email_flag'] != 'SAVED') || (empty($_REQUEST['forward']) && + empty($_REQUEST['reply']) && $focus->column_fields['email_flag'] != 'SAVED')) { + $mode = ''; + } else { + $mode = $focus->mode; + } + $smarty->assign("MODE", $mode); +} + +// Unimplemented until jscalendar language vtiger_files are fixed + +$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']); +$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + +if(isset($_REQUEST['return_module'])) $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module'])); +else $smarty->assign("RETURN_MODULE",'Emails'); +if(isset($_REQUEST['return_action'])) $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action'])); +else $smarty->assign("RETURN_ACTION",'index'); +if(isset($_REQUEST['return_id'])) $smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id'])); +if (isset($_REQUEST['return_viewname'])) $smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname'])); + +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); +$smarty->assign("ID", $focus->id); +$smarty->assign("ENTITY_ID", vtlib_purify($_REQUEST["record"])); +$smarty->assign("ENTITY_TYPE",vtlib_purify($_REQUEST["email_directing_module"])); +$smarty->assign("OLD_ID", $old_id ); +//Display the RTE or not? -- configure $USE_RTE in config.php +$USE_RTE = vt_hasRTE(); +$smarty->assign("USE_RTE",$USE_RTE); + +if(empty($focus->filename)) +{ + $smarty->assign("FILENAME_TEXT", ""); + $smarty->assign("FILENAME", ""); +} +else +{ + $smarty->assign("FILENAME_TEXT", "(".$focus->filename.")"); + $smarty->assign("FILENAME", $focus->filename); +} +if($ret_error == 1) { + require_once('modules/Webmails/MailBox.php'); + $smarty->assign("RET_ERROR",$ret_error); + if($ret_parentid != ''){ + $smarty->assign("IDLISTS",$ret_parentid); + } + if($ret_toadd != '') + $smarty->assign("TO_MAIL",$ret_toadd); + $ret_toadd = ''; + if($ret_subject != '') + $smarty->assign("SUBJECT",$ret_subject); + if($ret_ccaddress != '') + $smarty->assign("CC_MAIL",$ret_ccaddress); + if($ret_bccaddress != '') + $smarty->assign("BCC_MAIL",$ret_bccaddress); + if($ret_description != '') + $smarty->assign("DESCRIPTION", $ret_description); + $temp_obj = new MailBox($mailbox); + $temp_id = $temp_obj->boxinfo['mail_id']; + if($temp_id != '') + $smarty->assign('from_add',$temp_id); +} +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +$smarty->display("ComposeEmail.tpl"); + +?> \ No newline at end of file diff --git a/modules/Emails/Emails.js b/modules/Emails/Emails.js new file mode 100644 index 0000000..404790b --- /dev/null +++ b/modules/Emails/Emails.js @@ -0,0 +1,260 @@ +/********************************************************************************* + +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +var gFolderid = 1; +var gselectedrowid = 0; +function gotoWebmail() +{ + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module=Webmails&action=WebmailsAjax&config_chk=true", + onComplete: function(response) { + if(response.responseText.indexOf('SUCCESS') > -1) + window.location.href = "index.php?module=Webmails&action=index&parenttab=My Home Page"; + else + $('mailconfchk').style.display = 'block'; + + } + } + ); + +} + +function getEmailContents(id) +{ + $("status").style.display="inline"; + var rowid = 'row_'+id; + getObj(rowid).className = 'emailSelected'; + if(gselectedrowid != 0 && gselectedrowid != id) + { + var prev_selected_rowid = 'row_'+gselectedrowid; + getObj(prev_selected_rowid).className = 'prvPrfHoverOff'; + } + gselectedrowid = id; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Emails&action=EmailsAjax&file=DetailView&mode=ajax&record='+id, + onComplete: function(response) { + $("status").style.display="none"; + $("EmailDetails").innerHTML = response.responseText; + } + } + ); +} + +function getListViewEntries_js(module,url) +{ + $("status").style.display="inline"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module="+module+"&action="+module+"Ajax&file=ListView&ajax=true&"+url, + onComplete: function(response) { + $("status").style.display="none"; + $("email_con").innerHTML=response.responseText; + execJS(document.getElementById('email_con')); + } + } + ); + +} + +function massDelete() +{ + var delete_selected_row = false; + //added to fix the issue 4295 + var select_options = document.getElementsByName('selected_id'); + var x = select_options.length; + + idstring = ""; + xx = 0; + for(i = 0; i < x ; i++) + { + if(select_options[i].checked) + { + idstring = select_options[i].value +";"+idstring + if(select_options[i].value == gselectedrowid) + { + gselectedrowid = 0; + delete_selected_row = true; + } + xx++ + } + } + if (xx > 0) + { + document.massdelete.idlist.value=idstring; + } + else + { + alert(alert_arr.SELECT); + return false; + } + if(confirm(alert_arr.DELETE + xx + alert_arr.RECORDS)) + { + getObj('search_text').value = ''; + show("status"); + if(!delete_selected_row) + { + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module=Users&action=massdelete&folderid="+gFolderid+"&return_module=Emails&idlist="+idstring, + onComplete: function(response) { + $("status").style.display="none"; + $("email_con").innerHTML=response.responseText; + execJS(document.getElementById('email_con')); + } + } + ); + } + else + { + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module=Users&action=massdelete&folderid="+gFolderid+"&return_module=Emails&idlist="+idstring, + onComplete: function(response) { + $("status").style.display="none"; + $("email_con").innerHTML=response.responseText; + execJS($('email_con')); + $('EmailDetails').innerHTML = '
 
'; + $("subjectsetter").innerHTML=''; + } + } + ); + } + } + else + { + return false; + } +} + +function DeleteEmail(id) +{ + if(confirm(alert_arr.SURE_TO_DELETE)) + { + getObj('search_text').value = ''; + gselectedrowid = 0; + $("status").style.display="inline"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module=Users&action=massdelete&return_module=Emails&folderid="+gFolderid+"&idlist="+id, + onComplete: function(response) { + $("status").style.display="none"; + $("email_con").innerHTML=response.responseText; + execJS($('email_con')); + $('EmailDetails').innerHTML = '
 
'; + $("subjectsetter").innerHTML=''; + } + } + ); + } + else + { + return false; + } +} +function Searchfn() +{ + gselectedrowid = 0; + var osearch_field = document.getElementById('search_field'); + var search_field = osearch_field.options[osearch_field.options.selectedIndex].value; + var search_text = document.getElementById('search_text').value; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: "module=Emails&action=EmailsAjax&ajax=true&file=ListView&folderid="+gFolderid+"&search=true&search_field="+search_field+"&search_text="+search_text, + onComplete: function(response) { + $("email_con").innerHTML=response.responseText; + $("status").style.display="none"; + $('EmailDetails').innerHTML = '
 
'; + $("subjectsetter").innerHTML=''; + execJS($('email_con')); + } + } + ); +} + +function getListViewCount(module,element,parentElement,url){ + if(module != 'Documents'){ + var elementList = document.getElementsByName(module+'_listViewCountRefreshIcon'); + for(var i=0;i 0) { + searchURL = '&query=true&searchtype=BasicSearch&search_field='+ + encodeURIComponent(searchField.value)+'&search_text='+encodeURIComponent(element.value); + } + }else if(document.getElementById('globalSearchText') != null && + typeof document.getElementById('globalSearchText') != 'undefined'){ + var searchText = document.getElementById('globalSearchText').value; + searchURL = '&query=true&globalSearch=true&globalSearchText='+encodeURIComponent(searchText); + if(document.getElementById('tagSearchText') != null && typeof document.getElementById('tagSearchText') != 'undefined'){ + var tagSearch = document.getElementById('tagSearchText').value; + searchURL = '&query=true&globalSearch=true&globalSearchText='+encodeURIComponent(searchText)+'&tagSearchText='+encodeURIComponent(tagSearch); + } + } + if(module != 'Documents'){ + searchURL += (url); + } + // Url parameters to carry forward the Alphabetical search in Popups, + // which is stored in the global variable gPopupAlphaSearchUrl + if(typeof gPopupAlphaSearchUrl != 'undefined' && gPopupAlphaSearchUrl != '') + searchURL += gPopupAlphaSearchUrl; + + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:"module="+module+"&action="+module+"Ajax&file=ListViewPagging&ajax=true"+searchURL, + onComplete: function(response) { + var elementList = document.getElementsByName(module+'_listViewCountContainerBusy'); + for(var i=0;i 'crmid', 'vtiger_activity' => 'activityid', + 'vtiger_seactivityrel' => 'activityid', 'vtiger_cntactivityrel' => 'activityid', 'vtiger_email_track' => 'mailid', 'vtiger_emaildetails' => 'emailid'); + // This is the list of vtiger_fields that are in the lists. + var $list_fields = Array( + 'Subject' => Array('activity' => 'subject'), + 'Related to' => Array('seactivityrel' => 'parent_id'), + 'Date Sent' => Array('activity' => 'date_start'), + 'Assigned To' => Array('crmentity', 'smownerid'), + 'Access Count' => Array('email_track', 'access_count') + ); + var $list_fields_name = Array( + 'Subject' => 'subject', + 'Related to' => 'parent_id', + 'Date Sent' => 'date_start', + 'Assigned To' => 'assigned_user_id', + 'Access Count' => 'access_count' + ); + var $list_link_field = 'subject'; + var $column_fields = Array(); + var $sortby_fields = Array('subject', 'date_start', 'saved_toid'); + //Added these variables which are used as default order by and sortorder in ListView + var $default_order_by = 'date_start'; + var $default_sort_order = 'ASC'; + // Used when enabling/disabling the mandatory fields for the module. + // Refers to vtiger_field.fieldname values. + var $mandatory_fields = Array('subject', 'assigned_user_id'); + + /** This function will set the columnfields for Email module + */ + function Emails() { + $this->log = LoggerManager::getLogger('email'); + $this->log->debug("Entering Emails() method ..."); + $this->log = LoggerManager::getLogger('email'); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Emails'); + $this->log->debug("Exiting Email method ..."); + } + + function save_module($module) { + global $adb; + //Inserting into seactivityrel + //modified by Richie as raju's implementation broke the feature for addition of webmail to vtiger_crmentity.need to be more careful in future while integrating code + if ($_REQUEST['module'] == "Emails" && $_REQUEST['smodule'] != 'webmails' && (!$this->plugin_save)) { + if ($_REQUEST['currentid'] != '') { + $actid = $_REQUEST['currentid']; + } else { + $actid = $_REQUEST['record']; + } + $parentid = $_REQUEST['parent_id']; + if ($_REQUEST['module'] != 'Emails' && $_REQUEST['module'] != 'Webmails') { + if (!$parentid) { + $parentid = $adb->getUniqueID('vtiger_seactivityrel'); + } + $mysql = 'insert into vtiger_seactivityrel values(?,?)'; + $adb->pquery($mysql, array($parentid, $actid)); + } else { + $myids = explode("|", $parentid); //2@71| + for ($i = 0; $i < (count($myids) - 1); $i++) { + $realid = explode("@", $myids[$i]); + $mycrmid = $realid[0]; + //added to handle the relationship of emails with vtiger_users + if ($realid[1] == -1) { + $del_q = 'delete from vtiger_salesmanactivityrel where smid=? and activityid=?'; + $adb->pquery($del_q, array($mycrmid, $actid)); + $mysql = 'insert into vtiger_salesmanactivityrel values(?,?)'; + } else { + $del_q = 'delete from vtiger_seactivityrel where crmid=? and activityid=?'; + $adb->pquery($del_q, array($mycrmid, $actid)); + $mysql = 'insert into vtiger_seactivityrel values(?,?)'; + } + $params = array($mycrmid, $actid); + $adb->pquery($mysql, $params); + } + } + } else { + if (isset($this->column_fields['parent_id']) && $this->column_fields['parent_id'] != '') { + $adb->pquery("DELETE FROM vtiger_seactivityrel WHERE crmid = ? AND activityid = ? ", + array($this->column_fields['parent_id'], $this->id)); + //$this->insertIntoEntityTable('vtiger_seactivityrel', $module); + $sql = 'insert into vtiger_seactivityrel values(?,?)'; + $params = array($this->column_fields['parent_id'], $this->id); + $adb->pquery($sql, $params); + } elseif ($this->column_fields['parent_id'] == '' && $insertion_mode == "edit") { + $this->deleteRelation('vtiger_seactivityrel'); + } + } + + + //Insert into cntactivity rel + + if (isset($this->column_fields['contact_id']) && $this->column_fields['contact_id'] != '') { + $this->insertIntoEntityTable('vtiger_cntactivityrel', $module); + } elseif ($this->column_fields['contact_id'] == '' && $insertion_mode == "edit") { + $this->deleteRelation('vtiger_cntactivityrel'); + } + + //Inserting into attachment + + $this->insertIntoAttachment($this->id, $module); + } + + function insertIntoAttachment($id, $module) { + global $log, $adb; + $log->debug("Entering into insertIntoAttachment($id,$module) method."); + + $file_saved = false; + + //Added to send generated Invoice PDF with mail + $pdfAttached = $_REQUEST['pdf_attachment']; + //created Invoice pdf is attached with the mail + if (isset($_REQUEST['pdf_attachment']) && $_REQUEST['pdf_attachment'] != '') { + $file_saved = pdfAttach($this, $module, $pdfAttached, $id); + } + + //This is to added to store the existing attachment id of the contact where we should delete this when we give new image + foreach ($_FILES as $fileindex => $files) { + if ($files['name'] != '' && $files['size'] > 0) { + $files['original_name'] = vtlib_purify($_REQUEST[$fileindex . '_hidden']); + $file_saved = $this->uploadAndSaveFile($id, $module, $files); + } + } + if ($module == 'Emails' && isset($_REQUEST['att_id_list']) && $_REQUEST['att_id_list'] != '') { + $att_lists = explode(";", $_REQUEST['att_id_list'], -1); + $id_cnt = count($att_lists); + if ($id_cnt != 0) { + for ($i = 0; $i < $id_cnt; $i++) { + $sql_rel = 'insert into vtiger_seattachmentsrel values(?,?)'; + $adb->pquery($sql_rel, array($id, $att_lists[$i])); + } + } + } + if ($_REQUEST['att_module'] == 'Webmails') { + require_once("modules/Webmails/Webmails.php"); + require_once("modules/Webmails/MailParse.php"); + require_once('modules/Webmails/MailBox.php'); + //$mailInfo = getMailServerInfo($current_user); + //$temprow = $adb->fetch_array($mailInfo); + + $MailBox = new MailBox($_REQUEST["mailbox"]); + $mbox = $MailBox->mbox; + $webmail = new Webmails($mbox, $_REQUEST['mailid']); + $array_tab = Array(); + $webmail->loadMail($array_tab); + if (isset($webmail->att_details)) { + foreach ($webmail->att_details as $fileindex => $files) { + if ($files['name'] != '' && $files['size'] > 0) { + //print_r($files); + $file_saved = $this->saveForwardAttachments($id, $module, $files); + } + } + } + } + $log->debug("Exiting from insertIntoAttachment($id,$module) method."); + } + + function saveForwardAttachments($id, $module, $file_details) { + global $log; + $log->debug("Entering into saveForwardAttachments($id,$module,$file_details) method."); + global $adb, $current_user; + global $upload_badext; + require_once('modules/Webmails/MailBox.php'); + $mailbox = $_REQUEST["mailbox"]; + $MailBox = new MailBox($mailbox); + $mail = $MailBox->mbox; + $binFile = sanitizeUploadFileName($file_details['name'], $upload_badext); + $filename = ltrim(basename(" " . $binFile)); //allowed filename like UTF-8 characters + $filetype = $file_details['type']; + $filesize = $file_details['size']; + $filepart = $file_details['part']; + $transfer = $file_details['transfer']; + $file = imap_fetchbody($mail, $_REQUEST['mailid'], $filepart); + if ($transfer == 'BASE64') + $file = imap_base64($file); + elseif ($transfer == 'QUOTED-PRINTABLE') + $file = imap_qprint($file); + $current_id = $adb->getUniqueID("vtiger_crmentity"); + $date_var = date('Y-m-d H:i:s'); + //to get the owner id + $ownerid = $this->column_fields['assigned_user_id']; + if (!isset($ownerid) || $ownerid == '') + $ownerid = $current_user->id; + $upload_file_path = decideFilePath(); + file_put_contents($upload_file_path . $current_id . "_" . $filename, $file); + + $sql1 = "insert into vtiger_crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values(?,?,?,?,?,?,?)"; + $params1 = array($current_id, $current_user->id, $ownerid, $module . " Attachment", $this->column_fields['description'], $adb->formatDate($date_var, true), $adb->formatDate($date_var, true)); + $adb->pquery($sql1, $params1); + + $sql2 = "insert into vtiger_attachments(attachmentsid, name, description, type, path) values(?,?,?,?,?)"; + $params2 = array($current_id, $filename, $this->column_fields['description'], $filetype, $upload_file_path); + $result = $adb->pquery($sql2, $params2); + + if ($_REQUEST['mode'] == 'edit') { + if ($id != '' && $_REQUEST['fileid'] != '') { + $delquery = 'delete from vtiger_seattachmentsrel where crmid = ? and attachmentsid = ?'; + $adb->pquery($delquery, array($id, $_REQUEST['fileid'])); + } + } + $sql3 = 'insert into vtiger_seattachmentsrel values(?,?)'; + $adb->pquery($sql3, array($id, $current_id)); + return true; + $log->debug("exiting from saveforwardattachment function."); + } + + /** Returns a list of the associated contacts + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function get_contacts($id, $cur_tab_id, $rel_tab_id, $actions=false) { + global $log, $singlepane_view, $currentModule, $current_user; + $log->debug("Entering get_contacts(" . $id . ") method ..."); + $this_module = $currentModule; + + $related_module = vtlib_getModuleNameById($rel_tab_id); + require_once("modules/$related_module/$related_module.php"); + $other = new $related_module(); + vtlib_setup_modulevars($related_module, $other); + $singular_modname = vtlib_toSingular($related_module); + + $parenttab = getParentTab(); + + $returnset = '&return_module=' . $this_module . '&return_action=DetailView&return_id=' . $id; + + $button = ''; + + if ($actions) { + if (is_string($actions)) + $actions = explode(',', strtoupper($actions)); + if (in_array('SELECT', $actions) && isPermitted($related_module, 4, '') == 'yes') { + $button .= " "; + } + if (in_array('BULKMAIL', $actions) && isPermitted($related_module, 1, '') == 'yes') { + $button .= ""; + } + } + + $query = 'select vtiger_contactdetails.accountid, vtiger_contactdetails.contactid, vtiger_contactdetails.firstname,vtiger_contactdetails.lastname, vtiger_contactdetails.department, vtiger_contactdetails.title, vtiger_contactdetails.email, vtiger_contactdetails.phone, vtiger_contactdetails.emailoptout, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime from vtiger_contactdetails inner join vtiger_cntactivityrel on vtiger_cntactivityrel.contactid=vtiger_contactdetails.contactid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid left join vtiger_groups on vtiger_groups.groupid=vtiger_crmentity.smownerid where vtiger_cntactivityrel.activityid=' . $adb->quote($id) . ' and vtiger_crmentity.deleted=0'; + + $return_value = GetRelatedList($this_module, $related_module, $other, $query, $button, $returnset); + + if ($return_value == null) + $return_value = Array(); + $return_value['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_contacts method ..."); + return $return_value; + } + + /** Returns the column name that needs to be sorted + * Portions created by vtigerCRM are Copyright (C) vtigerCRM. + * All Rights Reserved.. + * Contributor(s): Mike Crowe + */ + function getSortOrder() { + global $log; + $log->debug("Entering getSortOrder() method ..."); + if (isset($_REQUEST['sorder'])) + $sorder = $this->db->sql_escape_string($_REQUEST['sorder']); + else + $sorder = (($_SESSION['EMAILS_SORT_ORDER'] != '') ? ($_SESSION['EMAILS_SORT_ORDER']) : ($this->default_sort_order)); + + $log->debug("Exiting getSortOrder method ..."); + return $sorder; + } + + /** Returns the order in which the records need to be sorted + * Portions created by vtigerCRM are Copyright (C) vtigerCRM. + * All Rights Reserved.. + * Contributor(s): Mike Crowe + */ + function getOrderBy() { + global $log; + $log->debug("Entering getOrderBy() method ..."); + + $use_default_order_by = ''; + if (PerformancePrefs::getBoolean('LISTVIEW_DEFAULT_SORTING', true)) { + $use_default_order_by = $this->default_order_by; + } + + if (isset($_REQUEST['order_by'])) + $order_by = $this->db->sql_escape_string($_REQUEST['order_by']); + else + $order_by = (($_SESSION['EMAILS_ORDER_BY'] != '') ? ($_SESSION['EMAILS_ORDER_BY']) : ($use_default_order_by)); + + $log->debug("Exiting getOrderBy method ..."); + return $order_by; + } + + // Mike Crowe Mod -------------------------------------------------------- + + /** Returns a list of the associated vtiger_users + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.. + * All Rights Reserved.. + * Contributor(s): ______________________________________.. + */ + function get_users($id) { + global $log; + $log->debug("Entering get_users(" . $id . ") method ..."); + global $adb; + global $mod_strings; + global $app_strings; + + $id = $_REQUEST['record']; + + $button = '  + '; + + $query = 'SELECT vtiger_users.id, vtiger_users.first_name,vtiger_users.last_name, vtiger_users.user_name, vtiger_users.email1, vtiger_users.email2, vtiger_users.secondaryemail , vtiger_users.phone_home, vtiger_users.phone_work, vtiger_users.phone_mobile, vtiger_users.phone_other, vtiger_users.phone_fax from vtiger_users inner join vtiger_salesmanactivityrel on vtiger_salesmanactivityrel.smid=vtiger_users.id and vtiger_salesmanactivityrel.activityid=?'; + $result = $adb->pquery($query, array($id)); + + $noofrows = $adb->num_rows($result); + $header [] = $app_strings['LBL_LIST_NAME']; + + $header [] = $app_strings['LBL_LIST_USER_NAME']; + + $header [] = $app_strings['LBL_EMAIL']; + + $header [] = $app_strings['LBL_PHONE']; + while ($row = $adb->fetch_array($result)) { + + global $current_user; + + $entries = Array(); + + if (is_admin($current_user)) { + $entries[] = getFullNameFromArray('Users', $row); + } else { + $entries[] = getFullNameFromArray('Users', $row); + } + + $entries[] = $row['user_name']; + $entries[] = $row['email1']; + if ($email == '') + $email = $row['email2']; + if ($email == '') + $email = $row['secondaryemail']; + + $entries[] = $row['phone_home']; + if ($phone == '') + $phone = $row['phone_work']; + if ($phone == '') + $phone = $row['phone_mobile']; + if ($phone == '') + $phone = $row['phone_other']; + if ($phone == '') + $phone = $row['phone_fax']; + + //Adding Security Check for User + + $entries_list[] = $entries; + } + + if ($entries_list != '') + $return_data = array("header" => $header, "entries" => $entries); + + if ($return_data == null) + $return_data = Array(); + $return_data['CUSTOM_BUTTON'] = $button; + + $log->debug("Exiting get_users method ..."); + return $return_data; + } + + /** + * Returns a list of the Emails to be exported + */ + function create_export_query(&$order_by, &$where) { + global $log; + global $current_user; + $log->debug("Entering create_export_query(" . $order_by . "," . $where . ") method ..."); + + include("include/utils/ExportUtils.php"); + + //To get the Permitted fields query and the permitted fields list + $sql = getPermittedFieldsQuery("Emails", "detail_view"); + $fields_list = getFieldsListFromQuery($sql); + + $query = "SELECT $fields_list FROM vtiger_activity + INNER JOIN vtiger_crmentity + ON vtiger_crmentity.crmid=vtiger_activity.activityid + LEFT JOIN vtiger_users + ON vtiger_users.id = vtiger_crmentity.smownerid + LEFT JOIN vtiger_seactivityrel + ON vtiger_seactivityrel.activityid = vtiger_activity.activityid + LEFT JOIN vtiger_contactdetails + ON vtiger_contactdetails.contactid = vtiger_seactivityrel.crmid + LEFT JOIN vtiger_cntactivityrel + ON vtiger_cntactivityrel.activityid = vtiger_activity.activityid + AND vtiger_cntactivityrel.contactid = vtiger_cntactivityrel.contactid + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + LEFT JOIN vtiger_salesmanactivityrel + ON vtiger_salesmanactivityrel.activityid = vtiger_activity.activityid + LEFT JOIN vtiger_emaildetails + ON vtiger_emaildetails.emailid = vtiger_activity.activityid + LEFT JOIN vtiger_seattachmentsrel + ON vtiger_activity.activityid=vtiger_seattachmentsrel.crmid + LEFT JOIN vtiger_attachments + ON vtiger_seattachmentsrel.attachmentsid = vtiger_attachments.attachmentsid"; + $query .= getNonAdminAccessControlQuery('Emails', $current_user); + $query .= "WHERE vtiger_activity.activitytype='Emails' AND vtiger_crmentity.deleted=0 "; + + $log->debug("Exiting create_export_query method ..."); + return $query; + } + + /** + * Used to releate email and contacts -- Outlook Plugin + */ + function set_emails_contact_invitee_relationship($email_id, $contact_id) { + global $log; + $log->debug("Entering set_emails_contact_invitee_relationship(" . $email_id . "," . $contact_id . ") method ..."); + $query = "insert into $this->rel_contacts_table (contactid,activityid) values(?,?)"; + $this->db->pquery($query, array($contact_id, $email_id), true, "Error setting email to contact relationship: " . "
$query"); + $log->debug("Exiting set_emails_contact_invitee_relationship method ..."); + } + + /** + * Used to releate email and salesentity -- Outlook Plugin + */ + function set_emails_se_invitee_relationship($email_id, $contact_id) { + global $log; + $log->debug("Entering set_emails_se_invitee_relationship(" . $email_id . "," . $contact_id . ") method ..."); + $query = "insert into $this->rel_serel_table (crmid,activityid) values(?,?)"; + $this->db->pquery($query, array($contact_id, $email_id), true, "Error setting email to contact relationship: " . "
$query"); + $log->debug("Exiting set_emails_se_invitee_relationship method ..."); + } + + /** + * Used to releate email and Users -- Outlook Plugin + */ + function set_emails_user_invitee_relationship($email_id, $user_id) { + global $log; + $log->debug("Entering set_emails_user_invitee_relationship(" . $email_id . "," . $user_id . ") method ..."); + $query = "insert into $this->rel_users_table (smid,activityid) values (?,?)"; + $this->db->pquery($query, array($user_id, $email_id), true, "Error setting email to user relationship: " . "
$query"); + $log->debug("Exiting set_emails_user_invitee_relationship method ..."); + } + + // Function to unlink an entity with given Id from another entity + function unlinkRelationship($id, $return_module, $return_id) { + global $log; + + $sql = 'DELETE FROM vtiger_seactivityrel WHERE activityid=?'; + $this->db->pquery($sql, array($id)); + + $sql = 'DELETE FROM vtiger_crmentityrel WHERE (crmid=? AND relmodule=? AND relcrmid=?) OR (relcrmid=? AND module=? AND crmid=?)'; + $params = array($id, $return_module, $return_id, $id, $return_module, $return_id); + $this->db->pquery($sql, $params); + } + + public function getNonAdminAccessControlQuery($module, $user, $scope='') { + return " and vtiger_crmentity$scope.smownerid=$user->id "; + } + +} + +/** Function to get the emailids for the given ids form the request parameters + * It returns an array which contains the mailids and the parentidlists + */ +function get_to_emailids($module) {global $log;$log->fatal($_REQUEST); + global $adb, $current_user, $log; + require_once 'include/Webservices/Query.php'; + //$idlists1 = ""; + $mailds = ''; + $fieldids = explode(":", vtlib_purify($_REQUEST['field_lists'])); + if($_REQUEST['idlist'] == 'all' || $_REQUEST['idlist'] == 'relatedListSelectAll'){ + $idlist = getSelectedRecords($_REQUEST,vtlib_purify($_REQUEST['pmodule']),vtlib_purify($_REQUEST['idlist']),vtlib_purify($_REQUEST['excludedRecords'])); + } else { + $idlist = explode(":", str_replace("undefined","",vtlib_purify($_REQUEST['idlist']))); + } + + $entityids = array(); + foreach ($idlist as $key => $id) { + $entityids[] = vtws_getWebserviceEntityId($module, $id); + } + $vtwsObject = VtigerWebserviceObject::fromName($adb, $module); + $vtwsCRMObjectMeta = new VtigerCRMObjectMeta($vtwsObject, $current_user); + $emailFields = $vtwsCRMObjectMeta->getEmailFields(); + + foreach ($emailFields as $key => $fieldname) { + $fieldid = $vtwsCRMObjectMeta->getFieldIdFromFieldName($fieldname); + if (!in_array($fieldid, $fieldids)) { + unset($emailFields[$key]); + } + } + if(empty($emailFields)) + return false; + if ($module == 'Leads') { + $query = 'SELECT firstname,lastname,'.implode(",", $emailFields).',vtiger_leaddetails.leadid as id + FROM vtiger_leaddetails + INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_leaddetails.leadid + LEFT JOIN vtiger_leadscf ON vtiger_leaddetails.leadid = vtiger_leadscf.leadid + WHERE vtiger_crmentity.deleted=0 AND vtiger_leaddetails.leadid IN ('.generateQuestionMarks($idlist).')'; + } else if ($module == 'Contacts'){ + $query = 'SELECT firstname,lastname,'.implode(",", $emailFields).',vtiger_contactdetails.contactid as id + FROM vtiger_contactdetails + INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_contactdetails.contactid + LEFT JOIN vtiger_contactscf ON vtiger_contactdetails.contactid = vtiger_contactscf.contactid + WHERE vtiger_crmentity.deleted=0 AND vtiger_contactdetails.contactid IN ('.generateQuestionMarks($idlist).') AND vtiger_contactdetails.emailoptout=0'; + } else { + $query = 'SELECT vtiger_account.accountname, '.implode(",", $emailFields).',vtiger_account.accountid as id FROM vtiger_account + INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_account.accountid + LEFT JOIN vtiger_accountscf ON vtiger_accountscf.accountid= vtiger_account.accountid + WHERE vtiger_crmentity.deleted=0 AND vtiger_account.accountid IN ('.generateQuestionMarks($idlist).') AND vtiger_account.emailoptout=0'; + } + $result = $adb->pquery($query,$idlist); + + if($adb->num_rows($result)>0){ + while($entityvalue = $adb->fetchByAssoc($result)){ + $vtwsid = $entityvalue['id']; + foreach ($emailFields as $i => $emailFieldName) { + if ($entityvalue[$emailFieldName] != NULL || $entityvalue[$emailFieldName] != '') { + $idlists .= $vtwsid . '@' . $vtwsCRMObjectMeta->getFieldIdFromFieldName($emailFieldName) . '|'; + if ($module == 'Leads' || $module == 'Contacts') { + $mailids .= $entityvalue['lastname'] . " " . $entityvalue['firstname'] . "<" . $entityvalue[$emailFieldName] . ">,"; + } else { + $mailids .= $entityvalue['accountname'] . "<" . $entityvalue[$emailFieldName] . ">,"; + } + } + } + } + } + + $return_data = array('idlists' => $idlists, 'mailds' => $mailids); + return $return_data; +} + +//added for attach the generated pdf with email +function pdfAttach($obj, $module, $file_name, $id) { + global $log; + $log->debug("Entering into pdfAttach() method."); + + global $adb, $current_user; + global $upload_badext; + $date_var = date('Y-m-d H:i:s'); + + $ownerid = $obj->column_fields['assigned_user_id']; + if (!isset($ownerid) || $ownerid == '') + $ownerid = $current_user->id; + + $current_id = $adb->getUniqueID("vtiger_crmentity"); + + $upload_file_path = decideFilePath(); + + //Copy the file from temporary directory into storage directory for upload + $source_file_path = "storage/" . $file_name; + $status = copy($source_file_path, $upload_file_path . $current_id . "_" . $file_name); + //Check wheather the copy process is completed successfully or not. if failed no need to put entry in attachment table + if ($status) { + $query1 = "insert into vtiger_crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values(?,?,?,?,?,?,?)"; + $params1 = array($current_id, $current_user->id, $ownerid, $module . " Attachment", $obj->column_fields['description'], $adb->formatDate($date_var, true), $adb->formatDate($date_var, true)); + $adb->pquery($query1, $params1); + + $query2 = "insert into vtiger_attachments(attachmentsid, name, description, type, path) values(?,?,?,?,?)"; + $params2 = array($current_id, $file_name, $obj->column_fields['description'], 'pdf', $upload_file_path); + $result = $adb->pquery($query2, $params2); + + $query3 = 'insert into vtiger_seattachmentsrel values(?,?)'; + $adb->pquery($query3, array($id, $current_id)); + + // Delete the file that was copied + unlink($source_file_path); + + return true; + } else { + $log->debug("pdf not attached"); + return false; + } +} + +//this function check email fields profile permission as well as field access permission +function emails_checkFieldVisiblityPermission($fieldname, $mode='readonly') { + global $current_user; + $ret = getFieldVisibilityPermission('Emails', $current_user->id, $fieldname, $mode); + return $ret; +} + +?> diff --git a/modules/Emails/EmailsAjax.php b/modules/Emails/EmailsAjax.php new file mode 100644 index 0000000..2a1c900 --- /dev/null +++ b/modules/Emails/EmailsAjax.php @@ -0,0 +1,55 @@ +retrieve_entity_info($crmid,"Emails"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Emails"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE") { + require_once 'include/ListView/RelatedListViewContents.php'; +} +elseif($_REQUEST['ajaxmode'] == 'qcreate') +{ + require_once('quickcreate.php'); +} +else +{ + require_once('include/Ajax/CommonAjax.php'); +} +?> diff --git a/modules/Emails/GmailBookmarklet.js b/modules/Emails/GmailBookmarklet.js new file mode 100644 index 0000000..25492cf --- /dev/null +++ b/modules/Emails/GmailBookmarklet.js @@ -0,0 +1,581 @@ +function init(){ + function XHR(type,url,params){ + this.xhr = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); + this.url = url; + this.params = params; + this.type = type; + }; + XHR.prototype.load=function(async,callback){ + this.onload=callback; + this.async=async; + + if(this.type.toLowerCase()=="get"){ + this.url = this.url+"?"+this.params; + } + + this.xhr.open(this.type,this.url,this.async); + try{ + if(async){ + var request = this; + this.xhr.onreadystatechange=function(){ + request.readyStateChange(); + } + } + if(this.type.toLowerCase()=="post"){ + this.xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); + this.xhr.setRequestHeader("Content-length", this.params.length); + } + this.xhr.send(this.params); + }catch(e){ + alert("error: "+e); + } + }; + XHR.prototype.readyStateChange=function(){ + var ready=this.xhr.readyState; + if(ready==4){ + var httpStatus=null; + httpStatus=this.xhr.status; + if(httpStatus==200 || httpStatus==0){ + if(this.async){ + this.onload.call(this,this.xhr); + } + } + } + }; + + function VtigerWebservice(vtigerurl,username,accesskey){ + var vtigerURL=vtigerurl; + var username=username; + var accessKey=accesskey; + var userId=null; + var sessionId=null; + + function getResult(response){ + return response.result; + } + + function getError(response){ + return response.error; + } + + function extendsession(){ + var req = new XHR("post",vtigerURL,"operation=extendsession"); + req.load(false); + var res = JSON.parse(req.xhr.responseText); + if(res.success){ + var result = getResult(res); + this.userId=result.userId; + this.sessionId=result.sessionName; + } + } + + function create(object, objectType, callback){ + var objectJson = JSON.stringify(object); + var req = new XHR("post",document.vtigerURL,("operation=create&elementType="+objectType+"&sessionName="+this.sessionId+ + "&element="+encodeURIComponent(objectJson))); + req.load(true,callback); + } + + function query(query, callback){ + var req = new XHR("get",document.vtigerURL,"operation=query&query="+encodeURIComponent(query)+"&sessionName="+this.sessionId); + req.load(true,callback); + } + return {extendSession:extendsession,query:query,getResult:getResult,userId:userId,create:create,getError:getError}; + }; + if (!this.JSON) { + JSON = function () { + function f(n) { + return n < 10 ? "0" + n : n; + } + Date.prototype.toJSON = function () { + return this.getUTCFullYear() + "-" + + f(this.getUTCMonth() + 1) + "-" + + f(this.getUTCDate()) + "T" + + f(this.getUTCHours()) + ":" + + f(this.getUTCMinutes()) + ":" + + f(this.getUTCSeconds()) + "Z"; + }; + var m = { + "\b": "\\b", + "\t": "\\t", + "\n": "\\n", + "\f": "\\f", + "\r": "\\r", + "\"" : "\\\"", + "\\": "\\\\" + }; + function stringify(value, whitelist) { + var a, // The array holding the partial texts. + i, // The loop counter. + k, // The member key. + l, // Length. + r = /["\\\x00-\x1f\x7f-\x9f]/g, + v; // The member value. + switch (typeof value) { + case "string": + return r.test(value) ? + "\"" + value.replace(r, function (a) { + var c = m[a]; + if (c) { + return c; + } + c = a.charCodeAt(); + return "\\u00" + Math.floor(c / 16).toString(16) + + (c % 16).toString(16); + }) + "\"" : + "\"" + value + "\""; + case "number": + return isFinite(value) ? String(value) : "null"; + case "boolean": + case "null": + return String(value); + case "object": + if (!value) { + return "null"; + } + if (typeof value.toJSON === "function") { + return stringify(value.toJSON()); + } + a = []; + if (typeof value.length === "number" && + !(value.propertyIsEnumerable("length"))) { + l = value.length; + for (i = 0; i < l; i += 1) { + a.push(stringify(value[i], whitelist) || "null"); + } + return "[" + a.join(",") + "]"; + } + if (whitelist) { + l = whitelist.length; + for (i = 0; i < l; i += 1) { + k = whitelist[i]; + if (typeof k === "string") { + v = stringify(value[k], whitelist); + if (v) { + a.push(stringify(k) + ":" + v); + } + } + } + } else { + for (k in value) { + if (typeof k === "string") { + v = stringify(value[k], whitelist); + if (v) { + a.push(stringify(k) + ":" + v); + } + } + } + } + return "{" + a.join(",") + "}"; + } + return undefined; + } + return { + stringify: stringify, + parse: function (text, filter) { + var j; + function walk(k, v) { + var i, n; + if (v && typeof v === "object") { + for (i in v) { + if (Object.prototype.hasOwnProperty.apply(v, [i])) { + n = walk(i, v[i]); + if (n !== undefined) { + v[i] = n; + } + } + } + } + return filter(k, v); + } + if (/^[\],:{}\s]*$/.test(text.replace(/\\./g, "@"). + replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(:?[eE][+\-]?\d+)?/g, "]"). + replace(/(?:^|:|,)(?:\s*\[)+/g, ""))) { + j = eval("(" + text + ")"); + return typeof filter === "function" ? walk("", j) : j; + } + throw new SyntaxError("parseJSON"); + } + }; + }(); + } + + function trim(str) { + var s = str.replace(/\s+$/, ""); + s = s.replace(/^\s+/, ""); + return s; + } + + function getGmailSubject() { + var subject = top.document.title; + var firstIndexOf = subject.indexOf("-"); + var lastIndexOf = subject.lastIndexOf("-"); + subject = subject.substring(firstIndexOf+1, lastIndexOf-1); + return trim(subject); + } + + function getVtigerBaseURL(){ + var url = document.location.href.substring(0,document.location.href.lastIndexOf('/')+1); + if(url.length > 0){ + if(url.charAt(url.length-1) !="/"){ + url += "/"; + } + return url; + } + return null; + } + + function getVtigerURL(){ + if(document.vtigerBaseURL.length > 0){ + var url =document.vtigerBaseURL; + url +="webservice.php"; + return url; + } + return null; + } + + function getGmailURL() { + var locationhref = location.href; + if(locationhref.indexOf("?")) { + var lsplits = locationhref.split("?"); + locationhref = lsplits[0]; + } else if(locationhref.indexOf("#")) { + var lsplits = locationhref.split("#"); + locationhref = lsplits[0]; + } + return locationhref; + } + + var elementId = "__vtigerBookMarkletDiv__"; + var busyElementId = "__vtigerBookMarkletDivBusy__" + function showBookMarkletUI(){ + var bookMarkletDiv = document.getElementById(elementId); + if(bookMarkletDiv == null){ + bookMarkletDiv.style.display="block"; + } + } + + function hideBookMarkletUI(){ + var bookMarkletDiv = document.getElementById(elementId); + if(bookMarkletDiv != null){ + bookMarkletDiv.style.display="none"; + } + } + + function destroyBookMarkletUI(){ + var closeElementId = '__vtigetGmailCloseElement'; + var parentLocation = location.href.split("location="); + if(parentLocation.length>1){ + var closeElement = document.getElementById(closeElementId); + if(closeElement==null){ + closeElement = document.createElement("iframe"); + closeElement.style.width="0px"; + closeElement.frameBorder="0px"; + closeElement.style.height="0px"; + closeElement.style.display="none"; + closeElement.id = closeElementId; + closeElement.src = decodeURIComponent(parentLocation[1])+"#"; + document.body.appendChild(closeElement); + } + closeElement.onload=function(){ + eval('window.parent.parent.removeMe()'); + } + } + } + + function showBusy(){ + var bookMarkletDiv = document.getElementById(elementId); + var busyElem = document.getElementById(busyElementId); + if(busyElem==null){ + busyElem = document.createElement('div'); + busyElem.id = busyElementId; + busyElem.innerHTML="Working..."; + busyElem.style.position="absolute"; + busyElem.style.top="5px"; + busyElem.style.right="5px"; + busyElem.style.color="white"; + busyElem.style.backgroundColor="#D75235"; + busyElem.style.padding="2px"; + bookMarkletDiv.appendChild(busyElem); + }else{ + busyElem.style.display="block"; + } + + } + + function hideBusy(){ + var busyElem = document.getElementById(busyElementId); + if(busyElem!=null){ + busyElem.style.display="none"; + } + } + + if(typeof document.vtigerURL =="undefined" || document.vtigerURL == null || document.vtigerURL == ""){ + document.vtigerBaseURL = getVtigerBaseURL(); + if(document.vtigerBaseURL ==null){ + alert("Please Provide a Valid URL"); + return; + } + document.vtigerURL = getVtigerURL(); + } + var client = new VtigerWebservice(document.vtigerURL,null,null); + + showBusy(); + client.extendSession(); + hideBusy(); + showBookMarkletUI(); + + function onReady(id,callback){ + var interval = window.setInterval(function(){ + var elem = document.getElementById(id); + if(elem != null && typeof elem != "undefined"){ + callback(); + window.clearInterval(interval); + } + },10); + } + + function createBookMarkletUI(){ + + onReady("__saveVtigerEmail__",function(){ + document.getElementById("__saveVtigerEmail__").onclick=function(){ + createEmail(); + } + }); + onReady("parentType",function(){ + document.getElementById("parentName").innerHTML = "No "+document.getElementById("parentType").value+" Selected."; + document.getElementById("parentType").onchange=function(){ + document.getElementById("parentName").innerHTML = "No "+this.value+" Selected."; + } + }); + + function getQuery(searchValue){ + + var moduleName = document.getElementById("parentType").value; + var moduleDetails = JSON.parse(moduleNameFields); + var entityNameFields = moduleDetails[moduleName]; + var selectFields = ''; + var whereFields = ''; + each(entityNameFields,function(k,v){ + if(selectFields.length > 0){ + selectFields +=','; + } + selectFields += v; + if(whereFields.length > 0){ + whereFields +=" or "; + } + whereFields += v+" like '%"+searchValue+"%'"; + }); + + var moduleEmailDetails = JSON.parse(moduleEmailFields); + var entityEmailFields = moduleEmailDetails[moduleName]; + each(entityEmailFields, function(k,v){ + if(selectFields.length > 0) { + selectFields +=','; + } + selectFields += v; + }); + return "select "+selectFields+" from "+moduleName+" where "+whereFields+";"; + } + + onReady("__searchVtigerAccount__",function(){ + document.getElementById("__searchVtigerAccount__").onclick=function(e){ + var elem = document.getElementById("__vtigerAccountSearchList___"); + elem.style.display=""; + + var accountName = document.getElementById("__searchaccount__").value; + if(accountName.length < 1){ + alert("Please enter the search criteria"); + return; + } + showBusy(); + var q = getQuery(accountName); + var moduleName = document.getElementById("parentType").value; + var responseElem = document.getElementById("__vtigerAccountSearchResponse___"); + if(responseElem != null){ + responseElem.innerHTML = ''; + } + client.query(q,function(response){ + var responseElem = document.getElementById("__vtigerAccountSearchResponse___"); + if(responseElem == null){ + var sibling = document.createElement("tr"); + var td = document.createElement("td"); + td.colSpan = "3"; + str = "
"; + td.innerHTML = str; + sibling.appendChild(td); + elem.parentNode.appendChild(sibling); + } + onReady("__vtigerAccountSearchResponse___",function(){ + displaySearchResult(moduleName,response,accountName); + }); + }); + } + }); + } + + function getSiblingByTagName(elem,tagName){ + var sibling = elem.nextSibling; + while(sibling.nodeName.toLowerCase()!=tagName.toLowerCase()){ + sibling = sibling.nextSibling; + } + return sibling; + } + + function each(object,callback){ + var name, i = 0, length = object.length; + if ( length == undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + return object; + } + + function findObject(array,needle){ + var name, i = 0, length = array.length; + var prospect = null; + for (; i < length; ++i ){ + var object = array[i]; + for ( name in object ){ + if(object[name] === needle){ + prospect=object; + break; + } + } + } + return prospect; + } + + function getEntityName(moduleName,row){ + var moduleDetails = JSON.parse(moduleNameFields); + var entityNameFields = moduleDetails[moduleName]; + var entityName = ''; + each(entityNameFields,function(k,v){ + if(entityName.length>0){ + entityName += " "; + } + entityName +=row[v]; + }); + return entityName; + } + + function getEntityEmail(moduleName,row){ + var moduleDetails = JSON.parse(moduleEmailFields); + var entityEmailFields = moduleDetails[moduleName]; + var entityEmail = ''; + each(entityEmailFields,function(k,v){ + if(entityEmail.length > 0){ + return; + } + entityEmail +=row[v]; + }); + return entityEmail; + } + + function displaySearchResult(moduleName,response,accountName){ + hideBusy(); + var queryResponse = JSON.parse(response.responseText); + if(queryResponse.success == true){ + var queryResult = client.getResult(queryResponse); + var str ="
    "; + if(queryResult.length > 0){ + each(queryResult, function(i, row){ + var entityName = getEntityName(moduleName,row); + str+="
  • "+ + entityName+"
  • "; + }); + }else{ + str +="
  • No Record Match \""+accountName+"\"
  • "; + } + str += "
"; + var elem = document.getElementById("__vtigerAccountSearchResponse___"); + elem.style.height="120px"; + elem.innerHTML = str; + each(elem.getElementsByTagName("a"),function(i,v){ + v.onclick=function(){ + var elem = findObject(queryResult,this.id); + var entityName = getEntityName(moduleName,elem); + var entityEmail = getEntityEmail(moduleName, elem); + if(entityEmail.length <=0) { + alert("'"+entityName+"' has no email, please select another "+moduleName); + } + setDetails(elem.id,entityName, entityEmail); + var wrap = document.getElementById("__vtigerAccountSearchList___"); + wrap.style.display="none"; + document.getElementById('__searchaccount__').value=''; + } + }); + }else{ + var error = client.getError(queryResponse); + alert("Vtiger returned Error: \nerrorCode: "+error.code+"\nerror Message: "+error.message); + } + } + + function waitForObject(obj,callback){ + var interval = window.setInterval(function(){ + if(typeof obj != "undefined"){ + callback(); + window.clearInterval(interval); + } + },10); + } + + function setDetails(id, entityName, entityEmail){ + var elem = document.getElementById("parent_id"); + var elemName = document.getElementById("parentName"); + var elemEmail = document.getElementById("parentEmail"); + elem.value = id; + elemName.innerHTML = entityName; + elemEmail.value = entityEmail; + } + + function closeOnSuccess(response){ + var createResponse = JSON.parse(response.responseText); + if(createResponse.success == true){ + alert("Email added to vtigerCRM."); + }else{ + document.getElementById("__saveVtigerEmail__").disabled=false; + var error = client.getError(createResponse); + alert("Error while creating: \nerrorCode: "+error.code+"\nerror Message: "+error.message); + } + } + + function getTodayDate(format){ + var date = new Date(); + return date.getDay()+"-"+date.getMonth()+"-"+date.getFullYear(); + } + + function createEmail(){ + var parent_id = document.getElementById("parent_id").value; + var type = document.getElementById("parentType").value; + var userEmail = document.getElementById("userEmail").value; + var entityEmail = document.getElementById("parentEmail").value; + + if(parent_id.length < 1){ + alert("No "+type+" selected."); + return ; + } + var subject = document.getElementById("subject").value; + if(subject.length < 1){ + alert("Please provide a value for Subject"); + return; + } + + var description = document.getElementById("description").value; + if(description.length < 1){ + alert("Please provide a value for Body of the email."); + return; + } + document.getElementById("__saveVtigerEmail__").disabled=true; + var email ={"description":description,"subject":subject, + "assigned_user_id":client.userId,"date_start":getTodayDate(),"activitytype":"Emails", + "parent_id": parent_id,'from_email': userEmail,'saved_toid':entityEmail, + 'email_flag':'SAVED'}; + client.create(email,"Emails",closeOnSuccess) + } + createBookMarkletUI(); +} diff --git a/modules/Emails/GmailBookmarkletTrigger.js b/modules/Emails/GmailBookmarkletTrigger.js new file mode 100644 index 0000000..9ec19ad --- /dev/null +++ b/modules/Emails/GmailBookmarkletTrigger.js @@ -0,0 +1,99 @@ +javascript:(function(){var doc = top.document; +var elementId="__vtigerBookMarkletDivWrap__"; +if(navigator.userAgent.toLowerCase().indexOf("msie") == -1){ + var bookMarkletDiv = doc.getElementById(elementId); + if(bookMarkletDiv == null){ + bookMarkletDiv = doc.createElement("div"); + bookMarkletDiv.style.border = "2px solid #73ABFA"; + bookMarkletDiv.style.backgroundColor = "white"; + bookMarkletDiv.innerHTML = ""; + bookMarkletDiv.id = elementId; + bookMarkletDiv.style.position="absolute"; + bookMarkletDiv.style.top="5px"; + bookMarkletDiv.style.right="35px"; + bookMarkletDiv.style.width="562px"; + bookMarkletDiv.style.height="450px"; + bookMarkletDiv.style.zIndex="100000"; + bookMarkletDiv.innerHTML=" "; + bookMarkletDiv.style.overflow = 'hidden'; + bookMarkletDiv.style.fontSize = '11px'; + bookMarkletDiv.style.fontFamily = 'Arial, sans-serif'; + + var closeMe = doc.createElement("span"); + closeMe.style.position="absolute"; + closeMe.style.top="5px"; + closeMe.style.right="5px"; + closeMe.style.color="#0070BA"; + closeMe.style.textDecoration="underline"; + closeMe.style.width="100%"; + closeMe.style.textAlign="right"; + closeMe.style.cursor="pointer"; + closeMe.innerHTML = ""; + closeMe.onclick = function(){ + window.removeMe(); + } + bookMarkletDiv.appendChild(closeMe); + + var popUp = doc.createElement("iframe"); + popUp.id="__vtigerBookmarkletFrame__"; + popUp.name="__vtigerBookmarkletFrame__"; + popUp.style.border="0px"; + popUp.frameBorder="0px"; + popUp.marginHeight="0px"; + popUp.marginWidth="0px"; + popUp.style.width="100%"; + popUp.style.height="100%"; + popUp.src = getTargetURL(); + bookMarkletDiv.appendChild(popUp); + doc.body.appendChild(bookMarkletDiv); + }else{ + bookMarkletDiv.style.display="block"; + } +}else{ + var vtigerGmailBookmarkletWindow = window.open(getTargetURL(),elementId, + "scrollbars=1,top=40,left=40,resizable=1,height=450,width=562"); +} + +function getTargetURL(){ + var threadid = top.location.hash.split("/"); + var mailId = threadid[threadid.length-1]; + var description = encodeURIComponent(getGmailURL()+"?fs=1&tf=1&source=atom&view=cv&search=all&shva=1&th="+mailId); + return doc.vtigerURL+"index.php?module=Emails&action=SaveBookmarklet&subject="+ + encodeURIComponent(getGmailSubject())+"&description="+description+ + "&location="+encodeURIComponent(getGmailURL()); +} + +function trim(str) { + var s = str.replace(/\s+$/, ""); + s = s.replace(/^\s+/, ""); + return s; +} + +function getGmailSubject() { + var subject = top.document.title; + var firstIndexOf = subject.indexOf("-"); + var lastIndexOf = subject.lastIndexOf("-"); + subject = subject.substring(firstIndexOf+1, lastIndexOf-1); + return trim(subject); +} + +function getGmailURL() { + var locationhref = location.href; + if(locationhref.indexOf("?")!==-1) { + var lsplits = locationhref.split("?"); + locationhref = lsplits[0]; + } else if(locationhref.indexOf("#")!==-1) { + var lsplits = locationhref.split("#"); + locationhref = lsplits[0]; + } + return locationhref; +} +window.top.removeMe = function(){ + if(navigator.userAgent.toLowerCase().indexOf("msie") == -1){ + doc.body.removeChild(bookMarkletDiv); + }else{ + vtigerGmailBookmarkletWindow.close(); + } +} +})(); \ No newline at end of file diff --git a/modules/Emails/ListView.php b/modules/Emails/ListView.php new file mode 100644 index 0000000..4cfceda --- /dev/null +++ b/modules/Emails/ListView.php @@ -0,0 +1,207 @@ +initSortbyField('Emails'); +// END +$smarty = new vtigerCRM_Smarty; +$other_text = Array(); + +if (ListViewSession::hasViewChanged($currentModule, $viewid)) { + $_SESSION['EMAILS_ORDER_BY'] = ''; +} + +//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>> +if ($_REQUEST['order_by'] != '') + $order_by = $adb->sql_escape_string($_REQUEST['order_by']); +else + $order_by = (($_SESSION['EMAILS_ORDER_BY'] != '') ? ($_SESSION['EMAILS_ORDER_BY']) : ($focus->default_order_by)); + +if ($_REQUEST['sorder'] != '') + $sorder = $adb->sql_escape_string($_REQUEST['sorder']); +else + $sorder = (($_SESSION['EMAILS_SORT_ORDER'] != '') ? ($_SESSION['EMAILS_SORT_ORDER']) : ($focus->default_sort_order)); + +$_SESSION['EMAILS_ORDER_BY'] = $order_by; +$_SESSION['EMAILS_SORT_ORDER'] = $sorder; +//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>> +// focus_list is the means of passing data to a ListView. +global $focus_list; + +//<<<>>>>>> +$oCustomView = new CustomView("Emails"); +$viewid = $oCustomView->getViewId($currentModule); +$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid); +$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid); + +//<<<<>>>> +// Buttons and View options +if (isPermitted('Emails', 'Delete', '') == 'yes') { + $other_text['del'] = $app_strings[LBL_MASS_DELETE]; +} + +if ($viewnamedesc['viewname'] == 'All') { + $smarty->assign("ALL", 'All'); +} + +global $email_title; +$display_title = $mod_strings['LBL_LIST_FORM_TITLE']; +if ($email_title) + $display_title = $email_title; + +//to get the search vtiger_field if exists +if (isset($_REQUEST['search']) && $_REQUEST['search'] != '' && $_REQUEST['search_text'] != '') { + $url_string .= "&search=" . vtlib_purify($_REQUEST['search']) . "&search_field=" . vtlib_purify($_REQUEST['search_field']) . "&search_text=" . vtlib_purify($_REQUEST['search_text']); + if ($_REQUEST['search_field'] != 'join') + $where = $adb->sql_escape_string($_REQUEST['search_field']) . " like '" . formatForSqlLike($_REQUEST['search_text']) . "'"; + else + $where = "(subject like '" . formatForSqlLike($_REQUEST['search_text']) . "' OR vtiger_users.user_name like '" . formatForSqlLike($_REQUEST['search_text']) . "')"; +} + + +//Retreive the list from Database +//<<<<<<<<>>>>>>>> +if ($viewid != "0") { + $listquery = getListQuery("Emails"); + $list_query = $oCustomView->getModifiedCvListQuery($viewid, $listquery, "Emails"); +} else { + $list_query = getListQuery("Emails"); +} +//<<<<<<<>>>>>>>> + +if (isset($where) && $where != '') { + $list_query .= " AND " . $where; +} +if ($_REQUEST['folderid'] == '2') { + $list_query .= " AND vtiger_seactivityrel.crmid in (select contactid from vtiger_contactdetails) AND vtiger_emaildetails.email_flag !='WEBMAIL'"; +} +if ($_REQUEST['folderid'] == '3') { + $list_query .= " AND vtiger_seactivityrel.crmid in (select accountid from vtiger_account)"; +} +if ($_REQUEST['folderid'] == '4') { + $list_query .= " AND vtiger_seactivityrel.crmid in (select leadid from vtiger_leaddetails)"; +} +if ($_REQUEST['folderid'] == '5') { + $list_query .= " AND vtiger_salesmanactivityrel.smid in (select id from vtiger_users)"; +} +if ($_REQUEST['folderid'] == '6') { + $list_query .= " AND vtiger_emaildetails.email_flag ='WEBMAIL'"; +} +if (isset($order_by) && $order_by != '') { + $tablename = getTableNameForField('Emails', $order_by); + $tablename = (($tablename != '') ? ($tablename . ".") : ''); + $list_query .= ' ORDER BY ' . $tablename . $order_by . ' ' . $sorder; +} + +if (PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true) { + $count_result = $adb->query(mkCountQuery($list_query)); + $noofrows = $adb->query_result($count_result, 0, "count"); +} else { + $noofrows = null; +} + +$queryMode = (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true'); +$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, $viewid, $queryMode); + +if (!isset($_REQUEST['start'])) + $start = 1; + +$navigation_array = VT_getSimpleNavigationValues($start, $list_max_entries_per_page, $noofrows); + +$limit_start_rec = ($start - 1) * $list_max_entries_per_page; + + +if ($adb->dbType == "pgsql") + $list_result = $adb->pquery($list_query . " OFFSET $limit_start_rec LIMIT $list_max_entries_per_page", array()); +else + $list_result = $adb->pquery($list_query . " LIMIT $limit_start_rec, $list_max_entries_per_page", array()); + +//Constructing the list view +$smarty->assign("CUSTOMVIEW_OPTION", $customviewcombo_html); +$smarty->assign("VIEWID", $viewid); +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("MODULE", $currentModule); +$smarty->assign("SINGLE_MOD", getTranslatedString('SINGLE_' . $currentModule, $currentModule)); +$smarty->assign("BUTTONS", $other_text); +$category = getParentTab(); +$smarty->assign("CATEGORY", $category); + +if ($viewid != '') + $url_string .="&viewname=" . $viewid; +if (isset($_REQUEST['folderid']) && $_REQUEST['folderid'] != '') + $url_string .= "&folderid=" . vtlib_purify($_REQUEST['folderid']); + +$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string, $currentModule, $_REQUEST['folderid'], $viewid); +$smarty->assign("NAVIGATION", $navigationOutput); + +$listview_header = getListViewHeader($focus, "Emails", $url_string, $sorder, $order_by, "", $oCustomView); +$smarty->assign("LISTHEADER", $listview_header); + +$listview_entries = getListViewEntries($focus, "Emails", $list_result, $navigation_array, "", "", "EditView", "Delete", $oCustomView); +//--------------------------added to fix the ticket(4386)------------------------START +foreach ($listview_entries as $key => $value) { + $sql = "select email_flag from vtiger_emaildetails where emailid=?"; + $result = $adb->pquery($sql, array($key)); + $email_flag = $adb->query_result($result, 0, "email_flag"); + $emailid[$key] = $email_flag; +} +$smarty->assign("EMAILFALG", $emailid); +//--------------------------added to fix the ticket(4386)------------------------END + +$smarty->assign("LISTENTITY", $listview_entries); +$smarty->assign("SELECT_SCRIPT", $view_script); + +$smarty->assign("USERID", $current_user->id); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); +$smarty->assign("theme", $theme); +if ($_REQUEST['ajax'] != '') + $smarty->display("EmailContents.tpl"); +else + $smarty->display("Emails.tpl"); +?> \ No newline at end of file diff --git a/modules/Emails/ListViewPagging.php b/modules/Emails/ListViewPagging.php new file mode 100644 index 0000000..333f176 --- /dev/null +++ b/modules/Emails/ListViewPagging.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Emails/PHPMailer_LICENSE.txt b/modules/Emails/PHPMailer_LICENSE.txt new file mode 100644 index 0000000..f3f1b3b --- /dev/null +++ b/modules/Emails/PHPMailer_LICENSE.txt @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/modules/Emails/PrintEmail.php b/modules/Emails/PrintEmail.php new file mode 100644 index 0000000..dfc3b10 --- /dev/null +++ b/modules/Emails/PrintEmail.php @@ -0,0 +1,89 @@ +assign('MOD',$mod_strings); +$smarty->assign('THEME',$theme); + +if(isset($_REQUEST['record']) && $_REQUEST['record'] !='' && $_REQUEST['mailbox'] == '') +{ + $focus->id = $_REQUEST['record']; + $focus->mode = 'edit'; + $focus->retrieve_entity_info($_REQUEST['record'],"Emails"); + + $focus->name=$focus->column_fields['name']; + if(isset($_REQUEST['print']) && $_REQUEST['print'] !='') + { + $query = 'select idlists,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid =?'; + $result = $adb->pquery($query, array($focus->id)); + $smarty->assign('FROM_MAIL',$adb->query_result($result,0,'from_email')); + $to_email = vt_suppressHTMLTags(implode(',',$json->decode($adb->query_result($result,0,'to_email')))); + $smarty->assign('TO_MAIL',$to_email); + $cc_add = vt_suppressHTMLTags(implode(',',$json->decode($adb->query_result($result,0,'cc_email')))); + $smarty->assign('CC_MAIL',$cc_add); + $bcc_add = vt_suppressHTMLTags(implode(',',$json->decode($adb->query_result($result,0,'bcc_email')))); + $smarty->assign('BCC_MAIL',$bcc_add); + $smarty->assign('SUBJECT',$focus->column_fields['subject']); + $smarty->assign('DESCRIPTION',$focus->column_fields['description']); + } + $smarty->display('PrintEmail.tpl'); +} + +if(isset($_REQUEST['record']) && isset($_REQUEST['mailbox']) && $_REQUEST['print']) +{ + if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "") +{ + $mailbox=$_REQUEST["mailbox"]; +} +else +{ + $mailbox="INBOX"; +} +$mailid = $_REQUEST['record']; +$MailBox = new MailBox($mailbox); +$mail = $MailBox->mbox; +$email = new Webmails($MailBox->mbox,$mailid); +$status=imap_setflag_full($MailBox->mbox,$mailid,"\\Seen"); +$attach_tab=array(); +$email->loadMail($attach_tab); +echo "\n"; +$subject = utf8_decode(utf8_encode(imap_utf8($email->subject))); +$from = decode_header($email->from); +$to = decode_header($email->to[0]); +$cc = decode_header($email->cc_header); +$date = decode_header($email->date); +for($i=0;$iattname);$i++){ + $attachment_links .= $email->anchor_arr[$i].decode_header($email->attname[$i])."
                     "; +} +$content['body'] = $email->body; +$content['attachtab'] = $email->attachtab; + +$smarty->assign('FROM_MAIL',$from); +$smarty->assign('TO_MAIL',trim($to,",").","); +$smarty->assign('SUBJECT',$subject); +$smarty->assign('DESCRIPTION',$content['body']); +$smarty->display('PrintEmail.tpl'); +} + +?> diff --git a/modules/Emails/Save.php b/modules/Emails/Save.php new file mode 100644 index 0000000..04a5401 --- /dev/null +++ b/modules/Emails/Save.php @@ -0,0 +1,264 @@ +num_rows($adb->pquery($sql, array('email')),0,"id"); + if($records != '') + echo 'SUCCESS'; + else + echo 'FAILURE'; + die; +} + +//Added on 09-11-2005 to avoid loading the webmail vtiger_files in Email process +if($_REQUEST['smodule'] != '') +{ + define('SM_PATH','modules/squirrelmail-1.4.4/'); + /* SquirrelMail required vtiger_files. */ + require_once(SM_PATH . 'functions/strings.php'); + require_once(SM_PATH . 'functions/imap_general.php'); + require_once(SM_PATH . 'functions/imap_messages.php'); + require_once(SM_PATH . 'functions/i18n.php'); + require_once(SM_PATH . 'functions/mime.php'); + require_once(SM_PATH .'include/load_prefs.php'); + //require_once(SM_PATH . 'class/mime/Message.class.php'); + require_once(SM_PATH . 'class/mime.class.php'); + sqgetGlobalVar('key', $key, SQ_COOKIE); + sqgetGlobalVar('username', $username, SQ_SESSION); + sqgetGlobalVar('onetimepad',$onetimepad, SQ_SESSION); + $mailbox = 'INBOX'; +} + +require_once('modules/Emails/Emails.php'); +require_once('include/logging.php'); +require_once('include/database/PearDatabase.php'); + +$local_log =& LoggerManager::getLogger('index'); + +$focus = new Emails(); + +global $current_user,$mod_strings,$app_strings; +if(isset($_REQUEST['description']) && $_REQUEST['description'] !='') + $_REQUEST['description'] = fck_from_html($_REQUEST['description']); + +$all_to_ids = $_REQUEST["hidden_toid"]; +$all_to_ids .= $_REQUEST["saved_toid"]; +$_REQUEST["saved_toid"] = $all_to_ids; +//we always save the email with "save" status and when it is sent it is marked as SENT +$_REQUEST['email_flag'] = 'SAVED'; +setObjectValuesFromRequest($focus); +//Check if the file is exist or not. +//$file_name = ''; +if(isset($_REQUEST['filename_hidden'])) { + $file_name = $_REQUEST['filename_hidden']; +} else { + $file_name = $_FILES['filename']['name']; +} +$errorCode = $_FILES['filename']['error']; +$errormessage = ""; +if($file_name != '' && $_FILES['filename']['size'] == 0) +{ + if($errorCode == 4 || $errorCode == 0) + { + if($_FILES['filename']['size'] == 0) + $errormessage = "".$mod_strings['LBL_PLEASE_ATTACH']."
"; + } + else if($errorCode == 2) + { + $errormessage = "".$mod_strings['LBL_EXCEED_MAX'].$upload_maxsize.$mod_strings['LBL_BYTES']."
"; + } + else if($errorCode == 6) + { + $errormessage = "".$mod_strings['LBL_KINDLY_UPLOAD']."
" ; + } + else if($errorCode == 3 ) + { + if($_FILES['filename']['size'] == 0) + $errormessage = "".$mod_strings['LBL_PLEASE_ATTACH']."
"; + } + else{} + if($errormessage != ""){ + $ret_error = 1; + $ret_parentid = vtlib_purify($_REQUEST['parent_id']); + $ret_toadd = vtlib_purify($_REQUEST['parent_name']); + $ret_subject = vtlib_purify($_REQUEST['subject']); + $ret_ccaddress = vtlib_purify($_REQUEST['ccmail']); + $ret_bccaddress = vtlib_purify($_REQUEST['bccmail']); + $ret_description = vtlib_purify($_REQUEST['description']); + echo $errormessage; + include("EditView.php"); + exit(); + } +} + + +if($_FILES["filename"]["size"] == 0 && $_FILES["filename"]["name"] != '') +{ + $file_upload_error = true; + $_FILES = ''; +} + +if((isset($_REQUEST['deletebox']) && $_REQUEST['deletebox'] != null) && $_REQUEST['addbox'] == null) +{ + imap_delete($mbox,$_REQUEST['deletebox']); + imap_expunge($mbox); + header("Location: index.php?module=Emails&action=index"); + exit(); +} + +function checkIfContactExists($mailid) +{ + global $log; + $log->debug("Entering checkIfContactExists(".$mailid.") method ..."); + global $adb; + $sql = "select contactid from vtiger_contactdetails inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_contactdetails.contactid where vtiger_crmentity.deleted=0 and email= ?"; + $result = $adb->pquery($sql, array($mailid)); + $numRows = $adb->num_rows($result); + if($numRows > 0) + { + $log->debug("Exiting checkIfContactExists method ..."); + return $adb->query_result($result,0,"contactid"); + } + else + { + $log->debug("Exiting checkIfContactExists method ..."); + return -1; + } +} +//assign the focus values +$focus->filename = $_REQUEST['file_name']; +$focus->parent_id = vtlib_purify($_REQUEST['parent_id']); +$focus->parent_type = vtlib_purify($_REQUEST['parent_type']); +$focus->column_fields["assigned_user_id"]=$current_user->id; +$focus->column_fields["activitytype"]="Emails"; +$focus->column_fields["date_start"]= date(getNewDisplayDate());//This will be converted to db date format in save +if((!empty($_REQUEST['record'])&& $_REQUEST['send_mail']==false && + !empty($_REQUEST['mode']))) { + $focus->mode = 'edit'; +} elseif(empty($_REQUEST['record']) ||(!empty($_REQUEST['record'])&& $_REQUEST['send_mail']== false + && empty($_REQUEST['mode'])) || !empty($_REQUEST['record'])&& $_REQUEST['send_mail']==true + && empty($_REQUEST['mode'])) { + $focus->mode = ''; + $focus->id = ''; +} else { + $focus->mode = 'edit'; +} +$focus->save("Emails"); +$return_id = $focus->id; + +require_once("modules/Emails/mail.php"); +if(isset($_REQUEST['send_mail']) && $_REQUEST['send_mail'] && $_REQUEST['parent_id'] != '') +{ + $user_mail_status = send_mail('Emails',$current_user->column_fields['email1'],$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],$_REQUEST['ccmail'],$_REQUEST['bccmail'],'all',$focus->id); + + //if block added to fix the issue #3759 + if($user_mail_status != 1){ + $query = "select crmid,attachmentsid from vtiger_seattachmentsrel where crmid=?"; + $result = $adb->pquery($query, array($email_id)); + $numOfRows = $adb->num_rows($result); + for($i=0; $i<$numOfRows; $i++) + { + $attachmentsid = $adb->query_result($result,0,"attachmentsid"); + if($attachmentsid > 0) + { + $query1="delete from vtiger_crmentity where crmid=?"; + $adb->pquery($query1, array($attachmentsid)); + } + + $crmid=$adb->query_result($result,0,"crmid"); + $query2="delete from vtiger_crmentity where crmid=?"; + $adb->pquery($query2, array($crmid)); + } + + $query = "delete from vtiger_emaildetails where emailid=?"; + $adb->pquery($query, array($focus->id)); + + $error_msg = "".$mod_strings['LBL_CHECK_USER_MAILID'].""; + $ret_error = 1; + $ret_parentid = vtlib_purify($_REQUEST['parent_id']); + $ret_toadd = vtlib_purify($_REQUEST['parent_name']); + $ret_subject = vtlib_purify($_REQUEST['subject']); + $ret_ccaddress = vtlib_purify($_REQUEST['ccmail']); + $ret_bccaddress = vtlib_purify($_REQUEST['bccmail']); + $ret_description = vtlib_purify($_REQUEST['description']); + echo $error_msg; + include("EditView.php"); + exit(); + } + +} +$focus->retrieve_entity_info($return_id,"Emails"); + +//this is to receive the data from the Select Users button +if($_REQUEST['source_module'] == null) +{ + $module = 'users'; +} +//this will be the case if the Select Contact button is chosen +else +{ + $module = $_REQUEST['source_module']; +} + +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") + $return_module = vtlib_purify($_REQUEST['return_module']); +else + $return_module = "Emails"; + +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") + $return_action = vtlib_purify($_REQUEST['return_action']); +else + $return_action = "DetailView"; + +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") + $return_id = vtlib_purify($_REQUEST['return_id']); + +if(isset($_REQUEST['filename']) && $_REQUEST['filename'] != "") + $filename = vtlib_purify($_REQUEST['filename']); + +$local_log->debug("Saved record with id of ".$return_id); + +if(isset($_REQUEST['send_mail']) && $_REQUEST['send_mail'] && $_REQUEST['parent_id'] == ''){ + if($_REQUEST["parent_name"] != '' && isset($_REQUEST["parent_name"])) { + include("modules/Emails/webmailsend.php"); + } + +} elseif( isset($_REQUEST['send_mail']) && $_REQUEST['send_mail']) + include("modules/Emails/mailsend.php"); + + + +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] == 'mailbox') + header("Location: index.php?module=$return_module&action=index"); +else { + if($_REQUEST['return_viewname'] == '') $return_viewname='0'; + if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']); + //Added for 4600 + $inputs=""; + echo $inputs; +} +?> \ No newline at end of file diff --git a/modules/Emails/SaveBookmarklet.php b/modules/Emails/SaveBookmarklet.php new file mode 100644 index 0000000..db71fa1 --- /dev/null +++ b/modules/Emails/SaveBookmarklet.php @@ -0,0 +1,81 @@ +assign("subject",$_REQUEST['subject']); +$smarty->assign("description",$_REQUEST['description']); + +Zend_Json::$useBuiltinEncoderDecoder = true; +$json = new Zend_Json(); + +$elementType = $_REQUEST['module']; + +global $log,$adb; +$webserviceObject = VtigerWebserviceObject::fromName($adb,$elementType); +$handlerPath = $webserviceObject->getHandlerPath(); +$handlerClass = $webserviceObject->getHandlerClass(); + +require_once $handlerPath; + +$handler = new $handlerClass($webserviceObject,$current_user,$adb,$log); +$meta = $handler->getMeta(); +$meta->retrieveMeta(); + +$types = vtws_listtypes(null, $current_user); +if(!in_array($elementType,$types['types'])){ + throw new WebServiceException(WebServiceErrorCode::$ACCESSDENIED,"Permission to perform the operation is denied"); +} + +$wsFieldDetails = $handler->getField('parent_id'); + +$moduleEntityNameDetails = array(); +$moduleEmailFieldDetails = array(); +foreach ($wsFieldDetails['type']['refersTo'] as $type) { + $referenceModuleHandler = vtws_getModuleHandlerFromName($type, $current_user); + $referenceModuleMeta = $referenceModuleHandler->getMeta(); + $nameFields = explode(',',$referenceModuleMeta->getNameFields()); + $moduleFields = $referenceModuleMeta->getModuleFields(); + $accessibleFields = array_keys($moduleFields); + $accessibleNameFields = array_intersect($nameFields, $accessibleFields); + $moduleEntityNameDetails[$type] = $accessibleNameFields; + $moduleEmailFieldDetails[$type] = $referenceModuleMeta->getEmailFields(); +} + +$smarty->assign("types",$wsFieldDetails['type']['refersTo']); +$smarty->assign("entityNameFields",$json->encode($moduleEntityNameDetails)); +$smarty->assign("emailFields",$json->encode($moduleEmailFieldDetails)); +$smarty->assign("userEmail",$current_user->column_fields['email1']); + +$smarty->display("modules/Bookmarklet/Bookmarklet.tpl"); +?> \ No newline at end of file diff --git a/modules/Emails/TrackAccess.php b/modules/Emails/TrackAccess.php new file mode 100644 index 0000000..95de9f4 --- /dev/null +++ b/modules/Emails/TrackAccess.php @@ -0,0 +1,40 @@ +pquery("INSERT INTO vtiger_email_access(crmid, mailid, accessdate, accesstime) VALUES(?,?,?,?)", array($crmid, $mailid, date('Y-m-d'), date('H:i:s'))); + +$result = $adb->pquery("select count(*) as count from vtiger_email_access where crmid=? and mailid=?",array($crmid, $mailid)); +$count = $adb->query_result($result,0,'count'); + +$result = $adb->pquery("select * from vtiger_email_track where crmid=? and mailid=?", array($crmid, $mailid)); +if($adb->num_rows($result)>0){ + $adb->pquery("update vtiger_email_track set access_count=? where crmid=? and mailid=?", array($count, $crmid, $mailid)); +} else { + $adb->pquery("insert into vtiger_email_track(crmid,mailid,access_count) values(?,?,?)", array($crmid, $mailid, 1)); +} + +?> \ No newline at end of file diff --git a/modules/Emails/UnifiedSearch.php b/modules/Emails/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Emails/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Emails/class.phpmailer.php b/modules/Emails/class.phpmailer.php new file mode 100644 index 0000000..cd60e70 --- /dev/null +++ b/modules/Emails/class.phpmailer.php @@ -0,0 +1,1510 @@ +ContentType = "text/html"; + else + $this->ContentType = "text/plain"; + } + + /** + * Sets Mailer to send message using SMTP. + * @return void + */ + function IsSMTP() { + $this->Mailer = "smtp"; + } + + /** + * Sets Mailer to send message using PHP mail() function. + * @return void + */ + function IsMail() { + $this->Mailer = "mail"; + } + + /** + * Sets Mailer to send message using the $Sendmail program. + * @return void + */ + function IsSendmail() { + $this->Mailer = "sendmail"; + } + + /** + * Sets Mailer to send message using the qmail MTA. + * @return void + */ + function IsQmail() { + $this->Sendmail = "/var/qmail/bin/sendmail"; + $this->Mailer = "sendmail"; + } + + + ///////////////////////////////////////////////// + // RECIPIENT METHODS + ///////////////////////////////////////////////// + + /** + * Adds a "To" address. + * @param string $address + * @param string $name + * @return void + */ + function AddAddress($address, $name = "") { + $cur = count($this->to); + $this->to[$cur][0] = trim($address); + $this->to[$cur][1] = $name; + } + + /** + * Adds a "Cc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + function AddCC($address, $name = "") { + $cur = count($this->cc); + $this->cc[$cur][0] = trim($address); + $this->cc[$cur][1] = $name; + } + + /** + * Adds a "Bcc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + function AddBCC($address, $name = "") { + $cur = count($this->bcc); + $this->bcc[$cur][0] = trim($address); + $this->bcc[$cur][1] = $name; + } + + /** + * Adds a "Reply-to" address. + * @param string $address + * @param string $name + * @return void + */ + function AddReplyTo($address, $name = "") { + $cur = count($this->ReplyTo); + $this->ReplyTo[$cur][0] = trim($address); + $this->ReplyTo[$cur][1] = $name; + } + + + ///////////////////////////////////////////////// + // MAIL SENDING METHODS + ///////////////////////////////////////////////// + + /** + * Creates message and assigns Mailer. If the message is + * not sent successfully then it returns false. Use the ErrorInfo + * variable to view description of the error. + * @return bool + */ + function Send() { + $header = ""; + $body = ""; + $result = true; + + if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) + { + $this->SetError($this->Lang("provide_address")); + return false; + } + + // Set whether the message is multipart/alternative + if(!empty($this->AltBody)) + $this->ContentType = "multipart/alternative"; + + $this->error_count = 0; // reset errors + $this->SetMessageType(); + $header .= $this->CreateHeader(); + $body = $this->CreateBody(); + + if($body == "") { return false; } + + // Choose the mailer + switch($this->Mailer) + { + case "sendmail": + $result = $this->SendmailSend($header, html_entity_decode($body,ENT_COMPAT,$this->CharSet)); + break; + case "mail": + $result = $this->MailSend($header, html_entity_decode($body,ENT_COMPAT,$this->CharSet)); + break; + case "smtp": + $result = $this->SmtpSend($header, html_entity_decode($body,ENT_COMPAT,$this->CharSet)); + break; + default: + $this->SetError($this->Mailer . $this->Lang("mailer_not_supported")); + $result = false; + break; + } + + return $result; + } + + /** + * Sends mail using the $Sendmail program. + * @access private + * @return bool + */ + function SendmailSend($header, $body) { + if ($this->Sender != "") + $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellcmd($this->Sender)); + else + $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); + + if(!@$mail = popen($sendmail, "w")) + { + $this->SetError($this->Lang("execute") . $this->Sendmail); + return false; + } + + fputs($mail, $header); + fputs($mail, $body); + + $result = pclose($mail) >> 8 & 0xFF; + if($result != 0) + { + $this->SetError($this->Lang("execute") . $this->Sendmail); + return false; + } + + return true; + } + + /** + * Sends mail using the PHP mail() function. + * @access private + * @return bool + */ + function MailSend($header, $body) { + $to = ""; + for($i = 0; $i < count($this->to); $i++) + { + if($i != 0) { $to .= ", "; } + $to .= $this->to[$i][0]; + } + + if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1) + { + $old_from = ini_get("sendmail_from"); + ini_set("sendmail_from", $this->Sender); + $params = sprintf("-oi -f %s", $this->Sender); + $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, + $header, $params); + } + else + $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header); + + if (isset($old_from)) + ini_set("sendmail_from", $old_from); + + if(!$rt) + { + $this->SetError($this->Lang("instantiate")); + return false; + } + + return true; + } + + /** + * Sends mail via SMTP using PhpSMTP (Author: + * Chris Ryan). Returns bool. Returns false if there is a + * bad MAIL FROM, RCPT, or DATA input. + * @access private + * @return bool + */ + function SmtpSend($header, $body) { + include_once($this->PluginDir . "class.smtp.php"); + $error = ""; + $bad_rcpt = array(); + + if(!$this->SmtpConnect()) + return false; + + $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender; + if(!$this->smtp->Mail($smtp_from)) + { + $error = $this->Lang("from_failed") . $smtp_from; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + // Attempt to send attach all recipients + for($i = 0; $i < count($this->to); $i++) + { + if(!$this->smtp->Recipient($this->to[$i][0])) + $bad_rcpt[] = $this->to[$i][0]; + } + for($i = 0; $i < count($this->cc); $i++) + { + if(!$this->smtp->Recipient($this->cc[$i][0])) + $bad_rcpt[] = $this->cc[$i][0]; + } + for($i = 0; $i < count($this->bcc); $i++) + { + if(!$this->smtp->Recipient($this->bcc[$i][0])) + $bad_rcpt[] = $this->bcc[$i][0]; + } + + if(count($bad_rcpt) > 0) // Create error message + { + for($i = 0; $i < count($bad_rcpt); $i++) + { + if($i != 0) { $error .= ", "; } + $error .= $bad_rcpt[$i]; + } + $error = $this->Lang("recipients_failed") . $error; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + if(!$this->smtp->Data($header . $body)) + { + $this->SetError($this->Lang("data_not_accepted")); + $this->smtp->Reset(); + return false; + } + if($this->SMTPKeepAlive == true) + $this->smtp->Reset(); + else + $this->SmtpClose(); + + return true; + } + + /** + * Initiates a connection to an SMTP server. Returns false if the + * operation failed. + * @access private + * @return bool + */ + function SmtpConnect() { + if($this->smtp == NULL) { $this->smtp = new SMTP(); } + + $this->smtp->do_debug = $this->SMTPDebug; + $hosts = explode(";", $this->Host); + $index = 0; + $connection = ($this->smtp->Connected()); + + // Retry while there is no connection + while($index < count($hosts) && $connection == false) + { + if(strstr($hosts[$index], ":")) + { + #list($host, $port) = explode(":", $hosts[$index]); + $hostA = explode(':', $hosts[$index]); + if (is_numeric(end($hostA))) + $port = array_pop($hostA); + else + $port = $this->Port; + $host = implode(':', $hostA); + } + else + { + $host = $hosts[$index]; + $port = $this->Port; + } + + if($this->smtp->Connect($host, $port, $this->Timeout)) + { + if ($this->Helo != '') + $this->smtp->Hello($this->Helo); + else + $this->smtp->Hello($this->ServerHostname()); + + if($this->SMTPAuth) + { + if(!$this->smtp->Authenticate($this->Username, + $this->Password)) + { + $this->SetError($this->Lang("authenticate")); + $this->smtp->Reset(); + $connection = false; + } + } + $connection = true; + } + $index++; + } + if(!$connection) + $this->SetError($this->Lang("connect_host")); + + return $connection; + } + + /** + * Closes the active SMTP session if one exists. + * @return void + */ + function SmtpClose() { + if($this->smtp != NULL) + { + if($this->smtp->Connected()) + { + $this->smtp->Quit(); + $this->smtp->Close(); + } + } + } + + /** + * Sets the language for all class error messages. Returns false + * if it cannot load the language file. The default language type + * is English. + * @param string $lang_type Type of language (e.g. Portuguese: "br") + * @param string $lang_path Path to the language file directory + * @access public + * @return bool + */ + function SetLanguage($lang_type, $lang_path = "language/") { + global $root_directory; + if(file_exists($root_directory.'/modules/Emails/'.$lang_path.'phpmailer.lang-'.$lang_type.'.php')) + include($root_directory.'/modules/Emails/'.$lang_path.'phpmailer.lang-'.$lang_type.'.php'); + else if(file_exists($root_directory.'/modules/Emails/'.$lang_path.'phpmailer.lang-en.php')) + include($root_directory.'/modules/Emails/'.$lang_path.'phpmailer.lang-en.php'); + else + { + $this->SetError("Could not load language file"); + return false; + } + $this->language = $PHPMAILER_LANG; + + return true; + } + + ///////////////////////////////////////////////// + // MESSAGE CREATION METHODS + ///////////////////////////////////////////////// + + /** + * Creates recipient vtiger_headers. + * @access private + * @return string + */ + function AddrAppend($type, $addr) { + $addr_str = $type . ": "; + $addr_str .= $this->AddrFormat($addr[0]); + if(count($addr) > 1) + { + for($i = 1; $i < count($addr); $i++) + $addr_str .= ", " . $this->AddrFormat($addr[$i]); + } + $addr_str .= $this->LE; + + return $addr_str; + } + + /** + * Formats an address correctly. + * @access private + * @return string + */ + function AddrFormat($addr) { + if(empty($addr[1])) + $formatted = $addr[0]; + else + { + $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . + $addr[0] . ">"; + } + + return $formatted; + } + + /** + * Wraps message for use with mailers that do not + * automatically perform wrapping and for quoted-printable. + * Original written by philippe. + * @access private + * @return string + */ + function WrapText($message, $length, $qp_mode = false) { + $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; + + $message = $this->FixEOL($message); + if (substr($message, -1) == $this->LE) + $message = substr($message, 0, -1); + + $line = explode($this->LE, $message); + $message = ""; + for ($i=0 ;$i < count($line); $i++) + { + $line_part = explode(" ", $line[$i]); + $buf = ""; + for ($e = 0; $e $length)) + { + $space_left = $length - strlen($buf) - 1; + if ($e != 0) + { + if ($space_left > 20) + { + $len = $space_left; + if (substr($word, $len - 1, 1) == "=") + $len--; + elseif (substr($word, $len - 2, 1) == "=") + $len -= 2; + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= " " . $part; + $message .= $buf . sprintf("=%s", $this->LE); + } + else + { + $message .= $buf . $soft_break; + } + $buf = ""; + } + while (strlen($word) > 0) + { + $len = $length; + if (substr($word, $len - 1, 1) == "=") + $len--; + elseif (substr($word, $len - 2, 1) == "=") + $len -= 2; + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) + $message .= $part . sprintf("=%s", $this->LE); + else + $buf = $part; + } + } + else + { + $buf_o = $buf; + $buf .= ($e == 0) ? $word : (" " . $word); + + if (strlen($buf) > $length and $buf_o != "") + { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + } + $message .= $buf . $this->LE; + } + + return $message; + } + + /** + * Set the body wrapping. + * @access private + * @return void + */ + function SetWordWrap() { + if($this->WordWrap < 1) + return; + + switch($this->message_type) + { + case "alt": + // fall through + case "alt_attachments": + $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->WrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assembles message header. + * @access private + * @return string + */ + function CreateHeader() { + $result = ""; + + // Set the boundaries + $uniq_id = md5(uniqid(time())); + $this->boundary[1] = "b1_" . $uniq_id; + $this->boundary[2] = "b2_" . $uniq_id; + + $result .= $this->HeaderLine("Date", $this->RFCDate()); + if($this->Sender == "") + $result .= $this->HeaderLine("Return-Path", trim($this->From)); + else + $result .= $this->HeaderLine("Return-Path", trim($this->Sender)); + + // To be created automatically by mail() + if($this->Mailer != "mail") + { + if(count($this->to) > 0) + $result .= $this->AddrAppend("To", $this->to); + else if (count($this->cc) == 0) + $result .= $this->HeaderLine("To", "undisclosed-recipients:;"); + if(count($this->cc) > 0) + $result .= $this->AddrAppend("Cc", $this->cc); + } + + $from = array(); + $from[0][0] = trim($this->From); + $from[0][1] = $this->FromName; + $result .= $this->AddrAppend("From", $from); + + // sendmail and mail() extract Bcc from the header before sending + if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0)) + $result .= $this->AddrAppend("Bcc", $this->bcc); + + if(count($this->ReplyTo) > 0) + $result .= $this->AddrAppend("Reply-to", $this->ReplyTo); + + // mail() sets the subject itself + if($this->Mailer != "mail") + $result .= $this->HeaderLine("Subject", $this->EncodeHeader(trim($this->Subject))); + + $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + $result .= $this->HeaderLine("X-Priority", $this->Priority); + $result .= $this->HeaderLine("X-Mailer", "PHPMailer [version " . $this->Version . "]"); + + if($this->ConfirmReadingTo != "") + { + $result .= $this->HeaderLine("Disposition-Notification-To", + "<" . trim($this->ConfirmReadingTo) . ">"); + } + + // Add custom vtiger_headers + for($index = 0; $index < count($this->CustomHeader); $index++) + { + $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), + $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); + } + $result .= $this->HeaderLine("MIME-Version", "1.0"); + + switch($this->message_type) + { + case "plain": + $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding); + $result .= sprintf("Content-Type: %s; charset=\"%s\"", + $this->ContentType, $this->CharSet); + break; + case "attachments": + // fall through + case "alt_attachments": + if($this->InlineImageExists()) + { + $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", + "multipart/related", $this->LE, $this->LE, + $this->boundary[1], $this->LE); + } + else + { + $result .= $this->HeaderLine("Content-Type", "multipart/mixed;"); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + } + break; + case "alt": + $result .= $this->HeaderLine("Content-Type", "multipart/alternative;"); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + } + + if($this->Mailer != "mail") + $result .= $this->LE.$this->LE; + + return $result; + } + + /** + * Assembles the message body. Returns an empty string on failure. + * @access private + * @return string + */ + function CreateBody() { + $result = ""; + + $this->SetWordWrap(); + + switch($this->message_type) + { + case "alt": + $result .= $this->GetBoundary($this->boundary[1], "", + "text/plain", ""); + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; + $result .= $this->GetBoundary($this->boundary[1], "", + "text/html", ""); + + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; + + $result .= $this->EndBoundary($this->boundary[1]); + break; + case "plain": + $result .= $this->EncodeString($this->Body, $this->Encoding); + break; + case "attachments": + $result .= $this->GetBoundary($this->boundary[1], "", "", ""); + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE; + + $result .= $this->AttachAll(); + break; + case "alt_attachments": + $result .= sprintf("--%s%s", $this->boundary[1], $this->LE); + $result .= sprintf("Content-Type: %s;%s" . + "\tboundary=\"%s\"%s", + "multipart/alternative", $this->LE, + $this->boundary[2], $this->LE.$this->LE); + + // Create text body + $result .= $this->GetBoundary($this->boundary[2], "", + "text/plain", "") . $this->LE; + + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; + + // Create the HTML body + $result .= $this->GetBoundary($this->boundary[2], "", + "text/html", "") . $this->LE; + + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; + + $result .= $this->EndBoundary($this->boundary[2]); + + $result .= $this->AttachAll(); + break; + } + if($this->IsError()) + $result = ""; + + return $result; + } + + /** + * Returns the start of a message boundary. + * @access private + */ + function GetBoundary($boundary, $charSet, $contentType, $encoding) { + $result = ""; + if($charSet == "") { $charSet = $this->CharSet; } + if($contentType == "") { $contentType = $this->ContentType; } + if($encoding == "") { $encoding = $this->Encoding; } + + $result .= $this->TextLine("--" . $boundary); + $result .= sprintf("Content-Type: %s; charset = \"%s\"", + $contentType, $charSet); + $result .= $this->LE; + $result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding); + $result .= $this->LE; + + return $result; + } + + /** + * Returns the end of a message boundary. + * @access private + */ + function EndBoundary($boundary) { + return $this->LE . "--" . $boundary . "--" . $this->LE; + } + + /** + * Sets the message type. + * @access private + * @return void + */ + function SetMessageType() { + if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) + $this->message_type = "plain"; + else + { + if(count($this->attachment) > 0) + $this->message_type = "attachments"; + if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) + $this->message_type = "alt"; + if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) + $this->message_type = "alt_attachments"; + } + } + + /** + * Returns a formatted header line. + * @access private + * @return string + */ + function HeaderLine($name, $value) { + return $name . ": " . $value . $this->LE; + } + + /** + * Returns a formatted mail line. + * @access private + * @return string + */ + function TextLine($value) { + return $value . $this->LE; + } + + ///////////////////////////////////////////////// + // ATTACHMENT METHODS + ///////////////////////////////////////////////// + + /** + * Adds an attachment from a path on the vtiger_filesystem. + * Returns false if the file could not be found + * or accessed. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + function AddAttachment($path, $name = "", $encoding = "base64", + $type = "application/octet-stream") { + if(!@is_file($path)) + { + $this->SetError($this->Lang("file_access") . $path); + return false; + } + + $filename = basename($path); + if($name == "") + $name = $filename; + + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; // isStringAttachment + $this->attachment[$cur][6] = "attachment"; + $this->attachment[$cur][7] = 0; + + return true; + } + + /** + * Attaches all fs, string, and binary vtiger_attachments to the message. + * Returns an empty string on failure. + * @access private + * @return string + */ + function AttachAll() { + // Return text of body + $mime = array(); + + // Add all vtiger_attachments + for($i = 0; $i < count($this->attachment); $i++) + { + // Check for string attachment + $bString = $this->attachment[$i][5]; + if ($bString) + $string = $this->attachment[$i][0]; + else + $path = $this->attachment[$i][0]; + + $filename = $this->attachment[$i][1]; + $name = $this->attachment[$i][2]; + $encoding = $this->attachment[$i][3]; + $type = $this->attachment[$i][4]; + $disposition = $this->attachment[$i][6]; + $cid = $this->attachment[$i][7]; + + $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); + $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE); + $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); + + if($disposition == "inline") + $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); + + $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", + $disposition, $name, $this->LE.$this->LE); + + // Encode as string attachment + if($bString) + { + $mime[] = $this->EncodeString($string, $encoding); + if($this->IsError()) { return ""; } + $mime[] = $this->LE.$this->LE; + } + else + { + $mime[] = $this->EncodeFile($path, $encoding); + if($this->IsError()) { return ""; } + $mime[] = $this->LE.$this->LE; + } + } + + $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); + + return join("", $mime); + } + + /** + * Encodes attachment in requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + function EncodeFile ($path, $encoding = "base64") { + if(!@$fd = fopen($path, "rb")) + { + $this->SetError($this->Lang("file_open") . $path); + return ""; + } + $magic_quotes = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + $file_buffer = fread($fd, filesize($path)); + $file_buffer = $this->EncodeString($file_buffer, $encoding); + fclose($fd); + set_magic_quotes_runtime($magic_quotes); + + return $file_buffer; + } + + /** + * Encodes string to requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + function EncodeString ($str, $encoding = "base64") { + $encoded = ""; + switch(strtolower($encoding)) { + case "base64": + // chunk_split is found in PHP >= 3.0.6 + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case "7bit": + case "8bit": + $encoded = $this->FixEOL($str); + if (substr($encoded, -(strlen($this->LE))) != $this->LE) + $encoded .= $this->LE; + break; + case "binary": + $encoded = $str; + break; + case "quoted-printable": + $encoded = $this->EncodeQP($str); + break; + default: + $this->SetError($this->Lang("encoding") . $encoding); + break; + } + return $encoded; + } + + /** + * Encode a header string to best of Q, B, quoted or none. + * @access private + * @return string + */ + function EncodeHeader ($str, $position = 'text') { + $x = 0; + + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know what value has magic_quotes_sybase. + $encoded = addcslashes($str, "\0..\37\177\\\""); + + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) + return ($encoded); + else + return ("\"$encoded\""); + } + $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + case 'comment': + $x = preg_match_all('/[()"]/', $str, $matches); + // Fall-through + case 'text': + default: + $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if ($x == 0) + return ($str); + + $maxlen = 75 - 7 - strlen($this->CharSet); + // Try to select the encoding which should produce the shortest output + if (strlen($str)/3 < $x) { + $encoding = 'B'; + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } else { + $encoding = 'Q'; + $encoded = $this->EncodeQ($str, $position); + $encoded = $this->WrapText($encoded, $maxlen, true); + $encoded = str_replace("=".$this->LE, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + + return $encoded; + } + + /** + * Encode string to quoted-printable. + * @access private + * @return string + */ + function EncodeQP ($str) { + $encoded = $this->FixEOL($str); + if (substr($encoded, -(strlen($this->LE))) != $this->LE) + $encoded .= $this->LE; + + // Replace every high ascii, control and = characters + $encoded = preg_replace('/([\000-\010\013\014\016-\037\075\177-\377])/e', + "'='.sprintf('%02X', ord('\\1'))", $encoded); + // Replace every spaces and vtiger_tabs when it's the last character on a line + $encoded = preg_replace("/([\011\040])".$this->LE."/e", + "'='.sprintf('%02X', ord('\\1')).'".$this->LE."'", $encoded); + + // Maximum line length of 76 characters before CRLF (74 + space + '=') + $encoded = $this->WrapText($encoded, 74, true); + + return $encoded; + } + + /** + * Encode string to q encoding. + * @access private + * @return string + */ + function EncodeQ ($str, $position = "text") { + // There should not be any EOL in the string + $encoded = preg_replace("[\r\n]", "", $str); + + switch (strtolower($position)) { + case "phrase": + $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + break; + case "comment": + $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + case "text": + default: + // Replace every high ascii, control =, ? and _ characters + $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', + "'='.sprintf('%02X', ord('\\1'))", $encoded); + break; + } + + // Replace every spaces to _ (more readable than =20) + $encoded = str_replace(" ", "_", $encoded); + + return $encoded; + } + + /** + * Adds a string or binary attachment (non-filesystem) to the list. + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return void + */ + function AddStringAttachment($string, $filename, $encoding = "base64", + $type = "application/octet-stream") { + // Append to $attachment array + $cur = count($this->attachment); + $this->attachment[$cur][0] = $string; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $filename; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = true; // isString + $this->attachment[$cur][6] = "attachment"; + $this->attachment[$cur][7] = 0; + } + + /** + * Adds an embedded attachment. This can include images, sounds, and + * just about any other document. Make sure to set the $type to an + * image type. For JPEG images use "image/jpeg" and for GIF images + * use "image/gif". + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment. Use this to identify + * the Id for accessing the image in an HTML form. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", + $type = "application/octet-stream") { + + if(!@is_file($path)) + { + $this->SetError($this->Lang("file_access") . $path); + return false; + } + + $filename = basename($path); + if($name == "") + $name = $filename; + + // Append to $attachment array + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; // isStringAttachment + $this->attachment[$cur][6] = "inline"; + $this->attachment[$cur][7] = $cid; + + return true; + } + + /** + * Returns true if an inline attachment is present. + * @access private + * @return bool + */ + function InlineImageExists() { + $result = false; + for($i = 0; $i < count($this->attachment); $i++) + { + if($this->attachment[$i][6] == "inline") + { + $result = true; + break; + } + } + + return $result; + } + + ///////////////////////////////////////////////// + // MESSAGE RESET METHODS + ///////////////////////////////////////////////// + + /** + * Clears all recipients assigned in the TO array. Returns void. + * @return void + */ + function ClearAddresses() { + $this->to = array(); + } + + /** + * Clears all recipients assigned in the CC array. Returns void. + * @return void + */ + function ClearCCs() { + $this->cc = array(); + } + + /** + * Clears all recipients assigned in the BCC array. Returns void. + * @return void + */ + function ClearBCCs() { + $this->bcc = array(); + } + + /** + * Clears all recipients assigned in the ReplyTo array. Returns void. + * @return void + */ + function ClearReplyTos() { + $this->ReplyTo = array(); + } + + /** + * Clears all recipients assigned in the TO, CC and BCC + * array. Returns void. + * @return void + */ + function ClearAllRecipients() { + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); + } + + /** + * Clears all previously set vtiger_filesystem, string, and binary + * vtiger_attachments. Returns void. + * @return void + */ + function ClearAttachments() { + $this->attachment = array(); + } + + /** + * Clears all custom vtiger_headers. Returns void. + * @return void + */ + function ClearCustomHeaders() { + $this->CustomHeader = array(); + } + + + ///////////////////////////////////////////////// + // MISCELLANEOUS METHODS + ///////////////////////////////////////////////// + + /** + * Adds the error message to the error container. + * Returns void. + * @access private + * @return void + */ + function SetError($msg) { + $this->error_count++; + $this->ErrorInfo = $msg; + } + + /** + * Returns the proper RFC 822 formatted date. + * @access private + * @return string + */ + function RFCDate() { + $tz = date("Z"); + $tzs = ($tz < 0) ? "-" : "+"; + $tz = abs($tz); + $tz = ($tz/3600)*100 + ($tz%3600)/60; + $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz); + + return $result; + } + + /** + * Returns the appropriate server variable. Should work with both + * PHP 4.1.0+ as well as older versions. Returns an empty string + * if nothing is found. + * @access private + * @return mixed + */ + function ServerVar($varName) { + global $HTTP_SERVER_VARS; + global $HTTP_ENV_VARS; + + if(!isset($_SERVER)) + { + $_SERVER = $HTTP_SERVER_VARS; + if(!isset($_SERVER["REMOTE_ADDR"])) + $_SERVER = $HTTP_ENV_VARS; // must be Apache + } + + if(isset($_SERVER[$varName])) + return $_SERVER[$varName]; + else + return ""; + } + + /** + * Returns the server hostname or 'localhost.localdomain' if unknown. + * @access private + * @return string + */ + function ServerHostname() { + if ($this->Hostname != "") + $result = $this->Hostname; + elseif ($this->ServerVar('SERVER_NAME') != "") + $result = $this->ServerVar('SERVER_NAME'); + else + $result = "localhost.localdomain"; + + return $result; + } + + /** + * Returns a message in the appropriate language. + * @access private + * @return string + */ + function Lang($key) { + require_once('config.inc.php'); + global $default_language; + if(count($this->language) < 1) + $this->SetLanguage($default_language); + + if(isset($this->language[$key])) + return $this->language[$key]; + else + return "Language string failed to load: " . $key; + } + + /** + * Returns true if an error occurred. + * @return bool + */ + function IsError() { + return ($this->error_count > 0); + } + + /** + * Changes every end of line from CR or LF to CRLF. + * @access private + * @return string + */ + function FixEOL($str) { + $str = str_replace("\r\n", "\n", $str); + $str = str_replace("\r", "\n", $str); + $str = str_replace("\n", $this->LE, $str); + return $str; + } + + /** + * Adds a custom header. + * @return void + */ + function AddCustomHeader($custom_header) { + $this->CustomHeader[] = explode(":", $custom_header, 2); + } +} + +?> diff --git a/modules/Emails/class.smtp.php b/modules/Emails/class.smtp.php new file mode 100644 index 0000000..abba340 --- /dev/null +++ b/modules/Emails/class.smtp.php @@ -0,0 +1,1050 @@ +smtp_conn = 0; + $this->error = null; + $this->helo_rply = null; + + $this->do_debug = 0; + } + + /************************************************************* + * CONNECTION FUNCTIONS * + ***********************************************************/ + + /** + * Connect to the server specified on the port specified. + * If the port is not specified use the default SMTP_PORT. + * If tval is specified then a connection will try and be + * established with the server for that number of seconds. + * If tval is not specified the default is 30 seconds to + * try on the connection. + * + * SMTP CODE SUCCESS: 220 + * SMTP CODE FAILURE: 421 + * @access public + * @return bool + */ + function Connect($host,$port=0,$tval=30) { + # set the error val to null so there is no confusion + $this->error = null; + + # make sure we are __not__ connected + if($this->connected()) { + # ok we are connected! what should we do? + # for now we will just give an error saying we + # are already connected + $this->error = + array("error" => "Already connected to a server"); + return false; + } + + if(empty($port)) { + $port = $this->SMTP_PORT; + } + + #connect to the smtp server + if(!@$this->smtp_conn = fsockopen($host, # the host of the server + $port, # the port to use + $errno, # error number if any + $errstr, # error message if any + $tval)) # give up after ? secs + { + //echo '
Could Not connect to Mail Server

'; + return false; + } + + # verify we connected properly + if(empty($this->smtp_conn)) { + $this->error = array("error" => "Failed to connect to server", + "errno" => $errno, + "errstr" => $errstr); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": $errstr ($errno)" . $this->CRLF; + } + return false; + } + + # sometimes the SMTP server takes a little longer to respond + # so we will give it a longer timeout for the first read + // Windows still does not have support for this timeout function + if(substr(PHP_OS, 0, 3) != "WIN") + socket_set_timeout($this->smtp_conn, $tval, 0); + + # get any vtiger_announcement stuff + $announce = $this->get_lines(); + + # set the timeout of any socket functions at 1/10 of a second + //if(function_exists("socket_set_timeout")) + // socket_set_timeout($this->smtp_conn, 0, 100000); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce; + } + + return true; + } + + /** + * Performs SMTP authentication. Must be run after running the + * Hello() method. Returns true if successfully authenticated. + * @access public + * @return bool + */ + function Authenticate($username, $password) { + // Start authentication + fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "AUTH not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + // Send encoded username + fputs($this->smtp_conn, base64_encode($username) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "Username not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + // Send encoded password + fputs($this->smtp_conn, base64_encode($password) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 235) { + $this->error = + array("error" => "Password not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return true; + } + + /** + * Returns true if connected to a server otherwise false + * @access private + * @return bool + */ + function Connected() { + if(!empty($this->smtp_conn)) { + $sock_status = socket_get_status($this->smtp_conn); + if($sock_status["eof"]) { + # hmm this is an odd situation... the socket is + # valid but we aren't connected anymore + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE:" . $this->CRLF . + "EOF caught while checking if connected"; + } + $this->Close(); + return false; + } + return true; # everything looks good + } + return false; + } + + /** + * Closes the socket and cleans up the state of the class. + * It is not considered good to use this function without + * first trying to use QUIT. + * @access public + * @return void + */ + function Close() { + $this->error = null; # so there is no confusion + $this->helo_rply = null; + if(!empty($this->smtp_conn)) { + # close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = 0; + } + } + + + /*************************************************************** + * SMTP COMMANDS * + *************************************************************/ + + /** + * Issues a data command and sends the msg_data to the server + * finializing the mail transaction. $msg_data is the message + * that is to be send with the vtiger_headers. Each header needs to be + * on a single line followed by a with the message vtiger_headers + * and the message body being seperated by and additional . + * + * Implements rfc 821: DATA + * + * SMTP CODE INTERMEDIATE: 354 + * [data] + * . + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 552,554,451,452 + * SMTP CODE FAILURE: 451,554 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + function Data($msg_data) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Data() without being connected"); + return false; + } + + fputs($this->smtp_conn,"DATA" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 354) { + $this->error = + array("error" => "DATA command not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + # the server is ready to accept data! + # according to rfc 821 we should not send more than 1000 + # including the CRLF + # characters on a single line so we will break the data up + # into lines by \r and/or \n then if needed we will break + # each of those into smaller lines to fit within the limit. + # in addition we will be looking for lines that start with + # a period '.' and append and additional period '.' to that + # line. NOTE: this does not count towards are limit. + + # normalize the line breaks so we know the explode works + $msg_data = str_replace("\r\n","\n",$msg_data); + $msg_data = str_replace("\r","\n",$msg_data); + $lines = explode("\n",$msg_data); + + # we need to find a good way to determine is vtiger_headers are + # in the msg_data or if it is a straight msg body + # currently I'm assuming rfc 822 definitions of msg vtiger_headers + # and if the first vtiger_field of the first line (':' sperated) + # does not contain a space then it _should_ be a header + # and we can process all lines before a blank "" line as + # vtiger_headers. + $field = substr($lines[0],0,strpos($lines[0],":")); + $in_headers = false; + if(!empty($field) && !strstr($field," ")) { + $in_headers = true; + } + + $max_line_length = 998; # used below; set here for ease in change + + while(list(,$line) = @each($lines)) { + $lines_out = null; + if($line == "" && $in_headers) { + $in_headers = false; + } + # ok we need to break this line up into several + # smaller lines + while(strlen($line) > $max_line_length) { + $pos = strrpos(substr($line,0,$max_line_length)," "); + + # Patch to fix DOS attack + if(!$pos) { + $pos = $max_line_length - 1; + } + + $lines_out[] = substr($line,0,$pos); + $line = substr($line,$pos + 1); + # if we are processing vtiger_headers we need to + # add a LWSP-char to the front of the new line + # rfc 822 on long msg vtiger_headers + if($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + # now send the lines to the server + while(list(,$line_out) = @each($lines_out)) { + if(strlen($line_out) > 0) + { + if(substr($line_out, 0, 1) == ".") { + $line_out = "." . $line_out; + } + } + fputs($this->smtp_conn,$line_out . $this->CRLF); + } + } + + # ok all the message data has been sent so lets get this + # over with aleady + fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "DATA not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Expand takes the name and asks the server to list all the + * people who are members of the _list_. Expand will return + * back and array of the result or false if an error occurs. + * Each value in the array returned has the format of: + * [ ] + * The definition of is defined in rfc 821 + * + * Implements rfc 821: EXPN + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 550 + * SMTP CODE ERROR : 500,501,502,504,421 + * @access public + * @return string array + */ + function Expand($name) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Expand() without being connected"); + return false; + } + + fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "EXPN not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + # parse the reply and place in our array to return to user + $entries = explode($this->CRLF,$rply); + while(list(,$l) = @each($entries)) { + $list[] = substr($l,4); + } + + return $list; + } + + /** + * Sends the HELO command to the smtp server. + * This makes sure that we and the server are in + * the same known state. + * + * Implements from rfc 821: HELO + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500, 501, 504, 421 + * @access public + * @return bool + */ + function Hello($host="") { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Hello() without being connected"); + return false; + } + + # if a hostname for the HELO wasn't specified determine + # a suitable one to send + if(empty($host)) { + # we need to determine some sort of appopiate default + # to send to the server + $host = "localhost"; + } + + // Send extended hello first (RFC 2821) + if(!$this->SendHello("EHLO", $host)) + { + if(!$this->SendHello("HELO", $host)) + return false; + } + + return true; + } + + /** + * Sends a HELO/EHLO command. + * @access private + * @return bool + */ + function SendHello($hello, $host) { + fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => $hello . " not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + $this->helo_rply = $rply; + + return true; + } + + /** + * Gets help information on the keyword specified. If the keyword + * is not specified then returns generic help, ussually contianing + * A list of keywords that help is available on. This function + * returns the results back to the user. It is up to the user to + * handle the returned data. If an error occurs then false is + * returned with $this->error set appropiately. + * + * Implements rfc 821: HELP [ ] + * + * SMTP CODE SUCCESS: 211,214 + * SMTP CODE ERROR : 500,501,502,504,421 + * @access public + * @return string + */ + function Help($keyword="") { + $this->error = null; # to avoid confusion + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Help() without being connected"); + return false; + } + + $extra = ""; + if(!empty($keyword)) { + $extra = " " . $keyword; + } + + fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 211 && $code != 214) { + $this->error = + array("error" => "HELP not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return $rply; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. + * + * Implements rfc 821: MAIL FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,421 + * @access public + * @return bool + */ + function Mail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Mail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "MAIL not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the command NOOP to the SMTP server. + * + * Implements from rfc 821: NOOP + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500, 421 + * @access public + * @return bool + */ + function Noop() { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Noop() without being connected"); + return false; + } + + fputs($this->smtp_conn,"NOOP" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "NOOP not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the quit command to the server and then closes the socket + * if there is no error or the $close_on_error argument is true. + * + * Implements from rfc 821: QUIT + * + * SMTP CODE SUCCESS: 221 + * SMTP CODE ERROR : 500 + * @access public + * @return bool + */ + function Quit($close_on_error=true) { + $this->error = null; # so there is no confusion + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Quit() without being connected"); + return false; + } + + # send the quit command to the server + fputs($this->smtp_conn,"quit" . $this->CRLF); + + # get any good-bye messages + $byemsg = $this->get_lines(); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg; + } + + $rval = true; + $e = null; + + $code = substr($byemsg,0,3); + if($code != 221) { + # use e as a tmp var cause Close will overwrite $this->error + $e = array("error" => "SMTP server rejected quit command", + "smtp_code" => $code, + "smtp_rply" => substr($byemsg,4)); + $rval = false; + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $e["error"] . ": " . + $byemsg . $this->CRLF; + } + } + + if(empty($e) || $close_on_error) { + $this->Close(); + } + + return $rval; + } + + /** + * Sends the command RCPT to the SMTP server with the TO: argument of $to. + * Returns true if the recipient was accepted false if it was rejected. + * + * Implements from rfc 821: RCPT TO: + * + * SMTP CODE SUCCESS: 250,251 + * SMTP CODE FAILURE: 550,551,552,553,450,451,452 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + function Recipient($to) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Recipient() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250 && $code != 251) { + $this->error = + array("error" => "RCPT not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the RSET command to abort and transaction that is + * currently in progress. Returns true if successful false + * otherwise. + * + * Implements rfc 821: RSET + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500,501,504,421 + * @access public + * @return bool + */ + function Reset() { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Reset() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RSET" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "RSET failed", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the vtiger_users terminal if they are logged + * in. + * + * Implements rfc 821: SEND FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function Send($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Send() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SEND not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the vtiger_users terminal if they are logged + * in and send them an email. + * + * Implements rfc 821: SAML FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function SendAndMail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called SendAndMail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SAML not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the vtiger_users terminal if they are logged + * in or mail it to them if they are not. + * + * Implements rfc 821: SOML FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function SendOrMail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called SendOrMail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SOML not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * This is an optional command for SMTP that this class does not + * support. This method is here to make the RFC821 Definition + * complete for this class and __may__ be implimented in the future + * + * Implements from rfc 821: TURN + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 502 + * SMTP CODE ERROR : 500, 503 + * @access public + * @return bool + */ + function Turn() { + $this->error = array("error" => "This method, TURN, of the SMTP ". + "is not implemented"); + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF; + } + return false; + } + + /** + * Verifies that the name is recognized by the server. + * Returns false if the name could not be verified otherwise + * the response from the server is returned. + * + * Implements rfc 821: VRFY + * + * SMTP CODE SUCCESS: 250,251 + * SMTP CODE FAILURE: 550,551,553 + * SMTP CODE ERROR : 500,501,502,421 + * @access public + * @return int + */ + function Verify($name) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Verify() without being connected"); + return false; + } + + fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250 && $code != 251) { + $this->error = + array("error" => "VRFY failed on name '$name'", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return $rply; + } + + /******************************************************************* + * INTERNAL FUNCTIONS * + ******************************************************************/ + + /** + * Read in as many lines as possible + * either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * @access private + * @return string + */ + function get_lines() { + $data = ""; + while($str = fgets($this->smtp_conn,515)) { + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data was \"$data\"" . + $this->CRLF; + echo "SMTP -> get_lines(): \$str is \"$str\"" . + $this->CRLF; + } + $data .= $str; + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF; + } + # if the 4th character is a space then we are done reading + # so just break the loop + if(substr($str,3,1) == " ") { break; } + } + return $data; + } + +} + + + ?> diff --git a/modules/Emails/gotodownload.php b/modules/Emails/gotodownload.php new file mode 100644 index 0000000..e634008 --- /dev/null +++ b/modules/Emails/gotodownload.php @@ -0,0 +1,82 @@ +parameters[0]->value; + $strFileType = strrev(substr(strrev($strFileName),0,4)); + $fileContent = imap_fetchbody($mbox,$msgno,$file+2); +} + +/** Function to download the File + * @param string $strFileType - File Type + * @param string $strFileName - File Name + * @param string $fileContents- File contents +**/ +function downloadFile($strFileType,$strFileName,$fileContent) +{ + $ContentType = "application/octet-stream"; + + if ($strFileType == ".asf") + $ContentType = "video/x-ms-asf"; + if ($strFileType == ".avi") + $ContentType = "video/avi"; + if ($strFileType == ".doc") + $ContentType = "application/msword"; + if ($strFileType == ".zip") + $ContentType = "application/zip"; + if ($strFileType == ".xls") + $ContentType = "application/vnd.ms-excel"; + if ($strFileType == ".gif") + $ContentType = "image/gif"; + if ($strFileType == ".jpg" || $strFileType == "jpeg") + $ContentType = "image/jpeg"; + if ($strFileType == ".wav") + $ContentType = "audio/wav"; + if ($strFileType == ".mp3") + $ContentType = "audio/mpeg3"; + if ($strFileType == ".mpg" || $strFileType == "mpeg") + $ContentType = "video/mpeg"; + if ($strFileType == ".rtf") + $ContentType = "application/rtf"; + if ($strFileType == ".htm" || $strFileType == "html") + $ContentType = "text/html"; + if ($strFileType == ".xml") + $ContentType = "text/xml"; + if ($strFileType == ".xsl") + $ContentType = "text/xsl"; + if ($strFileType == ".css") + $ContentType = "text/css"; + if ($strFileType == ".php") + $ContentType = "text/php"; + if ($strFileType == ".asp") + $ContentType = "text/asp"; + if ($strFileType == ".pdf") + $ContentType = "application/pdf"; + + header ("Content-Type: $ContentType"); + header("Cache-Control: private"); + header("Content-Description: PHP Generated Data"); + header ("Content-Disposition: attachment; filename=$strFileName"); + echo imap_base64($fileContent); + #echo base64_decode($fileContent); +} +?> diff --git a/modules/Emails/index.php b/modules/Emails/index.php new file mode 100644 index 0000000..0c3a5ef --- /dev/null +++ b/modules/Emails/index.php @@ -0,0 +1,31 @@ +'.$mod_strings['LBL_MAIL_CONNECT_ERROR_INFO'].'

'; +} + +include ('modules/Emails/ListView.php'); + +?> diff --git a/modules/Emails/language/de_de.lang.php b/modules/Emails/language/de_de.lang.php new file mode 100644 index 0000000..216578c --- /dev/null +++ b/modules/Emails/language/de_de.lang.php @@ -0,0 +1,177 @@ +'Allgemeine Information', + +'LBL_MODULE_NAME'=>'E-Mails', +'LBL_MODULE_TITLE'=>'E-Mails: Home', +'LBL_SEARCH_FORM_TITLE'=>'E-Mail suchen', +'LBL_LIST_FORM_TITLE'=>'E-Mails', +'LBL_NEW_FORM_TITLE'=>'E-Mails verfolgen', + +'LBL_LIST_SUBJECT'=>'Betreff', +'LBL_LIST_CONTACT'=>'Person', +'LBL_LIST_RELATED_TO'=>'Zuständig ', +'LBL_LIST_DATE'=>'Sendedatum', +'LBL_LIST_TIME'=>'Sendezeit', + +'ERR_DELETE_RECORD'=>"Zum Löschen muss mindestens ein Eintrag markiert sein.", +'LBL_DATE_SENT'=>'Sendedatum:', +'LBL_DATE_AND_TIME'=>'Sendedatum und Zeit:', +'LBL_DATE'=>'Datum:', +'LBL_TIME'=>'Zeit:', +'LBL_SUBJECT'=>'Betreff:', +'LBL_BODY'=>'Text:', +'LBL_CONTACT_NAME'=>'Person: ', +'LBL_EMAIL'=>'E-Mail:', +'LBL_DETAILVIEW_EMAIL'=>'E-Mail', +'LBL_COLON'=>':', +'LBL_CHK_MAIL'=>'Check Mail', +'LBL_COMPOSE'=>'Neu', +//Single change for 5.0.3 +'LBL_SETTINGS'=>'Einstellungen', +'LBL_EMAIL_FOLDERS'=>'E-Mail Ordner', +'LBL_INBOX'=>'Inbox', +'LBL_SENT_MAILS'=>'Mail Ablage', +'LBL_TRASH'=>'Papierkorb', +'LBL_JUNK_MAILS'=>'Junk Mails', +'LBL_TO_LEADS'=>'zu Leads', +'LBL_TO_CONTACTS'=>'zu Personen', +'LBL_TO_ACCOUNTS'=>'zu Organisationen', +'LBL_MY_MAILS'=>'Meine Mails', +'LBL_QUAL_CONTACT'=>'Qualifizierte Mails (als Personen)', +'LBL_MAILS'=>'Mails', +'LBL_QUALIFY_BUTTON'=>'Qualifiziere', +'LBL_REPLY_BUTTON'=>'Antworten', +'LBL_FORWARD_BUTTON'=>'Weiterleiten', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Anlagen runterladen', +'LBL_FROM'=>'Von :', +'LBL_CC'=>'CC :', +'LBL_BCC'=>'BCC :', + +'NTC_REMOVE_INVITEE'=>'Möchten Sie diesen Empfänger von der E-Mail löschen', +'LBL_INVITEE'=>'Empfänger', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Massen-E-Mails', +'LBL_ATTACHMENT'=>'Anhang', +'LBL_UPLOAD'=>'Hochladen', +'LBL_FILE_NAME'=>'Dateiname', +'LBL_SEND'=>'Senden', + +'LBL_EMAIL_TEMPLATES'=>'E-Mail Vorlagen', +'LBL_TEMPLATE_NAME'=>'Vorlagenname', +'LBL_DESCRIPTION'=>'Beschreibung', +'LBL_EMAIL_TEMPLATES_LIST'=>'E-Mail Vorlagenliste', +'LBL_EMAIL_INFORMATION'=>'E-Mail Information', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Neuer Lead', +'LBL_LEAD_TITLE'=>'Leads', + +'LBL_NEW_PRODUCT'=>'Neues Produkt', +'LBL_PRODUCT_TITLE'=>'Produkte', +'LBL_NEW_CONTACT'=>'Neue Person', +'LBL_CONTACT_TITLE'=>'Personen', +'LBL_NEW_ACCOUNT'=>'Neue Organisation', +'LBL_ACCOUNT_TITLE'=>'Organisationen', + +// Added fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Nutzer', +'LBL_NEW_USER'=>'Neuer Nutzer', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'E-Mail Werkzeuge', +//Added for 4GA +'Date & Time Sent'=>'Startdatum und -zeit', +'Sales Enity Module'=>'Vertriebsmodul', +'Related To'=>'bezogen auf', +'Assigned To'=>'zuständig', +'Subject'=>'Betreff', +'Attachment'=>'Anhang', +'Description'=>'Beschreibung', +'Time Start'=>'Startzeit', +'Created Time'=>'erstellt', +'Modified Time'=>'geändert', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Bitte überprüfen Sie den E-Mail Server Name...', +'MESSAGE_CHECK_MAIL_ID'=>'Bitte überprüfen Sie die E-Mail Adresse des zuständigen Nutzers...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'E-Mail wurde zu den folgenden Nutzern gesendet :', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'E-Mail wurde zu den folgenden Personen gesendet :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'E-Mail Adresse ist falsch. Bitte überprüfen...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Bitte Nutzer oder Person hinzufügen...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' E-Mail(s) erfolgreich versendet!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Fetch WebMail', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Alle', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Dieser Kontakt möchte keine E-Mails empfangen.', +'LBL_WEBMAILS_TITLE'=>'WebMails', +'LBL_EMAILS_TITLE'=>'E-Mails', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'Fehler in der Verbindung zum Mail Server!
Überprüfen Sie die Servereinstellung in Startseite->E-Mails -> Einstellungen', +'LBL_ALLMAILS'=>'Alle Mails', +'LBL_TO_USERS'=>'an Nutzer', +'LBL_TO'=>'An:', +'LBL_IN_SUBJECT'=>'in Betreff', +'LBL_IN_SENDER'=>'in Sender', +'LBL_IN_SUBJECT_OR_SENDER'=>'in Betreff oder Sender', +'SELECT_EMAIL'=>'E-Mail Adresse auswählen', +'Sender'=>'Sender', +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Ihr Mail Server für den Empfang ist nicht konfiguriert!', +'LBL_MAILSELECT_INFO1'=>'Die folgenden E-Mail Adressen stehen als Referenz zur Verfügung.', +'LBL_MAILSELECT_INFO2'=>'Wählen Sie die E-Mail Adressen zu dem die E-Mail gesendet werden soll', +'LBL_MULTIPLE'=>'mehrere', +'LBL_COMPOSE_EMAIL'=>'neue E-Mail', +'LBL_VTIGER_EMAIL_CLIENT'=>'E-Mail Client', + +//Added for 5.0.3 +'TITLE_VTIGERCRM_MAIL'=>'CRM Mail', +'TITLE_COMPOSE_MAIL'=>'neue E-Mail', + +'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'Die E-Mail konnte an den ausgewählten Nutzer nicht versendet werden.', +'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'Bitte überprüfen Sie die E-Mail Adresse.', +'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'Bitte überprüfen Sie die E-Mail Adresse des Senders.', +'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'Die E-Mail konnte an diese E-Mail Adresse nicht versendet werden.', +'PLEASE_CHECK_THIS_EMAILID'=>'Bitte überprüfen Sie die E-Mail Adresse.', +'LBL_CC_EMAIL_ERROR'=>'Ihre CC E-Mail Adresse ist fehlerhaft.', +'LBL_BCC_EMAIL_ERROR'=>'Ihre BCC E-Mail Adresse ist fehlerhaft.', +'LBL_NO_RCPTS_EMAIL_ERROR'=>'Es wurde kein Adressat eingetragen.', +'LBL_CONF_MAILSERVER_ERROR'=>'Bitte konfigurieren Sie den Server für rausgehende E-Mails ---> Server Link', +'LBL_VTIGER_EMAIL_CLIENT'=>'E-Mail Client', +'LBL_MAILSELECT_INFO3'=>'Sie haben nicht die Berechtigung, auf die E-Mail Adresse zuzugreifen.', +//Added for script alerts +'FEATURE_AVAILABLE_INFO' => 'Diese Funktion ist ggw. nur für den Microsoft Internet Explorer 5.5+ verfügbar\n\nBitte haben Sie etwas Geduld, wir werden das verbessern!', +'DOWNLOAD_CONFIRAMATION' => 'Wollen Sie die Datei auf Ihren Computer laden?', +'LBL_PLEASE_ATTACH' => 'Bitte geben Sie eine Datei für den Anhang an.', +'LBL_KINDLY_UPLOAD' => 'Bitte konfigurieren Sie die upload_tmp_dir Variable in der php.ini Datei.', +'LBL_EXCEED_MAX' => 'Die Datei ist zu gross. Bitte verwenden Sie eine Datei mit einer maximalen Größe von ', +'LBL_BYTES' => ' Bytes', +'LBL_CHECK_USER_MAILID' => 'Bitte überprüfen Sie die E-Mail Adresse.', + +// Added/Updated for vtiger CRM 5.0.4 +'Activity Type'=>'Aktivitätentyp', +'LBL_MAILSELECT_INFO'=>'hat eine Referenz auf die nachfolgenden E-Mail Adressen. Bitte wählen Sie die Adresse zu der die E-Mail gesendet werden soll.', +'LBL_NO_RECORDS' => 'Keine Daten gefunden', +'LBL_PRINT_EMAIL'=> 'Drucken', + +); + +?> \ No newline at end of file diff --git a/modules/Emails/language/en_gb.lang.php b/modules/Emails/language/en_gb.lang.php new file mode 100644 index 0000000..a6e849f --- /dev/null +++ b/modules/Emails/language/en_gb.lang.php @@ -0,0 +1,139 @@ + 'General Information', + 'LBL_MODULE_NAME' => 'Email', + 'LBL_MODULE_TITLE' => 'Email: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Email Search', + 'LBL_LIST_FORM_TITLE' => 'Email List', + 'LBL_NEW_FORM_TITLE' => 'Track Email', + 'LBL_LIST_SUBJECT' => 'Subject', + 'LBL_LIST_CONTACT' => 'Contact', + 'LBL_LIST_RELATED_TO' => 'Related to', + 'LBL_LIST_DATE' => 'Date Sent', + 'LBL_LIST_TIME' => 'Time Sent', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the record', + 'LBL_DATE_SENT' => 'Date Sent:', + 'LBL_DATE_AND_TIME' => 'Date & Time Sent:', + 'LBL_DATE' => 'Date Sent:', + 'LBL_TIME' => 'Time Sent:', + 'LBL_SUBJECT' => 'Subject:', + 'LBL_BODY' => 'Body:', + 'LBL_CONTACT_NAME' => 'Contact Name:', + 'LBL_EMAIL' => 'Email:', + 'LBL_DETAILVIEW_EMAIL' => 'Email', + 'LBL_COLON' => ':', + 'LBL_CHK_MAIL' => 'Check Email', + 'LBL_COMPOSE' => 'Compose', + 'LBL_SETTINGS' => 'Incoming Mail Server Settings', + 'LBL_EMAIL_FOLDERS' => 'Email Folders', + 'LBL_INBOX' => 'Inbox', + 'LBL_SENT_MAILS' => 'Sent Emails', + 'LBL_TRASH' => 'Trash', + 'LBL_JUNK_MAILS' => 'Junk Emails', + 'LBL_TO_LEADS' => 'To Leads', + 'LBL_TO_CONTACTS' => 'To Contacts', + 'LBL_TO_ACCOUNTS' => 'To Accounts', + 'LBL_MY_MAILS' => 'My Emails', + 'LBL_QUAL_CONTACT' => 'Qualified Emails (As Contacts)', + 'LBL_MAILS' => 'Mails', + 'LBL_QUALIFY_BUTTON' => 'Qualify', + 'LBL_REPLY_BUTTON' => 'Reply', + 'LBL_FORWARD_BUTTON' => 'Forward', + 'LBL_DOWNLOAD_ATTCH_BUTTON' => 'Download Attachments', + 'LBL_FROM' => 'From:', + 'LBL_CC' => 'Cc:', + 'LBL_BCC' => 'Bcc:', + 'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this recipient from the email?', + 'LBL_INVITEE' => 'Recipients', + 'LBL_BULK_MAILS' => 'Bulk Emails', + 'LBL_ATTACHMENT' => 'Attachment', + 'LBL_UPLOAD' => 'Upload', + 'LBL_FILE_NAME' => 'File Name', + 'LBL_SEND' => 'Send', + 'LBL_EMAIL_TEMPLATES' => 'Email Templates', + 'LBL_TEMPLATE_NAME' => 'Template Name', + 'LBL_DESCRIPTION' => 'Description', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Email Templates List', + 'LBL_EMAIL_INFORMATION' => 'Email Information', + 'LBL_NEW_LEAD' => 'New Lead', + 'LBL_LEAD_TITLE' => 'Leads', + 'LBL_NEW_PRODUCT' => 'New Product', + 'LBL_PRODUCT_TITLE' => 'Products', + 'LBL_NEW_CONTACT' => 'New Contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_NEW_ACCOUNT' => 'New Organisation', + 'LBL_ACCOUNT_TITLE' => 'Organisations', + 'LBL_USER_TITLE' => 'Users', + 'LBL_NEW_USER' => 'New User', + 'LBL_TOOL_FORM_TITLE' => 'Email Tools', + 'Date & Time Sent' => 'Date & Time Sent', + 'Sales Enity Module' => 'Sales Entity Module', + 'Related To' => 'Related To', + 'Assigned To' => 'Assigned To', + 'Subject' => 'Subject', + 'Attachment' => 'Attachment', + 'Description' => 'Description', + 'Time Start' => 'Time Start', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'MESSAGE_CHECK_MAIL_SERVER_NAME' => 'Please Check the Mail Server Name...', + 'MESSAGE_CHECK_MAIL_ID' => 'Please Check the email address of "Assigned To" User...', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS' => 'Email has been sent to the following User(s) :', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => 'Email has been sent to the following Contact(s) :', + 'MESSAGE_MAIL_ID_IS_INCORRECT' => 'Email address is incorrect. Please check this email address...', + 'MESSAGE_ADD_USER_OR_CONTACT' => 'Please add any User(s) or Contact(s)...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY' => ' Email(s) sent successfully', + 'LBL_FETCH_WEBMAIL' => 'Fetch Web Mail', + 'LBL_ALL' => 'All', + 'MESSAGE_CONTACT_NOT_WANT_MAIL' => 'This Contact does not want to receive emails.', + 'LBL_WEBMAILS_TITLE' => 'WebMails', + 'LBL_EMAILS_TITLE' => 'Email', + 'LBL_MAIL_CONNECT_ERROR_INFO' => 'Error connecting mail server!
Check in My Accounts->List Mail Server->List Mail Account', + 'LBL_ALLMAILS' => 'All Emails', + 'LBL_TO_USERS' => 'To Users', + 'LBL_TO' => 'To:', + 'LBL_IN_SUBJECT' => 'in Subject', + 'LBL_IN_SENDER' => 'in Sender', + 'LBL_IN_SUBJECT_OR_SENDER' => 'in Subject or Sender', + 'SELECT_EMAIL' => 'Select email addresses', + 'Sender' => 'Sender', + 'LBL_CONFIGURE_MAIL_SETTINGS' => 'Your Incoming Mail Server is not configured', + 'LBL_MAILSELECT_INFO1' => 'The following email address types are associated to the selected', + 'LBL_MAILSELECT_INFO2' => 'Select the email address types to which the email should be sent', + 'LBL_MULTIPLE' => 'Multiple', + 'LBL_COMPOSE_EMAIL' => 'Compose Email', + 'LBL_VTIGER_EMAIL_CLIENT' => 'vtiger Webmail Client', + 'TITLE_VTIGERCRM_MAIL' => 'vtigerCRM Email', + 'TITLE_COMPOSE_MAIL' => 'Compose Email', + 'MESSAGE_MAIL_COULD_NOT_BE_SEND' => 'Email could not be sent to the assigned to user.', + 'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID' => 'Please check the assigned to user email address...', + 'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID' => 'Please check the from email address', + 'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID' => 'Mail could not be sent to this email address', + 'PLEASE_CHECK_THIS_EMAILID' => 'Please check this mail address...', + 'LBL_CC_EMAIL_ERROR' => 'Your cc email address is not correct', + 'LBL_BCC_EMAIL_ERROR' => 'Your bcc email address is not correct', + 'LBL_NO_RCPTS_EMAIL_ERROR' => 'No recepients specified', + 'LBL_CONF_MAILSERVER_ERROR' => 'Please configure your outgoing mailserver under Settings->Outgoing Server link', + 'LBL_MAILSELECT_INFO3' => 'You do not have permission to view email address(es) of the selected record(s).', + 'FEATURE_AVAILABLE_INFO' => 'This feature is currently only available for Microsoft Internet Explorer 5.5+ users

Wait for an update!', + 'DOWNLOAD_CONFIRAMATION' => 'Do you want to download the file?', + 'LBL_PLEASE_ATTACH' => 'Please give a valid file to attach and try again', + 'LBL_KINDLY_UPLOAD' => 'Please configure the upload_tmp_dir variable in php.ini file.', + 'LBL_EXCEED_MAX' => 'Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than ', + 'LBL_BYTES' => 'bytes', + 'LBL_CHECK_USER_MAILID' => 'Please check the current user email address. It must be a valid email address to send emails', + 'Activity Type' => 'Activity Type', + 'LBL_MAILSELECT_INFO' => 'has the following email addresses associated. Please select the email addresses to which the mail should be sent', + 'LBL_NO_RECORDS' => 'No records found', + 'LBL_PRINT_EMAIL' => 'Print', +); +?> \ No newline at end of file diff --git a/modules/Emails/language/en_us.lang.php b/modules/Emails/language/en_us.lang.php new file mode 100644 index 0000000..8f9a296 --- /dev/null +++ b/modules/Emails/language/en_us.lang.php @@ -0,0 +1,183 @@ +'General Information', + +'LBL_MODULE_NAME'=>'Email', +'LBL_MODULE_TITLE'=>'Email: Home', +'LBL_SEARCH_FORM_TITLE'=>'Email Search', +'LBL_LIST_FORM_TITLE'=>'Email List', +'LBL_NEW_FORM_TITLE'=>'Track Email', + +'LBL_LIST_SUBJECT'=>'Subject', +'LBL_LIST_CONTACT'=>'Contact', +'LBL_LIST_RELATED_TO'=>'Related to', +'LBL_LIST_DATE'=>'Date Sent', +'LBL_LIST_TIME'=>'Time Sent', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", +'LBL_DATE_SENT'=>'Date Sent:', +'LBL_DATE_AND_TIME'=>'Date & Time Sent:', +'LBL_DATE'=>'Date Sent:', +'LBL_TIME'=>'Time Sent:', +'LBL_SUBJECT'=>'Subject:', +'LBL_BODY'=>'Body:', +'LBL_CONTACT_NAME'=>' Contact Name: ', +'LBL_EMAIL'=>'Email:', +'LBL_DETAILVIEW_EMAIL'=>'E-Mail', +'LBL_COLON'=>':', +'LBL_CHK_MAIL'=>'Check Mail', +'LBL_COMPOSE'=>'Compose', +//Single change for 5.0.3 +'LBL_SETTINGS'=>'Incoming Mail Server Settings', +'LBL_EMAIL_FOLDERS'=>'Email Folders', +'LBL_INBOX'=>'Inbox', +'LBL_SENT_MAILS'=>'Sent Mails', +'LBL_TRASH'=>'Trash', +'LBL_JUNK_MAILS'=>'Junk Mails', +'LBL_TO_LEADS'=>'To Leads', +'LBL_TO_CONTACTS'=>'To Contacts', +'LBL_TO_ACCOUNTS'=>'To Organizations', +'LBL_MY_MAILS'=>'My Mails', +'LBL_QUAL_CONTACT'=>'Qualified Mails (As Contacts)', +'LBL_MAILS'=>'Mails', +'LBL_QUALIFY_BUTTON'=>'Qualify', +'LBL_REPLY_BUTTON'=>'Reply', +'LBL_FORWARD_BUTTON'=>'Forward', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Download Attachments', +'LBL_FROM'=>'From :', +'LBL_CC'=>'Cc :', +'LBL_BCC'=>'Bcc :', + +'NTC_REMOVE_INVITEE'=>'Are you sure you want to remove this recipient from the email?', +'LBL_INVITEE'=>'Recipients', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Bulk Mails', +'LBL_ATTACHMENT'=>'Attachment', +'LBL_UPLOAD'=>'Upload', +'LBL_FILE_NAME'=>'File Name', +'LBL_SEND'=>'Send', + +'LBL_EMAIL_TEMPLATES'=>'Email Templates', +'LBL_TEMPLATE_NAME'=>'Template Name', +'LBL_DESCRIPTION'=>'Description', +'LBL_EMAIL_TEMPLATES_LIST'=>'Email Templates List', +'LBL_EMAIL_INFORMATION'=>'Email Information', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'New Lead', +'LBL_LEAD_TITLE'=>'Leads', + +'LBL_NEW_PRODUCT'=>'New Product', +'LBL_PRODUCT_TITLE'=>'Products', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', +'LBL_NEW_ACCOUNT'=>'New Organization', +'LBL_ACCOUNT_TITLE'=>'Organizations', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Users', +'LBL_NEW_USER'=>'New User', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Email Tools', +//Added for 4GA +'Date & Time Sent'=>'Date & Time Sent', +'Sales Enity Module'=>'Sales Enity Module', +'Related To'=>'Related To', +'Assigned To'=>'Assigned To', +'Subject'=>'Subject', +'Attachment'=>'Attachment', +'Description'=>'Description', +'Time Start'=>'Time Start', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Please Check the Mail Server Name...', +'MESSAGE_CHECK_MAIL_ID'=>'Please Check the Email Id of "Assigned To" User...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'Mail has been sent to the following User(s) :', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'Mail has been sent to the following Contact(s) :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'Mail Id is incorrect. Please Check this Mail Id...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Please Add any User(s) or Contact(s)...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' Mail(s) sent successfully!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Fetch Web Mail', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'All', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'This Contact does not want to receive mails.', +'LBL_WEBMAILS_TITLE'=>'WebMails', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'Error connecting mail server!
Check in My Accounts->List Mail Server -> List Mail Account', +'LBL_ALLMAILS'=>'All Mails', +'LBL_TO_USERS'=>'To Users', +'LBL_TO'=>'To:', +'LBL_IN_SUBJECT'=>'in Subject', +'LBL_IN_SENDER'=>'in Sender', +'LBL_IN_SUBJECT_OR_SENDER'=>'in Subject or Sender', +'SELECT_EMAIL'=>'Select Email IDs', +'Sender'=>'Sender', +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Your Incoming Mail Server is not configured', +'LBL_MAILSELECT_INFO1'=>'The following Email ID types are associated to the selected', +'LBL_MAILSELECT_INFO2'=>'Select the Email ID types to which,the email should be sent', +'LBL_MULTIPLE'=>'Multiple', +'LBL_COMPOSE_EMAIL'=>'Compose E-Mail', +'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger Webmail Client', + +//Added for 5.0.3 +'TITLE_VTIGERCRM_MAIL'=>'vtigerCRM Mail', +'TITLE_COMPOSE_MAIL'=>'Compose Mail', + +'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'Mail could not be sent to the assigned to user.', +'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'Please check the assigned to user email id...', +'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'Please check the from email id', +'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'Mail could not be sent to this email id', +'PLEASE_CHECK_THIS_EMAILID'=>'Please check this mail id...', +'LBL_CC_EMAIL_ERROR'=>'Your cc mailid is not proper', +'LBL_BCC_EMAIL_ERROR'=>'Your bcc mailid is not proper', +'LBL_NO_RCPTS_EMAIL_ERROR'=>'No recepients specified', +'LBL_CONF_MAILSERVER_ERROR'=>'Please configure your outgoing mailserver under Settings ---> Outgoing Server link', +'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger Webmail Client', +'LBL_MAILSELECT_INFO3'=>'You don\'t have permission to view email id(s) of the selected Record(s).', +//Added for script alerts +'FEATURE_AVAILABLE_INFO' => 'This feature is currently only available for Microsoft Internet Explorer 5.5+ users\n\nWait f +or an update!', +'DOWNLOAD_CONFIRAMATION' => 'Do you want to download the file ?', +'LBL_PLEASE_ATTACH' => 'Please give a valid file to attach and try again!', +'LBL_KINDLY_UPLOAD' => 'Please configure upload_tmp_dir variable in php.ini file.', +'LBL_EXCEED_MAX' => 'Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than ', +'LBL_BYTES' => ' bytes', +'LBL_CHECK_USER_MAILID' => 'Please check the current user mailid.It should be a valid mailid to send Emails', + +// Added/Updated for vtiger CRM 5.0.4 +'Activity Type'=>'Activity Type', +'LBL_MAILSELECT_INFO'=>'has the following Email IDs associated.Please Select the Email IDs to which,the mail should be sent', +'LBL_NO_RECORDS' => 'No Records Found', +'LBL_PRINT_EMAIL'=> 'Print', + +); + +?> diff --git a/modules/Emails/language/es_es.lang.php b/modules/Emails/language/es_es.lang.php new file mode 100644 index 0000000..3de9e13 --- /dev/null +++ b/modules/Emails/language/es_es.lang.php @@ -0,0 +1,185 @@ +'Información General', + +'LBL_MODULE_NAME'=>'Email', +'LBL_MODULE_TITLE'=>'Email: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Email', +'LBL_LIST_FORM_TITLE'=>'Lista de Email', +'LBL_NEW_FORM_TITLE'=>'Seguimiento de Correo', + +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_CONTACT'=>'Contacto', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DATE'=>'Fecha de Envío', +'LBL_LIST_TIME'=>'Hora de Envío', + +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +'LBL_DATE_SENT'=>'Fecha de Envío:', +'LBL_DATE_AND_TIME'=>'Fecha y Hora de envío:', +'LBL_DATE'=>'Fecha de envío:', +'LBL_TIME'=>'Hora de envío:', +'LBL_SUBJECT'=>'Asunto:', +'LBL_BODY'=>'Cuerpo:', +'LBL_CONTACT_NAME'=>' Nombre: ', +'LBL_EMAIL'=>'Email:', +'LBL_DETAILVIEW_EMAIL'=>'E-Mail', +'LBL_COLON'=>':', +'LBL_CHK_MAIL'=>'Comprobar Correo', +'LBL_COMPOSE'=>'Redactar', +//Single change for 5.0.3 +'LBL_SETTINGS'=>'Configuración', +'LBL_EMAIL_FOLDERS'=>'Carpetas de Email', +'LBL_INBOX'=>'Bandeja de Entrada', +'LBL_SENT_MAILS'=>'Emails Enviados', +'LBL_TRASH'=>'Basura', +'LBL_JUNK_MAILS'=>'Eliminados', +'LBL_TO_LEADS'=>'A Pre-Contactos', +'LBL_TO_CONTACTS'=>'A Contactos', +'LBL_TO_ACCOUNTS'=>'A Cuentas', +'LBL_MY_MAILS'=>'Mis Correos', +'LBL_QUAL_CONTACT'=>'Emails Clasificados por Contacto', +'LBL_MAILS'=>'Correos', +'LBL_QUALIFY_BUTTON'=>'Clasificar', +'LBL_REPLY_BUTTON'=>'Responder', +'LBL_FORWARD_BUTTON'=>'Reenviar', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Descargar Adjuntos', +'LBL_FROM'=>'De: ', +'LBL_CC'=>'Cc: ', +'LBL_BCC'=>'Cco: ', + +'NTC_REMOVE_INVITEE'=>'¿Está seguro de eliminar esta dirección de Email?', +'LBL_INVITEE'=>'Receptores', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Emails masivos', +'LBL_ATTACHMENT'=>'Adjunto', +'LBL_UPLOAD'=>'Actualizar', +'LBL_FILE_NAME'=>'Nombre de Archivo', +'LBL_SEND'=>'Enviar', + +'LBL_EMAIL_TEMPLATES'=>'Plantillas de Email', +'LBL_TEMPLATE_NAME'=>'Nombre de Plantilla', +'LBL_DESCRIPTION'=>'Descripción', +'LBL_EMAIL_TEMPLATES_LIST'=>'Lista de Plantillas de Email', +'LBL_EMAIL_INFORMATION'=>'Información de email', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Nuevo Pre-Contacto', +'LBL_LEAD_TITLE'=>'Pre-Contactos', + +'LBL_NEW_PRODUCT'=>'Nuevo Producto', +'LBL_PRODUCT_TITLE'=>'Productos', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', +'LBL_NEW_ACCOUNT'=>'Nueva Cuenta', +'LBL_ACCOUNT_TITLE'=>'Cuentas', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Usuarios', +'LBL_NEW_USER'=>'Nuevo Usuario', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Email', +//Added for 4GA +'Date & Time Sent'=>'Fecha y Hora de envío', +'Sales Enity Module'=>'Módulo Entidad de Ventas', +'Related To'=>'Relacionado con', +'Assigned To'=>'Asignado a', +'Subject'=>'Asunto', +'Attachment'=>'Adjunto', +'Description'=>'Descripción', +'Time Start'=>'Fecha de Inicio', +'Created Time'=>'Fecha Creación ', +'Modified Time'=>'Fecha Modificación', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Por favor, verifique el nombre del servidor de correo...', +'MESSAGE_CHECK_MAIL_ID'=>'Por favor, verifique el Email de "Asignado A" ...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'El Email ha sido enviado a los seguientes usuarios :', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'El Email ha sido enviado a los siguientes contactos :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'El Email es incorrecto. Por favor verifique este Email...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Por favor, agregue usuarios y contactos...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' ¡El Correo ha sido enviado con exito!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Cargar WebMail', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Todos', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Este contacto no desea recibir correos.', +'LBL_WEBMAILS_TITLE'=>'Email', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'¡Error conectando con el servidor de email!
Compruebe en Configuración -> Lista de Servidores de Correo -> Lista de cuentas de correo', +'LBL_ALLMAILS'=>'Todos los Correos', +'LBL_TO_USERS'=>'A Usuarios', +'LBL_TO'=>'A: ', +'LBL_IN_SUBJECT'=>'en Asunto', +'LBL_IN_SENDER'=>'en Remitente', +'LBL_IN_SUBJECT_OR_SENDER'=>'en Asunto o Remitente', +'SELECT_EMAIL'=>'Selecciona Email', +'Sender'=>'Remitente', +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Su Servidor Entrante de Email no está configurado', +'LBL_MAILSELECT_INFO1'=>'Los siguientes tipos de email están asociados a la selección', +'LBL_MAILSELECT_INFO2'=>'Seleccione los tipos de email a los que hay que enviar el correo', +'LBL_MULTIPLE'=>'Multiples', +'LBL_COMPOSE_EMAIL'=>'Redactar Correo', +'LBL_VTIGER_EMAIL_CLIENT'=>'Cliente de Correo', + +//Added for 5.0.3 +'TITLE_VTIGERCRM_MAIL'=>'Correo', +'TITLE_COMPOSE_MAIL'=>'Redactar Correo', + +'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'No se ha podido mandar correo al usuario asignado.', +'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'Por favor verifica la cuenta de correo del usuario asignado...', +'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'Por favor verifica la cuenta de correo del remitente', +'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'No se ha podido mandar correo a esta cuenta de correo', +'PLEASE_CHECK_THIS_EMAILID'=>'Por favor verifica esta cuenta de correo...', +'LBL_CC_EMAIL_ERROR'=>'Cuenta de correo cc incorrecta', +'LBL_BCC_EMAIL_ERROR'=>'Cuenta de correo bcc incorrecta', +'LBL_NO_RCPTS_EMAIL_ERROR'=>'No se ha especificado destinatario', +'LBL_CONF_MAILSERVER_ERROR'=>'Configura el servidor de correo saliente en Herramientas --> Servidor de Correo', +'LBL_VTIGER_EMAIL_CLIENT'=>'Webmail Vtiger', +'LBL_MAILSELECT_INFO3'=>'No tienes permiso para visualizar las cuentas de correo del registro seleccionado.', +//Added for script alerts +'FEATURE_AVAILABLE_INFO' => 'Característica disponible sólo para Microsoft Internet Explorer 5.5+\n\n +¡Actualice su navegador!', +'DOWNLOAD_CONFIRAMATION' => '¿Descargar Archivo?', +'LBL_PLEASE_ATTACH' => '¡Adjunte un archivo permitido!', +'LBL_KINDLY_UPLOAD' => '¡Configure la variableupload_tmp_dir en el php.ini', +'LBL_EXCEED_MAX' => 'El Archivo sobrepasa el tamaño máximo permitido.Inténtelo con un archivo más pequeño.', +'LBL_BYTES' => ' bytes', +'LBL_CHECK_USER_MAILID' => 'Compruebe que el correo del usuario es una cuenta de correo válida', + +// Added/Updated for vtiger CRM 5.0.4 +'Activity Type'=>'Tipo de Evento', +'LBL_MAILSELECT_INFO'=>'tiene los siguientes emails configurados. Seleccione los que quiera utilizar', +'LBL_NO_RECORDS'=>'No hay registros en esta carpeta', +'LBL_PRINT_EMAIL'=> 'Imprimir', + +); + +?> diff --git a/modules/Emails/language/es_mx.lang.php b/modules/Emails/language/es_mx.lang.php new file mode 100644 index 0000000..5e29e36 --- /dev/null +++ b/modules/Emails/language/es_mx.lang.php @@ -0,0 +1,186 @@ +'Información General', + +'LBL_MODULE_NAME'=>'Email', +'LBL_MODULE_TITLE'=>'Email: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar correo', +'LBL_LIST_FORM_TITLE'=>'Lista de correos', +'LBL_NEW_FORM_TITLE'=>'Seguimiento de Correo', + +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_CONTACT'=>'Contacto', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DATE'=>'Fecha de Envío', +'LBL_LIST_TIME'=>'Hora de Envío', + +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +'LBL_DATE_SENT'=>'Fecha de Envío:', +'LBL_DATE_AND_TIME'=>'Fecha y Hora de envío:', +'LBL_DATE'=>'Fecha de envío:', +'LBL_TIME'=>'Hora de envío:', +'LBL_SUBJECT'=>'Asunto:', +'LBL_BODY'=>'Cuerpo:', +'LBL_CONTACT_NAME'=>' Nombre: ', +'LBL_EMAIL'=>'Email:', +'LBL_DETAILVIEW_EMAIL'=>'E-Mail', +'LBL_COLON'=>':', +'LBL_CHK_MAIL'=>'Comprobar Correo', +'LBL_COMPOSE'=>'Redactar', +//Single change for 5.0.3 +'LBL_SETTINGS'=>'Configuración', +'LBL_EMAIL_FOLDERS'=>'Carpetas de Email', +'LBL_INBOX'=>'Bandeja de Entrada', +'LBL_SENT_MAILS'=>'Emails Enviados', +'LBL_TRASH'=>'Basura', +'LBL_JUNK_MAILS'=>'Eliminados', +'LBL_TO_LEADS'=>'A Prospectos', +'LBL_TO_CONTACTS'=>'A Contactos', +'LBL_TO_ACCOUNTS'=>'A Cuentas', +'LBL_MY_MAILS'=>'Mis Correos', +'LBL_QUAL_CONTACT'=>'Emails Clasificados por Contacto', +'LBL_MAILS'=>'Correos', +'LBL_QUALIFY_BUTTON'=>'Clasificar', +'LBL_REPLY_BUTTON'=>'Responder', +'LBL_FORWARD_BUTTON'=>'Reenviar', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Descargar Adjuntos', +'LBL_FROM'=>'De: ', +'LBL_CC'=>'Cc: ', +'LBL_BCC'=>'Cco: ', + +'NTC_REMOVE_INVITEE'=>'¿Está seguro de eliminar esta dirección de Email?', +'LBL_INVITEE'=>'Invitados', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Emails masivos', +'LBL_ATTACHMENT'=>'Adjunto', +'LBL_UPLOAD'=>'Actualizar', +'LBL_FILE_NAME'=>'Nombre de Archivo', +'LBL_SEND'=>'Enviar', + +'LBL_EMAIL_TEMPLATES'=>'Plantillas de Email', +'LBL_TEMPLATE_NAME'=>'Nombre de Plantilla', +'LBL_DESCRIPTION'=>'Descripción', +'LBL_EMAIL_TEMPLATES_LIST'=>'Lista de Plantillas de Email', +'LBL_EMAIL_INFORMATION'=>'Información de email', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Nuevo Prospecto', +'LBL_LEAD_TITLE'=>'Prospectos', + +'LBL_NEW_PRODUCT'=>'Nuevo Producto', +'LBL_PRODUCT_TITLE'=>'Productos', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', +'LBL_NEW_ACCOUNT'=>'Nueva Cuenta', +'LBL_ACCOUNT_TITLE'=>'Cuentas', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Usuarios', +'LBL_NEW_USER'=>'Nuevo Usuario', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Correo', +//Added for 4GA +'Date & Time Sent'=>'Fecha y Hora de envío', +'Sales Enity Module'=>'Módulo Entidad de Ventas', +'Related To'=>'Relacionado con', +'Assigned To'=>'Asignado a', +'Subject'=>'Asunto', +'Attachment'=>'Adjunto', +'Description'=>'Descripción', +'Time Start'=>'Fecha de Inicio', +'Created Time'=>'Fecha Creación ', +'Modified Time'=>'Fecha Modificación', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Por favor, verifique el nombre del servidor de correo...', +'MESSAGE_CHECK_MAIL_ID'=>'Por favor, verifique el Email de "Asignado A" ...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'El Email ha sido enviado a los seguientes usuarios :', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'El Email ha sido enviado a los siguientes contactos :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'El Email es incorrecto. Por favor verifique este Email...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Por favor, agregue usuarios y contactos...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' ¡El Correo ha sido enviado con exito!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Cargar WebMail', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Todos', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Este contacto no desea recibir correos.', +'LBL_WEBMAILS_TITLE'=>'Email', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'¡Error conectando con el servidor de email!
Compruebe en Configuración -> Lista de Servidores de Correo -> Lista de cuentas de correo', +'LBL_ALLMAILS'=>'Todos los Correos', +'LBL_TO_USERS'=>'A Usuarios', +'LBL_TO'=>'A: ', +'LBL_IN_SUBJECT'=>'en Asunto', +'LBL_IN_SENDER'=>'en Remitente', +'LBL_IN_SUBJECT_OR_SENDER'=>'en Asunto o Remitente', +'SELECT_EMAIL'=>'Selecciona Email', +'Sender'=>'Remitente', +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Su Servidor Entrante de Email no está configurado', +'LBL_MAILSELECT_INFO1'=>'Los siguientes tipos de email están asociados a la selección', +'LBL_MAILSELECT_INFO2'=>'Seleccione los tipos de email a los que hay que enviar el correo', +'LBL_MULTIPLE'=>'Multiples', +'LBL_COMPOSE_EMAIL'=>'Redactar Correo', +'LBL_VTIGER_EMAIL_CLIENT'=>'Cliente de Correo', + +//Added for 5.0.3 +'TITLE_VTIGERCRM_MAIL'=>'Correo', +'TITLE_COMPOSE_MAIL'=>'Redactar Correo', + +'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'No se ha podido mandar correo al usuario asignado.', +'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'Por favor verifica la cuenta de correo del usuario asignado...', +'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'Por favor verifica la cuenta de correo del remitente', +'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'No se ha podido mandar correo a esta cuenta de correo', +'PLEASE_CHECK_THIS_EMAILID'=>'Por favor verifica esta cuenta de correo...', +'LBL_CC_EMAIL_ERROR'=>'Cuenta de correo cc incorrecta', +'LBL_BCC_EMAIL_ERROR'=>'Cuenta de correo bcc incorrecta', +'LBL_NO_RCPTS_EMAIL_ERROR'=>'No se ha especificado destinatario', +'LBL_CONF_MAILSERVER_ERROR'=>'Configura el servidor de correo saliente en Herramientas --> Servidor de Correo', +'LBL_VTIGER_EMAIL_CLIENT'=>'Webmail Vtiger', +'LBL_MAILSELECT_INFO3'=>'No tienes permiso para visualizar las cuentas de correo del registro seleccionado.', +//Added for script alerts +'FEATURE_AVAILABLE_INFO' => 'Característica disponible sólo para Microsoft Internet Explorer 5.5+\n\n +¡Actualice su navegador!', +'DOWNLOAD_CONFIRAMATION' => '¿Descargar Archivo?', +'LBL_PLEASE_ATTACH' => '¡Adjunte un archivo permitido!', +'LBL_KINDLY_UPLOAD' => '¡Configure la variableupload_tmp_dir en el php.ini', +'LBL_EXCEED_MAX' => 'El Archivo sobrepasa el tamaño máximo permitido.Inténtelo con un archivo más pequeño.', +'LBL_BYTES' => ' bytes', +'LBL_CHECK_USER_MAILID' => 'Compruebe que el correo del usuario es una cuenta de correo válida', + +// Added/Updated for vtiger CRM 5.0.4 +'Activity Type'=>'Tipo de Evento', +'LBL_MAILSELECT_INFO'=>'tiene los siguientes emails configurados. Seleccione los que quiera utilizar', +'LBL_NO_RECORDS'=>'No hay registros en esta carpeta', +'LBL_PRINT_EMAIL'=> 'Imprimir', + +); + +?> diff --git a/modules/Emails/language/fr_fr.lang.php b/modules/Emails/language/fr_fr.lang.php new file mode 100644 index 0000000..4b671a2 --- /dev/null +++ b/modules/Emails/language/fr_fr.lang.php @@ -0,0 +1,141 @@ + 'Information', + 'LBL_MODULE_NAME' => 'Emails', + 'LBL_MODULE_TITLE' => 'Emails', + 'LBL_SEARCH_FORM_TITLE' => 'Recherche messages', + 'LBL_LIST_FORM_TITLE' => 'Liste messages', + 'LBL_NEW_FORM_TITLE' => 'Suivi email', + 'LBL_LIST_SUBJECT' => 'Objet', + 'LBL_LIST_CONTACT' => 'Contact', + 'LBL_LIST_RELATED_TO' => 'Relatif à', + 'LBL_LIST_DATE' => 'Date d\'envoi', + 'LBL_LIST_TIME' => 'Heure d\'envoi', + 'ERR_DELETE_RECORD' => 'Un enregistrement doit être spécifié pour supprimer.', + 'LBL_DATE_SENT' => 'Date d\'envoi :', + 'LBL_DATE_AND_TIME' => 'Date & heure d\'envoi :', + 'LBL_DATE' => 'Date d\'envoi :', + 'LBL_TIME' => 'Heure d\'envoi :', + 'LBL_SUBJECT' => 'Objet :', + 'LBL_BODY' => 'Corps :', + 'LBL_CONTACT_NAME' => ' Contact : ', + 'LBL_EMAIL' => 'Email :', + 'LBL_DETAILVIEW_EMAIL' => 'Email', + 'LBL_COLON' => ' :', + 'LBL_CHK_MAIL' => 'Vérifier mon courrier', + 'LBL_COMPOSE' => 'Nouveau message', + 'LBL_SETTINGS' => 'Configuration', + 'LBL_EMAIL_FOLDERS' => 'Dossier', + 'LBL_INBOX' => 'Explorateur des dossiers', + 'LBL_SENT_MAILS' => 'Par type de destinataire', + 'LBL_TRASH' => 'Corbeille', + 'LBL_JUNK_MAILS' => 'Messages supprimés', + 'LBL_TO_LEADS' => 'Prospects', + 'LBL_TO_CONTACTS' => 'Contacts', + 'LBL_TO_ACCOUNTS' => 'Comptes', + 'LBL_MY_MAILS' => 'Messagerie', + 'LBL_QUAL_CONTACT' => 'Emails qualifiés (Contacts)', + 'LBL_MAILS' => 'Emails', + 'LBL_QUALIFY_BUTTON' => 'Qualifier', + 'LBL_REPLY_BUTTON' => 'Répondre', + 'LBL_FORWARD_BUTTON' => 'Transférer', + 'LBL_DOWNLOAD_ATTCH_BUTTON' => 'Télécharger pièce jointe', + 'LBL_FROM' => 'De :', + 'LBL_CC' => 'Cc :', + 'LBL_BCC' => 'Bcc :', + 'NTC_REMOVE_INVITEE' => 'Etes-vous certain de vouloir retirer ce destinataire ?', + 'LBL_INVITEE' => 'Destinataires', + 'LBL_BULK_MAILS' => 'Email en masse', + 'LBL_ATTACHMENT' => 'Pièce jointe', + 'LBL_UPLOAD' => 'Téléchargement', + 'LBL_FILE_NAME' => 'Fichier', + 'LBL_SEND' => 'Envoi', + 'LBL_EMAIL_TEMPLATES' => 'Modèle message', + 'LBL_TEMPLATE_NAME' => 'Modèle', + 'LBL_DESCRIPTION' => 'Description', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Liste modèle', + 'LBL_EMAIL_INFORMATION' => 'Information email', + 'LBL_NEW_LEAD' => 'Nouveau prospect', + 'LBL_LEAD_TITLE' => 'Prospect', + 'LBL_NEW_PRODUCT' => 'Nouveau produit', + 'LBL_PRODUCT_TITLE' => 'Produits', + 'LBL_NEW_CONTACT' => 'Nouveau contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_NEW_ACCOUNT' => 'Nouveau compte', + 'LBL_ACCOUNT_TITLE' => 'Comptes', + 'LBL_USER_TITLE' => 'Collaborateur', + 'LBL_NEW_USER' => 'Nouveau collaborateur', + 'LBL_TOOL_FORM_TITLE' => 'Outil', + 'Date & Time Sent' => 'Date & heure d\'envoi', + 'Sales Enity Module' => 'Gestion', + 'Related To' => 'Relatif à', + 'Assigned To' => 'Assigné à', + 'Subject' => 'Objet', + 'Attachment' => 'Pièce jointe', + 'Description' => 'Description', + 'Time Start' => 'Commence à', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'MESSAGE_CHECK_MAIL_SERVER_NAME' => 'Veuillez vérifier le nom de votre serveur de mail...', + 'MESSAGE_CHECK_MAIL_ID' => 'Veuillez vérifier l\'adresse email du collaborateur \"Assigné à\" ', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS' => 'Le message a bien été envoyé à :', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => 'Le message a bien été envoyé à :', + 'MESSAGE_MAIL_ID_IS_INCORRECT' => 'Adresse email incorrecte. Veuillez vérifier l\'adresse email du destinataire...', + 'MESSAGE_ADD_USER_OR_CONTACT' => 'Veuillez sélectionner des collaborateurs ou contacts...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY' => ' Message(s) envoyé(s)!', + 'LBL_FETCH_WEBMAIL' => 'Rapatrier', + 'LBL_ALL' => 'Tout', + 'MESSAGE_CONTACT_NOT_WANT_MAIL' => 'Ce contact ne désire pas être contacté par email.', + 'LBL_WEBMAILS_TITLE' => 'Messagerie', + 'LBL_EMAILS_TITLE' => 'Emails', + 'LBL_MAIL_CONNECT_ERROR_INFO' => 'Erreur de connexion au serveur de mail ! + Vérifiez votre configuration dans Mes préférences -> Ma configuration email', + 'LBL_ALLMAILS' => 'Tous', + 'LBL_TO_USERS' => 'Collaborateur', + 'LBL_TO' => 'pour :', + 'LBL_IN_SUBJECT' => 'dans objet', + 'LBL_IN_SENDER' => 'dans expéditeur', + 'LBL_IN_SUBJECT_OR_SENDER' => 'dans objet ou expéditeur', + 'SELECT_EMAIL' => 'Sélectionnez une adresse', + 'Sender' => 'Expéditeur', + 'LBL_CONFIGURE_MAIL_SETTINGS' => 'Votre serveur de mail entrant n\'est pas configuré', + 'LBL_MAILSELECT_INFO1' => 'Les adresses email suivantes sont associées', + 'LBL_MAILSELECT_INFO2' => 'Sélectionnez les types d\'adresses à utiliser pour l\'expédition', + 'LBL_MULTIPLE' => 'Multiple', + 'LBL_COMPOSE_EMAIL' => 'Rédiger un message', + 'LBL_VTIGER_EMAIL_CLIENT' => 'Messagerie', + 'TITLE_VTIGERCRM_MAIL' => 'Gestion des mails', + 'TITLE_COMPOSE_MAIL' => 'Rédiger un message', + 'MESSAGE_MAIL_COULD_NOT_BE_SEND' => 'Le message ne peut être envoyé à l\'utilisateur.', + 'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID' => 'Veuillez vérifier l\'adresse email de l\'utilisateur...', + 'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID' => 'Veuillez vérifier votre adresse email', + 'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID' => 'Le message ne peut être envoyé à cette adresse email', + 'PLEASE_CHECK_THIS_EMAILID' => 'Veuillez vérifier l\'adresse email...', + 'LBL_CC_EMAIL_ERROR' => 'Adresse email en copie (cc) incorrecte', + 'LBL_BCC_EMAIL_ERROR' => 'Adresse email en copie invisible (Bcc) incorrecte', + 'LBL_NO_RCPTS_EMAIL_ERROR' => 'Veuillez spécifier un destinataire', + 'LBL_CONF_MAILSERVER_ERROR' => 'Veuillez signaler à votre administrateur de configurer le serveur de messagerie sortant', + 'LBL_MAILSELECT_INFO3' => 'Vous n\'avez pas les autorisations nécessaires pour consulter les adresses email des enregistrements sélectionnés.', + 'FEATURE_AVAILABLE_INFO' => 'Cette fonctionnalité n\'est actuellement disponible que pour les utilisateurs d\'Internet Explorer 5.5 et supérieur.', + 'DOWNLOAD_CONFIRAMATION' => 'Voulez-vous télécharger le fichier ?', + 'LBL_PLEASE_ATTACH' => 'Veuillez spécifier un fichier correct !', + 'LBL_KINDLY_UPLOAD' => 'Veuillez configurer la variable upload_tmp_dir de votre fichier php.ini.', + 'LBL_EXCEED_MAX' => 'Désolé, la taille de votre fichier excède la limite. Veuillez réessayer avec un fichier moins volumineux ', + 'LBL_BYTES' => ' octets', + 'LBL_CHECK_USER_MAILID' => 'Veuillez vérifier votre adresse email. Celle-ci doit être valide pour pouvoir envoyer des messages', + 'Activity Type' => 'Type d\'activité', + 'LBL_MAILSELECT_INFO' => 'a déjà le mail suivant associé. Veuillez sélectionner celui où le mail devra être envoyé.', + 'LBL_NO_RECORDS' => 'Aucun enregistrement trouvé', + 'LBL_PRINT_EMAIL'=> 'Imprimer', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Emails/language/hu_hu.lang.php b/modules/Emails/language/hu_hu.lang.php new file mode 100644 index 0000000..ff45dbe --- /dev/null +++ b/modules/Emails/language/hu_hu.lang.php @@ -0,0 +1,147 @@ + 'Általános adatok', + 'LBL_MODULE_NAME' => 'Email', + 'LBL_MODULE_TITLE' => 'Email: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Email Keresés', + 'LBL_LIST_FORM_TITLE' => 'Email Lista', + 'LBL_NEW_FORM_TITLE' => 'Email Nyomkövetés', + 'LBL_LIST_SUBJECT' => 'Tárgy', + 'LBL_LIST_CONTACT' => 'Kapcsolat', + 'LBL_LIST_RELATED_TO' => 'Kapcsolódik', + 'LBL_LIST_DATE' => 'Küldés Dátuma', + 'LBL_LIST_TIME' => 'Küldés Ideje', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a VTiger-fiók törléséhez', + 'LBL_DATE_SENT' => 'Küldés Dátuma:', + 'LBL_DATE_AND_TIME' => 'Küldés dátuma és ideje:', + 'LBL_DATE' => 'Küldés Dátuma:', + 'LBL_TIME' => 'Küldés Ideje:', + 'LBL_SUBJECT' => 'Tárgy:', + 'LBL_BODY' => 'Levéltörzs:', + 'LBL_CONTACT_NAME' => ' Kapcsolat neve: ', + 'LBL_EMAIL' => 'Email:', + 'LBL_DETAILVIEW_EMAIL' => 'E-Mail', + 'LBL_COLON' => ':', + 'LBL_CHK_MAIL' => 'Email lekérdezés', + 'LBL_COMPOSE' => 'Email szerkesztése', + 'LBL_SETTINGS' => 'Bejövő Mail Szerver Beállítások', + 'LBL_EMAIL_FOLDERS' => 'Email Mappák', + 'LBL_INBOX' => 'Beérkezett levelek', + 'LBL_SENT_MAILS' => 'Elküldött levelek', + 'LBL_TRASH' => 'Szemetes', + 'LBL_JUNK_MAILS' => 'Kéretlen levelek', + 'LBL_TO_LEADS' => 'Jelölteknek', + 'LBL_TO_CONTACTS' => 'Kapcsolatoknak', + 'LBL_TO_ACCOUNTS' => 'Cégeknek', + 'LBL_MY_MAILS' => 'A leveleim', + 'LBL_QUAL_CONTACT' => 'Iktatott emailek (Kapcsolatként)', + 'LBL_MAILS' => 'Levelek', + 'LBL_QUALIFY_BUTTON' => 'Iktat', + 'LBL_REPLY_BUTTON' => 'Válasz', + 'LBL_FORWARD_BUTTON' => 'Továbbítás', + 'LBL_DOWNLOAD_ATTCH_BUTTON' => 'Mellékletek letöltése', + 'LBL_FROM' => 'Küldő :', + 'LBL_CC' => 'Másolat :', + 'LBL_BCC' => 'Rejtett másolat :', + 'NTC_REMOVE_INVITEE' => 'Biztos vagy abban, hogy ezt a Címzettet el akarod távolítani az emailből?', + 'LBL_INVITEE' => 'Címzettek', + 'LBL_BULK_MAILS' => 'Tömeges levelek', + 'LBL_ATTACHMENT' => 'Melléklet', + 'LBL_UPLOAD' => 'Feltöltés', + 'LBL_FILE_NAME' => 'Fájlnév', + 'LBL_SEND' => 'Küldés', + 'LBL_EMAIL_TEMPLATES' => 'Email Sablonok', + 'LBL_TEMPLATE_NAME' => 'Sablon neve', + 'LBL_DESCRIPTION' => 'Leírás', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Email Sablonok Listája', + 'LBL_EMAIL_INFORMATION' => 'Email adatok', + 'LBL_NEW_LEAD' => 'Új Jelölt', + 'LBL_LEAD_TITLE' => 'Jelöltek', + 'LBL_NEW_PRODUCT' => 'Új Termék', + 'LBL_PRODUCT_TITLE' => 'Termékek', + 'LBL_NEW_CONTACT' => 'Új Kapcsolat', + 'LBL_CONTACT_TITLE' => 'Kapcsolatok', + 'LBL_NEW_ACCOUNT' => 'Új Cég', + 'LBL_ACCOUNT_TITLE' => 'Cégek', + 'LBL_USER_TITLE' => 'Felhasználók', + 'LBL_NEW_USER' => 'Új Felhasználó', + 'LBL_TOOL_FORM_TITLE' => 'Email Eszközök', + 'Date & Time Sent' => 'Küldés dátuma és ideje', + 'Sales Enity Module' => 'Értékesítési Entitás Modul', + 'Related To' => 'Kapcsolódik', + 'Assigned To' => 'Felelős', + 'Subject' => 'Tárgy', + 'Attachment' => 'Melléklet', + 'Description' => 'Megjegyzés', + 'Time Start' => 'Kezdés idő', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'MESSAGE_CHECK_MAIL_SERVER_NAME' => 'Kérjük, hogy ellenőrizd a Mail Szerver nevét...', + 'MESSAGE_CHECK_MAIL_ID' => 'Kérjük, hogy ellenőrizd az Email azonosítót a "Felelős" felhasználónál...', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS' => 'Az emailt elküldtük a következő Felhasználó(k)nak :', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => 'Az emailt elküldtük a következő Kapcsolat(ok)nak :', + 'MESSAGE_MAIL_ID_IS_INCORRECT' => 'A Mail azonosító hibás. Kérjük, hogy ellenőrizd ezt a Mail ID-t...', + 'MESSAGE_ADD_USER_OR_CONTACT' => 'Kérjük, hogy egy (vagy több) tetszőleges Felhasználót vagy Kapcsolatot adj hozzá...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY' => ' Az email(eke)t sikeresen elküldtük!', + 'LBL_FETCH_WEBMAIL' => 'Web Mail indítása', + 'LBL_ALL' => 'Mind', + 'MESSAGE_CONTACT_NOT_WANT_MAIL' => 'Ez a Kapcsolat nem óhajt emailt kapni.', + 'LBL_WEBMAILS_TITLE' => 'WebMails', + 'LBL_EMAILS_TITLE' => 'Email', + 'LBL_MAIL_CONNECT_ERROR_INFO' => 'Hiba a mail szerverhez kapcsolódás közben!
Ellenőrizd a Fiókom -> Mail Szerverek listája -> Email fiókok listája', + 'LBL_ALLMAILS' => 'Minden levél', + 'LBL_TO_USERS' => 'Felhasználóknak', + 'LBL_TO' => 'Címzett:', + 'LBL_IN_SUBJECT' => 'a Tárgyban', + 'LBL_IN_SENDER' => 'a Küldőben', + 'LBL_IN_SUBJECT_OR_SENDER' => 'a Tárgyban vagy a Küldőben', + 'SELECT_EMAIL' => 'Válassz Email címeket', + 'Sender' => 'Küldő', + 'LBL_CONFIGURE_MAIL_SETTINGS' => 'A Bejövő Mail Szerver nincs beállítva', + 'LBL_MAILSELECT_INFO1' => 'A következő email cím típust hozzárendeltük a kiválasztottakhoz', + 'LBL_MAILSELECT_INFO2' => 'Válaszd ki az email cím típust küldésre', + 'LBL_MULTIPLE' => 'Többszörös', + 'LBL_COMPOSE_EMAIL' => 'Email szerkesztése', + 'LBL_VTIGER_EMAIL_CLIENT' => 'vtiger Webmail Kliens', + 'TITLE_VTIGERCRM_MAIL' => 'vtigerCRM Mail', + 'TITLE_COMPOSE_MAIL' => 'Email szerkesztése', + 'MESSAGE_MAIL_COULD_NOT_BE_SEND' => 'A levelet nem sikerült elküldeni a Felelős Felhasználónak.', + 'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID' => 'Kérjük, hogy ellenőrizd a Felelős Felhasználó email címét...', + 'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID' => 'Kérjük, hogy ellenőrizd a Küldő email címét...', + 'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID' => 'A levelet nem sikerült elküldeni erre az email címre', + 'PLEASE_CHECK_THIS_EMAILID' => 'Kérjük, hogy ellenőrizd ezt az email címet...', + 'LBL_CC_EMAIL_ERROR' => 'A megadott Másolat email cím nem megfelelő', + 'LBL_BCC_EMAIL_ERROR' => 'A megadott Rejtett másolat email cím nem megfelelő', + 'LBL_NO_RCPTS_EMAIL_ERROR' => 'Nincs Címzett megadva', + 'LBL_CONF_MAILSERVER_ERROR' => 'Kérjük, hogy állítsd be a Kimenő levelek mailszerverét a Beállítások -> Kimenő levelek MailSzerver linken', + 'LBL_MAILSELECT_INFO3' => 'Neked nincs jogosultságod arra, hogy a kiválasztott rekord(ok) email címeit megtekintsd.', + 'FEATURE_AVAILABLE_INFO' => 'Ez a funkció jelenleg csak a Microsoft Internet Explorer 5.5+ felhasználóknak érhető el.Várja meg a következő verziót!', + 'DOWNLOAD_CONFIRAMATION' => 'Le szeretnéd tölteni a fájlt?', + 'LBL_PLEASE_ATTACH' => 'Kérjük, hogy adj meg egy létező fájlt a csatoláshoz és próbáld meg újra!', + 'LBL_KINDLY_UPLOAD' => 'Kérjük, hogy álltsd be az upload_tmp_dir változót a php.ini fájlban.', + 'LBL_EXCEED_MAX' => 'Sajnos a feltöltendő fájl elérte a maximális méretet. Kérjük, hogy próbáld meg egy másik fájllal, amely kisebb mint ', + 'LBL_BYTES' => ' byte', + 'LBL_CHECK_USER_MAILID' => 'Kérjük, hogy ellenőrid az aktuális felhasználó email azonosítóját. Ennek egy létező email azonosítónak kell lennie, hogy küldhess Emaileket', + 'Activity Type' => 'Aktivitás típus', + 'LBL_MAILSELECT_INFO' => 'a következő Email címeket összekapcsoltuk. Kérjük, hogy válaszd ki azokat az email címeket, amelyeknek az emailt el kell küldeni', + 'LBL_NO_RECORDS' => 'A rekord nem található', + 'LBL_PRINT_EMAIL' => 'Nyomtatás', + 'Access Count' => 'Megnyitva', + 'Activtiy Type' => 'Aktivitás típus', + 'CHOSE_EMAIL' => 'Válassz email-t' +); +?> \ No newline at end of file diff --git a/modules/Emails/language/nl_nl.lang.php b/modules/Emails/language/nl_nl.lang.php new file mode 100644 index 0000000..e15764b --- /dev/null +++ b/modules/Emails/language/nl_nl.lang.php @@ -0,0 +1,202 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.4 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Emails/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +// Mike Crowe Mod --------------------------------------------------------added for general search +'LBL_GENERAL_INFORMATION'=>'Algemene Informatie', + +'LBL_MODULE_NAME'=>'E-mails', +'LBL_MODULE_TITLE'=>'E-mails: Home', +'LBL_SEARCH_FORM_TITLE'=>'Zoek e-mail', +'LBL_LIST_FORM_TITLE'=>'E-mail lijst', +'LBL_NEW_FORM_TITLE'=>'Volg e-mail', + +'LBL_LIST_SUBJECT'=>'Onderwerp', +'LBL_LIST_CONTACT'=>'Contact', +'LBL_LIST_RELATED_TO'=>'Gerelateerd aan', +'LBL_LIST_DATE'=>'Datum verzonden', +'LBL_LIST_TIME'=>'Verzonden om', + +'ERR_DELETE_RECORD'=>"Een veld moet gespecificeerd zijn om een account te verwijderen.", +'LBL_DATE_SENT'=>'Datum verzonden:', +'LBL_SUBJECT'=>'Onderwerp:', +'LBL_BODY'=>'Inhoud:', +'LBL_DATE_AND_TIME'=>'Datum & tijd verzonden:', +'LBL_DATE'=>'Datum verzonden:', +'LBL_TIME'=>'Verzonden om:', +'LBL_SUBJECT'=>'Onderwerp:', +'LBL_BODY'=>'Inhoud:', +'LBL_CONTACT_NAME'=>' Contactnaam: ', +'LBL_EMAIL'=>'E-mail:', +'LBL_DETAILVIEW_EMAIL'=>'E-mail', + +'LBL_COLON'=>':', +'LBL_CHK_MAIL'=>'Bekijk e-mail', +'LBL_COMPOSE'=>'Nieuwe e-mail', +//Single change for 5.0.3 +'LBL_SETTINGS'=>'Instellingen', +'LBL_EMAIL_FOLDERS'=>'E-mail mappen', +'LBL_INBOX'=>'Postvak In', +'LBL_SENT_MAILS'=>'Verzonden Items', +'LBL_TRASH'=>'Prullenbak', +'LBL_JUNK_MAILS'=>'SPAM', +'LBL_TO_LEADS'=>'Aan leads', +'LBL_TO_CONTACTS'=>'Aan contacten', +'LBL_TO_ACCOUNTS'=>'Aan accounts', +'LBL_MY_MAILS'=>'Mijn e-mails', +'LBL_QUAL_CONTACT'=>'Gekwalificeerde e-mails (als contacten)', +'LBL_MAILS'=>'E-mails', +'LBL_QUALIFY_BUTTON'=>'Kwalificeer', +'LBL_REPLY_BUTTON'=>'Reageer', +'LBL_FORWARD_BUTTON'=>'Doorsturen', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Download bijlagen', +'LBL_FROM'=>'Van :', +'LBL_CC'=>'Cc :', +'LBL_BCC'=>'Bcc :', + +'NTC_REMOVE_INVITEE'=>'Wilt u dit adres verwijderen van deze e-mail?', +'LBL_INVITEE'=>'Ontvangers', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Bulk e-mails', +'LBL_ATTACHMENT'=>'Bijlage', +'LBL_UPLOAD'=>'Upload', +'LBL_FILE_NAME'=>'Bestandsnaam', +'LBL_SEND'=>'Verzenden', + +'LBL_EMAIL_TEMPLATES'=>'E-mail sjablonen', +'LBL_TEMPLATE_NAME'=>'Naam sjabloon', +'LBL_DESCRIPTION'=>'Omschrijving', +'LBL_EMAIL_TEMPLATES_LIST'=>'E-mail sjablonenlijst', +'LBL_EMAIL_INFORMATION'=>'E-mail informatie', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Nieuwe Lead', +'LBL_LEAD_TITLE'=>'Leads', + +'LBL_NEW_PRODUCT'=>'Nieuw Product', +'LBL_PRODUCT_TITLE'=>'Producten', +'LBL_NEW_CONTACT'=>'Nieuw contact', +'LBL_CONTACT_TITLE'=>'Contacten', +'LBL_NEW_ACCOUNT'=>'Nieuw account', +'LBL_ACCOUNT_TITLE'=>'Accounts', + +// Added fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Gebruiker', +'LBL_NEW_USER'=>'Nieuwe gebruiker', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'E-mail Gereedschap', +//Added for 4GA +'Date & Time Sent'=>'Datum & tijd verzonden', +'Sales Enity Module'=>'Verkoop module', +'Activtiy Type'=>'Type activiteiten', +'Related To'=>'Gerelateerd aan', +'Assigned To'=>'Toegevoegd aan', +'Subject'=>'Onderwerp', +'Attachment'=>'Bijlage', +'Description'=>'Omschrijving', +'Time Start'=>'Starttijd', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Controleer uw e-mail server naam...', +'MESSAGE_CHECK_MAIL_ID'=>'Controleer het e-mailadres of "Toegevoegd aan" gebruiker...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'E-mail is verstuurd aan de volgende gebruiker(s) :', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'E-mail is verstuurd aan de volgende contact(en) :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'E-mailadres is niet correct....', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Gebruiker(s) of contact(en)... toevoegen a.u.b.', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' e-mail(s) zijn verstuurd!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Webmail Ophalen', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Allemaal', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Deze contactpersoon wil geen e-mail ontvangen.', +'LBL_WEBMAILS_TITLE'=>'Webmails', +'LBL_EMAILS_TITLE'=>'E-mails', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'Kan geen verbinding krijgen met de mail server!
Controleer in mijn accounts->Mail serverlijst -> mail accountlijst', +'LBL_ALLMAILS'=>'Alle e-mails', +'LBL_TO_USERS'=>'Aan gebruiker', +'LBL_TO'=>'Aan:', +'LBL_IN_SUBJECT'=>'In onderwerp', +'LBL_IN_SENDER'=>'In van', +'LBL_IN_SUBJECT_OR_SENDER'=>'In onderwerp of van', +'CHOSE_EMAIL'=>'Kies e-mailadres', +'Sender'=>'Van', +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Uw inkomende e-mailserver is niet geconfigureerd', +'LBL_MAILSELECT_INFO1'=>'Dit e-mailadres heeft verschillende adressen.', +'LBL_MAILSELECT_INFO2'=>'Selecteer het e-mailadres waar u dit bericht naar toe stuurt.', +'LBL_MULTIPLE'=>'Verschillende', +'LBL_COMPOSE_EMAIL'=>'Nieuwe e-mail', +'LBL_VTIGER_EMAIL_CLIENT'=>'vTiger e-mail Client', + +//Added for 5.0.3 +'TITLE_VTIGERCRM_MAIL'=>'vTiger CRM e-mail', +'TITLE_COMPOSE_MAIL'=>'Nieuwe e-mail', + +'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'Kan geen e-mail versturen naar de geselecteerde gebruiker.', +'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'Controleer e-mailadres van geselecteerde gebruiker a.u.b. ', +'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'Controleer het verzend e-mailadres a.u.b.', +'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'Kan geen e-mail versturen naar dit e-mailadres', +'PLEASE_CHECK_THIS_EMAILID'=>'aub Controleer dit e-mailadres', +'LBL_CC_EMAIL_ERROR'=>'Uw cc e-mailadres is niet correct', +'LBL_BCC_EMAIL_ERROR'=>'Uw bcc e-mailadres is niet correct', +'LBL_NO_RCPTS_EMAIL_ERROR'=>'Geen ontvangers weergegeven', +'LBL_CONF_MAILSERVER_ERROR'=>'Configureer uw uitgaande mailserver selecteer settings ---> uitgaande server link a.u.b. ', +'LBL_VTIGER_EMAIL_CLIENT'=>'vTiger e-mail Client', +'LBL_MAILSELECT_INFO3'=>'U heeft geen permissie om de e-mailadressen van de geselecteerde velden te bekijken.', +//Added for script alerts +'FEATURE_AVAILABLE_INFO' => 'Dit kenmerk is momenteel alleen beschikbaar voor Microsoft Internet Explorer 5.5+!', +'DOWNLOAD_CONFIRAMATION' => 'Wilt u het bestand downloaden?', +'LBL_PLEASE_ATTACH' => 'Een geldig bestand bijvoegen en opnieuw proberen a.u.b.!', +'LBL_KINDLY_UPLOAD' => 'aub configureren upload_tmp_dir variabel in php.ini bestand.', +'LBL_EXCEED_MAX' => 'Sorry, het bestand overschrijft het maximum limiet. Een kleiner bestand proberen a.u.b.', +'LBL_BYTES' => ' bytes', +'LBL_CHECK_USER_MAILID' => 'Controleer het huidige e-mailadres van de gebruiker. Het moet een geldig e-mailadres zijn om e-mails te versturen', + +// Added/Updated for vtiger CRM 5.0.4 +'Activity Type'=>'Activiteit Type', +'LBL_MAILSELECT_INFO'=>'heeft de volgende e-mail IDs gekoppeld. Selecteer de e-mailadressen die gebruikt moeten worden', +'LBL_NO_RECORDS' => 'Niets gevonden', +'LBL_PRINT_EMAIL'=> 'Afdrukken', + + + +); + +?> diff --git a/modules/Emails/language/phpmailer.lang-de_de.php b/modules/Emails/language/phpmailer.lang-de_de.php new file mode 100644 index 0000000..bd9b893 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-de_de.php @@ -0,0 +1,31 @@ +.'; +$PHPMAILER_LANG["file_access"] = 'Konnte nicht auf die Datei zugreifen: '; +$PHPMAILER_LANG["file_open"] = 'Dateifehler: Konnte die Datei nicht ffenen: '; +$PHPMAILER_LANG["encoding"] = 'Unbekannte Kodierung: '; +?> diff --git a/modules/Emails/language/phpmailer.lang-en_gb.php b/modules/Emails/language/phpmailer.lang-en_gb.php new file mode 100644 index 0000000..1085d32 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-en_gb.php @@ -0,0 +1,29 @@ + diff --git a/modules/Emails/language/phpmailer.lang-en_us.php b/modules/Emails/language/phpmailer.lang-en_us.php new file mode 100644 index 0000000..7b09c42 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-en_us.php @@ -0,0 +1,31 @@ +.'; +$PHPMAILER_LANG["file_access"] = 'Could not access file: '; +$PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: '; +$PHPMAILER_LANG["encoding"] = 'Unknown encoding: '; +?> diff --git a/modules/Emails/language/phpmailer.lang-es_es.php b/modules/Emails/language/phpmailer.lang-es_es.php new file mode 100644 index 0000000..dac6578 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-es_es.php @@ -0,0 +1,23 @@ + diff --git a/modules/Emails/language/phpmailer.lang-es_mx.php b/modules/Emails/language/phpmailer.lang-es_mx.php new file mode 100644 index 0000000..dac6578 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-es_mx.php @@ -0,0 +1,23 @@ + diff --git a/modules/Emails/language/phpmailer.lang-fr_fr.php b/modules/Emails/language/phpmailer.lang-fr_fr.php new file mode 100644 index 0000000..d80b7c0 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-fr_fr.php @@ -0,0 +1,29 @@ + diff --git a/modules/Emails/language/phpmailer.lang-hu_hu.php b/modules/Emails/language/phpmailer.lang-hu_hu.php new file mode 100644 index 0000000..be3eab3 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-hu_hu.php @@ -0,0 +1,33 @@ +.'; +$PHPMAILER_LANG["file_access"] = 'A fájl nem hozzáférhető: '; +$PHPMAILER_LANG["file_open"] = 'Fájl hiba: A fájl nem nyitható meg: '; +$PHPMAILER_LANG["encoding"] = 'Ismeretlen kódolás: '; +?> diff --git a/modules/Emails/language/phpmailer.lang-nl_nl.php b/modules/Emails/language/phpmailer.lang-nl_nl.php new file mode 100644 index 0000000..eeba6f4 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-nl_nl.php @@ -0,0 +1,53 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.2 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Emails/language/phpmailer.lang-nl_nl.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +/** + * PHPMailer language file. + * Dutch Version + */ +$PHPMAILER_LANG = array(); +$PHPMAILER_LANG["provide_address"] = 'U moet minstens 1 ' . + 'ontvangend email adres.'; +$PHPMAILER_LANG["mailer_not_supported"] = ' mailer is niet beschikbaar.'; +$PHPMAILER_LANG["execute"] = 'Kon het niet uitvoeren: '; +$PHPMAILER_LANG["instantiate"] = 'Kon geen mail functie starten.'; +$PHPMAILER_LANG["authenticate"] = 'SMTP Error: Authenticate mislukt.'; +$PHPMAILER_LANG["from_failed"] = 'Het volgende van het adres was fout: '; +$PHPMAILER_LANG["recipients_failed"] = 'SMTP Error: De volgende ' . + 'ontvangers was fout: '; +$PHPMAILER_LANG["data_not_accepted"] = 'SMTP Error: Data niet geaccepteerd.'; +$PHPMAILER_LANG["connect_host"] = 'SMTP Error: Geen verbinding met SMTP host1111111111=======>.'; +$PHPMAILER_LANG["file_access"] = 'Kon niet bij de file: '; +$PHPMAILER_LANG["file_open"] = 'Bestands Fout: Kon bestand niet openen: '; +$PHPMAILER_LANG["encoding"] = 'Onbekende encoding: '; +?> diff --git a/modules/Emails/language/phpmailer.lang-pt_br.php b/modules/Emails/language/phpmailer.lang-pt_br.php new file mode 100644 index 0000000..6943607 --- /dev/null +++ b/modules/Emails/language/phpmailer.lang-pt_br.php @@ -0,0 +1,31 @@ +.'; +$PHPMAILER_LANG["file_access"] = 'Não é possível acessar o arquivo: '; +$PHPMAILER_LANG["file_open"] = 'Erro Arquivo: Não é possível abrir o arquivo: '; +$PHPMAILER_LANG["encoding"] = 'Codificação desconhecida: '; +?> diff --git a/modules/Emails/language/pt_br.lang.php b/modules/Emails/language/pt_br.lang.php new file mode 100644 index 0000000..45e0a98 --- /dev/null +++ b/modules/Emails/language/pt_br.lang.php @@ -0,0 +1,183 @@ +'Informação Geral', + +'LBL_MODULE_NAME'=>'Email', +'LBL_MODULE_TITLE'=>'Email: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisar Email', +'LBL_LIST_FORM_TITLE'=>'Listar Email', +'LBL_NEW_FORM_TITLE'=>'Rastrear Email', + +'LBL_LIST_SUBJECT'=>'Assunto', +'LBL_LIST_CONTACT'=>'Contato', +'LBL_LIST_RELATED_TO'=>'Relacionado a', +'LBL_LIST_DATE'=>'Data Envio', +'LBL_LIST_TIME'=>'Hora Envio', + +'ERR_DELETE_RECORD'=>"Defina um número de registro para apagar a Organização.", +'LBL_DATE_SENT'=>'Data Envio:', +'LBL_DATE_AND_TIME'=>'Data & Hora Envio:', +'LBL_DATE'=>'Data Envio:', +'LBL_TIME'=>'Hora Envio:', +'LBL_SUBJECT'=>'Assunto:', +'LBL_BODY'=>'Corpo:', +'LBL_CONTACT_NAME'=>' Nome Contato:', +'LBL_EMAIL'=>'Email:', +'LBL_DETAILVIEW_EMAIL'=>'E-Mail', +'LBL_COLON'=>':', +'LBL_CHK_MAIL'=>'Checar Email', +'LBL_COMPOSE'=>'Nova Mensagem', +//Single change for 5.0.3 +'LBL_SETTINGS'=>'Configurações Servidor', +'LBL_EMAIL_FOLDERS'=>'Folders Email', +'LBL_INBOX'=>'Caixa Entrada', +'LBL_SENT_MAILS'=>'Enviar Emails', +'LBL_TRASH'=>'Lixo', +'LBL_JUNK_MAILS'=>'Mensagens não Solicitadas ', +'LBL_TO_LEADS'=>'Para Leads', +'LBL_TO_CONTACTS'=>'Para Contatos', +'LBL_TO_ACCOUNTS'=>'Para Organizações', +'LBL_MY_MAILS'=>'Meus Emails', +'LBL_QUAL_CONTACT'=>'Emails Qualificados', +'LBL_MAILS'=>'Mensagens', +'LBL_QUALIFY_BUTTON'=>'Qualificar', +'LBL_REPLY_BUTTON'=>'Responder', +'LBL_FORWARD_BUTTON'=>'Reenviar', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Download Anexos', +'LBL_FROM'=>'De :', +'LBL_CC'=>'Cc :', +'LBL_BCC'=>'Bcc :', + +'NTC_REMOVE_INVITEE'=>'Você tem certeza que deseja remover este destinatário do email?', +'LBL_INVITEE'=>'Destinatários', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Mensagens em Massa', +'LBL_ATTACHMENT'=>'Anexos', +'LBL_UPLOAD'=>'Upload', +'LBL_FILE_NAME'=>'Nome Arquivo', +'LBL_SEND'=>'Enviar', + +'LBL_EMAIL_TEMPLATES'=>'Modelo Email', +'LBL_TEMPLATE_NAME'=>'Nome Modelo', +'LBL_DESCRIPTION'=>'Descrição', +'LBL_EMAIL_TEMPLATES_LIST'=>'Lista Modelos Email', +'LBL_EMAIL_INFORMATION'=>'Informação Email', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Novo Lead', +'LBL_LEAD_TITLE'=>'Leads', + +'LBL_NEW_PRODUCT'=>'Novo Produto', +'LBL_PRODUCT_TITLE'=>'Produtos', +'LBL_NEW_CONTACT'=>'Novo Contato', +'LBL_CONTACT_TITLE'=>'Contatos', +'LBL_NEW_ACCOUNT'=>'Nova Organização', +'LBL_ACCOUNT_TITLE'=>'Organizações', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Usuários', +'LBL_NEW_USER'=>'Novo Usuário', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Ferramentas Email', +//Added for 4GA +'Date & Time Sent'=>'Data & Hora Envio', +'Sales Enity Module'=>'Módulo de Vendas', +'Related To'=>'Relacionado à', +'Assigned To'=>'Responsável', +'Subject'=>'Assunto', +'Attachment'=>'Anexo', +'Description'=>'Descrição', +'Time Start'=>'Hora Inicio', +'Created Time'=>'Hora Criação', +'Modified Time'=>'Hora Modificação', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Por favor, verifique o Nome Servidor de Correio...', +'MESSAGE_CHECK_MAIL_ID'=>'Por favor, verifique o Email do Usuário Destinatário...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'A mensagem está sendo enviada para o(s) seguinte(s) Usuário(s) :', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'A mensagem está sendo enviada para o(s) seguinte(s) Contato(s) :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'O endereço da mensagem está incorreto. Por favor, verifique este endereço...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Por favor, adicione algum(s) Usuário(s) ou Contato(s)...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' Mensagem(s) enviada(s) com sucesso!!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Obter Email', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Todos', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Este Contato não deseja receber Emails.', +'LBL_WEBMAILS_TITLE'=>'WebMails', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'Erro ao conectar Servidor de Mensagem!
Verifique em Minhas Organizações->Lista Servidor de Mensagem -> Lista Organizações de Email', +'LBL_ALLMAILS'=>'Todos Emails', +'LBL_TO_USERS'=>'Para Usuários', +'LBL_TO'=>'Para:', +'LBL_IN_SUBJECT'=>'em Assunto', +'LBL_IN_SENDER'=>'em Remetente', +'LBL_IN_SUBJECT_OR_SENDER'=>'em Assunto ou Remetente', +'SELECT_EMAIL'=>'Escolha Email', +'Sender'=>'Remetente', +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Seu Servidor Recebimento Email não está configurado', +'LBL_MAILSELECT_INFO1'=>'O(s) seguinte(s) Email(s) está(ão) disponível(eis) para ser selecionado(s) em', +'LBL_MAILSELECT_INFO2'=>'Selecione o(s) tipo(s) de Email(s) para o qual a mensagem deve ser enviada:', +'LBL_MULTIPLE'=>'Multiplo', +'LBL_COMPOSE_EMAIL'=>'Novo E-Mail', +'LBL_VTIGER_EMAIL_CLIENT'=>'Cliente Webmail vtiger', + +//Added for 5.0.3 +'TITLE_VTIGERCRM_MAIL'=>'Correio vtigerCRM', +'TITLE_COMPOSE_MAIL'=>'Nova Mensagem', + +'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'A mensagem não pode ser enviada para o usuário responsável.', +'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'Por favor verifique o endereço de email atribuído ao usuário....', +'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'Por favor verifique o endereço de email', +'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'Mensagem não pode ser enviada para este endereço de email', +'PLEASE_CHECK_THIS_EMAILID'=>'Por favor verifique o endereço deste email...', +'LBL_CC_EMAIL_ERROR'=>'Seu endereço de email CC não está correto', +'LBL_BCC_EMAIL_ERROR'=>'Seu endereço de email BCC não está correto', +'LBL_NO_RCPTS_EMAIL_ERROR'=>'Nenhum destinatário epecificado', +'LBL_CONF_MAILSERVER_ERROR'=>'Por favor configure seu servidor de envio de mensagens em Configurações --> link Servidor de Envio', +'LBL_VTIGER_EMAIL_CLIENT'=>'Cliente Webmail vtiger', +'LBL_MAILSELECT_INFO3'=>'Você não tem permissão para visualizar endereço(s) de emai(s)l nos Registro(s) selecionado(s)', +//Added for script alerts +'FEATURE_AVAILABLE_INFO' => 'Este atributo está disponível atualmente somente para usuários do Microsoft Internet Explorer 5.5+ \n\nAguarde +por uma atualização!', +'DOWNLOAD_CONFIRAMATION' => 'Você deseja fazer o download do arquivo?', +'LBL_PLEASE_ATTACH' => 'Por favor, anexe um arquivo válido e tente novamente!', +'LBL_KINDLY_UPLOAD' => 'Por favor, configure a variável upload_tmp_dir no arquivo php.ini', +'LBL_EXCEED_MAX' => 'Desculpe, o arquivo transferido excedeu o limite máximo. Por gentileza, tente um arquivo menor', +'LBL_BYTES' => ' bytes', +'LBL_CHECK_USER_MAILID' => 'Por favor verifique a identificação do usuário atual. É necessário um nome válido para enviar Mensagens', + +// Added/Updated for vtiger CRM 5.0.4 +'Activity Type'=>'Tipo Atividade', +'LBL_MAILSELECT_INFO'=>'os seguintes Emails foram associados. Por favor selecione o ID do Email para o qual deve ser enviado', +'LBL_NO_RECORDS' => 'Nenhum Registro encontrado', +'LBL_PRINT_EMAIL'=> 'Imprimir', + +); + +?> diff --git a/modules/Emails/language/zh_cn.lang.php b/modules/Emails/language/zh_cn.lang.php new file mode 100644 index 0000000..179a4f9 --- /dev/null +++ b/modules/Emails/language/zh_cn.lang.php @@ -0,0 +1,187 @@ + '一般信息', + + 'LBL_MODULE_NAME' => '邮件', + 'LBL_MODULE_TITLE' => '邮件: 首页', + 'LBL_SEARCH_FORM_TITLE' => '查找邮件', + 'LBL_LIST_FORM_TITLE' => '邮件列表', + 'LBL_NEW_FORM_TITLE' => '发送邮件', + + 'LBL_LIST_SUBJECT' => '标题', + 'LBL_LIST_CONTACT' => '联系人', + 'LBL_LIST_RELATED_TO' => '关联于', + 'LBL_LIST_DATE' => '发送日期', + 'LBL_LIST_TIME' => '发送时间', + + 'ERR_DELETE_RECORD' => '必须指定客户编号才能删除.', + 'LBL_DATE_SENT' => '发送日期:', + 'LBL_DATE_AND_TIME' => '发送日期与时间:', + 'LBL_DATE' => '发送日期:', + 'LBL_TIME' => '发送时间:', + 'LBL_SUBJECT' => '标题:', + 'LBL_BODY' => '邮件内容:', + 'LBL_CONTACT_NAME' => ' 联系人姓名: ', + 'LBL_EMAIL' => 'Email:', + 'LBL_DETAILVIEW_EMAIL' => 'E-Mail', +'LBL_COLON'=>':', + 'LBL_CHK_MAIL' => '检查邮件', +'LBL_COMPOSE'=>'撰写新邮件', +//Single change for 5.0.3 +'LBL_SETTINGS'=>'邮件服务器设置', +'LBL_EMAIL_FOLDERS'=>'邮件文件夹', +'LBL_INBOX' => '收件箱', +'LBL_SENT_MAILS'=>'邮件备份', +'LBL_TRASH' => '垃圾桶', + 'LBL_JUNK_MAILS' => '垃圾邮件', + 'LBL_TO_LEADS' => '潜在客户', + 'LBL_TO_CONTACTS' => '联系人', + 'LBL_TO_ACCOUNTS' => '客户', + 'LBL_MY_MAILS' => '我的WebMail', +'LBL_QUAL_CONTACT' => '已转换邮件(转为联系人)', + 'LBL_MAILS' => '邮件', +'LBL_QUALIFY_BUTTON' => '转换', + 'LBL_REPLY_BUTTON' => '回复', + 'LBL_FORWARD_BUTTON' => '转发', + 'LBL_DOWNLOAD_ATTCH_BUTTON' => '下载附件', + 'LBL_FROM' => '发件人:', + 'LBL_CC' => '抄送:', + 'LBL_BCC' => '秘密抄送:', + + 'NTC_REMOVE_INVITEE' => '您确定要把此人从收件人中删除吗?', +'LBL_INVITEE'=>'受邀者', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php + 'LBL_BULK_MAILS' => '群发邮件', + 'LBL_ATTACHMENT' => '附件', + 'LBL_UPLOAD' => '上传', + 'LBL_FILE_NAME' => '文件名称', + 'LBL_SEND' => '发送', + + 'LBL_EMAIL_TEMPLATES' => 'Email模版', + 'LBL_TEMPLATE_NAME' => '模版名称', + 'LBL_DESCRIPTION' => '说明', + 'LBL_EMAIL_TEMPLATES_LIST' => '模版列表', + 'LBL_EMAIL_INFORMATION' => '邮件信息', + + + + +//for v4 release added + 'LBL_NEW_LEAD' => '新增潜在客户', + 'LBL_LEAD_TITLE' => '潜在客户', + + 'LBL_NEW_PRODUCT' => '新增产品', + 'LBL_PRODUCT_TITLE' => '产品', + 'LBL_NEW_CONTACT' => '新增联系人', + 'LBL_CONTACT_TITLE' => '联系人', + 'LBL_NEW_ACCOUNT' => '新增客户', + 'LBL_ACCOUNT_TITLE' => '客户', + +// Added vtiger_fields after vtiger4 - Beta + 'LBL_USER_TITLE' => '用户', + 'LBL_NEW_USER' => '新增用户', + +// Added for 4 GA + 'LBL_TOOL_FORM_TITLE' => '邮件编辑器', +//Added for 4GA + 'Date & Time Sent' => '发送日期与时间', + 'Sales Enity Module' => '销售实体模块', +'Related To' => '关联于', + 'Assigned To' => '负责人', + 'Subject' => '标题', + 'Attachment' => '附件', + 'Description' => '描述', + 'Time Start' => '开始时间', + 'Created Time' => '创建时间', + 'Modified Time' => '修改时间', + + 'MESSAGE_CHECK_MAIL_SERVER_NAME' => '请检查邮件服务器名称...', + 'MESSAGE_CHECK_MAIL_ID' => '请检查邮件地址', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS' => '邮件已经发送给以下用户:', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => '邮件已经发送给以下联系人:', + 'MESSAGE_MAIL_ID_IS_INCORRECT' => '邮件地址不正确. 请检查这封邮件的地址...', + 'MESSAGE_ADD_USER_OR_CONTACT' => '请添加其它用户或联系人...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY' => ' 邮件发送成功!', + +// Added for web mail post 4.0.1 release + 'LBL_FETCH_WEBMAIL' => '获取WebMail', +//Added for 4.2 Release -- CustomView +'LBL_ALL' => '全部', + 'MESSAGE_CONTACT_NOT_WANT_MAIL' => '这个联系人不想收到邮件。', + 'LBL_WEBMAILS_TITLE' => 'WebMail', + 'LBL_EMAILS_TITLE' => 'Emails', + 'LBL_MAIL_CONNECT_ERROR_INFO' => '连接邮件服务器时发生错误,检查我的账号=>邮件服务器列表=>邮件账号', + 'LBL_ALLMAILS' => '所有邮件', + 'LBL_TO_USERS' => '用户', + 'LBL_TO' => '收件人:', + 'LBL_IN_SUBJECT' => '标题', + 'LBL_IN_SENDER' => '发件人', + 'LBL_IN_SUBJECT_OR_SENDER' => '标题或发件人', + 'SELECT_EMAIL' => '请选择Email', + 'Sender' => '发件人', + 'LBL_CONFIGURE_MAIL_SETTINGS' => '您的接收邮件服务器还没设置', + 'LBL_MAILSELECT_INFO' => '请选择要发送的邮件', + 'LBL_MAILSELECT_INFO1' => '下面的邮件与已选记录有关', + 'LBL_MAILSELECT_INFO2' => '选择接收邮件的Email', + 'LBL_MULTIPLE' => '多选', + 'LBL_COMPOSE_EMAIL' => '撰写新邮件', + 'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger WebMail客户', + +//Added for 5.0.3 +'TITLE_VTIGERCRM_MAIL'=>'vtigerCRM 邮件', +'TITLE_COMPOSE_MAIL'=>'撰写新邮件', + +'MESSAGE_MAIL_COULD_NOT_BE_SEND'=>'邮件不能发送到被邀请的用户.', +'MESSAGE_PLEASE_CHECK_ASSIGNED_USER_EMAILID'=>'请检查受邀用户的电子邮件id...', +'MESSAGE_PLEASE_CHECK_THE_FROM_MAILID'=>'请检查电子邮件id', +'MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID'=>'邮件不能发送到这电子邮件id', +'PLEASE_CHECK_THIS_EMAILID'=>'请检查这邮件id...', +'LBL_CC_EMAIL_ERROR'=>'您的CC邮件ID不正确', +'LBL_BCC_EMAIL_ERROR'=>'您的BCC邮件ID不正确', +'LBL_NO_RCPTS_EMAIL_ERROR'=>'没有指定对象', +'LBL_CONF_MAILSERVER_ERROR'=>'请设置您外部的邮件服务器 ---> 外出的服务器链接', +'LBL_VTIGER_EMAIL_CLIENT'=>'vtiger WebMail 客户', +'LBL_MAILSELECT_INFO3'=>'您不能查看已选记录的邮件ID.', +'LBL_NO_RECORDS' => '没有记录', +//Added for script alerts +'FEATURE_AVAILABLE_INFO' => '这个功能只支持Microsoft Internet Explorer 5.5+或更高!', +'DOWNLOAD_CONFIRAMATION' => '您想要下载文件 ?', +'LBL_PLEASE_ATTACH' => '请再尝试附上一个有效的文件', +'LBL_KINDLY_UPLOAD' => '请配置在php.ini中的upload_tmp_dir变量文件。', +'LBL_EXCEED_MAX' => '抱歉, 上传的文件超出最大值极限。请尝试一个小文件 ', +'LBL_BYTES' => ' 字节', +'LBL_CHECK_USER_MAILID' => '请检查当前用户的电邮ID是否正确', + +// Added/Updated for vtiger CRM 5.0.4 +'Activity Type'=>'任务类型', +'LBL_MAILSELECT_INFO'=>'请选择接收邮件的Email', +'LBL_NO_RECORDS' => '未找到任何记录', +'LBL_PRINT_EMAIL'=> '打印', +); + +?> diff --git a/modules/Emails/mail.php b/modules/Emails/mail.php new file mode 100644 index 0000000..eb503e4 --- /dev/null +++ b/modules/Emails/mail.php @@ -0,0 +1,586 @@ +println("To id => '".$to_email."'\nSubject ==>'".$subject."'\nContents ==> '".$contents."'"); + + //Get the email id of assigned_to user -- pass the value and name, name must be "user_name" or "id"(field names of vtiger_users vtiger_table) + //$to_email = getUserEmailId('id',$assigned_user_id); + + //if module is HelpDesk then from_email will come based on support email id + if($from_email == '') { + //if from email is not defined, then use the useremailid as the from address + $from_email = getUserEmailId('user_name',$from_name); + } + + //if the newly defined from email field is set, then use this email address as the from address + //and use the username as the reply-to address + $query = "select * from vtiger_systems where server_type=?"; + $params = array('email'); + $result = $adb->pquery($query,$params); + $from_email_field = $adb->query_result($result,0,'from_email_field'); + if(isUserInitiated()) { + $replyToEmail = $from_email; + } else { + $replyToEmail = $from_email_field; + } + if(isset($from_email_field) && $from_email_field!=''){ + //setting from _email to the defined email address in the outgoing server configuration + $from_email = $from_email_field; + } + + if($module != "Calendar") + $contents = addSignature($contents,$from_name); + + $mail = new PHPMailer(); + + setMailerProperties($mail,$subject,$contents,$from_email,$from_name,trim($to_email,","),$attachment,$emailid,$module,$logo); + setCCAddress($mail,'cc',$cc); + setCCAddress($mail,'bcc',$bcc); + if(!empty($replyToEmail)) { + $mail->AddReplyTo($replyToEmail); + } + + // vtmailscanner customization: If Support Reply to is defined use it. + global $HELPDESK_SUPPORT_EMAIL_REPLY_ID; + if($HELPDESK_SUPPORT_EMAIL_REPLY_ID && $HELPDESK_SUPPORT_EMAIL_ID != $HELPDESK_SUPPORT_EMAIL_REPLY_ID) { + $mail->AddReplyTo($HELPDESK_SUPPORT_EMAIL_REPLY_ID); + } + // END + + // Fix: Return immediately if Outgoing server not configured + if(empty($mail->Host)) { + return 0; + } + // END + + $mail_status = MailSend($mail); + + if($mail_status != 1) + { + $mail_error = getMailError($mail,$mail_status,$mailto); + } + else + { + $mail_error = $mail_status; + } + + return $mail_error; +} + +/** Function to get the user Email id based on column name and column value + * $name -- column name of the vtiger_users vtiger_table + * $val -- column value + */ +function getUserEmailId($name,$val) +{ + global $adb; + $adb->println("Inside the function getUserEmailId. --- ".$name." = '".$val."'"); + if($val != '') + { + //done to resolve the PHP5 specific behaviour + $sql = "SELECT email1, email2, secondaryemail from vtiger_users WHERE status='Active' AND ". $adb->sql_escape_string($name)." = ?"; + $res = $adb->pquery($sql, array($val)); + $email = $adb->query_result($res,0,'email1'); + if($email == '') + { + $email = $adb->query_result($res,0,'email2'); + if($email == '') + { + $email = $adb->query_result($res,0,'secondaryemail '); + } + } + $adb->println("Email id is selected => '".$email."'"); + return $email; + } + else + { + $adb->println("User id is empty. so return value is ''"); + return ''; + } +} + +/** Funtion to add the user's signature with the content passed + * $contents -- where we want to add the signature + * $fromname -- which user's signature will be added to the contents + */ +function addSignature($contents, $fromname) +{ + global $adb; + $adb->println("Inside the function addSignature"); + + $sign = nl2br($adb->query_result($adb->pquery("select signature from vtiger_users where user_name=?", array($fromname)),0,"signature")); + if($sign != '') + { + $contents .= '

'.$sign; + $adb->println("Signature is added with the body => '.".$sign."'"); + } + else + { + $adb->println("Signature is empty for the user => '".$fromname."'"); + } + return $contents; +} + +/** Function to set all the Mailer properties + * $mail -- reference of the mail object + * $subject -- subject of the email you want to send + * $contents -- body of the email you want to send + * $from_email -- from email id which will be displayed in the mail + * $from_name -- from name which will be displayed in the mail + * $to_email -- to email address -- This can be an email in a single string, a comma separated + * list of emails or an array of email addresses + * $attachment -- whether we want to attach the currently selected file or all vtiger_files. + [values = current,all] - optional + * $emailid -- id of the email object which will be used to get the vtiger_attachments - optional + */ +function setMailerProperties($mail,$subject,$contents,$from_email,$from_name,$to_email,$attachment='',$emailid='',$module='',$logo='') +{ + global $adb; + $adb->println("Inside the function setMailerProperties"); + if($module == "Support" || $logo ==1) + $mail->AddEmbeddedImage('themes/images/logo_mail.jpg', 'logo', 'logo.jpg',"base64","image/jpg"); + + $mail->Subject = $subject; + $mail->Body = $contents; + //$mail->Body = html_entity_decode(nl2br($contents)); //if we get html tags in mail then we will use this line + $mail->AltBody = strip_tags(preg_replace(array("/

/i","/
/i","/
/i"),array("\n","\n","\n"),$contents)); + + $mail->IsSMTP(); //set mailer to use SMTP + //$mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server + + setMailServerProperties($mail); + + //Handle the from name and email for HelpDesk + $mail->From = $from_email; + $rs = $adb->pquery("select first_name,last_name from vtiger_users where user_name=?", array($from_name)); + $num_rows = $adb->num_rows($rs); + if($num_rows > 0) + $from_name = getFullNameFromQResult($rs, 0, 'Users'); + + $mail->FromName = decode_html($from_name); + + $mail->Sender= getReturnPath($mail->Host); + + if($to_email != '') + { + if(is_array($to_email)) { + for($j=0,$num=count($to_email);$j<$num;$j++) { + $mail->addAddress($to_email[$j]); + } + } else { + $_tmp = explode(",",$to_email); + for($j=0,$num=count($_tmp);$j<$num;$j++) { + $mail->addAddress($_tmp[$j]); + } + } + } + + //commented so that it does not add from_email in reply to + //$mail->AddReplyTo($from_email); + $mail->WordWrap = 50; + + //If we want to add the currently selected file only then we will use the following function + if($attachment == 'current' && $emailid != '') + { + if (isset($_REQUEST['filename_hidden'])) { + $file_name = $_REQUEST['filename_hidden']; + } else { + $file_name = $_FILES['filename']['name']; + } + addAttachment($mail,$file_name,$emailid); + } + + //This will add all the vtiger_files which are related to this record or email + if($attachment == 'all' && $emailid != '') + { + addAllAttachments($mail,$emailid); + } + + $mail->IsHTML(true); // set email format to HTML + + return; +} + +/** Function to set the Mail Server Properties in the object passed + * $mail -- reference of the mailobject + */ +function setMailServerProperties($mail) +{ + global $adb; + $adb->println("Inside the function setMailServerProperties"); + + $res = $adb->pquery("select * from vtiger_systems where server_type=?", array('email')); + if(isset($_REQUEST['server'])) + $server = $_REQUEST['server']; + else + $server = $adb->query_result($res,0,'server'); + if(isset($_REQUEST['server_username'])) + $username = $_REQUEST['server_username']; + else + $username = $adb->query_result($res,0,'server_username'); + if(isset($_REQUEST['server_password'])) + $password = $_REQUEST['server_password']; + else + $password = $adb->query_result($res,0,'server_password'); + // Prasad: First time read smtp_auth from the request + if(isset($_REQUEST['smtp_auth'])) + { + $smtp_auth = $_REQUEST['smtp_auth']; + if($smtp_auth == 'on') + $smtp_auth = 'true'; + } + else if (isset($_REQUEST['module']) && $_REQUEST['module'] == 'Settings' && (!isset($_REQUEST['smtp_auth']))) + { + //added to avoid issue while editing the values in the outgoing mail server. + $smtp_auth = 'false'; + } + else + $smtp_auth = $adb->query_result($res,0,'smtp_auth'); + + $adb->println("Mail server name,username & password => '".$server."','".$username."','".$password."'"); + if($smtp_auth == "true"){ + $mail->SMTPAuth = true; // turn on SMTP authentication + } + $mail->Host = $server; // specify main and backup server + $mail->Username = $username ; // SMTP username + $mail->Password = $password ; // SMTP password + + return; +} + +/** Function to add the file as attachment with the mail object + * $mail -- reference of the mail object + * $filename -- filename which is going to added with the mail + * $record -- id of the record - optional + */ +function addAttachment($mail,$filename,$record) +{ + global $adb, $root_directory; + $adb->println("Inside the function addAttachment"); + $adb->println("The file name is => '".$filename."'"); + + //This is the file which has been selected in Email EditView + if(is_file($filename) && $filename != '') + { + $mail->AddAttachment($root_directory."test/upload/".$filename); + } +} + +/** Function to add all the vtiger_files as attachment with the mail object + * $mail -- reference of the mail object + * $record -- email id ie., record id which is used to get the all vtiger_attachments from database + */ +function addAllAttachments($mail,$record) +{ + global $adb,$log, $root_directory; + $adb->println("Inside the function addAllAttachments"); + + //Retrieve the vtiger_files from database where avoid the file which has been currently selected + $sql = "select vtiger_attachments.* from vtiger_attachments inner join vtiger_seattachmentsrel on vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_attachments.attachmentsid where vtiger_crmentity.deleted=0 and vtiger_seattachmentsrel.crmid=?"; + $res = $adb->pquery($sql, array($record)); + $count = $adb->num_rows($res); + + for($i=0;$i<$count;$i++) + { + $fileid = $adb->query_result($res,$i,'attachmentsid'); + $filename = decode_html($adb->query_result($res,$i,'name')); + $filepath = $adb->query_result($res,$i,'path'); + $filewithpath = $root_directory.$filepath.$fileid."_".$filename; + + //if the file is exist in test/upload directory then we will add directly + //else get the contents of the file and write it as a file and then attach (this will occur when we unlink the file) + if(is_file($filewithpath)) + { + $mail->AddAttachment($filewithpath,$filename); + } + } +} + +/** Function to set the CC or BCC addresses in the mail + * $mail -- reference of the mail object + * $cc_mod -- mode to set the address ie., cc or bcc + * $cc_val -- addresss with comma seperated to set as CC or BCC in the mail + */ +function setCCAddress($mail,$cc_mod,$cc_val) +{ + global $adb; + $adb->println("Inside the functin setCCAddress"); + + if($cc_mod == 'cc') + $method = 'AddCC'; + if($cc_mod == 'bcc') + $method = 'AddBCC'; + if($cc_val != '') + { + $ccmail = explode(",",trim($cc_val,",")); + for($i=0;$i"); + } + if($ccmail[$i] != '') + $mail->$method($addr,$cc_name); + } + } +} + +/** Function to send the mail which will be called after set all the mail object values + * $mail -- reference of the mail object + */ +function MailSend($mail) +{ + global $log; + $log->info("Inside of Send Mail function."); + if(!$mail->Send()) + { + $log->debug("Error in Mail Sending : Error log = '".$mail->ErrorInfo."'"); + return $mail->ErrorInfo; + } + else + { + $log->info("Mail has been sent from the vtigerCRM system : Status : '".$mail->ErrorInfo."'"); + return 1; + } +} + +/** Function to get the Parent email id from HelpDesk to send the details about the ticket via email + * $returnmodule -- Parent module value. Contact or Account for send email about the ticket details + * $parentid -- id of the parent ie., contact or vtiger_account + */ +function getParentMailId($parentmodule,$parentid) +{ + global $adb; + $adb->println("Inside the function getParentMailId. \n parent module and id => ".$parentmodule."&".$parentid); + + if($parentmodule == 'Contacts') + { + $tablename = 'vtiger_contactdetails'; + $idname = 'contactid'; + $first_email = 'email'; + $second_email = 'secondaryemail'; + } + if($parentmodule == 'Accounts') + { + $tablename = 'vtiger_account'; + $idname = 'accountid'; + $first_email = 'email1'; + $second_email = 'email2'; + } + if($parentid != '') + { + //$query = 'select * from '.$tablename.' where '.$idname.' = '.$parentid; + $query = 'select * from '.$tablename.' where '. $idname.' = ?'; + $res = $adb->pquery($query, array($parentid)); + $mailid = $adb->query_result($res,0,$first_email); + $mailid2 = $adb->query_result($res,0,$second_email); + } + if($mailid == '' && $mailid2 != '') + $mailid = $mailid2; + + return $mailid; +} + +/** Function to parse and get the mail error + * $mail -- reference of the mail object + * $mail_status -- status of the mail which is sent or not + * $to -- the email address to whom we sent the mail and failes + * return -- Mail error occured during the mail sending process + */ +function getMailError($mail,$mail_status,$to) +{ + //Error types in class.phpmailer.php + /* + provide_address, mailer_not_supported, execute, instantiate, file_access, file_open, encoding, data_not_accepted, authenticate, + connect_host, recipients_failed, from_failed + */ + + global $adb; + $adb->println("Inside the function getMailError"); + + $msg = array_search($mail_status,$mail->language); + $adb->println("Error message ==> ".$msg); + + if($msg == 'connect_host') + { + $error_msg = $msg; + } + elseif(strstr($msg,'from_failed')) + { + $error_msg = $msg; + } + elseif(strstr($msg,'recipients_failed')) + { + $error_msg = $msg; + } + else + { + $adb->println("Mail error is not as connect_host or from_failed or recipients_failed"); + //$error_msg = $msg; + } + + $adb->println("return error => ".$error_msg); + return $error_msg; +} + +/** Function to get the mail status string (string of sent mail status) + * $mail_status_str -- concatenated string with all the error messages with &&& seperation + * return - the error status as a encoded string + */ +function getMailErrorString($mail_status_str) +{ + global $adb; + $adb->println("Inside getMailErrorString function.\nMail status string ==> ".$mail_status_str); + + $mail_status_str = trim($mail_status_str,"&&&"); + $mail_status_array = explode("&&&",$mail_status_str); + $adb->println("All Mail status ==>\n".$mail_status_str."\n"); + + foreach($mail_status_array as $key => $val) + { + $list = explode("=",$val); + $adb->println("Mail id & status ==> ".$list[0]." = ".$list[1]); + if($list[1] == 0) + { + $mail_error_str .= $list[0]."=".$list[1]."&&&"; + } + } + $adb->println("Mail error string => '".$mail_error_str."'"); + if($mail_error_str != '') + { + $mail_error_str = 'mail_error='.base64_encode($mail_error_str); + } + return $mail_error_str; +} + +/** Function to parse the error string + * $mail_error_str -- base64 encoded string which contains the mail sending errors as concatenated with &&& + * return - Error message to display + */ +function parseEmailErrorString($mail_error_str) +{ + //TODO -- we can modify this function for better email error handling in future + global $adb, $mod_strings; + $adb->println("Inside the parseEmailErrorString function.\n encoded mail error string ==> ".$mail_error_str); + + $mail_error = base64_decode($mail_error_str); + $adb->println("Original error string => ".$mail_error); + $mail_status = explode("&&&",trim($mail_error,"&&&")); + foreach($mail_status as $key => $val) + { + $status_str = explode("=",$val); + $adb->println('Mail id => "'.$status_str[0].'".........status => "'.$status_str[1].'"'); + if($status_str[1] != 1 && $status_str[1] != '') + { + $adb->println("Error in mail sending"); + if($status_str[1] == 'connect_host') + { + $adb->println("if part - Mail sever is not configured"); + $errorstr .= '
'.$mod_strings['MESSAGE_CHECK_MAIL_SERVER_NAME'].''; + break; + } + elseif($status_str[1] == '0') + { + $adb->println("first elseif part - status will be 0 which is the case of assigned to vtiger_users's email is empty."); + $errorstr .= '
'.$mod_strings['MESSAGE_MAIL_COULD_NOT_BE_SEND'].' '.$mod_strings['MESSAGE_PLEASE_CHECK_FROM_THE_MAILID'].''; + //Added to display the message about the CC && BCC mail sending status + if($status_str[0] == 'cc_success') + { + $cc_msg = 'But the mail has been sent to CC & BCC addresses.'; + $errorstr .= '
'.$cc_msg.''; + } + } + elseif(strstr($status_str[1],'from_failed')) + { + $adb->println("second elseif part - from email id is failed."); + $from = explode('from_failed',$status_str[1]); + $errorstr .= "
".$mod_strings['MESSAGE_PLEASE_CHECK_THE_FROM_MAILID']." '".$from[1]."'"; + } + else + { + $adb->println("else part - mail send process failed due to the following reason."); + $errorstr .= "
".$mod_strings['MESSAGE_MAIL_COULD_NOT_BE_SEND_TO_THIS_EMAILID']." '".$status_str[0]."'. ".$mod_strings['PLEASE_CHECK_THIS_EMAILID'].""; + } + } + } + $adb->println("Return Error string => ".$errorstr); + return $errorstr; +} + +function isUserInitiated() { + return (($_REQUEST['module'] == 'Emails' || $_REQUEST['module'] == 'Webmails') && + ($_REQUEST['action'] == 'mailsend' || $_REQUEST['action'] == 'webmailsend' || $_REQUEST['action'] == 'Save')); +} + +/** + * Function to get the group users Email ids + */ +function getDefaultAssigneeEmailIds($groupId) { + global $adb; + $emails = Array(); + if($groupId != '') { + require_once 'include/utils/GetGroupUsers.php'; + $userGroups = new GetGroupUsers(); + $userGroups->getAllUsersInGroup($groupId); + $result = $adb->pquery('SELECT email1,email2,secondaryemail FROM vtiger_users WHERE vtiger_users.id IN + ('. generateQuestionMarks($userGroups->group_users).')', + array($userGroups->group_users)); + $rows = $adb->num_rows($result); + for($i = 0;$i < $rows; $i++) { + $email = $adb->query_result($result,$i,'email1'); + if($email == '') { + $email = $adb->query_result($result,$i,'email2'); + if($email == '') { + $email = $adb->query_result($result,$i,'secondaryemail'); + } else { + $email = ''; + } + } + array_push($emails,$email); + } + $adb->println("Email ids are selected => '".$emails."'"); + return $emails; + } else { + $adb->println("User id is empty. so return value is ''"); + return ''; + } +} + + +?> diff --git a/modules/Emails/mailSelect.php b/modules/Emails/mailSelect.php new file mode 100644 index 0000000..2e96f28 --- /dev/null +++ b/modules/Emails/mailSelect.php @@ -0,0 +1,116 @@ +id; + +$querystr = "select fieldid, fieldname, fieldlabel, columnname from vtiger_field where tabid=? and uitype=13 and vtiger_field.presence in (0,2)"; +$res=$adb->pquery($querystr, array(getTabid($pmodule))); +$numrows = $adb->num_rows($res); +$returnvalue = Array(); +for($i = 0; $i < $numrows; $i++) +{ + $value = Array(); + $fieldname = $adb->query_result($res,$i,"fieldname"); + $permit = getFieldVisibilityPermission($pmodule, $userid, $fieldname); + if($permit == '0') + { + $temp=$adb->query_result($res,$i,'columnname'); + $columnlists [] = $temp; + $fieldid=$adb->query_result($res,$i,'fieldid'); + $fieldlabel =$adb->query_result($res,$i,'fieldlabel'); + $value[] = getTranslatedString($fieldlabel); + $returnvalue [$fieldid]= $value; + } +} + +if($single_record && count($columnlists) > 0) +{ + $count = 0; + $val_cnt = 0; + switch($pmodule) + { + case 'Accounts': + $query = 'select accountname,'.implode(",",$columnlists).' from vtiger_account left join vtiger_accountscf on vtiger_accountscf.accountid = vtiger_account.accountid where vtiger_account.accountid = ?'; + $result=$adb->pquery($query, array($idlist)); + foreach($columnlists as $columnname) + { + $acc_eval = $adb->query_result($result,0,$columnname); + $field_value[$count++] = $acc_eval; + if($acc_eval != "") $val_cnt++; + + } + $entity_name = $adb->query_result($result,0,'accountname'); + break; + case 'Leads': + $query = 'select concat(firstname," ",lastname) as leadname,'.implode(",",$columnlists).' from vtiger_leaddetails left join vtiger_leadscf on vtiger_leadscf.leadid = vtiger_leaddetails.leadid where vtiger_leaddetails.leadid = ?'; + $result=$adb->pquery($query, array($idlist)); + foreach($columnlists as $columnname) + { + $lead_eval = $adb->query_result($result,0,$columnname); + $field_value[$count++] = $lead_eval; + if($lead_eval != "") $val_cnt++; + } + $entity_name = $adb->query_result($result,0,'leadname'); + break; + case 'Contacts': + $query = 'select concat(firstname," ",lastname) as contactname,'.implode(",",$columnlists).' from vtiger_contactdetails left join vtiger_contactscf on vtiger_contactscf.contactid = vtiger_contactdetails.contactid where vtiger_contactdetails.contactid = ?'; + $result=$adb->pquery($query, array($idlist)); + foreach($columnlists as $columnname) + { + $con_eval = $adb->query_result($result,0,$columnname); + $field_value[$count++] = $con_eval; + if($con_eval != "") $val_cnt++; + } + $entity_name = $adb->query_result($result,0,'contactname'); + break; + } +} +$smarty->assign('PERMIT',$permit); +$smarty->assign('ENTITY_NAME',$entity_name); +$smarty->assign('ONE_RECORD',$single_record); +$smarty->assign('MAILDATA',$field_value); +$smarty->assign('MAILINFO',$returnvalue); +$smarty->assign("MOD", $mod_strings); +$smarty->assign("IDLIST", $idlist); +$smarty->assign("APP", $app_strings); +$smarty->assign("FROM_MODULE", $pmodule); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("EXE_REC", $excludedRecords); +$smarty->assign("SEARCH_URL", vtlib_purify($_REQUEST['searchurl'])); +$smarty->assign("VIEWID", vtlib_purify($_REQUEST['viewname'])); +$smarty->assign('RECORDID',vtlib_purify($_REQUEST['recordid'])); + +if(($single_record && count($columnlists) > 0)){ + $smarty->display("SelectEmail.tpl"); +} else if(!$single_record && count($columnlists) > 0){ + $smarty->display("SelectEmail.tpl"); +}elseif ($val_cnt < 0){ + echo "Mail Ids not permitted"; +} else { + echo "No Mail Ids"; +} +?> \ No newline at end of file diff --git a/modules/Emails/mailsend.php b/modules/Emails/mailsend.php new file mode 100644 index 0000000..190ef61 --- /dev/null +++ b/modules/Emails/mailsend.php @@ -0,0 +1,239 @@ +id;//$_REQUEST['record']; +} + + +$adb->println("\n\nMail Sending Process has been started."); +//This function call is used to send mail to the assigned to user. In this mail CC and BCC addresses will be added. +if($_REQUEST['assigntype' == 'T'] && $_REQUEST['assigned_group_id']!='') +{ + $grp_obj = new GetGroupUsers(); + $grp_obj->getAllUsersInGroup($_REQUEST['assigned_group_id']); + $users_list = constructList($grp_obj->group_users,'INTEGER'); + if (count($users_list) > 0) { + $sql = "select first_name, last_name, email1, email2, secondaryemail from vtiger_users where id in (". generateQuestionMarks($users_list) .")"; + $params = array($users_list); + } else { + $sql = "select first_name, last_name, email1, email2, secondaryemail from vtiger_users"; + $params = array(); + } + $res = $adb->pquery($sql, $params); + $user_email = ''; + while ($user_info = $adb->fetch_array($res)) + { + $email = $user_info['email1']; + if($email == '' || $email == 'NULL') + { + $email = $user_info['email2']; + if($email == '' || $email == 'NULL') + { + $email = $user_info['secondaryemail ']; + } + } + if($user_email=='') + $user_email .= $user_info['first_name']." ".$user_info['last_name']."<".$email.">"; + else + $user_email .= ",".$user_info['first_name']." ".$user_info['last_name']."<".$email.">"; + $email=''; + } + $to_email = $user_email; +} +else +{ + $to_email = getUserEmailId('id',$focus->column_fields["assigned_user_id"]); +} +$cc = $_REQUEST['ccmail']; +$bcc = $_REQUEST['bccmail']; +if($to_email == '' && $cc == '' && $bcc == '') +{ + $adb->println("Mail Error : send_mail function not called because To email id of assigned to user, CC and BCC are empty"); + $mail_status_str = "'".$to_email."'=0&&&"; + $errorheader1 = 1; +} +else +{ + $query1 = "select email1 from vtiger_users where id =?"; + $res1 = $adb->pquery($query1, array($current_user->id)); + $val = $adb->query_result($res1,0,"email1"); +// $mail_status = send_mail('Emails',$to_email,$current_user->user_name,'',$_REQUEST['subject'],$_REQUEST['description'],$cc,$bcc,'all',$focus->id); + + $query = 'update vtiger_emaildetails set email_flag ="SENT",from_email =? where emailid=?'; + $adb->pquery($query, array($val, $focus->id)); + //set the errorheader1 to 1 if the mail has not been sent to the assigned to user + if($mail_status != 1)//when mail send fails + { + $errorheader1 = 1; + $mail_status_str = $to_email."=".$mail_status."&&&"; + } + elseif($mail_status == 1 && $to_email == '')//Mail send success only for CC and BCC but the 'to' email is empty + { + $adb->pquery($query, array($val, $focus->id)); + $errorheader1 = 1; + $mail_status_str = "cc_success=0&&&"; + } + else + { + $mail_status_str = $to_email."=".$mail_status."&&&"; + } +} + + +//Added code from mysendmail.php which is contributed by Raju(rdhital) +$parentid= vtlib_purify($_REQUEST['parent_id']); +$myids=explode("|",$parentid); +$all_to_emailids = Array(); +$from_name = $current_user->user_name; +$from_address = $current_user->column_fields['email1']; + +for ($i=0;$i<(count($myids)-1);$i++) +{ + $realid=explode("@",$myids[$i]); + $nemail=count($realid); + $mycrmid=$realid[0]; + if($realid[1] == -1) + { + //handle the mail send to vtiger_users + $emailadd = $adb->query_result($adb->pquery("select email1 from vtiger_users where id=?", array($mycrmid)),0,'email1'); + $pmodule = 'Users'; + $description = getMergedDescription($_REQUEST['description'],$mycrmid,$pmodule); + $mail_status = send_mail('Emails',$emailadd,$from_name,$from_address,$_REQUEST['subject'],$description,'','','all',$focus->id); + $all_to_emailids []= $emailadd; + $mail_status_str .= $emailadd."=".$mail_status."&&&"; + } + else + { + //Send mail to vtiger_account or lead or contact based on their ids + $pmodule=getSalesEntityType($mycrmid); + for ($j=1;$j<$nemail;$j++) + { + $temp=$realid[$j]; + $myquery='Select columnname from vtiger_field where fieldid = ? and vtiger_field.presence in (0,2)'; + $fresult=$adb->pquery($myquery, array($temp)); + if ($pmodule=='Contacts') + { + require_once('modules/Contacts/Contacts.php'); + $myfocus = new Contacts(); + $myfocus->retrieve_entity_info($mycrmid,"Contacts"); + } + elseif ($pmodule=='Accounts') + { + require_once('modules/Accounts/Accounts.php'); + $myfocus = new Accounts(); + $myfocus->retrieve_entity_info($mycrmid,"Accounts"); + } + elseif ($pmodule=='Leads') + { + require_once('modules/Leads/Leads.php'); + $myfocus = new Leads(); + $myfocus->retrieve_entity_info($mycrmid,"Leads"); + } + elseif ($pmodule=='Vendors') + { + require_once('modules/Vendors/Vendors.php'); + $myfocus = new Vendors(); + $myfocus->retrieve_entity_info($mycrmid,"Vendors"); + } + else { + // vtlib customization: Enabling mail send from other modules + $myfocus = CRMEntity::getInstance($pmodule); + $myfocus->retrieve_entity_info($mycrmid, $pmodule); + // END + } + $fldname=$adb->query_result($fresult,0,"columnname"); + $emailadd=br2nl($myfocus->column_fields[$fldname]); + +//This is to convert the html encoded string to original html entities so that in mail description contents will be displayed correctly + //$focus->column_fields['description'] = from_html($focus->column_fields['description']); + + if($emailadd != '') + { + $description = getMergedDescription($_REQUEST['description'],$mycrmid,$pmodule); + //Email Open Tracking + global $site_URL, $application_unique_key; + $emailid = $focus->id; + $track_URL = "$site_URL/modules/Emails/TrackAccess.php?record=$mycrmid&mailid=$emailid&app_key=$application_unique_key"; + $description = "$description"; + // END + + $pos = strpos($description, '$logo$'); + if ($pos !== false) + { + + $description =str_replace('$logo$','',$description); + $logo=1; + } + if(isPermitted($pmodule,'DetailView',$mycrmid) == 'yes') + { + $mail_status = send_mail('Emails',$emailadd,$from_name,$from_address,$_REQUEST['subject'],$description,'','','all',$focus->id,$logo); + } + + $all_to_emailids []= $emailadd; + $mail_status_str .= $emailadd."=".$mail_status."&&&"; + //added to get remain the EditView page if an error occurs in mail sending + if($mail_status != 1) + { + $errorheader2 = 1; + } + } + } + } + +} +//Added to redirect the page to Emails/EditView if there is an error in mail sending +if($errorheader1 == 1 || $errorheader2 == 1) +{ + $returnset = 'return_module='.$returnmodule.'&return_action='.$returnaction.'&return_id='.vtlib_purify($_REQUEST['return_id']); + $returnmodule = 'Emails'; + $returnaction = 'EditView'; + //This condition is added to set the record(email) id when we click on send mail button after returning mail error + if($_REQUEST['mode'] == 'edit') + { + $returnid = $_REQUEST['record']; + } + else + { + $returnid = $_REQUEST['currentid']; + } +} +else +{ + global $adb; + $date_var = date('Ymd'); + $query = 'update vtiger_activity set date_start =? where activityid = ?'; + $adb->pquery($query, array($date_var, $returnid)); +} +//The following function call is used to parse and form a encoded error message and then pass to result page +$mail_error_str = getMailErrorString($mail_status_str); +$adb->println("Mail Sending Process has been finished.\n\n"); +if(isset($_REQUEST['popupaction']) && $_REQUEST['popupaction'] != '') +{ + /*this will fix #1211*/ + $inputs=""; + //$inputs=""; + echo $inputs; +} +?> \ No newline at end of file diff --git a/modules/Emails/templates/testemailtemplateusage.php b/modules/Emails/templates/testemailtemplateusage.php new file mode 100644 index 0000000..e69de29 diff --git a/modules/Emails/templates/todel.txt b/modules/Emails/templates/todel.txt new file mode 100644 index 0000000..e69de29 diff --git a/modules/Emails/updateRelations.php b/modules/Emails/updateRelations.php new file mode 100644 index 0000000..14be6cb --- /dev/null +++ b/modules/Emails/updateRelations.php @@ -0,0 +1,40 @@ +pquery($sql, array($id, $record)); + } +} +if(isset($_REQUEST['user_id']) && $_REQUEST['user_id'] != '') +{ + $record = $_REQUEST['record']; + $sql = "insert into vtiger_salesmanactivityrel values (?,?)"; + $adb->pquery($sql, array($_REQUEST["user_id"], $record)); +} + +header("Location: index.php?action=CallRelatedList&module=Emails&record=".vtlib_purify($record)); + +?> \ No newline at end of file diff --git a/modules/Emails/webmailsend.php b/modules/Emails/webmailsend.php new file mode 100644 index 0000000..1c54392 --- /dev/null +++ b/modules/Emails/webmailsend.php @@ -0,0 +1,61 @@ +user_name; + $from_add = $current_user->column_fields['email1']; + } + else{ + $from_arr = explode('@',$_REQUEST['from_add']); + $from_name = $from_arr[0]; + $from_add = $_REQUEST['from_add']; + } +$mail_status = send_mail('Emails',$_REQUEST["parent_name"],$from_name,$from_add,$_REQUEST['subject'],$_REQUEST['description'],$_REQUEST["ccmail"],$_REQUEST["bccmail"],'all',$focus->id); + +$query = "update vtiger_emaildetails set email_flag ='SENT' where emailid=?"; +$adb->pquery($query, array($focus->id)); + +//set the errorheader1 to 1 if the mail has not been sent to the assigned to user +if($mail_status != 1) { //when mail send fails + $errorheader1 = 1; + $mail_status_str = $to_email."=".$mail_status."&&&"; + +} elseif($mail_status == 1 && $to_email == '') { //Mail send success only for CC and BCC but the 'to' email is empty + $adb->pquery($query, array($focus->id)); + $errorheader1 = 1; + $mail_status_str = "cc_success=0&&&"; +} else + $mail_status_str = $to_email."=".$mail_status."&&&"; + + + +//Added to redirect the page to Emails/EditView if there is an error in mail sending +if($errorheader1 == 1 || $errorheader2 == 1) +{ + $returnset = 'return_module='.$returnmodule.'&return_action='.$returnaction.'&return_id='.vtlib_purify($_REQUEST['return_id']); + $returnmodule = 'Emails'; + $returnaction = 'EditView'; + if($_REQUEST['mode'] == 'edit') + $returnid = $_REQUEST['record']; + else + $returnid = $_REQUEST['currentid']; +} + +//The following function call is used to parse and form a encoded error message and then pass to result page +$mail_error_str = getMailErrorString($mail_status_str); +$adb->println("Mail Sending Process has been finished.\n\n"); + +if(isset($_REQUEST['popupaction']) && $_REQUEST['popupaction'] != '') +{ + $inputs=""; + echo $inputs; +} +?> diff --git a/modules/Faq/CallRelatedList.php b/modules/Faq/CallRelatedList.php new file mode 100644 index 0000000..db811c9 --- /dev/null +++ b/modules/Faq/CallRelatedList.php @@ -0,0 +1,86 @@ +retrieve_entity_info($RECORD,$currentmodule); + $focus->id = $RECORD; + $focus->name=$focus->column_fields['question']; + $log->debug("id is ".$focus->id); + $log->debug("name is ".$focus->name); + } + + global $mod_strings; + global $app_strings; + global $currentModule; + global $theme; + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $smarty = new vtigerCRM_Smarty; + + if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; + } + if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') { + $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode'])); + } + if (isset($focus->name)) $smarty->assign("NAME", $focus->name); + $related_array=getRelatedLists($currentModule,$focus); + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + $relationId = vtlib_purify($_REQUEST['relation_id']); + RelatedListViewSession::addRelatedModuleToSession($relationId, + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); + + $smarty->assign("RELATEDLISTS", $related_array); + $smarty->assign("CATEGORY",$category); + + // Module Sequence Numbering + $mod_seq_field = getModuleSequenceField($currentModule); + if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; + } else { + $mod_seq_id = $focus->id; + } + $smarty->assign('MOD_SEQ_ID', $mod_seq_id); + // END + + $smarty->assign("ID",$focus->id); + $smarty->assign("MODULE",$currentmodule); + $smarty->assign("SINGLE_MOD",$app_strings['Faq']); + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $smarty->assign("MOD",$mod_strings); + $smarty->assign("APP",$app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); + $smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); + $check_button = Button_Check($module); + $smarty->assign("CHECK", $check_button); + + $smarty->display("RelatedLists.tpl"); +} +?> \ No newline at end of file diff --git a/modules/Faq/CustomView.php b/modules/Faq/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/Faq/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/Faq/Delete.php b/modules/Faq/Delete.php new file mode 100644 index 0000000..cc08514 --- /dev/null +++ b/modules/Faq/Delete.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/modules/Faq/DetailView.php b/modules/Faq/DetailView.php new file mode 100644 index 0000000..b6f422a --- /dev/null +++ b/modules/Faq/DetailView.php @@ -0,0 +1,130 @@ +retrieve_entity_info($_REQUEST['record'],"Faq"); + $focus->id = $_REQUEST['record']; +} + +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') +{ + $focus->id = ""; +} + +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$log->info("Faq detail view"); +$smarty = new vtigerCRM_Smarty; +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("UPDATEINFO",updateInfo($focus->id)); + +if(isset($focus->column_fields[question])) + $smarty->assign("NAME", $focus->column_fields[question]); + +$category = getParenttab(); +$smarty->assign("CATEGORY",$category); + +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); +$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); +$smarty->assign("SINGLE_MOD",$currentModule); +$smarty->assign("MODULE",$currentModule); + +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; +} else { + $mod_seq_id = $focus->id; +} +$smarty->assign('MOD_SEQ_ID', $mod_seq_id); +// END + +$smarty->assign("ID", vtlib_purify($_REQUEST['record'])); +if(isPermitted("Faq","EditView",$_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + +if(isPermitted("Faq","Delete",$_REQUEST['record']) == 'yes') + $smarty->assign("DELETE","permitted"); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); +$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule)); + +$tabid = getTabid("Faq"); +$validationData = getDBValidationData($focus->tab_name,$tabid); +$data = split_validationdataArray($validationData); + +$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); +$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); +$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); + +//Added to display the Faq comments information +$smarty->assign("COMMENT_BLOCK",$focus->getFAQComments($_REQUEST['record'])); +$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record'])); + +if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){ + $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id); + VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id); +} +if($singlepane_view == 'true') { + $related_array = getRelatedLists($currentModule,$focus); + $smarty->assign("RELATEDLISTS", $related_array); + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); +} + +$smarty->assign("SinglePane_View", $singlepane_view); + +// Record Change Notification +$focus->markAsViewed($current_user->id); +// END + +// Gather the custom link information to display +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action'])); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params)); +// END + +$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true)); +$smarty->display("DetailView.tpl"); +?> \ No newline at end of file diff --git a/modules/Faq/DetailViewAjax.php b/modules/Faq/DetailViewAjax.php new file mode 100644 index 0000000..d81af13 --- /dev/null +++ b/modules/Faq/DetailViewAjax.php @@ -0,0 +1,58 @@ +retrieve_entity_info($crmid,"Faq"); + + //Added to avoid the comment save, when we edit other fields through ajax edit + if($fieldname != 'comments') + $modObj->column_fields['comments'] = ''; + + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Faq"); + if($modObj->id != "") + { + if($fieldname == "comments") + { + $comments = $modObj->getFAQComments($modObj->id); + echo ":#:SUCCESS".$comments; + } + else + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +}elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){ + require_once 'include/ListView/RelatedListViewContents.php'; +} +?> \ No newline at end of file diff --git a/modules/Faq/EditView.php b/modules/Faq/EditView.php new file mode 100644 index 0000000..8e96da5 --- /dev/null +++ b/modules/Faq/EditView.php @@ -0,0 +1,19 @@ +assign("COMMENT_BLOCK",$focus->getFAQComments($_REQUEST['record'])); +} + + $smarty->display("salesEditView.tpl"); +?> \ No newline at end of file diff --git a/modules/Faq/Faq.js b/modules/Faq/Faq.js new file mode 100644 index 0000000..7fa41f4 --- /dev/null +++ b/modules/Faq/Faq.js @@ -0,0 +1,21 @@ +/********************************************************************************* +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ + +function clear_form(form) +{ + for (j = 0; j < form.elements.length; j++) + { + if (form.elements[j].type == 'text' || form.elements[j].type == 'select-one') + { + form.elements[j].value = ''; + } + } +} + diff --git a/modules/Faq/Faq.php b/modules/Faq/Faq.php new file mode 100644 index 0000000..b1920ed --- /dev/null +++ b/modules/Faq/Faq.php @@ -0,0 +1,208 @@ +'crmid','vtiger_faq'=>'id','vtiger_faqcomments'=>'faqid'); + + var $entity_table = "vtiger_crmentity"; + + var $column_fields = Array(); + + var $sortby_fields = Array('question','category','id'); + + // This is the list of vtiger_fields that are in the lists. + var $list_fields = Array( + 'FAQ Id'=>Array('faq'=>'id'), + 'Question'=>Array('faq'=>'question'), + 'Category'=>Array('faq'=>'category'), + 'Product Name'=>Array('faq'=>'product_id'), + 'Created Time'=>Array('crmentity'=>'createdtime'), + 'Modified Time'=>Array('crmentity'=>'modifiedtime') + ); + + var $list_fields_name = Array( + 'FAQ Id'=>'', + 'Question'=>'question', + 'Category'=>'faqcategories', + 'Product Name'=>'product_id', + 'Created Time'=>'createdtime', + 'Modified Time'=>'modifiedtime' + ); + var $list_link_field= 'question'; + + var $search_fields = Array( + 'Account Name'=>Array('account'=>'accountname'), + 'City'=>Array('accountbillads'=>'bill_city'), + ); + + var $search_fields_name = Array( + 'Account Name'=>'accountname', + 'City'=>'bill_city', + ); + + //Added these variables which are used as default order by and sortorder in ListView + var $default_order_by = 'id'; + var $default_sort_order = 'DESC'; + + var $mandatory_fields = Array('question','faq_answer','createdtime' ,'modifiedtime'); + + // For Alphabetical search + var $def_basicsearch_col = 'question'; + + /** Constructor which will set the column_fields in this object + */ + function Faq() { + $this->log =LoggerManager::getLogger('faq'); + $this->log->debug("Entering Faq() method ..."); + $this->db = PearDatabase::getInstance(); + $this->column_fields = getColumnFields('Faq'); + $this->log->debug("Exiting Faq method ..."); + } + + function save_module($module) + { + //Inserting into Faq comment table + $this->insertIntoFAQCommentTable('vtiger_faqcomments', $module); + + } + + + /** Function to insert values in vtiger_faqcomments table for the specified module, + * @param $table_name -- table name:: Type varchar + * @param $module -- module:: Type varchar + */ + function insertIntoFAQCommentTable($table_name, $module) + { + global $log; + $log->info("in insertIntoFAQCommentTable ".$table_name." module is ".$module); + global $adb; + + $current_time = $adb->formatDate(date('Y-m-d H:i:s'), true); + + if($this->column_fields['comments'] != '') + $comment = $this->column_fields['comments']; + else + $comment = $_REQUEST['comments']; + + if($comment != '') + { + $params = array('', $this->id, from_html($comment), $current_time); + $sql = "insert into vtiger_faqcomments values(?, ?, ?, ?)"; + $adb->pquery($sql, $params); + } + } + + + /** Function to get the list of comments for the given FAQ id + * @param int $faqid - FAQ id + * @return list $list - return the list of comments and comment informations as a html output where as these comments and comments informations will be formed in div tag. + **/ + function getFAQComments($faqid) + { + global $log, $default_charset; + $log->debug("Entering getFAQComments(".$faqid.") method ..."); + global $mod_strings; + $sql = "select * from vtiger_faqcomments where faqid=?"; + $result = $this->db->pquery($sql, array($faqid)); + $noofrows = $this->db->num_rows($result); + + //In ajax save we should not add this div + if($_REQUEST['action'] != 'FaqAjax') + { + $list .= '

'; + $enddiv = '
'; + } + + for($i=0;$i<$noofrows;$i++) + { + $comment = $this->db->query_result($result,$i,'comments'); + $createdtime = $this->db->query_result($result,$i,'createdtime'); + if($comment != '') + { + //this div is to display the comment + if($_REQUEST['action'] == 'FaqAjax') { + $comment = htmlentities($comment, ENT_QUOTES, $default_charset); + } + $list .= '
'.make_clickable(nl2br($comment)).'
'; + + //this div is to display the created time + $list .= '
'.$mod_strings['Created Time']; + $list .= ' : '.$createdtime.'
'; + } + } + + $list .= $enddiv; + + $log->debug("Exiting getFAQComments method ..."); + return $list; + } + + /* + * Function to get the primary query part of a report + * @param - $module Primary module name + * returns the query string formed on fetching the related data for report for primary module + */ + function generateReportsQuery($module){ + $moduletable = $this->table_name; + $moduleindex = $this->table_index; + + $query = "from $moduletable + inner join vtiger_crmentity on vtiger_crmentity.crmid=$moduletable.$moduleindex + left join vtiger_products as vtiger_products$module on vtiger_products$module.productid = vtiger_faq.product_id + left join vtiger_groups as vtiger_groups$module on vtiger_groups$module.groupid = vtiger_crmentity.smownerid + left join vtiger_users as vtiger_users$module on vtiger_users$module.id = vtiger_crmentity.smownerid + left join vtiger_groups on vtiger_groups.groupid = vtiger_crmentity.smownerid + left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid + left join vtiger_users as vtiger_lastModifiedBy".$module." on vtiger_lastModifiedBy".$module.".id = vtiger_crmentity.modifiedby"; + return $query; + } + + /* + * Function to get the relation tables for related modules + * @param - $secmodule secondary module name + * returns the array with table names and fieldnames storing relations between module and this module + */ + function setRelationTables($secmodule){ + $rel_tables = array ( + "Documents" => array("vtiger_senotesrel"=>array("crmid","notesid"),"vtiger_faq"=>"id"), + ); + return $rel_tables[$secmodule]; + } + + function clearSingletonSaveFields() { + $this->column_fields['comments'] = ''; + } + +} +?> diff --git a/modules/Faq/FaqAjax.php b/modules/Faq/FaqAjax.php new file mode 100644 index 0000000..ce66087 --- /dev/null +++ b/modules/Faq/FaqAjax.php @@ -0,0 +1,13 @@ + diff --git a/modules/Faq/ListFaq.php b/modules/Faq/ListFaq.php new file mode 100644 index 0000000..4af36f2 --- /dev/null +++ b/modules/Faq/ListFaq.php @@ -0,0 +1,169 @@ +$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries + */ +function getMyFaq($maxval,$calCnt) +{ + require_once("data/Tracker.php"); + require_once('modules/Faq/Faq.php'); + require_once('include/logging.php'); + require_once('include/ListView/ListView.php'); + require_once('include/utils/utils.php'); + require_once('modules/CustomView/CustomView.php'); + + global $current_language,$current_user,$list_max_entries_per_page,$adb; + $current_module_strings = return_module_language($current_language, 'Faq'); + + $url_string = ''; + $sorder = ''; + $oCustomView = new CustomView("Faq"); + if(isset($_REQUEST['viewname']) == false || $_REQUEST['viewname']=='') + { + if($oCustomView->setdefaultviewid != "") + { + $viewid = $oCustomView->setdefaultviewid; + }else + { + $viewid = "0"; + } + } + $focus = new Faq(); + + //Retreive the list from Database + //<<<<<<<<>>>>>>>> + $currentModule = 'Faq'; + $viewId = getCvIdOfAll($currentModule); + $queryGenerator = new QueryGenerator($currentModule, $current_user); + $queryGenerator->initForCustomViewById($viewId); + $meta = $queryGenerator->getMeta($currentModule); + $accessibleFieldNameList = array_keys($meta->getModuleFields()); + $customViewFields = $queryGenerator->getCustomViewFields(); + $fields = $queryGenerator->getFields(); + $newFields = array_diff($fields, $customViewFields); + $widgetFieldsList = array('question','product_id'); + $widgetFieldsList = array_intersect($accessibleFieldNameList, $widgetFieldsList); + $widgetSelectedFields = array_chunk(array_intersect($customViewFields, $widgetFieldsList), 2); + //select the first chunk of two fields + $widgetSelectedFields = $widgetSelectedFields[0]; + if(count($widgetSelectedFields) < 2) { + $widgetSelectedFields = array_chunk(array_merge($widgetSelectedFields, $accessibleFieldNameList), 2); + //select the first chunk of two fields + $widgetSelectedFields = $widgetSelectedFields[0]; + } + $newFields = array_merge($newFields, $widgetSelectedFields); + $queryGenerator->setFields($newFields); + $_REQUEST = getMyFaqSearch($_REQUEST); + $queryGenerator->addUserSearchConditions($_REQUEST); + $search_qry = '&query=true'.getSearchURL($_REQUEST); + $query = $queryGenerator->getQuery(); + + //<<<<<<<>>>>>>>> + + $query .= " LIMIT 0," . $adb->sql_escape_string($maxval); + + if($calCnt == 'calculateCnt') { + $list_result_rows = $adb->query(mkCountQuery($query)); + return $adb->query_result($list_result_rows, 0, 'count'); + } + + $list_result = $adb->query($query); + + //Retreiving the no of rows + $noofrows = $adb->num_rows($list_result); + + //Retreiving the start value from request + if(isset($_REQUEST['start']) && $_REQUEST['start'] != '') + { + $start = vtlib_purify($_REQUEST['start']); + } + else + { + + $start = 1; + } + + //Retreive the Navigation array + $navigation_array = getNavigationValues($start, $noofrows, $list_max_entries_per_page); + + if ($navigation_array['start'] == 1) + { + if($noofrows != 0) + $start_rec = $navigation_array['start']; + else + $start_rec = 0; + if($noofrows > $list_max_entries_per_page) + { + $end_rec = $navigation_array['start'] + $list_max_entries_per_page - 1; + } + else + { + $end_rec = $noofrows; + } + + } + else + { + if($navigation_array['next'] > $list_max_entries_per_page) + { + $start_rec = $navigation_array['next'] - $list_max_entries_per_page; + $end_rec = $navigation_array['next'] - 1; + } + else + { + $start_rec = $navigation_array['prev'] + $list_max_entries_per_page; + $end_rec = $noofrows; + } + } + + + //Retreive the List View Table Header + $title=array('myFaqs.gif',$current_module_strings['LBL_MY_FAQ'],'home_myfaq'); + $controller = new ListViewController($adb, $current_user, $queryGenerator); + $controller->setHeaderSorting(false); + $header = $controller->getListViewHeader($focus,$currentModule,$url_string,$sorder, + $order_by, true); + + $entries = $controller->getListViewEntries($focus,$currentModule,$list_result, + $navigation_array, true); + + $values=Array('ModuleName'=>'Faq','Title'=>$title,'Header'=>$header,'Entries'=>$entries,'search_qry'=>$search_qry); + if ( ($noofrows == 0 ) || ($noofrows>0) ) + return $values; +} + +function getMyFaqSearch($output) { + $output['query'] = 'true'; + $output['searchtype'] = 'advance'; + + $advft_criteria_groups = array('1' => array('groupcondition' => null)); + $advft_criteria = array( + array ( + 'groupid' => 1, + 'columnname' => 'vtiger_faq:status:faqstatus:Faq_Status:V', + 'comparator' => 'n', + 'value' => 'Obsolete', + 'columncondition' => null + ) + ); + + $output['advft_criteria'] = Zend_Json::encode($advft_criteria); + $output['advft_criteria_groups'] = Zend_Json::encode($advft_criteria_groups); + + return $output; +} + +?> diff --git a/modules/Faq/ListView.php b/modules/Faq/ListView.php new file mode 100644 index 0000000..8c82300 --- /dev/null +++ b/modules/Faq/ListView.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Faq/ListViewPagging.php b/modules/Faq/ListViewPagging.php new file mode 100644 index 0000000..333f176 --- /dev/null +++ b/modules/Faq/ListViewPagging.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Faq/MassEdit.php b/modules/Faq/MassEdit.php new file mode 100644 index 0000000..0553078 --- /dev/null +++ b/modules/Faq/MassEdit.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Faq/MassEditSave.php b/modules/Faq/MassEditSave.php new file mode 100644 index 0000000..2c3d6e8 --- /dev/null +++ b/modules/Faq/MassEditSave.php @@ -0,0 +1,71 @@ +retrieve_entity_info($recordid, $currentModule); + $focus->mode = 'edit'; + $focus->id = $recordid; + foreach($focus->column_fields as $fieldname => $val) + { + if(isset($_REQUEST[$fieldname."_mass_edit_check"])) + { + if($fieldname == 'assigned_user_id'){ + if($_REQUEST['assigntype'] == 'U') { + $value = $_REQUEST['assigned_user_id']; + } elseif($_REQUEST['assigntype'] == 'T') { + $value = $_REQUEST['assigned_group_id']; + } + } else { + if(is_array($_REQUEST[$fieldname])) + $value = $_REQUEST[$fieldname]; + else + $value = trim($_REQUEST[$fieldname]); + } + $focus->column_fields[$fieldname] = $value; + } + else{ + $focus->column_fields[$fieldname] = decode_html($focus->column_fields[$fieldname]); + } + } + // Avoiding comment update on ticket + $focus->column_fields['comments'] = ''; + $_REQUEST['comments'] = ''; + // END + $focus->save($currentModule); + } + } +} + +$parenttab = getParentTab(); +header("Location: index.php?module=$return_module&action=$return_action&parenttab=$parenttab$rstart"); +?> \ No newline at end of file diff --git a/modules/Faq/Save.php b/modules/Faq/Save.php new file mode 100644 index 0000000..320f42f --- /dev/null +++ b/modules/Faq/Save.php @@ -0,0 +1,54 @@ +column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} +$focus->save("Faq"); +$return_id = $focus->id; + +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']); +else $return_module = "Faq"; +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']); +else $return_action = "DetailView"; +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']); + +$local_log->debug("Saved record with id of ".$return_id); + +header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&start=".vtlib_purify($_REQUEST['pagenumber']).$search); +?> \ No newline at end of file diff --git a/modules/Faq/Settings.php b/modules/Faq/Settings.php new file mode 100644 index 0000000..48a80c0 --- /dev/null +++ b/modules/Faq/Settings.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Faq/TagCloud.php b/modules/Faq/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Faq/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Faq/UnifiedSearch.php b/modules/Faq/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Faq/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Faq/index.php b/modules/Faq/index.php new file mode 100644 index 0000000..0097973 --- /dev/null +++ b/modules/Faq/index.php @@ -0,0 +1,17 @@ + \ No newline at end of file diff --git a/modules/Faq/language/de_de.lang.php b/modules/Faq/language/de_de.lang.php new file mode 100644 index 0000000..0e3da08 --- /dev/null +++ b/modules/Faq/language/de_de.lang.php @@ -0,0 +1,136 @@ +'Wissesbasis', + 'LBL_MODULE_TITLE'=>'Wissensbasis: Home', + 'LBL_SEARCH_FORM_TITLE'=>'Thema suchen', + 'LBL_LIST_FORM_TITLE'=>'Thema', + 'LBL_NEW_FORM_TITLE'=>'Neues Thema', + 'LBL_MEMBER_ORG_FORM_TITLE'=>'Mitgliedsorganisation', + + 'LBL_LIST_ACCOUNT_NAME'=>'Themenname', + 'LBL_LIST_CITY'=>'Ort', + 'LBL_LIST_WEBSITE'=>'Webseite', + 'LBL_LIST_STATE'=>'Bundesland', + 'LBL_LIST_PHONE'=>'Telefon', + 'LBL_LIST_EMAIL_ADDRESS'=>'E-Mail', + 'LBL_LIST_CONTACT_NAME'=>'Person', + 'LBL_FAQ_INFORMATION'=>'Wissensbasis Information', + + //DON'T CONVERT THESE THEY ARE MAPPINGS + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + + //END DON'T CONVERT + + 'LBL_ACCOUNT'=>'Thema:', + 'LBL_ACCOUNT_NAME'=>'Themename:', + 'LBL_PHONE'=>'Telefon:', + 'LBL_WEBSITE'=>'Webseite:', + 'LBL_FAX'=>'Fax:', + 'LBL_TICKER_SYMBOL'=>'Org. Namenszusatz:', + 'LBL_OTHER_PHONE'=>'weiteres Telefon:', + 'LBL_ANY_PHONE'=>'anderes Telefon:', + 'LBL_MEMBER_OF'=>'Mitglied von:', + 'LBL_EMAIL'=>'E-Mail:', + 'LBL_EMPLOYEES'=>'Beschäftigte:', + 'LBL_OTHER_EMAIL_ADDRESS'=>'Weitere E-Mail:', + 'LBL_ANY_EMAIL'=>'Andere E-Mail:', + 'LBL_OWNERSHIP'=>'Besitzer:', + 'LBL_RATING'=>'Bewertung:', + 'LBL_INDUSTRY'=>'Branche:', + 'LBL_SIC_CODE'=>'Börsen Code:', + 'LBL_TYPE'=>'Typ:', + 'LBL_ANNUAL_REVENUE'=>'Jahresumsatz:', + 'LBL_ADDRESS_INFORMATION'=>'Adressinformation', + 'LBL_ACCOUNT_INFORMATION'=>'Themen Information', + 'LBL_BILLING_ADDRESS'=>'Rechnungsadresse:', + 'LBL_SHIPPING_ADDRESS'=>'Lieferadresse:', + 'LBL_ANY_ADDRESS'=>'weitere Adresse:', + 'LBL_CITY'=>'Ort:', + 'LBL_STATE'=>'Bundesland:', + 'LBL_POSTAL_CODE'=>'PLZ:', + 'LBL_COUNTRY'=>'Land:', + 'LBL_DESCRIPTION_INFORMATION'=>'Beschreibungsinformationen', + 'LBL_DESCRIPTION'=>'Beschreibung:', + 'NTC_COPY_BILLING_ADDRESS'=>'Kopiere Rechnungsadresse zu Lieferadresse', + 'NTC_COPY_SHIPPING_ADDRESS'=>'Kopiere Lieferadresse zu Rechnungsadresse', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Sind Sie sicher, dass Sie diesen Eintrag löschen wollen?', + 'LBL_DUPLICATE'=>'Mögliches doppelte Thema', + 'MSG_DUPLICATE' => 'Sie nehmen möglicherweise einen doppelten Eintrag vor.Wählen Sie entweder einen Eintrag aus der Liste oder legen Sie ein neues Thema an.', + + 'LBL_INVITEE'=>'Kontakte', + 'ERR_DELETE_RECORD'=>"Zum Löschen muss ein Eintrag ausgewählt sein!", + + 'LBL_SELECT_ACCOUNT'=>'Thema auswählen', + 'LBL_GENERAL_INFORMATION'=>'Allgemeine Information', + + //for v4 release added + 'LBL_NEW_POTENTIAL'=>'Neues Potential', + 'LBL_POTENTIAL_TITLE'=>'Potential', + + 'LBL_NEW_TASK'=>'Neue Aufgabe', + 'LBL_TASK_TITLE'=>'Aufgaben', + 'LBL_NEW_CALL'=>'Neuer Anruf', + 'LBL_CALL_TITLE'=>'Anrufe', + 'LBL_NEW_MEETING'=>'Neues Meeting', + 'LBL_MEETING_TITLE'=>'Meetings', + 'LBL_NEW_EMAIL'=>'Neue E-Mail', + 'LBL_EMAIL_TITLE'=>'E-Mails', + 'LBL_NEW_CONTACT'=>'Neuer Kontakt', + 'LBL_CONTACT_TITLE'=>'Kontakte', + + //Added for 4GA Release + 'Category'=>'Kategorie', + 'Related To'=>'zuständig ', + 'Question'=>'Frage', + 'Answer'=>'Antwort', + 'Comments'=>'Kommentare', + 'LBL_COMMENTS'=>'Kommentare',//give the same value given to the above string 'Comments' + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + + //Added fields after 4.2 alpha + 'LBL_TICKETS'=>'Tickets', + 'LBL_FAQ'=>'Wissensbasis', + 'Product Name'=>'Produktname', + 'FAQ Id'=>'Basis ID', + 'Add Comment'=>'Kommentar hinzufügen', + 'LBL_ADD_COMMENT'=>'Kommentar hinzufügen',//give the same value given to the above string 'Add Comment' + 'LBL_COMMENT_INFORMATION'=>'Kommentar', + 'Status'=>'Status', + + //Added on 10-12-2005 + 'LBL_QUESTION'=>'Frage', + 'LBL_CATEGORY'=>'Kategorie', + 'LBL_MY_FAQ'=>'Meine Wissensbasis', + + //Added for existing Picklist Entries + + 'General'=>'Allgemein', + + 'Draft'=>'Entwurf', + 'Reviewed'=>'durchgesehen', + 'Published'=>'veröffentlicht', + 'Obsolete'=>'veraltet', + + // Module Sequence Numbering + 'Faq No' => 'Wissensbasis Nr.', + // END + 'Faq ID' => 'FAQ ID', +); + +?> \ No newline at end of file diff --git a/modules/Faq/language/en_gb.lang.php b/modules/Faq/language/en_gb.lang.php new file mode 100644 index 0000000..e96d292 --- /dev/null +++ b/modules/Faq/language/en_gb.lang.php @@ -0,0 +1,106 @@ + 'FAQ', + 'LBL_MODULE_TITLE' => 'FAQ: Home', + 'LBL_SEARCH_FORM_TITLE' => 'FAQ Search', + 'LBL_LIST_FORM_TITLE' => 'FAQ List', + 'LBL_NEW_FORM_TITLE' => 'New FAQ', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Member Organisations', + 'LBL_LIST_ACCOUNT_NAME' => 'FAQ Name', + 'LBL_LIST_CITY' => 'City', + 'LBL_LIST_WEBSITE' => 'Website', + 'LBL_LIST_STATE' => 'County', + 'LBL_LIST_PHONE' => 'Phone', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email Address', + 'LBL_LIST_CONTACT_NAME' => 'Contact Name', + 'LBL_FAQ_INFORMATION' => 'FAQ Information', + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + 'LBL_ACCOUNT' => 'FAQ:', + 'LBL_ACCOUNT_NAME' => 'FAQ Name:', + 'LBL_PHONE' => 'Phone:', + 'LBL_WEBSITE' => 'Website:', + 'LBL_FAX' => 'Fax:', + 'LBL_TICKER_SYMBOL' => 'Ticker Symbol:', + 'LBL_OTHER_PHONE' => 'Other Phone:', + 'LBL_ANY_PHONE' => 'Any Phone:', + 'LBL_MEMBER_OF' => 'Member of:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMPLOYEES' => 'Employees:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:', + 'LBL_ANY_EMAIL' => 'Any Email:', + 'LBL_OWNERSHIP' => 'Ownership:', + 'LBL_RATING' => 'Rating:', + 'LBL_INDUSTRY' => 'Industry:', + 'LBL_SIC_CODE' => 'SIC Code:', + 'LBL_TYPE' => 'Type:', + 'LBL_ANNUAL_REVENUE' => 'Annual Revenue:', + 'LBL_ADDRESS_INFORMATION' => 'Address Information', + 'LBL_ACCOUNT_INFORMATION' => 'Faq Information', + 'LBL_BILLING_ADDRESS' => 'Invoice Address:', + 'LBL_SHIPPING_ADDRESS' => 'Delivery Address:', + 'LBL_ANY_ADDRESS' => 'Any Address:', + 'LBL_CITY' => 'City:', + 'LBL_STATE' => 'County:', + 'LBL_POSTAL_CODE' => 'Postcode:', + 'LBL_COUNTRY' => 'Country:', + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', + 'LBL_DESCRIPTION' => 'Description:', + 'NTC_COPY_BILLING_ADDRESS' => 'Copy invoice address to delivery address', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Copy delivery address to invoice address', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Are you sure you want to remove this record as a member organisation?', + 'LBL_DUPLICATE' => 'Potential Duplicate FAQ', + 'MSG_DUPLICATE' => 'Creating this Organisation may potentialy create a duplicate. You can either select an Organisation from the list below or you may click on Create New FAQ to continue creating a new Organisation with the previously entered data.', + 'LBL_INVITEE' => 'Contacts', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the record', + 'LBL_SELECT_ACCOUNT' => 'Select FAQ', + 'LBL_GENERAL_INFORMATION' => 'General Information', + 'LBL_NEW_POTENTIAL' => 'New Opportunity', + 'LBL_POTENTIAL_TITLE' => 'Opportunities', + 'LBL_NEW_TASK' => 'New Task', + 'LBL_TASK_TITLE' => 'Tasks', + 'LBL_NEW_CALL' => 'New Call', + 'LBL_CALL_TITLE' => 'Calls', + 'LBL_NEW_MEETING' => 'New Meeting', + 'LBL_MEETING_TITLE' => 'Meetings', + 'LBL_NEW_EMAIL' => 'New Email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_CONTACT' => 'New Contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'Category' => 'Category', + 'Related To' => 'Related To', + 'Question' => 'Question', + 'Answer' => 'Answer', + 'Comments' => 'Comments', + 'LBL_COMMENTS' => 'Comments', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'LBL_TICKETS' => 'Tickets', + 'LBL_FAQ' => 'FAQ', + 'Product Name' => 'Product Name', + 'FAQ Id' => 'FAQ ID', + 'Add Comment' => 'Add Comment', + 'LBL_ADD_COMMENT' => 'Add Comment', + 'LBL_COMMENT_INFORMATION' => 'Comment Information', + 'Status' => 'Status', + 'LBL_QUESTION' => 'Question', + 'LBL_CATEGORY' => 'Category', + 'LBL_MY_FAQ' => 'My Recent FAQs', + 'General' => 'General', + 'Draft' => 'Draft', + 'Reviewed' => 'Reviewed', + 'Published' => 'Published', + 'Obsolete' => 'Obsolete', + 'Faq No' => 'FAQ No.' +); +?> \ No newline at end of file diff --git a/modules/Faq/language/en_us.lang.php b/modules/Faq/language/en_us.lang.php new file mode 100644 index 0000000..8b183d1 --- /dev/null +++ b/modules/Faq/language/en_us.lang.php @@ -0,0 +1,144 @@ +'FAQ', +'LBL_MODULE_TITLE'=>'FAQ: Home', +'LBL_SEARCH_FORM_TITLE'=>'FAQ Search', +'LBL_LIST_FORM_TITLE'=>'FAQ List', +'LBL_NEW_FORM_TITLE'=>'New Faq', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', + +'LBL_LIST_ACCOUNT_NAME'=>'Faq Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', +'LBL_FAQ_INFORMATION'=>'Faq Information', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Faq:', +'LBL_ACCOUNT_NAME'=>'Faq Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_ACCOUNT_INFORMATION'=>'Faq Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Opportunities Duplicate Faq', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Faq to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Faq', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Opportunity', +'LBL_POTENTIAL_TITLE'=>'Opportunities', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added for 4GA Release +'Category'=>'Category', +'Related To'=>'Related To', +'Question'=>'Question', +'Answer'=>'Answer', +'Comments'=>'Comments', +'LBL_COMMENTS'=>'Comments',//give the same value given to the above string 'Comments' +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', + +//Added vtiger_fields after 4.2 alpha +'LBL_TICKETS'=>'Tickets', +'LBL_FAQ'=>'FAQ', +'Product Name'=>'Product Name', +'FAQ Id'=>'FAQ Id', +'Add Comment'=>'Add Comment', +'LBL_ADD_COMMENT'=>'Add Comment',//give the same value given to the above string 'Add Comment' +'LBL_COMMENT_INFORMATION'=>'Comment Information', +'Status'=>'Status', + +//Added on 10-12-2005 +'LBL_QUESTION'=>'Question', +'LBL_CATEGORY'=>'Category', +'LBL_MY_FAQ'=>'My Recent FAQs', + +//Added for existing Picklist Entries + +'General'=>'General', + +'Draft'=>'Draft', +'Reviewed'=>'Reviewed', +'Published'=>'Published', +'Obsolete'=>'Obsolete', + +// Module Sequence Numbering +'Faq No' => 'Faq No', +// END +'Faq ID' => 'FAQ ID', +); + +?> diff --git a/modules/Faq/language/es_es.lang.php b/modules/Faq/language/es_es.lang.php new file mode 100644 index 0000000..e687387 --- /dev/null +++ b/modules/Faq/language/es_es.lang.php @@ -0,0 +1,145 @@ + 'FAQ', +'LBL_MODULE_TITLE'=>'FAQ: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar FAQ', +'LBL_LIST_FORM_TITLE'=>'Lista de FAQ', +'LBL_NEW_FORM_TITLE'=>'Nueva Faq', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Organizaciones Miembro', + +'LBL_LIST_ACCOUNT_NAME'=>'Faq', +'LBL_LIST_CITY'=>'Población', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_STATE'=>'Provincia', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_EMAIL_ADDRESS'=>'Dirección de Email', +'LBL_LIST_CONTACT_NAME'=>'Persona de Contacto', +'LBL_FAQ_INFORMATION'=>'Información de FAQ', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Faq:', +'LBL_ACCOUNT_NAME'=>'Faq:', +'LBL_PHONE'=>'Teléfono:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker de bolsa:', +'LBL_OTHER_PHONE'=>'Tel. Directo:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_MEMBER_OF'=>'Miembro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empleados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email (Alternativo):', +'LBL_OWNERSHIP'=>'Propietario:', +'LBL_RATING'=>'Clasificación:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_SIC_CODE'=>'CIF:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Facturación Anual:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_ACCOUNT_INFORMATION'=>'Información de Faq', +'LBL_BILLING_ADDRESS'=>'Dirección (Factura):', +'LBL_SHIPPING_ADDRESS'=>'Dirección (Envío):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Población:', +'LBL_STATE'=>'Provincia:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Información adicional', +'LBL_DESCRIPTION'=>'Descripción:', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar Factura a Envío', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar Envío a Factura', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'¿Está seguro que desea eliminar este registro como miembro de organización?', +'LBL_DUPLICATE'=>'Posible Faq duplicada', +'MSG_DUPLICATE'=>'Al crear esta Faq puede crear una Faq duplicada. Puede seleccionar una Faq de la lista inferior o hacer pinchar en "Crea FAQ Nuevo" para crear una nueva FAQ con los datos introducidos.', + +'LBL_INVITEE'=>'Contactos', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para poder eliminar la FAQ.', + +'LBL_SELECT_ACCOUNT'=>'Seleccionar Faq', +'LBL_GENERAL_INFORMATION'=>'Información General', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidad', + +'LBL_NEW_TASK'=>'Nueva Tarea', +'LBL_TASK_TITLE'=>'Tarea', +'LBL_NEW_CALL'=>'Nueva Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Nueva Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', + +//Added for 4GA Release +'Category'=>'Categoría', +'Related To'=>'Relacionado con', +'Question'=>'Pregunta', +'Answer'=>'Respuesta', +'Comments'=>'Comentarios', +'LBL_COMMENTS'=>'Comentarios', +'Created Time'=>'Fecha de Creación', +'Modified Time'=>'Fecha de Modificación', + +//Added vtiger_fields after 4.2 alpha +'LBL_TICKETS'=>'Partes', +'LBL_FAQ'=>'FAQ', +'Product Name'=>'Nombre del Producto', +'FAQ Id'=>'Número de FAQ', +'Add Comment'=>'Añadir Comentario', +'LBL_ADD_COMMENT'=>'Añadir Comentario', +'LBL_COMMENT_INFORMATION'=>'Información del Comentario', +'Status'=>'Estado', + +//Added on 10-12-2005 +'LBL_QUESTION'=>'Pregunta', +'LBL_CATEGORY'=>'Categoría', +'LBL_MY_FAQ'=>'Mis FAQs Recientes', + +//Added for existing Picklist Entries + +'General'=>'General', + +'Draft'=>'Borrador', +'Reviewed'=>'Revisada', +'Published'=>'Publicada', +'Obsolete'=>'Obsoleta', + +// Module Sequence Numbering +'Faq No' => 'Núm. FAQ', +// END + +'Faq ID' => 'Id FAQ', +); + +?> diff --git a/modules/Faq/language/es_mx.lang.php b/modules/Faq/language/es_mx.lang.php new file mode 100644 index 0000000..d7a09a5 --- /dev/null +++ b/modules/Faq/language/es_mx.lang.php @@ -0,0 +1,145 @@ + 'FAQ', +'LBL_MODULE_TITLE'=>'FAQ: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar FAQ', +'LBL_LIST_FORM_TITLE'=>'Lista de FAQ', +'LBL_NEW_FORM_TITLE'=>'Nueva Faq', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Organizaciones Miembro', + +'LBL_LIST_ACCOUNT_NAME'=>'FAQ', +'LBL_LIST_CITY'=>'Deleg./Mpio.', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_STATE'=>'Estado', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_EMAIL_ADDRESS'=>'Dirección de Email', +'LBL_LIST_CONTACT_NAME'=>'Persona de Contacto', +'LBL_FAQ_INFORMATION'=>'Información de FAQ', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'FAQ:', +'LBL_ACCOUNT_NAME'=>'FAQ:', +'LBL_PHONE'=>'Teléfono:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Símbolo de bolsa:', +'LBL_OTHER_PHONE'=>'Tel. Directo:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_MEMBER_OF'=>'Miembro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empleados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email (Alternativo):', +'LBL_OWNERSHIP'=>'Propietario:', +'LBL_RATING'=>'Clasificación:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_SIC_CODE'=>'RFC:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Facturación Anual:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_ACCOUNT_INFORMATION'=>'Información de FAQ', +'LBL_BILLING_ADDRESS'=>'Dirección (Factura):', +'LBL_SHIPPING_ADDRESS'=>'Dirección (Envío):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Deleg./Mpio.:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descripción Adicional', +'LBL_DESCRIPTION'=>'Descripción:', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar Factura a Envío', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar Envío a Factura', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'¿Está seguro que desea eliminar este registro como miembro de la organización?', +'LBL_DUPLICATE'=>'Posible FAQ duplicada', +'MSG_DUPLICATE'=>'Al crear esta FAQ puede crear una FAQ duplicada. Puede seleccionar una FAQ de la lista inferior o hacer pinchar en Crea FAQ Nuevo para crear una nueva FAQ con los datos introducidos.', + +'LBL_INVITEE'=>'Contactos', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para poder eliminar la FAQ.', + +'LBL_SELECT_ACCOUNT'=>'Seleccionar FAQ', +'LBL_GENERAL_INFORMATION'=>'Información General', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidad', + +'LBL_NEW_TASK'=>'Nueva Tarea', +'LBL_TASK_TITLE'=>'Tarea', +'LBL_NEW_CALL'=>'Nueva Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Nueva Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', + +//Added for 4GA Release +'Category'=>'Categoría', +'Related To'=>'Relacionado con', +'Question'=>'Pregunta', +'Answer'=>'Respuesta', +'Comments'=>'Comentarios', +'LBL_COMMENTS'=>'Comentarios', +'Created Time'=>'Fecha de Creación', +'Modified Time'=>'Fecha de Modificación', + +//Added vtiger_fields after 4.2 alpha +'LBL_TICKETS'=>'casos', +'LBL_FAQ'=>'FAQ', +'Product Name'=>'Nombre del Producto', +'FAQ Id'=>'FAQ ID', +'Add Comment'=>'Agregar Comentario', +'LBL_ADD_COMMENT'=>'Agregar Comentario', +'LBL_COMMENT_INFORMATION'=>'Información del Comentario', +'Status'=>'Estado', + +//Added on 10-12-2005 +'LBL_QUESTION'=>'Pregunta', +'LBL_CATEGORY'=>'Categoría', +'LBL_MY_FAQ'=>'Mis FAQs Recientes', + +//Added for existing Picklist Entries + +'General'=>'General', + +'Draft'=>'Borrador', +'Reviewed'=>'Revisada', +'Published'=>'Publicada', +'Obsolete'=>'Obsoleta', + +// Module Sequence Numbering +'Faq No' => 'Núm. FAQ', +// END + +'Faq ID' => 'Id FAQ', +); + +?> diff --git a/modules/Faq/language/fr_fr.lang.php b/modules/Faq/language/fr_fr.lang.php new file mode 100644 index 0000000..7c323a0 --- /dev/null +++ b/modules/Faq/language/fr_fr.lang.php @@ -0,0 +1,108 @@ + 'FAQ', + 'LBL_MODULE_TITLE' => 'FAQ : accueil', + 'LBL_SEARCH_FORM_TITLE' => 'Rechercher', + 'LBL_LIST_FORM_TITLE' => 'Liste FAQ', + 'LBL_NEW_FORM_TITLE' => 'Nouvelle FAQ', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Filiale de', + 'LBL_LIST_ACCOUNT_NAME' => 'Nom FAQ', + 'LBL_LIST_CITY' => 'Ville', + 'LBL_LIST_WEBSITE' => 'Site Web', + 'LBL_LIST_STATE' => 'Département', + 'LBL_LIST_PHONE' => 'Téléphone', + 'LBL_LIST_EMAIL_ADDRESS' => 'Adresse email', + 'LBL_LIST_CONTACT_NAME' => 'Nom contact', + 'LBL_FAQ_INFORMATION' => 'Information', + 'db_name' => LBL_LIST_ACCOUNT_NAME, + 'db_website' => LBL_LIST_WEBSITE, + 'db_billing_address_city' => LBL_LIST_CITY, + 'LBL_ACCOUNT' => 'FAQ :', + 'LBL_ACCOUNT_NAME' => 'Nom FAQ :', + 'LBL_PHONE' => 'Téléphone :', + 'LBL_WEBSITE' => 'Site Web :', + 'LBL_FAX' => 'Fax :', + 'LBL_TICKER_SYMBOL' => 'Symbole boursier :', + 'LBL_OTHER_PHONE' => 'Autre téléphone :', + 'LBL_ANY_PHONE' => 'Téléphone (alt.) :', + 'LBL_MEMBER_OF' => 'Filiale de :', + 'LBL_EMAIL' => 'Email :', + 'LBL_EMPLOYEES' => 'Employés :', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email (alt.) :', + 'LBL_ANY_EMAIL' => 'Email (alt.) :', + 'LBL_OWNERSHIP' => 'Propriétaire :', + 'LBL_RATING' => 'Evaluation :', + 'LBL_INDUSTRY' => 'Secteur :', + 'LBL_SIC_CODE' => 'Code APE :', + 'LBL_TYPE' => 'Type :', + 'LBL_ANNUAL_REVENUE' => 'C.A. annuel :', + 'LBL_ADDRESS_INFORMATION' => 'Adresse', + 'LBL_ACCOUNT_INFORMATION' => 'Détail FAQ', + 'LBL_BILLING_ADDRESS' => 'Adresse de facturation :', + 'LBL_SHIPPING_ADDRESS' => 'Adresse de livraison :', + 'LBL_ANY_ADDRESS' => 'Adresse (alt.) :', + 'LBL_CITY' => 'Ville :', + 'LBL_STATE' => 'Département :', + 'LBL_POSTAL_CODE' => 'Code postal :', + 'LBL_COUNTRY' => 'Pays :', + 'LBL_DESCRIPTION_INFORMATION' => 'Description détail', + 'LBL_DESCRIPTION' => 'Description :', + 'NTC_COPY_BILLING_ADDRESS' => 'Utiliser l\'adresse de facturation pour la livraison', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Utiliser l\'adresse de livraison pour la facturation', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Etes-vous certain de vouloir désolidariser cet enregistrement du groupe ?', + 'LBL_DUPLICATE' => 'FAQ en doublon', + 'MSG_DUPLICATE' => 'La création de ce compte peut créer un doublon. Vous pouvez soit choisir un Compte dans la liste ci-dessous ou cliquer sur Créer FAQ pour continuer la création du nouveau Compte avec les données précédemment saisies.', + 'LBL_INVITEE' => 'Contacts', + 'ERR_DELETE_RECORD' => 'Un numéro d\'enregistrement doit être spécifié pour supprimer ce compte.', + 'LBL_SELECT_ACCOUNT' => 'Sélectionner FAQ', + 'LBL_GENERAL_INFORMATION' => 'Informations générales', + 'LBL_NEW_POTENTIAL' => 'Nouvelle affaire', + 'LBL_POTENTIAL_TITLE' => 'Affaires', + 'LBL_NEW_TASK' => 'Nouvelle tâche', + 'LBL_TASK_TITLE' => 'Tâches', + 'LBL_NEW_CALL' => 'Nouvel appel', + 'LBL_CALL_TITLE' => 'Appels', + 'LBL_NEW_MEETING' => 'Nouveau rendez-vous', + 'LBL_MEETING_TITLE' => 'Rendez-vous', + 'LBL_NEW_EMAIL' => 'Nouvel email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_CONTACT' => 'Nouveau contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'Category' => 'Catégorie', + 'Related To' => 'Relatif à', + 'Question' => 'Question', + 'Answer' => 'Réponse', + 'Comments' => 'Commentaires', + 'LBL_COMMENTS' => 'Commentaires', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'LBL_TICKETS' => 'Tickets', + 'LBL_FAQ' => 'FAQ', + 'Product Name' => 'Nom produit', + 'FAQ Id' => 'Ref FAQ', + 'Add Comment' => 'Ajouter commentaire', + 'LBL_ADD_COMMENT' => 'Ajouter commentaire', + 'LBL_COMMENT_INFORMATION' => 'Commentaire', + 'Status' => 'Statut', + 'LBL_QUESTION' => 'Question', + 'LBL_CATEGORY' => 'Catégorie', + 'LBL_MY_FAQ' => 'Dernière FAQ', + 'General' => 'Général', + 'Draft' => 'Brouillon', + 'Reviewed' => 'Corrigé', + 'Published' => 'Publié', + 'Obsolete' => 'Obsolète', + 'Faq No' => 'Faq N°', + 'Faq ID' => 'FAQ ID', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Faq/language/hu_hu.lang.php b/modules/Faq/language/hu_hu.lang.php new file mode 100644 index 0000000..76baa24 --- /dev/null +++ b/modules/Faq/language/hu_hu.lang.php @@ -0,0 +1,111 @@ + 'TudásTár', + 'LBL_MODULE_TITLE' => 'TudásTár: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'TudásTár Keresés', + 'LBL_LIST_FORM_TITLE' => 'TudásTár Lista', + 'LBL_NEW_FORM_TITLE' => 'Új TudásTár', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Szervezeti tagság', + 'LBL_LIST_ACCOUNT_NAME' => 'TudásTár neve', + 'LBL_LIST_CITY' => 'Város', + 'LBL_LIST_WEBSITE' => 'Weboldal', + 'LBL_LIST_STATE' => 'Állam/megye', + 'LBL_LIST_PHONE' => 'Telefon', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email cím', + 'LBL_LIST_CONTACT_NAME' => 'Kapcsolat neve', + 'LBL_FAQ_INFORMATION' => 'TudásTár adatai', + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + 'LBL_ACCOUNT' => 'TudásTár:', + 'LBL_ACCOUNT_NAME' => 'TudásTár neve:', + 'LBL_PHONE' => 'Telefon:', + 'LBL_WEBSITE' => 'Weboldal:', + 'LBL_FAX' => 'Fax:', + 'LBL_TICKER_SYMBOL' => 'Tőzsdei rövidítés:', + 'LBL_OTHER_PHONE' => 'Telefon, másik:', + 'LBL_ANY_PHONE' => 'Telefon, bármilyen:', + 'LBL_MEMBER_OF' => 'Tagja:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMPLOYEES' => 'Alkalmazottak:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email cím, másik:', + 'LBL_ANY_EMAIL' => 'Email cím, bármilyen:', + 'LBL_OWNERSHIP' => 'Tulajdonviszonyok:', + 'LBL_RATING' => 'Értekelés:', + 'LBL_INDUSTRY' => 'Iparág:', + 'LBL_SIC_CODE' => 'TEÁOR:', + 'LBL_TYPE' => 'Típus:', + 'LBL_ANNUAL_REVENUE' => 'Éves forgalom:', + 'LBL_ADDRESS_INFORMATION' => 'Cím adatok', + 'LBL_ACCOUNT_INFORMATION' => 'Cég adatok', + 'LBL_BILLING_ADDRESS' => 'Számlázási cím:', + 'LBL_SHIPPING_ADDRESS' => 'Szállítási cím:', + 'LBL_ANY_ADDRESS' => 'Bármilyen cím:', + 'LBL_CITY' => 'Város:', + 'LBL_STATE' => 'Állam/megye:', + 'LBL_POSTAL_CODE' => 'Irányítószám:', + 'LBL_COUNTRY' => 'Ország:', + 'LBL_DESCRIPTION_INFORMATION' => 'Leíró Információ', + 'LBL_DESCRIPTION' => 'Leírás:', + 'NTC_COPY_BILLING_ADDRESS' => 'Számlázási cím másolása a szállítási címbe', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Szállítási cím másolása a számlázási címbe', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Biztos vagy abban, hogy ezt a rekorodot mint tagszervezetet törölni akarod?', + 'LBL_DUPLICATE' => 'Lehetséges TudásTár Duplikáció', + 'MSG_DUPLICATE' => 'Ennek a tételnek a létrehozása valószínűleg duplikálni fog egy már létező tételt a rendszerben. Kiválaszthatsz egy már létező tételt a listáról innen alább, vagy kattinthatsz az Új TudásTár gombra, hogy folytasd a TudásTár létrehozását a már bevitt adatokkal.', + 'LBL_INVITEE' => 'Kapcsolatok', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a VTiger-fiók törléséhez', + 'LBL_SELECT_ACCOUNT' => 'TudásTár kiválasztása', + 'LBL_GENERAL_INFORMATION' => 'Általános Információ', + 'LBL_NEW_POTENTIAL' => 'Új Lehetőség', + 'LBL_POTENTIAL_TITLE' => 'Lehetőségek', + 'LBL_NEW_TASK' => 'Új Feladat', + 'LBL_TASK_TITLE' => 'Feladatok', + 'LBL_NEW_CALL' => 'Új Hívás', + 'LBL_CALL_TITLE' => 'Hívások', + 'LBL_NEW_MEETING' => 'Új Megbeszélés', + 'LBL_MEETING_TITLE' => 'Megbeszélések', + 'LBL_NEW_EMAIL' => 'Új Email', + 'LBL_EMAIL_TITLE' => 'Emailek', + 'LBL_NEW_CONTACT' => 'Új Kapcsolat', + 'LBL_CONTACT_TITLE' => 'Kapcsolatok', + 'Category' => 'Kategória', + 'Related To' => 'Kapcsolódik', + 'Question' => 'Kérdés', + 'Answer' => 'Válasz', + 'Comments' => 'Megjegyzések', + 'LBL_COMMENTS' => 'Megjegyzések', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'LBL_TICKETS' => 'Ügyfélszolgáltai Jegyek', + 'LBL_FAQ' => 'TudásTár', + 'Product Name' => 'Termék neve', + 'FAQ Id' => 'TudásTár AZ', + 'Add Comment' => 'Megjegyzést Hozzáad', + 'LBL_ADD_COMMENT' => 'Megjegyzést Hozzáad', + 'LBL_COMMENT_INFORMATION' => 'Megjegyzés Információ', + 'Status' => 'Állapot', + 'LBL_QUESTION' => 'Kérdés', + 'LBL_CATEGORY' => 'Kategória', + 'LBL_MY_FAQ' => 'Az aktuális TudásTár', + 'General' => 'Általános', + 'Draft' => 'Vázlat', + 'Reviewed' => 'Felülvizsgált', + 'Published' => 'Közzétett', + 'Obsolete' => 'Elavult', + 'Faq No' => 'TudásTár No.' +); +?> \ No newline at end of file diff --git a/modules/Faq/language/nl_nl.lang.php b/modules/Faq/language/nl_nl.lang.php new file mode 100644 index 0000000..5d52dc5 --- /dev/null +++ b/modules/Faq/language/nl_nl.lang.php @@ -0,0 +1,154 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.5 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Faq/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'FAQ', +'LBL_MODULE_TITLE'=>'FAQ: Home', +'LBL_SEARCH_FORM_TITLE'=>'Zoek FAQ', +'LBL_LIST_FORM_TITLE'=>'FAQ lijst', +'LBL_NEW_FORM_TITLE'=>'Nieuwe FAQ', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Leden organisatie', + +'LBL_LIST_ACCOUNT_NAME'=>'Organisatienaam', +'LBL_LIST_CITY'=>'Plaats', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'Provincie', +'LBL_LIST_PHONE'=>'Telefoon', +'LBL_LIST_EMAIL_ADDRESS'=>'e-mailadres', +'LBL_LIST_CONTACT_NAME'=>'Contactpersoon', +'LBL_FAQ_INFORMATION'=>'FAQ informatie', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'FAQ:', +'LBL_ACCOUNT_NAME'=>'Organisatie:', +'LBL_PHONE'=>'Telefoon:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbool:', +'LBL_OTHER_PHONE'=>'Telefoon:', +'LBL_ANY_PHONE'=>'Telefoon Prive:', +'LBL_MEMBER_OF'=>'Onderdeel van:', +'LBL_EMAIL'=>'E-mail:', +'LBL_EMPLOYEES'=>'Werknemers:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Prive e-mail:', +'LBL_ANY_EMAIL'=>'Bedrijfs e-mail:', +'LBL_OWNERSHIP'=>'Eigenaar:', +'LBL_RATING'=>'Beoordeling:', +'LBL_INDUSTRY'=>'Industrie:', +'LBL_SIC_CODE'=>'SBI code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Jaarlijkse omzet:', +'LBL_ADDRESS_INFORMATION'=>'Adresinformatie', +'LBL_ACCOUNT_INFORMATION'=>'FAQ informatie', +'LBL_BILLING_ADDRESS'=>'Postadres:', +'LBL_SHIPPING_ADDRESS'=>'Bezoekadres:', +'LBL_ANY_ADDRESS'=>'Privéadres:', +'LBL_CITY'=>'Plaats:', +'LBL_STATE'=>'Provincie:', +'LBL_POSTAL_CODE'=>'Postcode:', +'LBL_COUNTRY'=>'Land:', +'LBL_DESCRIPTION_INFORMATION'=>'Omschrijving', +'LBL_DESCRIPTION'=>'Omschrijving:', +'NTC_COPY_BILLING_ADDRESS'=>'Kopieer Postadres naar Bezoekadres', +'NTC_COPY_SHIPPING_ADDRESS'=>'Kopieer Bezoekadres naar Postadres', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Weet u zeker dat u dit veld wilt verwijderen als Onderdeel van de organisatie?', +'LBL_DUPLICATE'=>'Mogelijke dubbele FAQ', +'MSG_DUPLICATE' => 'Bij het aanmaken van deze contactgegevens creert u waarschijnlijk een duplicatie van de gegegevens. U kunt een contact selecteren van de lijst of u klikt op FAQ om verder te gaan met de ingevoerde gegevens.', + +'LBL_INVITEE'=>'Contacten', +'ERR_DELETE_RECORD'=>"Een veld moet gespecificeerd zijn om de account te verwijderen.", + +'LBL_SELECT_ACCOUNT'=>'Selecteer FAQ', +'LBL_GENERAL_INFORMATION'=>'Algemene informatie', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nieuwe verkoopkans', +'LBL_POTENTIAL_TITLE'=>'Verkoopkansen', + +'LBL_NEW_TASK'=>'Nieuwe taak', +'LBL_TASK_TITLE'=>'Taken', +'LBL_NEW_CALL'=>'Nieuw telefoongesprek', +'LBL_CALL_TITLE'=>'Telefoongesprekken', +'LBL_NEW_MEETING'=>'Nieuwe vergadering', +'LBL_MEETING_TITLE'=>'vergaderingen', +'LBL_NEW_EMAIL'=>'Nieuwe e-mail', +'LBL_EMAIL_TITLE'=>'E-mails', +'LBL_NEW_CONTACT'=>'Nieuw contact', +'LBL_CONTACT_TITLE'=>'Contacten', + +//Added for 4GA Release +'Category'=>'Categorie', +'Related To'=>'Gerelateerd aan', +'Question'=>'Vraag', +'Answer'=>'Antwoord', +'Comments'=>'Opmerkingen', +'LBL_COMMENTS'=>'Opmerkingen',//give the same value given to the above string 'Comments' +'Created Time'=>'Aangemaakt', +'Modified Time'=>'Gewijzigd', + +//Added fields after 4.2 alpha +'LBL_TICKETS'=>'Tickets', +'LBL_FAQ'=>'FAQ', +'Product Name'=>'Productnaam', +'FAQ Id'=>'FAQ Id', +'Add Comment'=>'Opmerking toevoegen', +'LBL_ADD_COMMENT'=>'Opmerking toevoegen',//give the same value given to the above string 'Add Comment' +'LBL_COMMENT_INFORMATION'=>'Opmerking informatie', +'Status'=>'Status', + +//Added on 10-12-2005 +'LBL_QUESTION'=>'Vragen', +'LBL_CATEGORY'=>'Categorie', +'LBL_MY_FAQ'=>'Mijn FAQ', + +//Added for existing Picklist Entries + +'General'=>'Algemeen', + +'Draft'=>'Tijdelijk', +'Reviewed'=>'Gecontroleerd', +'Published'=>'Gepubliceerd', +'Obsolete'=>'Verouderd', + +// Module Sequence Numbering +'Faq No' => 'FAQ Nr', +// END +); + +?> diff --git a/modules/Faq/language/pt_br.lang.php b/modules/Faq/language/pt_br.lang.php new file mode 100644 index 0000000..0e32276 --- /dev/null +++ b/modules/Faq/language/pt_br.lang.php @@ -0,0 +1,144 @@ +'FAQ', +'LBL_MODULE_TITLE'=>'FAQ: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisar FAQ', +'LBL_LIST_FORM_TITLE'=>'Lista de FAQ', +'LBL_NEW_FORM_TITLE'=>'Nova FAQ', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Organizações Membro', + +'LBL_LIST_ACCOUNT_NAME'=>'Nome da FAQ', +'LBL_LIST_CITY'=>'Cidade', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'Estado', +'LBL_LIST_PHONE'=>'Fone', +'LBL_LIST_EMAIL_ADDRESS'=>'Endereço Email', +'LBL_LIST_CONTACT_NAME'=>'Nome Contato', +'LBL_FAQ_INFORMATION'=>'Informação FAQ', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'FAQ:', +'LBL_ACCOUNT_NAME'=>'Nome FAQ:', +'LBL_PHONE'=>'Fone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Cód. Bolsa:', +'LBL_OTHER_PHONE'=>'Telefone Alternativo:', +'LBL_ANY_PHONE'=>'Outro Telefone:', +'LBL_MEMBER_OF'=>'Membro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empregados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email Alternativo:', +'LBL_ANY_EMAIL'=>'Outro Email:', +'LBL_OWNERSHIP'=>'Propriedade:', +'LBL_RATING'=>'Avaliação:', +'LBL_INDUSTRY'=>'Atividade:', +'LBL_SIC_CODE'=>'Cod CNAE:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Receita Anual:', +'LBL_ADDRESS_INFORMATION'=>'Dados do Endereço', +'LBL_ACCOUNT_INFORMATION'=>'Dados da FAQ', +'LBL_BILLING_ADDRESS'=>'Endereço:', +'LBL_SHIPPING_ADDRESS'=>'Endereço Entrega:', +'LBL_ANY_ADDRESS'=>'Outro Endereço:', +'LBL_CITY'=>'Cidade:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'CEP:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descrição', +'LBL_DESCRIPTION'=>'Descrição:', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar endereço de Faturamento para endereço Entrega', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar endereço de Entrega para endereço de Faturamento', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Você tem certeza que deseja remover este registro como uma organização membro?', +'LBL_DUPLICATE'=>'Possibilidade de FAQ Duplicada', +'MSG_DUPLICATE' => 'Criando esta Organização pode ser que a vtiger_potentialy crie uma vtiger_account duplicada. Você pode seleciona uma outra Organização da lista abaixo ou clicar sobre Criar Nova FAQ para continuar criando uma nova Organização com os dados previamente inseridos.', + +'LBL_INVITEE'=>'Contatos', +'ERR_DELETE_RECORD'=>"Defina um número de registro para deletar a Organização.", + +'LBL_SELECT_ACCOUNT'=>'Selecione FAQ', +'LBL_GENERAL_INFORMATION'=>'Informação Geral', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nova Oportunidade', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nova Tarefa', +'LBL_TASK_TITLE'=>'Tarefa', +'LBL_NEW_CALL'=>'Nova Chamada', +'LBL_CALL_TITLE'=>'Chamadas', +'LBL_NEW_MEETING'=>'Nova Reunião', +'LBL_MEETING_TITLE'=>'Reunião', +'LBL_NEW_EMAIL'=>'Novo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Novo Contato', +'LBL_CONTACT_TITLE'=>'Contatos', + +//Added for 4GA Release +'Category'=>'Categoria', +'Related To'=>'Relacionado à', +'Question'=>'Questão', +'Answer'=>'Resposta', +'Comments'=>'Comentários', +'LBL_COMMENTS'=>'Comments',//give the same value given to the above string 'Comments' +'Created Time'=>'Data Criação', +'Modified Time'=>'Data Modificação', + +//Added vtiger_fields after 4.2 alpha +'LBL_TICKETS'=>'Tickets', +'LBL_FAQ'=>'FAQ', +'Product Name'=>'Nome Produto', +'FAQ Id'=>'No. FAQ', +'Add Comment'=>'Adicionar Comentário', +'LBL_ADD_COMMENT'=>'Add Comment',//give the same value given to the above string 'Add Comment' +'LBL_COMMENT_INFORMATION'=>'Dados do Comentário', +'Status'=>'Status', + +//Added on 10-12-2005 +'LBL_QUESTION'=>'Questão', +'LBL_CATEGORY'=>'Categoria', +'LBL_MY_FAQ'=>'FAQs Recentes', + +//Added for existing Picklist Entries + +'General'=>'Geral', + +'Draft'=>'Rascunho', +'Reviewed'=>'Revisada', +'Published'=>'Publicada', +'Obsolete'=>'Obsoleta', + +// Module Sequence Numbering +'Faq No' => 'No. Faq', +// END +'Faq ID' => 'ID FAQ', +); + +?> diff --git a/modules/Faq/language/zh_cn.lang.php b/modules/Faq/language/zh_cn.lang.php new file mode 100644 index 0000000..ccb7124 --- /dev/null +++ b/modules/Faq/language/zh_cn.lang.php @@ -0,0 +1,145 @@ + '常见问答', + 'LBL_MODULE_TITLE' => '常见问答: 首页', + 'LBL_SEARCH_FORM_TITLE' => '查找问答', + 'LBL_LIST_FORM_TITLE' => '问答列表', + 'LBL_NEW_FORM_TITLE' => '新增问答', + 'LBL_MEMBER_ORG_FORM_TITLE' => '所属单位', + + 'LBL_LIST_ACCOUNT_NAME' => '问答名称', + 'LBL_LIST_CITY' => '城市', + 'LBL_LIST_WEBSITE' => '网站', + 'LBL_LIST_STATE' => '省份', + 'LBL_LIST_PHONE' => '电话', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email地址', + 'LBL_LIST_CONTACT_NAME' => '联系人姓名', + 'LBL_FAQ_INFORMATION' => '常见问答信息', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + + 'LBL_ACCOUNT' => '客户:', + 'LBL_ACCOUNT_NAME' => '客户名称:', + 'LBL_PHONE' => '电话:', + 'LBL_WEBSITE' => '网站:', + 'LBL_FAX' => '传真:', + 'LBL_TICKER_SYMBOL' => '股票代码:', + 'LBL_OTHER_PHONE' => '其它电话:', + 'LBL_ANY_PHONE' => '其它电话:', + 'LBL_MEMBER_OF' => '上级单位:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMPLOYEES' => '员工数:', + 'LBL_OTHER_EMAIL_ADDRESS' => '其它Email:', + 'LBL_ANY_EMAIL' => '其它Email:', + 'LBL_OWNERSHIP' => '所有制:', + 'LBL_RATING' => '评价:', + 'LBL_INDUSTRY' => '行业:', + 'LBL_SIC_CODE' => '行业编码:', + 'LBL_TYPE' => '类型:', + 'LBL_ANNUAL_REVENUE' => '年营业额:', + 'LBL_ADDRESS_INFORMATION' => '地址信息', + 'LBL_ACCOUNT_INFORMATION' => '问答信息', + 'LBL_BILLING_ADDRESS' => '付款地址:', + 'LBL_SHIPPING_ADDRESS' => '收货地址:', + 'LBL_ANY_ADDRESS' => '其它地址:', + 'LBL_CITY' => '城市:', + 'LBL_STATE' => '省份:', + 'LBL_POSTAL_CODE' => '邮政编码:', + 'LBL_COUNTRY' => '国家:', + 'LBL_DESCRIPTION_INFORMATION' => '描述信息', + 'LBL_DESCRIPTION' => '描述:', + 'NTC_COPY_BILLING_ADDRESS' => '复制付款地址到收货地址', + 'NTC_COPY_SHIPPING_ADDRESS' => '复制收货地址到付款地址', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => '您确定要删除这条记录吗?', + 'LBL_DUPLICATE' => '可能有重复的问答', + 'MSG_DUPLICATE' => '复制可能与现有的数据重复。您可以从常见问答列表中选择您要的客户资料以复制新增客户。', + + 'LBL_INVITEE' => '联系人', + 'ERR_DELETE_RECORD' => '在删除客户前必须输入正确的记录编号.', + + 'LBL_SELECT_ACCOUNT' => '选择问答', + 'LBL_GENERAL_INFORMATION' => '一般信息', + +//for v4 release added +'LBL_NEW_POTENTIAL' => '新增销售机会', + 'LBL_POTENTIAL_TITLE' => '销售机会', + +'LBL_NEW_TASK' => '新增任务', + 'LBL_TASK_TITLE' => '任务', + 'LBL_NEW_CALL' => '新增电话', + 'LBL_CALL_TITLE' => '电话', + 'LBL_NEW_MEETING' => '新增会议', + 'LBL_MEETING_TITLE' => '会议', + 'LBL_NEW_EMAIL' => '撰写新邮件', + 'LBL_EMAIL_TITLE' => '电子邮件', + 'LBL_NEW_CONTACT' => '新增联系人', + 'LBL_CONTACT_TITLE' => '联系人', + +//Added for 4GA Release +'Category' => '类别', + 'Related To' => '关联于', + 'Question' => '问题', + 'Answer' => '回答', + 'Comments' => '添加备注', +'LBL_COMMENTS'=>'添加备注',//give the same value given to the above string 'Comments' + 'Created Time' => '发表时间', + 'Modified Time' => '修改时间', + +//Added vtiger_fields after 4.2 alpha +'LBL_TICKETS' => '故障单', + 'LBL_FAQ' => '常见问答', + 'Product Name' => '产品名称', + 'FAQ Id' => '常见问答编号', + 'Add Comment' => '添加备注', +'LBL_ADD_COMMENT'=>'添加备注',//give the same value given to the above string 'Add Comment' +'LBL_COMMENT_INFORMATION'=>'备注信息', +'Status'=>'状态', + +//Added on 10-12-2005 +'LBL_QUESTION'=>'问题', +'LBL_CATEGORY'=>'类别', +'LBL_MY_FAQ'=>'我的最近常见问题', + +//Added for existing Picklist Entries + + 'General' => '一般', + +'Draft' => '草案', +'Reviewed' => '已审批', +'Published' => '已发布', +'Obsolete' => '过期', + +// Module Sequence Numbering +'Faq No' => '问题编号', + +// END +); + +?> diff --git a/modules/Faq/updateRelations.php b/modules/Faq/updateRelations.php new file mode 100644 index 0000000..e3b8c29 --- /dev/null +++ b/modules/Faq/updateRelations.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/modules/FieldFormulas/FieldFormulas.js b/modules/FieldFormulas/FieldFormulas.js new file mode 100644 index 0000000..fa3b1af --- /dev/null +++ b/modules/FieldFormulas/FieldFormulas.js @@ -0,0 +1,8 @@ +/*+******************************************************************************* + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ******************************************************************************/ \ No newline at end of file diff --git a/modules/FieldFormulas/FieldFormulas.php b/modules/FieldFormulas/FieldFormulas.php new file mode 100644 index 0000000..921b17b --- /dev/null +++ b/modules/FieldFormulas/FieldFormulas.php @@ -0,0 +1,62 @@ +getUniqueID('vtiger_settings_field'); + $blockid = getSettingsBlockId('LBL_MODULE_MANAGER'); + + $seq_res = $adb->query("SELECT max(sequence) AS max_seq FROM vtiger_settings_field"); + $seq = 1; + if ($adb->num_rows($seq_res) > 0) { + $cur_seq = $adb->query_result($seq_res, 0, 'max_seq'); + if ($cur_seq != null) $seq = $cur_seq + 1; + } + + $adb->pquery('INSERT INTO vtiger_settings_field(fieldid, blockid, name, iconpath, description, linkto, sequence) + VALUES (?,?,?,?,?,?,?)', array($fieldid, $blockid, 'LBL_FIELDFORMULAS', 'modules/FieldFormulas/resources/FieldFormulas.png', 'LBL_FIELDFORMULAS_DESCRIPTION', 'index.php?module=FieldFormulas&action=index&parenttab=Settings', $seq)); + + $tabid = getTabid('FieldFormulas'); + if(isset($tabid) && $tabid!='') { + $adb->pquery('DELETE FROM vtiger_profile2tab WHERE tabid = ?', array($tabid)); + } + + // Mark the module as Standard module + $adb->pquery('UPDATE vtiger_tab SET customized=0 WHERE name=?', array($moduleName)); + + } else if($eventType == 'module.disabled') { + $em = new VTEventsManager($adb); + $em->setHandlerInActive('VTFieldFormulasEventHandler'); + + } else if($eventType == 'module.enabled') { + $em = new VTEventsManager($adb); + $em->setHandlerActive('VTFieldFormulasEventHandler'); + + } else if($eventType == 'module.preuninstall') { + // TODO Handle actions when this module is about to be deleted. + } else if($eventType == 'module.preupdate') { + // TODO Handle actions before this module is updated. + } else if($eventType == 'module.postupdate') { + // TODO Handle actions after this module is updated. + } + } +} +?> \ No newline at end of file diff --git a/modules/FieldFormulas/FieldFormulasAjax.php b/modules/FieldFormulas/FieldFormulasAjax.php new file mode 100644 index 0000000..8cd39c4 --- /dev/null +++ b/modules/FieldFormulas/FieldFormulasAjax.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/FieldFormulas/VTFieldFormulasEventHandler.inc b/modules/FieldFormulas/VTFieldFormulasEventHandler.inc new file mode 100644 index 0000000..1416099 --- /dev/null +++ b/modules/FieldFormulas/VTFieldFormulasEventHandler.inc @@ -0,0 +1,20 @@ +getModuleName(); + $mem = new VTModuleExpressionsManager($adb); + $me = $mem->retrieve($moduleName); + $me->update($data); + } +} +?> \ No newline at end of file diff --git a/modules/FieldFormulas/VTModuleExpressionsManager.inc b/modules/FieldFormulas/VTModuleExpressionsManager.inc new file mode 100644 index 0000000..43f788e --- /dev/null +++ b/modules/FieldFormulas/VTModuleExpressionsManager.inc @@ -0,0 +1,179 @@ +adb = $adb; + } + + /** Caching logic **/ + private static $cache = array(); + static function addToCache($key, $value) { + self::$cache[$key] = $value; + } + static function fromCache($key) { + if(isset(self::$cache[$key])) return self::$cache[$key]; + return false; + } + static function clearCache() { + self::$cache = array(); + } + /** END **/ + + function retrieve($moduleName){ + $adb = $this->adb; + + // Look at cache if we have the information + $cachedinfo = self::fromCache($moduleName); + if($cachedinfo === false) { + + $result = $adb->pquery('select * from vtiger_fieldformulas where modulename=?', array($moduleName)); + if($adb->num_rows($result)==0){ + self::addToCache($moduleName, array() ); + }else{ + $ee = unserialize(decode_html($adb->query_result($result, 0, "expression_engine"))); + $id = $adb->query_result($result, 0, "expressionid"); + self::addToCache($moduleName, array('expressionid'=>$id, 'expression_engine'=>$ee)); + } + // Retrieve information from cache for consistency + $cachedinfo = self::fromCache($moduleName); + } + + $me = new VTModuleExpressions($moduleName, new VTExpressionEngine()); + if(!empty($cachedinfo)) { + $me = new VTModuleExpressions($moduleName, $cachedinfo['expression_engine']); + $me->id = $cachedinfo['expressionid']; + } + return $me; + + } + + function save($moduleExpressions){ + $adb = $this->adb; + if(isset($moduleExpressions->id)){ + $adb->pquery('update vtiger_fieldformulas set expression_engine=? where expressionid=?', + array(serialize($moduleExpressions->expressionEngine), $moduleExpressions->id)); + }else{ + $id = $adb->getUniqueId('vtiger_fieldformulas'); + $adb->pquery('insert into vtiger_fieldformulas + (expressionid, modulename, expression_engine) values(?,?,?)', + array($id, $moduleExpressions->moduleName, + serialize($moduleExpressions->expressionEngine))); + $moduleExpressions->id = $id; + } + // Invalidate cache information + self::clearCache(); + } + + + function expressionFields($moduleName){ + global $current_user; + $result = vtws_describe($moduleName, $current_user); + $fields = $result['fields']; + $arr = array(); + foreach($fields as $field){ + //Use the field name to figure out the custom field + if(preg_match('/cf_\d+/', $field['name']) && + in_array($field['type']['name'], array('text', 'string','integer', 'double'))){ + $arr[$field['name']] = getTranslatedString($field['label'], $moduleName); + } + } + return $arr; + } + + function fields($moduleName){ + global $current_user; + $result = vtws_describe($moduleName, $current_user); + $fields = $result['fields']; + $arr = array(); + foreach($fields as $field){ + $arr[$field['name']] = $field['label']; + } + return $arr; + } + + function expressionFunctions(){ + return array('concat' => 'concat(a,b)', 'time_diffdays' => 'time_diffdays(a,b)', 'time_diff' => 'time_diff(a,b)'); + } + + private function fieldNames($query, $moduleName){ + $adb = $this->adb; + $result = $adb->pquery($query, array($moduleName)); + $it = new SqlResultIterator($adb, $result); + $arr = array(); + foreach($it as $row){ + $arr[$row->fieldname]=$row->fieldlabel; + } + return $arr; + } + + function expressionsForModule($moduleName){ + return $this->retrieve($moduleName)->asArray(); + } +} + +class VTModuleExpressions{ + function __construct($moduleName, $expressionEngine){ + $this->moduleName=$moduleName; + $this->expressionEngine=$expressionEngine; + } + + function add($fieldName, $expression){ + try{ + $this->expressionEngine->loadExpressions(array($fieldName=>$expression)); + $this->state='savable'; + }catch(VTExpressionException $e){ + $this->state='error'; + $this->message=$e->getMessage(); + } + } + + function remove($fieldName){ + $this->expressionEngine->removeExpression($fieldName); + } + + function asArray(){ + return $this->expressionEngine->unparsedExpressions; + } + + function parseExpression($expr){ + $parser = new VTParser(new SpaceFilter(new VTTokenizer($expr))); + return $parser->expression(); + } + + function update($entity){ + $bound = $this->expressionEngine->evaluate($entity->getData()); + foreach($bound as $field => $value){ + $entity->set($field, $value); + } + } + + function getFieldsFromExpr($expr){ + function __getFieldsFromExpr($expr, &$arr){ + switch(get_class($expr)){ + case 'VTTreeNode': + $params = $expr->getParams(); + foreach($params as $param){ + __vtGetFieldsFromExpr($param, $arr); + } + return; + case 'Symbol': + $arr[$expr->value] = $expr; + return; + default: + return; + } + } + __vtGetFieldsFromExpr($expr, $arr); + return array_keys($arr); + } +} + +?> \ No newline at end of file diff --git a/modules/FieldFormulas/deleteexpressionjson.php b/modules/FieldFormulas/deleteexpressionjson.php new file mode 100644 index 0000000..96ca366 --- /dev/null +++ b/modules/FieldFormulas/deleteexpressionjson.php @@ -0,0 +1,23 @@ +retrieve($moduleName); + $me->remove($fieldName); + $mem->save($me); + echo Zend_Json::encode(array('status'=>'success')); +} + +vtDeleteExpressionJson($adb, $_GET); +?> \ No newline at end of file diff --git a/modules/FieldFormulas/editexpressions.php b/modules/FieldFormulas/editexpressions.php new file mode 100644 index 0000000..4c7783e --- /dev/null +++ b/modules/FieldFormulas/editexpressions.php @@ -0,0 +1,80 @@ +assign('APP', $appStrings); + + $mod = array_merge( + return_module_language($current_language,'FieldFormulas'), + return_module_language($current_language,'Settings')); + + $jsStrings = array( + 'NEED_TO_ADD_A'=>$mod['NEED_TO_ADD_A'], + 'CUSTOM_FIELD' =>$mod['LBL_CUSTOM_FIELD'], + 'LBL_USE_FUNCTION_DASHDASH'=>$mod['LBL_USE_FUNCTION_DASHDASH'], + 'LBL_USE_FIELD_VALUE_DASHDASH'=>$mod['LBL_USE_FIELD_VALUE_DASHDASH'], + 'LBL_DELETE_EXPRESSION_CONFIRM'=>$mod['LBL_DELETE_EXPRESSION_CONFIRM'] + ); + $smarty->assign("JS_STRINGS", Zend_Json::encode($jsStrings)); + + $smarty->assign("MOD", $mod); + $smarty->assign("THEME",$theme); + $smarty->assign("IMAGE_PATH",$image_path); + $smarty->assign("MODULE_NAME", 'FieldFormulas'); + $smarty->assign("PAGE_NAME", 'LBL_FIELDFORMULAS'); + $smarty->assign("PAGE_TITLE", 'LBL_FIELDFORMULAS'); + $smarty->assign("PAGE_DESC", 'LBL_FIELDFORMULAS_DESCRIPTION'); + $smarty->assign("FORMODULE", $formodule); + + if(file_exists("modules/$formodule/$formodule.php")) { + $focus = CRMEntity::getInstance($formodule); + $validationArray = split_validationdataArray(getDBValidationData($focus->tab_name, getTabid($formodule))); + $smarty->assign('VALIDATION_DATA_FIELDNAME',$validationArray['fieldname']); + $smarty->assign('VALIDATION_DATA_FIELDDATATYPE',$validationArray['datatype']); + $smarty->assign('VALIDATION_DATA_FIELDLABEL',$validationArray['fieldlabel']); + } + + $smarty->display(vtlib_getModuleTemplate('FieldFormulas', 'EditExpressions.tpl')); +} + +$modules = vtGetModules($adb); +if(vtlib_isModuleActive('FieldFormulas') && in_array(getTranslatedString($_REQUEST['formodule']),$modules)) { + vtEditExpressions($adb, $app_strings, $current_language, $theme, $_REQUEST['formodule']); +} else { + echo "
"; + echo "
+ + + + + + + + + +
".$app_strings['LBL_PERMISSION']."
+ $app_strings[LBL_BACK]
+
"; + echo "
";die; +} + +?> \ No newline at end of file diff --git a/modules/FieldFormulas/expression_engine/VTExpressionEngine.inc b/modules/FieldFormulas/expression_engine/VTExpressionEngine.inc new file mode 100644 index 0000000..725f3ca --- /dev/null +++ b/modules/FieldFormulas/expression_engine/VTExpressionEngine.inc @@ -0,0 +1,174 @@ +expr = new VTExpressionEvaluater($expr); + $this->env = $env; + } + + function get(){ + if(!isset($this->val)){ + $this->val = $this->expr->evaluate($this->env); + } + return $this->val; + } +} + +class VTExpressionEngineEnv implements VTEnv{ + function __construct($data){ + $this->data = $data; + $this->vars = array(); + } + + function bind($name, $expr){ + $this->vars[$name] = new VTThunk($this, $expr); + } + + function get($var){ + if(array_key_exists($var, $this->vars)){ + return $this->vars[$var]->get(); + }else{ + return $this->data[$var]; + } + } +} + +class VTExpressionEngine{ + function __construct(){ + $this->data = array(); + $this->expressions = array(); + $this->unparsedExpressions = array(); + $this->vars = array(); + } + + + /** + * Load dynamic fields and their expressions + * + */ + function loadExpressions($arr){ + $this->unparsedExpressions = array_merge($this->unparsedExpressions, $arr); + $this->expressions = array_merge($this->expressions, array_map(array($this, 'expression'), $arr)); + $this->regenerate(); + } + + function removeExpression($fieldName){ + unset($this->unparsedExpressions[$fieldName]); + unset($this->expressions[$fieldName]); + $this->regenerate(); + } + + private function regenerate(){ + $this->vars = array_keys($this->expressions); + + $dyn_vars = array(); + foreach($this->expressions as $var => $expr){ + $syms = array_keys($this->getSyms($expr)); + $dyn_vars[$var] = $syms; + } + + $independents = array_keys(array_filter($dyn_vars, array($this, 'isEmpty'))); + $arr = array(); + foreach($dyn_vars as $var => $parents){ + foreach($parents as $parent){ + $arr[$parent][$var] = $var; + } + } + $dependents = array_map('array_keys', $arr); + $this->independents = $independents; + $this->dependents = $dependents; + $this->checkForCycles(); + } + + + /** + * Evaluate the expressions using the data in the array + * provided. + * + * @param $data An array of bound variables containing the + * the variable name as the key and the value as data. + * @return An array containing the variables bound to the expressions + * and their values. + */ + function evaluate($data){ + $env = new VTExpressionEngineEnv($data); + foreach($this->expressions as $var=>$expr){ + $env->bind($var, $expr); + } + + $out = array(); + foreach($this->vars as $var){ + $out[$var] = $env->get($var); + } + return $out; + } + + private function checkForCycles(){ + foreach($this->independents as $independent){ + $this->testCall($independent, array(), sizeof($this->dependents)); + } + } + + private function testCall($cur, $stack, $n){ + if($n<0){ + throw new VTExpressionException('There appears to be a loop in ('.implode(", ", $stack).')'); + } + $dependents = $this->dependents; + if(array_key_exists($cur, $dependents)){ + foreach($dependents[$cur] as $var){ + $this->testCall($var, array_merge($stack, array($cur)), $n-1); + } + } + } + + private function getSyms($expr){ + if($expr instanceof VTTreeNode){ + $params = $expr->getParams(); + if(sizeof($params)!=0){ + $sym_arr = array_map(array($this, "getSyms"), $params); + if(sizeof($sym_arr)>1){ + $syms = call_user_func_array('array_merge', $sym_arr); + + }else{ + $syms = $sym_arr[0]; + } + }else{ + $syms = array(); + } + return $syms; + }else if($expr instanceof Symbol && in_array($expr->value, $this->vars)){ + return array($expr->value=>$expr); + }else{ + return array(); + } + } + + private function loadExpression($var, $expr){ + $this->expressions[$var] = $value; + } + + private function parse($str){ + $parser = new VTParser(new SpaceFilter(new VTTokenizer($str))); + return $parser->expression(); + } + + private function isEmpty($arr){ + return sizeof($arr)!=0; + } + + private function expression($str){ + $parser = new VTParser(new SpaceFilter(new VTTokenizer($str))); + return $parser->expression(); + } +} +?> \ No newline at end of file diff --git a/modules/FieldFormulas/expression_engine/VTExpressionEvaluater.inc b/modules/FieldFormulas/expression_engine/VTExpressionEvaluater.inc new file mode 100644 index 0000000..e604bf1 --- /dev/null +++ b/modules/FieldFormulas/expression_engine/VTExpressionEvaluater.inc @@ -0,0 +1,158 @@ += $arr[1]; +} + +function _vt_lt($arr) { + return $arr[0] < $arr[1]; +} + +function _vt_gt($arr) { + return $arr[0] > $arr[1]; +} + +function _vt_concat($arr){ + return implode($arr); +} +/* Date difference between (input times) or (current time and input time) + * + * @param Array $a $a[0] - Input time1, $a[1] - Input time2 + * (if $a[1] is not available $a[0] = Current Time, $a[1] = Input time1) + * @return int difference timestamp + */ + +function _vt_time_diff($arr) { + + $time_operand1 = $time_operand2 = 0; + if(count($arr) > 1) { + $time_operand1 = $arr[0]; + $time_operand2 = $arr[1]; + } else { + $time_operand1 = date('Y-m-d H:i:s'); // Current time + $time_operand2 = $arr[0]; + } + + if(empty($time_operand1) || empty($time_operand2)) return 0; + + $time_operand1 = getValidDBInsertDateValue($time_operand1); + $time_operand2 = getValidDBInsertDateValue($time_operand2); + + return (strtotime($time_operand1) - strtotime($time_operand2)); +} +/** + * Calculate the time difference (input times) or (current time and input time) and + * convert it into number of days. + * @param Array $a $a[0] - Input time1, $a[1] - Input time2 + * (if $a[1] is not available $a[0] = Current Time, $a[1] = Input time1) + * @return int number of days + */ +function _vt_time_diffdays($arr) { + $timediff = _vt_time_diff($arr); + $days_diff = floor($timediff / (60 * 60 * 24)); + return $days_diff; +} + + +/** END **/ +class VTExpressionEvaluater{ + function __construct($expr){ + + $this->operators = array( + '+' => '_vt_add', + '-' => '_vt_sub', + '*' => '_vt_mul', + '/' => '_vt_div', + '==' => '_vt_equals', + '<=' => '_vt_ltequals', + '>=' => '_vt_gtequals', + '<' => '_vt_lt', + '>' => '_vt_gt', + ); + $this->functions = array( + 'concat'=>'_vt_concat', + 'time_diff' => '_vt_time_diff', + 'time_diffdays' => '_vt_time_diffdays' + ); + + $this->operations = array_merge($this->functions, $this->operators); + $this->expr = $expr; + + } + + function evaluate($env){ + $this->env = $env; + return $this->exec($this->expr); + } + + function exec($expr){ + if($expr instanceof Symbol){ + return $this->env($expr); + }else if($expr instanceof VTTreeNode){ + $op = $expr->getName(); + if($op->value=='if'){ + $params = $expr->getParams(); + $cond = $this->exec($params[0]); + if($cond){ + return $this->exec($params[1]); + }else{ + return $this->exec($params[2]); + } + }else{ + $params = array_map(array($this, 'exec'), $expr->getParams()); + $func = $this->operations[$op->value]; + return $func($params); + } + }else{ + return $expr; + } + } + + function env($sym){ + return $this->env->get($sym->value); + } +} +?> \ No newline at end of file diff --git a/modules/FieldFormulas/expression_engine/VTParser.inc b/modules/FieldFormulas/expression_engine/VTParser.inc new file mode 100644 index 0000000..ee507e5 --- /dev/null +++ b/modules/FieldFormulas/expression_engine/VTParser.inc @@ -0,0 +1,184 @@ +arr = $arr; + } + + function getParams(){ + $arr = $this->arr; + return array_slice($arr, 1, sizeof($arr)-1); + } + + function getName(){ + return $this->arr[0]; + } +} + + +class Symbol{ + function __construct($value){ + $this->value = $value; + } + + function __toString(){ + return "Symbol({$this->value})"; + } +} + +class VTParser{ + function __construct($tokens){ + $this->tokens = $tokens; + $this->tokenQueue = array(); + } + + function nextToken(){ + if(sizeof($this->tokenQueue)==0){ + return $this->tokens->nextToken(); + }else{ + return array_shift($this->tokenQueue); + } + } + + function la($n = 1){ + for($i=sizeof($this->tokenQueue); $i<$n; $i++){ + $token = $this->tokens->nextToken(); + $this->tokenQueue[] = $token; + } + return $this->tokenQueue[$n-1]; + } + + function consume($label, $value){ + $token=$this->nextToken(); + if($token->label!=$label || $token->value!=$value){ + echo "Was expecting a $label of value $value got a {$token->label} of {$token->value} instead."; + throw new Exception("Was expecting a $label of value $value got a {$token->label} of {$token->value} instead."); + } + } + + function consumeSymbol($sym){ + $this->consume('SYMBOL', new Symbol($sym)); + } + + + function check($token, $label, $value){ + return $token->label == $label && $token->value==$value; + } + + function checkSymbol($token, $sym){ + return $this->check($token, 'SYMBOL', new Symbol($sym)); + } + + function atom(){ + $token = $this->nextToken(); + switch($token->label){ + case "STRING": + return $token->value; + case "INTEGER": + return $token->value; + case "FLOAT": + return $token->value; + case "SYMBOL": + return $token->value; + case "OPEN_BRACKET": + $val = $this->expression(); + $close = $this->nextToken(); + if($close->label != 'CLOSE_BRACKET'){ + throw new Exception("Was expecting a close bracket"); + } + return $val; + default: + print_r($token); + throw new Exception(); + } + } + + function ifCondition(){ + $this->consumeSymbol('if'); + $cond = $this->expression(); + $this->consumeSymbol('then'); + $ifTrue = $this->expression(); + $this->consumeSymbol('else'); + if($this->checkSymbol($this->la(), 'if')){ + $ifFalse = $this->ifCondition(); + }else{ + $ifFalse = $this->expression(); + $this->consumeSymbol('end'); + } + return new VTTreeNode(array(new Symbol('if'), $cond, $ifTrue, $ifFalse)); + } + + function expression(){ + $la1 = $this->la(1); + $la2 = $this->la(2); + if($this->checkSymbol($la1, 'if')){ + return $this->ifCondition(); + }else if($la1->label=='SYMBOL' && $la2->label=='OPEN_BRACKET'){ + $arr = array($this->nextToken()->value); + $this->nextToken(); + if($this->la()->label != 'CLOSE_BRACKET'){ + $arr[] = $this->expression(); + $comma = $this->nextToken(); + while($comma->label == 'COMMA'){ + $arr[] = $this->expression(); + $comma = $this->nextToken(); + } + if($comma->label != 'CLOSE_BRACKET'){ + throw new Exception("Was expecting a closing bracket"); + } + }else{ + $this->consume('CLOSE_BRACKET', new Symbol(')')); + } + return new VTTreeNode($arr); + }else{ + return $this->binOp(); + } + } + + var $precedence = array( + array('*', '/'), + array('+', '-'), + array('and', 'or'), + array('==', '>=', '<=', '>', '<') + ); + + function binOp(){ + return $this->binOpPrec(sizeof($this->precedence)-1); + } + + private function binOpPrec($prec){ + if($prec>=0){ + $lhs = $this->binOpPrec($prec-1); + $la = $this->la(); + if($la->label == 'OPERATOR' && in_array($la->value->value, $this->precedence[$prec])){ + $operator = $this->nextToken()->value; + $rhs = $this->binOpPrec($prec); + return new VTTreeNode(array($operator, $lhs, $rhs)); + }else{ + return $lhs; + } + }else{ + return $this->unaryOp(); + } + } + + function unaryOp(){ + $la = $this->la(); + if($la->label=="OPERATOR" && in_array($la->value->value, array('+', '-'))){ + $token = $this->nextToken(); + $operator = $la->value; + $operand = $this->unaryOp(); + return new VTTreeNode(array($operator, $operand)); + }else{ + return $this->atom(); + } + } +} +?> \ No newline at end of file diff --git a/modules/FieldFormulas/expression_engine/VTTokenizer.inc b/modules/FieldFormulas/expression_engine/VTTokenizer.inc new file mode 100644 index 0000000..351a6cf --- /dev/null +++ b/modules/FieldFormulas/expression_engine/VTTokenizer.inc @@ -0,0 +1,91 @@ +label = $label; + } +} + +function _processtoken_id($token){ + return $token; +} + +function _processtoken_symbol($token){ + return new Symbol($token); +} + +class VTTokenizer{ + function __construct($expr){ + $tokenTypes = array( + "SPACE" => array('\s+', '_processtoken_id'), + "SYMBOL" => array('[a-zA-Z][\w]*', '_processtoken_symbol'), + "ESCAPED_SYMBOL" => array('?:`([^`]+)`', '_processtoken_symbol'), + "STRING" => array('?:"((?:\\\\"|[^"])+)"', 'stripcslashes'), + "FLOAT" => array('\d+[.]\d+', 'floatval'), + "INTEGER" => array('\d+', 'intval'), + 'OPERATOR' => array('[+]|[-]|[*]|>=|<=|[<]|[>]|==|\/', '_processtoken_symbol'), + // NOTE: Any new Operator added should be updated in VTParser.inc::$precedence and operation at VTExpressionEvaluater + 'OPEN_BRACKET' => array('[(]', '_processtoken_symbol'), + 'CLOSE_BRACKET' => array('[)]', '_processtoken_symbol'), + 'COMMA' => array('[,]', '_processtoken_symbol') + ); + $tokenReArr = array(); + $tokenNames = array(); + $this->tokenTypes = $tokenTypes; + + foreach($tokenTypes as $tokenName => $code){ + list($re, $processtoken) = $code; + $tokenReArr[] = '('.$re.')'; + $tokenNames[] = $tokenName; + } + $this->tokenNames = $tokenNames; + $tokenRe = '/'.implode('|', $tokenReArr).'/'; + $this->EOF = new VTToken("EOF"); + + $matches = array(); + preg_match_all($tokenRe, $expr, $matches, PREG_SET_ORDER); + $this->matches = $matches; + $this->idx = 0; + } + function nextToken(){ + $matches = $this->matches; + $idx = $this->idx; + if($idx == sizeof($matches)){ + return $this->EOF; + }else{ + $match = $matches[$idx]; + $this->idx = $idx + 1; + $i=1; + while($match[$i]==null){ + $i+=1; + } + $tokenName = $this->tokenNames[$i-1]; + $token = new VTToken($tokenName); + $token->value = $this->tokenTypes[$tokenName][1]($match[$i]); + return $token; + } + } +} + +class SpaceFilter{ + function __construct($tokens){ + $this->tokens = $tokens; + } + + function nextToken(){ + do{ + $token = $this->tokens->nextToken(); + }while($token->label == "SPACE"); + return $token; + } +} + + +?> \ No newline at end of file diff --git a/modules/FieldFormulas/expression_engine/include.inc b/modules/FieldFormulas/expression_engine/include.inc new file mode 100644 index 0000000..74f2a94 --- /dev/null +++ b/modules/FieldFormulas/expression_engine/include.inc @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/modules/FieldFormulas/getexpressionlistjson.php b/modules/FieldFormulas/getexpressionlistjson.php new file mode 100644 index 0000000..031e37d --- /dev/null +++ b/modules/FieldFormulas/getexpressionlistjson.php @@ -0,0 +1,19 @@ +expressionsForModule($moduleName); + echo Zend_Json::encode($arr); +} +vtGetExpressionListJson($adb, $_GET); +?> \ No newline at end of file diff --git a/modules/FieldFormulas/getfieldsjson.php b/modules/FieldFormulas/getfieldsjson.php new file mode 100644 index 0000000..4444f31 --- /dev/null +++ b/modules/FieldFormulas/getfieldsjson.php @@ -0,0 +1,24 @@ +expressionFields($moduleName); + $fields = $mem->fields($moduleName); + echo Zend_Json::encode(array('exprFields'=>$expressionFields, 'moduleFields'=>$fields)); +} +vtJsonFields($adb, $_REQUEST); +?> \ No newline at end of file diff --git a/modules/FieldFormulas/getfunctionsjson.php b/modules/FieldFormulas/getfunctionsjson.php new file mode 100644 index 0000000..a60dffb --- /dev/null +++ b/modules/FieldFormulas/getfunctionsjson.php @@ -0,0 +1,19 @@ +expressionFunctions(); + echo Zend_Json::encode($functions); +} +vtJsonFields($adb, $_REQUEST); +?> \ No newline at end of file diff --git a/modules/FieldFormulas/include.inc b/modules/FieldFormulas/include.inc new file mode 100644 index 0000000..cc08d07 --- /dev/null +++ b/modules/FieldFormulas/include.inc @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/FieldFormulas/index.php b/modules/FieldFormulas/index.php new file mode 100644 index 0000000..42f4cab --- /dev/null +++ b/modules/FieldFormulas/index.php @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/modules/FieldFormulas/language/de_de.lang.php b/modules/FieldFormulas/language/de_de.lang.php new file mode 100644 index 0000000..62b6aa1 --- /dev/null +++ b/modules/FieldFormulas/language/de_de.lang.php @@ -0,0 +1,32 @@ + 'Feldberechnungen', +'LBL_FIELDFORMULAS' => 'Feldberechnungen', +'LBL_FIELDFORMULAS_DESCRIPTION' => 'Gleichungen zu benutzerdefinierten Feldern hinzufügen', +'LBL_FIELDS' => 'Felder', +'LBL_FUNCTIONS' => 'Funktionen', +'LBL_FIELD' => 'Feld', +'LBL_EXPRESSION' => 'Ausdruck', +'LBL_SETTINGS' => 'Einstellungen', +'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'neuer Feldausdruck', +'LBL_EDIT_EXPRESSION' => 'Ausdruck bearbeiten', +'LBL_MODULE_INFO' => 'Formel definiert für ', +'NEED_TO_ADD_A' =>'Sie müssen eine Zeichenfolge oder ganze Zahl hinzufügen ', +'LBL_CUSTOM_FIELD' =>'benutzerdefiniertes Feld', +'LBL_CHECKING'=>'Prüfe...', +'LBL_SELECT_ONE_DOTDOTDOT'=>'Eins auswählen...', +'LBL_TARGET_FIELD'=>'Zielfeld', +'LBL_DELETE_EXPRESSION_CONFIRM'=>'Wollen Sie diesen Ausdruck wirklich löschen?', +'LBL_EXAMPLES'=>'Beispiele', +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- benutze Feldwert --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- benutze Funktion --', +); + +?> \ No newline at end of file diff --git a/modules/FieldFormulas/language/en_gb.lang.php b/modules/FieldFormulas/language/en_gb.lang.php new file mode 100644 index 0000000..35ccc92 --- /dev/null +++ b/modules/FieldFormulas/language/en_gb.lang.php @@ -0,0 +1,33 @@ + 'Field Formulas', + 'LBL_FIELDFORMULAS' => 'Field Formulas', + 'LBL_FIELDFORMULAS_DESCRIPTION' => 'Add custom equations to custom fields', + 'LBL_FIELDS' => 'Fields', + 'LBL_FUNCTIONS' => 'Functions', + 'LBL_FIELD' => 'Field', + 'LBL_EXPRESSION' => 'Expression', + 'LBL_SETTINGS' => 'Settings', + 'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'New Field Expression', + 'LBL_EDIT_EXPRESSION' => 'Edit Expression', + 'LBL_MODULE_INFO' => 'Forumlas defined for ', + 'NEED_TO_ADD_A' => 'You need to add a string or integer type ', + 'LBL_CUSTOM_FIELD' => 'Custom field', + 'LBL_CHECKING' => 'Checking...', + 'LBL_SELECT_ONE_DOTDOTDOT' => 'Select one...', + 'LBL_TARGET_FIELD' => 'Target field', + 'LBL_DELETE_EXPRESSION_CONFIRM' => 'Are you sure you want to delete the expression?', + 'LBL_EXAMPLES' => 'Examples', + 'LBL_USE_FIELD_VALUE_DASHDASH' => '-- Use Field Value --', + 'LBL_USE_FUNCTION_DASHDASH' => '-- Use Function --' +); +?> \ No newline at end of file diff --git a/modules/FieldFormulas/language/en_us.lang.php b/modules/FieldFormulas/language/en_us.lang.php new file mode 100644 index 0000000..55efd16 --- /dev/null +++ b/modules/FieldFormulas/language/en_us.lang.php @@ -0,0 +1,33 @@ + 'Field Formulas', +'LBL_FIELDFORMULAS' => 'Field Formulas', +'LBL_FIELDFORMULAS_DESCRIPTION' => 'Add custom equations to custom fields', +'LBL_FIELDS' => 'Fields', +'LBL_FUNCTIONS' => 'Functions', +'LBL_FIELD' => 'Field', +'LBL_EXPRESSION' => 'Expression', +'LBL_SETTINGS' => 'Settings', +'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'New Field Expression', +'LBL_EDIT_EXPRESSION' => 'Edit Expression', +'LBL_MODULE_INFO' => 'Forumlas defined for ', +'NEED_TO_ADD_A' =>'You need to add a string or integer type ', +'LBL_CUSTOM_FIELD' =>'Custom field', +'LBL_CHECKING'=>'Checking...', +'LBL_SELECT_ONE_DOTDOTDOT'=>'Select One...', +'LBL_TARGET_FIELD'=>'Target Field', +'LBL_DELETE_EXPRESSION_CONFIRM'=>'Are you sure to delete the expression?', +'LBL_EXAMPLES'=>'Examples', +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Use Field Value --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Use Function --', +); + +?> \ No newline at end of file diff --git a/modules/FieldFormulas/language/es_es.lang.php b/modules/FieldFormulas/language/es_es.lang.php new file mode 100644 index 0000000..f83f771 --- /dev/null +++ b/modules/FieldFormulas/language/es_es.lang.php @@ -0,0 +1,30 @@ + 'Campos calculados', +'LBL_FIELDFORMULAS'=>'Campos calculados', +'LBL_FIELDFORMULAS_DESCRIPTION'=>'Añadir ecuaciones a campos personalizados', +'LBL_FIELDS' => 'Campos', +'LBL_FUNCTIONS'=>'Funciones', +'LBL_FIELD' => 'Campo', +'LBL_EXPRESSION'=>'Expresión', +'LBL_SETTINGS' => 'Configuración', +'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'Nueva Expresión de Campo', +'LBL_EDIT_EXPRESSION' => 'Editar Expresión', +'LBL_MODULE_INFO' => 'Fórmulas definidas para', +'NEED_TO_ADD_A' =>'Tienes que añadir un tipo cadena o entero ', +'LBL_CUSTOM_FIELD' =>'Campo personalizado', +'LBL_CHECKING'=>'Comprobando...', +'LBL_SELECT_ONE_DOTDOTDOT'=>'Selecciona Uno...', +'LBL_TARGET_FIELD'=>'Campo objetivo', +'LBL_DELETE_EXPRESSION_CONFIRM'=>'¿Seguro que quieres eliminar esta expresión?', +'LBL_EXAMPLES'=>'Ejemplos', +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Utilizar Valor de Campo --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Utilizar Función --', + +); + +?> diff --git a/modules/FieldFormulas/language/es_mx.lang.php b/modules/FieldFormulas/language/es_mx.lang.php new file mode 100644 index 0000000..73497da --- /dev/null +++ b/modules/FieldFormulas/language/es_mx.lang.php @@ -0,0 +1,32 @@ + 'Campos calculados', +'LBL_FIELDFORMULAS'=>'Campos calculados', +'LBL_FIELDFORMULAS_DESCRIPTION'=>'Agregar ecuaciones a campos personalizados', +'LBL_FIELDS' => 'Campos', +'LBL_FUNCTIONS'=>'Funciones', +'LBL_FIELD' => 'Campo', +'LBL_EXPRESSION'=>'Expresión', +'LBL_SETTINGS' => 'Configuración', +'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'Nueva Expresión de Campo', +'LBL_EDIT_EXPRESSION' => 'Editar Expresión', +'LBL_MODULE_INFO' => 'Fórmulas definidas para', +'NEED_TO_ADD_A' =>'Tienes que agregar un tipo cadena o entero ', +'LBL_CUSTOM_FIELD' =>'Campo personalizado', +'LBL_CHECKING'=>'Comprobando...', +'LBL_SELECT_ONE_DOTDOTDOT'=>'Selecciona Uno...', +'LBL_TARGET_FIELD'=>'Campo objetivo', +'LBL_DELETE_EXPRESSION_CONFIRM'=>'¿Seguro que quieres eliminar esta expresión?', +'LBL_EXAMPLES'=>'Ejemplos', +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Utilizar Valor de Campo --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Utilizar Función --', + +); + +?> diff --git a/modules/FieldFormulas/language/fr_fr.lang.php b/modules/FieldFormulas/language/fr_fr.lang.php new file mode 100644 index 0000000..4a7fe65 --- /dev/null +++ b/modules/FieldFormulas/language/fr_fr.lang.php @@ -0,0 +1,32 @@ + 'Champs', + 'LBL_FIELDFORMULAS' => 'Champs calculés', + 'LBL_FIELDFORMULAS_DESCRIPTION' => 'Ajoutez une formule calculée au champ', + 'LBL_FIELDS' => 'Champs', + 'LBL_FUNCTIONS' => 'Fonctions', + 'LBL_FIELD' => 'Champ', + 'LBL_EXPRESSION' => 'Expression', + 'LBL_SETTINGS' => 'Réglages', + 'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'Nouvelle expression de champs', + 'LBL_EDIT_EXPRESSION' => 'Editer Expression', + 'LBL_MODULE_INFO' => 'Champs avec calcul dans ', + 'NEED_TO_ADD_A' =>'Vous devez ajouter une chaine ou un entier ', + 'LBL_CUSTOM_FIELD' =>'Choix des champs', + 'LBL_CHECKING'=>'Vérification...', + 'LBL_SELECT_ONE_DOTDOTDOT'=>'Choisir un(e)...', + 'LBL_TARGET_FIELD'=>'Champ cible', + 'LBL_DELETE_EXPRESSION_CONFIRM'=>'Etes-vous sûr de vouloir supprimer?', + 'LBL_EXAMPLES'=>'Exemples', + 'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Utiliser la valeur --', + 'LBL_USE_FUNCTION_DASHDASH'=>'-- Utiliser la fonction --', +); +?> \ No newline at end of file diff --git a/modules/FieldFormulas/language/hu_hu.lang.php b/modules/FieldFormulas/language/hu_hu.lang.php new file mode 100644 index 0000000..e3e7f59 --- /dev/null +++ b/modules/FieldFormulas/language/hu_hu.lang.php @@ -0,0 +1,38 @@ + 'Mező Képletek', + 'LBL_FIELDFORMULAS' => 'Mező Képletek', + 'LBL_FIELDFORMULAS_DESCRIPTION' => 'Egyedi egyenletek hozzáadása az egyedi mezőkhöz', + 'LBL_FIELDS' => 'Mezők', + 'LBL_FUNCTIONS' => 'Függvények', + 'LBL_FIELD' => 'Mező', + 'LBL_EXPRESSION' => 'Kifejezés', + 'LBL_SETTINGS' => 'Beállítások', + 'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'Új Mező Kifejezés', + 'LBL_EDIT_EXPRESSION' => 'Kifejezés szerkesztése', + 'LBL_MODULE_INFO' => 'Képlet meghatározások számára ', + 'NEED_TO_ADD_A' => 'Egy sztring vagy egész (integer) típust kell hozzáadnod ', + 'LBL_CUSTOM_FIELD' => 'Egyedi Mező', + 'LBL_CHECKING' => 'Ellenőrzés...', + 'LBL_SELECT_ONE_DOTDOTDOT' => 'Válassz egyet...', + 'LBL_TARGET_FIELD' => 'Cél Mező', + 'LBL_DELETE_EXPRESSION_CONFIRM' => 'Biztosan törölni akarod a kifejezést?', + 'LBL_EXAMPLES' => 'Példák', + 'LBL_USE_FIELD_VALUE_DASHDASH' => '-- Használd a mező értéket --', + 'LBL_USE_FUNCTION_DASHDASH' => '-- Használd a függvényt --' +); +?> \ No newline at end of file diff --git a/modules/FieldFormulas/language/nl_nl.lang.php b/modules/FieldFormulas/language/nl_nl.lang.php new file mode 100644 index 0000000..ed618a5 --- /dev/null +++ b/modules/FieldFormulas/language/nl_nl.lang.php @@ -0,0 +1,57 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.2 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/FieldFormulas/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array ( +'FieldFormulas' => 'Veld formules', +'LBL_FIELDFORMULAS' => 'Veld formules', +'LBL_FIELDFORMULAS_DESCRIPTION' => 'Definieer een formule voor een eigen veld', +'LBL_FIELDS' => 'Velden', +'LBL_FUNCTIONS' => 'Functies', +'LBL_FIELD' => 'Veld', +'LBL_EXPRESSION' => 'Bewerking', +'LBL_SETTINGS' => 'Instellingen', +'LBL_NEW_FIELD_EXPRESSION_BUTTON' => 'Nieuwe Bewerking', +'LBL_EDIT_EXPRESSION' => 'Wijzig bewerking', +'LBL_MODULE_INFO' => 'Formule ingesteld voor ', +'NEED_TO_ADD_A' =>'U moet een tekst of een getal opgeven ', +'LBL_CUSTOM_FIELD' =>'Eigen Veld', +'LBL_CHECKING'=>'Controle...', +'LBL_SELECT_ONE_DOTDOTDOT'=>'Selecteer Een..', +'LBL_TARGET_FIELD'=>'Doel Veld', +'LBL_DELETE_EXPRESSION_CONFIRM'=>'Wilt u echt de bewerking verwijderen ?', +'LBL_EXAMPLES'=>'Voorbeelden', +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Gebruik Veld Waarde --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Gebruik Functie --', +); + +?> \ No newline at end of file diff --git a/modules/FieldFormulas/resources/FieldFormulas.png b/modules/FieldFormulas/resources/FieldFormulas.png new file mode 100644 index 0000000..d1ebb5a Binary files /dev/null and b/modules/FieldFormulas/resources/FieldFormulas.png differ diff --git a/modules/FieldFormulas/resources/editexpressionscript.js b/modules/FieldFormulas/resources/editexpressionscript.js new file mode 100644 index 0000000..ecbca48 --- /dev/null +++ b/modules/FieldFormulas/resources/editexpressionscript.js @@ -0,0 +1,320 @@ +/*+******************************************************************************* + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ******************************************************************************/ +jQuery.noConflict(); +function editexpressionscript($){ + function errorDialog(message){ + alert(message); + } + + function handleError(fn){ + return function(status, result){ + if(status){ + fn(result); + }else{ + errorDialog('Failure:'+result); + } + }; + } + + + var ep;//ep is defined in the document.ready block. + + function errorDialog(message){ + alert(message); + } + + + function jsonget(operation, params, callback){ + var obj = { + module:'FieldFormulas', + action:'FieldFormulasAjax', + file:operation, ajax:'true'}; + $.each(params,function(key, value){ + obj[key] = value; + }); + $.get('index.php', obj, + function(result){ + var parsed = JSON.parse(result); + callback(parsed); + }); + } + + function getfieldlabel(fieldname) { + var fieldlabel = false; + if(typeof(meta_fieldnames) != 'undefined' && typeof(meta_fieldlabels) != 'undefined') { + fieldlabel = meta_fieldlabels[meta_fieldnames.indexOf(fieldname)]; + } + if(!fieldlabel) fieldlabel = fieldname; + return fieldlabel; + } + + function addFieldExpression(moduleName, fieldName, fieldLabel, expression){ + editLink = format('Edit', fieldName); + deleteLink = format('Delete', fieldName); + row = format('
%s%s%s | %s
", "
" ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and + +EOQ; + +return $the_script; +} + +/** + * Create HTML form to enter a new record with the minimum necessary fields. + * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. + * All Rights Reserved. + * Contributor(s): ______________________________________.. + */ +function get_new_record_form () { + //TODO: To be implemented +} + +?> diff --git a/modules/Help/index.php b/modules/Help/index.php new file mode 100644 index 0000000..2d9e8bb --- /dev/null +++ b/modules/Help/index.php @@ -0,0 +1,22 @@ + +Sorry! The module has not yet been implemented. +

+Stay tuned for an upcoming release of vtigerCRM! diff --git a/modules/Help/language/de_de.lang.php b/modules/Help/language/de_de.lang.php new file mode 100644 index 0000000..3d05acc --- /dev/null +++ b/modules/Help/language/de_de.lang.php @@ -0,0 +1,25 @@ +'Organisationen', + 'LBL_MODULE_TITLE'=>'Organisationen: Home', + 'LBL_SEARCH_FORM_TITLE'=>'Organisationssuche', + 'LBL_LIST_FORM_TITLE'=>'Organisationsliste', + 'LBL_NEW_FORM_TITLE'=>'Neue Organisation', + 'ERR_DELETE_RECORD'=>"Wählen Sie einen Eintrag aus.", +); + +?> \ No newline at end of file diff --git a/modules/Help/language/en_gb.lang.php b/modules/Help/language/en_gb.lang.php new file mode 100644 index 0000000..f8faf0a --- /dev/null +++ b/modules/Help/language/en_gb.lang.php @@ -0,0 +1,19 @@ + 'Organisations', + 'LBL_MODULE_TITLE' => 'Organisation: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Organisation Search', + 'LBL_LIST_FORM_TITLE' => 'Organisation List', + 'LBL_NEW_FORM_TITLE' => 'New Organisation', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the Organisation' +); +?> \ No newline at end of file diff --git a/modules/Help/language/en_us.lang.php b/modules/Help/language/en_us.lang.php new file mode 100644 index 0000000..cca72a3 --- /dev/null +++ b/modules/Help/language/en_us.lang.php @@ -0,0 +1,29 @@ +'Organizations', +'LBL_MODULE_TITLE'=>'Organizations: Home', +'LBL_SEARCH_FORM_TITLE'=>'Organization Search', +'LBL_LIST_FORM_TITLE'=>'Organization List', +'LBL_NEW_FORM_TITLE'=>'New Organization', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the account.", +); + +?> diff --git a/modules/Help/language/es_es.lang.php b/modules/Help/language/es_es.lang.php new file mode 100644 index 0000000..c205840 --- /dev/null +++ b/modules/Help/language/es_es.lang.php @@ -0,0 +1,30 @@ +'Cuentas', +'LBL_MODULE_TITLE'=>'Cuentas: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Cuentas', +'LBL_LIST_FORM_TITLE'=>'Lista de Cuentas', +'LBL_NEW_FORM_TITLE'=>'Nueva Cuenta', +'ERR_DELETE_RECORD'=>"Debe especificar un registro para poder eliminar la cuenta.", +); + +?> diff --git a/modules/Help/language/es_mx.lang.php b/modules/Help/language/es_mx.lang.php new file mode 100644 index 0000000..2da7245 --- /dev/null +++ b/modules/Help/language/es_mx.lang.php @@ -0,0 +1,31 @@ +'Cuentas', +'LBL_MODULE_TITLE'=>'Cuentas: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Cuentas', +'LBL_LIST_FORM_TITLE'=>'Lista de Cuentas', +'LBL_NEW_FORM_TITLE'=>'Nueva Cuenta', +'ERR_DELETE_RECORD'=>"Debe especificar un registro para poder eliminar la cuenta.", +); + +?> diff --git a/modules/Help/language/fr_fr.lang.php b/modules/Help/language/fr_fr.lang.php new file mode 100644 index 0000000..367c39b --- /dev/null +++ b/modules/Help/language/fr_fr.lang.php @@ -0,0 +1,19 @@ + 'Comptes', + 'LBL_MODULE_TITLE' => 'Comptes : accueil', + 'LBL_SEARCH_FORM_TITLE' => 'Rechercher comptes', + 'LBL_LIST_FORM_TITLE' => 'Liste comptes', + 'LBL_NEW_FORM_TITLE' => 'Nouveau compte', + 'ERR_DELETE_RECORD' => 'Un numéro d\'enregistrement doit être spécifié pour supprimer ce compte.', +); + +?> diff --git a/modules/Help/language/hu_hu.lang.php b/modules/Help/language/hu_hu.lang.php new file mode 100644 index 0000000..8efc0db --- /dev/null +++ b/modules/Help/language/hu_hu.lang.php @@ -0,0 +1,25 @@ + 'Szervezetek', + 'LBL_MODULE_TITLE' => 'Szervezet: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Szervezet Keresés', + 'LBL_LIST_FORM_TITLE' => 'Szervezet Lista', + 'LBL_NEW_FORM_TITLE' => 'Új Szervezet', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a Cég törléséhez' +); +?> \ No newline at end of file diff --git a/modules/Help/language/nl_nl.lang.php b/modules/Help/language/nl_nl.lang.php new file mode 100644 index 0000000..73c6bf3 --- /dev/null +++ b/modules/Help/language/nl_nl.lang.php @@ -0,0 +1,43 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.2 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Help/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Account zoeken', +'LBL_LIST_FORM_TITLE'=>'Accountlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuw account', +'ERR_DELETE_RECORD'=>"Een veld moet geselecteerd zijn om het account te verwijderen.", +); + +?> diff --git a/modules/Help/language/pt_br.lang.php b/modules/Help/language/pt_br.lang.php new file mode 100644 index 0000000..9f2cc01 --- /dev/null +++ b/modules/Help/language/pt_br.lang.php @@ -0,0 +1,29 @@ +'Organizações', +'LBL_MODULE_TITLE'=>'Organizações: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Busca Organização', +'LBL_LIST_FORM_TITLE'=>'Lista Organização', +'LBL_NEW_FORM_TITLE'=>'Nova Organização', +'ERR_DELETE_RECORD'=>"Defina um número de registro para deletar a Organização.", +); + +?> diff --git a/modules/Help/language/zh_cn.lang.php b/modules/Help/language/zh_cn.lang.php new file mode 100644 index 0000000..f177845 --- /dev/null +++ b/modules/Help/language/zh_cn.lang.php @@ -0,0 +1,33 @@ + '客户', + 'LBL_MODULE_TITLE' => '客户: 首页', + 'LBL_SEARCH_FORM_TITLE' => '查找客户', + 'LBL_LIST_FORM_TITLE' => '客户列表', + 'LBL_NEW_FORM_TITLE' => '新增客户', + 'ERR_DELETE_RECORD' => '必须指定其记录编号才能删除客户。', +); + +?> diff --git a/modules/HelpDesk/CallRelatedList.php b/modules/HelpDesk/CallRelatedList.php new file mode 100644 index 0000000..07708a7 --- /dev/null +++ b/modules/HelpDesk/CallRelatedList.php @@ -0,0 +1,86 @@ +retrieve_entity_info($RECORD,$currentmodule); + $focus->id = $RECORD; + $focus->name=$focus->column_fields['ticket_title']; + $log->debug("id is ".$focus->id); + $log->debug("name is ".$focus->name); + } + + global $mod_strings; + global $app_strings; + global $currentModule; + global $theme; + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $smarty = new vtigerCRM_Smarty; + + if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; + } + if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') { + $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode'])); + } + if (isset($focus->name)) $smarty->assign("NAME", $focus->name); + $related_array=getRelatedLists($currentModule,$focus); + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + $relationId = vtlib_purify($_REQUEST['relation_id']); + RelatedListViewSession::addRelatedModuleToSession($relationId, + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); + $smarty->assign("RELATEDLISTS", $related_array); + $smarty->assign("CATEGORY",$category); + + // Module Sequence Numbering + $mod_seq_field = getModuleSequenceField($currentModule); + if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; + } else { + $mod_seq_id = $focus->id; + } + $smarty->assign('MOD_SEQ_ID', $mod_seq_id); + // END + + $smarty->assign("ID",$focus->id); + $smarty->assign("MODULE",$currentmodule); + $smarty->assign("SINGLE_MOD",$app_strings['Ticket']); + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $smarty->assign("MOD",$mod_strings); + $smarty->assign("APP",$app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); + $smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); + $check_button = Button_Check($module); + $smarty->assign("CHECK", $check_button); + + $smarty->display("RelatedLists.tpl"); +} +?> \ No newline at end of file diff --git a/modules/HelpDesk/ConvertAsFAQ.php b/modules/HelpDesk/ConvertAsFAQ.php new file mode 100644 index 0000000..4333ec4 --- /dev/null +++ b/modules/HelpDesk/ConvertAsFAQ.php @@ -0,0 +1,68 @@ + vtiger_faq column where ticket column is the troubletikcets vtiger_field name & vtiger_faq - column_fields +$ticket_faq_mapping_fields = Array( + 'title'=>'question', + 'product_id'=>'product_id', + 'description'=>'faq_answer', + //'ticketstatus'=>'faqstatus', + //'ticketcategories'=>'faqcategories' + ); +$sql = " select ticketid, title, product_id,vtiger_crmentity.description, solution,vtiger_troubletickets.status, category from vtiger_troubletickets inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_troubletickets.ticketid where ticketid=?"; +$res = $adb->pquery($sql, array($_REQUEST['record'])); + +//set all the ticket values to FAQ +foreach($ticket_faq_mapping_fields as $ticket_column => $faq_column) +{ + $focus->column_fields[$faq_column] = $adb->query_result($res,0,$ticket_column); +} + +$focus->save("Faq"); + +if($focus->id != '') +{ + $description = $adb->query_result($res,0,'description'); + $solution = $adb->query_result($res,0,'solution'); + + //Add the solution of the ticket with the FAQ answer + $answer = $description; + if($solution != '') + { + $answer .= "\r\n\r\n".$app_strings['LBL_SOLUTION'].":\r\n".$solution; + } + + //Retrive the ticket comments from the vtiger_ticketcomments vtiger_table and added into the vtiger_faq answer + $sql = "select ticketid, comments, createdtime from vtiger_ticketcomments where ticketid=?"; + $res = $adb->pquery($sql, array($_REQUEST['record'])); + $noofrows = $adb->num_rows($res); + + if($noofrows > 0) + $answer .= "\r\n\r\n".$app_strings['LBL_COMMENTS'].":"; + for($i=0; $i < $noofrows; $i++) + { + $comments = $adb->query_result($res,$i,'comments'); + if($comments != '') + { + $answer .= "\r\n".$comments; + } + } + + $sql1 = "update vtiger_faq set answer=? where id=?"; + $adb->pquery($sql1, array($answer, $focus->id)); +} + +header("Location:index.php?module=Faq&action=DetailView&record=$focus->id&return_module=Faq&return_action=DetailView&return_id=$focus->id"); + +?> diff --git a/modules/HelpDesk/ConvertToEntities.php b/modules/HelpDesk/ConvertToEntities.php new file mode 100644 index 0000000..804da17 --- /dev/null +++ b/modules/HelpDesk/ConvertToEntities.php @@ -0,0 +1,45 @@ +pquery($query, array()); +for($i=0;$ipquery('select * from vtiger_users where user_name=?', array($_REQUEST['assigned_user_id'])); + $changevalue=$adb->query_result($resultset,0,"id"); + $changekey='assigned_user_id'; + } + $sql="update vtiger_troubletickets set $changekey = ? where id = ?"; + $adb->pquery($sql, array($changevalue, $id)); +} +header("Location: index.php?action=index&module=HelpDesk"); + +?> \ No newline at end of file diff --git a/modules/HelpDesk/CustomView.php b/modules/HelpDesk/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/HelpDesk/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/HelpDesk/Delete.php b/modules/HelpDesk/Delete.php new file mode 100644 index 0000000..a177c2c --- /dev/null +++ b/modules/HelpDesk/Delete.php @@ -0,0 +1,41 @@ + \ No newline at end of file diff --git a/modules/HelpDesk/DetailView.php b/modules/HelpDesk/DetailView.php new file mode 100644 index 0000000..7d37900 --- /dev/null +++ b/modules/HelpDesk/DetailView.php @@ -0,0 +1,159 @@ +retrieve_entity_info($_REQUEST['record'],"HelpDesk"); + $focus->name=$focus->column_fields['ticket_title']; +} + +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') +{ + $focus->id = ""; +} + +//Added code for Error display in sending mail to assigned to user when ticket is created or updated. +if($_REQUEST['mail_error'] != '') +{ + require_once("modules/Emails/mail.php"); + $ticket_owner = getUserFullName($focus->column_fields['assigned_user_id']); + $error_msg = strip_tags(parseEmailErrorString($_REQUEST['mail_error'])); + $error_msg = $app_strings['LBL_MAIL_NOT_SENT_TO_USER']. ' ' . $ticket_owner. '. ' .$app_strings['LBL_PLS_CHECK_EMAIL_N_SERVER']; + echo $mod_strings['LBL_MAIL_SEND_STATUS'].' '.$error_msg.''; +} + +global $app_strings; +global $mod_strings; +global $currentModule, $singlepane_view; + +global $theme; +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$smarty = new vtigerCRM_Smarty; +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); + +$focus->id = $_REQUEST['record']; +if (isset($focus->name)) $smarty->assign("NAME", $focus->name); +else $smarty->assign("NAME", ""); +$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); +$smarty->assign("TICKETID", vtlib_purify($_REQUEST['record'])); + +$smarty->assign("CUSTOMFIELD", $cust_fld); +$smarty->assign("SINGLE_MOD", 'HelpDesk'); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); +$smarty->assign("UPDATEINFO",updateInfo($_REQUEST['record'])); + +if(isPermitted("HelpDesk","EditView",$_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + +if(isPermitted("HelpDesk","Delete",$_REQUEST['record']) == 'yes') + $smarty->assign("DELETE","permitted"); + +//Added button for Convert the ticket to FAQ +if(isPermitted("Faq","EditView",'') == 'yes') + $smarty->assign("CONVERTASFAQ","permitted"); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; +} else { + $mod_seq_id = $focus->id; +} +$smarty->assign('MOD_SEQ_ID', $mod_seq_id); +// END + +$smarty->assign("ID", vtlib_purify($_REQUEST['record'])); +if(isPermitted("HelpDesk","Merge",'') == 'yes') +{ + global $current_user; + require("user_privileges/user_privileges_".$current_user->id.".php"); + require_once('include/utils/UserInfoUtil.php'); + $wordTemplateResult = fetchWordTemplateList("HelpDesk"); + $tempCount = $adb->num_rows($wordTemplateResult); + $tempVal = $adb->fetch_array($wordTemplateResult); + for($templateCount=0;$templateCount<$tempCount;$templateCount++) + { + $optionString[$tempVal["templateid"]]=$tempVal["filename"]; + $tempVal = $adb->fetch_array($wordTemplateResult); + } + if($is_admin) + $smarty->assign("MERGEBUTTON","permitted"); + elseif($tempCount >0) + $smarty->assign("MERGEBUTTON","permitted"); + $smarty->assign("TEMPLATECOUNT",$tempCount); + $smarty->assign("WORDTEMPLATEOPTIONS",$app_strings['LBL_SELECT_TEMPLATE_TO_MAIL_MERGE']); + $smarty->assign("TOPTIONS",$optionString); +} + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +$tabid = getTabid("HelpDesk"); +$validationData = getDBValidationData($focus->tab_name,$tabid); +$data = split_validationdataArray($validationData); +$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); +$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); +$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); + +//Added to display the ticket comments information +$smarty->assign("COMMENT_BLOCK",$focus->getCommentInformation($_REQUEST['record'])); + +$smarty->assign("MODULE",$currentModule); +$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record'])); +$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule)); +$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); +$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); +if($singlepane_view == 'true') +{ + $related_array = getRelatedLists($currentModule,$focus); + $smarty->assign("RELATEDLISTS", $related_array); + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); +} + +if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){ + $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id); + VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id); +} +$smarty->assign("SinglePane_View", $singlepane_view); + +// Record Change Notification +$focus->markAsViewed($current_user->id); +// END + +// Gather the custom link information to display +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action'])); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params)); +// END + +$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true)); + +$smarty->display("DetailView.tpl"); + +?> \ No newline at end of file diff --git a/modules/HelpDesk/DetailViewAjax.php b/modules/HelpDesk/DetailViewAjax.php new file mode 100644 index 0000000..ad1b607 --- /dev/null +++ b/modules/HelpDesk/DetailViewAjax.php @@ -0,0 +1,66 @@ +retrieve_entity_info($crmid,"HelpDesk"); + + //Added to avoid the comment save, when we edit other fields through ajax edit + if($fieldname != 'comments') + $modObj->column_fields['comments'] = ''; + + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + + //Added to construct the update log for Ticket history + $assigned_group_name = getGroupName($_REQUEST['assigned_group_id']); + $assigntype = $_REQUEST['assigntype']; + + $fldvalue = $modObj->constructUpdateLog($modObj, $modObj->mode, $assigned_group_name, $assigntype); + $fldvalue = from_html($fldvalue,($modObj->mode == 'edit')?true:false); + + $modObj->save("HelpDesk"); + + //update the log information for ticket history + $adb->pquery("update vtiger_troubletickets set update_log=? where ticketid=?", array($fldvalue, $modObj->id)); + + if($modObj->id != ""){ + if($fieldname == "comments"){ + $comments = $modObj->getCommentInformation($modObj->id); + echo ":#:SUCCESS".$comments; + }else{ + echo ":#:SUCCESS"; + } + }else{ + echo ":#:FAILURE"; + } + }else{ + echo ":#:FAILURE"; + } +} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){ + require_once 'include/ListView/RelatedListViewContents.php'; +} +?> diff --git a/modules/HelpDesk/EditView.php b/modules/HelpDesk/EditView.php new file mode 100644 index 0000000..a042b55 --- /dev/null +++ b/modules/HelpDesk/EditView.php @@ -0,0 +1,28 @@ +mode == 'edit') { + $smarty->assign("OLDSMOWNERID", $focus->column_fields['assigned_user_id']); +} + +if(isset($_REQUEST['product_id'])) { + $smarty->assign("PRODUCTID", vtlib_purify($_REQUEST['product_id'])); +} + +if($_REQUEST['record'] != '') { + //Added to display the ticket comments information + $smarty->assign("COMMENT_BLOCK",$focus->getCommentInformation($_REQUEST['record'])); +} + + $smarty->display("salesEditView.tpl"); + +?> \ No newline at end of file diff --git a/modules/HelpDesk/ExportRecords.php b/modules/HelpDesk/ExportRecords.php new file mode 100644 index 0000000..1985867 --- /dev/null +++ b/modules/HelpDesk/ExportRecords.php @@ -0,0 +1,11 @@ + diff --git a/modules/HelpDesk/FindDuplicateRecords.php b/modules/HelpDesk/FindDuplicateRecords.php new file mode 100644 index 0000000..d226f45 --- /dev/null +++ b/modules/HelpDesk/FindDuplicateRecords.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/HelpDesk/HelpDesk.js b/modules/HelpDesk/HelpDesk.js new file mode 100644 index 0000000..c757a9d --- /dev/null +++ b/modules/HelpDesk/HelpDesk.js @@ -0,0 +1,80 @@ +/********************************************************************************* +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ + +document.write(" +pquery($sql, array($templateid)); +$temparray = $adb->fetch_array($result); + +$fileContent = $temparray['data']; +$filename=html_entity_decode($temparray['filename'], ENT_QUOTES, $default_charset); +// Fix For: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$filename= $randomfilename . "_word.doc"; + +$filesize=$temparray['filesize']; +$wordtemplatedownloadpath =$root_directory ."/test/wordtemplatedownload/"; + +$handle = fopen($wordtemplatedownloadpath .$filename,"wb"); +fwrite($handle,base64_decode($fileContent),$filesize); +fclose($handle); + +//<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>> +$mass_merge = $_REQUEST['allselectedboxes']; +$single_record = $_REQUEST['record']; + +if($mass_merge != "") +{ + $mass_merge = explode(";",$mass_merge); + $temp_mass_merge = $mass_merge; + if(array_pop($temp_mass_merge)=="") + array_pop($mass_merge); + //$mass_merge = implode(",",$mass_merge); +} +else if($single_record != "") +{ + $mass_merge = $single_record; +} +else +{ + die("Record Id is not found, cannot merge the document"); +} + +//<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>> + +global $current_user; +require('user_privileges/user_privileges_'.$current_user->id.'.php'); +if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || $module == "Users" || $module == "Emails") +{ + $query1="select vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid where vtiger_field.tabid in (13,4,6) and vtiger_field.uitype <> 61 and block <> 75 and block <> 30 and vtiger_field.presence in (0,2) order by vtiger_field.tablename"; + $params1 = array(); +} +else +{ + $profileList = getCurrentUserProfileList(); + $query1="select vtiger_tab.name,vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field inner join vtiger_tab on vtiger_tab.tabid = vtiger_field.tabid INNER JOIN vtiger_profile2field ON vtiger_profile2field.fieldid=vtiger_field.fieldid INNER JOIN vtiger_def_org_field ON vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid in (13,4,6) and vtiger_field.uitype <> 61 and block <> 75 and block <> 30 AND vtiger_profile2field.visible=0 AND vtiger_def_org_field.visible=0 AND vtiger_profile2field.profileid IN (". generateQuestionMarks($profileList) .") and vtiger_field.presence in (0,2) GROUP BY vtiger_field.fieldid order by vtiger_field.tablename"; + $params1 = array($profileList); + //Postgres 8 fixes + if( $adb->dbType == "pgsql") + $query1 = fixPostgresQuery( $query1, $log, 0); +} +$result = $adb->pquery($query1, $params1); +$y=$adb->num_rows($result); +$userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); +$contactUserNameSql = getSqlForNameInDisplayFormat(array('first_name'=>'usersContacts.first_name', 'last_name' => + 'usersContacts.last_name'), 'Users'); +$accountUserNameSql = getSqlForNameInDisplayFormat(array('first_name'=>'usersAccounts.first_name', 'last_name' => + 'usersAccounts.last_name'), 'Users'); + +for ($x=0; $x<$y; $x++) +{ + $tablename = $adb->query_result($result,$x,"tablename"); + $columnname = $adb->query_result($result,$x,"columnname"); + $modulename = $adb->query_result($result,$x,"name"); + + $column_name = $tablename.".".$columnname; + + if($columnname == "parent_id") + { + $column_name = "case crmentityRelHelpDesk.setype when 'Accounts' then accountRelHelpDesk.accountname when 'Contacts' then concat(contactdetailsRelHelpDesk.firstname,' ',contactdetailsRelHelpDesk.lastname) End"; + } + if($columnname == "product_id") + { + $column_name = "productsRel.productname"; + } + if($tablename == "vtiger_crmentity") + { + if($modulename == "Contacts") + { + $tablename = "crmentityContacts"; + $column_name = $tablename.".".$columnname; + } + if($modulename == "Accounts") + { + $tablename = "crmentityAccounts"; + $column_name = $tablename.".".$columnname; + } + + } + + if($columnname == "smownerid") + { + if($modulename == "Accounts") + { + $column_name = "case when (usersAccounts.user_name not like '') then $accountUserNameSql else groupsAccounts.groupname end as username"; + } + if($modulename == "Contacts") + { + $column_name = "case when (usersContacts.user_name not like '') then $contactUserNameSql else groupsContacts.groupname end as username"; + } + if($modulename == "HelpDesk") + { + $column_name = "case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as userhelpname,vtiger_users.first_name,vtiger_users.last_name,vtiger_users.user_name,vtiger_users.secondaryemail,vtiger_users.title,vtiger_users.phone_work,vtiger_users.department,vtiger_users.phone_mobile,vtiger_users.phone_other,vtiger_users.phone_fax,vtiger_users.email1,vtiger_users.phone_home,vtiger_users.email2,vtiger_users.address_street,vtiger_users.address_city,vtiger_users.address_state,vtiger_users.address_postalcode,vtiger_users.address_country"; + } + } + if($columnname == "parentid") + { + $column_name = "accountAccount.accountname"; + } + if($columnname == "accountid") + { + $column_name = "accountContacts.accountname"; + } + if($columnname == "reportsto") + { + $column_name = "contactdetailsContacts.lastname"; + } + + $querycolumns[$x] = $column_name; + + if($modulename == "Accounts") + { + $field_label[$x] = "ACCOUNT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + } + if($modulename == "Contacts") + { + $field_label[$x] = "CONTACT_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + } + if($modulename == "HelpDesk") + { + $field_label[$x] = "TICKET_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + if($columnname == "smownerid") + { + $field_label[$x] = $field_label[$x].",USER_FIRSTNAME,USER_LASTNAME,USER_USERNAME,USER_SECONDARYEMAIL,USER_TITLE,USER_OFFICEPHONE,USER_DEPARTMENT,USER_MOBILE,USER_OTHERPHONE,USER_FAX,USER_EMAIL,USER_HOMEPHONE,USER_OTHEREMAIL,USER_PRIMARYADDRESS,USER_CITY,USER_STATE,USER_POSTALCODE,USER_COUNTRY"; + } + } + +} +$csvheader = implode(",",$field_label); +//<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>> + +if(count($querycolumns) > 0) +{ + $selectcolumns = implode($querycolumns,","); + + $query ="select ".$selectcolumns." from vtiger_troubletickets + inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_troubletickets.ticketid + inner join vtiger_ticketcf on vtiger_ticketcf.ticketid = vtiger_troubletickets.ticketid + left join vtiger_crmentity as crmentityRelHelpDesk on crmentityRelHelpDesk.crmid = vtiger_troubletickets.parent_id + left join vtiger_account as accountRelHelpDesk on accountRelHelpDesk.accountid=crmentityRelHelpDesk.crmid + left join vtiger_contactdetails as contactdetailsRelHelpDesk on contactdetailsRelHelpDesk.contactid= crmentityRelHelpDesk.crmid + left join vtiger_products as productsRel on productsRel.productid = vtiger_troubletickets.product_id + left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + left join vtiger_account on vtiger_account.accountid = vtiger_troubletickets.parent_id + left join vtiger_crmentity as crmentityAccounts on crmentityAccounts.crmid = vtiger_account.accountid + left join vtiger_accountbillads on vtiger_accountbillads.accountaddressid = vtiger_account.accountid + left join vtiger_accountshipads on vtiger_accountshipads.accountaddressid = vtiger_account.accountid + left join vtiger_accountscf on vtiger_accountbillads.accountaddressid = vtiger_accountscf.accountid + left join vtiger_account as accountAccount on accountAccount.accountid = vtiger_troubletickets.parent_id + left join vtiger_users as usersAccounts on usersAccounts.id = crmentityAccounts.smownerid + LEFT JOIN vtiger_groups as groupsAccounts + ON groupsAccounts.groupid = vtiger_crmentity.smownerid + left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_troubletickets.parent_id + left join vtiger_crmentity as crmentityContacts on crmentityContacts.crmid = vtiger_contactdetails.contactid + left join vtiger_contactaddress on vtiger_contactdetails.contactid = vtiger_contactaddress.contactaddressid + left join vtiger_contactsubdetails on vtiger_contactdetails.contactid = vtiger_contactsubdetails.contactsubscriptionid + left join vtiger_contactscf on vtiger_contactdetails.contactid = vtiger_contactscf.contactid + left join vtiger_customerdetails on vtiger_contactdetails.contactid = vtiger_customerdetails.customerid + left join vtiger_contactdetails as contactdetailsContacts on contactdetailsContacts.contactid = vtiger_contactdetails.reportsto + left join vtiger_account as accountContacts on accountContacts.accountid = vtiger_contactdetails.accountid + left join vtiger_users as usersContacts on usersContacts.id = crmentityContacts.smownerid + LEFT JOIN vtiger_groups as groupsContacts + ON groupsContacts.groupid = vtiger_crmentity.smownerid + where vtiger_crmentity.deleted=0 and ((crmentityContacts.deleted=0 || crmentityContacts.deleted is null)||(crmentityAccounts.deleted=0 || crmentityAccounts.deleted is null)) + and vtiger_troubletickets.ticketid in (". generateQuestionMarks($mass_merge) .")"; + + $result = $adb->pquery($query, array($mass_merge)); + $avail_pick_arr = getAccessPickListValues('HelpDesk'); + while($columnValues = $adb->fetch_array($result)) + { + $y=$adb->num_fields($result); + for($x=0; $x<$y; $x++) + { + $value = $columnValues[$x]; + foreach($columnValues as $key=>$val) + { + if($val == $value && $value != '') + { + if(array_key_exists($key,$avail_pick_arr)) + { + if(!in_array($val,$avail_pick_arr[$key])) + { + $value = "Not Accessible"; + } + } + } + } + //<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>> + if(trim($value) == "--None--" || trim($value) == "--none--") + { + $value = ""; + } + //<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>> + $actual_values[$x] = $value; + $actual_values[$x] = str_replace('"'," ",$actual_values[$x]); + //if value contains any line feed or carriage return replace the value with ".value." + if (preg_match ("/(\r?\n)/", $actual_values[$x])) + { + $actual_values[$x] = '"'.$actual_values[$x].'"'; + } + $actual_values[$x] = decode_html(str_replace(","," ",$actual_values[$x])); + } + $mergevalue[] = implode($actual_values,","); + } + $csvdata = implode($mergevalue,"###"); +} +else +{ + die("No fields to do Merge"); +} +// Fix for: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$datafilename = $randomfilename . "_data.csv"; + +$handle = fopen($wordtemplatedownloadpath.$datafilename,"wb"); +fwrite($handle,$csvheader."\r\n"); +fwrite($handle,str_replace("###","\r\n",$csvdata)); +fclose($handle); + +?> + + + diff --git a/modules/HelpDesk/Popup.php b/modules/HelpDesk/Popup.php new file mode 100644 index 0000000..e2aaa7d --- /dev/null +++ b/modules/HelpDesk/Popup.php @@ -0,0 +1,12 @@ + diff --git a/modules/HelpDesk/ProcessDuplicates.php b/modules/HelpDesk/ProcessDuplicates.php new file mode 100644 index 0000000..bb5047f --- /dev/null +++ b/modules/HelpDesk/ProcessDuplicates.php @@ -0,0 +1,134 @@ +pquery("SELECT count(*) AS count FROM vtiger_crmentity WHERE crmid=? and deleted=0", array($merge_id)); + $count = $adb->query_result($result,0,'count'); + + if($count > 0) + { + // First, save the primary record + $focus->mode="edit"; + setObjectValuesFromRequest($focus); + $focus->save($module); + $rec_values=$focus->column_fields; + + // Remove the id of primary record from the list of records to be deleted. + $del_value=explode(",",$recordids,-1); + $offset = array_search($merge_id,$del_value); + unset($del_value[$offset]); + + // Transfer the related lists of the records to be deleted, to the primary record's related list + if(method_exists($focus, 'transferRelatedRecords')){ + $focus->transferRelatedRecords($module,$del_value,$merge_id); + } else { + transferRelatedRecords($module,$del_value,$merge_id); + } + + // Delete the records by id specified in the list + foreach($del_value as $value) + { + DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$value,""); + } + } + + ?> + +assign("EDIT_DUPLICATE",""); + if($record_count == 2) { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + else { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[2]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[2]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + + $all_values_array=getRecordValues($exploded_id,$module); + $all_values=$all_values_array[0]; + $js_arr_val=$all_values_array[1]; + $fld_array=$all_values_array[2]; + $js_arr=implode(",",$js_arr_val); + + $imported_records = Array(); + $sql="select bean_id from vtiger_users_last_import where bean_type=? and deleted=0"; + $result = $adb->pquery($sql, array($module)); + $num_rows=$adb->num_rows($result); + $count=0; + for($i=0; $i<$num_rows;$i++) + { + foreach($exploded_id as $value) + if($value == $adb->query_result($result,$i,"bean_id")) + $count++; + array_push($imported_records,$adb->query_result($result,$i,"bean_id")); + } + + if ($record_count == $count) + $no_existing=1; + else + $no_existing=0; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("RECORD_COUNT",$record_count); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("MODULENAME", $module); + $smarty->assign("PARENT_TAB", $parent_tab); + $smarty->assign("JS_ARRAY", $js_arr); + $smarty->assign("ID_ARRAY", $exploded_id); + $smarty->assign("IDSTRING",$idstring); + $smarty->assign("ALLVALUES", $all_values); + $smarty->assign("FIELD_ARRAY", $fld_array); + $smarty->assign("IMPORTED_RECORDS", $imported_records); + $smarty->assign("NO_EXISTING", $no_existing); + $smarty->display("MergeFields.tpl"); +} + +?> diff --git a/modules/HelpDesk/QuickCreate.php b/modules/HelpDesk/QuickCreate.php new file mode 100644 index 0000000..8d5998b --- /dev/null +++ b/modules/HelpDesk/QuickCreate.php @@ -0,0 +1,12 @@ + diff --git a/modules/HelpDesk/Save.php b/modules/HelpDesk/Save.php new file mode 100644 index 0000000..086fb43 --- /dev/null +++ b/modules/HelpDesk/Save.php @@ -0,0 +1,77 @@ +pquery("select * from vtiger_crmentity where crmid=?", array($focus->id)); + $old_user_id = $adb->query_result($usr_qry,0,"smownerid"); +} +$grp_name = getGroupName($_REQUEST['assigned_group_id']); + +if($_REQUEST['assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T'){ + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} + +$fldvalue = $focus->constructUpdateLog($focus, $mode, $grp_name, $_REQUEST['assigntype']); +$fldvalue = from_html($fldvalue,($mode == 'edit')?true:false); + +$focus->save("HelpDesk"); + +//After save the record, we should update the log +$adb->pquery("update vtiger_troubletickets set update_log=? where ticketid=?", array($fldvalue,$focus->id)); + +$return_id = $focus->id; + +$parenttab = getParentTab(); +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']); +else $return_module = "HelpDesk"; +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']); +else $return_action = "DetailView"; +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']); + +$_REQUEST['return_id'] = $return_id; + +if($_REQUEST['return_module'] == 'Products' & $_REQUEST['product_id'] != '' && $focus->id != '') + $return_id = vtlib_purify($_REQUEST['product_id']); + +//code added for returning back to the current view after edit from list view +if($_REQUEST['return_viewname'] == '') $return_viewname='0'; +if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']); +header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&$mail_error_status&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']).$search); +?> diff --git a/modules/HelpDesk/Settings.php b/modules/HelpDesk/Settings.php new file mode 100644 index 0000000..980dd07 --- /dev/null +++ b/modules/HelpDesk/Settings.php @@ -0,0 +1,13 @@ + diff --git a/modules/HelpDesk/TagCloud.php b/modules/HelpDesk/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/HelpDesk/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/HelpDesk/UnifiedSearch.php b/modules/HelpDesk/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/HelpDesk/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/HelpDesk/index.php b/modules/HelpDesk/index.php new file mode 100644 index 0000000..7209455 --- /dev/null +++ b/modules/HelpDesk/index.php @@ -0,0 +1,17 @@ + diff --git a/modules/HelpDesk/language/de_de.lang.php b/modules/HelpDesk/language/de_de.lang.php new file mode 100644 index 0000000..1e6aef5 --- /dev/null +++ b/modules/HelpDesk/language/de_de.lang.php @@ -0,0 +1,222 @@ +'Trouble Tickets', + 'LBL_GROUP'=>'Gruppe', + 'LBL_ACCOUNT_NAME'=>'Organisation', + 'LBL_CONTACT_NAME'=>'Person', + 'LBL_SUBJECT'=>'Betreff', + 'LBL_NEW_FORM_TITLE' => 'Neues Ticket', + 'LBL_DESCRIPTION'=>'Beschreibung', + 'NTC_DELETE_CONFIRMATION'=>'Möchten Sie diesen Eintrag löschen?', + 'LBL_CUSTOM_FIELD_SETTINGS'=>'Einstellungen Benutzerfelder:', + 'LBL_PICKLIST_FIELD_SETTINGS'=>'Einstellungen Auswahllisten:', + 'Leads'=>'Lead', + 'Accounts'=>'Organisationen', + 'Contacts'=>'Personen', + 'Opportunities'=>'Verkaufspotentiale', + 'LBL_CUSTOM_INFORMATION'=>'zusätzliche Information', + 'LBL_DESCRIPTION_INFORMATION'=>'Beschreibung', + + 'LBL_ACCOUNT'=>'Organisation', + 'LBL_OPPURTUNITY'=>'Verkaufspotential', + 'LBL_PRODUCT'=>'Produkt', + + 'LBL_COLON'=>':', + 'LBL_TICKET'=>'Ticket', + 'LBL_CONTACT'=>'Person', + 'LBL_STATUS'=>'Status', + 'LBL_ASSIGNED_TO'=>'zuständig ', + 'LBL_FAQ'=>'Wissensbasis', + 'LBL_VIEW_FAQS'=>'zeige Themen', + 'LBL_ADD_FAQS'=>'erstelle Themen', + 'LBL_FAQ_CATEGORIES'=>'Themen Kategorien', + + 'LBL_PRIORITY'=>'Priorität', + 'LBL_CATEGORY'=>'Kategorie', + + 'LBL_ANSWER'=>'Antwort', + 'LBL_COMMENTS'=>'Kommentar', + + 'LBL_AUTHOR'=>'Autor', + 'LBL_QUESTION'=>'Frage', + + //Added fields for File Attachment and Mail send in Tickets + 'LBL_ATTACHMENTS'=>'Anhang', + 'LBL_NEW_ATTACHMENT'=>'Neuer Anhang', + 'LBL_SEND_MAIL'=>'sende E-Mail', + + //Added fields for search option in TicketsList -- 4Beta + 'LBL_CREATED_DATE'=>'Erstelldatum', + 'LBL_IS'=>'ist', + 'LBL_IS_NOT'=>'ist nicht', + 'LBL_IS_BEFORE'=>'ist vor', + 'LBL_IS_AFTER'=>'ist nach', + 'LBL_STATISTICS'=>'Statistik', + 'LBL_TICKET_ID'=>'Ticketnummer', + 'LBL_MY_TICKETS'=>'Meine Tickets', + "LBL_MY_FAQ"=>"Meine Themen", + 'LBL_ESTIMATED_FINISHING_TIME'=>'erwartete Fertigstellung', + 'LBL_SELECT_TICKET'=>'Ticket wählen', + 'LBL_CHANGE_OWNER'=>'Besitzer wechseln', + 'LBL_CHANGE_STATUS'=>'Status wechseln', + 'LBL_TICKET_TITLE'=>'Titel', + 'LBL_TICKET_DESCRIPTION'=>'Beschreibung', + 'LBL_TICKET_CATEGORY'=>'Kategorie', + 'LBL_TICKET_PRIORITY'=>'Priorität', + + //Added fields after 4 -- Beta + 'LBL_NEW_TICKET'=>'Neues Ticket', + 'LBL_TICKET_INFORMATION'=>'Ticket', + + 'LBL_LIST_FORM_TITLE'=>'Tickets', + 'LBL_SEARCH_FORM_TITLE'=>'Ticket suchen', + + //Added fields after RC1 - Release + 'LBL_CHOOSE_A_VIEW'=>'Ansicht auswählen...', + 'LBL_ALL'=>'Alle', + 'LBL_LOW'=>'gering', + 'LBL_MEDIUM'=>'mittel', + 'LBL_HIGH'=>'hoch', + 'LBL_CRITICAL'=>'kritisch', + //Added fields for 4GA + 'Assigned To'=>'zuständig', + 'Contact Name'=>'Person', + 'Priority'=>'Priorität', + 'Status'=>'Status', + 'Category'=>'Kategorie', + 'Update History'=>'Verlauf aktualisieren', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Title'=>'Titel', + 'Description'=>'Beschreibung', + + 'LBL_TICKET_CUMULATIVE_STATISTICS'=>'Ticket-Statistik:', + 'LBL_CASE_TOPIC'=>'Vorfall', + 'LBL_OPEN'=>'offen', + 'LBL_CLOSED'=>'geschlossen', + 'LBL_TOTAL'=>'Total', + 'LBL_TICKET_HISTORY'=>'Ticketverlauf:', + 'LBL_CATEGORIES'=>'Kategorien', + 'LBL_PRIORITIES'=>'Prioritäten', + 'LBL_SUPPORTERS'=>'Supporter', + + //Added fields after 4_0_1 + 'LBL_TICKET_RESOLUTION'=>'Lösung', + 'Solution'=>'Lösung', + 'Add Comment'=>'Kommentar hinzufügen', + 'LBL_ADD_COMMENT'=>'Kommentar hinzufügen',//give the same value given to the above string 'Add Comment' + + //Added for 4.2 Release -- CustomView + 'Ticket ID'=>'Ticketnummer', + 'Subject'=>'Thema', + + //Added after 4.2 alpha + 'Severity'=>'Gewichtung', + 'Product Name'=>'Produktname', + 'Related To'=>'bezogen auf', + 'LBL_MORE'=>'mehr', + + 'LBL_TICKETS'=>'Tickets', + + //Added on 09-12-2005 + 'LBL_CUMULATIVE_STATISTICS'=>'Zusammenfassende Statistik', + + //Added on 12-12-2005 + 'LBL_CONVERT_AS_FAQ_BUTTON_TITLE'=>'zur Wissensbasis hinzufügen', + 'LBL_CONVERT_AS_FAQ_BUTTON_KEY'=>'C', + 'LBL_CONVERT_AS_FAQ_BUTTON_LABEL'=>'zur Wissensbasis hinzufügen', + 'Attachment'=>'Anhang', + 'LBL_COMMENT_INFORMATION'=>'Kommentare', + + //Added for existing picklist entries + + 'Big Problem'=>'grosses Problem', + 'Small Problem'=>'kleines Problem', + 'Other Problem'=>'anderes Problem', + + 'Low'=>'gering', + 'Normal'=>'normal', + 'High'=>'hoch', + 'Urgent'=>'dringend', + + 'Minor'=>'gering', + 'Major'=>'bedeutend', + 'Feature'=>'Eigenschaft', + 'Critical'=>'kritisch', + + 'Open'=>'offen', + 'In Progress'=>'in Bearbeitung', + 'Wait For Response'=>'warte auf Zuarbeit', + 'Closed'=>'geschlossen', + + //added to support i18n in ticket mails + 'Hi' => 'Hallo', + 'Dear'=> 'Hallo', + 'LBL_PORTAL_BODY_MAILINFO'=> 'Ein Ticket wurde', + 'LBL_DETAIL' => 'Hier sind die Details dazu :', + 'LBL_REGARDS'=> 'Danke', + 'LBL_TEAM'=> 'HelpDesk Team', + 'LBL_TICKET_DETAILS' => 'Ticket Details', + 'LBL_SUBJECT' => 'Betreff : ', + 'created' => 'erzeugt.', + 'replied' => 'beantwortet.', + 'reply'=>'Es gibt eine Antwort zu Ihrem Anliegen ', + 'customer_portal' => ' im Kundenportal des CRM Systems.', + 'link' => ' Loggen Sie sich in das Kundenportal ein und nutzen Sie den folgenden Link, um die Nachricht zu sehen:', + 'Thanks' => 'Danke', + 'Support_team' => 'Support Team', + 'The comments are' => 'Die Kommentare sind', + 'Ticket Title' => 'Ticket Titel', + 'Re' => 'Re :', + // Added/Updated for vtiger CRM 5.0.4 + + //this label for customerportal. + 'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. + 'LBL_STATUS_UPDATE' => 'Neuer Ticket Status: ', + 'LBL_COULDNOT_CLOSED' => 'Der nachfolgende Ticket Status konnte nicht gesetzt werden:', + 'LBL_CUSTOMER_COMMENTS' => 'Der Kunde hat die folgenden zusätzlichen Infomationen zu dem Ticket hinzugefügt:', + 'LBL_RESPOND'=> 'Bitte kümmern Sie sich darum.', + 'LBL_REGARDS' =>'Mit freundlichen Grüßen,', + 'LBL_SUPPORT_ADMIN' => 'Support Administrator', + 'LBL_RESPONDTO_TICKETID' =>'Antwort zum Ticket Nr.', + 'LBL_CUSTOMER_PORTAL' => ' im Kundenportal - Dringend!', + 'LBL_LOGIN_DETAILS' => 'Hier sind Ihre Login Daten für das Kundenportal: ', + 'LBL_MAIL_COULDNOT_SENT' =>'Die E-Mail konnte nicht gesendet werden.', + 'LBL_USERNAME' => 'Benutzername: ', + 'LBL_PASSWORD' => 'Passwort: ', + 'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Ihnen wurde der Zugang zum Kundenportal freigeschaltet', + 'LBL_GIVE_MAILID' => 'Bitte die E-Mail Adresse angeben', + 'LBL_CHECK_MAILID' => 'Bitte korrigieren Sie Ihre E-Mail Adresse', + 'LBL_LOGIN_REVOKED' => 'Sie haben keine Zugangsberechtigung mehr. Bitte kontaktieren Sie den Administrator.', + 'LBL_MAIL_SENT' => 'Eine E-Mail mit den Zugangsdaten wurde zu Ihnen gesendet.', + 'LBL_ALTBODY' => 'Das ist die Nachricht für Clients ohne HTML', + + // Added after 5.0.4 GA + + // Module Sequence Numbering + 'Ticket No' => 'interne Ticket Nr.', + // END + + 'Hours' => 'Stunden', + 'Days' => 'Tage', + + 'From Portal' => 'Von Kundenportal', + 'HelpDesk ID' => 'Trouble Ticket ID', +); + +?> \ No newline at end of file diff --git a/modules/HelpDesk/language/en_gb.lang.php b/modules/HelpDesk/language/en_gb.lang.php new file mode 100644 index 0000000..0f5fcf0 --- /dev/null +++ b/modules/HelpDesk/language/en_gb.lang.php @@ -0,0 +1,168 @@ + 'Trouble Tickets', + 'LBL_GROUP' => 'Group', + 'LBL_ACCOUNT_NAME' => 'Organisation Name', + 'LBL_CONTACT_NAME' => 'Contact Name', + 'LBL_SUBJECT' => 'Subject: ', + 'LBL_NEW_FORM_TITLE' => 'New Ticket', + 'LBL_DESCRIPTION' => 'Description', + 'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?', + 'LBL_CUSTOM_FIELD_SETTINGS' => 'Custom Field Settings:', + 'LBL_PICKLIST_FIELD_SETTINGS' => 'Picklist Field Settings:', + 'Leads' => 'Lead', + 'Accounts' => 'Organisation', + 'Contacts' => 'Contact', + 'Opportunities' => 'Opportunity', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', + 'LBL_ACCOUNT' => 'Organisation', + 'LBL_OPPURTUNITY' => 'Oppurtunity', + 'LBL_PRODUCT' => 'Product', + 'LBL_COLON' => ':', + 'LBL_TICKET' => 'Ticket', + 'LBL_CONTACT' => 'Contact', + 'LBL_STATUS' => 'Status', + 'LBL_ASSIGNED_TO' => 'Assigned To', + 'LBL_FAQ' => 'FAQ', + 'LBL_VIEW_FAQS' => 'View FAQs', + 'LBL_ADD_FAQS' => 'Add FAQs', + 'LBL_FAQ_CATEGORIES' => 'FAQ Categories', + 'LBL_PRIORITY' => 'Priority', + 'LBL_CATEGORY' => 'Category', + 'LBL_ANSWER' => 'Answer', + 'LBL_COMMENTS' => 'COMMENTS', + 'LBL_AUTHOR' => 'Author', + 'LBL_QUESTION' => 'Question', + 'LBL_ATTACHMENTS' => 'Attachments', + 'LBL_NEW_ATTACHMENT' => 'New Attachment', + 'LBL_SEND_MAIL' => 'Send Mail', + 'LBL_CREATED_DATE' => 'Created Date', + 'LBL_IS' => 'is', + 'LBL_IS_NOT' => 'is not', + 'LBL_IS_BEFORE' => 'is before', + 'LBL_IS_AFTER' => 'is after', + 'LBL_STATISTICS' => 'Statistics', + 'LBL_TICKET_ID' => 'Ticket Id', + 'LBL_MY_TICKETS' => 'My Tickets', + 'LBL_MY_FAQ' => 'My FAQs', + 'LBL_ESTIMATED_FINISHING_TIME' => 'Estimated Finishing Time', + 'LBL_SELECT_TICKET' => 'Select Ticket', + 'LBL_CHANGE_OWNER' => 'Change Owner', + 'LBL_CHANGE_STATUS' => 'Change Status', + 'LBL_TICKET_TITLE' => 'Title', + 'LBL_TICKET_DESCRIPTION' => 'Description', + 'LBL_TICKET_CATEGORY' => 'Category', + 'LBL_TICKET_PRIORITY' => 'Priority', + 'LBL_NEW_TICKET' => 'New Ticket', + 'LBL_TICKET_INFORMATION' => 'Ticket Information', + 'LBL_LIST_FORM_TITLE' => 'Tickets List', + 'LBL_SEARCH_FORM_TITLE' => 'Ticket Search', + 'LBL_CHOOSE_A_VIEW' => 'Choose a View...', + 'LBL_ALL' => 'All', + 'LBL_LOW' => 'Low', + 'LBL_MEDIUM' => 'Medium', + 'LBL_HIGH' => 'High', + 'LBL_CRITICAL' => 'Critical', + 'Assigned To' => 'Assigned To', + 'Contact Name' => 'Contact Name', + 'Priority' => 'Priority', + 'Status' => 'Status', + 'Category' => 'Category', + 'Update History' => 'Update History', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Title' => 'Title', + 'Description' => 'Description', + 'LBL_TICKET_CUMULATIVE_STATISTICS' => 'Ticket Cumulative Statistics:', + 'LBL_CASE_TOPIC' => 'Case Topic', + 'LBL_OPEN' => 'Open', + 'LBL_CLOSED' => 'Closed', + 'LBL_TOTAL' => 'Total', + 'LBL_TICKET_HISTORY' => 'Ticket History', + 'LBL_CATEGORIES' => 'Categories', + 'LBL_PRIORITIES' => 'Priorities', + 'LBL_SUPPORTERS' => 'Supporters', + 'LBL_TICKET_RESOLUTION' => 'Solution Information', + 'Solution' => 'Solution', + 'Add Comment' => 'Add Comment', + 'LBL_ADD_COMMENT' => 'Add Comment', + 'Ticket ID' => 'Ticket ID', + 'Subject' => 'Subject', + 'Severity' => 'Severity', + 'Product Name' => 'Product Name', + 'Related To' => 'Related To', + 'LBL_MORE' => 'More', + 'LBL_TICKETS' => 'Tickets', + 'LBL_CUMULATIVE_STATISTICS' => 'Cumulative Statistics', + 'LBL_CONVERT_AS_FAQ_BUTTON_TITLE' => 'Convert As FAQ', + 'LBL_CONVERT_AS_FAQ_BUTTON_KEY' => 'C', + 'LBL_CONVERT_AS_FAQ_BUTTON_LABEL' => 'Convert As FAQ', + 'Attachment' => 'Attachment', + 'LBL_COMMENT_INFORMATION' => 'Comment Information', + 'Big Problem' => 'Big Problem', + 'Small Problem' => 'Small Problem', + 'Other Problem' => 'Other Problem', + 'Low' => 'Low', + 'Normal' => 'Normal', + 'High' => 'High', + 'Urgent' => 'Urgent', + 'Minor' => 'Minor', + 'Major' => 'Major', + 'Feature' => 'Feature', + 'Critical' => 'Critical', + 'Open' => 'Open', + 'In Progress' => 'In Progress', + 'Wait For Response' => 'Wait For Response', + 'Closed' => 'Closed', + 'Hi' => 'Hi', + 'Dear' => 'Dear', + 'LBL_PORTAL_BODY_MAILINFO' => 'The Ticket is', + 'LBL_DETAIL' => 'the details are: ', + 'LBL_REGARDS' => 'Regards', + 'LBL_TEAM' => 'Help Desk Team', + 'LBL_TICKET_DETAILS' => 'Ticket Details', + 'created' => 'created', + 'replied' => 'replied', + 'reply' => 'There is a reply to', + 'customer_portal' => 'in the "Customer Portal" at vtiger.', + 'link' => 'You can use the following link to view the replies made: ', + 'Thanks' => 'Thanks', + 'Support_team' => 'vtiger Support Team', + 'The comments are' => 'The comments are', + 'Ticket Title' => 'Ticket Title', + 'Re' => 'Re :', + 'LBL_STATUS_CLOSED' => 'Closed', + 'LBL_STATUS_UPDATE' => 'Ticket status is updated as', + 'LBL_COULDNOT_CLOSED' => 'Ticket could not be', + 'LBL_CUSTOMER_COMMENTS' => 'Customer has provided the following additional information to your reply: ', + 'LBL_RESPOND' => 'Kindly respond to above ticket at the earliest.', + 'LBL_SUPPORT_ADMIN' => 'Support Administrator', + 'LBL_RESPONDTO_TICKETID' => 'Respond to Ticket ID', + 'LBL_CUSTOMER_PORTAL' => 'in Customer Portal - URGENT', + 'LBL_LOGIN_DETAILS' => 'Following are your Customer Portal login details: ', + 'LBL_MAIL_COULDNOT_SENT' => 'Mail could not be sent', + 'LBL_USERNAME' => 'User Name: ', + 'LBL_PASSWORD' => 'Password: ', + 'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Regarding your Customer Portal login details', + 'LBL_GIVE_MAILID' => 'Please give your email address', + 'LBL_CHECK_MAILID' => 'Please check your email address for the Customer Portal', + 'LBL_LOGIN_REVOKED' => 'Your login is revoked. Please contact your admin.', + 'LBL_MAIL_SENT' => 'Email has been sent to your email address with the Customer Portal login details', + 'LBL_ALTBODY' => 'This is the body in plain text for non-HTML mail clients', + 'Ticket No' => 'Ticket No.', + 'Hours' => 'Hours', + 'Days' => 'Days', + 'From Portal' => 'From Portal', + 'HelpDesk ID' => 'Trouble Tickets ID', +); +?> \ No newline at end of file diff --git a/modules/HelpDesk/language/en_us.lang.php b/modules/HelpDesk/language/en_us.lang.php new file mode 100644 index 0000000..b02642c --- /dev/null +++ b/modules/HelpDesk/language/en_us.lang.php @@ -0,0 +1,229 @@ +'Trouble Tickets', +'LBL_GROUP'=>'Group', +'LBL_ACCOUNT_NAME'=>'Organization Name', +'LBL_CONTACT_NAME'=>'Contact Name', +'LBL_SUBJECT'=>'Subject', +'LBL_NEW_FORM_TITLE' => 'New Ticket', +'LBL_DESCRIPTION'=>'Description', +'NTC_DELETE_CONFIRMATION'=>'Are you sure you want to delete this record?', +'LBL_CUSTOM_FIELD_SETTINGS'=>'Custom Field Settings:', +'LBL_PICKLIST_FIELD_SETTINGS'=>'Picklist Field Settings:', +'Leads'=>'Lead', +'Accounts'=>'Organization', +'Contacts'=>'Contact', +'Opportunities'=>'Opportunity', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', + +'LBL_ACCOUNT'=>'Organization', +'LBL_OPPURTUNITY'=>'Oppurtunity', +'LBL_PRODUCT'=>'Product', + +'LBL_COLON'=>':', +'LBL_TICKET'=>'Ticket', +'LBL_CONTACT'=>'Contact', +'LBL_STATUS'=>'Status', +'LBL_ASSIGNED_TO'=>'Assigned To', +'LBL_FAQ'=>'FAQ', +'LBL_VIEW_FAQS'=>'View FAQs', +'LBL_ADD_FAQS'=>'Add FAQs', +'LBL_FAQ_CATEGORIES'=>'FAQ Categories', + +'LBL_PRIORITY'=>'Priority', +'LBL_CATEGORY'=>'Category', + +'LBL_ANSWER'=>'Answer', +'LBL_COMMENTS'=>'COMMENTS', + +'LBL_AUTHOR'=>'Author', +'LBL_QUESTION'=>'Question', + +//Added vtiger_fields for File Attachment and Mail send in Tickets +'LBL_ATTACHMENTS'=>'Attachments', +'LBL_NEW_ATTACHMENT'=>'New Attachment', +'LBL_SEND_MAIL'=>'Send Mail', + +//Added vtiger_fields for search option in TicketsList -- 4Beta +'LBL_CREATED_DATE'=>'Created Date', +'LBL_IS'=>'is', +'LBL_IS_NOT'=>'is not', +'LBL_IS_BEFORE'=>'is before', +'LBL_IS_AFTER'=>'is after', +'LBL_STATISTICS'=>'Statistics', +'LBL_TICKET_ID'=>'Ticket Id', +'LBL_MY_TICKETS'=>'My Tickets', +"LBL_MY_FAQ"=>"My Faq's", +'LBL_ESTIMATED_FINISHING_TIME'=>'Estimated Finishing Time', +'LBL_SELECT_TICKET'=>'Select Ticket', +'LBL_CHANGE_OWNER'=>'Change Owner', +'LBL_CHANGE_STATUS'=>'Change Status', +'LBL_TICKET_TITLE'=>'Title', +'LBL_TICKET_DESCRIPTION'=>'Description', +'LBL_TICKET_CATEGORY'=>'Category', +'LBL_TICKET_PRIORITY'=>'Priority', + +//Added vtiger_fields after 4 -- Beta +'LBL_NEW_TICKET'=>'New Ticket', +'LBL_TICKET_INFORMATION'=>'Ticket Information', + +'LBL_LIST_FORM_TITLE'=>'Tickets List', +'LBL_SEARCH_FORM_TITLE'=>'Ticket Search', + +//Added vtiger_fields after RC1 - Release +'LBL_CHOOSE_A_VIEW'=>'Choose a View...', +'LBL_ALL'=>'All', +'LBL_LOW'=>'Low', +'LBL_MEDIUM'=>'Medium', +'LBL_HIGH'=>'High', +'LBL_CRITICAL'=>'Critical', +//Added vtiger_fields for 4GA +'Assigned To'=>'Assigned To', +'Contact Name'=>'Contact Name', +'Priority'=>'Priority', +'Status'=>'Status', +'Category'=>'Category', +'Update History'=>'Update History', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Title'=>'Title', +'Description'=>'Description', + +'LBL_TICKET_CUMULATIVE_STATISTICS'=>'Ticket Cumulative Statistics:', +'LBL_CASE_TOPIC'=>'Case Topic', +'LBL_OPEN'=>'Open', +'LBL_CLOSED'=>'Closed', +'LBL_TOTAL'=>'Total', +'LBL_TICKET_HISTORY'=>'Ticket History', +'LBL_CATEGORIES'=>'Categories', +'LBL_PRIORITIES'=>'Priorities', +'LBL_SUPPORTERS'=>'Supporters', + +//Added vtiger_fields after 4_0_1 +'LBL_TICKET_RESOLUTION'=>'Solution Information', +'Solution'=>'Solution', +'Add Comment'=>'Add Comment', +'LBL_ADD_COMMENT'=>'Add Comment',//give the same value given to the above string 'Add Comment' + +//Added for 4.2 Release -- CustomView +'Ticket ID'=>'Ticket ID', +'Subject'=>'Subject', + +//Added after 4.2 alpha +'Severity'=>'Severity', +'Product Name'=>'Product Name', +'Related To'=>'Related To', +'LBL_MORE'=>'More', + +'LBL_TICKETS'=>'Tickets', + +//Added on 09-12-2005 +'LBL_CUMULATIVE_STATISTICS'=>'Cumulative Statistics', + +//Added on 12-12-2005 +'LBL_CONVERT_AS_FAQ_BUTTON_TITLE'=>'Convert As FAQ', +'LBL_CONVERT_AS_FAQ_BUTTON_KEY'=>'C', +'LBL_CONVERT_AS_FAQ_BUTTON_LABEL'=>'Convert As FAQ', +'Attachment'=>'Attachment', +'LBL_COMMENT_INFORMATION'=>'Comment Information', + +//Added for existing picklist entries + +'Big Problem'=>'Big Problem', +'Small Problem'=>'Small Problem', +'Other Problem'=>'Other Problem', + +'Low'=>'Low', +'Normal'=>'Normal', +'High'=>'High', +'Urgent'=>'Urgent', + +'Minor'=>'Minor', +'Major'=>'Major', +'Feature'=>'Feature', +'Critical'=>'Critical', + +'Open'=>'Open', +'In Progress'=>'In Progress', +'Wait For Response'=>'Wait For Response', +'Closed'=>'Closed', + +//added to support i18n in ticket mails +'Hi' => 'Hi', +'Dear'=> 'Dear', +'LBL_PORTAL_BODY_MAILINFO'=> 'The Ticket is', +'LBL_DETAIL' => 'the details are :', +'LBL_REGARDS'=> 'Regards', +'LBL_TEAM'=> 'HelpDesk Team', +'LBL_TICKET_DETAILS' => 'Ticket Details', +'LBL_SUBJECT' => 'Subject : ', +'created' => 'created', +'replied' => 'replied', +'reply'=>'There is a reply to', +'customer_portal' => 'in the "Customer Portal" at VTiger.', +'link' => 'You can use the following link to view the replies made:', +'Thanks' => 'Thanks', +'Support_team' => 'Vtiger Support Team', +'The comments are' => 'The comments are', +'Ticket Title' => 'Ticket Title', +'Re' => 'Re :', +// Added/Updated for vtiger CRM 5.0.4 + +//this label for customerportal. +'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. +'LBL_STATUS_UPDATE' => 'Ticket status is updated as', +'LBL_COULDNOT_CLOSED' => 'Ticket could not be', +'LBL_CUSTOMER_COMMENTS' => 'Customer has provided the following additional information to your reply:', +'LBL_RESPOND'=> 'Kindly respond to above ticket at the earliest.', +'LBL_REGARDS' =>'Regards', +'LBL_SUPPORT_ADMIN' => 'Support Administrator', +'LBL_RESPONDTO_TICKETID' =>'Respond to Ticket ID', +'LBL_CUSTOMER_PORTAL' => 'in Customer Portal - URGENT', +'LBL_LOGIN_DETAILS' => 'Following are your Customer Portal login details :', +'LBL_MAIL_COULDNOT_SENT' =>'Mail could not be sent', +'LBL_USERNAME' => 'User Name :', +'LBL_PASSWORD' => 'Password :', +'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Regarding your Customer Portal login details', +'LBL_GIVE_MAILID' => 'Please give your email id', +'LBL_CHECK_MAILID' => 'Please check your email id for Customer Portal', +'LBL_LOGIN_REVOKED' => 'Your login is revoked. Please contact your admin.', +'LBL_MAIL_SENT' => 'Mail has been sent to your mail id with the customer portal login details', +'LBL_ALTBODY' => 'This is the body in plain text for non-HTML mail clients', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Ticket No' => 'Ticket No', +// END + +'Hours' => 'Hours', +'Days' => 'Days', + +'From Portal' => 'From Portal', +'HelpDesk ID' => 'Trouble Tickets ID', +); + +?> diff --git a/modules/HelpDesk/language/es_es.lang.php b/modules/HelpDesk/language/es_es.lang.php new file mode 100644 index 0000000..d078f5f --- /dev/null +++ b/modules/HelpDesk/language/es_es.lang.php @@ -0,0 +1,226 @@ + 'Incidencias', +'LBL_GROUP' => 'Grupo', +'LBL_ACCOUNT_NAME' => 'Nombre de Cuenta', +'LBL_CONTACT_NAME' => 'Nombre de Contacto', +'LBL_SUBJECT' => 'Asunto', +'LBL_NEW_FORM_TITLE' => 'Nuevo Parte', +'LBL_DESCRIPTION' => 'Descripción', +'NTC_DELETE_CONFIRMATION' => '¿Está seguro que desea eliminar este registro?', +'LBL_CUSTOM_FIELD_SETTINGS' => 'Configuración de campos personalizados:', +'LBL_PICKLIST_FIELD_SETTINGS' => 'Configuración de Campos de Lista:', +'Leads' => 'Pre-Contacto', +'Accounts' => 'Cuenta', +'Contacts' => 'Contacto', +'Opportunities' => 'Oportunidad', +'LBL_CUSTOM_INFORMATION' => 'Información personalizada', +'LBL_DESCRIPTION_INFORMATION' => 'Incidencia a Resolver', + +'LBL_ACCOUNT' => 'Cuenta', +'LBL_OPPURTUNITY' => 'Oportunidad', +'LBL_PRODUCT' => 'Producto', + +'LBL_COLON' => ':', +'LBL_TICKET' => 'Incidencia', +'LBL_CONTACT' => 'Contacto', +'LBL_STATUS' => 'Estado', +'LBL_ASSIGNED_TO' => 'Asignado a', +'LBL_FAQ' => 'FAQ', +'LBL_VIEW_FAQS' => 'Ver FAQs', +'LBL_ADD_FAQS' => 'Añadir FAQs', +'LBL_FAQ_CATEGORIES' => 'Categorías FAQs', + +'LBL_PRIORITY' => 'Prioridad', +'LBL_CATEGORY' => 'Categoría', + +'LBL_ANSWER' => 'Respuesta', +'LBL_COMMENTS' => 'COMENTARIOS', + +'LBL_AUTHOR' => 'Autor', +'LBL_QUESTION' => 'Pregunta', + +//Added vtiger_fields for File Attachment and Mail send in Tickets +'LBL_ATTACHMENTS' => 'Adjuntos', +'LBL_NEW_ATTACHMENT' => 'Nuevo Adjunto', +'LBL_SEND_MAIL' => 'Enviar Email', + +//Added vtiger_fields for search option in TicketsList -- 4Beta +'LBL_CREATED_DATE' => 'Fecha de Creación', +'LBL_IS' => 'es', +'LBL_IS_NOT' => 'no es', +'LBL_IS_BEFORE' => 'es antes', +'LBL_IS_AFTER' => 'es después', +'LBL_STATISTICS' => 'Estadísticas', +'LBL_TICKET_ID' => 'Nº de Parte', +'LBL_MY_TICKETS' => 'Mis Partes', +'LBL_MY_FAQ' => 'Mis Faq\'s', +'LBL_ESTIMATED_FINISHING_TIME' => 'Tiempo estimado de resolución', +'LBL_SELECT_TICKET' => 'Seleccionar Parte', +'LBL_CHANGE_OWNER' => 'Modificar Propietario', +'LBL_CHANGE_STATUS' => 'Modificar Estado', +'LBL_TICKET_TITLE' => 'Referencia', +'LBL_TICKET_DESCRIPTION' => 'Explicación', +'LBL_TICKET_CATEGORY' => 'Categoría', +'LBL_TICKET_PRIORITY' => 'Prioridad', + +//Added vtiger_fields after 4 -- Beta +'LBL_NEW_TICKET' => 'Nuevo Parte', +'LBL_TICKET_INFORMATION' => 'Información del Parte', + +'LBL_LIST_FORM_TITLE' => 'Lista de Partes', +'LBL_SEARCH_FORM_TITLE' => 'Buscar Parte', + +//Added vtiger_fields after RC1 - Release +'LBL_CHOOSE_A_VIEW' => 'Seleccionar una vista...', +'LBL_ALL' => 'Todos', +'LBL_LOW' => 'Baja', +'LBL_MEDIUM' => 'Media', +'LBL_HIGH' => 'Alta', +'LBL_CRITICAL' => 'Crítica', +//Added vtiger_fields for 4GA +'Assigned To' => 'Asignado a', +'Contact Name' => 'Nombre de Contacto', +'Priority' => 'Prioridad', +'Status' => 'Estado', +'Category' => 'Categoría', +'Update History' => 'Histórico de Actualizaciones', +'Created Time' => 'Fecha de Creación', +'Modified Time' => 'Última Modificación', +'Title' => ' Referencia', +'Description' => 'Incidencia', + +'LBL_TICKET_CUMULATIVE_STATISTICS' => 'Estadísticas acumuladas de Incidencias:', +'LBL_CASE_TOPIC' => 'Tópico de Incidentes', +'LBL_OPEN' => 'Abierto', +'LBL_CLOSED' => 'Cerrado', +'LBL_TOTAL' => 'Total', +'LBL_TICKET_HISTORY' => 'Historia del Parte:', +'LBL_CATEGORIES' => 'Categorías', +'LBL_PRIORITIES' => 'Prioridades', +'LBL_SUPPORTERS' => 'Agentes', + +//Added vtiger_fields after 4_0_1 +'LBL_TICKET_RESOLUTION' => 'Solución Propuesta', +'Solution' => 'Solución', +'Add Comment' => 'Añadir comentario', +'LBL_ADD_COMMENT' => 'Añadir comentario', + +//Added for 4.2 Release -- CustomView +'Ticket ID' => 'Nº de Parte', +'Subject' => 'Asunto', + +//Added after 4.2 alpha +'Severity' => 'Urgencia', +'Product Name' => 'Producto', +'Related To' => 'Relacionado con', +'LBL_MORE' => 'Más', + +'LBL_TICKETS' => 'Partes', + +//Added on 09-12-2005 +'LBL_CUMULATIVE_STATISTICS' => 'Estadísticas Acumuladas', + +//Added on 12-12-2005 +'LBL_CONVERT_AS_FAQ_BUTTON_TITLE' => 'Convertir en FAQ', +'LBL_CONVERT_AS_FAQ_BUTTON_KEY' => 'C', +'LBL_CONVERT_AS_FAQ_BUTTON_LABEL' => 'Convertir en FAQ', +'Attachment' => 'Adjunto', +'LBL_COMMENT_INFORMATION' => 'Comentarios al Parte', + +//Added for existing picklist entries + +'Big Problem' => 'Gran Problema', +'Small Problem' => 'Problema Pequeño', +'Other Problem' => 'Otro Problema', +'Low' => 'Baja', + +'Normal' => 'Normal', +'High' => 'Alta', +'Urgent' => 'Urgente', + +'Minor' => 'Menor', +'Major' => 'Mayor', +'Feature' => 'Característica', +'Critical' => 'Critica', + +'Open' => 'Abierta', +'In Progress' => 'En Progreso', +'Wait For Response' => 'Esperando Respuesta', +'Closed' => 'Cerrada', + +//added to support i18n in ticket mails +'Hi' => 'Hola', +'Dear' => 'Estimado', +'LBL_PORTAL_BODY_MAILINFO' => 'El Parte ha sido', +'LBL_DETAIL' => ', los detalles son:', +'LBL_REGARDS' => 'Atentamente,', +'LBL_TEAM' => 'Equipo de Soporte Técnico', +'LBL_TICKET_DETAILS' => 'Detalles de Parte', +'LBL_SUBJECT' => 'Asunto : ', +'created' => 'creado', +'replied' => 'respondido', +'reply' => 'Hay una respuesta a', +'customer_portal' => 'en el "Portal del Cliente" en Vtiger', +'link' => 'Utilice el siguiente enlace para ver las respuestas dadas:', +'Thanks' => 'Gracias', +'Support_team' => 'Equipo de Soporte Técnico', +'The comments are' => 'Los comentarios son', +'Ticket Title' => 'Título Incidencia', +'Re' => 'Re :', +// Added/Updated for vtiger CRM 5.0.4 + +//this label for customerportal. +'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. +'LBL_STATUS_UPDATE' => 'Estado de Parte actualizado a', +'LBL_COULDNOT_CLOSED' => 'El Parte no puede ser', +'LBL_CUSTOMER_COMMENTS' => 'EL Cliente ha incluido la siguiente información a su respuesta:', +'LBL_RESPOND'=> 'Por favor responde al parte lo más pronto posible.', +'LBL_REGARDS' =>'Saludos Cordiales,', +'LBL_SUPPORT_ADMIN' => 'Atención al Cliente', +'LBL_RESPONDTO_TICKETID' =>'Responde al Nº de Parte', +'LBL_CUSTOMER_PORTAL' => 'en el Portal del Cliente - URGENTE', +'LBL_LOGIN_DETAILS' => 'Sus datos de conexión al Portal de Cliente son:', +'LBL_MAIL_COULDNOT_SENT' =>'No se puede enviar el correo', +'LBL_USERNAME' => 'Usuario :', +'LBL_PASSWORD' => 'Contraseña :', +'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Datos de Conexión al Portal del Cliente', +'LBL_GIVE_MAILID' => 'Introduzca dirección de email', +'LBL_CHECK_MAILID' => 'Compruebe su dirección de email para el Portal del Cliente', +'LBL_LOGIN_REVOKED' => 'Datos de Usuario no válidos, consulte con su administrador.', +'LBL_MAIL_SENT' => 'Se le ha enviado un correo con los datos de conexión al Portal del Cliente', +'LBL_ALTBODY' => 'Este es el mensaje de correo para los clientes que no soportan HTML', +'Hours' => 'Horas', +'Days' => 'Días', +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Ticket No' => 'Núm. Incidencia', +// END +'From Portal' => 'Proviene del Portal', +'HelpDesk ID' => 'Id Incidencia', +); + +?> diff --git a/modules/HelpDesk/language/es_mx.lang.php b/modules/HelpDesk/language/es_mx.lang.php new file mode 100644 index 0000000..3453f67 --- /dev/null +++ b/modules/HelpDesk/language/es_mx.lang.php @@ -0,0 +1,225 @@ + 'Casos', +'LBL_GROUP' => 'Grupo', +'LBL_ACCOUNT_NAME' => 'Nombre de Cuenta', +'LBL_CONTACT_NAME' => 'Nombre de Contacto', +'LBL_SUBJECT' => 'Asunto', +'LBL_NEW_FORM_TITLE' => 'Nuevo Caso', +'LBL_DESCRIPTION' => 'Descripción', +'NTC_DELETE_CONFIRMATION' => '¿Está seguro que desea eliminar este registro?', +'LBL_CUSTOM_FIELD_SETTINGS' => 'Configuración de campos personalizados:', +'LBL_PICKLIST_FIELD_SETTINGS' => 'Configuración de Campos de Lista:', +'Leads' => 'Prospecto', +'Accounts' => 'Cuenta', +'Contacts' => 'Contacto', +'Opportunities' => 'Oportunidad', +'LBL_CUSTOM_INFORMATION' => 'Información personalizada', +'LBL_DESCRIPTION_INFORMATION' => 'Caso a resolver', + +'LBL_ACCOUNT' => 'Cuenta', +'LBL_OPPURTUNITY' => 'Oportunidad', +'LBL_PRODUCT' => 'Producto', + +'LBL_COLON' => ':', +'LBL_TICKET' => 'Caso', +'LBL_CONTACT' => 'Contacto', +'LBL_STATUS' => 'Estado', +'LBL_ASSIGNED_TO' => 'Asignado a', +'LBL_FAQ' => 'FAQ', +'LBL_VIEW_FAQS' => 'Ver FAQs', +'LBL_ADD_FAQS' => 'Agregar FAQs', +'LBL_FAQ_CATEGORIES' => 'Categorías FAQs', + +'LBL_PRIORITY' => 'Prioridad', +'LBL_CATEGORY' => 'Categoría', + +'LBL_ANSWER' => 'Respuesta', +'LBL_COMMENTS' => 'COMENTARIOS', + +'LBL_AUTHOR' => 'Autor', +'LBL_QUESTION' => 'Pregunta', + +//Added vtiger_fields for File Attachment and Mail send in Tickets +'LBL_ATTACHMENTS' => 'Adjuntos', +'LBL_NEW_ATTACHMENT' => 'Nuevo Adjunto', +'LBL_SEND_MAIL' => 'Enviar Email', + +//Added vtiger_fields for search option in TicketsList -- 4Beta +'LBL_CREATED_DATE' => 'Fecha de Creación', +'LBL_IS' => 'es', +'LBL_IS_NOT' => 'no es', +'LBL_IS_BEFORE' => 'es antes', +'LBL_IS_AFTER' => 'es después', +'LBL_STATISTICS' => 'Estadísticas', +'LBL_TICKET_ID' => 'Nº de Caso', +'LBL_MY_TICKETS' => 'Mis casos', +'LBL_MY_FAQ' => 'Mis FAQ\'s', +'LBL_ESTIMATED_FINISHING_TIME' => 'Tiempo estimado de resolución', +'LBL_SELECT_TICKET' => 'Seleccionar Caso', +'LBL_CHANGE_OWNER' => 'Modificar Propietario', +'LBL_CHANGE_STATUS' => 'Modificar Estado', +'LBL_TICKET_TITLE' => 'Referencia', +'LBL_TICKET_DESCRIPTION' => 'Explicación', +'LBL_TICKET_CATEGORY' => 'Categoría', +'LBL_TICKET_PRIORITY' => 'Prioridad', + +//Added vtiger_fields after 4 -- Beta +'LBL_NEW_TICKET' => 'Nuevo Caso', +'LBL_TICKET_INFORMATION' => 'Información del Caso', + +'LBL_LIST_FORM_TITLE' => 'Lista de casos', +'LBL_SEARCH_FORM_TITLE' => 'Buscar Caso', + +//Added vtiger_fields after RC1 - Release +'LBL_CHOOSE_A_VIEW' => 'Seleccionar una vista...', +'LBL_ALL' => 'Todos', +'LBL_LOW' => 'Baja', +'LBL_MEDIUM' => 'Media', +'LBL_HIGH' => 'Alta', +'LBL_CRITICAL' => 'Crítica', +//Added vtiger_fields for 4GA +'Assigned To' => 'Asignado a', +'Contact Name' => 'Nombre de Contacto', +'Priority' => 'Prioridad', +'Status' => 'Estado', +'Category' => 'Categoría', +'Update History' => 'Histórico de Actualizaciones', +'Created Time' => 'Fecha de Creación', +'Modified Time' => 'Última Modificación', +'Title' => ' Referencia', +'Description' => 'Caso', + +'LBL_TICKET_CUMULATIVE_STATISTICS' => 'Estadísticas acumuladas de casos:', +'LBL_CASE_TOPIC' => 'Tópico de Incidentes', +'LBL_OPEN' => 'Abierto', +'LBL_CLOSED' => 'Cerrado', +'LBL_TOTAL' => 'Total', +'LBL_TICKET_HISTORY' => 'Historia del Caso:', +'LBL_CATEGORIES' => 'Categorías', +'LBL_PRIORITIES' => 'Prioridades', +'LBL_SUPPORTERS' => 'Agentes', + +//Added vtiger_fields after 4_0_1 +'LBL_TICKET_RESOLUTION' => 'Solución Propuesta', +'Solution' => 'Solución', +'Add Comment' => 'Agregar comentario', +'LBL_ADD_COMMENT' => 'Agregar comentario', + +//Added for 4.2 Release -- CustomView +'Ticket ID' => 'ID del Caso', +'Subject' => 'Asunto', + +//Added after 4.2 alpha +'Severity' => 'Importancia', +'Product Name' => 'Producto', +'Related To' => 'Relacionado con', +'LBL_MORE' => 'Más', + +'LBL_TICKETS' => 'casos', + +//Added on 09-12-2005 +'LBL_CUMULATIVE_STATISTICS' => 'Estadísticas Acumuladas', + +//Added on 12-12-2005 +'LBL_CONVERT_AS_FAQ_BUTTON_TITLE' => 'Convertir en FAQ', +'LBL_CONVERT_AS_FAQ_BUTTON_KEY' => 'C', +'LBL_CONVERT_AS_FAQ_BUTTON_LABEL' => 'Convertir en FAQ', +'Attachment' => 'Adjunto', +'LBL_COMMENT_INFORMATION' => 'Comentarios al Caso', + +//Added for existing picklist entries + +'Big Problem' => 'Problema Grave', +'Small Problem' => 'Problema menor', +'Other Problem' => 'Otro tipo de Problema', +'Low' => 'Baja', + +'Normal' => 'Normal', +'High' => 'Alta', +'Urgent' => 'Urgente', + +'Minor' => 'Menor', +'Major' => 'Mayor', +'Feature' => 'Característica', +'Critical' => 'Critica', + +'Open' => 'Abierta', +'In Progress' => 'En Progreso', +'Wait For Response' => 'Esperando Respuesta', +'Closed' => 'Cerrada', + +//added to support i18n in ticket mails +'Hi' => 'Hola', +'Dear' => 'Estimado', +'LBL_PORTAL_BODY_MAILINFO' => 'El Caso ha sido', +'LBL_DETAIL' => ', los detalles son:', +'LBL_REGARDS' => 'Atentamente,', +'LBL_TEAM' => 'Equipo de Soporte Técnico', +'LBL_TICKET_DETAILS' => 'Detalles de Caso', +'LBL_SUBJECT' => 'Asunto : ', +'created' => 'creado', +'replied' => 'respondido', +'reply' => 'Hay una respuesta al caso: ', +'customer_portal' => ' en el Portal de Clientes de VtigerCRM. ', +'link' => 'Utilice el siguiente enlace para ver las respuestas del caso en referencia:', +'Thanks' => 'Gracias', +'Support_team' => 'Equipo de Soporte Técnico', +'The comments are' => 'Los comentarios son', +'Ticket Title' => 'Título Caso', +'Re' => 'Re :', +// Added/Updated for vtiger CRM 5.0.4 + +//this label for customerportal. +'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. +'LBL_STATUS_UPDATE' => 'Estado de Caso actualizado a', +'LBL_COULDNOT_CLOSED' => 'El Caso no puede ser', +'LBL_CUSTOMER_COMMENTS' => 'EL Cliente ha incluido la siguiente información a su respuesta:', +'LBL_RESPOND'=> 'Por favor responde al Caso lo más pronto posible.', +'LBL_REGARDS' =>'Saludos Cordiales,', +'LBL_SUPPORT_ADMIN' => 'Atención al Cliente', +'LBL_RESPONDTO_TICKETID' =>'Responde al Nº de Caso', +'LBL_CUSTOMER_PORTAL' => 'en el Portal del Cliente - URGENTE', +'LBL_LOGIN_DETAILS' => 'Sus datos de conexión al Portal de Cliente son:', +'LBL_MAIL_COULDNOT_SENT' =>'No se puede enviar el correo', +'LBL_USERNAME' => 'Usuario :', +'LBL_PASSWORD' => 'Contraseña :', +'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Datos de Conexión al Portal del Cliente', +'LBL_GIVE_MAILID' => 'Introduzca dirección de email', +'LBL_CHECK_MAILID' => 'Compruebe su dirección de email para el Portal del Cliente', +'LBL_LOGIN_REVOKED' => 'Datos de Usuario no válidos, consulte con su administrador.', +'LBL_MAIL_SENT' => 'Se le ha enviado un correo con los datos de conexión al Portal del Cliente', +'LBL_ALTBODY' => 'Este es el mensaje de correo para los clientes que no soportan HTML', +'Hours' => 'Horas', +'Days' => 'Días', +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Ticket No' => 'Núm. Caso', +// END +'From Portal' => 'Proviene del Portal', +'HelpDesk ID' => 'Id Incidencia', +); + +?> diff --git a/modules/HelpDesk/language/fr_fr.lang.php b/modules/HelpDesk/language/fr_fr.lang.php new file mode 100644 index 0000000..cb126cb --- /dev/null +++ b/modules/HelpDesk/language/fr_fr.lang.php @@ -0,0 +1,174 @@ + 'Tickets', + 'LBL_GROUP' => 'Equipe', + 'LBL_ACCOUNT_NAME' => 'Compte', + 'LBL_CONTACT_NAME' => 'Contact', + 'LBL_SUBJECT' => 'Objet : ', + 'LBL_NEW_FORM_TITLE' => 'ticket', + 'LBL_DESCRIPTION' => 'Description', + 'NTC_DELETE_CONFIRMATION' => 'Etes-vous certain de vouloir supprimer cet enregistrement ?', + 'LBL_CUSTOM_FIELD_SETTINGS' => 'Configuration du champ personnalisé :', + 'LBL_PICKLIST_FIELD_SETTINGS' => 'Configuration des listes de choix :', + 'Leads' => 'Prospects', + 'Accounts' => 'Comptes', + 'Contacts' => 'Contacts', + 'Opportunities' => 'Affaires', + 'LBL_CUSTOM_INFORMATION' => 'Informations personnalisées', + 'LBL_DESCRIPTION_INFORMATION' => 'Description', + 'LBL_ACCOUNT' => 'Compte', + 'LBL_OPPURTUNITY' => 'Affaire', + 'LBL_PRODUCT' => 'Produit', + 'LBL_COLON' => ':', + 'LBL_TICKET' => 'Ticket', + 'LBL_CONTACT' => 'Contact', + 'LBL_STATUS' => 'Statut', + 'LBL_ASSIGNED_TO' => 'Assigné à', + 'LBL_FAQ' => 'FAQ', + 'LBL_VIEW_FAQS' => 'Afficher FAQ', + 'LBL_ADD_FAQS' => 'Ajouter FAQ', + 'LBL_FAQ_CATEGORIES' => 'Catégorie de FAQ', + 'LBL_PRIORITY' => 'Priorité ', + 'LBL_CATEGORY' => 'Catégorie', + 'LBL_ANSWER' => 'Réponse', + 'LBL_COMMENTS' => 'Commentaires', + 'LBL_AUTHOR' => 'Auteur', + 'LBL_QUESTION' => 'Question', + 'LBL_ATTACHMENTS' => 'Pièces jointes', + 'LBL_NEW_ATTACHMENT' => 'Nouvelle pièce jointe', + 'LBL_SEND_MAIL' => 'Envoyer', + 'LBL_CREATED_DATE' => 'Créé le', + 'LBL_IS' => 'est', + 'LBL_IS_NOT' => 'n\'est pas', + 'LBL_IS_BEFORE' => 'est avant', + 'LBL_IS_AFTER' => 'est après', + 'LBL_STATISTICS' => 'Statistiques', + 'LBL_TICKET_ID' => 'Ref', + 'LBL_MY_TICKETS' => 'Mes tickets', + 'LBL_MY_FAQ' => 'Mes FAQ', + 'LBL_ESTIMATED_FINISHING_TIME' => 'Heure de fin estimée', + 'LBL_SELECT_TICKET' => 'Sélectionner ticket', + 'LBL_CHANGE_OWNER' => 'Changer propriétaire', + 'LBL_CHANGE_STATUS' => 'Changer statut', + 'LBL_TICKET_TITLE' => 'Titre', + 'LBL_TICKET_DESCRIPTION' => 'Description', + 'LBL_TICKET_CATEGORY' => 'Catégorie', + 'LBL_TICKET_PRIORITY' => 'Priorité', + 'LBL_NEW_TICKET' => 'Nouveau ticket', + 'LBL_TICKET_INFORMATION' => 'Détail ticket', + 'LBL_LIST_FORM_TITLE' => 'Liste ticket', + 'LBL_SEARCH_FORM_TITLE' => 'Rechercher ticket', + 'LBL_CHOOSE_A_VIEW' => 'Sélectionner vue...', + 'LBL_ALL' => 'Tous', + 'LBL_LOW' => 'Basse', + 'LBL_MEDIUM' => 'Moyenne', + 'LBL_HIGH' => 'Haute', + 'LBL_CRITICAL' => 'Critique', + 'Assigned To' => 'Assigné à', + 'Contact Name' => 'Nom contact', + 'Priority' => 'Priorité', + 'Status' => 'Statut', + 'Category' => 'Catégorie', + 'Update History' => 'Mise à jour historique', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Title' => 'Titre', + 'Description' => 'Description', + 'LBL_TICKET_CUMULATIVE_STATISTICS' => 'Statistiques cumulées :', + 'LBL_CASE_TOPIC' => 'Titre', + 'LBL_OPEN' => 'Ouvert', + 'LBL_CLOSED' => 'Clôt', + 'LBL_TOTAL' => 'Total', + 'LBL_TICKET_HISTORY' => 'Historique ticket :', + 'LBL_CATEGORIES' => 'Catégories', + 'LBL_PRIORITIES' => 'Priorités', + 'LBL_SUPPORTERS' => 'Technicien', + 'LBL_TICKET_RESOLUTION' => 'Détail solution', + 'Solution' => 'Solution', + 'Add Comment' => 'Ajouter commentaire', + 'LBL_ADD_COMMENT' => 'Ajouter commentaire', + 'Ticket ID' => 'Ref ticket', + 'Subject' => 'Titre', + 'Severity' => 'Engagement', + 'Product Name' => 'Nom produit', + 'Related To' => 'Relatif à', + 'LBL_MORE' => 'Plus', + 'LBL_TICKETS' => 'Tickets', + 'LBL_CUMULATIVE_STATISTICS' => 'Statistiques cumulées', + 'LBL_CONVERT_AS_FAQ_BUTTON_TITLE' => 'Convertir en FAQ', + 'LBL_CONVERT_AS_FAQ_BUTTON_KEY' => 'C', + 'LBL_CONVERT_AS_FAQ_BUTTON_LABEL' => 'Convertir en FAQ', + 'Attachment' => 'Pièces jointes', + 'LBL_COMMENT_INFORMATION' => 'Commentaires', + 'Big Problem' => 'Gros problème', + 'Small Problem' => 'Petit problème', + 'Other Problem' => 'Autre problème', + 'Low' => 'Basse', + 'Normal' => 'Normale', + 'High' => 'Haute', + 'Urgent' => 'Urgente', + 'Minor' => 'Mineur', + 'Major' => 'Majeur', + 'Feature' => 'Fonctionnel', + 'Critical' => 'Critique', + 'Open' => 'Ouvert', + 'In Progress' => 'En cours', + 'Wait For Response' => 'Attente réponse', + 'Closed' => 'Fermé', + 'Hi' => 'Bonjour', + 'Dear' => 'Cher', + 'LBL_PORTAL_BODY_MAILINFO' => 'Le ticket est', + 'LBL_DETAIL' => 'le détail est :', + 'LBL_REGARDS' => 'Cordialement', + 'LBL_TEAM' => 'L\'équipe support', + 'LBL_TICKET_DETAILS' => 'Détail', + 'created' => 'Créé', + 'replied' => 'Répondu', + 'reply' => 'Il y a une réponse à', + 'customer_portal' => 'sur le "Portail de service".', + 'link' => 'Vous pouvez utiliser le lien suivant pour lire la réponse :', + 'Thanks' => 'Cordialement,', + 'Support_team' => 'L\'équipe support', + 'LBL_STATUS_CLOSED' => 'fermer', + 'LBL_STATUS_UPDATE' => 'Le statut du ticket a été changé pour ', + 'LBL_COULDNOT_CLOSED' => 'Le ticket ne peut ', + 'LBL_CUSTOMER_COMMENTS' => 'Le client a fourni les informations complémentaires suivantes :', + 'LBL_RESPOND' => 'Merci de répondre à ce ticket.', + 'LBL_SUPPORT_ADMIN' => 'Administrateur support', + 'LBL_RESPONDTO_TICKETID' => 'Réponse pour le ticket n°', + 'LBL_CUSTOMER_PORTAL' => 'in Customer Portal - URGENT', + 'LBL_LOGIN_DETAILS' => 'Voici vos codes d\'accès au portail client', + 'LBL_MAIL_COULDNOT_SENT' => 'Le mail ne peut être envoyé', + 'LBL_USERNAME' => 'Nom utilisateur :', + 'LBL_PASSWORD' => 'Mot de passe :', + 'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Informations concernant votre compte.', + 'LBL_GIVE_MAILID' => 'Merci de renseigner votre adresse mail', + 'LBL_CHECK_MAILID' => 'Merci de vérifier votre adresse email', + 'LBL_LOGIN_REVOKED' => 'Votre login a été désactivé. Contactez le support', + 'LBL_MAIL_SENT' => 'Un email a été envoyé à votre adresse email avec votre nom d\'utilisateur et votre mot de passe', + 'LBL_ALTBODY' => 'Ceci est le corps du mail texte pour les clients mails non-HTML', + 'LBL_DUPLICATE_DATA_IN' => 'Dupliquer ', + 'LBL_DELETE' => 'Supprimer', + 'LBL_MERGE_SELECT' => 'Fusionner la sélection', + 'LBL_MERGE_DATA_IN' => 'Fusionner les enregistrements', + 'LBL_MERGE' => 'Fusionner', + 'LBL_ACTION' => 'Effet', + 'LBL_FIELDLISTS' => 'Liste de champs', + 'LBL_RECORD' => 'Enregistrement #', + 'Ticket No' => 'Ticket N°', + 'Hours' => 'Heures', + 'Days' => 'Jours', + 'From Portal' => 'Depuis le portail', + 'HelpDesk ID' => 'Ticket ID', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/HelpDesk/language/hu_hu.lang.php b/modules/HelpDesk/language/hu_hu.lang.php new file mode 100644 index 0000000..f535e77 --- /dev/null +++ b/modules/HelpDesk/language/hu_hu.lang.php @@ -0,0 +1,183 @@ + 'Kérések', + 'LBL_GROUP' => 'Csoport', + 'LBL_ACCOUNT_NAME' => 'Cég neve', + 'LBL_CONTACT_NAME' => 'Kapcsolat neve', + 'LBL_SUBJECT' => 'Tárgy : ', + 'LBL_NEW_FORM_TITLE' => 'Új Kérés', + 'LBL_DESCRIPTION' => 'Megjegyzés', + 'NTC_DELETE_CONFIRMATION' => 'Biztos vagy abban, hogy törölni akarod ezt a rekordot?', + 'LBL_CUSTOM_FIELD_SETTINGS' => 'Egyedi Mezők Beállítások:', + 'LBL_PICKLIST_FIELD_SETTINGS' => 'Kiválasztó Lista Mezők Beállítások:', + 'Leads' => 'Jelölt', + 'Accounts' => 'Cég', + 'Contacts' => 'Kapcsolat', + 'Opportunities' => 'Lehetőség', + 'LBL_CUSTOM_INFORMATION' => 'Egyedi adatok', + 'LBL_DESCRIPTION_INFORMATION' => 'Leírás', + 'LBL_ACCOUNT' => 'Cég', + 'LBL_OPPURTUNITY' => 'Lehetőség', + 'LBL_PRODUCT' => 'Termék', + 'LBL_COLON' => ':', + 'LBL_TICKET' => 'Kérés', + 'LBL_CONTACT' => 'Kapcsolat', + 'LBL_STATUS' => 'Állapot', + 'LBL_ASSIGNED_TO' => 'Felelős', + 'LBL_FAQ' => 'TudásTár', + 'LBL_VIEW_FAQS' => 'TudásTár megtekintése', + 'LBL_ADD_FAQS' => 'TudásTár hozzáadása', + 'LBL_FAQ_CATEGORIES' => 'TudásTár kategóriák', + 'LBL_PRIORITY' => 'Prioritás', + 'LBL_CATEGORY' => 'Kategória', + 'LBL_ANSWER' => 'Válasz', + 'LBL_COMMENTS' => 'Feljegyzés', + 'LBL_AUTHOR' => 'Szerző', + 'LBL_QUESTION' => 'Kérdés', + 'LBL_ATTACHMENTS' => 'Mellékletek', + 'LBL_NEW_ATTACHMENT' => 'Új Melléklet', + 'LBL_SEND_MAIL' => 'Email küldés', + 'LBL_CREATED_DATE' => 'Létrehozás Dátuma', + 'LBL_IS' => 'egyenlő ezzel', + 'LBL_IS_NOT' => 'nem egyenlő ezzel', + 'LBL_IS_BEFORE' => 'ez előtt', + 'LBL_IS_AFTER' => 'ez után', + 'LBL_STATISTICS' => 'Statisztika', + 'LBL_TICKET_ID' => 'Kérés AZ', + 'LBL_MY_TICKETS' => 'Kéréseim', + 'LBL_MY_FAQ' => 'Az én TudásTáram', + 'LBL_ESTIMATED_FINISHING_TIME' => 'Becsült befejezési idő', + 'LBL_SELECT_TICKET' => 'Kérés kiválasztása', + 'LBL_CHANGE_OWNER' => 'Tulajdonos módosítása', + 'LBL_CHANGE_STATUS' => 'Állapot módosítása', + 'LBL_TICKET_TITLE' => 'Megnevezés', + 'LBL_TICKET_DESCRIPTION' => 'Leírás:', + 'LBL_TICKET_CATEGORY' => 'Kategória', + 'LBL_TICKET_PRIORITY' => 'Prioritás', + 'LBL_NEW_TICKET' => 'Új Kérés', + 'LBL_TICKET_INFORMATION' => 'Kérés adatai', + 'LBL_LIST_FORM_TITLE' => 'Kérés Lista', + 'LBL_SEARCH_FORM_TITLE' => 'Kérések Keresése', + 'LBL_CHOOSE_A_VIEW' => 'Válassz egy Nézetet...', + 'LBL_ALL' => 'Minden', + 'LBL_LOW' => 'Alacsony', + 'LBL_MEDIUM' => 'Közepes', + 'LBL_HIGH' => 'Magas', + 'LBL_CRITICAL' => 'Kritikus', + 'Assigned To' => 'Felelős', + 'Contact Name' => 'Kapcsolat neve', + 'Priority' => 'Prioritás', + 'Status' => 'Állapot', + 'Category' => 'Kategória', + 'Update History' => 'Előzmények aktualizálása', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Title' => 'Megnevezés', + 'Description' => 'Megjegyzés', + 'LBL_TICKET_CUMULATIVE_STATISTICS' => 'Kérések Kumulált Statisztikája:', + 'LBL_CASE_TOPIC' => 'Eset Téma', + 'LBL_OPEN' => 'Nyitott', + 'LBL_CLOSED' => 'Lezárt', + 'LBL_TOTAL' => 'Összes', + 'LBL_TICKET_HISTORY' => 'Lezárt kérések', + 'LBL_CATEGORIES' => 'Kategóriák', + 'LBL_PRIORITIES' => 'Prioritások', + 'LBL_SUPPORTERS' => 'Támogatók', + 'LBL_TICKET_RESOLUTION' => 'Megoldás adatai', + 'Solution' => 'Megoldás', + 'Add Comment' => 'Feljegyzést hozzáad', + 'LBL_ADD_COMMENT' => 'Feljegyzést hozzáad', + 'Ticket ID' => 'Kérés AZ', + 'Subject' => 'Tárgy', + 'Severity' => 'Komolyság', + 'Product Name' => 'Termék neve', + 'Related To' => 'Kapcsolódik', + 'LBL_MORE' => 'Több', + 'LBL_TICKETS' => 'Kérések', + 'LBL_CUMULATIVE_STATISTICS' => 'Kumulált Statisztikák', + 'LBL_CONVERT_AS_FAQ_BUTTON_TITLE' => 'Átalakít -> TudásTár', + 'LBL_CONVERT_AS_FAQ_BUTTON_KEY' => 'C', + 'LBL_CONVERT_AS_FAQ_BUTTON_LABEL' => 'Átalakít -> TudásTár', + 'Attachment' => 'Melléklet', + 'LBL_COMMENT_INFORMATION' => 'Feljegyzések', + 'Big Problem' => 'Nagy probléma', + 'Small Problem' => 'Kis probléma', + 'Other Problem' => 'Egyéb probléma', + 'Low' => 'Alacsony', + 'Normal' => 'Normál', + 'High' => 'Magas', + 'Urgent' => 'Sürgős', + 'Minor' => 'Kisebb', + 'Major' => 'Lényegi', + 'Feature' => 'Tulajdonság', + 'Critical' => 'Kritikus', + 'Open' => 'Nyitott', + 'In Progress' => 'Folyamatban', + 'Wait For Response' => 'Válaszra vár', + 'Closed' => 'Lezárt', + 'Hi' => 'Helló', + 'Dear' => 'Kedves', + 'LBL_PORTAL_BODY_MAILINFO' => 'A Kérés', + 'LBL_DETAIL' => 'adatai :', + 'LBL_REGARDS' => 'Üdvözlettel', + 'LBL_TEAM' => 'Ügyfélszolgálat', + 'LBL_TICKET_DETAILS' => 'Kérés adatok', + 'created' => 'létrehozva', + 'replied' => 'megválszolva', + 'reply' => 'Ez egy válasz arra, hogy', + 'customer_portal' => 'az "Ügyfél Portál"-on a VTiger-ben.', + 'link' => 'A következő linken elolvashatod a válaszunkat:', + 'Thanks' => 'Köszönettel', + 'Support_team' => 'Ügyfélszolgálat', + 'The comments are' => 'A megjegyzések ', + 'Ticket Title' => 'Kérés megnevezése', + 'Re' => 'Hiv. :', + 'LBL_STATUS_CLOSED' => 'Lezárt', + 'LBL_STATUS_UPDATE' => 'A Kérés állapota aktualizálva, mint ', + 'LBL_COULDNOT_CLOSED' => 'A Kérés nem lehet', + 'LBL_CUSTOMER_COMMENTS' => 'Az Ügyfél a következő kiegészítő információkat küldte válaszként:', + 'LBL_RESPOND' => 'Válaszold meg a legkorábbi Kérést.', + 'LBL_SUPPORT_ADMIN' => 'Ügyfél Adminisztrátor', + 'LBL_RESPONDTO_TICKETID' => 'Válaszold meg Kérést AZ:', + 'LBL_CUSTOMER_PORTAL' => 'az Ügyél Portálon - SÜRGŐS', + 'LBL_LOGIN_DETAILS' => 'Ezek az Ön Ügyfél Portál belépési adatai :', + 'LBL_MAIL_COULDNOT_SENT' => 'A levelet nem sikerült elküldeni', + 'LBL_USERNAME' => 'Felhasználó név :', + 'LBL_PASSWORD' => 'Jelszó :', + 'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Az Ön Ügyfél Portál belépési adatai', + 'LBL_GIVE_MAILID' => 'Kérjük, hogy adja meg az e-mail címét', + 'LBL_CHECK_MAILID' => 'Kérjük, hogy ellenőrizze az e-mail címét az Ügyfél Portálhoz', + 'LBL_LOGIN_REVOKED' => 'Belépés visszautasítva. Kérjük, hogy lépjen kapcsolatba az Adminisztrátorral.', + 'LBL_MAIL_SENT' => 'Elküldtük a levelet az Ön e-mail címére az Ügyfél Portál belépési adataival', + 'LBL_ALTBODY' => 'Ez a TXT levéltörzs a HTML levelet nem fogadó levelező rendszerek számára', + 'Ticket No' => 'Kérés No.', + 'Hours' => 'Órák', + 'Days' => 'Napok', + 'From Portal' => 'A Portálról', + 'HelpDesk ID' => 'Kérés AZ', + 'Projects' => 'Projektek', + 'LBL_DUPLICATE_DATA_IN' => 'Duplikált adat ebben:', + 'LBL_DELETE' => 'Törlés', + 'LBL_MERGE_SELECT' => 'Válaszd ki az összefűzendő adatokat', + 'LBL_MERGE_DATA_IN' => 'Adatok összefűzése ebben:', + 'LBL_MERGE' => 'Összefűzés', + 'LBL_ACTION' => 'Műveletek', + 'LBL_FIELDLISTS' => 'Mezőlista', + 'LBL_RECORD' => 'Rekord' +); +?> \ No newline at end of file diff --git a/modules/HelpDesk/language/nl_nl.lang.php b/modules/HelpDesk/language/nl_nl.lang.php new file mode 100644 index 0000000..ad7c249 --- /dev/null +++ b/modules/HelpDesk/language/nl_nl.lang.php @@ -0,0 +1,259 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.5 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/HelpDesk/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +// Added in release 4.0 +'LBL_MODULE_NAME'=>'Helpdesk', +'LBL_GROUP'=>'Groep', +'LBL_ACCOUNT_NAME'=>'Accountnaam', +'LBL_CONTACT_NAME'=>'Contactnaam', +'LBL_SUBJECT'=>'Onderwerp', +'LBL_NEW_FORM_TITLE' => 'Nieuwe ticket', +'LBL_DESCRIPTION'=>'Omschrijving', +'NTC_DELETE_CONFIRMATION'=>'Weet u zeker dat u dit veld wilt verwijderen?', +'LBL_CUSTOM_FIELD_SETTINGS'=>'Custom veld instellingen:', +'LBL_PICKLIST_FIELD_SETTINGS'=>'Picklijst veld instellingen:', +'Leads'=>'Lead', +'Accounts'=>'Account', +'Contacts'=>'Contact', +'Opportunities'=>'Verkoopkans', +'LBL_CUSTOM_INFORMATION'=>'Standaard informatie', +'LBL_DESCRIPTION_INFORMATION'=>'Omschrijving', + +'LBL_ACCOUNT'=>'Account', +'LBL_OPPURTUNITY'=>'Verkoopkans', +'LBL_PRODUCT'=>'Product', + +'LBL_COLON'=>':', +'LBL_TICKET'=>'Ticket', +'LBL_CONTACT'=>'Contact', +'LBL_STATUS'=>'Status', +'LBL_ASSIGNED_TO'=>'Toegewezen aan', +'LBL_FAQ'=>'FAQ', +'LBL_VIEW_FAQS'=>'Bekijk FAQ', +'LBL_ADD_FAQS'=>'Toevoegen FAQ', +'LBL_FAQ_CATEGORIES'=>'FAQ categorieën', + +'LBL_PRIORITY'=>'Prioriteiten', +'LBL_CATEGORY'=>'Categorie', + +'LBL_ANSWER'=>'Antwoord', +'LBL_COMMENTS'=>'Opmerkingen', + +'LBL_AUTHOR'=>'Auteur', +'LBL_QUESTION'=>'Vragen', + +//Added fields for File Attachment and Mail send in Tickets +'LBL_ATTACHMENTS'=>'Bijlagen', +'LBL_NEW_ATTACHMENT'=>'Nieuwe bijlage', +'LBL_SEND_MAIL'=>'Verstuur e-mail', + +//Added fields for search option in TicketsList -- 4Beta +'LBL_CREATED_DATE'=>'Gemaakt op', +'LBL_IS'=>'is', +'LBL_IS_NOT'=>'is niet', +'LBL_IS_BEFORE'=>'is voor', +'LBL_IS_AFTER'=>'is na', +'LBL_STATISTICS'=>'Statistieken', +'LBL_TICKET_ID'=>'Ticket Id', +'LBL_MY_TICKETS'=>'Mijn tickets', +"LBL_MY_FAQ"=>"Mijn FAQ", +'LBL_ESTIMATED_FINISHING_TIME'=>'Verwachte eindtijd', +'LBL_SELECT_TICKET'=>'Selecteer ticket', +'LBL_CHANGE_OWNER'=>'Wijzig eigenaar', +'LBL_CHANGE_STATUS'=>'Wijzig Status', +'LBL_TICKET_TITLE'=>'Titel', +'LBL_TICKET_DESCRIPTION'=>'Omschrijving', +'LBL_TICKET_CATEGORY'=>'Categorie', +'LBL_TICKET_PRIORITY'=>'Prioriteit', + +//Added fields after 4 -- Beta +'LBL_NEW_TICKET'=>'Nieuw ticket', +'LBL_TICKET_INFORMATION'=>'Ticket informatie', + +'LBL_LIST_FORM_TITLE'=>'Ticketlijst', +'LBL_SEARCH_FORM_TITLE'=>'Ticket zoeken', + +//Added fields after RC1 - Release +'LBL_CHOOSE_A_VIEW'=>'Kies een ', +'LBL_ALL'=>'Alle', +'LBL_LOW'=>'Laag', +'LBL_MEDIUM'=>'Medium', +'LBL_HIGH'=>'Hoog', +'LBL_CRITICAL'=>'Kritiek', +//Added fields for 4GA +'Assigned To'=>'Toegewezen aan', +'Contact Name'=>'Contactnaam', +'Priority'=>'Prioriteit', +'Status'=>'Status', +'Category'=>'Categorie', +'Update History'=>'Geschiedenis verversen', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', +'Title'=>'Titel', +'Description'=>'Omschrijving', + +'LBL_TICKET_CUMULATIVE_STATISTICS'=>'Ticket Cumulatieve Statistieken:', +'LBL_CASE_TOPIC'=>'Casus Topic', +'LBL_OPEN'=>'Open', +'LBL_CLOSED'=>'Gesloten', +'LBL_TOTAL'=>'Totaal', +'LBL_TICKET_HISTORY'=>'Ticket geschiedenis', +'LBL_CATEGORIES'=>'Categorieen', +'LBL_PRIORITIES'=>'Prioriteiten', +'LBL_SUPPORTERS'=>'Supporters', +//this label for customerportal. +'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. +'LBL_STATUS_UPDATE' => 'Ticket status is veranderd naar', +'LBL_COULDNOT_CLOSED' => 'Ticket kan niet', +'LBL_CUSTOMER_COMMENTS' => 'De klant heeft de volgende additionele informatie toegevoegd in uw antwoord:', +'LBL_RESPOND'=> 'Gaarne vroegtijdig bericht op bovengenoemde ticket.', +'LBL_REGARDS' =>'Vriendelijke Groeten', +'LBL_SUPPORT_ADMIN' => 'Ondersteuningsbeheerder', +'LBL_RESPONDTO_TICKETID' =>'Antwoord op ticket ID', +'LBL_CUSTOMER_PORTAL' => 'in klanten Portal - SPOED', +'LBL_LOGIN_DETAILS' => 'Hierbij uw klant Portal login details gegevens:', +'LBL_MAIL_COULDNOT_SENT' =>'E-mail kon niet verstuurd worden', +'LBL_USERNAME' => 'Gebruikersnaam :', +'LBL_PASSWORD' => 'Wachtwoord :', +'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Met betrekking tot uw klant Portal login gegevens', +'LBL_GIVE_MAILID' => 'Gaarne uw e-mail id', +'LBL_CHECK_MAILID' => 'Gaarne uw e-mail id voor de klanten portal bekijken', +'LBL_LOGIN_REVOKED' => 'Uw login is ingetrokken. Contacteer uw administrator.', +'LBL_MAIL_SENT' => 'Een e-mail is naar uw e-mail id verstuurd met daarin klant portal login gegevens', +'LBL_ALTBODY' => 'Dit is een e-mail pagina met platte tekst voor niet HTML mail clients', + +//Added fields after 4_0_1 +'LBL_TICKET_RESOLUTION'=>'Oplossing', +'Solution'=>'Oplossing', +'Add Comment'=>'Commentaar toevoegen', +'LBL_ADD_COMMENT'=>'Commentaar toevoegen',//give the same value given to the above string 'Add Comment' + +//Added for 4.2 Release -- CustomView +'Ticket ID'=>'Ticket ID', +'Subject'=>'Onderwerp', + +//Added after 4.2 alpha +'Severity'=>'Ernstigheid', +'Product Name'=>'Productnaam', +'Related To'=>'Gerelateerd aan', +'LBL_MORE'=>'Meer', + +'LBL_TICKETS'=>'Tickets', + +//Added on 09-12-2005 +'LBL_CUMULATIVE_STATISTICS'=>'Cumulatieve Statistieken', + +//Added on 12-12-2005 +'LBL_CONVERT_AS_FAQ_BUTTON_TITLE'=>'Converteer naar FAQ', +'LBL_CONVERT_AS_FAQ_BUTTON_KEY'=>'C', +'LBL_CONVERT_AS_FAQ_BUTTON_LABEL'=>'Converteer naar FAQ', +'Attachment'=>'Bijlage', +'LBL_COMMENT_INFORMATION'=>'Commentaar', + +//Added for existing picklist entries + +'Big Problem'=>'Groot probleem', +'Small Problem'=>'Klein probleem', +'Other Problem'=>'Probleem', + +'Low'=>'Laag', +'Normal'=>'Normaal', +'High'=>'Hoog', +'Urgent'=>'Urgent', + +'Minor'=>'Klein', +'Major'=>'Groot', +'Feature'=>'Mogelijkheden', +'Critical'=>'Kritiek', + +'Open'=>'Open', +'In Progress'=>'In behandeling', +'Wait For Response'=>'Wacht op reactie', +'Closed'=>'Gesloten', + +//added to support i18n in ticket mails +'Hi' => 'Hallo', +'Dear'=> 'Beste', +'LBL_PORTAL_BODY_MAILINFO'=> 'Ticket is', +'LBL_DETAIL' => 'de omschrijving is:', +'LBL_REGARDS'=> 'Groeten', +'LBL_TEAM'=> 'HelpDesk team', +'LBL_TICKET_DETAILS' => 'Ticket omschrijving', +'LBL_SUBJECT' => 'Onderwerp: ', +'created' => 'Gemaakt', +'replied' => 'Beantwoord', +'reply'=>'Er is een antwoord naar', +'customer_portal' => 'in "Klanten Portal" van '.$HELPDESK_SUPPORT_NAME.'.', +'link' => 'Men kan de volgende link bekijken om de gemaakte antwoorden te zien:', +'Thanks' => 'Bedankt', +//'Support_team' => 'vTiger Support Team', +'Support_team' => $HELPDESK_SUPPORT_NAME, + + +// Added/Updated for vtiger CRM 5.0.4 + +//this label for customerportal. +'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. +'LBL_STATUS_UPDATE' => 'Ticket status is gewijzigd in', +'LBL_COULDNOT_CLOSED' => 'Ticket kan niet worden', +'LBL_CUSTOMER_COMMENTS' => 'De relatie heeft de volgende informatie geantwoord:', +'LBL_RESPOND'=> 'Gelieve zo snel mogelijk te reageren op bovengenoemd Ticket.', +'LBL_REGARDS' =>'Met vriendelijke groet', +'LBL_SUPPORT_ADMIN' => 'Ondersteuningsbeheerder', +'LBL_RESPONDTO_TICKETID' =>'Beantwoord Ticket ID', +'LBL_CUSTOMER_PORTAL' => 'in Klant Portaal - Dringend', +'LBL_LOGIN_DETAILS' => 'Hieronder volgen uw inloggegevens voor de klantportaal :', +'LBL_MAIL_COULDNOT_SENT' =>'Mail kon niet worden verzonden', +'LBL_USERNAME' => 'Gebruikersnaam :', +'LBL_PASSWORD' => 'Wachtwoord :', +'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Betreft uw login gegevens voor de klantportaal', +'LBL_GIVE_MAILID' => 'Uw e-mailadres svp', +'LBL_CHECK_MAILID' => 'Controleer uw e-mailadres voor de Klantportaal', +'LBL_LOGIN_REVOKED' => 'Uw inloggegevens zijn vervallen. Neem contact op met de helpdesk.', +'LBL_MAIL_SENT' => 'Een e-mail met de inloggegevsn is verstuurd naar het ons bekende emailadres', +'LBL_ALTBODY' => '', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Ticket No' => 'Ticket Nr', +// END + +'Hours' => 'Uren', +'Days' => 'Dagen', + +'From Portal' => 'Van Portaal', +); + +?> diff --git a/modules/HelpDesk/language/pt_br.lang.php b/modules/HelpDesk/language/pt_br.lang.php new file mode 100644 index 0000000..94e9d32 --- /dev/null +++ b/modules/HelpDesk/language/pt_br.lang.php @@ -0,0 +1,229 @@ +'Tickets', +'LBL_GROUP'=>'Grupo', +'LBL_ACCOUNT_NAME'=>'Nome Organização', +'LBL_CONTACT_NAME'=>'Nome Contato', +'LBL_SUBJECT'=>'Assunto', +'LBL_NEW_FORM_TITLE' => 'Novo Ticket', +'LBL_DESCRIPTION'=>'Descrição', +'NTC_DELETE_CONFIRMATION'=>'Você tem certeza que deseja deletar este registro?', +'LBL_CUSTOM_FIELD_SETTINGS'=>'Configurações Campos Customizados:', +'LBL_PICKLIST_FIELD_SETTINGS'=>'Configurações Campos Lista Opções:', +'Leads'=>'Lead', +'Accounts'=>'Organização', +'Contacts'=>'Contato', +'Opportunities'=>'Oportunidade', +'LBL_CUSTOM_INFORMATION'=>'Informação Customizada', +'LBL_DESCRIPTION_INFORMATION'=>'Descrição', + +'LBL_ACCOUNT'=>'Organização', +'LBL_OPPURTUNITY'=>'Oportunidade', +'LBL_PRODUCT'=>'Produto', + +'LBL_COLON'=>':', +'LBL_TICKET'=>'Ticket', +'LBL_CONTACT'=>'Contato', +'LBL_STATUS'=>'Status', +'LBL_ASSIGNED_TO'=>'Responsável', +'LBL_FAQ'=>'FAQ', +'LBL_VIEW_FAQS'=>'Visualizar FAQs', +'LBL_ADD_FAQS'=>'Adicionar FAQs', +'LBL_FAQ_CATEGORIES'=>'Categorias FAQ', + +'LBL_PRIORITY'=>'Prioridade', +'LBL_CATEGORY'=>'Categoria', + +'LBL_ANSWER'=>'Resposta', +'LBL_COMMENTS'=>'Comentários', + +'LBL_AUTHOR'=>'Autor', +'LBL_QUESTION'=>'Questão', + +//Added vtiger_fields for File Attachment and Mail send in Tickets +'LBL_ATTACHMENTS'=>'Anexos', +'LBL_NEW_ATTACHMENT'=>'Novo Anexo', +'LBL_SEND_MAIL'=>'Enviar Email', + +//Added vtiger_fields for search option in TicketsList -- 4Beta +'LBL_CREATED_DATE'=>'Data Criação', +'LBL_IS'=>'é', +'LBL_IS_NOT'=>'não é', +'LBL_IS_BEFORE'=>'é antes', +'LBL_IS_AFTER'=>'é depois', +'LBL_STATISTICS'=>'Estatísticas', +'LBL_TICKET_ID'=>'No. Ticket', +'LBL_MY_TICKETS'=>'Meus Tickets', +"LBL_MY_FAQ"=>"Minhas FAQs", +'LBL_ESTIMATED_FINISHING_TIME'=>'Tempo Estimado de Conclusão', +'LBL_SELECT_TICKET'=>'Selecionar Ticket', +'LBL_CHANGE_OWNER'=>'Mudar Proprietário', +'LBL_CHANGE_STATUS'=>'Mudar Status', +'LBL_TICKET_TITLE'=>'Título', +'LBL_TICKET_DESCRIPTION'=>'Descrição', +'LBL_TICKET_CATEGORY'=>'Categoria', +'LBL_TICKET_PRIORITY'=>'Prioridade', + +//Added vtiger_fields after 4 -- Beta +'LBL_NEW_TICKET'=>'Novo Ticket', +'LBL_TICKET_INFORMATION'=>'Dados do Ticket', + +'LBL_LIST_FORM_TITLE'=>'Lista de Tickets', +'LBL_SEARCH_FORM_TITLE'=>'Busca de Ticket', + +//Added vtiger_fields after RC1 - Release +'LBL_CHOOSE_A_VIEW'=>'Selecione uma Visualização...', +'LBL_ALL'=>'Todos', +'LBL_LOW'=>'Baixa', +'LBL_MEDIUM'=>'Média', +'LBL_HIGH'=>'Alta', +'LBL_CRITICAL'=>'Crítica', +//Added vtiger_fields for 4GA +'Assigned To'=>'Responsável', +'Contact Name'=>'Nome Contato', +'Priority'=>'Prioridade', +'Status'=>'Status', +'Category'=>'Categoria', +'Update History'=>'Histórico do Update', +'Created Time'=>'Hora Criação', +'Modified Time'=>'Hora Modificação', +'Title'=>'Título', +'Description'=>'Descrição', + +'LBL_TICKET_CUMULATIVE_STATISTICS'=>'Estatísticas Cumulativa do Ticket:', +'LBL_CASE_TOPIC'=>'Tópico do Caso', +'LBL_OPEN'=>'Aberto', +'LBL_CLOSED'=>'Fechado', +'LBL_TOTAL'=>'Total', +'LBL_TICKET_HISTORY'=>'Histórico do Ticket:', +'LBL_CATEGORIES'=>'Categorias', +'LBL_PRIORITIES'=>'Prioridades', +'LBL_SUPPORTERS'=>'Suporte', + +//Added vtiger_fields after 4_0_1 +'LBL_TICKET_RESOLUTION'=>'Dados da Solução', +'Solution'=>'Solução', +'Add Comment'=>'Adicionar Comentário', +'LBL_ADD_COMMENT'=>'Adicionar Comentário',//give the same value given to the above string 'Add Comment' + +//Added for 4.2 Release -- CustomView +'Ticket ID'=>'No. Ticket', +'Subject'=>'Assunto', + +//Added after 4.2 alpha +'Severity'=>'Gravidade', +'Product Name'=>'Nome Produto', +'Related To'=>'Relacionado à', +'LBL_MORE'=>'Mais', + +'LBL_TICKETS'=>'Tickets', + +//Added on 09-12-2005 +'LBL_CUMULATIVE_STATISTICS'=>'Estatísticas Acumuladas', + +//Added on 12-12-2005 +'LBL_CONVERT_AS_FAQ_BUTTON_TITLE'=>'Converter em FAQ', +'LBL_CONVERT_AS_FAQ_BUTTON_KEY'=>'C', +'LBL_CONVERT_AS_FAQ_BUTTON_LABEL'=>'Converter em FAQ', +'Attachment'=>'Anexo', +'LBL_COMMENT_INFORMATION'=> 'Informação Observações', + +//Added for existing picklist entries + +'Big Problem'=>'Problema Grande', +'Small Problem'=>'Problema Pequeno', +'Other Problem'=>'Outro Problema', + +'Low'=>'Baixa', +'Normal'=>'Normal', +'High'=>'Alta', +'Urgent'=>'Urgente', + +'Minor'=>'Menor', +'Major'=>'Maior', +'Feature'=>'Normal', +'Critical'=>'Crítico', + +'Open'=>'Aberto', +'In Progress'=>'Em Processo', +'Wait For Response'=>'Aguarda Resposta', +'Closed'=>'Fechado', + +//added to support i18n in ticket mails +'Hi' => 'Olá', +'Dear'=> 'Prezado(a)', +'LBL_PORTAL_BODY_MAILINFO' => 'O Ticket em referência foi', +'LBL_DETAIL' => 'e os detalhes do mesmo são apresentados abaixo:', +'LBL_REGARDS'=> 'Cordialmente', +'LBL_TEAM'=> 'Equipe HelpDesk', +'LBL_TICKET_DETAILS' => 'Detalhes Ticket', +'LBL_SUBJECT' => 'Assunto : ', +'created' => 'criado', +'replied' => 'respondido', +'reply'=>'Existe uma resposta para', +'customer_portal' => ' no nosso "Portal do Cliente".', +'link' => ' Você pode utilizar o seguinte link para visualizar a resposta:', +'Thanks' => 'Obrigado', +'Support_team' => 'Equipe Suporte vtiger', +'The comments are' => 'Os comentários são', +'Ticket Title' => 'Título Ticket', +'Re' => 'Re :', +// Added/Updated for vtiger CRM 5.0.4 + +//this label for customerportal. +'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. +'LBL_STATUS_UPDATE' => 'Status do Ticket foi atualizado como', +'LBL_COULDNOT_CLOSED' => 'O Ticket não pode ser', +'LBL_CUSTOMER_COMMENTS' => 'O Cliente forneceu a seguinte informação adicional para sua resposta:', +'LBL_RESPOND'=> 'Por gentileza, responda este ticket o mais rápido possível.', +'LBL_REGARDS' =>'Cordialmente', +'LBL_SUPPORT_ADMIN' => 'Administrador Suporte', +'LBL_RESPONDTO_TICKETID' =>'Responder Ticket No.', +'LBL_CUSTOMER_PORTAL' => ' no Portal do Cliente - URGENTE', +'LBL_LOGIN_DETAILS' => 'Estes são seus detalhes de login no Portal do Cliente :', +'LBL_MAIL_COULDNOT_SENT' =>'A mensagem não pode ser enviada', +'LBL_USERNAME' => 'Nome Usuário :', +'LBL_PASSWORD' => 'Senha :', +'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Observar os detalhes de login no Portal do Cliente', +'LBL_GIVE_MAILID' => 'Por gentileza, informe seu e-mail', +'LBL_CHECK_MAILID' => 'Por favor, verifique seu e-mail para o Portal do Cliente', +'LBL_LOGIN_REVOKED' => 'Seu login foi cancelado. Por favor, contacte o Administrador do Sistema.', +'LBL_MAIL_SENT' => 'Mensagem enviada para seu e-mail com detalhes do login no Portal do Cliente.', +'LBL_ALTBODY' => 'Este é o corpo da mensagem em texto simples para programas de e-mail que não suportam HTML', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Ticket No' => 'No. Ticket', +// END + +'Hours' => 'Horas', +'Days' => 'Dias', + +'From Portal' => 'Do Portal', +'HelpDesk ID' => 'ID Tickets', +); + +?> diff --git a/modules/HelpDesk/language/zh_cn.lang.php b/modules/HelpDesk/language/zh_cn.lang.php new file mode 100644 index 0000000..6046bc1 --- /dev/null +++ b/modules/HelpDesk/language/zh_cn.lang.php @@ -0,0 +1,230 @@ +'故障单', +'LBL_GROUP'=>'组', +'LBL_ACCOUNT_NAME'=>'客户名称', +'LBL_CONTACT_NAME'=>'联系人名称', +'LBL_SUBJECT'=>'主题', +'LBL_NEW_FORM_TITLE' => '新故障单', +'LBL_DESCRIPTION'=>'描述', +'NTC_DELETE_CONFIRMATION'=>'您确定删除这条记录吗?', +'LBL_CUSTOM_FIELD_SETTINGS'=>'自定义字段设置:', +'LBL_PICKLIST_FIELD_SETTINGS'=>'Picklist Field Settings:', +'Leads'=>'Lead', +'Accounts'=>'Organization', +'Contacts'=>'Contact', +'Opportunities'=>'Opportunity', +'LBL_CUSTOM_INFORMATION'=>'自定义信息', +'LBL_DESCRIPTION_INFORMATION'=>'描述信息', + +'LBL_ACCOUNT'=>'Organization', +'LBL_OPPURTUNITY'=>'Oppurtunity', +'LBL_PRODUCT'=>'Product', + +'LBL_COLON'=>':', +'LBL_TICKET'=>'故障单', +'LBL_CONTACT'=>'联系人', +'LBL_STATUS'=>'状态', +'LBL_ASSIGNED_TO'=>'指派给', +'LBL_FAQ'=>'常见问题', +'LBL_VIEW_FAQS'=>'查看常见问题', +'LBL_ADD_FAQS'=>'新增常见问题', +'LBL_FAQ_CATEGORIES'=>'常见问题分类', + +'LBL_PRIORITY'=>'优先级', +'LBL_CATEGORY'=>'分类', + +'LBL_ANSWER'=>'回答', +'LBL_COMMENTS'=>'评论与备注', + +'LBL_AUTHOR'=>'作者', +'LBL_QUESTION'=>'问题', + +//Added vtiger_fields for File Attachment and Mail send in Tickets +'LBL_ATTACHMENTS'=>'附件', +'LBL_NEW_ATTACHMENT'=>'新附件', +'LBL_SEND_MAIL'=>'发送邮件', + +//Added vtiger_fields for search option in TicketsList -- 4Beta +'LBL_CREATED_DATE'=>'创建日期', +'LBL_IS'=>'is', +'LBL_IS_NOT'=>'is not', +'LBL_IS_BEFORE'=>'is before', +'LBL_IS_AFTER'=>'is after', +'LBL_STATISTICS'=>'Statistics', +'LBL_TICKET_ID'=>'Ticket Id', +'LBL_MY_TICKETS'=>'My Tickets', +"LBL_MY_FAQ"=>"My Faq's", +'LBL_ESTIMATED_FINISHING_TIME'=>'Estimated Finishing Time', +'LBL_SELECT_TICKET'=>'Select Ticket', +'LBL_CHANGE_OWNER'=>'Change Owner', +'LBL_CHANGE_STATUS'=>'Change Status', +'LBL_TICKET_TITLE'=>'名称', +'LBL_TICKET_DESCRIPTION'=>'描述', +'LBL_TICKET_CATEGORY'=>'分类', +'LBL_TICKET_PRIORITY'=>'优先级', + +//Added vtiger_fields after 4 -- Beta +'LBL_NEW_TICKET'=>'新故障单', +'LBL_TICKET_INFORMATION'=>'故障单信息', + +'LBL_LIST_FORM_TITLE'=>'故障单列表', +'LBL_SEARCH_FORM_TITLE'=>'故障单查询', + +//Added vtiger_fields after RC1 - Release +'LBL_CHOOSE_A_VIEW'=>'选择一个视图...', +'LBL_ALL'=>'全部', +'LBL_LOW'=>'低', +'LBL_MEDIUM'=>'中', +'LBL_HIGH'=>'高', +'LBL_CRITICAL'=>'Critical', +//Added vtiger_fields for 4GA +'Assigned To'=>'指派给', +'Contact Name'=>'联系人名字', +'Priority'=>'优先级', +'Status'=>'状态', +'Category'=>'分类', +'Update History'=>'更新历史', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', +'Title'=>'名称', +'Description'=>'描述', + +'LBL_TICKET_CUMULATIVE_STATISTICS'=>'Ticket Cumulative Statistics:', +'LBL_CASE_TOPIC'=>'Case Topic', +'LBL_OPEN'=>'Open', +'LBL_CLOSED'=>'Closed', +'LBL_TOTAL'=>'Total', +'LBL_TICKET_HISTORY'=>'Ticket History', +'LBL_CATEGORIES'=>'Categories', +'LBL_PRIORITIES'=>'Priorities', +'LBL_SUPPORTERS'=>'Supporters', + +//Added vtiger_fields after 4_0_1 +'LBL_TICKET_RESOLUTION'=>'Solution Information', +'Solution'=>'Solution', +'Add Comment'=>'Add Comment', +'LBL_ADD_COMMENT'=>'Add Comment',//give the same value given to the above string 'Add Comment' + +//Added for 4.2 Release -- CustomView +'Ticket ID'=>'故障单序号', +'Subject'=>'主题', + +//Added after 4.2 alpha +'Severity'=>'重要性', +'Product Name'=>'产品名称', +'Related To'=>'相关于', +'LBL_MORE'=>'更多', + +'LBL_TICKETS'=>'Tickets', + +//Added on 09-12-2005 +'LBL_CUMULATIVE_STATISTICS'=>'Cumulative Statistics', + +//Added on 12-12-2005 +'LBL_CONVERT_AS_FAQ_BUTTON_TITLE'=>'Convert As FAQ', +'LBL_CONVERT_AS_FAQ_BUTTON_KEY'=>'C', +'LBL_CONVERT_AS_FAQ_BUTTON_LABEL'=>'Convert As FAQ', +'Attachment'=>'Attachment', +'LBL_COMMENT_INFORMATION'=>'Comment Information', + +//Added for existing picklist entries + +'Big Problem'=>'大问题', +'Small Problem'=>'小问题', +'Other Problem'=>'其他问题', + +'Low'=>'低', +'Normal'=>'中', +'High'=>'高', +'Urgent'=>'紧急', + +'Minor'=>'滞后', +'Major'=>'一般', +'Feature'=>'快速', +'Critical'=>'紧急', + +'Open'=>'开放', +'In Progress'=>'正在处理', +'Wait For Response'=>'等待响应', +'Closed'=>'关闭', + +//added to support i18n in ticket mails +'Hi' => 'Hi', +'Dear'=> 'Dear', +'LBL_PORTAL_BODY_MAILINFO'=> 'The Ticket is', +'LBL_DETAIL' => 'the details are :', +'LBL_REGARDS'=> 'Regards', +'LBL_TEAM'=> 'HelpDesk Team', +'LBL_TICKET_DETAILS' => 'Ticket Details', +'LBL_SUBJECT' => 'Subject : ', +'created' => 'created', +'replied' => 'replied', +'reply'=>'There is a reply to', +'customer_portal' => 'in the "Customer Portal" at VTiger.', +'link' => 'You can use the following link to view the replies made:', +'Thanks' => 'Thanks', +'Support_team' => 'Vtiger Support Team', +'The comments are' => 'The comments are', +'Ticket Title' => 'Ticket Title', +'Re' => 'Re :', +// Added/Updated for vtiger CRM 5.0.4 + +//this label for customerportal. +'LBL_STATUS_CLOSED' =>'Closed',//Do not convert this label. This is used to check the status. If the status 'Closed' is changed in vtigerCRM server side then you have to change in customerportal language file also. +'LBL_STATUS_UPDATE' => 'Ticket status is updated as', +'LBL_COULDNOT_CLOSED' => 'Ticket could not be', +'LBL_CUSTOMER_COMMENTS' => 'Customer has provided the following additional information to your reply:', +'LBL_RESPOND'=> 'Kindly respond to above ticket at the earliest.', +'LBL_REGARDS' =>'Regards', +'LBL_SUPPORT_ADMIN' => 'Support Administrator', +'LBL_RESPONDTO_TICKETID' =>'Respond to Ticket ID', +'LBL_CUSTOMER_PORTAL' => 'in Customer Portal - URGENT', +'LBL_LOGIN_DETAILS' => 'Following are your Customer Portal login details :', +'LBL_MAIL_COULDNOT_SENT' =>'Mail could not be sent', +'LBL_USERNAME' => 'User Name :', +'LBL_PASSWORD' => 'Password :', +'LBL_SUBJECT_PORTAL_LOGIN_DETAILS' => 'Regarding your Customer Portal login details', +'LBL_GIVE_MAILID' => 'Please give your email id', +'LBL_CHECK_MAILID' => 'Please check your email id for Customer Portal', +'LBL_LOGIN_REVOKED' => 'Your login is revoked. Please contact your admin.', +'LBL_MAIL_SENT' => 'Mail has been sent to your mail id with the customer portal login details', +'LBL_ALTBODY' => 'This is the body in plain text for non-HTML mail clients', + +// Added after 5.0.4 GA + +// Module Sequence Numbering +'Ticket No' => '故障单编号', +// END + +'Hours' => '小时', +'Days' => '天', + +'From Portal' => 'From Portal', +'HelpDesk ID' => 'Trouble Tickets ID', +); + +?> diff --git a/modules/HelpDesk/updateRelations.php b/modules/HelpDesk/updateRelations.php new file mode 100644 index 0000000..eacef81 --- /dev/null +++ b/modules/HelpDesk/updateRelations.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/modules/Home/HomeAjax.php b/modules/Home/HomeAjax.php new file mode 100644 index 0000000..27b1041 --- /dev/null +++ b/modules/Home/HomeAjax.php @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/modules/Home/HomeBlock.php b/modules/Home/HomeBlock.php new file mode 100644 index 0000000..fafdaf9 --- /dev/null +++ b/modules/Home/HomeBlock.php @@ -0,0 +1,70 @@ +assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); + +if(!empty($_REQUEST['homestuffid'])){ + $stuffid = $_REQUEST['homestuffid']; +} +if(!empty($_REQUEST['blockstufftype'])){ + $stufftype = $_REQUEST['blockstufftype']; +} + +if($stufftype=='Tag Cloud'){ + $freetag = new freetag(); + $smarty->assign("ALL_TAG",$freetag->get_tag_cloud_html("",$current_user->id)); + $smarty->display("Home/TagCloud.tpl"); +}elseif($stufftype == 'Notebook'){ + $contents = $homeObj->getNoteBookContents($stuffid); + $smarty->assign("NOTEBOOK_CONTENTS",$contents); + $smarty->assign("NOTEBOOKID", $stuffid); + $smarty->display("Home/notebook.tpl"); +}elseif($stufftype == 'URL'){ + $url = $homeObj->getWidgetURL($stuffid); + if(strpos($url, "://") === false){ + $url = "http://".trim($url); + } + $smarty->assign("URL",$url); + $smarty->assign("WIDGETID", $stuffid); + $smarty->display("Home/HomeWidgetURL.tpl"); +}else{ + $homestuff_values=$homeObj->getHomePageStuff($stuffid,$stufftype); + if($stufftype=="DashBoard"){ + $homeObj->getDashDetails($stuffid,'type'); + $dashdet=$homeObj->dashdetails; + } + if($stufftype=="ReportCharts"){ + $homeObj->getReportChartDetails($stuffid,'type'); + $dashdet = $homeObj->reportdetails; + } +} + +$smarty->assign("DASHDETAILS",$dashdet); +$smarty->assign("HOME_STUFFTYPE",$stufftype); +$smarty->assign("HOME_STUFFID",$stuffid); +$smarty->assign("HOME_STUFF",$homestuff_values); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); + +$smarty->display("Home/HomeBlock.tpl"); +?> diff --git a/modules/Home/HomeNews.php b/modules/Home/HomeNews.php new file mode 100644 index 0000000..adac778 --- /dev/null +++ b/modules/Home/HomeNews.php @@ -0,0 +1,32 @@ +vt_dofetch('http://www.vtiger.com/products/crm/newsfeed.php', $ftimeout); +$items = $fparser->get_items(); +$NEWSLIST = Array(); +foreach($items as $item) { + $NEWSLIST[] = $item; +} + +require_once('Smarty_setup.php'); +$smarty = new vtigerCRM_Smarty; +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", "themes/$theme/images/"); +$smarty->assign('NEWSLIST', $NEWSLIST); +$smarty->display("HomeNews.tpl"); +?> + diff --git a/modules/Home/HomeReportChart.php b/modules/Home/HomeReportChart.php new file mode 100644 index 0000000..d6c856d --- /dev/null +++ b/modules/Home/HomeReportChart.php @@ -0,0 +1,29 @@ +pquery($summaryReportQuery, array()); + +$selectElement = ''; +echo $selectElement; +?> diff --git a/modules/Home/HomeUtils.php b/modules/Home/HomeUtils.php new file mode 100644 index 0000000..45f4de8 --- /dev/null +++ b/modules/Home/HomeUtils.php @@ -0,0 +1,244 @@ +getDisplayDate(); + $userStartDateTime = new DateTimeField($userStartDate.' 00:00:00'); + $startDateTime = $userStartDateTime->getDBInsertDateTimeValue(); + + $userEndDateTime = new DateTimeField($userStartDate.' 23:59:00'); + $endDateTime = $userEndDateTime->getDBInsertDateTimeValue(); + + $upcoming_condition = " AND (CAST((CONCAT(date_start,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime' + OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime')"; + + $list_query = " select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,". + "vtiger_crmentity.setype, vtiger_recurringevents.recurringdate, vtiger_activity.* ". + "from vtiger_activity inner join vtiger_crmentity on vtiger_crmentity.crmid=". + "vtiger_activity.activityid LEFT JOIN vtiger_groups ON vtiger_groups.groupid = ". + "vtiger_crmentity.smownerid left outer join vtiger_recurringevents on ". + "vtiger_recurringevents.activityid=vtiger_activity.activityid"; + $list_query .= getNonAdminAccessControlQuery('Calendar',$current_user); + $list_query .= "WHERE vtiger_crmentity.deleted=0 and vtiger_activity.activitytype not in ". + "('Emails') AND ( vtiger_activity.status is NULL OR vtiger_activity.status not in ". + "('Completed','Deferred')) and ( vtiger_activity.eventstatus is NULL OR ". + "vtiger_activity.eventstatus not in ('Held','Not Held') )".$upcoming_condition; + + $list_query.= " GROUP BY vtiger_activity.activityid"; + $list_query.= " ORDER BY date_start,time_start ASC"; + $list_query.= " limit $maxval"; + + $res = $adb->query($list_query); + $noofrecords = $adb->num_rows($res); + if($calCnt == 'calculateCnt'){ + return $noofrecords; + } + + $open_activity_list = array(); + if ($noofrecords>0){ + for($i=0;$i<$noofrecords;$i++){ + $dateValue = $adb->query_result($res,$i,'date_start') . ' ' . + $adb->query_result($res,$i,'time_start'); + $endDateValue = $adb->query_result($res,$i,'due_date') . ' ' . + $adb->query_result($res,$i,'time_end'); + $recurringDateValue = $adb->query_result($res,$i,'due_date') . ' ' . + $adb->query_result($res,$i,'time_start'); + $date = new DateTimeField($dateValue); + $endDate = new DateTimeField($endDateValue); + $recurringDate = new DateTimeField($recurringDateValue); + + $open_activity_list[] = array('name' => $adb->query_result($res,$i,'subject'), + 'id' => $adb->query_result($res,$i,'activityid'), + 'type' => $adb->query_result($res,$i,'activitytype'), + 'module' => $adb->query_result($res,$i,'setype'), + 'date_start' => $date->getDisplayDate(), + 'due_date' => $endDate->getDisplayDate(), + 'recurringdate' => $recurringDate->getDisplayDate(), + 'priority' => $adb->query_result($res,$i,'priority'), + ); + } + } + $values = getActivityEntries($open_activity_list); + $values['ModuleName'] = 'Calendar'; + $values['search_qry'] = "&action=ListView&from_homepage=upcoming_activities"; + + return $values; +} + +/** + * this function returns the activity entries in array format + * it takes in an array containing activity details as a parameter + * @param array $open_activity_list - the array containing activity details + * return array $values - activities record in array format + */ +function getActivityEntries($open_activity_list){ + global $current_language, $app_strings; + $current_module_strings = return_module_language($current_language, 'Calendar'); + if(!empty($open_activity_list)){ + $header=array(); + $header[] =$current_module_strings['LBL_LIST_SUBJECT']; + $header[] =$current_module_strings['Type']; + + $entries = array(); + foreach($open_activity_list as $event){ + $recur_date=preg_replace('/--/','',$event['recurringdate']); + if($recur_date!=""){ + $event['date_start']=$event['recurringdate']; + } + $font_color_high = "color:#00DD00;"; + $font_color_medium = "color:#DD00DD;"; + + switch ($event['priority']){ + case 'High': + $font_color=$font_color_high; + break; + case 'Medium': + $font_color=$font_color_medium; + break; + default: + $font_color=''; + } + + if($event['type'] != 'Task' && $event['type'] != 'Emails' && $event['type'] != ''){ + $activity_type = 'Events'; + }else{ + $activity_type = 'Task'; + } + + $entries[$event['id']] = array( + '0' => ''.$event["name"].'', + '1' => $event["type"], + ); + } + $values = array('noofactivities'=>count($open_activity_list),'Header'=>$header,'Entries'=>$entries); + }else{ + $values = array('noofactivities'=>count($open_activity_list), 'Entries'=> + '
'.$app_strings['LBL_NO_DATA'].'
'); + } + return $values; +} + + +/** + * function to get pending activities for today + * @param integer $maxval - the maximum number of records to display + * @param integer $calCnt - returns the count query if this is set + * return array $values - activities record in array format + */ +function homepage_getPendingActivities($maxval,$calCnt){ + require_once("data/Tracker.php"); + require_once("include/utils/utils.php"); + require_once('include/utils/CommonUtils.php'); + + global $adb; + global $current_user; + + $dbStartDateTime = new DateTimeField(date('Y-m-d H:i:s')); + $userStartDate = $dbStartDateTime->getDisplayDate(); + $userStartDateTime = new DateTimeField($userStartDate.' 00:00:00'); + $startDateTime = $userStartDateTime->getDBInsertDateTimeValue(); + + $userEndDateTime = new DateTimeField($userStartDate.' 23:59:00'); + $endDateTime = $userEndDateTime->getDBInsertDateTimeValue(); + + $pending_condition = " AND (CAST((CONCAT(date_start,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime' + OR CAST((CONCAT(vtiger_recurringevents.recurringdate,' ',time_start)) AS DATETIME) BETWEEN '$startDateTime' AND '$endDateTime')"; + + $list_query = "select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity.". + "setype, vtiger_recurringevents.recurringdate, vtiger_activity.* from vtiger_activity ". + "inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid LEFT ". + "JOIN vtiger_groups ON vtiger_groups.groupid = vtiger_crmentity.smownerid left outer join ". + "vtiger_recurringevents on vtiger_recurringevents.activityid=vtiger_activity.activityid". + $list_query .= getNonAdminAccessControlQuery('Calendar',$current_user); + $list_query .= "WHERE vtiger_crmentity.deleted=0 and (vtiger_activity.activitytype not in ". + "('Emails')) AND (vtiger_activity.status is NULL OR vtiger_activity.status not in ". + "('Completed','Deferred')) and (vtiger_activity.eventstatus is NULL OR vtiger_activity.". + "eventstatus not in ('Held','Not Held')) ".$pending_condition; + + $list_query.= " GROUP BY vtiger_activity.activityid"; + $list_query.= " ORDER BY date_start,time_start ASC"; + $list_query.= " limit $maxval"; + + $res = $adb->query($list_query); + $noofrecords = $adb->num_rows($res); + if($calCnt == 'calculateCnt'){ + return $noofrecords; + } + + $open_activity_list = array(); + $noofrows = $adb->num_rows($res); + if (count($res)>0){ + for($i=0;$i<$noofrows;$i++){ + $dateValue = $adb->query_result($res,$i,'date_start') . ' ' . + $adb->query_result($res,$i,'time_start'); + $endDateValue = $adb->query_result($res,$i,'due_date') . ' ' . + $adb->query_result($res,$i,'time_end'); + $recurringDateValue = $adb->query_result($res,$i,'due_date') . ' ' . + $adb->query_result($res,$i,'time_start'); + $date = new DateTimeField($dateValue); + $endDate = new DateTimeField($endDateValue); + $recurringDate = new DateTimeField($recurringDateValue); + + $open_activity_list[] = array('name' => $adb->query_result($res,$i,'subject'), + 'id' => $adb->query_result($res,$i,'activityid'), + 'type' => $adb->query_result($res,$i,'activitytype'), + 'module' => $adb->query_result($res,$i,'setype'), + 'date_start' => $date->getDisplayDate(), + 'due_date' => $endDate->getDisplayDate(), + 'recurringdate' => $recurringDate->getDisplayDate(), + 'priority' => $adb->query_result($res,$i,'priority'), + ); + } + } + + $values = getActivityEntries($open_activity_list); + $values['ModuleName'] = 'Calendar'; + $values['search_qry'] = "&action=ListView&from_homepage=pending_activities"; + + return $values; +} + + +/** + * this function returns the number of columns in the home page for the current user. + * if nothing is found in the database it returns 4 by default + * return integer $data - the number of columns + */ +function getNumberOfColumns(){ + global $current_user, $adb; + + $sql = "select * from vtiger_home_layout where userid=?"; + $result = $adb->pquery($sql, array($current_user->id)); + + if($adb->num_rows($result)>0){ + $data = $adb->query_result($result,0,"layout"); + }else{ + $data = 4; //default is 4 column layout for now + } + return $data; +} +?> \ No newline at end of file diff --git a/modules/Home/HomeWidgetBlockList.php b/modules/Home/HomeWidgetBlockList.php new file mode 100644 index 0000000..970daca --- /dev/null +++ b/modules/Home/HomeWidgetBlockList.php @@ -0,0 +1,77 @@ +assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); + +foreach ($widgetInfoList as $widgetInfo) { + $widgetType = $widgetInfo['widgetType']; + $widgetId = $widgetInfo['widgetId']; + if($widgetType=='Tag Cloud'){ + $freetag = new freetag(); + $smarty->assign("ALL_TAG",$freetag->get_tag_cloud_html("",$current_user->id)); + $html = $smarty->fetch("Home/TagCloud.tpl"); + }elseif($widgetType == 'Notebook'){ + $contents = $homeObj->getNoteBookContents($widgetId); + $smarty->assign("NOTEBOOK_CONTENTS",$contents); + $smarty->assign("NOTEBOOKID", $widgetId); + $html = $smarty->fetch("Home/notebook.tpl"); + }elseif($widgetType == 'URL'){ + $url = $homeObj->getWidgetURL($widgetId); + if(strpos($url, "://") === false){ + $url = "http://".trim($url); + } + $smarty->assign("URL",$url); + $smarty->assign("WIDGETID", $widgetId); + $html = $smarty->fetch("Home/HomeWidgetURL.tpl"); + }else{ + $homestuff_values=$homeObj->getHomePageStuff($widgetId,$widgetType); + $html = ''; + if($widgetType == "DashBoard"){ + $homeObj->getDashDetails($widgetId,'type'); + $dashdet=$homeObj->dashdetails; + $smarty->assign("DASHDETAILS",$dashdet); + } + } + $smarty->assign("HOME_STUFFTYPE",$widgetType); + $smarty->assign("HOME_STUFFID",$widgetId); + $smarty->assign("HOME_STUFF",$homestuff_values); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + + $html .= $smarty->fetch("Home/HomeBlock.tpl"); + $widgetHTML[$widgetId] = $html; +} +echo Zend_JSON::encode($widgetHTML); +?> \ No newline at end of file diff --git a/modules/Home/HomeWidgetsSave.php b/modules/Home/HomeWidgetsSave.php new file mode 100644 index 0000000..4e72328 --- /dev/null +++ b/modules/Home/HomeWidgetsSave.php @@ -0,0 +1,30 @@ +id; + for($i = 0;$i < count($values);$i++) + { if($values[$i] != null){ + $query=" update vtiger_homestuff,vtiger_homedefault set vtiger_homestuff.visible=0 where vtiger_homestuff.stuffid=vtiger_homedefault.stuffid and vtiger_homestuff.userid=".$userId." and vtiger_homedefault.hometype='".$values[$i]."'";//To show the default Homestuff on the the Home Page + $result=$adb->query($query); + } + } + } +} +?> \ No newline at end of file diff --git a/modules/Home/Homestuff.js b/modules/Home/Homestuff.js new file mode 100644 index 0000000..ba09053 --- /dev/null +++ b/modules/Home/Homestuff.js @@ -0,0 +1,836 @@ +/*+******************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + *******************************************************************************/ + +/** + * this function is used to show hide the columns in the add widget div based on the option selected + * @param string typeName - the selected option + */ +function chooseType(typeName){ + $('vtbusy_info').style.display="inline"; + $('stufftype_id').value=typeName; + + var typeLabel = typeName; + if(alert_arr[typeName] != null && alert_arr[typeName] != "" && alert_arr[typeName] != 'undefined'){ + typeLabel = alert_arr[typeName]; + } + if(typeLabel == 'defaultwidget'){ + $('divHeader').innerHTML=""+alert_arr.LBL_SELECT+""; + $('vtbusy_info').style.display="inline"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&home=homewidget', + onComplete: function(response){ + var responseVal=response.responseText; + $('home').innerHTML=response.responseText; + show('addWidgetsDiv'); + placeAtCenter($('addWidgetsDiv')); + $('homewidget').style.display="block"; + $('moduleNameRow').style.display="none"; + $('moduleFilterRow').style.display="none"; + $('modulePrimeRow').style.display="none"; + $('rssRow').style.display="none"; + $('showrow').style.display="none"; + $('dashTypeRow').style.display="none"; + $('dashNameRow').style.display="none"; + $('StuffTitleId').style.display="none"; + $('vtbusy_info').style.display="none"; + $('reportNameRow').style.display="none"; + $('reportTypeRow').style.display="none"; + } + } + ); + }else{ + $('divHeader').innerHTML=""+alert_arr.LBL_ADD+typeLabel+""; + } + if(typeName=='Module'){ + $('moduleNameRow').style.display="block"; + $('moduleFilterRow').style.display="block"; + $('modulePrimeRow').style.display="block"; + $('showrow').style.display="block"; + $('rssRow').style.display="none"; + $('dashNameRow').style.display="none"; + $('dashTypeRow').style.display="none"; + $('StuffTitleId').style.display="block"; + $('homewidget').style.display="none"; + $('reportNameRow').style.display="none"; + $('reportTypeRow').style.display="none"; + //$('homeURLField').style.display = "none"; + }else if(typeName=='DashBoard'){ + $('moduleNameRow').style.display="none"; + $('moduleFilterRow').style.display="none"; + $('modulePrimeRow').style.display="none"; + $('rssRow').style.display="none"; + $('showrow').style.display="none"; + $('dashNameRow').style.display="block"; + $('dashTypeRow').style.display="block"; + $('StuffTitleId').style.display="block"; + $('reportNameRow').style.display="none"; + $('reportTypeRow').style.display="none"; + $('homewidget').style.display="none"; + //$('homeURLField').style.display = "none"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&dash=dashboard', + onComplete: function(response){ + var responseVal=response.responseText; + $('selDashName').innerHTML=response.responseText; + show('addWidgetsDiv'); + placeAtCenter($('addWidgetsDiv')); + $('vtbusy_info').style.display="none"; + } + } + ); + }else if(typeName=='RSS'){ + $('moduleNameRow').style.display="none"; + $('moduleFilterRow').style.display="none"; + $('modulePrimeRow').style.display="none"; + $('showrow').style.display="block"; + $('rssRow').style.display="block"; + $('dashNameRow').style.display="none"; + $('dashTypeRow').style.display="none"; + $('StuffTitleId').style.display="block"; + $('homewidget').style.display="none"; + $('vtbusy_info').style.display="none"; + $('reportNameRow').style.display="none"; + $('reportTypeRow').style.display="none"; + //$('homeURLField').style.display = "none"; + }else if(typeName=='Default'){ + $('moduleNameRow').style.display="none"; + $('moduleFilterRow').style.display="none"; + $('modulePrimeRow').style.display="none"; + $('showrow').style.display="none"; + $('rssRow').style.display="none"; + $('dashNameRow').style.display="none"; + $('dashTypeRow').style.display="none"; + $('StuffTitleId').style.display="none"; + $('homewidget').style.display="none"; + $('url_id').style.display = "none"; + $('reportNameRow').style.display="none"; + $('reportTypeRow').style.display="none"; + }else if(typeName == 'Notebook'){ + $('moduleNameRow').style.display="none"; + $('moduleFilterRow').style.display="none"; + $('modulePrimeRow').style.display="none"; + $('showrow').style.display="none"; + $('rssRow').style.display="none"; + $('dashNameRow').style.display="none"; + $('dashTypeRow').style.display="none"; + $('StuffTitleId').style.display="block"; + $('vtbusy_info').style.display="none"; + $('homewidget').style.display="none"; + $('reportNameRow').style.display="none"; + $('reportTypeRow').style.display="none"; + //$('homeURLField').style.display = "none"; + } + else if(typeName == 'ReportCharts'){ + $('moduleNameRow').style.display="none"; + $('moduleFilterRow').style.display="none"; + $('modulePrimeRow').style.display="none"; + $('rssRow').style.display="none"; + $('showrow').style.display="none"; + $('StuffTitleId').style.display="block"; + $('reportNameRow').style.display="block"; + $('reportTypeRow').style.display="block"; + $('vtbusy_info').style.display="none"; + $('dashNameRow').style.display="none"; + $('dashTypeRow').style.display="none"; + $('homewidget').style.display="none"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Home&action=HomeAjax&file=HomeReportChart&ajax=true', + onComplete: function(response) { + $('selReportName').innerHTML=response.responseText; + show('addWidgetsDiv'); + placeAtCenter($('addWidgetsDiv')); + $('vtbusy_info').style.display="none"; + } + } + ); + } + /*else if(typeName == 'URL'){ + $('moduleNameRow').style.display="none"; + $('moduleFilterRow').style.display="none"; + $('modulePrimeRow').style.display="none"; + $('showrow').style.display="none"; + $('rssRow').style.display="none"; + $('dashNameRow').style.display="none"; + $('dashTypeRow').style.display="none"; + $('StuffTitleId').style.display="block"; + $('vtbusy_info').style.display="none"; + //$('homeURLField').style.display = "block"; + }*/ +} + +/** + * this function is used to set the filter list when the module name is changed + * @param string modName - the modula name for which you want the filter list + */ +function setFilter(modName){ + var modval=modName.value; + document.getElementById('savebtn').disabled = true; + if(modval!=""){ + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&modname='+modval, + onComplete: function(response){ + var responseVal=response.responseText; + $('selModFilter_id').innerHTML=response.responseText; + setPrimaryFld(document.getElementById('selFilterid')); + show('addWidgetsDiv'); + placeAtCenter($('addWidgetsDiv')); + } + } + ); + } +} + +/** + * this function is used to set the field list when the module name is changed + * @param string modName - the modula name for which you want the field list + */ +function setPrimaryFld(Primeval){ + primecvid=Primeval.value; + var fldmodule = $('selmodule_id').options[$('selmodule_id').selectedIndex].value; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&primecvid='+primecvid+'&fieldmodname='+fldmodule, + onComplete: function(response){ + var responseVal=response.responseText; + $('selModPrime_id').innerHTML=response.responseText; + $('selPrimeFldid').selectedIndex = 0; + $('vtbusy_info').style.display="none"; + document.getElementById('savebtn').disabled = false; + } + } + ); +} + +/** + * this function displays the div for selecting the number of rows in a widget + * @param string sid - the id of the widget for which the div is being displayed + */ +function showEditrow(sid){ + $('editRowmodrss_'+sid).className="show_tab"; +} + +/** + * this function is used to hide the div for selecting the number of rows in a widget + * @param string editRow - the id of the div + */ +function cancelEntries(editRow){ + $(editRow).className="hide_tab"; +} + +/** + * this function is used to save the maximum entries that a widget can display + * @param string selMaxName - the widget name + */ +function saveEntries(selMaxName){ + sidarr=selMaxName.split("_"); + sid=sidarr[1]; + $('refresh_'+sid).innerHTML=$('vtbusy_homeinfo').innerHTML; + cancelEntries('editRowmodrss_'+sid) + showmax=$(selMaxName).value; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&showmaxval='+showmax+'&sid='+sid, + onComplete: function(response){ + var responseVal=response.responseText; + eval(response.responseText); + $('refresh_'+sid).innerHTML=''; + } + } + ); +} + +/** + * this function is used to save the dashboard values + */ +function saveEditDash(dashRowId){ + $('refresh_'+dashRowId).innerHTML=$('vtbusy_homeinfo').innerHTML; + cancelEntries('editRowmodrss_'+dashRowId); + var dashVal=''; + var iter=0; + for(iter=0;iter<3;iter++){ + if($('dashradio_'+[iter]).checked) + dashVal=$('dashradio_'+[iter]).value; + } + did=dashRowId; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&dashVal='+dashVal+'&did='+did, + onComplete: function(response){ + var responseVal=response.responseText; + eval(response.responseText); + $('refresh_'+did).innerHTML=''; + } + } + ); +} + +/** + * this function is used to delete widgets form the home page + * @param string sid - the stuffid of the widget + */ +function DelStuff(sid){ + if(confirm(alert_arr.SURE_TO_DELETE)){ + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&homestuffid='+sid, + onComplete: function(response){ + var responseVal=response.responseText; + if(response.responseText.indexOf('SUCCESS') > -1){ + var delchild = $('stuff_'+sid); + odeletedChild = $('MainMatrix').removeChild(delchild); + $('seqSettings').innerHTML= '
Widget deleted sucessfully.
'; + $('seqSettings').style.display = 'block'; + $('seqSettings').style.display = 'none'; + placeAtCenter($('seqSettings')); + Effect.Appear('seqSettings'); + setTimeout(hideSeqSettings,3000); + }else{ + alert(alert_arr.ERROR_DELETING_TRY_AGAIN) + } + } + } + ); + } +} + +/** + * this function loads the newly added div to the home page + * @param string stuffid - the id of the newly created div + * @param string stufftype - the stuff type for the new div (for e.g. rss) + */ +function loadAddedDiv(stuffid,stufftype){ + gstuffId = stuffid; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=NewBlock&stuffid='+stuffid+'&stufftype='+stufftype, + onComplete: function(response){ + var responseVal=response.responseText; + $('MainMatrix').style.display= 'none'; + $('MainMatrix').innerHTML = response.responseText + $('MainMatrix').innerHTML; + positionDivInAccord('stuff_'+gstuffId,'',stufftype); + initHomePage(); + loadStuff(stuffid,stufftype); + $('MainMatrix').style.display='block'; + } + } + ); +} + +/** + * this function is used to reload a widgets' content based on its id and type + * @param string stuffid - the widget id + * @param string stufftype - the type of the widget + */ +function loadStuff(stuffid,stufftype){ + $('refresh_'+stuffid).innerHTML=$('vtbusy_homeinfo').innerHTML; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomeBlock&homestuffid='+stuffid+'&blockstufftype='+stufftype, + onComplete: function(response){ + var responseVal=response.responseText; + $('stuffcont_'+stuffid).innerHTML=response.responseText; + if(stufftype=="Module"){ + if($('more_'+stuffid).value != null && $('more_'+stuffid).value != '') + $('a_'+stuffid).href = "index.php?module="+$('more_'+stuffid).value+"&action=ListView&viewname="+$('cvid_'+stuffid).value; + } + if(stufftype=="Default" && typeof($('a_'+stuffid)) != 'undefined'){ + if($('more_'+stuffid).value != ''){ + $('a_'+stuffid).style.display = 'block'; + var url = "index.php?module="+$('more_'+stuffid).value+"&action=index"; + if($('search_qry_'+stuffid)!=''){ + url += $('search_qry_'+stuffid).value; + } + $('a_'+stuffid).href = url; + }else{ + $('a_'+stuffid).style.display = 'none'; + } + } + if(stufftype=="RSS"){ + $('a_'+stuffid).href = $('more_'+stuffid).value; + } + if(stufftype=="DashBoard"){ + $('a_'+stuffid).href = "index.php?module=Dashboard&action=index&type="+$('more_'+stuffid).value; + } + if(stufftype=="ReportCharts"){ + $('a_'+stuffid).href = "index.php?module=Reports&action=SaveAndRun&record="+$('more_'+stuffid).value; + } + $('refresh_'+stuffid).innerHTML=''; + } + } + ); +} + +function loadAllWidgets(widgetInfoList, batchSize){ + var batchWidgetInfoList = []; + var widgetInfo = {}; + for(var index =0 ; index < widgetInfoList.length;++index) { + var widgetId = widgetInfoList[index].widgetId; + var widgetType = widgetInfoList[index].widgetType; + widgetInfo[widgetId] = widgetType; + $('refresh_'+widgetId).innerHTML=$('vtbusy_homeinfo').innerHTML; + batchWidgetInfoList.push(widgetInfoList[index]); + if((index > 0 && (index+1) % batchSize == 0) || index+1 == widgetInfoList.length) { + new Ajax.Request( + 'index.php',{ + queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomeWidgetBlockList&widgetInfoList=' + + JSON.stringify(batchWidgetInfoList), + onComplete: function(response){ + var responseVal=JSON.parse(response.responseText); + for(var widgetId in responseVal) { + if(responseVal.hasOwnProperty(widgetId)) { + $('stuffcont_'+widgetId).innerHTML = responseVal[widgetId]; + $('refresh_'+widgetId).innerHTML=''; + var widgetType = widgetInfo[widgetId]; + if(widgetType=="Module" && $('more_'+widgetId).value != null && + $('more_'+widgetId).value != '') { + $('a_'+widgetId).href = "index.php?module="+ + $('more_'+widgetId).value+"&action=ListView&viewname="+ + $('cvid_'+widgetId).value; + } else if(widgetType == "Default" && typeof($('a_'+widgetId)) != + 'undefined'){ + if(typeof $('more_'+widgetId) != 'undefined' && + $('more_'+widgetId).value != ''){ + $('a_'+widgetId).style.display = 'block'; + var url = "index.php?module="+$('more_'+widgetId).value+ + "&action=index"; + if($('search_qry_'+widgetId)!=''){ + url += $('search_qry_'+widgetId).value; + } + $('a_'+widgetId).href = url; + }else{ + $('a_'+widgetId).style.display = 'none'; + } + } else if(widgetType=="RSS"){ + $('a_'+widgetId).href = $('more_'+widgetId).value; + } else if(widgetType=="DashBoard"){ + $('a_'+widgetId).href = "index.php?module=Dashboard&action="+ + "index&type="+$('more_'+stuffid).value; + } + } + } + } + } + ); + batchWidgetInfoList = []; + } + } +} + +/** + * this function validates the form for creating a new widget + */ +function frmValidate(){ + if($('stufftype_id').value=="defaultwidget"){ + var namelist = new Array(); + $('vtbusy_info').style.display="block"; + var elem = document.getElementsByName("names") + for(var i = 0; i < elem.length; i++){ + if(elem[i].checked) { + namelist[i] = elem[i].value; + } + } + + var values = JSON.stringify(namelist); + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'action=HomeAjax&module=Home&file=HomeWidgetsSave&values='+encodeURIComponent(values), + onComplete: function(response) { + $('addWidgetsDiv').style.display="none"; + $('vtbusy_info').style.display="none"; + window.location.reload(); + } + } + ); + }else{ + if(trim($('stufftitle_id').value)==""){ + alert(alert_arr.LBL_ENTER_WINDOW_TITLE); + $('stufftitle_id').focus(); + return false; + } + if($('stufftype_id').value=="RSS"){ + if($('txtRss_id').value==""){ + alert(alert_arr.LBL_ENTER_RSS_URL); + $('txtRss_id').focus(); + return false; + } + } + /*if($('stufftype_id').value=="URL"){ + if($('url_id').value==""){ + alert("Please enter URL"); + $('url_id').focus(); + return false; + } + }*/ + if($('stufftype_id').value=="Module"){ + var selLen; + var fieldval=new Array(); + var cnt=0; + selVal=document.Homestuff.PrimeFld; + for(k=0;k2){ + alert(alert_arr.LBL_SELECT_ONLY_FIELDS); + selVal.focus(); + return false; + }else{ + document.Homestuff.fldname.value=fieldval; + } + } + var stufftype=$('stufftype_id').value; + var stufftitle=$('stufftitle_id').value; + $('stufftitle_id').value = ''; + var selFiltername=''; + var fldname=''; + var selmodule=''; + var maxentries=''; + var txtRss=''; + var seldashbd=''; + var seldashtype=''; + var seldeftype=''; + var selreport=''; + var selreportcharttype=''; + //var txtURL = ''; + + if(stufftype=="Module"){ + selFiltername =document.Homestuff.selFiltername[document.Homestuff.selFiltername.selectedIndex].value; + fldname = fieldval; + selmodule =$('selmodule_id').value; + maxentries =$('maxentryid').value; + }else if(stufftype=="RSS"){ + txtRss=$('txtRss_id').value; + maxentries =$('maxentryid').value; + }/*else if(stufftype=="URL"){ + txtURL=$('url_id').value; + }*/else if(stufftype=="DashBoard"){ + seldashbd=$('seldashbd_id').value; + seldashtype=$('seldashtype_id').value; + }else if(stufftype=="Default"){ + seldeftype=document.Homestuff.seldeftype[document.Homestuff.seldeftype.selectedIndex].value; + } + else if(stufftype=="ReportCharts"){ + selreport = $('selreportchart_id').value; + selreportcharttype = $('selreportcharttype_id').value; + } + + var url="stufftype="+stufftype+"&stufftitle="+stufftitle+"&selmodule="+selmodule+"&maxentries="+maxentries+"&selFiltername="+selFiltername+"&fldname="+encodeURIComponent(fldname)+"&txtRss="+txtRss+"&seldashbd="+seldashbd+"&seldashtype="+seldashtype+"&seldeftype="+seldeftype+"&selreport="+selreport+"&selreportcharttype="+selreportcharttype;//+'&txtURL='+txtURL; + var stuffarr=new Array(); + $('vtbusy_info').style.display="inline"; + + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=Homestuff&'+url, + onComplete: function(response){ + var responseVal=response.responseText; + if(!response.responseText){ + alert(alert_arr.LBL_ADD_HOME_WIDGET); + $('vtbusy_info').style.display="none"; + $('stufftitle_id').value=''; + $('txtRss_id').value=''; + return false; + }else{ + hide('addWidgetsDiv'); + $('vtbusy_info').style.display="none"; + $('stufftitle_id').value=''; + $('txtRss_id').value=''; + eval(response.responseText); + } + } + } + ); + } +} + +/** + * this function is used to hide the default widgets + * @param string sid - the id of the widget + */ +function HideDefault(sid){ + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody:'module=Home&action=HomeAjax&file=HomestuffAjax&stuffid='+sid+"&act=hide", + onComplete: function(response){ + var responseVal=response.responseText; + if(response.responseText.indexOf('SUCCESS') > -1){ + var delchild = $('stuff_'+sid); + odeletedChild = $('MainMatrix').removeChild(delchild); + $('seqSettings').innerHTML= '
'+alert_arr.LBL_WIDGET_HIDDEN+'.'+alert_arr.LBL_RESTORE_FROM_PREFERENCES+'.
'; + $('seqSettings').style.display = 'block'; + $('seqSettings').style.display = 'none'; + placeAtCenter($('seqSettings')); + Effect.Appear('seqSettings'); + setTimeout(hideSeqSettings,5000); + }else{ + alert(alert_arr.ERR_HIDING + '.'+ alert_arr.MSG_TRY_AGAIN + '.'); + } + } + } + ); +} + + +/** + * this function removes the widget dropdown window + */ +function fnRemoveWindow(){ + var tagName = document.getElementById('addWidgetDropDown').style.display= 'none'; +} + +/** + * this function displays the widget dropdown window + */ +function fnShowWindow(){ + var tagName = document.getElementById('addWidgetDropDown').style.display= 'block'; +} + +/** + * this function is used to postion the widgets on home on page resize + * @param string targetDiv - the id of the target widget + * @param string stufftitle - the title of the target widget + * @param string stufftype - the type of the target widget + */ +function positionDivInAccord(targetDiv,stufftitle,stufftype){ + var layout=$('homeLayout').value; + var widgetWidth; + var dashWidth; + + switch(layout){ + case '2': + widgetWidth = 49; + dashWidth = 98.6; + break; + case '3': + widgetWidth = 31; + dashWidth = 64; + break; + case '4': + widgetWidth = 24; + dashWidth = 48.6; + break; + default: + widgetWidth = 24; + dashWidth = 48.6; + break; + } + var mainX = parseInt(document.getElementById("MainMatrix").style.width); + if(stufftitle != vtdashboard_defaultDashbaordWidgetTitle && stufftype != "DashBoard" && stufftype != "ReportCharts"){ + var dx = mainX * widgetWidth/ 100; + }else{ + var dx = mainX * dashWidth / 100; + } + document.getElementById(targetDiv).style.width=dx + "%"; +} + +/** + * this function hides the seqSettings div + */ +function hideSeqSettings(){ + Effect.Fade('seqSettings'); +} + +/** + * this function fetches the homepage dashboard + * @param string stuffid - the id of the dashboard widget + */ +function fetch_homeDB(stuffid){ + $('refresh_'+stuffid).innerHTML=$('vtbusy_homeinfo').innerHTML; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Dashboard&action=DashboardAjax&file=HomepageDB', + onComplete: function(response){ + $('stuffcont_'+stuffid).style.display = 'none'; + $('stuffcont_'+stuffid).innerHTML=response.responseText; + $('refresh_'+stuffid).innerHTML=''; + Effect.Appear('stuffcont_'+stuffid); + } + } + ); +} + +/** + * this function initializes the homepage + */ +initHomePage = function(){ + Sortable.create( + "MainMatrix", + { + constraint:false,tag:'div',overlap:'Horizontal',handle:'headerrow', + onUpdate:function(){ + matrixarr = Sortable.serialize('MainMatrix').split("&"); + matrixseqarr=new Array(); + seqarr=new Array(); + for(x=0;xstufftype=$_REQUEST['stufftype']; +} + +if(!empty($_REQUEST['stufftitle'])){ + if(strlen($_REQUEST['stufftitle'])>100){ + $temp_str = substr($_REQUEST['stufftitle'],0,97)."..."; + $oHomestuff->stufftitle= $temp_str; + }else{ + $oHomestuff->stufftitle=$_REQUEST['stufftitle']; + } + // Remove HTML/PHP tags from the input + if(isset($oHomestuff->stufftitle)) { + $oHomestuff->stufftitle = strip_tags($oHomestuff->stufftitle); + } +} + +if(!empty($_REQUEST['selmodule'])){ + $oHomestuff->selmodule=$_REQUEST['selmodule']; +} + +if(!empty($_REQUEST['maxentries'])){ + $oHomestuff->maxentries=$_REQUEST['maxentries']; +} + +if(!empty($_REQUEST['selFiltername'])){ + $oHomestuff->selFiltername=$_REQUEST['selFiltername']; +} + +if(!empty($_REQUEST['fldname'])){ + $oHomestuff->fieldvalue=$_REQUEST['fldname']; +} + +if(!empty($_REQUEST['txtRss'])){ + $ooRss=new vtigerRSS(); + if($ooRss->setRSSUrl($_REQUEST['txtRss'])){ + $oHomestuff->txtRss=$_REQUEST['txtRss']; + }else{ + return false; + } +} + +if(!empty($_REQUEST['txtURL'])){ + $oHomestuff->txtURL = $_REQUEST['txtURL']; +} +if(isset($_REQUEST['seldashbd']) && $_REQUEST['seldashbd']!=""){ + $oHomestuff->seldashbd=$_REQUEST['seldashbd']; +} + +if(isset($_REQUEST['seldashtype']) && $_REQUEST['seldashtype']!=""){ + $oHomestuff->seldashtype=$_REQUEST['seldashtype']; +} + +if(isset($_REQUEST['seldeftype']) && $_REQUEST['seldeftype']!=""){ + $seldeftype=$_REQUEST['seldeftype']; + $defarr=explode(",",$seldeftype); + $oHomestuff->defaultvalue=$defarr[0]; + $deftitlehash=$defarr[1]; + $oHomestuff->defaulttitle=str_replace("#"," ",$deftitlehash); +} + +if(isset($_REQUEST['selreport']) && $_REQUEST['selreport']!=""){ + $oHomestuff->selreport = $_REQUEST['selreport']; +} + +if(isset($_REQUEST['selreportcharttype']) && $_REQUEST['selreportcharttype']!=""){ + $oHomestuff->selreportcharttype = $_REQUEST['selreportcharttype']; +} + +$loaddetail=$oHomestuff->addStuff(); +echo $loaddetail; +?> diff --git a/modules/Home/HomestuffAjax.php b/modules/Home/HomestuffAjax.php new file mode 100644 index 0000000..0baefcc --- /dev/null +++ b/modules/Home/HomestuffAjax.php @@ -0,0 +1,233 @@ +id.'.php'); + +$modval=trim($_REQUEST['modname']); +$dash=trim($_REQUEST['dash']); +$home=trim($_REQUEST['home']); + +if(!empty($modval)){ + $tabid = getTabId($modval); + $ssql = "select vtiger_customview.*, vtiger_users.user_name from vtiger_customview inner join vtiger_tab on vtiger_tab.name = vtiger_customview.entitytype + left join vtiger_users on vtiger_customview.userid = vtiger_users.id "; + $ssql .= " where vtiger_tab.tabid=?"; + $sparams = array($tabid); + + if($is_admin == false){ + $ssql .= " and (vtiger_customview.status=0 or vtiger_customview.userid = ? or vtiger_customview.status = 3 or vtiger_customview.userid in(select vtiger_user2role.userid from vtiger_user2role inner join vtiger_users on vtiger_users.id=vtiger_user2role.userid inner join vtiger_role on vtiger_role.roleid=vtiger_user2role.roleid where vtiger_role.parentrole like '".$current_user_parent_role_seq."::%'))"; + array_push($sparams, $current_user->id); + } + $result = $adb->pquery($ssql, $sparams); + + if($adb->num_rows($result)==0){ + echo $mod_strings['MSG_NO_FILTERS']; + die; + }else{ + $html = ''; + } + echo $html; +} + +if(!empty($dash)){ + global $current_language; + $dashbd_strings = return_module_language($current_language, "Dashboard"); + $graph_array = array("leadsource" => $dashbd_strings['leadsource'], + "leadstatus" => $dashbd_strings['leadstatus'], + "leadindustry" => $dashbd_strings['leadindustry'], + "salesbyleadsource" => $dashbd_strings['salesbyleadsource'], + "salesbyaccount" => $dashbd_strings['salesbyaccount'], + "salesbyuser" => $dashbd_strings['salesbyuser'], + "salesbyteam" => $dashbd_strings['salesbyteam'], + "accountindustry" => $dashbd_strings['accountindustry'], + "productcategory" => $dashbd_strings['productcategory'], + "productbyqtyinstock" => $dashbd_strings['productbyqtyinstock'], + "productbypo" => $dashbd_strings['productbypo'], + "productbyquotes" => $dashbd_strings['productbyquotes'], + "productbyinvoice" => $dashbd_strings['productbyinvoice'], + "sobyaccounts" => $dashbd_strings['sobyaccounts'], + "sobystatus" => $dashbd_strings['sobystatus'], + "pobystatus" => $dashbd_strings['pobystatus'], + "quotesbyaccounts" => $dashbd_strings['quotesbyaccounts'], + "quotesbystage" => $dashbd_strings['quotesbystage'], + "invoicebyacnts" => $dashbd_strings['invoicebyacnts'], + "invoicebystatus" => $dashbd_strings['invoicebystatus'], + "ticketsbystatus" => $dashbd_strings['ticketsbystatus'], + "ticketsbypriority" => $dashbd_strings['ticketsbypriority'], + "ticketsbycategory" => $dashbd_strings['ticketsbycategory'], + "ticketsbyuser" => $dashbd_strings['ticketsbyuser'], + "ticketsbyteam" => $dashbd_strings['ticketsbyteam'], + "ticketsbyproduct"=> $dashbd_strings['ticketsbyproduct'], + "contactbycampaign"=> $dashbd_strings['contactbycampaign'], + "ticketsbyaccount"=> $dashbd_strings['ticketsbyaccount'], + "ticketsbycontact"=> $dashbd_strings['ticketsbycontact'],); + + $html=''; + echo $html; +} + +if(!empty($_REQUEST['primecvid'])){ + $cvid=$_REQUEST['primecvid']; + $fieldmodule = vtlib_purify($_REQUEST['fieldmodname']); + $queryprime="select cvid,columnname from vtiger_cvcolumnlist where columnname not like '%::%' and cvid=?"; + $result=$adb->pquery($queryprime,array($cvid)); + global $current_language,$app_strings; + $fieldmod_strings = return_module_language($current_language, $fieldmodule); + if($adb->num_rows($result)==0){ + echo $mod_strings['MSG_NO_FIELDS']; + die; + }else{ + $html = ''; + } + echo $html; +} + +if(!empty($_REQUEST['showmaxval']) && !empty($_REQUEST['sid'])){ + $sid=$_REQUEST['sid']; + $maxval=$_REQUEST['showmaxval']; + global $adb; + $query="select stufftype from vtiger_homestuff where stuffid=?"; + $res=$adb->pquery($query, array($sid)); + $stufftypename=$adb->query_result($res,0,"stufftype"); + if($stufftypename=="Module"){ + $qry="update vtiger_homemodule set maxentries=? where stuffid=?"; + $result=$adb->pquery($qry, array($maxval, $sid)); + }else if($stufftypename=="RSS"){ + $qry="update vtiger_homerss set maxentries=? where stuffid=?"; + $result=$adb->pquery($qry, array($maxval, $sid)); + }else if($stufftypename=="Default"){ + $qry="update vtiger_homedefault set maxentries=? where stuffid=?"; + $result=$adb->pquery($qry, array($maxval, $sid)); + } + echo "loadStuff(".$sid.",'".$stufftypename."')"; +} + +if(!empty($_REQUEST['dashVal'])){ + $did=$_REQUEST['did']; + global $adb; + $qry="update vtiger_homedashbd set dashbdtype=? where stuffid=?"; + $res=$adb->pquery($qry, array($_REQUEST['dashVal'], $did)); + echo "loadStuff(".$did.",'DashBoard')"; +} + +if(!empty($_REQUEST['reportVal'])){ + $stuffid=$_REQUEST['stuffid']; + global $adb; + $qry="update vtiger_homereportchart set reportcharttype=? where stuffid=?"; + $res=$adb->pquery($qry, array($_REQUEST['reportVal'], $stuffid)); + echo "loadStuff(".$stuffid.",'ReportCharts')"; +} + +if(!empty($_REQUEST['homestuffid'])){ + $sid=$_REQUEST['homestuffid']; + global $adb; + $query="delete from vtiger_homestuff where stuffid=?"; + $result=$adb->pquery($query, array($sid)); + echo "SUCCESS"; +} + +//Sequencing of blocks starts +if(!empty($_REQUEST['matrixsequence'])){ + global $adb; + $sequence = explode('_',$_REQUEST['matrixsequence']); + for($i=count($sequence)-1, $seq=0;$i>=0;$i--, $seq++){ + $query = 'update vtiger_homestuff set stuffsequence=? where stuffid=?'; + $result = $adb->pquery($query, array($seq, $sequence[$i])); + } + echo "
Layout Saved
"; +} +//Sequencing of blocks ends + +if(isset($_REQUEST['act']) && $_REQUEST['act'] =="hide"){ + $stuffid=$_REQUEST['stuffid']; + global $adb,$current_user; + $qry="update vtiger_homestuff set visible=1 where stuffid=?"; + $res=$adb->pquery($qry, array($stuffid)); + echo "SUCCESS"; +} + +//saving layout here +if(!empty($_REQUEST['layout'])){ + global $adb, $current_user; + + $sql = "delete from vtiger_home_layout where userid=?"; + $result = $adb->pquery($sql, array($current_user->id)); + + $sql = "insert into vtiger_home_layout values (?, ?)"; + $result = $adb->pquery($sql, array($current_user->id, $_REQUEST['layout'])); + if(!$result){ + echo "SUCCESS"; + } +} + +if(!empty($home)){ + global $current_user,$mod_strings,$currentModule; + $UMOD = $mod_strings; + $focus = new Users(); + $homeWidgets = $focus->getHomeStuffOrder($current_user->id); + if(!in_array("", $homeWidgets)){ + $errorMsg="LBL_NO_WIDGETS_HIDDEN"; + } + $html=''; + $COUNT = 0; + foreach($homeWidgets as $key=>$value){ + if($value == ''){ + $html .= ' + '; + $COUNT++; + if (($COUNT % 2) == 0){ + $html .= ''; + } + } + } + if ($errorMsg != ''){ + $html .= ''; + } + $html .= '
+ '.getTranslatedString($key,"Users").'
'.getTranslatedString($errorMsg,"Home").'
'; + echo $html; +} + +//layout save ends here +?> \ No newline at end of file diff --git a/modules/Home/LastViewed.php b/modules/Home/LastViewed.php new file mode 100644 index 0000000..cd2f9a0 --- /dev/null +++ b/modules/Home/LastViewed.php @@ -0,0 +1,46 @@ + + + +get_recently_viewed($current_user->id); + +foreach($history as $row) +{ + echo <<< EOQ + + + + +EOQ; +} +?> +
{$row['module_name']}$row[item_summary]
diff --git a/modules/Home/MainHomeBlock.php b/modules/Home/MainHomeBlock.php new file mode 100644 index 0000000..6b541f2 --- /dev/null +++ b/modules/Home/MainHomeBlock.php @@ -0,0 +1,30 @@ +assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); + +//$smarty->assign("HOME_STUFF",$homestuff_values); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->display("Home/MainHomeBlock.tpl"); + +?> diff --git a/modules/Home/NewBlock.php b/modules/Home/NewBlock.php new file mode 100644 index 0000000..3d70d29 --- /dev/null +++ b/modules/Home/NewBlock.php @@ -0,0 +1,44 @@ +assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH",$image_path); +$homeselectedframe = $homeObj->getSelectedStuff($stuffid,$stufftype); + +$smarty->assign("tablestuff",$homeselectedframe); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->display("Home/MainHomeBlock.tpl"); + +?> diff --git a/modules/Home/SaveNotebookContents.php b/modules/Home/SaveNotebookContents.php new file mode 100644 index 0000000..c31d8ed --- /dev/null +++ b/modules/Home/SaveNotebookContents.php @@ -0,0 +1,39 @@ +getNoteBookContents($_REQUEST['notebookid']); +} +$returnvalue = array('status' => $status, 'contents' => $contents); +echo Zend_Json::encode($returnvalue); + +function SaveNotebookContents(){ + if(empty($_REQUEST['notebookid'])){ + return false; + }else{ + $notebookid = $_REQUEST['notebookid']; + } + + global $adb,$current_user; + + $contents = $_REQUEST['contents']; + + $sql = "update vtiger_notebook_contents set contents=? where userid=? and notebookid=?"; + $adb->pquery($sql, array($contents, $current_user->id, $notebookid)); + return true; +} +?> diff --git a/modules/Home/UnifiedSearch.php b/modules/Home/UnifiedSearch.php new file mode 100644 index 0000000..5cf265e --- /dev/null +++ b/modules/Home/UnifiedSearch.php @@ -0,0 +1,293 @@ + $object_name){ + if ($curModule == 'Home' || ($curModule == $module && !empty($_REQUEST['ajax']))) { + $focus = CRMEntity::getInstance($module); + if(isPermitted($module,"index") == "yes"){ + $smarty = new vtigerCRM_Smarty; + + if(!file_exists("modules/$module/language/".$current_language.".lang.php")) $current_language = 'en_us'; + + require_once("modules/$module/language/".$current_language.".lang.php"); + global $mod_strings; + global $app_strings; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH",$image_path); + $smarty->assign("MODULE",$module); + $smarty->assign("TAG_SEARCH",$search_tag); + $smarty->assign("SEARCH_MODULE",vtlib_purify($_REQUEST['search_module'])); + $smarty->assign("SINGLE_MOD",$module); + $smarty->assign("SEARCH_STRING",htmlentities($search_val, ENT_QUOTES, $default_charset)); + + $listquery = getListQuery($module); + $oCustomView = ''; + + $oCustomView = new CustomView($module); + //Instead of getting current customview id, use cvid of All so that all entities will be found + //$viewid = $oCustomView->getViewId($module); + $cv_res = $adb->pquery("select cvid from vtiger_customview where viewname='All' and entitytype=?", array($module)); + $viewid = $adb->query_result($cv_res,0,'cvid'); + $customviewcombo_html = $oCustomView->getCustomViewCombo($viewid); + + $listquery = $oCustomView->getModifiedCvListQuery($viewid,$listquery,$module); + if ($module == "Calendar"){ + if (!isset($oCustomView->list_fields['Close'])){ + $oCustomView->list_fields['Close']=array ( 'activity' => 'status' ); + } + if (!isset($oCustomView->list_fields_name['Close'])){ + $oCustomView->list_fields_name['Close']='status'; + } + } + + if($search_module != '' || $search_tag != ''){//This is for Tag search + $where = getTagWhere($search_val,$current_user->id); + $search_msg = $app_strings['LBL_TAG_SEARCH']; + $search_msg .= "".to_html($search_val).""; + }else{ //This is for Global search + $where = getUnifiedWhere($listquery,$module,$search_val); + $search_msg = $app_strings['LBL_SEARCH_RESULTS_FOR']; + $search_msg .= "".htmlentities($search_val, ENT_QUOTES, $default_charset).""; + } + + if($where != ''){ + $listquery .= ' and ('.$where.')'; + } + + if(!(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')) { + $count_result = $adb->query($listquery); + $noofrows = $adb->num_rows($count_result); + } else { + $noofrows = vtlib_purify($_REQUEST['recordCount']); + } + $moduleRecordCount[$module]['count'] = $noofrows; + + global $list_max_entries_per_page; + if(!empty($_REQUEST['start'])){ + $start = $_REQUEST['start']; + if($start == 'last'){ + $count_result = $adb->query( mkCountQuery($listquery)); + $noofrows = $adb->query_result($count_result,0,"count"); + if($noofrows > 0){ + $start = ceil($noofrows/$list_max_entries_per_page); + } + } + if(!is_numeric($start)){ + $start = 1; + } elseif($start < 0){ + $start = 1; + } + $start = ceil($start); + }else{ + $start = 1; + } + + $navigation_array = VT_getSimpleNavigationValues($start, $list_max_entries_per_page, $noofrows); + $limitStartRecord = ($navigation_array['start'] - 1) * $list_max_entries_per_page; + + $log->debug('查询语句: '.$listquery); + if( $adb->dbType == "pgsql"){ + $listquery = $listquery. " OFFSET $limitStartRecord LIMIT $list_max_entries_per_page"; + }else{ + $listquery = $listquery. " LIMIT $limitStartRecord, $list_max_entries_per_page"; + } + $list_result = $adb->query($listquery); + + $moduleRecordCount[$module]['recordListRangeMessage'] = getRecordRangeMessage($list_result, $limitStartRecord, $noofrows); + + $info_message='&recordcount='.$_REQUEST['recordcount'].'&noofrows='.$_REQUEST['noofrows'].'&message='.$_REQUEST['message'].'&skipped_record_count='.$_REQUEST['skipped_record_count']; + $url_string = '&modulename='.$_REQUEST['modulename'].'&nav_module='.$module_name.$info_message; + $viewid = ''; + + $navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string,$module,"UnifiedSearch",$viewid); + $listview_header = getListViewHeader($focus,$module,"","","","global",$oCustomView); + $listview_entries = getListViewEntries($focus,$module,$list_result,$navigation_array,"","","","",$oCustomView); + + //Do not display the Header if there are no entires in listview_entries + if(count($listview_entries) > 0){ + $display_header = 1; + }else{ + $display_header = 0; + } + $smarty->assign("NAVIGATION", $navigationOutput); + $smarty->assign("LISTHEADER", $listview_header); + $smarty->assign("LISTENTITY", $listview_entries); + $smarty->assign("DISPLAYHEADER", $display_header); + $smarty->assign("HEADERCOUNT", count($listview_header)); + $smarty->assign("ModuleRecordCount", $moduleRecordCount); + + $total_record_count = $total_record_count + $noofrows; + + $smarty->assign("SEARCH_CRITERIA","( $noofrows )".$search_msg); + $smarty->assign("MODULES_LIST", $object_array); + $smarty->assign("CUSTOMVIEW_OPTION",$customviewcombo_html); + + if(($i != 0 && empty($_REQUEST['ajax'])) || !(empty($_REQUEST['ajax']))) + $smarty->display("UnifiedSearchAjax.tpl"); + else + $smarty->display('UnifiedSearchDisplay.tpl'); + unset($_SESSION['lvs'][$module]); + $i++; + } + } + } + //Added to display the Total record count + if(empty($_REQUEST['ajax'])) { +?> + +
        ".$mod_strings['ERR_ONE_CHAR'].""; +} + +/** + * Function to get the the List of Searchable Modules as a combo list which will be displayed in right corner under the Header + * @param string $search_module -- search module, this module result will be shown defaultly + */ +function getSearchModulesComboList($search_module){ + global $object_array; + global $app_strings; + global $mod_strings; + + ?> + + + + + + +
   + +
+ $object_name1,$module_name2=>$object_name2,$module_name3=>$object_name3,$module_name4=>$object_name4,-----); + */ +function getSearchModules($filter = array()){ + global $adb; + // vtlib customization: Ignore disabled modules. + //$sql = 'select distinct vtiger_field.tabid,name from vtiger_field inner join vtiger_tab on vtiger_tab.tabid=vtiger_field.tabid where vtiger_tab.tabid not in (16,29)'; + $sql = 'select distinct vtiger_field.tabid,name from vtiger_field inner join vtiger_tab on vtiger_tab.tabid=vtiger_field.tabid where vtiger_tab.tabid not in (16,29) and vtiger_tab.presence != 1 and vtiger_field.presence in (0,2)'; + // END + $result = $adb->pquery($sql, array()); + while($module_result = $adb->fetch_array($result)){ + $modulename = $module_result['name']; + // Do we need to filter the module selection? + if(!empty($filter) && is_array($filter) && !in_array($modulename, $filter)) { + continue; + } + // END + if($modulename != 'Calendar'){ + $return_arr[$modulename] = $modulename; + }else{ + $return_arr[$modulename] = 'Activity'; + } + } + return $return_arr; +} + +?> \ No newline at end of file diff --git a/modules/Home/UnifiedSearchModules.php b/modules/Home/UnifiedSearchModules.php new file mode 100644 index 0000000..5b4ca5e --- /dev/null +++ b/modules/Home/UnifiedSearchModules.php @@ -0,0 +1,43 @@ +query($sql); +while($modulerow = $adb->fetch_array($moduleres)) { + if(is_admin($current_user) || isPermitted($modulerow['name'], 'DetailView') == 'yes') { + $modulename = $modulerow['name']; + $allowed_modules[$modulename] = array( + 'label' => getTranslatedString($modulename, $modulename), + 'selected' => in_array($modulename, $selected_modules) + ); + } +} +ksort($allowed_modules); + +require_once('Smarty_setup.php'); + +$smarty = new vtigerCRM_Smarty(); +$smarty->assign('MOD', $mod_strings); +$smarty->assign('APP', $app_strings); +$smarty->assign('THEME', $theme); +$smarty->assign('IMAGE_PATH', "themes/$theme/images/"); +$smarty->assign('ALLOWED_MODULES', $allowed_modules); + +$smarty->display('UnifiedSearchModules.tpl'); + +?> \ No newline at end of file diff --git a/modules/Home/chat.css b/modules/Home/chat.css new file mode 100644 index 0000000..3c0017c --- /dev/null +++ b/modules/Home/chat.css @@ -0,0 +1,232 @@ +/* + Copyright 2005 Rolando Gonzalez (rolosworld@gmail.com) + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +/* + table.chat // don't set width or height + thead.chat + tfoot.chat + tbody.chat + tr.chathea + tr.chatfoot + tr.chatbody + td.chathead + td.chathead1 + td.chathead2 + td.chatfoot + td.chatfoot1 + td.chatfoot2 + td.chatbody + td.chatbody1 // don't set width or height + td.chatbody2 + + td.chatbox // don't set width or height or overflow + td.chaticon + td.chattopic + td.chathide + td.chatclose + + div.cumsg + div.csmsg + span.cunick +*/ +*{ + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 8pt; +} + +table.chat,table.pchat{ + empty-cells:show; +} +table.chat{ + position:absolute; +} +thead.chat{ + cursor:move; +} +td.chathead,td.chathead2,td.pchathead,td.pchathead2{ + width:5px; + height:38px; + padding:0px 5px 0px 0px; +} +td.chathead1,td.pchathead1{ + background-image:url(imgs/box_T.gif); + width:100%; +} +td.chathead,td.pchathead{ + background-image:url(imgs/box_TL.gif); +} +td.chathead2,td.pchathead2{ + background-image:url(imgs/box_TR.gif); +} + +td.chaticon{ + background-image:url(imgs/2tbarPrivateChat.gif); +} +td.chattopic{ + background-image:url(imgs/2tbarPublicChat.gif); + background-repeat:no-repeat; + background-position:center left; + padding:0px 10px 0px 30px; + width:100%; +} + +td.chattopic1{ + padding:0px 10px 0px 5px; + width:100%; + text-align:left; +} +span.chatTopicNick{ font-weight:900; } +td.chathide,td.chatclose{ + cursor:pointer; +} +td.chathide{ + background-image:url(imgs/btn_hide.gif); +} +td.chatclose{ + background-image:url(imgs/btn_close.gif); +} +td.chaticon,td.chathide,td.chatclose{ + height:36px; + width:36px; + padding:31px 31px 5px 0px; + background-repeat:no-repeat; + background-position:center center; +} + +td.chatbody,td.chatbody2,td.pchatbody,td.pchatbody2{ + width:5px; + padding:0px 5px 0px 0px; +} +td.chatbody,td.pchatbody{ + background-image:url(imgs/box_ML.gif); +} +td.chatbody1,td.pchatbody1{ + background-image:url(imgs/box_M.gif); + padding:5px 5px 5px 5px; + vertical-align:top; +} +td.chatbody2,td.pchatbody2{ + background-image:url(imgs/box_MR.gif); +} + +td.chatfoot,td.chatfoot2,td.pchatfoot,td.pchatfoot2{ + width:5px; + height:60px; + padding:60px 5px 0px 0px; +} +td.chatfoot1,td.pchatfoot1{ + background-image:url(imgs/bx_B.gif); +} +td.chatfoot,td.pchatfoot{ + background-image:url(imgs/box_BL.gif); +} +td.chatfoot2,td.pchatfoot2{ + background-image:url(imgs/box_BR.gif); +} + + + +div.chatbox{ + background-color: #FFFFFF; + border: 1px solid #938F86; + color:#000000; + vertical-align:top; +} + +/* UList */ +span.cunick{ + color:green; +} +div.cumsg,div.csmsg{ + color:#0000ff; + margin:2px 2px 4px 2px; +} +div.csmsg{ + color:#FF0000; +} + +a.chat{ + background-image:url(themes/images/user_icon.gif); + background-position:center left; + background-repeat:no-repeat; + color:#000000; + text-decoration:none; + display:block; + width:100px; + height:20px; + background-color:#FFFFFF; + padding:10px 5px 5px 30px; + vertical-align:middle; +} +a.chat:hover{ + background-color:#DFD9CD; +} + +span{ + padding:0px; + margin:0px; +} + +/* input */ +form.cinput{ + display:inline; +} +input.cinput{ + background-color: #FFFFFF; + border: 1px solid #938F86; + width: 100%; + height:20px; + font-size:12px; + padding:2px 2px 2px 2px; + font-weight:bold; + color:#333333; +} +table.cinput{ + width:100%; +} +tr.cinput{ + +} +td.cinput{ + width:100%; +} +td.ckeyb{ + width:32px; + height:29px; + padding:29px 32px 5px 5px; + background-repeat:no-repeat; + background-position:center center; +} +td.csubmit{ + cursor:pointer; + background-image:url(imgs/btn_send.gif); + width:63px; + height:32px; + padding:32px 63px 5px 5px; + background-repeat:no-repeat; + background-position:center center; +} + + +span.sysb{font-weight:900;} +.chatuserlist{ + font-size:14px; + text-align:left; + color:white; + background-color:#898475; +} diff --git a/modules/Home/chat.php b/modules/Home/chat.php new file mode 100644 index 0000000..ae20417 --- /dev/null +++ b/modules/Home/chat.php @@ -0,0 +1,380 @@ +\n".mysql_error()."
\n".$query); + } + return $result; +} + +/**** handler *****/ +/** + * Chat object + */ +class Chat +{ + // stores the string to be returned + var $json; + + function Chat() + { + global $adb; + $this->json = ''; + + // las message id received by user + if(!isset($_SESSION["mlid"])) + { + $res = $adb->pquery("show table status like 'vtiger_chat_msg'", array()); + $line = $adb->fetch_array($res); + if(intval($line['Auto_increment']) == 0) + $_SESSION["mlid"] = 0; + else + $_SESSION["mlid"] = intval($line['Auto_increment']) - 1; + } + + // when the las user list was sended. + if(!isset($_SESSION["lul"])) + { + $_SESSION["lul"] = 0; + } + + // check if user is active. + if(!isset($_SESSION['chat_user'])) + { + $this->setUserNick(); + } + else + { + $res = $adb->pquery("update vtiger_chat_users set ping=now() where session=?", array(session_id())); + if($adb->getAffectedRowCount($res) == 0) + { + $this->setUserNick(); + } + } + + switch($_POST['submode']) + { + // request all the json data at once. + case 'get_all': + global $chat_conf; + $this->lastMsgId(); + + $this->json = '[%s]'; + $this->getAllPVChat(); + $pvchat = $this->json; + + $this->json = '[%s]'; + $this->getPubChat(); + $pchat = $this->json; + + $this->json = ''; + if(time() - $_SESSION["lul"] > $chat_conf['alive_time']) + { + $_SESSION["lul"] = time(); + $this->json = '[%s]'; + $this->getUserList(); + } + $ulist = $this->json; + + $tmp = array(); + $this->json = '{%s}'; + if(strlen($ulist) > 0) + $tmp[] = '"ulist":'.$ulist; + + if(strlen($pvchat) > 0) + $tmp[] = '"pvchat":'.$pvchat; + + if(strlen($pchat) > 0) + $tmp[] = '"pchat":'.$pchat; + + $this->json = sprintf($this->json, implode(',',$tmp)); + break; + + // user is submiting a msg + case 'submit': + $this->submit($_POST['msg'],intval($_POST['to'])); + break; + + // user closed a private chat + case 'pvclose': + $this->pvClose(intval($_POST['to'])); + break; + + default: + break; + } + } + + /** + * returns the JSON created + */ + function getAJAX() + { + return $this->json; + } + + /** + * Sets the user initial nickname. + */ + function setUserNick() + { + global $current_user, $adb; + $res = $adb->pquery("select id from vtiger_chat_users where session=?", array(session_id())); + if($adb->num_rows($res) > 0) + { + $line = $adb->fetch_array($res); + $_SESSION['chat_user'] = $line['id']; + return; + } + + $res = $adb->pquery("show table status like 'vtiger_chat_users'", array()); + $line = $adb->fetch_array($res); + if(intval($line['Auto_increment']) == 0) + $line['Auto_increment'] = 1; + + $_SESSION['chat_user'] = $line['Auto_increment']; + + + $sql = "insert into vtiger_chat_users(nick,session,ping,ip) values (?,?, now(), ?)"; + $params = array($current_user->user_name, session_id(), $_SERVER['REMOTE_ADDR']); + $res = $adb->pquery($sql, $params); + } + + /** + * generate the available users list + */ + function getUserList() + { + global $chat_conf, $adb; + $tmp = ''; + $sql = "delete from vtiger_chat_users where ((unix_timestamp(now())-unix_timestamp(ping))>?)"; + $params = array($chat_conf['alive_time']); + $res = $adb->pquery($sql, $params); + + $res = $adb->pquery("select id,nick from vtiger_chat_users", array()); + if($adb->num_rows($res)==0) + { + $this->json = ''; + return; + } + + while($line = $adb->fetch_array($res)) + { + if($line['id'] != $_SESSION['chat_user']) + $tmp .= '{"uid":'.$line['id'].',"nick":"'.$line['nick'].'"},'; + } + $tmp = trim($tmp,','); + $this->json = sprintf($this->json,$tmp); + } + + /** + * Sets user last post received. + */ + function lastMsgId() + { + if(isset($_POST['mlid']) && intval($_POST['mlid']) > $_SESSION["mlid"]) + $_SESSION["mlid"] = intval($_POST['mlid']); + } + + /** + * generates the private chat data + */ + function getAllPVChat() + { + global $chat_conf, $adb; + $format = '{"mlid":%s,"chat":%s,"from":"%s","msg":"%s"},'; + $sql ="select ms.id mid,ms.chat_from mfrom,ms.chat_to mto,pv.id id,us.nick `chat_from`,ms.msg msg from vtiger_chat_users us,vtiger_chat_pvchat pv,vtiger_chat_msg ms where pv.msg=ms.id and us.id=ms.chat_from and ms.id>? and ((ms.chat_from=? and ms.chat_to>0) or (ms.chat_to=? and ms.chat_from>0)) order by ms.born limit 0, " . $chat_conf['msg_limit']; + $params = array($_SESSION['mlid'], $_SESSION['chat_user'], $_SESSION['chat_user']); + $res = $adb->pquery($sql, $params); + + if($adb->num_rows($res)==0) + { + $this->json = ''; + return; + } + + $tmp = ''; + while($line = $adb->fetch_array($res)) + { + if($line['mfrom'] == $_SESSION['chat_user']) + $cid = $line['mto']; + else + $cid = $line['mfrom']; + + $tmp .= sprintf($format,$line['mid'],$cid,$line['chat_from'],addslashes($line['msg'])); + } + $tmp = trim($tmp,','); + $this->json = sprintf($this->json,$tmp); + } + + + /** + * generates the public chat data + * NOTE: this is alpha + */ + function getPubChat() + { + global $chat_conf, $adb; + $format = '{"mlid":%s,"from":"%s","msg":"%s"},'; + $sql = "select ms.id mid,ms.chat_from mfrom,ms.chat_to mto,p.id id,us.nick `chat_from`,ms.msg msg from vtiger_chat_users us,vtiger_chat_pchat p,vtiger_chat_msg ms where p.msg=ms.id and us.id=ms.chat_from and ms.id>? and ms.chat_to=0 order by ms.born limit 0," . $chat_conf['msg_limit']; + $params = array($_SESSION['mlid']); + $res = $adb->pquery($sql, $params); + + if($adb->num_rows($res)==0) + { + $this->json = ''; + return; + } + + $tmp = ''; + while($line = $adb->fetch_array($res)) + { + $tmp .= sprintf($format,$line['mid'],$line['chat_from'],addslashes($line['msg'])); + } + $tmp = trim($tmp,','); + $this->json = sprintf($this->json,$tmp); + } + + /** + * Check for special commands on message. + */ + function msgParse($msg) + { + global $adb; + if(strlen($msg) == 0) return ''; + $msg = stripslashes($msg); + + if($msg[0] == '\\') + { + $today_date = getdate(); + + $words = explode(" ",$msg); + switch($words[0]) + { + case '\nick': + if(isset($words[1]) && strlen($words[1]) > 3) + { + $res = $adb->pquery("select nick from vtiger_chat_users where id=?", array($_SESSION['chat_user'])); + $line = $adb->fetch_array($res); + $res = $adb->pquery("update vtiger_chat_users set nick=? where id=?", array($words[1], $_SESSION['chat_user'])); + $msg = '\sys '.$line['nick'].' changed nick to '.$words[1].''; + } + break; + + case '\help': + $msg = '\sys
\\\\nick "nickname" - change nick
\\\\date - date
\\\\time - time
\\\\month - month
\\\\day - weekday'; + break; + case '\date': + $msg = '\sys Today is '.date('d-m-Y').''; + break; + case '\time': + $msg = '\sys The Current time is '.$today_date["hours"].':'.$today_date["minutes"].':'.$today_date["hours"].''; break; + case '\month': + $msg = '\sys '.$today_date["month"].''; + break; + case '\day': + $msg = '\sys '.$today_date["weekday"].''; + break; + default: + + $msg = '\sys Bad command: '.$words[0]; + break; + } + } + return $msg; + } + + /** + * process a submited msg + */ + function submit($msg, $to=0) + { + global $adb; + //UTF-8 support added - ding + $msg = utf8RawUrlDecode($msg); + $msg = $this->msgParse($msg); + $msg = htmlentities($msg); + if(strlen($msg) == 0) return; + + //$sql = "insert into vtiger_chat_msg set chat_from=?, chat_to=?, born=now(), msg=?"; + $sql = "insert into vtiger_chat_msg(chat_from, chat_to, born, msg) values (?,?, now(), ?)"; + $params = array($_SESSION['chat_user'], $to, $msg); + $res = $adb->pquery($sql, $params); + + $chat = "p"; + if($to != 0) + $chat .= "v"; + + $res = $adb->pquery("insert into vtiger_chat_".$chat."chat set msg=LAST_INSERT_ID()", array()); + } + + /** + * removes the private conversation msg's because someone closed it + */ + function pvClose($to) + { + global $adb; + $sql = "delete from vtiger_chat_msg where (`chat_from`=? and `chat_to`=?) or (`chat_from`=? and `chat_to`=?)"; + $params = array($to, $_SESSION['chat_user'], $_SESSION['chat_user'], $to); + $res = $adb->pquery($sql, $params); + } +} + +/**** caller ****/ +$chat = new Chat(); +echo $chat->getAJAX(); +?> diff --git a/modules/Home/home_rss.php b/modules/Home/home_rss.php new file mode 100644 index 0000000..dd49b61 --- /dev/null +++ b/modules/Home/home_rss.php @@ -0,0 +1,128 @@ +\n"); +echo (" \n"); +echo (" \n"); +echo (" vtigerCRM Tickets\n"); +echo (" ".$site_URL."/index.php?module=Home&action=home_rss\n"); +echo (" test\n"); +echo (" \n"); +echo (" ".$current_user->user_name."\n"); +echo (" " . gmdate('D, d M Y H:i:s', time()) . " GMT\n"); +echo (" vtigerCRM\n"); + +//retrieving notifications****************************** +//<<<<<<<<<<<<<<<< start of owner notify>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> +$query = "select vtiger_crmentity.setype,vtiger_crmentity.crmid,vtiger_crmentity.smcreatorid,vtiger_crmentity.modifiedtime from vtiger_crmentity inner join vtiger_ownernotify on vtiger_crmentity.crmid=vtiger_ownernotify.crmid"; + +$result = $adb->pquery($query, array()); +for($i=0;$i<$adb->num_rows($result);$i++){ + $mod_notify[$i] = $adb->fetch_array($result); + if($mod_notify[$i]['setype']=='Accounts'){ + $tempquery='select vtiger_accountname from vtiger_account where vtiger_accountid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $account_name=$adb->fetch_array($tempresult); + $notify_values[$i]=$account_name['accountname']; + }else if($mod_notify[$i]['setype']=='Potentials'){ + $tempquery='select vtiger_potentialname from vtiger_potential where vtiger_potentialid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $potential_name=$adb->fetch_array($tempresult); + $notify_values[$i]=$potential_name['potentialname']; + }else if($mod_notify[$i]['setype']=='Contacts'){ + $tempquery='select lastname from vtiger_contactdetails where contactid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $contact_name=$adb->fetch_array($tempresult); + $notify_values[$i]=$contact_name['lastname']; + }else if($mod_notify[$i]['setype']=='Leads'){ + $tempquery='select lastname from vtiger_leaddetails where leadid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $lead_name=$adb->fetch_array($tempresult); + $notify_values[$i]=$lead_name['lastname']; + }else if($mod_notify[$i]['setype']=='SalesOrder'){ + $tempquery='select subject from vtiger_salesorder where vtiger_salesorderid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $sales_subject=$adb->fetch_array($tempresult); + $notify_values[$i]=$sales_subject['subject']; + }else if($mod_notify[$i]['setype']=='Orders'){ + $tempquery='select subject from vtiger_purchaseorder where vtiger_purchaseorderid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $purchase_subject=$adb->fetch_array($tempresult); + $notify_values[$i]=$purchase_subject['subject']; + }else if($mod_notify[$i]['setype']=='Products'){ + $tempquery='select productname from vtiger_products where productid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $product_name=$adb->fetch_array($tempresult); + $notify_values[$i]=$product_name['productname']; + }else if($mod_notify[$i]['setype']=='Emails'){ + $tempquery='select subject from vtiger_activity where vtiger_activityid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $email_subject=$adb->fetch_array($tempresult); + $notify_values[$i]=$email_subject['subject']; + }else if($mod_notify[$i]['setype']=='HelpDesk'){ + $tempquery='select title from vtiger_troubletickets where ticketid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $HelpDesk_title=$adb->fetch_array($tempresult); + $notify_values[$i]=$HelpDesk_title['title']; + }else if($mod_notify[$i]['setype']=='Calendar'){ + $tempquery='select subject from vtiger_activity where vtiger_activityid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $Activity_subject=$adb->fetch_array($tempresult); + $notify_values[$i]=$Activity_subject['subject']; + }else if($mod_notify[$i]['setype']=='Quotes'){ + $tempquery='select subject from vtiger_quotes where quoteid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $quote_subject=$adb->fetch_array($tempresult); + $notify_values[$i]=$quote_subject['subject']; + }else if($mod_notify[$i]['setype']=='Invoice'){ + $tempquery='select subject from vtiger_invoice where vtiger_invoiceid=?'; + $tempresult=$adb->pquery($tempquery, array($mod_notify[$i]['crmid'])); + $invoice_subject=$adb->fetch_array($tempresult); + $notify_values[$i]=$invoice_subject['subject']; + } + //<<<<<<<<<<<<<<<< end of owner notify>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> + + + // Variable reassignment and reformatting for author + $author_id = $db->query_result($result,$i,'smcreatorid'); + $entry_author = getUserFullName($author_id); + $entry_author = htmlspecialchars ($entry_author); + + $entry_link = $site_URL."/index.php?modules=".$mod_notify[$i]['setype']."&action=DetailView&record=".$mod_notify[$i]['crmid']; + $entry_link = htmlspecialchars($entry_link); + $entry_time = $db->query_result($result,$i,'modifiedtime'); + + echo (" \n"); + echo (" ".$mod_notify[$i]['setype']."\n"); + echo (" ".$entry_link."\n"); + echo (" ".$notify_values[$i]."\n"); + echo (" ".$entry_author."\n"); + echo (" ".$entry_time."\n"); + echo (" \n"); +} +echo (" \n"); +echo (" \n"); +?> diff --git a/modules/Home/index.php b/modules/Home/index.php new file mode 100644 index 0000000..7c8a742 --- /dev/null +++ b/modules/Home/index.php @@ -0,0 +1,118 @@ + 29 and tabid <> 16 and tabid <>10) order by name"; + +// Performance Optimization: Re-written to ignore extension and inactive modules +$modulenamearr = Array(); +foreach($tabrows as $resultrow) { + if($resultrow['isentitytype'] != '0') { + // Eliminate: Events, Emails + if($resultrow['tabid'] == '16' || $resultrow['tabid'] == '10' || $resultrow['name'] == 'Webmails') { + continue; + } + $modName=$resultrow['name']; + if(isPermitted($modName,'DetailView') == 'yes' && vtlib_isModuleActive($modName)){ + $modulenamearr[$modName]=array($resultrow['tabid'],$modName); + } + } +} +ksort($modulenamearr); // We avoided ORDER BY in Query (vtlib_prefetchModuleActiveInfo)! +// END + + +//Security Check done for RSS and Dashboards +$allow_rss='no'; +$allow_dashbd='no'; +$allow_report='no'; +if(isPermitted('Rss','DetailView') == 'yes' && vtlib_isModuleActive('Rss')){ + $allow_rss='yes'; +} +if(isPermitted('Dashboard','DetailView') == 'yes' && vtlib_isModuleActive('Dashboard')){ + $allow_dashbd='yes'; +} + +if(isPermitted('Reports','DetailView') == 'yes' && vtlib_isModuleActive('Reports')){ + $allow_report='yes'; +} + +$homedetails = $homeObj->getHomePageFrame(); +$maxdiv = sizeof($homedetails)-1; +$user_name = $current_user->column_fields['user_name']; +$buttoncheck['Calendar'] = isPermitted('Calendar','index'); +$freetag = new freetag(); +$numberofcols = getNumberOfColumns(); + +$smarty->assign("CHECK",$buttoncheck); +if(vtlib_isModuleActive('Calendar')){ + $smarty->assign("CALENDAR_ACTIVE","yes"); +} +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("MODULE",'Home'); +$smarty->assign("CATEGORY",getParenttab('Home')); +$smarty->assign("CURRENTUSER",$user_name); +$smarty->assign("ALL_TAG",$freetag->get_tag_cloud_html("",$current_user->id)); +$smarty->assign("MAXLEN",$maxdiv); +$smarty->assign("ALLOW_RSS",$allow_rss); +$smarty->assign("ALLOW_DASH",$allow_dashbd); +$smarty->assign("ALLOW_REPORT",$allow_report); +$smarty->assign("HOMEFRAME",$homedetails); +$smarty->assign("MODULE_NAME",$modulenamearr); +$smarty->assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("THEME", $theme); +$smarty->assign("LAYOUT", $numberofcols); +$widgetBlockSize = PerformancePrefs::getBoolean('HOME_PAGE_WIDGET_GROUP_SIZE', 12); +$smarty->assign('widgetBlockSize', $widgetBlockSize); + +// First time login check +include_once 'modules/Users/LoginHistory.php'; +$accept_login_delay_seconds = 5*60; // (use..5*60 for 5 min) to overcome redirection post authentication +$smarty->assign('FIRST_TIME_LOGIN', LoginHistory::firstTimeLoggedIn($current_user->user_name, $accept_login_delay_seconds)); +// End + +$smarty->display("Home/Homestuff.tpl"); + +?> diff --git a/modules/Home/js/HelpMeNow.js b/modules/Home/js/HelpMeNow.js new file mode 100644 index 0000000..92192cb --- /dev/null +++ b/modules/Home/js/HelpMeNow.js @@ -0,0 +1,637 @@ +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.1 + * ("License.txt"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ******************************************************************************/ + +/** + * Utility classes for prototype 1.4 + */ +// Based on https://gist.github.com/145466 (MIT) - modified to suit Prototype v1.4 + +vtiger_help_jsonp = Class.create(); +vtiger_help_jsonp.prototype = Object.extend(Ajax.Base, (function() { + var id = 0; + head = document.getElementsByTagName('head')[0]; + return { + initialize: function(url, options) { + this.options = options; + if (!this.options.callbackName) { + this.options.callbackName = 'callback'; + } + this.request(url); + }, + request: function(url) { + var callbackName = '_prototypeJSONPCallback_' + (id++), + self = this, + script; + + url += (url.indexOf('?') != -1 ? '&': '?') + this.options.parameters + + '&' + this.options.callbackName + '=' + encodeURIComponent(callbackName); + + window[callbackName] = function(json) { + try { + script.remove(); + script = null; + } catch(error) { /* IE might complain about failure */ } + + window[callbackName] = undefined; + if (self.options.onComplete) { + self.options.onComplete.call(self, json); + } + } + script = document.createElement('script'); + script.type = 'text/javascript'; + script.src = url; + head.appendChild(script); + } + }; +})()); + +// Based on http://ejohn.org/blog/javascript-micro-templating/ +var vtiger_help_tmpl_cache = []; +vtiger_help_tmpl = function(str, data) { + // Figure out if we're getting a template, or if we need to + // load the template - and be sure to cache the result. + var fn = !/\W/.test(str) ? + vtiger_help_tmpl_cache[str] = vtiger_help_tmpl_cache[str] || + vtiger_help_tmpl(document.getElementById(str).innerHTML) : + + // Generate a reusable function that will serve as a template + // generator (and which will be cached). + new Function("obj", + "var p=[],print=function(){p.push.apply(p,arguments);};" + + + // Introduce the data as local variables using with(){} + "with(obj){p.push('" + + + // Convert the template into pure JavaScript + str + .replace(/[\r\t\n]/g, " ") + .split("<%").join("\t") + .replace(/((^|%>)[^\t]*)'/g, "$1\r") + .replace(/\t=(.*?)%>/g, "',$1,'") + .split("\t").join("');") + .split("%>").join("p.push('") + .split("\r").join("\\'") + + "');}return p.join('');"); + + // Provide some basic currying to the user + return data ? fn(data) : fn; +}; + +/** + * Vtiger Help Controller + */ +vtiger_help_controller = function() { + + /** + * API for quick help + */ + this.apiURL = function() { + return 'http://help.vtiger.com/helpmenow/api.php'; + } + + /** + * Runtime variables + */ + this.runtimeVars = function(uri) { + + if (typeof uri == 'undefined') uri = self.location.href; + + var userid = $('_my_preferences_')? $('_my_preferences_').getAttribute('href').match(/record=([^&]+)/)[1] : 0; + var module = uri.match(/module=([^&]+)/)[1]; + var action = uri.match(/action=([^&]+)/)[1]; + if(action=='ListView'){ + action='index'; + } + return { + USERID: userid, + MODULE:module, + ACTION:action + }; + } + + /** + * Extract keyword based on context for getting help information + */ + this.extractKeyword = function(uri) { + // Build the keyword (module-action) pair + var runvars = this.runtimeVars(uri); + return runvars['MODULE'] + '-' + runvars['ACTION']; + } + + /** + * Initialize the DOM + */ + this.init = function() { + this.initHandler(); + this.css(); + this.popup(); + return this; + } + /** + * Initialize the handler to trigger help. + */ + this.initHandler = function() { + var linkDiv = document.createElement('div'); + var link = document.createElement('a'); + document.body.appendChild(linkDiv); + linkDiv.appendChild(link); + link.id='helpLink'; + linkDiv.id='helpButton'; + link.setAttribute('class', 'helpTipsHandler'); + link.style.visibility = 'visible'; + //link.setAttribute('onclick', "vtiger_help($('helpTipsHandlerPin'));"); + link.onclick=function(){ + vtiger_help($('helpTipsHandlerPin')); + return false; + } + var themePath = vtlib_vtiger_imageurl(gVTTheme); + link.setAttribute('href',"javascript:void(0);"); + link.innerHTML=" "; + + } + + + /** + * Widget styling... + */ + this.css = function() { + if ($('vtigerHelpStyling')) return; + /* BETTER TO BE MOVED INTO themes style.css */ + /* + var rules = '.vtigerHelpPopupLay { font-size:12px; border: 1px solid #F5F5F5; }' + + '.vtigerHelpPopupLay hr { padding: 0; border-top: 0; border-left: 0; border-right: 0; }' + + '.vtigerHelpPopupLay .button { background: #CCC; color: black; padding: 2px 5px; text-decoration: none; }' + + '.vtigerHelpPopupLay .button:hover { background: #F5F5F5; }' + + '.vtigerHelpPopupLay .helppages { border-bottom: 1px solid #F5F5F5; padding-bottom: 5px; }' + + '.vtigerHelpPopupLay .helppage .header { font-weight: bold; color: #0070BA; }' + + '.vtigerHelpPopupLay .helppage .content { }'+ + '.vtigerHelpPopupLay .helppage .footer { color: gray; text-align: right; padding: 0 5px; }'+ + '.vtigerHelpPopupLay .helppage-tr {display: none;}'+ + '.vtigerHelpPopupLay .goog-te-sectional-gadget-link-text { font-weight: normal; color: #CCC; }'+ + '.vtigerHelpPopupLay #vtigerHelpGTranslateEl { bottom: 0; }'; + + var style = document.createElement('style'); + style.id = 'vtigerHelpStyling'; + style.type = 'text/css'; + style.appendChild(document.createTextNode(rules)); + document.head.appendChild(style); + */ + } + + /** + * Widget popup + */ + this.popup = function() { + if (!$('vtigerHelpPopupLay')) { + var vtigerHelpPopupLay = document.createElement('div'); + vtigerHelpPopupLay.id = 'vtigerHelpPopupLay'; + vtigerHelpPopupLay.className = 'lvtCol fixedLay1 vtigerHelpPopupLay'; + vtigerHelpPopupLay.style.display = 'none'; + vtigerHelpPopupLay.style.width = '310px'; + vtigerHelpPopupLay.style.bottom = '2px'; + vtigerHelpPopupLay.style.fontWeight = 'normal'; + vtigerHelpPopupLay.style.visibility = 'visible'; + vtigerHelpPopupLay.style.margin="-1% 0 0 0"; + vtigerHelpPopupLay.innerHTML = '
'; + + document.getElementById('helpButton').appendChild(vtigerHelpPopupLay); + } + + return $('vtigerHelpPopupLay'); + } + + /** + * Widget popup container + */ + this.popupContainer = function() { + this.popup(); + return $('vtigerHelpPopupLayContainer'); + } + + /** + * Find closest parent having the given className + */ + this.closest = function(node, className) { + while (node != document.body) { + node = node.parentNode; + if (node.className == className) break; + } + return node; + } + + /** + * Set / Get data attribute value of the node. + */ + this.data = function(node, key, value) { + if (typeof value == 'undefined') { + return node.getAttribute('data-'+key); + } + node.setAttribute('data-'+key, value); + } + + /** + * Add new help page (hidding existing ones) + */ + this.pushPage = function(node) { + var pages = this.closest(node, 'helppages'); + + for (var index=0, len=pages.children.length; index < len; ++index) { + pages.children[index].style.display = 'none'; + } + + var page = document.createElement('div'); + page.className = 'helppage'; + pages.appendChild(page); + + return page; + } + + /** + * Remove last help page. + */ + this.popPage = function(node) { + var pages = this.closest(node, 'helppages'); + + var lastPage = null; + var totalPage = pages.children.length; + if (totalPage > 0) { + lastPage = pages.children[pages.children.length-1]; + pages.removeChild(lastPage); + + if (totalPage > 1) { + lastPage = pages.children[pages.children.length-1]; + lastPage.style.display = 'block'; + } + } + + return lastPage; + } + + /** + * Handle helpMeNow request + */ + this.helpMeNow = function(obj, title, uri, embed, callback) { + var thisInstance = this; + + if (typeof uri == 'undefined') { + uri = self.location.href; + } + + if (typeof title == 'undefined') { + var handler = this.closest(obj, 'helpTipsHandler'); + if (handler) title = handler.innerHTML; + } + + // Home page / POST method visit + if (uri.indexOf('?') == -1) { + return; + } + + var q = this.extractKeyword(uri); + var qtype = 'partial'; + + // Transform the keyword for tag-search + var m = q.match(/([^-]+)/); + switch (m[1]) { + case 'Home': case 'Settings': + case 'Administration': + break; + default: + // For other modules pull generic & specific help-topics + q = q.replace(/([^-]+)-(.*)/, '($1|*)[-]$2'); + qtype = 'regex'; + } + + var v = $('_vtiger_product_version_')? $('_vtiger_product_version_').innerHTML : ''; + + $('status').style.display = 'inline'; + + new vtiger_help_jsonp(this.apiURL(), { + parameters: 'operation=find&q=' + encodeURIComponent(q) + '&qtype=' + encodeURIComponent(qtype) + '&v=' + encodeURIComponent(v), + onComplete: function(data) { + $('status').style.display = 'none'; + + var records = (data.success) ? data.result.records: false; + if (records) { + if (typeof embed == 'undefined') { + var container = thisInstance.popupContainer(); + container.innerHTML = thisInstance.recordsUI(records, title); + // fnvshobj(obj, "vtigerHelpPopupLay"); + var popUpLay=document.getElementById('vtigerHelpPopupLayContainer'); + var popUpLayBlock=document.getElementById('vtigerHelpPopupLay'); + popUpLay.innerHTML=container.innerHTML; + document.getElementById('helpLink').style.display='none'; + popUpLayBlock.style.display='block'; + //Drag funtion for help + Drag.init(document.getElementById('helpHandle'),document.getElementById('vtigerHelpPopupLay'),-1100,0,-100,1000); + // Trigger translation service + thisInstance.translate(); + } else { + obj.style.display = 'block'; + obj.innerHTML = thisInstance.recordsUI(records, '', true); + } + } + + if (typeof callback == 'function') { + callback(data.success); + } + } + }); + } + + /** + * Handle helpMeNow navigation request. + */ + this.helpMeNowNavigate = function(obj) { + var thisInstance = this; + var parentid = this.data(obj, 'parentid'); + var id = this.data(obj, 'id'); + var navtype = this.data(obj, 'navtype'); + + // TODO Optimize loads: Instead of pop can we enable page navigations + // by toggling the display style? Load the next page if not yet done. + if (navtype == 'prev') { + this.popPage(obj); + return; + } + + var container = this.pushPage(obj); + container.innerHTML = ''; + new vtiger_help_jsonp(this.apiURL(), { + parameters: 'operation=find&id=' + encodeURIComponent(id), + onComplete: function(data) { + if (data.success) { + container.innerHTML = thisInstance.recordUI(data.result.record, parentid); + + // Trigger translation service + thisInstance.translate(); + } + } + }); + } + + /** + * Handle multi-record display. + */ + this.recordsUI = function(records, headerLabel, skipHeaderFooter) { + if (typeof headerLabel == 'undefined') headerLabel = ''; + if (typeof skipHeaderFooter == 'undefined') skipHeaderFooter = false; + + // NOTE update recordUI API below to match the helppage node-structure... + var tpl = + '<% if (SKIP_HEADER_FOOTER != true) {%>
'+ + '' + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + + '<% } %>' + + '
' + + ' ' + + ' ' + + ' ' + + ' ' + + '
' + + '
'+ + '
'+ + ' <% if (RECORDS.length == 0) {%>' + + '
' + + ' No quick help found. Try wiki.vtiger.com' + + '
'+ + '
' + + ' <% } else { %>' + + ' <% for (var index=0, len=RECORDS.length; index < len; ++index) { var RECORD = RECORDS[index]; %>' + + '
' + + '
'+ + ' <% if (RECORDS.length == 1) { %>'+ + '
<%= RECORD.title %>
'+ + '
<%= fnDataMerge(RECORD.content, runtimeVars) %>'+ + ' <% } else { %>'+ + '
<%= RECORD.title %>
'+ + ' '+ + '
'+ + '
' + + '
' + + ' <% } %>' + + ' <% } %>' + + '
'+ + '
'; + + return vtiger_help_tmpl(tpl, { + SKIP_HEADER_FOOTER: skipHeaderFooter, + HEADER_LABEL: headerLabel, + RECORDS: records, + fnDataMerge: this.dataMerge, + runtimeVars: this.runtimeVars() + }); + } + + /** + * Merge data with given context (variable map) + */ + this.dataMerge = function (data, context) { + for (var k in context) { + // Replace Meta variables {$VARIABLE} | %7B$VARIABLE%7D + // TODO Escape regex - k + data = data.replace(new RegExp("{\\$"+k+"}", "ig"), context[k]).replace(new RegExp("%7B\\$"+k+"%7D", "ig"), context[k]); + } + return data; + } + + /** + * Handle single record display + */ + this.recordUI = function(record, parentid) { + var tpl = + '
' + + '
<%= RECORD.title %>
'+ + '
<%= fnDataMerge(RECORD.content, runtimeVars) %>'+ + '
'+ + '
'+ + '
'; + + return vtiger_help_tmpl(tpl, { + RECORD: record, + PARENTID: parentid, + fnDataMerge: this.dataMerge, + runtimeVars: this.runtimeVars() + }); + }, + + /** + * Translate the helppage content using Google Translate Gadget. + * Reference: http://translate.google.com/translate_tools + */ + this.translatorInstance = false; + this.translate = function(containerid) { + var thisInstance = this; + var singleton = true; + if (typeof containerid == 'undefined') { + containerid = 'vtigerHelpGTranslateEl'; + } else { + singleton = false; + } + + var lang = this.currentLanguage()[0]; + if (lang == 'en'){ + document.getElementById('vtigerHelpGTranslateEl').style.display='none'; + return; + } + function tr() { + + // Subsequent entries + if (singleton && thisInstance.translatorInstance) { + thisInstance.translatorInstance.update(); + return; + } + + var trInstance = new google.translate.SectionalElement({ + sectionalNodeClassName: 'helppage', + controlNodeClassName: 'helppage-tr', + background: 'inherit' + }, containerid); + + /** + * Singleton support does not work as expected. + * Google Section Translate is unique for a page. + */ + if (singleton) { + thisInstance.translatorInstance = trInstance; + } + + } + + if (typeof google == 'undefined' || typeof google.translate == 'undefined' || typeof google.translate.SectionalElement == 'undefined') { + var url = '//translate.google.com/translate_a/element.js'; + new vtiger_help_jsonp(url, { + parameters: 'ug=section&hl=' + encodeURIComponent(lang), + callbackName: 'cb', + onComplete: tr + }); + } else { + tr(); + } + } + + /** + * Determine the current language of user. + */ + this._language = false; + this.currentLanguage = function() { + if (!this._language) { + this._language = 'en_us'; + if ($('_current_language_')) { + this._language = $('_current_language_').getAttribute('src').match(/include\/js\/([^.]+)/)[1]; + } + } + return this._language.split('_'); + } +} + +/** + * Singleton for use + */ +vtiger_help_controller_singleton = { + instance: false, + get: function() { + if (!vtiger_help_controller_singleton.instance) { + vtiger_help_controller_singleton.instance = new vtiger_help_controller(); + vtiger_help_controller_singleton.instance.init(); + } + return vtiger_help_controller_singleton.instance; + } +} + +/** + * Export the functions. + */ +function vtiger_help(obj, title, uri) { + vtiger_help_controller_singleton.get().helpMeNow(obj, title, uri); + document.getElementById('vtigerHelpPopupLay').style.left= '0px'; + document.getElementById('vtigerHelpPopupLay').style.top= '-2px'; +} + +function vtiger_help_nav(obj) { + vtiger_help_controller_singleton.get().helpMeNowNavigate(obj); +} +/** + *funtion to close the popup + */ +function closePopup(){ + document.getElementById('vtigerHelpPopupLay').style.display='none'; + document.getElementById('helpLink').style.display='block'; + +} + +/** + *funtion to have a toggle action in the popup + */ + +function vtiger_help_toggle(header){ + var heading=header.parentNode; + var arrow = vtlib_getElementsByClassName(header,'helpArrow','label'); + var content =vtlib_getElementsByClassName(heading,'content','div'); + var visible=content[0].style.display; + if(visible=='none'){ + content[0].style.display="block"; + arrow[0].innerHTML=""; + } + else{ + content[0].style.display="none"; + arrow[0].innerHTML=""; + } +} + +/* + * getElementsByClassName fix for I.E 8 + */ +function vtiger_help_getElementsByClassName(obj,className,tagName){ + //Use getElementsByClassName if it is supported + if ( typeof(obj.getElementsByClassName) != 'undefined' ) { + return obj.getElementsByClassName(className); + } + + // Otherwise search for all tags of type tagname with class "className" + var returnList = new Array(); + var nodes = obj.getElementsByTagName(tagName); + var max = nodes.length; + for ( var i = 0; i < max; i++ ) { + if ( nodes[i].className == className ) { + returnList[returnList.length] = nodes[i]; + } + } + return returnList; +} + +function vtiger_help_welcome(obj, container) { + VtigerJS_DialogBox.block(); + obj.style.zIndex = parseInt((+new Date())/1000)+5; // To ensure z-Index is higher than the popup block + vtiger_help_controller_singleton.get().helpMeNow(container, '', '?module=Home&action=welcome', true, function(){ + obj.style.display = 'block'; + // NOTE: Google translate handle works one-per page + // Need more investigation on the failure on other helpmenow page if this is enabled. + /* + vtiger_help_controller_singleton.get().translate('vtigerHelpWelcomeGTranslateEl'); + */ + }); +} +/** + * Trigger init of help controller on page load. + */ +Event.observe(window, 'load', function(){ + vtiger_help_controller_singleton.get(); +}); + diff --git a/modules/Home/js/ajax.js b/modules/Home/js/ajax.js new file mode 100644 index 0000000..ae435a9 --- /dev/null +++ b/modules/Home/js/ajax.js @@ -0,0 +1,92 @@ +/* + Copyright 2005 Rolando Gonzalez (rolosworld@gmail.com) + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +function getRequester() +{ + try + { + if(window.XMLHttpRequest) + { + return new XMLHttpRequest(); + } + else if(window.ActiveXObject) + { + return new ActiveXObject("Microsoft.XMLHTTP"); + } + } + catch (e) + { + alert("You need a browser which supports an XMLHttpRequest Object.\nMozilla build 0.9.5 has this Object and IE5 and above."); + } +}; + +/* +onreadystatechange Event handler for an event that fires at every state change +readyState Object status integer: +0 = uninitialized +1 = loading +2 = loaded +3 = interactive +4 = complete +responseText String version of data returned from server process +responseXML DOM-compatible document object of data returned from server process +status Numeric code returned by server, such as 404 for "Not Found" or 200 for "OK" +statusText String message accompanying the status code +*/ +function Ajax(cb) +{ + var me = this; + this.requester = getRequester(); + + if(cb) + this.callback = cb; + else + this.callback = function(req) + { + return eval(req.responseText); + }; + + this.requester.onreadystatechange = function(){ + switch(me.requester.readyState) + { + case 1: + case 2: + case 3: + break; + case 4: + var response = me.callback(me.requester); + break; + default: + alert("Error"); + break; + } + }; + + this.state = function() + { + return me.requester.readyState; + }; + + this.process = function(url, parameters){ + me.requester.open("POST", url, true); + me.requester.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); + me.requester.setRequestHeader("Content-length", parameters.length); + //me.requester.setRequestHeader("Connection", "close"); + me.requester.send(parameters); + }; +}; diff --git a/modules/Home/js/chat.js b/modules/Home/js/chat.js new file mode 100644 index 0000000..b19d1fd --- /dev/null +++ b/modules/Home/js/chat.js @@ -0,0 +1,476 @@ +/* + Copyright 2005 Rolando Gonzalez (rolosworld@gmail.com) + + This program 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 2 of the License, or + (at your option) any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +var chats = new Array(); // private chats opened +var users = new Array(); // users list +var chat_data = null; +var mlid = 0; //msg last id +var DEBUG = false; +var PRIVATES = true; +var PUBLIC = true; + +function getNick(uid) +{ + for(var i in users) + { + if(users[i].uid == uid) + return users[i].nick; + } + return null; +}; + +function resetChatsZ() +{ + for(var i = 0; i < chats.length; i++) + if(chats[i]) + chats[i].win.table.style.zIndex = chats[i].win.z; +}; + +function debug(dib,msg) +{ + if(!DEBUG) return; + if(document.getElementById(dib)) + document.getElementById(dib).innerHTML = msg; + else + alert(msg); +}; + +// initialize chat connection. +function Chat(conf) +{ + var me = this; + this.pcid = conf["pchatid"]?conf["pchatid"]:null; + this.dt = conf["dt"]?conf["dt"]:1000; + this.ulid = conf["ulid"]?conf["ulid"]:null; + this.w = conf["width"]?conf["width"]:"400px"; + this.h = conf["height"]?conf["height"]:"300px"; + this.ulist = null; + + if(this.pcid) + { + chats[0] = new PubChat(this.dt,this.w,this.h); + document.getElementById(this.pcid).appendChild(chats[0].get()); + } + + // evaluate the returned json + this.callback = function(response) + { + me.ajax = null; + try{ + me.doRefresh(response.responseText); + }catch(e){ + debug("debug","Chat Error: "+response.responseText); + clearInterval(me.interv); + debug("debug",e.toString()); + debug("debug",e.filename+":"+e.lineNumber); + return; + } + me.ajax = new Ajax(me.callback); + debug("debug",response.responseText); + window.status=Date(); + }; + + this.doRefresh = function(response) + { + if(!me.ulist) + me.ulist = new UList(me.dt,me.ulid,me.w,me.h); + chat_data = eval("("+response+")"); + me.ulist.refresh(); + me.refreshChats(); + }; + + this.ajax = new Ajax(me.callback); + + // start the ajax request for the chat data + this.refresh = function() + { + if(me.ajax.state() == 0) + me.ajax.process("index.php?mode=chat&module=Home&action=chat","submode=get_all&mlid="+mlid); + }; + this.interv = setInterval(me.refresh,me.dt); + + this.refreshChats = function() + { + if(chat_data.pvchat) + { + cnum = 0; + for(var i in chat_data.pvchat) + { + cnum = chat_data.pvchat[i].chat; + if(!chats[cnum]) + chats[cnum] = new PrivChat(me.dt,cnum,me.w,me.h); + + if(mlid < chat_data.pvchat[i].mlid) + mlid = chat_data.pvchat[i].mlid; + + if(chat_data.pvchat[i].msg.substr(0,5) == "\\sys ") + { + chats[cnum].appendSysMsg(chat_data.pvchat[i].msg.substr(5)); + } + else + chats[cnum].appendMsg(chat_data.pvchat[i].from,chat_data.pvchat[i].msg); + } + chat_data.pvchat = null; + } + + if(PUBLIC && chat_data.pchat) + { + for(var i in chat_data.pchat) + { + if(mlid < chat_data.pchat[i].mlid) + mlid = chat_data.pchat[i].mlid; + + if(!chats[0]) + continue; + + if(chat_data.pchat[i].msg.substr(0,5) == "\\sys ") + { + chats[0].appendSysMsg(chat_data.pchat[i].msg.substr(5)); + } + else + chats[0].appendMsg(chat_data.pchat[i].from,chat_data.pchat[i].msg); + } + chat_data.pchat = null; + } + }; +}; + +// User list handler +function UList(dt,ulid,w,h) +{ + var me = this; + this.w = w; + this.h = h; + this.dt = dt; // delta time to sleep the requests. + this.ulid = ulid; // user list ul tag id. + this.interv = null; + + // updates the users list on the html + this.refreshList = function() + { + if(!document.getElementById(me.ulid)) + { + clearInterval(me.interv); + return; + } + + while(document.getElementById(me.ulid).firstChild) + document.getElementById(me.ulid).removeChild(document.getElementById(me.ulid).firstChild); + + if(users) + { + var li; + var a; + var user; + for(var i in users) + { + user = users[i]; + li = document.createElement("span"); + a = document.createElement("a"); + a.appendChild(document.createTextNode(user.nick)); + a.setAttribute("href","#"); + a.className = "chat"; + if(PRIVATES) + a.onclick = me.newPriv(me.dt,user.uid); + + li.appendChild(a); + document.getElementById(me.ulid).appendChild(li); + } + //var date = new Date(); + //window.status=date.toString(); + } + }; + + // higher order stuff + this.newPriv = function(dt,uid) + { + return function() + { + if(!chats[uid]) + { + resetChatsZ(); + chats[uid] = new PrivChat(dt,uid,me.w,me.h); + } + return false; + }; + }; + + // check if theres a new user list + this.refresh = function() + { + //users = null; + if(chat_data.ulist) + { + users = chat_data.ulist; + me.refreshList(); + } + chat_data.ulist = null; + }; +}; + +////////////////////////////////////////////////////////// +// Input handler +function chatInput(to) +{ + var me = this; + this.to = to?to:null; + this.input = document.createElement("input"); + this.input.className = "cinput"; + this.input.setAttribute("type","text"); + this.input.setAttribute("name","input"); + + var table = document.createElement("table"); + //table.border = "1"; + var tbody = table.appendChild(document.createElement("tbody")); + var tr = tbody.appendChild(document.createElement("tr")); + var td = tr.appendChild(document.createElement("td")); + var td1 = tr.appendChild(document.createElement("td")); + var td2 = tr.appendChild(document.createElement("td")); + + table.className = "cinput"; + tbody.className = "cinput"; + tr.className = "cinput"; + td.className = "ckeyb"; + td1.className = "cinput"; + td2.className = "csubmit"; + + this.input = td1.appendChild(this.input); + td2.onclick = function() + { + var ajax = new Ajax(me.callback); + ajax.process("index.php?mode=chat&module=Home&action=chat","submode=submit&msg="+escapeAll(me.input.value)+(me.to?"&to="+me.to:"")); + + me.input.value = ""; + me.input.focus(); + return false; + }; + + this.form = document.createElement("form"); + this.form.className = "cinput"; + + this.form.appendChild(table); + this.form.onsubmit = function() + { + var ajax = new Ajax(me.callback); + ajax.process("index.php?mode=chat&module=Home&action=chat","submode=submit&msg="+escapeAll(me.input.value)+(me.to?"&to="+me.to:"")); + me.input.value = ""; + me.input.focus(); + return false; + }; + + this.setFocus = function() + { + me.input.focus(); + }; + + // evaluate the returned json + this.callback = function(response) + { + response = response.responseText; + try{ + if(response) + debug("debug",response); + }catch(e){ + debug("debug","chatInput Error: "+response); + } + }; + + this.get = function() + { + return me.form; + }; +}; + +////////////////////////////////////////////////////////// +// Private chat handler / abre ventana de usurio + usuario +function PrivChat(dt,to,w,h) +{ + var me = this; + this.dt = dt; // delta time to sleep the requests. + this.to = to; // private chat the other user id + this.input = new chatInput(to); + this.toNick = getNick(to); + + var conf = new Array(); + conf["topic"] = "Private chat with "+me.toNick+""; + conf["class"] = "chat"; + conf["width"] = w; + conf["height"] = h; + conf["drag"] = true; + + this.win = new cssWindow(conf); + + // move z+1..crappy way to send above others + this.win.table.onDragStart = function() + { + resetChatsZ(); + chats[me.to].win.table.style.zIndex++; + }; + + this.win.cb = function() + { + me.ajax = new Ajax(me.callback); + me.ajax.process("index.php?mode=chat&module=Home&action=chat","submode=pvclose&to="+me.to); + chats[me.to]=null; + }; + + this.cbox = this.win.setBody(document.createElement("div")); + this.cbox.style.width = "100%"; + this.cbox.style.height = "100%"; + this.cbox.style.overflow = "auto"; + this.cbox.className = "chatbox"; + + // Draws the top of the window + this.getHead = function() + { + var t = document.createElement("table"); + t.style.width="100%";t.cellSpacing="0";t.cellPadding="0"; + var tb = t.appendChild(document.createElement("tbody")); + var tr = tb.appendChild(document.createElement("tr")); + var td = tr.appendChild(document.createElement("td")); + td.className = "chaticon"; + td = tr.appendChild(document.createElement("td")); + td.className = "chattopic1"; + td.innerHTML = me.win.topic; + var hide = tr.appendChild(document.createElement("td")); + hide.className = "chathide"; + hide.onclick = me.win.doHide; + var close = tr.appendChild(document.createElement("td")); + close.className = "chatclose"; + close.onclick = me.win.doClose; + return t; + }; + + this.win.setHead(this.getHead()); + this.win.setFoot(this.input.get()); + + + // updates the chat on the html + this.appendMsg = function(from,msg) + { + var div; + var span; + + span = document.createElement("span"); + span.appendChild(document.createTextNode(from+": ")); + span.className = "cunick"; + + div = document.createElement("div"); + div.className = "cumsg"; + + div.appendChild(span); + div.innerHTML+=msg; + me.cbox.appendChild(div); + me.cbox.scrollTop=me.cbox.scrollHeight; + }; + + // updates the chat on the html + this.appendSysMsg = function(msg) + { + var div; + div = document.createElement("div"); + div.className = "csmsg"; + div.innerHTML+=msg; + me.cbox.appendChild(div); + me.cbox.scrollTop=me.cbox.scrollHeight; + }; + + this.win.show(); + this.input.setFocus(); +}; + +////////////////////////////////////////////////////////// +// Public chat handler / abre ventana de usurio + usuario +function PubChat(dt,w,h) +{ + var me = this; + this.dt = dt; // delta time to sleep the requests. + this.to = 0; // public chat the other user id + this.input = new chatInput(this.to); + + var conf = new Array(); + conf["topic"] = "Public Chat"; + conf["class"] = "pchat"; + conf["width"] = w; + conf["height"] = h; + conf["drag"] = false; + + this.win = new cssWindow(conf); + + this.cbox = this.win.setBody(document.createElement("div")); + this.cbox.style.width = "100%"; + this.cbox.style.height = "100%"; + this.cbox.style.overflow = "auto"; + this.cbox.className = "chatbox"; + + // Draws the top of the window + this.getHead = function() + { + var t = document.createElement("table"); + t.style.width="100%";t.cellSpacing="0";t.cellPadding="0"; + var tb = t.appendChild(document.createElement("tbody")); + var tr = tb.appendChild(document.createElement("tr")); + var td = tr.appendChild(document.createElement("td")); + td.className = "chattopic"; + td.appendChild(document.createTextNode(me.win.topic)); + var hide = tr.appendChild(document.createElement("td")); + hide.className = "chathide"; + hide.onclick = me.win.doHide; + + return t; + }; + + this.win.setHead(this.getHead()); + this.win.setFoot(this.input.get()); + + // updates the chat on the html + this.appendMsg = function(from,msg) + { + var div; + var span; + + span = document.createElement("span"); + span.appendChild(document.createTextNode(from+": ")); + span.className = "cunick"; + + div = document.createElement("div"); + div.className = "cumsg"; + + div.appendChild(span); + div.innerHTML+=msg; + me.cbox.appendChild(div); + me.cbox.scrollTop=me.cbox.scrollHeight; + }; + + // updates the chat on the html + this.appendSysMsg = function(msg) + { + var div; + div = document.createElement("div"); + div.className = "csmsg"; + div.innerHTML+=msg; + me.cbox.appendChild(div); + me.cbox.scrollTop=me.cbox.scrollHeight; + }; + + this.get = function() + { + me.input.setFocus(); + return me.win.get(); + }; +}; diff --git a/modules/Home/js/css-window_p.js b/modules/Home/js/css-window_p.js new file mode 100644 index 0000000..15fe51a --- /dev/null +++ b/modules/Home/js/css-window_p.js @@ -0,0 +1 @@ +eval(function(p,a,c,k,e,d){e=function(c){return(c'Neue Person', + 'LBL_FIRST_NAME'=>'Vorname:', + 'LBL_LAST_NAME'=>'Nachname:', + 'LBL_LIST_LAST_NAME'=>'Nachname', + 'LBL_ACCOUNT_NAME'=>'Organisation:', + 'LBL_LIST_ACCOUNT_NAME'=>'Organisation', + 'LBL_PHONE'=>'Telefon:', + 'LBL_EMAIL_ADDRESS'=>'E-Mail:', + 'LBL_TOTAL'=>'Total: ', + + 'LBL_MY_HOME'=>'Meine Startseite', + 'LBL_MODIFIED_TIME'=>'geändert', + 'LBL_LOGIN_ID'=>'ID', + 'LBL_MODIFIED_BY'=>'geändert von', + 'LBL_TYPE'=>'Typ', + + 'LBL_PIPELINE_FORM_TITLE'=>'Meine Verkäufe', + + 'ERR_ONE_CHAR'=>'Bitte mindestens ein Zeichen oder eine Ziffer für Ihre Suche eingeben.', + + 'LBL_OPEN_TASKS'=>'Meine offenen Aufgaben', + + 'LBL_LEADS_BY_SOURCE'=>'Leads sortiert nach Quelle', + 'LBL_LEADS_BY_STATUS'=>'Leads sortiert nach Status', + + 'LBL_UPCOMING_EVENTS'=>'aktuelle Aktivitäten', + 'LBL_PENDING_EVENTS'=>'unerledigte Aktivitäten', + 'LBL_SINGLE_PENDING_EVENT'=>'Ereignis in den letzten 10 Tagen', + 'LBL_MULTIPLE_PENDING_EVENTS'=>'Ereignisse in den letzten 10 Tagen', + + 'recordsforuser'=>'Daten für', + + 'Today'=>'heute', + 'This Week'=>'diese Woche', + 'This Month'=>'dieser Monat', + 'This Year'=>'dieses Jahr', + 'Last Week'=>'letzte Woche', + 'Last 2 Days'=>'letzte 2 Tage', + 'Last Ten Days'=>'letzte 10 Tage', + + // Added/Updated for vtiger CRM 5.0.4 + 'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chat', + 'User List'=>'Benutzerliste', + + // Added after 5.0.4 GA + + //ADDED for Home Page Customization + 'LBL_HOME_MODULE' => 'Modul', + 'LBL_HOME_RSS' => 'RSS', + 'LBL_HOME_DASHBOARD' => 'Cockpit', + 'LBL_HOME_STUFFTITLE'=>'Fenstertitel', + 'LBL_HOME_SHOW'=>'liste', + 'LBL_HOME_FILTERBY'=>'Listenansicht', + 'LBL_HOME_Fields'=>'anzuzeigende Inhalte
(1 oder 2 auswählen)', + 'LBL_HOME_PRESSCTRL'=>'(nutze "Strg"
für Mehrfachauswahl)', + 'LBL_HOME_RSSURL'=>'RSS URL', + 'LBL_HOME_DASHBOARD_NAME'=>'Cockpit Name', + 'LBL_HOME_DASHBOARD_TYPE'=>'Cockpit Typ', + 'LBL_HOME_HORIZONTAL_BARCHART'=>'horizontales Balkendiagramm', + 'LBL_HOME_VERTICAL_BARCHART'=>'vertikales Balkendiagramm', + 'LBL_HOME_PIE_CHART'=>'Tortendiagramm', + 'LBL_HOME_ITEMS'=>'Einträge', + 'LBL_MORE'=>'mehr', + 'LBL_SCROLL'=>'scrollen', + + // vtiger CRM News + 'LBL_NEWS_NO'=>'keine neuen Nachrichten', + + //added for home page changes + 'LBL_NOTEBOOK'=>'Notizblock', + 'LBL_NOTEBOOK_TITLE'=>'Doppelklick zum Bearbeiten.', + 'LBL_NOTEBOOK_SAVE_TITLE'=>'Klicken Sie irgendwo auf die Seite um den Eintrag zu speichern.', + + 'LBL_URL'=>'Webseite', + 'LBL_HOME_LAYOUT'=>'Layout ändern', + 'LBL_NUMBER_OF_COLUMNS'=>'Spaltenanzahl', + 'LBL_TWO_COLUMN'=>'2 Spalten', + 'LBL_THREE_COLUMN'=>'3 Spalten', + 'LBL_FOUR_COLUMN'=>'4 Spalten', + // END + + // Default home page widget's title + 'Top Accounts'=>'Top Organisationen', + 'Top Potentials'=>'Top Potentiale', + 'Top Quotes'=>'Top Angebote', + 'Top Trouble Tickets'=>'Top Tickets', + 'Top Invoices'=>'Top Rechnungen', + 'Top Sales Orders'=>'Top Verkaufsbestellungen', + 'Top Purchase Orders'=>'Top Einkaufsbestellungen', + 'My New Leads'=>'meine neuen Leads', + 'Key Metrics'=>'benutzerdefinierte Listen', + 'My Group Allocation'=>'meine Gruppenzugehörigkeit', + 'My Recent FAQs'=>'meine Wissensbasis', + 'Upcoming Activities'=>'geplante Aktivitäten', + 'Pending Activities'=>'überfällige Aktivitäten', + 'Home Page Dashboard'=>'Home Cockpit', + 'Tag Cloud'=>'Tag Wolke', + + 'MSG_NO_FILTERS' => 'keine Filter verfügbar', + 'MSG_NO_FIELDS' => 'keine Felder verfügbar', + + //Customization Phase 6 -- Monolithic + 'LBL_REPORTCHARTS' => 'Berichtsgrafiken', + 'LBL_HOME_REPORT_NAME'=> 'Berichtsname', + 'LBL_HOME_REPORT_TYPE' => 'Berichtstyp', + //END + + //added for Default Widgets + 'LBL_DEFAULT_WIDGET'=>'Standardfenster', + 'LBL_NO_WIDGETS_HIDDEN'=>'Keine versteckten Standardfenster', +); + +?> \ No newline at end of file diff --git a/modules/Home/language/en_gb.lang.php b/modules/Home/language/en_gb.lang.php new file mode 100644 index 0000000..07a4acb --- /dev/null +++ b/modules/Home/language/en_gb.lang.php @@ -0,0 +1,95 @@ + 'New Contact', + 'LBL_FIRST_NAME' => 'First Name:', + 'LBL_LAST_NAME' => 'Last Name:', + 'LBL_LIST_LAST_NAME' => 'Last Name', + 'LBL_ACCOUNT_NAME' => 'Organisation Name:', + 'LBL_LIST_ACCOUNT_NAME' => 'Organisation Name', + 'LBL_PHONE' => 'Phone:', + 'LBL_EMAIL_ADDRESS' => 'Email:', + 'LBL_TOTAL' => 'Total:', + 'LBL_MY_HOME' => 'My Home', + 'LBL_MODIFIED_TIME' => 'Modified Time', + 'LBL_LOGIN_ID' => 'ID', + 'LBL_MODIFIED_BY' => 'Modified By', + 'LBL_TYPE' => 'Type', + 'LBL_PIPELINE_FORM_TITLE' => 'My Pipeline', + 'ERR_ONE_CHAR' => 'Please enter at least one letter or number for your search ...', + 'LBL_OPEN_TASKS' => 'My Open Tasks', + 'LBL_LEADS_BY_SOURCE' => 'Leads by Source', + 'LBL_LEADS_BY_STATUS' => 'Leads by Status', + 'LBL_UPCOMING_EVENTS' => 'Upcoming Activities', + 'LBL_PENDING_EVENTS' => 'Pending Activities', + 'LBL_SINGLE_PENDING_EVENT' => 'Event for Last Ten Days', + 'LBL_MULTIPLE_PENDING_EVENTS' => 'Events for Last Ten Days', + 'recordsforuser' => 'Records for', + 'Today' => 'Today', + 'This Week' => 'This Week', + 'This Month' => 'This Month', + 'This Year' => 'This Year', + 'Last Week' => 'Last Week', + 'Last 2 Days' => 'Last 2 Days', + 'Last Ten Days' => 'Last Ten Days', + 'TITLE_AJAX_CSS_POPUP_CHAT' => 'Ajax Css-Popup chat', + 'User List' => 'User List', + 'LBL_HOME_MODULE' => 'Module', + 'LBL_HOME_RSS' => 'RSS', + 'LBL_HOME_DASHBOARD' => 'Dashboard', + 'LBL_HOME_STUFFTITLE' => 'Window Title', + 'LBL_HOME_SHOW' => 'Show', + 'LBL_HOME_FILTERBY' => 'Filter By', + 'LBL_HOME_Fields' => 'Fields To Show
(select any two)', + 'LBL_HOME_PRESSCTRL' => '(Press "Ctrl"
for multiple selection)', + 'LBL_HOME_RSSURL' => 'RSS URL', + 'LBL_HOME_DASHBOARD_NAME' => 'DashBoard Name', + 'LBL_HOME_DASHBOARD_TYPE' => 'DashBoard Type', + 'LBL_HOME_HORIZONTAL_BARCHART' => 'Horizontal Bar Chart', + 'LBL_HOME_VERTICAL_BARCHART' => 'Vertical Bar Chart', + 'LBL_HOME_PIE_CHART' => 'Pie Chart', + 'LBL_HOME_ITEMS' => 'item(s)', + 'LBL_MORE' => 'More', + 'LBL_SCROLL' => 'Scroll', + 'LBL_NEWS_NO' => 'No news', + 'LBL_NOTEBOOK' => 'Notebook', + 'LBL_NOTEBOOK_TITLE' => 'Double-click to edit.', + 'LBL_NOTEBOOK_SAVE_TITLE' => 'Click anywhere else on the page to save.', + 'LBL_URL' => 'Website', + 'LBL_HOME_LAYOUT' => 'Change layout', + 'LBL_NUMBER_OF_COLUMNS' => 'Number of columns', + 'LBL_TWO_COLUMN' => 'Two Columns', + 'LBL_THREE_COLUMN' => 'Three Columns', + 'LBL_FOUR_COLUMN' => 'Four Columns', + 'Top Accounts' => 'Top Organisations', + 'Top Potentials' => 'Top Opportunities', + 'Top Quotes' => 'Top Quotes', + 'Top Trouble Tickets' => 'Top Trouble Tickets', + 'Top Invoices' => 'Top Invoices', + 'Top Sales Orders' => 'Top Sales Orders', + 'Top Purchase Orders' => 'Top Purchase Orders', + 'My New Leads' => 'My New Leads', + 'Key Metrics' => 'Key Metrics', + 'My Group Allocation' => 'My Group Allocation', + 'My Recent FAQs' => 'My Recent FAQs', + 'Upcoming Activities' => 'Upcoming Activities', + 'Pending Activities' => 'Pending Activities', + 'Home Page Dashboard' => 'Home Page Dashboard', + 'Tag Cloud' => 'Tag Cloud', + 'MSG_NO_FILTERS' => 'No Filters Available', + 'MSG_NO_FIELDS' => 'No Fields Available', + 'LBL_REPORTCHARTS' => 'Report Charts', + 'LBL_HOME_REPORT_NAME' => 'Report Name', + 'LBL_HOME_REPORT_TYPE' => 'Report Type', + 'LBL_DEFAULT_WIDGET' => 'Default widgets', + 'LBL_NO_WIDGETS_HIDDEN' => 'No default widgets are hidden' +); +?> \ No newline at end of file diff --git a/modules/Home/language/en_us.lang.php b/modules/Home/language/en_us.lang.php new file mode 100644 index 0000000..4c4c20d --- /dev/null +++ b/modules/Home/language/en_us.lang.php @@ -0,0 +1,133 @@ +'New Contact', +'LBL_FIRST_NAME'=>'First Name:', +'LBL_LAST_NAME'=>'Last Name:', +'LBL_LIST_LAST_NAME'=>'Last Name', +'LBL_ACCOUNT_NAME'=>'Organization Name:', +'LBL_LIST_ACCOUNT_NAME'=>'Organization Name', +'LBL_PHONE'=>'Phone:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_TOTAL'=>'Total : ', + +'LBL_MY_HOME'=>'My Home', +'LBL_MODIFIED_TIME'=>'Modified Time', +'LBL_LOGIN_ID'=>'ID', +'LBL_MODIFIED_BY'=>'Modified By', +'LBL_TYPE'=>'Type', + +'LBL_PIPELINE_FORM_TITLE'=>'My Pipeline', + +'ERR_ONE_CHAR'=>'Please enter at least one letter or number for your search ...', + +'LBL_OPEN_TASKS'=>'My Open Tasks', + +'LBL_LEADS_BY_SOURCE'=>'Leads By Source', +'LBL_LEADS_BY_STATUS'=>'Leads By Status', + +'LBL_UPCOMING_EVENTS'=>'Upcoming Activities', +'LBL_PENDING_EVENTS'=>'Pending Activities', +'LBL_SINGLE_PENDING_EVENT'=>'Event for Last Ten Days', +'LBL_MULTIPLE_PENDING_EVENTS'=>'Events for Last Ten Days', + +'recordsforuser'=>'Records for', + +'Today'=>'Today', +'This Week'=>'This Week', +'This Month'=>'This Month', +'This Year'=>'This Year', +'Last Week'=>'Last Week', +'Last 2 Days'=>'Last 2 Days', +'Last Ten Days'=>'Last Ten Days', + +// Added/Updated for vtiger CRM 5.0.4 +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Ajax Css-Popup chat', +'User List'=>'User List', + +// Added after 5.0.4 GA + +//ADDED for Home Page Customization +'LBL_HOME_MODULE' => 'Module', +'LBL_HOME_RSS' => 'RSS', +'LBL_HOME_DASHBOARD' => 'Dashboard', +'LBL_HOME_STUFFTITLE'=>'Window Title', +'LBL_HOME_SHOW'=>'Show', +'LBL_HOME_FILTERBY'=>'Filter By', +'LBL_HOME_Fields'=>'Fields To Show
(select any two)', +'LBL_HOME_PRESSCTRL'=>'(Press "Ctrl"
for multiple selection)', +'LBL_HOME_RSSURL'=>'RSS URL', +'LBL_HOME_DASHBOARD_NAME'=>'DashBoard Name', +'LBL_HOME_DASHBOARD_TYPE'=>'DashBoard Type', +'LBL_HOME_HORIZONTAL_BARCHART'=>'Horizontal Bar Chart', +'LBL_HOME_VERTICAL_BARCHART'=>'Vertical Bar Chart', +'LBL_HOME_PIE_CHART'=>'Pie Chart', +'LBL_HOME_ITEMS'=>'item(s)', +'LBL_MORE'=>'More', +'LBL_SCROLL'=>'Scroll', + +// vtiger CRM News +'LBL_NEWS_NO'=>'No news', + +//added for home page changes +'LBL_NOTEBOOK'=>'Notebook', +'LBL_NOTEBOOK_TITLE'=>'Double-click to edit.', +'LBL_NOTEBOOK_SAVE_TITLE'=>'Click anywhere else on the page to save.', + +'LBL_URL'=>'Website', +'LBL_HOME_LAYOUT'=>'Change layout', +'LBL_NUMBER_OF_COLUMNS'=>'Number of columns', +'LBL_TWO_COLUMN'=>'Two Columns', +'LBL_THREE_COLUMN'=>'Three Columns', +'LBL_FOUR_COLUMN'=>'Four Columns', +// END + +// Default home page widget's title +'Top Accounts'=>'Top Organizations', +'Top Potentials'=>'Top Opportunities', +'Top Quotes'=>'Top Quotes', +'Top Trouble Tickets'=>'Top Trouble Tickets', +'Top Invoices'=>'Top Invoices', +'Top Sales Orders'=>'Top Sales Orders', +'Top Purchase Orders'=>'Top Purchase Orders', +'My New Leads'=>'My New Leads', +'Key Metrics'=>'Key Metrics', +'My Group Allocation'=>'My Group Allocation', +'My Recent FAQs'=>'My Recent FAQs', +'Upcoming Activities'=>'Upcoming Activities', +'Pending Activities'=>'Pending Activities', +'Home Page Dashboard'=>'Home Page Dashboard', +'Tag Cloud'=>'Tag Cloud', + +'MSG_NO_FILTERS' => 'No Filters Available', +'MSG_NO_FIELDS' => 'No Fields Available', + +//Customization Phase 6 -- Monolithic +'LBL_REPORTCHARTS' => 'ReportCharts', +'LBL_HOME_REPORT_NAME'=> 'Report Name', +'LBL_HOME_REPORT_TYPE' => 'Report Type', +//END + +//added for Default Widgets +'LBL_DEFAULT_WIDGET'=>'Default Widgets', +'LBL_NO_WIDGETS_HIDDEN'=>'No default widgets are hidden', +); + +?> diff --git a/modules/Home/language/es_es.lang.php b/modules/Home/language/es_es.lang.php new file mode 100644 index 0000000..90016ac --- /dev/null +++ b/modules/Home/language/es_es.lang.php @@ -0,0 +1,136 @@ +'Nuevo Contacto', +'LBL_FIRST_NAME'=>'Nombre:', +'LBL_LAST_NAME'=>'Apellidos:', +'LBL_LIST_LAST_NAME'=>'Apellidos', +'LBL_ACCOUNT_NAME'=>'Nombre de la Cuenta:', +'LBL_LIST_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_PHONE'=>'Teléfono:', +'LBL_EMAIL_ADDRESS'=>'E-mail:', +'LBL_TOTAL'=>'Total: ', + +'LBL_MY_HOME'=>'Mi Inicio', +'LBL_MODIFIED_TIME'=>'Fecha de Modificación', +'LBL_LOGIN_ID'=>'ID', +'LBL_MODIFIED_BY'=>'Modificado Por', +'LBL_TYPE'=>'Tipo', + +'LBL_PIPELINE_FORM_TITLE'=>'Mis Oportunidades', + +'ERR_ONE_CHAR'=>'Por favor, introduzca al menos una letra o número para efectuar la búsqueda...', + +'LBL_OPEN_TASKS'=>'Mis tareas abiertas', + +'LBL_LEADS_BY_SOURCE'=>'Pre-Contactos Por Origen', +'LBL_LEADS_BY_STATUS'=>'Pre-Contactos Por Estado', + +'LBL_UPCOMING_EVENTS'=>'Próximos Eventos', +'LBL_PENDING_EVENTS'=>'Eventos Pendientes', +'LBL_SINGLE_PENDING_EVENT'=>'Eventos de los últimos 10 días', +'LBL_MULTIPLE_PENDING_EVENTS'=>'Eventos de los últimos 10 días', + +'recordsforuser'=>'Registros por', + +'Today'=>'Hoy', +'This Week'=>'Esta Semana', +'This Month'=>'Este Mes', +'This Year'=>'Este Año', +'Last Week'=>'Esta Semana', +'Last 2 Days'=>'Últimos 2 días', +'Last Ten Days'=>'Últimos 10 días', +// Added/Updated for vtiger CRM 5.0.4 +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chat', +'User List'=>'Lista de Usuarios', + +// Added after 5.0.4 GA + +//ADDED for Home Page Customization +'LBL_HOME_MODULE' => 'Módulo', +'LBL_HOME_RSS' => 'RSS', +'LBL_HOME_DASHBOARD' => 'Análisis', +'LBL_HOME_STUFFTITLE'=>'Título Ventana', +'LBL_HOME_SHOW'=>'Mostrar', +'LBL_HOME_FILTERBY'=>'Filtrar Por', +'LBL_HOME_Fields'=>'Campos a Mostrar
(selecciona dos)', +'LBL_HOME_PRESSCTRL'=>'(Pulsa "Ctrl"
para seleccionar varios)', +'LBL_HOME_RSSURL'=>'RSS URL', +'LBL_HOME_DASHBOARD_NAME'=>'Nombre Análisis', +'LBL_HOME_DASHBOARD_TYPE'=>'Tipo Análisis', +'LBL_HOME_HORIZONTAL_BARCHART'=>'Gráfico Barras Horizontal', +'LBL_HOME_VERTICAL_BARCHART'=>'Gráfico Barras Vertical', +'LBL_HOME_PIE_CHART'=>'Gráfico Tarta', +'LBL_HOME_ITEMS'=>'elemento(s)', +'LBL_MORE'=>'Más', +'LBL_SCROLL'=>'Desplazar', + +// vtiger CRM News +'LBL_NEWS_NO'=>'Sín Noticias', + +//added for home page changes +'LBL_NOTEBOOK'=>'Notas', +'LBL_NOTEBOOK_TITLE'=>'Doble-click para editar.', +'LBL_NOTEBOOK_SAVE_TITLE'=>'Pulse en cualquier otra parte para guardar.', + +'LBL_URL'=>'Sitio Web', +'LBL_HOME_LAYOUT'=>'Cambia disposición', +'LBL_NUMBER_OF_COLUMNS'=>'Número de columnas', +'LBL_TWO_COLUMN'=>'Dos Columnas', +'LBL_THREE_COLUMN'=>'Tres Columnas', +'LBL_FOUR_COLUMN'=>'Cuatro Columnas', +// END + +// Default home page widget's title +'Top Accounts'=>'Cuentas Importantes', +'Top Potentials'=>'Potenciales Importantes', +'Top Quotes'=>'Presupuestos Importantes', +'Top Trouble Tickets'=>'Incidencias Importantes', +'Top Invoices'=>'Facturas Importantes', +'Top Sales Orders'=>'Orden Venta Importantes', +'Top Purchase Orders'=>'Orden Compra Importantes', +'My New Leads'=>'Nuevos PreContactos', +'Key Metrics'=>'Medidas Clave', +'My Group Allocation'=>'Asignación de Grupo', +'My Recent FAQs'=>'FAQs Recientes', +'Upcoming Activities'=>'Próximas Actividades', +'Pending Activities'=>'Actividades Pendientes', +'Home Page Dashboard'=>'Cuadro Mando Inicio', +'Tag Cloud'=>'Nube Etiquetas', + +'MSG_NO_FILTERS' => 'Ningún Filtro Disponible', +'MSG_NO_FIELDS' => 'Ningún Campo Disponible', + +//Customization Phase 6 -- Monolithic +'LBL_REPORTCHARTS' => 'Informes Gráficos', +'LBL_HOME_REPORT_NAME'=> 'Nombre Informe', +'LBL_HOME_REPORT_TYPE' => 'Tipo Informe', +//END + +//added for Default Widgets +'LBL_DEFAULT_WIDGET'=>'Widgets por Defecto', +'LBL_NO_WIDGETS_HIDDEN'=>'No hay widgets escondidos', + +); + +?> diff --git a/modules/Home/language/es_mx.lang.php b/modules/Home/language/es_mx.lang.php new file mode 100644 index 0000000..3f1611a --- /dev/null +++ b/modules/Home/language/es_mx.lang.php @@ -0,0 +1,137 @@ +'Nuevo Contacto', +'LBL_FIRST_NAME'=>'Nombre:', +'LBL_LAST_NAME'=>'Apellidos:', +'LBL_LIST_LAST_NAME'=>'Apellidos', +'LBL_ACCOUNT_NAME'=>'Nombre de la Cuenta:', +'LBL_LIST_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_PHONE'=>'Teléfono:', +'LBL_EMAIL_ADDRESS'=>'E-mail:', +'LBL_TOTAL'=>'Total: ', + +'LBL_MY_HOME'=>'Mi Inicio', +'LBL_MODIFIED_TIME'=>'Fecha de Modificación', +'LBL_LOGIN_ID'=>'ID', +'LBL_MODIFIED_BY'=>'Modificado Por', +'LBL_TYPE'=>'Tipo', + +'LBL_PIPELINE_FORM_TITLE'=>'Mis Oportunidades', + +'ERR_ONE_CHAR'=>'Por favor, introduzca al menos una letra o número para efectuar la búsqueda...', + +'LBL_OPEN_TASKS'=>'Mis tareas abiertas', + +'LBL_LEADS_BY_SOURCE'=>'Prospectos Por Origen', +'LBL_LEADS_BY_STATUS'=>'Prospectos Por Estado', + +'LBL_UPCOMING_EVENTS'=>'Próximos Eventos', +'LBL_PENDING_EVENTS'=>'Eventos Pendientes', +'LBL_SINGLE_PENDING_EVENT'=>'Eventos de los últimos 10 días', +'LBL_MULTIPLE_PENDING_EVENTS'=>'Eventos de los últimos 10 días', + +'recordsforuser'=>'Registros por', + +'Today'=>'Hoy', +'This Week'=>'Esta Semana', +'This Month'=>'Este Mes', +'This Year'=>'Este Año', +'Last Week'=>'Esta Semana', +'Last 2 Days'=>'Últimos 2 días', +'Last Ten Days'=>'Últimos 10 días', +// Added/Updated for vtiger CRM 5.0.4 +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chat', +'User List'=>'Lista de Usuarios', + +// Added after 5.0.4 GA + +//ADDED for Home Page Customization +'LBL_HOME_MODULE' => 'Módulo', +'LBL_HOME_RSS' => 'RSS', +'LBL_HOME_DASHBOARD' => 'Análisis', +'LBL_HOME_STUFFTITLE'=>'Título Ventana', +'LBL_HOME_SHOW'=>'Mostrar', +'LBL_HOME_FILTERBY'=>'Filtrar Por', +'LBL_HOME_Fields'=>'Campos a Mostrar
(selecciona dos)', +'LBL_HOME_PRESSCTRL'=>'(Pulsa "Ctrl"
para seleccionar varios)', +'LBL_HOME_RSSURL'=>'RSS URL', +'LBL_HOME_DASHBOARD_NAME'=>'Nombre Análisis', +'LBL_HOME_DASHBOARD_TYPE'=>'Tipo Análisis', +'LBL_HOME_HORIZONTAL_BARCHART'=>'Gráfico Barras Horizontal', +'LBL_HOME_VERTICAL_BARCHART'=>'Gráfico Barras Vertical', +'LBL_HOME_PIE_CHART'=>'Gráfico Circular', +'LBL_HOME_ITEMS'=>'elemento(s)', +'LBL_MORE'=>'Más', +'LBL_SCROLL'=>'Desplazar', + +// vtiger CRM News +'LBL_NEWS_NO'=>'Sín Noticias', + +//added for home page changes +'LBL_NOTEBOOK'=>'Notas', +'LBL_NOTEBOOK_TITLE'=>'Doble-click para editar.', +'LBL_NOTEBOOK_SAVE_TITLE'=>'Pulse en cualquier otra parte para guardar.', + +'LBL_URL'=>'Sitio Web', +'LBL_HOME_LAYOUT'=>'Cambia disposición', +'LBL_NUMBER_OF_COLUMNS'=>'Número de columnas', +'LBL_TWO_COLUMN'=>'Dos Columnas', +'LBL_THREE_COLUMN'=>'Tres Columnas', +'LBL_FOUR_COLUMN'=>'Cuatro Columnas', +// END + +// Default home page widget's title +'Top Accounts'=>'Cuentas Importantes', +'Top Potentials'=>'Oportunidades Importantes', +'Top Quotes'=>'Cotizaciones Importantes', +'Top Trouble Tickets'=>'Casos Importantes', +'Top Invoices'=>'Facturas Importantes', +'Top Sales Orders'=>'Pedidos de Venta Importantes', +'Top Purchase Orders'=>'Ordenes de Compra Importantes', +'My New Leads'=>'Nuevos Prospectos', +'Key Metrics'=>'Medidas Clave', +'My Group Allocation'=>'Asignación de Grupo', +'My Recent FAQs'=>'FAQs Recientes', +'Upcoming Activities'=>'Próximas Actividades', +'Pending Activities'=>'Actividades Pendientes', +'Home Page Dashboard'=>'Cuadro Mando Inicio', +'Tag Cloud'=>'Nube Etiquetas', + +'MSG_NO_FILTERS' => 'Ningún Filtro Disponible', +'MSG_NO_FIELDS' => 'Ningún Campo Disponible', + +//Customization Phase 6 -- Monolithic +'LBL_REPORTCHARTS' => 'Informes Gráficos', +'LBL_HOME_REPORT_NAME'=> 'Nombre Informe', +'LBL_HOME_REPORT_TYPE' => 'Tipo Informe', +//END + +//added for Default Widgets +'LBL_DEFAULT_WIDGET'=>'Widgets por Defecto', +'LBL_NO_WIDGETS_HIDDEN'=>'No hay widgets ocultos', + +); + +?> diff --git a/modules/Home/language/fr_fr.lang.php b/modules/Home/language/fr_fr.lang.php new file mode 100644 index 0000000..779171f --- /dev/null +++ b/modules/Home/language/fr_fr.lang.php @@ -0,0 +1,111 @@ + 'Nouveau contact', + 'LBL_FIRST_NAME' => 'Prénom :', + 'LBL_LAST_NAME' => 'Nom :', + 'LBL_LIST_LAST_NAME' => 'Nom', + 'LBL_ACCOUNT_NAME' => 'Nom compte :', + 'LBL_LIST_ACCOUNT_NAME' => 'Nom compte', + 'LBL_PHONE' => 'Téléphone :', + 'LBL_EMAIL_ADDRESS' => 'Email :', + 'LBL_TOTAL' => 'Total : ', + 'LBL_MY_HOME' => 'Ma page d\'accueil', + 'LBL_MODIFIED_TIME' => 'Modifié le', + 'LBL_LOGIN_ID' => 'ID', + 'LBL_MODIFIED_BY' => 'Modifié par', + 'LBL_TYPE' => 'Type', + 'LBL_PIPELINE_FORM_TITLE' => 'Mon pipeline', + 'ERR_ONE_CHAR' => 'Saisissez au minimum une lettre ou un chiffre pour votre recherche svp...', + 'LBL_OPEN_TASKS' => 'Mes tâches en cours', + 'LBL_LEADS_BY_SOURCE' => 'Prospects par origine', + 'LBL_LEADS_BY_STATUS' => 'Prospects par statut', + 'LBL_UPCOMING_EVENTS' => 'Activités à venir', + 'LBL_PENDING_EVENTS' => 'En attente', + 'LBL_SINGLE_PENDING_EVENT' => 'Activités pour les 10 derniers jours', + 'LBL_MULTIPLE_PENDING_EVENTS' => 'Activités pour les 10 derniers jours', + 'recordsforuser' => 'Enregistrements pour', + 'Today' => 'Aujourd\'hui', + 'This Week' => 'Cette semaine', + 'This Month' => 'Ce mois', + 'This Year' => 'Cette année', + 'Last Week' => 'La semaine dernière', + 'Last 2 Days' => 'Les 2 derniers jours', + 'Last Ten Days' => 'Les 10 derniers jours', + + 'TITLE_AJAX_CSS_POPUP_CHAT' => 'Chat en ligne', + 'User List' => 'Liste des utilisateurs', + + 'LBL_HOME_MODULE' => 'Module', + 'LBL_HOME_RSS' => 'RSS', + 'LBL_HOME_DASHBOARD' => 'Tableau de bord', + 'LBL_HOME_STUFFTITLE' => 'Nom du bloc', + 'LBL_HOME_SHOW' => 'Montrer', + 'LBL_HOME_FILTERBY' => 'Filtrer par', + 'LBL_HOME_Fields' => 'Champs à afficher
+ (selectionnez-en deux)', + 'LBL_HOME_PRESSCTRL' => '(Appuyez sur "Ctrl" + pour en sélectionner plusieurs)', + 'LBL_HOME_RSSURL' => 'RSS URL', + 'LBL_HOME_DASHBOARD_NAME' => 'Nom du Tableau de bord', + 'LBL_HOME_DASHBOARD_TYPE' => 'Type de Tableau de bord', + 'LBL_HOME_HORIZONTAL_BARCHART' => 'Graphique avec barre horizontale', + 'LBL_HOME_VERTICAL_BARCHART' => 'Graphique avec barre verticale', + 'LBL_HOME_PIE_CHART' => 'Graphique en camembert', + 'LBL_HOME_ITEMS' => 'objet(s)', + 'LBL_NEWS_NO' => 'N° news', + 'LBL_MORE'=>'Plus', + 'LBL_SCROLL'=>'Défiler', + + // vtiger CRM News + 'LBL_NEWS_NO'=>'Aucune news', + + //added for home page changes + 'LBL_NOTEBOOK'=>'Bloc note', + 'LBL_NOTEBOOK_TITLE'=>'Double-cliquez pour éditer.', + 'LBL_NOTEBOOK_SAVE_TITLE'=>'Cliquez n\'importe ou sur la page pour enregistrer.', + + 'LBL_URL'=>'Site WEB', + 'LBL_HOME_LAYOUT'=>'Modifier l\'apparence', + 'LBL_NUMBER_OF_COLUMNS'=>'Nombre de colonnes', + 'LBL_TWO_COLUMN'=>'Deux colonnes', + 'LBL_THREE_COLUMN'=>'Trois colonnes', + 'LBL_FOUR_COLUMN'=>'Quatre colonnes', + + 'Top Accounts'=>'Top Comptes', + 'Top Potentials'=>'Top Affaires', + 'Top Quotes'=>'Top Devis', + 'Top Trouble Tickets'=>'Top Tickets', + 'Top Invoices'=>'Top Factures', + 'Top Sales Orders'=>'Top Bons de commande', + 'Top Purchase Orders'=>'Top Commandes Fournisseurs', + 'My New Leads'=>'Mes nouveaux prospects', + 'Key Metrics'=>'Indicateurs Clé', + 'My Group Allocation'=>'Mes assignations de groupe', + 'My Recent FAQs'=>'Mes FAQ récentes', + 'Upcoming Activities'=>'Activités à venir', + 'Pending Activities'=>'Activités en attente', + 'Home Page Dashboard'=>'Tableau de bord', + 'Tag Cloud'=>'Tag', + + 'MSG_NO_FILTERS' => 'Aucun filtre disponible', + 'MSG_NO_FIELDS' => 'Aucun champ diponible', + + 'LBL_REPORTCHARTS' => 'Rapport graphique', + 'LBL_HOME_REPORT_NAME'=> 'Titre du rapport', + 'LBL_HOME_REPORT_TYPE' => 'Type du rapport', + + //added for Default Widgets + 'LBL_DEFAULT_WIDGET'=>'Widgets par défaut', + 'LBL_NO_WIDGETS_HIDDEN'=>'Aucun widget par défaut masqué', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Home/language/hu_hu.lang.php b/modules/Home/language/hu_hu.lang.php new file mode 100644 index 0000000..489342b --- /dev/null +++ b/modules/Home/language/hu_hu.lang.php @@ -0,0 +1,101 @@ + 'Új Kapcsolat', + 'LBL_FIRST_NAME' => 'Keresztnév:', + 'LBL_LAST_NAME' => 'Vezetéknév:', + 'LBL_LIST_LAST_NAME' => 'Vezetéknév', + 'LBL_ACCOUNT_NAME' => 'Cég neve:', + 'LBL_LIST_ACCOUNT_NAME' => 'Cég neve', + 'LBL_PHONE' => 'Telefon:', + 'LBL_EMAIL_ADDRESS' => 'Email:', + 'LBL_TOTAL' => 'Összes : ', + 'LBL_MY_HOME' => 'Kezdőlapom', + 'LBL_MODIFIED_TIME' => 'Módosítva', + 'LBL_LOGIN_ID' => 'ID', + 'LBL_MODIFIED_BY' => 'Módosította', + 'LBL_TYPE' => 'Típus', + 'LBL_PIPELINE_FORM_TITLE' => 'Értékesítési tölcsérem', + 'ERR_ONE_CHAR' => 'Kérjük, hogy legalább egy betűt vagy számot üss be a kereséshez...', + 'LBL_OPEN_TASKS' => 'Nyitott Feladataim', + 'LBL_LEADS_BY_SOURCE' => 'Jelöltek Forrás szerint', + 'LBL_LEADS_BY_STATUS' => 'Jelöltek Állapot szerint', + 'LBL_UPCOMING_EVENTS' => 'Elkövetkező Aktivitások', + 'LBL_PENDING_EVENTS' => 'Függő Aktivitások', + 'LBL_SINGLE_PENDING_EVENT' => 'Esemény az utolsó 10 napban', + 'LBL_MULTIPLE_PENDING_EVENTS' => 'Események az utolsó 10 napban', + 'recordsforuser' => 'Rekord számára', + 'Today' => 'Ma', + 'This Week' => 'E Hét', + 'This Month' => 'Ez a Hónap', + 'This Year' => 'Ez Év', + 'Last Week' => 'Elmúlt hét', + 'Last 2 Days' => 'Elmúlt 2 nap', + 'Last Ten Days' => 'Elmúlt 10 nap', + 'TITLE_AJAX_CSS_POPUP_CHAT' => 'Ajax Css-Popup chat', + 'User List' => 'Felhasználó Lista', + 'LBL_HOME_MODULE' => 'Modul', + 'LBL_HOME_RSS' => 'RSS Hírfolyam', + 'LBL_HOME_DASHBOARD' => 'Műszerfal', + 'LBL_HOME_STUFFTITLE' => 'Ablak cím', + 'LBL_HOME_SHOW' => 'Mutat', + 'LBL_HOME_FILTERBY' => 'Szűrő: ', + 'LBL_HOME_Fields' => 'Mutatandó Mezők
(válassz ki kettőt)', + 'LBL_HOME_PRESSCTRL' => '(Nyomd meg a "Ctrl"-t
a többszörös kiválasztáshoz)', + 'LBL_HOME_RSSURL' => 'RSS URL', + 'LBL_HOME_DASHBOARD_NAME' => 'Műszerfal neve', + 'LBL_HOME_DASHBOARD_TYPE' => 'Műszerfal típusa', + 'LBL_HOME_HORIZONTAL_BARCHART' => 'Vízszintes oszlop diagram', + 'LBL_HOME_VERTICAL_BARCHART' => 'Függőleges oszlop diagram', + 'LBL_HOME_PIE_CHART' => 'Tortaszelet diagram', + 'LBL_HOME_ITEMS' => 'tétel(ek)', + 'LBL_MORE' => 'Több', + 'LBL_SCROLL' => 'Görgess', + 'LBL_NEWS_NO' => 'Nincsenek újak', + 'LBL_NOTEBOOK' => 'Jegyzettömb', + 'LBL_NOTEBOOK_TITLE' => 'Dupla kattintás a Szerkesztéshez.', + 'LBL_NOTEBOOK_SAVE_TITLE' => 'Kattints bárhova még az oldalon, hogy mentsd.', + 'LBL_URL' => 'Weboldal', + 'LBL_HOME_LAYOUT' => 'Megjelenést Módosít', + 'LBL_NUMBER_OF_COLUMNS' => 'Oszlopok száma', + 'LBL_TWO_COLUMN' => '2 Oszlop', + 'LBL_THREE_COLUMN' => '3 Oszlop', + 'LBL_FOUR_COLUMN' => '4 Oszlop', + 'Top Accounts' => 'Legfontosabb Cégek', + 'Top Potentials' => 'Legfontosabb Lehetőségek', + 'Top Quotes' => 'Legfontosabb Ajánlatok', + 'Top Trouble Tickets' => 'Legfontosabb Kérések', + 'Top Invoices' => 'Legfontosabb Díjbekérők', + 'Top Sales Orders' => 'Legfontosabb Megrendelés', + 'Top Purchase Orders' => 'Legfontosabb Beszerzések', + 'My New Leads' => 'Új Jelöltjeim', + 'Key Metrics' => 'Kulcs Mérőszámok', + 'My Group Allocation' => 'Csoport Allokációm', + 'My Recent FAQs' => 'Gyakran Ismételt Kérdéseim', + 'Upcoming Activities' => 'Elkövetkező Aktivitások', + 'Pending Activities' => 'Függő Aktivitások', + 'Home Page Dashboard' => 'Műszerfal Kezdőlap', + 'Tag Cloud' => 'Címke felhő', + 'MSG_NO_FILTERS' => 'Nincsenek elérhető szűrők', + 'MSG_NO_FIELDS' => 'Nincsenek elérhető mezők', + 'LBL_REPORTCHARTS' => 'Jelentés Grafikonok', + 'LBL_HOME_REPORT_NAME' => 'Jelentés neve', + 'LBL_HOME_REPORT_TYPE' => 'Jelentés típusa', + 'LBL_DEFAULT_WIDGET' => 'Alapértelmezett dobozok', + 'LBL_NO_WIDGETS_HIDDEN' => 'Nincsen alapértelmezett doboz elrejtve' +); +?> \ No newline at end of file diff --git a/modules/Home/language/nl_nl.lang.php b/modules/Home/language/nl_nl.lang.php new file mode 100644 index 0000000..46e6b4b --- /dev/null +++ b/modules/Home/language/nl_nl.lang.php @@ -0,0 +1,142 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.4 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Home/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_NEW_FORM_TITLE'=>'Nieuw contact', +'LBL_FIRST_NAME'=>'Voornaam:', +'LBL_LAST_NAME'=>'Achternaam:', +'LBL_LIST_LAST_NAME'=>'Achternaam', +'LBL_ACCOUNT_NAME'=>'Accountnaam:', +'LBL_LIST_ACCOUNT_NAME'=>'Accountnaam', +'LBL_PHONE'=>'Telefoon:', +'LBL_EMAIL_ADDRESS'=>'E-mail:', +'LBL_TOTAL'=>'Totaal : ', + +'LBL_MY_HOME'=>'Mijn Home', +'LBL_MODIFIED_TIME'=>'Gewijzigd', +'LBL_LOGIN_ID'=>'ID', +'LBL_MODIFIED_BY'=>'Gewijzigd door', +'LBL_TYPE'=>'Type', + +'LBL_PIPELINE_FORM_TITLE'=>'Mijn Pijplijn', + +'ERR_ONE_CHAR'=>'Geef ten minste een letter of nummer voor uw zoek opdracht...', + +'LBL_OPEN_TASKS'=>'Mijn Open Taken', + +'LBL_LEADS_BY_SOURCE'=>'Leads per bron', +'LBL_LEADS_BY_STATUS'=>'Leads per status', + +'LBL_UPCOMING_EVENTS'=>'Nieuwe Afspraken', +'LBL_PENDING_EVENTS'=>'Afwachtende Afspraken', +'LBL_SINGLE_PENDING_EVENT'=>'Laatste 10 dagen', +'LBL_MULTIPLE_PENDING_EVENTS'=>'Laatste 10 dagen', + +'recordsforuser'=>'Bestand voor gebruiker', + +'Today'=>'Vandaag', +'This Week'=>'Deze week', +'This Month'=>'Deze maand', +'This Year'=>'Dit jaar', +'Last Week'=>'Afgelopen Week', +'Last 2 Days'=>'Afgelopen 2 Dagen', +'Last Ten Days'=>'Afgelopen 10 Dagen', + +// Added/Updated for vtiger CRM 5.0.4 +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chatkanaal', +'User List'=>'Gebruikerslijst', + +// Added after 5.0.4 GA + +//ADDED for Home Page Customization +'LBL_HOME_MODULE' => 'Module', +'LBL_HOME_RSS' => 'RSS', +'LBL_HOME_DASHBOARD' => 'Dashboard', +'LBL_HOME_STUFFTITLE'=>'Venster titel', +'LBL_HOME_SHOW'=>'Toon', +'LBL_HOME_FILTERBY'=>'Filter op', +'LBL_HOME_Fields'=>'Weer te geven velden
(selecteer er twee)', +'LBL_HOME_PRESSCTRL'=>'(Klik "Ctrl"
voor meerdere selecties)', +'LBL_HOME_RSSURL'=>'RSS URL', +'LBL_HOME_DASHBOARD_NAME'=>'DashBoard Naam', +'LBL_HOME_DASHBOARD_TYPE'=>'DashBoard Type', +'LBL_HOME_HORIZONTAL_BARCHART'=>'Horizontale Staafdiagram', +'LBL_HOME_VERTICAL_BARCHART'=>'Verticale Staafdiagram', +'LBL_HOME_PIE_CHART'=>'Taart Diagram', +'LBL_HOME_ITEMS'=>'item(s)', +'LBL_MORE'=>'Meer', +'LBL_SCROLL'=>'Blader', + +// vtiger CRM News +'LBL_NEWS_NO'=>'Geen nieuws', + +//added for home page changes +'LBL_NOTEBOOK'=>'Aantekeningen', +'LBL_NOTEBOOK_TITLE'=>'Dubbel-klik om te wijzigen.', +'LBL_NOTEBOOK_SAVE_TITLE'=>'Klik ergens op het scherm om te bewaren.', + +'LBL_URL'=>'Website', +'LBL_HOME_LAYOUT'=>'Wijzig layout', +'LBL_NUMBER_OF_COLUMNS'=>'Aantal kolommen', +'LBL_TWO_COLUMN'=>'Twee kolommen', +'LBL_THREE_COLUMN'=>'Drie kolommen', +'LBL_FOUR_COLUMN'=>'Vier kolommen', +// END + +// Default home page widget's title +'Top Accounts'=>'Top Accounts', +'Top Potentials'=>'Top Verkoopkansen', +'Top Quotes'=>'Top Offertes', +'Top Trouble Tickets'=>'Top Help/tickets', +'Top Invoices'=>'Top Facturen', +'Top Sales Orders'=>'Top Verkooporders', +'Top Purchase Orders'=>'Top Inkooporders', +'My New Leads'=>'Mijn nieuwe Leads', +'Key Metrics'=>'Kerngetallen', +'My Group Allocation'=>'Mijn Groepstoewijzing', +'My Recent FAQs'=>'Mijn recente FAQs', +'Upcoming Activities'=>'Aankomende activiteiten', +'Pending Activities'=>'Geparkeerde activiteiten', +'Home Page Dashboard'=>'Home Page Dashboard', +'Tag Cloud'=>'Tag Cloud', + +'MSG_NO_FILTERS' => 'Geen filters beschikbaar', +'MSG_NO_FIELDS' => 'Geen Velden Beschikbaar', + +//added for Default Widgets +'LBL_DEFAULT_WIDGET'=>'Standaard Widgets', +'LBL_NO_WIDGETS_HIDDEN'=>'Er zijn Geen standaard widgets verborgen', + +); + +?> diff --git a/modules/Home/language/nl_nl.lang.php.bak b/modules/Home/language/nl_nl.lang.php.bak new file mode 100644 index 0000000..0433f91 --- /dev/null +++ b/modules/Home/language/nl_nl.lang.php.bak @@ -0,0 +1,142 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.4 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Home/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_NEW_FORM_TITLE'=>'Nieuw contact', +'LBL_FIRST_NAME'=>'Voornaam:', +'LBL_LAST_NAME'=>'Achternaam:', +'LBL_LIST_LAST_NAME'=>'Achternaam', +'LBL_ACCOUNT_NAME'=>'Accountnaam:', +'LBL_LIST_ACCOUNT_NAME'=>'Accountnaam', +'LBL_PHONE'=>'Telefoon:', +'LBL_EMAIL_ADDRESS'=>'E-mail:', +'LBL_TOTAL'=>'Totaal : ', + +'LBL_MY_HOME'=>'Mijn Home', +'LBL_MODIFIED_TIME'=>'Gewijzigd', +'LBL_LOGIN_ID'=>'ID', +'LBL_MODIFIED_BY'=>'Gewijzigd door', +'LBL_TYPE'=>'Type', + +'LBL_PIPELINE_FORM_TITLE'=>'Mijn Pijplijn', + +'ERR_ONE_CHAR'=>'Geef ten minste een letter of nummer voor uw zoek opdracht...', + +'LBL_OPEN_TASKS'=>'Mijn Open Taken', + +'LBL_LEADS_BY_SOURCE'=>'Leads per bron', +'LBL_LEADS_BY_STATUS'=>'Leads per status', + +'LBL_UPCOMING_EVENTS'=>'Nieuwe Afspraken', +'LBL_PENDING_EVENTS'=>'Afwachtende Afspraken', +'LBL_SINGLE_PENDING_EVENT'=>'Laatste 10 dagen', +'LBL_MULTIPLE_PENDING_EVENTS'=>'Laatste 10 dagen', + +'recordsforuser'=>'Bestand voor gebruiker', + +'Today'=>'Vandaag', +'This Week'=>'Deze week', +'This Month'=>'Deze maand', +'This Year'=>'Dit jaar', +'Last Week'=>'Afgelopen Week', +'Last 2 Days'=>'Afgelopen 2 Dagen', +'Last Ten Days'=>'Afgelopen 10 Dagen', + +// Added/Updated for vtiger CRM 5.0.4 +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Chatkanaal', +'User List'=>'Gebruikerslijst', + +// Added after 5.0.4 GA + +//ADDED for Home Page Customization +'LBL_HOME_MODULE' => 'Module', +'LBL_HOME_RSS' => 'RSS', +'LBL_HOME_DASHBOARD' => 'Dashboard', +'LBL_HOME_STUFFTITLE'=>'Venster titel', +'LBL_HOME_SHOW'=>'Toon', +'LBL_HOME_FILTERBY'=>'Filter op', +'LBL_HOME_Fields'=>'Weer te geven velden
(selecteer er twee)', +'LBL_HOME_PRESSCTRL'=>'(Klik "Ctrl"
voor meerdere selecties)', +'LBL_HOME_RSSURL'=>'RSS URL', +'LBL_HOME_DASHBOARD_NAME'=>'DashBoard Naam', +'LBL_HOME_DASHBOARD_TYPE'=>'DashBoard Type', +'LBL_HOME_HORIZONTAL_BARCHART'=>'Horizontale Staafdiagram', +'LBL_HOME_VERTICAL_BARCHART'=>'Verticale Staafdiagram', +'LBL_HOME_PIE_CHART'=>'Taart Diagram', +'LBL_HOME_ITEMS'=>'item(s)', +'LBL_MORE'=>'Meer', +'LBL_SCROLL'=>'Blader', + +// vtiger CRM News +'LBL_NEWS_NO'=>'Geen nieuws', + +//added for home page changes +'LBL_NOTEBOOK'=>'Aantekeningen', +'LBL_NOTEBOOK_TITLE'=>'Dubbel-klik om te wijzigen.', +'LBL_NOTEBOOK_SAVE_TITLE'=>'Klik ergens op het scherm om te bewaren.', + +'LBL_URL'=>'Website', +'LBL_HOME_LAYOUT'=>'Wijzig layout', +'LBL_NUMBER_OF_COLUMNS'=>'Aantal kolommen', +'LBL_TWO_COLUMN'=>'Twee kolommen', +'LBL_THREE_COLUMN'=>'Drie kolommen', +'LBL_FOUR_COLUMN'=>'Vier kolommen', +// END + +// Default home page widget's title +'Top Accounts'=>'Top Accounts', +'Top Potentials'=>'Top Verkoopkansen', +'Top Quotes'=>'Top Offertes', +'Top Trouble Tickets'=>'Top Help/tickets', +'Top Invoices'=>'Top Facturen', +'Top Sales Orders'=>'Top Verkooporders', +'Top Purchase Orders'=>'Top Inkooporders', +'My New Leads'=>'Mijn nieuwe Leads', +'Key Metrics'=>'Kerngetallen', +'My Group Allocation'=>'Mijn Groepstoewijzing', +'My Recent FAQs'=>'Mijn recente FAQ\'s', +'Upcoming Activities'=>'Aankomende activiteiten', +'Pending Activities'=>'Geparkeerde activiteiten', +'Home Page Dashboard'=>'Home Page Dashboard', +'Tag Cloud'=>'Tag Cloud', + +'MSG_NO_FILTERS' => 'Geen filters beschikbaar', +'MSG_NO_FIELDS' => 'Geen Velden Beschikbaar', + +//added for Default Widgets +'LBL_DEFAULT_WIDGET'=>'Standaard Widgets', +'LBL_NO_WIDGETS_HIDDEN'=>'Er zijn Geen standaard widgets verborgen', + +); + +?> diff --git a/modules/Home/language/pt_br.lang.php b/modules/Home/language/pt_br.lang.php new file mode 100644 index 0000000..f37e15e --- /dev/null +++ b/modules/Home/language/pt_br.lang.php @@ -0,0 +1,133 @@ +'Novo Contato', +'LBL_FIRST_NAME'=>'Nome:', +'LBL_LAST_NAME'=>'Sobrenome:', +'LBL_LIST_LAST_NAME'=>'Sobrenome', +'LBL_ACCOUNT_NAME'=>'Nome da Organização:', +'LBL_LIST_ACCOUNT_NAME'=>'Nome da Organização', +'LBL_PHONE'=>'Telefone:', +'LBL_EMAIL_ADDRESS'=>'Email:', +'LBL_TOTAL'=>'Total : ', + +'LBL_MY_HOME'=>'Minha Homepage', +'LBL_MODIFIED_TIME'=>'Data Modificação', +'LBL_LOGIN_ID'=>'ID', +'LBL_MODIFIED_BY'=>'Modificado por', +'LBL_TYPE'=>'Tipo', + +'LBL_PIPELINE_FORM_TITLE'=>'Meu Funil Vendas', + +'ERR_ONE_CHAR'=>'Por favor, entre com pelo menos uma letra ou número para sua pesquisa ...', + +'LBL_OPEN_TASKS'=>'Tarefas Abertas', + +'LBL_LEADS_BY_SOURCE'=>'Leads por Origem', +'LBL_LEADS_BY_STATUS'=>'Leads por Status', + +'LBL_UPCOMING_EVENTS'=>'Eventos Programados', +'LBL_PENDING_EVENTS'=>'Eventos Pendentes', +'LBL_SINGLE_PENDING_EVENT'=>'Evento para Últimos Dez Dias', +'LBL_MULTIPLE_PENDING_EVENTS'=>'Eventos nos Últimos Dez Dias', + +'recordsforuser'=>'Registros para', + +'Today'=>'Hoje', +'This Week'=>'Esta Semana', +'This Month'=>'Este Mês', +'This Year'=>'Este Ano', +'Last Week'=>'Última Semana', +'Last 2 Days'=>'Últimos 2 Dias', +'Last Ten Days'=>'Últimos Dez Dias', + +// Added/Updated for vtiger CRM 5.0.4 +'TITLE_AJAX_CSS_POPUP_CHAT'=>'Janela-Css de Bate-Papo Ajax', +'User List'=>'Lista Usuários', + +// Added after 5.0.4 GA + +//ADDED for Home Page Customization +'LBL_HOME_MODULE' => 'Modulo', +'LBL_HOME_RSS' => 'RSS', +'LBL_HOME_DASHBOARD' => 'Painel', +'LBL_HOME_STUFFTITLE'=>'Título Janela', +'LBL_HOME_SHOW'=>'Mostrar', +'LBL_HOME_FILTERBY'=>'Filtrar por', +'LBL_HOME_Fields'=>'Campos para Mostrar
(no máximo dois)', +'LBL_HOME_PRESSCTRL'=>'(Aperte a tecla "Ctrl"
para seleção múltipla)', +'LBL_HOME_RSSURL'=>'URL RSS', +'LBL_HOME_DASHBOARD_NAME'=>'Nome Painel', +'LBL_HOME_DASHBOARD_TYPE'=>'Tipo Painel', +'LBL_HOME_HORIZONTAL_BARCHART'=>'Gráfico Barras Horizontal', +'LBL_HOME_VERTICAL_BARCHART'=>'Gráfico Barras Vertical', +'LBL_HOME_PIE_CHART'=>'Gráfica Pizza', +'LBL_HOME_ITEMS'=>'item(s)', +'LBL_MORE'=>'Mais', +'LBL_SCROLL'=>'Rolar', + +// vtiger CRM News +'LBL_NEWS_NO'=>'Nenhuma Novidade', + +//added for home page changes +'LBL_NOTEBOOK'=>'Bloco Notas', +'LBL_NOTEBOOK_TITLE'=>'Duplo clique para editar.', +'LBL_NOTEBOOK_SAVE_TITLE'=>'Clique em qualquer lugar sobre a página para salvar.', + +'LBL_URL'=>'Website', +'LBL_HOME_LAYOUT'=>'Mudar layout', +'LBL_NUMBER_OF_COLUMNS'=>'Número de Colunas', +'LBL_TWO_COLUMN'=>'Duas Colunas', +'LBL_THREE_COLUMN'=>'Três Colunas', +'LBL_FOUR_COLUMN'=>'Quatro Colunas', +// END + +// Default home page widget's title +'Top Accounts'=>'Principais Organizações', +'Top Potentials'=>'Principais Oportunidades', +'Top Quotes'=>'Principais Cotações', +'Top Trouble Tickets'=>'Principais Tickets', +'Top Invoices'=>'Principais Faturas', +'Top Sales Orders'=>'Principais Pedidos Vendas', +'Top Purchase Orders'=>'Principais Pedidos Compras', +'My New Leads'=>'Meus Novos Leads', +'Key Metrics'=>'Métricas Chave', +'My Group Allocation'=>'Meus Grupos', +'My Recent FAQs'=>'Minhas FAQs Recentes', +'Upcoming Activities'=>'Próximas Atividades', +'Pending Activities'=>'Atividades Pendentes', +'Home Page Dashboard'=>'Página Painel', +'Tag Cloud'=>'Tag Cloud', + +'MSG_NO_FILTERS' => 'Nenhum Filtro Disponível', +'MSG_NO_FIELDS' => 'Nenhum Campo Disponível', + +//Customization Phase 6 -- Monolithic +'LBL_REPORTCHARTS' => 'Gráficos Relatórios', +'LBL_HOME_REPORT_NAME'=> 'Nome Relatório', +'LBL_HOME_REPORT_TYPE' => 'Tipo Relatório', +//END + +//added for Default Widgets +'LBL_DEFAULT_WIDGET'=>'Widgets Padrão', +'LBL_NO_WIDGETS_HIDDEN'=>'Nenhum widgets padrão oculto', +); + +?> diff --git a/modules/Home/language/zh_cn.lang.php b/modules/Home/language/zh_cn.lang.php new file mode 100644 index 0000000..0761452 --- /dev/null +++ b/modules/Home/language/zh_cn.lang.php @@ -0,0 +1,137 @@ + '新增联系人', + 'LBL_FIRST_NAME' => '英文名:', + 'LBL_LAST_NAME' => '姓名:', + 'LBL_LIST_LAST_NAME' => '姓名:', + 'LBL_ACCOUNT_NAME' => '客户名称:', + 'LBL_LIST_ACCOUNT_NAME' => '客户名称', + 'LBL_PHONE' => '电话:', + 'LBL_EMAIL_ADDRESS' => 'Email:', + 'LBL_TOTAL' => '合计:', + + 'LBL_MY_HOME' => '我的首页', + 'LBL_MODIFIED_TIME' => '修改时间', + 'LBL_LOGIN_ID' => 'ID', + 'LBL_MODIFIED_BY' => '修改者', + 'LBL_TYPE' => '类型', + + 'LBL_PIPELINE_FORM_TITLE' => '我的销售数据', + + 'ERR_ONE_CHAR' => '请至少输入1个字符以上的数据再查找 ...', + +'LBL_OPEN_TASKS'=>'我的进行中任务', + + 'LBL_LEADS_BY_SOURCE' => '潜在客户来源', + 'LBL_LEADS_BY_STATUS' => '潜在客户状态', + + 'LBL_UPCOMING_EVENTS' => '待办事件', + 'LBL_PENDING_EVENTS' => '暂停事件', + 'LBL_SINGLE_PENDING_EVENT' => '最近10天的事件', + 'LBL_MULTIPLE_PENDING_EVENTS' => '最近10天的事件', + + 'recordsforuser' => '记录', + + 'Today' => '今天', + 'This Week' => '这个星期', + 'This Month' => '这个月', + 'This Year' => '今年', + 'Last Week' => '上星期', + 'Last 2 Days' => '过去两天', + 'Last Ten Days' => '过去10天', + +// Added/Updated for vtiger CRM 5.0.4 +'TITLE_AJAX_CSS_POPUP_CHAT'=>'员工聊天室', +'User List'=>'用户列表', + +// Added after 5.0.4 GA + +//ADDED for Home Page Customization +'LBL_HOME_MODULE' => '模块', +'LBL_HOME_RSS' => 'RSS新闻', +'LBL_HOME_DASHBOARD' => '图表', +'LBL_HOME_STUFFTITLE'=>'窗口标题', +'LBL_HOME_SHOW'=>'显示', +'LBL_HOME_FILTERBY'=>'过滤', +'LBL_HOME_Fields'=>'要显示的字段
(选择任意两个)', +'LBL_HOME_PRESSCTRL'=>'(如需多个选择请按“ Ctrl ” 键)', +'LBL_HOME_RSSURL'=>'RSS URL', +'LBL_HOME_DASHBOARD_NAME'=>'图表名称', +'LBL_HOME_DASHBOARD_TYPE'=>'图表类型', +'LBL_HOME_HORIZONTAL_BARCHART'=>'横向柱状图', +'LBL_HOME_VERTICAL_BARCHART'=>'垂直柱状图', +'LBL_HOME_PIE_CHART'=>'饼图', +'LBL_HOME_ITEMS'=>'项目', +'LBL_MORE'=>'更多', +'LBL_SCROLL'=>'滚动', + +// vtiger CRM News +'LBL_NEWS_NO'=>'没有新闻', + +//added for home page changes +'LBL_NOTEBOOK'=>'记事本', +'LBL_NOTEBOOK_TITLE'=>'双击进入编辑状态.', +'LBL_NOTEBOOK_SAVE_TITLE'=>'点击页面其他部分进行保存.', + +'LBL_URL'=>'网站', +'LBL_HOME_LAYOUT'=>'变更版面', +'LBL_NUMBER_OF_COLUMNS'=>'列数', +'LBL_TWO_COLUMN'=>'两列', +'LBL_THREE_COLUMN'=>'三列', +'LBL_FOUR_COLUMN'=>'四列', +// END + +// Default home page widget's title +'Top Accounts'=>'最新客户', +'Top Potentials'=>'最新销售机会', +'Top Quotes'=>'最新报价单', +'Top Trouble Tickets'=>'最新故障单', +'Top Invoices'=>'最新发货单', +'Top Sales Orders'=>'最新销售订单', +'Top Purchase Orders'=>'最新采购订单', +'My New Leads'=>'最新潜在客户', +'Key Metrics'=>'关键指标', +'My Group Allocation'=>'最新部门任务', +'My Recent FAQs'=>'最新常见问答', +'Upcoming Activities'=>'近期活动', +'Pending Activities'=>'即将进行的活动', +'Home Page Dashboard'=>'最新销售情况', +'Tag Cloud'=>'常用标签', + +'MSG_NO_FILTERS' => '无可用过滤器', +'MSG_NO_FIELDS' => '无可用字段', + +//Customization Phase 6 -- Monolithic +'LBL_REPORTCHARTS' => '报表', +'LBL_HOME_REPORT_NAME'=> '报表名称', +'LBL_HOME_REPORT_TYPE' => '报表类型', +//END + +//added for Default Widgets +'LBL_DEFAULT_WIDGET'=>'默认组件', +'LBL_NO_WIDGETS_HIDDEN'=>'没有隐藏的默认组件', +); + +?> diff --git a/modules/Home/vtchat.php b/modules/Home/vtchat.php new file mode 100644 index 0000000..21eb3fa --- /dev/null +++ b/modules/Home/vtchat.php @@ -0,0 +1,124 @@ + + + + + + + + + + +<?php echo $mod_strings['TITLE_AJAX_CSS_POPUP_CHAT'];?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
 
+
+ +
+
 
 
+
+
+
+ + + +
+ + + diff --git a/modules/Import/Import.php b/modules/Import/Import.php new file mode 100644 index 0000000..a644b75 --- /dev/null +++ b/modules/Import/Import.php @@ -0,0 +1,30 @@ + diff --git a/modules/Import/ImportAjax.php b/modules/Import/ImportAjax.php new file mode 100644 index 0000000..a27c544 --- /dev/null +++ b/modules/Import/ImportAjax.php @@ -0,0 +1,12 @@ + diff --git a/modules/Import/api/Request.php b/modules/Import/api/Request.php new file mode 100644 index 0000000..237d6a0 --- /dev/null +++ b/modules/Import/api/Request.php @@ -0,0 +1,46 @@ +valuemap[$key])) { + $value = $this->valuemap[$key]; + if(Zend_Json::decode($value) != null) { + $value = Zend_Json::decode($value); + } + + if(is_array($value)) { + $purifiedValue = array(); + foreach($value as $key => $val) { + $purifiedValue[$key] = vtlib_purify($val); + } + } else { + $purifiedValue = vtlib_purify($value); + } + return $purifiedValue; + } + return ''; + } + + function getString($key) { + if(isset($this->valuemap[$key])) { + $value = $this->valuemap[$key]; + if(Zend_Json::decode($value) != null) { + return $this->valuemap[$key]; + } else { + return vtlib_purify($this->valuemap[$key]); + } + } + return ''; + } +} \ No newline at end of file diff --git a/modules/Import/api/UserInput.php b/modules/Import/api/UserInput.php new file mode 100644 index 0000000..e158142 --- /dev/null +++ b/modules/Import/api/UserInput.php @@ -0,0 +1,32 @@ +valuemap = $values; + } + + function get($key) { + if(isset($this->valuemap[$key])) { + return $this->valuemap[$key]; + } + return ''; + } + + function has($key) { + return isset($this->valuemap[$key]); + } + + function set($key, $newvalue) { + $this->valuemap[$key]= $newvalue; + } +} \ No newline at end of file diff --git a/modules/Import/config.inc b/modules/Import/config.inc new file mode 100644 index 0000000..5994a0f --- /dev/null +++ b/modules/Import/config.inc @@ -0,0 +1,26 @@ + array( + 'csv' => array('reader' => 'Import_CSV_Reader', 'classpath' => 'modules/Import/readers/CSVReader.php'), + 'vcf' => array('reader' => 'Import_VCard_Reader', 'classpath' => 'modules/Import/readers/VCardReader.php'), + 'default' => array('reader' => 'Import_File_Reader', 'classpath' => 'modules/Import/readers/FileReader.php') + ), + + 'userImportTablePrefix' => 'vtiger_import_', + // Individual batch limit - Specified number of records will be imported at one shot and the cycle will repeat till all records are imported + 'importBatchLimit' => '250', + // Threshold record limit for immediate import. If record count is more than this, then the import is scheduled through cron job + 'immediateImportLimit' => '1000', +); + + +?> diff --git a/modules/Import/controllers/Import_Controller.php b/modules/Import/controllers/Import_Controller.php new file mode 100644 index 0000000..b48f222 --- /dev/null +++ b/modules/Import/controllers/Import_Controller.php @@ -0,0 +1,182 @@ +userInputObject = $userInputObject; + $this->user = $user; + } + + public static function import($userInputObject, $user) { + $importController = new Import_Controller($userInputObject, $user); + + $importController->saveMap(); + $fileReadStatus = $importController->copyFromFileToDB(); + if($fileReadStatus) { + $importController->queueDataImport(); + } + + $isImportScheduled = $importController->userInputObject->get('is_scheduled'); + + if($isImportScheduled) { + $importInfo = Import_Queue_Controller::getUserCurrentImportInfo($importController->user); + self::showScheduledStatus($importInfo); + + } else { + $importController->triggerImport(); + } + } + + public function triggerImport($batchImport=false) { + $importInfo = Import_Queue_Controller::getImportInfo($this->userInputObject->get('module'), $this->user); + $importDataController = new Import_Data_Controller($importInfo, $this->user); + + if(!$batchImport) { + if(!$importDataController->initializeImport()) { + Import_Utils::showErrorPage(getTranslatedString('ERR_FAILED_TO_LOCK_MODULE', 'Import')); + exit; + } + } + + $importDataController->importData(); + Import_Queue_Controller::updateStatus($importInfo['id'], Import_Queue_Controller::$IMPORT_STATUS_HALTED); + $importInfo = Import_Queue_Controller::getImportInfo($this->userInputObject->get('module'), $this->user); + + self::showImportStatus($importInfo, $this->user); + } + + public static function showImportStatus($importInfo, $user) { + if($importInfo == null) { + Import_Utils::showErrorPage(getTranslatedString('ERR_IMPORT_INTERRUPTED', 'Import')); + exit; + } + $importDataController = new Import_Data_Controller($importInfo, $user); + if($importInfo['status'] == Import_Queue_Controller::$IMPORT_STATUS_HALTED || + $importInfo['status'] == Import_Queue_Controller::$IMPORT_STATUS_NONE) { + $continueImport = true; + } else { + $continueImport = false; + } + + $importStatusCount = $importDataController->getImportStatusCount(); + $totalRecords = $importStatusCount['TOTAL']; + if($totalRecords > ($importStatusCount['IMPORTED'] + $importStatusCount['FAILED'])) { +// if($importInfo['status'] == Import_Queue_Controller::$IMPORT_STATUS_SCHEDULED) { +// self::showScheduledStatus($importInfo); +// exit; +// } + self::showCurrentStatus($importInfo, $importStatusCount, $continueImport); + exit; + } else { + $importDataController->finishImport(); + self::showResult($importInfo, $importStatusCount); + } + } + + public static function showCurrentStatus($importInfo, $importStatusCount, $continueImport) { + $moduleName = $importInfo['module']; + $importId = $importInfo['id']; + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('IMPORT_ID', $importId); + $viewer->assign('IMPORT_RESULT', $importStatusCount); + $viewer->assign('CONTINUE_IMPORT', $continueImport); + $viewer->display('ImportStatus.tpl'); + } + + public static function showResult($importInfo, $importStatusCount) { + $moduleName = $importInfo['module']; + $ownerId = $importInfo['user_id']; + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('OWNER_ID', $ownerId); + $viewer->assign('IMPORT_RESULT', $importStatusCount); + $viewer->assign('MERGE_ENABLED', $importInfo['merge_type']); + $viewer->display('ImportResult.tpl'); + } + + public static function showScheduledStatus($importInfo) { + $moduleName = $importInfo['module']; + $importId = $importInfo['id']; + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('IMPORT_ID', $importId); + $viewer->display('ImportSchedule.tpl'); + } + + public function saveMap() { + $saveMap = $this->userInputObject->get('save_map'); + $mapName = $this->userInputObject->get('save_map_as'); + if($saveMap && !empty($mapName)) { + $fieldMapping = $this->userInputObject->get('field_mapping'); + $fileReader = Import_Utils::getFileReader($this->userInputObject, $this->user); + if($fileReader == null) { + return false; + } + $hasHeader = $fileReader->hasHeader(); + if($hasHeader) { + $firstRowData = $fileReader->getFirstRowData($hasHeader); + $headers = array_keys($firstRowData); + foreach($fieldMapping as $fieldName => $index) { + $saveMapping["$headers[$index]"] = $fieldName; + } + } else { + $saveMapping = array_flip($fieldMapping); + } + + $map = array(); + $map['name'] = $mapName; + $map['content'] = $saveMapping; + $map['module'] = $this->userInputObject->get('module'); + $map['has_header'] = ($hasHeader)?1:0; + $map['assigned_user_id'] = $this->user->id; + + $importMap = new Import_Map($map, $this->user); + $importMap->save(); + } + } + + public function copyFromFileToDB() { + $fileReader = Import_Utils::getFileReader($this->userInputObject, $this->user); + $fileReader->read(); + $fileReader->deleteFile(); + if($fileReader->getStatus() == 'success') { + $this->numberOfRecords = $fileReader->getNumberOfRecordsRead(); + return true; + } else { + Import_Utils::showErrorPage(getTranslatedString('ERR_FILE_READ_FAILED', 'Import').' - '. + getTranslatedString($fileReader->getErrorMessage(), 'Import')); + return false; + } + } + + public function queueDataImport() { + + $configReader = new ConfigReader('modules/Import/config.inc', 'ImportConfig'); + $immediateImportRecordLimit = $configReader->getConfig('immediateImportLimit'); + $numberOfRecordsToImport = $this->numberOfRecords; + if($numberOfRecordsToImport > $immediateImportRecordLimit) { + $this->userInputObject->set('is_scheduled', true); + } + Import_Queue_Controller::add($this->userInputObject, $this->user); + } +} + +?> \ No newline at end of file diff --git a/modules/Import/controllers/Import_Data_Controller.php b/modules/Import/controllers/Import_Data_Controller.php new file mode 100644 index 0000000..9a795c9 --- /dev/null +++ b/modules/Import/controllers/Import_Data_Controller.php @@ -0,0 +1,557 @@ +id = $importInfo['id']; + $this->module = $importInfo['module']; + $this->fieldMapping = $importInfo['field_mapping']; + $this->mergeType = $importInfo['merge_type']; + $this->mergeFields = $importInfo['merge_fields']; + $this->defaultValues = $importInfo['default_values']; + $this->user = $user; + } + + public function getDefaultFieldValues($moduleMeta) { + static $cachedDefaultValues = array(); + + if (isset($cachedDefaultValues[$this->module])) { + return $cachedDefaultValues[$this->module]; + } + + $defaultValues = array(); + if (!empty($this->defaultValues)) { + if(!is_array($this->defaultValues)) { + $this->defaultValues = Zend_Json::decode($this->defaultValues); + } + if($this->defaultValues != null) { + $defaultValues = $this->defaultValues; + } + } + $moduleFields = $moduleMeta->getModuleFields(); + $moduleMandatoryFields = $moduleMeta->getMandatoryFields(); + foreach ($moduleMandatoryFields as $mandatoryFieldName) { + if (empty($defaultValues[$mandatoryFieldName])) { + $fieldInstance = $moduleFields[$mandatoryFieldName]; + if($fieldInstance->getFieldDataType() == 'owner') { + $defaultValues[$mandatoryFieldName] = $this->user->id; + } elseif($fieldInstance->getFieldDataType() != 'datetime' + && $fieldInstance->getFieldDataType() != 'date' + && $fieldInstance->getFieldDataType() != 'time') { + $defaultValues[$mandatoryFieldName] = '????'; + } + } + } + foreach ($moduleFields as $fieldName => $fieldInstance) { + $fieldDefaultValue = $fieldInstance->getDefault(); + if(empty ($defaultValues[$fieldName])) { + if($fieldInstance->getUIType() == '52') { + $defaultValues[$fieldName] = $this->user->id; + } elseif(!empty($fieldDefaultValue)) { + $defaultValues[$fieldName] = $fieldDefaultValue; + } + } + } + $cachedDefaultValues[$this->module] = $defaultValues; + return $defaultValues; + } + + public function import() { + if(!$this->initializeImport()) return false; + $this->importData(); + $this->finishImport(); + } + + public function importData() { + $this->createRecords(); + $this->updateModuleSequenceNumber(); + } + + public function initializeImport() { + $lockInfo = Import_Lock_Controller::isLockedForModule($this->module); + if ($lockInfo != null) { + if($lockInfo['userid'] != $this->user->id) { + Import_Utils::showImportLockedError($lockInfo); + return false; + } else { + return true; + } + } else { + Import_Lock_Controller::lock($this->id, $this->module, $this->user); + return true; + } + } + + public function finishImport() { + Import_Lock_Controller::unLock($this->user, $this->module); + Import_Queue_Controller::remove($this->id); + } + + public function updateModuleSequenceNumber() { + $moduleName = $this->module; + $focus = CRMEntity::getInstance($moduleName); + $focus->updateMissingSeqNumber($moduleName); + } + + public function updateImportStatus($entryId, $entityInfo) { + $adb = PearDatabase::getInstance(); + $recordId = null; + if (!empty($entityInfo['id'])) { + $entityIdComponents = vtws_getIdComponents($entityInfo['id']); + $recordId = $entityIdComponents[1]; + } + $adb->pquery('UPDATE ' . Import_Utils::getDbTableName($this->user) . ' SET status=?, recordid=? WHERE id=?', + array($entityInfo['status'], $recordId, $entryId)); + } + + public function createRecords() { + $adb = PearDatabase::getInstance(); + $moduleName = $this->module; + + $focus = CRMEntity::getInstance($moduleName); + $moduleHandler = vtws_getModuleHandlerFromName($moduleName, $this->user); + $moduleMeta = $moduleHandler->getMeta(); + $moduleObjectId = $moduleMeta->getEntityId(); + $moduleFields = $moduleMeta->getModuleFields(); + + $tableName = Import_Utils::getDbTableName($this->user); + $sql = 'SELECT * FROM ' . $tableName . ' WHERE status = '. Import_Data_Controller::$IMPORT_RECORD_NONE; + + if($this->batchImport) { + $configReader = new ConfigReader('modules/Import/config.inc', 'ImportConfig'); + $importBatchLimit = $configReader->getConfig('importBatchLimit'); + $sql .= ' LIMIT '. $importBatchLimit; + } + $result = $adb->query($sql); + $numberOfRecords = $adb->num_rows($result); + + if ($numberOfRecords <= 0) { + return; + } + + $fieldMapping = $this->fieldMapping; + $fieldColumnMapping = $moduleMeta->getFieldColumnMapping(); + + for ($i = 0; $i < $numberOfRecords; ++$i) { + $row = $adb->raw_query_result_rowdata($result, $i); + $rowId = $row['id']; + $entityInfo = null; + $fieldData = array(); + foreach ($fieldMapping as $fieldName => $index) { + $fieldData[$fieldName] = $row[$fieldName]; + } + + $mergeType = $this->mergeType; + $createRecord = false; + + if(method_exists($focus, 'importRecord')) { + $entityInfo = $focus->importRecord($this, $fieldData); + } else { + if (!empty($mergeType) && $mergeType != Import_Utils::$AUTO_MERGE_NONE) { + + $queryGenerator = new QueryGenerator($moduleName, $this->user); + $queryGenerator->initForDefaultCustomView(); + $fieldsList = array('id'); + $queryGenerator->setFields($fieldsList); + + $mergeFields = $this->mergeFields; + foreach ($mergeFields as $index => $mergeField) { + if ($index != 0) { + $queryGenerator->addConditionGlue(QueryGenerator::$AND); + } + $comparisonValue = $fieldData[$mergeField]; + $fieldInstance = $moduleFields[$mergeField]; + if ($fieldInstance->getFieldDataType() == 'owner') { + $userId = getUserId_Ol($comparisonValue); + $comparisonValue = getUserFullName($userId); + } + if ($fieldInstance->getFieldDataType() == 'reference') { + if(strpos($comparisonValue, '::::') > 0) { + $referenceFileValueComponents = explode('::::', $comparisonValue); + } else { + $referenceFileValueComponents = explode(':::', $comparisonValue); + } + if (count($referenceFileValueComponents) > 1) { + $comparisonValue = trim($referenceFileValueComponents[1]); + } + } + $queryGenerator->addCondition($mergeField, $comparisonValue, 'e'); + } + $query = $queryGenerator->getQuery(); + $duplicatesResult = $adb->query($query); + $noOfDuplicates = $adb->num_rows($duplicatesResult); + + if ($noOfDuplicates > 0) { + if ($mergeType == Import_Utils::$AUTO_MERGE_IGNORE) { + $entityInfo['status'] = self::$IMPORT_RECORD_SKIPPED; + } elseif ($mergeType == Import_Utils::$AUTO_MERGE_OVERWRITE || + $mergeType == Import_Utils::$AUTO_MERGE_MERGEFIELDS) { + + for ($index = 0; $index < $noOfDuplicates - 1; ++$index) { + $duplicateRecordId = $adb->query_result($duplicatesResult, $index, $fieldColumnMapping['id']); + $entityId = vtws_getId($moduleObjectId, $duplicateRecordId); + vtws_delete($entityId, $this->user); + } + $baseRecordId = $adb->query_result($duplicatesResult, $noOfDuplicates - 1, $fieldColumnMapping['id']); + $baseEntityId = vtws_getId($moduleObjectId, $baseRecordId); + + if ($mergeType == Import_Utils::$AUTO_MERGE_OVERWRITE) { + $fieldData = $this->transformForImport($fieldData, $moduleMeta); + $fieldData['id'] = $baseEntityId; + $entityInfo = vtws_update($fieldData, $this->user); + $entityInfo['status'] = self::$IMPORT_RECORD_UPDATED; + } + + if ($mergeType == Import_Utils::$AUTO_MERGE_MERGEFIELDS) { + $filteredFieldData = array(); + $defaultFieldValues = $this->getDefaultFieldValues($moduleMeta); + foreach ($fieldData as $fieldName => $fieldValue) { + if (!empty($fieldValue)) { + $filteredFieldData[$fieldName] = $fieldValue; + } + } + $existingFieldValues = vtws_retrieve($baseEntityId, $this->user); + foreach ($existingFieldValues as $fieldName => $fieldValue) { + if (empty($fieldValue) + && empty($filteredFieldData[$fieldName]) + && !empty($defaultFieldValues[$fieldName])) { + $filteredFieldData[$fieldName] = $fieldValue; + } + } + $filteredFieldData = $this->transformForImport($filteredFieldData, $moduleMeta, false); + $filteredFieldData['id'] = $baseEntityId; + $entityInfo = vtws_revise($filteredFieldData, $this->user); + $entityInfo['status'] = self::$IMPORT_RECORD_MERGED; + } + } else { + $createRecord = true; + } + } else { + $createRecord = true; + } + } else { + $createRecord = true; + } + if ($createRecord) { + $fieldData = $this->transformForImport($fieldData, $moduleMeta); + if($fieldData == null) { + $entityInfo = null; + } else { + $entityInfo = vtws_create($moduleName, $fieldData, $this->user); + $entityInfo['status'] = self::$IMPORT_RECORD_CREATED; + } + } + } + + if($entityInfo == null) { + $entityInfo = array('id' => null, 'status' => self::$IMPORT_RECORD_FAILED); + } + + $this->importedRecordInfo[$rowId] = $entityInfo; + $this->updateImportStatus($rowId, $entityInfo); + } + unset($result); + return true; + } + + public function transformForImport($fieldData, $moduleMeta, $fillDefault=true) { + $moduleFields = $moduleMeta->getModuleFields(); + $defaultFieldValues = $this->getDefaultFieldValues($moduleMeta); + foreach ($fieldData as $fieldName => $fieldValue) { + $fieldInstance = $moduleFields[$fieldName]; + if ($fieldInstance->getFieldDataType() == 'owner') { + $ownerId = getUserId_Ol($fieldValue); + if (empty($ownerId)) { + $ownerId = getGrpId($fieldValue); + } + if (empty($ownerId) && isset($defaultFieldValues[$fieldName])) { + $ownerId = $defaultFieldValues[$fieldName]; + } + if(empty($ownerId) || + !Import_Utils::hasAssignPrivilege($moduleMeta->getEntityName(), $ownerId)) { + $ownerId = $this->user->id; + } + $fieldData[$fieldName] = $ownerId; + + } elseif ($fieldInstance->getFieldDataType() == 'reference') { + $entityId = false; + if (!empty($fieldValue)) { + if(strpos($fieldValue, '::::') > 0) { + $fieldValueDetails = explode('::::', $fieldValue); + } else { + $fieldValueDetails = explode(':::', $fieldValue); + } + if (count($fieldValueDetails) > 1) { + $referenceModuleName = trim($fieldValueDetails[0]); + $entityLabel = trim($fieldValueDetails[1]); + $entityId = getEntityId($referenceModuleName, $entityLabel); + } else { + $referencedModules = $fieldInstance->getReferenceList(); + $entityLabel = $fieldValue; + foreach ($referencedModules as $referenceModule) { + $referenceModuleName = $referenceModule; + if ($referenceModule == 'Users') { + $referenceEntityId = getUserId_Ol($entityLabel); + if(empty($referenceEntityId) || + !Import_Utils::hasAssignPrivilege($moduleMeta->getEntityName(), $referenceEntityId)) { + $referenceEntityId = $this->user->id; + } + } else { + $referenceEntityId = getEntityId($referenceModule, $entityLabel); + } + if ($referenceEntityId != 0) { + $entityId = $referenceEntityId; + break; + } + } + } + if ((empty($entityId) || $entityId == 0) && !empty($referenceModuleName)) { + if(isPermitted($referenceModuleName, 'EditView') == 'yes') { + $wsEntityIdInfo = $this->createEntityRecord($referenceModuleName, $entityLabel); + $wsEntityId = $wsEntityIdInfo['id']; + $entityIdComponents = vtws_getIdComponents($wsEntityId); + $entityId = $entityIdComponents[1]; + } + } + $fieldData[$fieldName] = $entityId; + } else { + $referencedModules = $fieldInstance->getReferenceList(); + if ($referencedModules[0] == 'Users') { + if(isset($defaultFieldValues[$fieldName])) { + $fieldData[$fieldName] = $defaultFieldValues[$fieldName]; + } + if(empty($fieldData[$fieldName]) || + !Import_Utils::hasAssignPrivilege($moduleMeta->getEntityName(), $fieldData[$fieldName])) { + $fieldData[$fieldName] = $this->user->id; + } + } else { + $fieldData[$fieldName] = ''; + } + } + + } elseif ($fieldInstance->getFieldDataType() == 'picklist') { + global $default_charset; + if (empty($fieldValue) && isset($defaultFieldValues[$fieldName])) { + $fieldData[$fieldName] = $fieldValue = $defaultFieldValues[$fieldName]; + } + $allPicklistDetails = $fieldInstance->getPicklistDetails(); + $allPicklistValues = array(); + foreach ($allPicklistDetails as $picklistDetails) { + $allPicklistValues[] = $picklistDetails['value']; + } + $encodePicklistValue = htmlentities($fieldValue,ENT_QUOTES,$default_charset); + if (!in_array($encodePicklistValue, $allPicklistValues)) { + $moduleObject = Vtiger_Module::getInstance($moduleMeta->getEntityName()); + $fieldObject = Vtiger_Field::getInstance($fieldName, $moduleObject); + $fieldObject->setPicklistValues(array($fieldValue)); + } + } else { + if ($fieldInstance->getFieldDataType() == 'datetime' && !empty($fieldValue)) { + if($fieldValue == null || $fieldValue == '0000-00-00 00:00:00') { + $fieldValue = ''; + } + $valuesList = explode(' ', $fieldValue); + if(count($valuesList) == 1) $fieldValue = ''; + $fieldValue = getValidDBInsertDateTimeValue($fieldValue); + if (preg_match("/^[0-9]{2,4}[-][0-1]{1,2}?[0-9]{1,2}[-][0-3]{1,2}?[0-9]{1,2} ([0-1][0-9]|[2][0-3])([:][0-5][0-9]){1,2}$/", + $fieldValue) == 0) { + $fieldValue = ''; + } + $fieldData[$fieldName] = $fieldValue; + } + if ($fieldInstance->getFieldDataType() == 'date' && !empty($fieldValue)) { + if($fieldValue == null || $fieldValue == '0000-00-00') { + $fieldValue = ''; + } + $fieldValue = getValidDBInsertDateValue($fieldValue); + if (preg_match("/^[0-9]{2,4}[-][0-1]{1,2}?[0-9]{1,2}[-][0-3]{1,2}?[0-9]{1,2}$/", $fieldValue) == 0) { + $fieldValue = ''; + } + $fieldData[$fieldName] = $fieldValue; + } + if (empty($fieldValue) && isset($defaultFieldValues[$fieldName])) { + $fieldData[$fieldName] = $fieldValue = $defaultFieldValues[$fieldName]; + } + } + } + if($fillDefault) { + foreach($defaultFieldValues as $fieldName => $fieldValue) { + if (!isset($fieldData[$fieldName])) { + $fieldData[$fieldName] = $defaultFieldValues[$fieldName]; + } + } + } + + foreach ($moduleFields as $fieldName => $fieldInstance) { + if(empty($fieldData[$fieldName]) && $fieldInstance->isMandatory()) { + return null; + } + } + + return DataTransform::sanitizeData($fieldData, $moduleMeta); + } + + public function createEntityRecord($moduleName, $entityLabel) { + $moduleHandler = vtws_getModuleHandlerFromName($moduleName, $this->user); + $moduleMeta = $moduleHandler->getMeta(); + $moduleFields = $moduleMeta->getModuleFields(); + $mandatoryFields = $moduleMeta->getMandatoryFields(); + $entityNameFieldsString = $moduleMeta->getNameFields(); + $entityNameFields = explode(',', $entityNameFieldsString); + $fieldData = array(); + foreach ($entityNameFields as $entityNameField) { + $entityNameField = trim($entityNameField); + if (in_array($entityNameField, $mandatoryFields)) { + $fieldData[$entityNameField] = $entityLabel; + } + } + foreach ($mandatoryFields as $mandatoryField) { + if (empty($fieldData[$mandatoryField])) { + $fieldInstance = $moduleFields[$mandatoryField]; + if ($fieldInstance->getFieldDataType() == 'owner') { + $fieldData[$mandatoryField] = $this->user->id; + } else { + $fieldData[$mandatoryField] = '????'; + } + } + } + $fieldData = DataTransform::sanitizeData($fieldData, $moduleMeta); + $entityIdInfo = vtws_create($moduleName, $fieldData, $this->user); + $focus = CRMEntity::getInstance($moduleName); + $focus->updateMissingSeqNumber($moduleName); + return $entityIdInfo; + } + + public function getImportStatusCount() { + $adb = PearDatabase::getInstance(); + + $tableName = Import_Utils::getDbTableName($this->user); + $result = $adb->query('SELECT status FROM '.$tableName); + + $statusCount = array('TOTAL' => 0, 'IMPORTED' => 0, 'FAILED' => 0, 'PENDING' => 0, + 'CREATED' => 0, 'SKIPPED' => 0, 'UPDATED' => 0, 'MERGED' => 0); + + if($result) { + $noOfRows = $adb->num_rows($result); + $statusCount['TOTAL'] = $noOfRows; + for($i=0; $i<$noOfRows; ++$i) { + $status = $adb->query_result($result, $i, 'status'); + if(self::$IMPORT_RECORD_NONE == $status) { + $statusCount['PENDING']++; + + } elseif(self::$IMPORT_RECORD_FAILED == $status) { + $statusCount['FAILED']++; + + } else { + $statusCount['IMPORTED']++; + switch($status) { + case self::$IMPORT_RECORD_CREATED : $statusCount['CREATED']++; + break; + case self::$IMPORT_RECORD_SKIPPED : $statusCount['SKIPPED']++; + break; + case self::$IMPORT_RECORD_UPDATED : $statusCount['UPDATED']++; + break; + case self::$IMPORT_RECORD_MERGED : $statusCount['MERGED']++; + break; + } + } + + } + } + return $statusCount; + } + + public static function runScheduledImport() { + global $current_user; + $scheduledImports = self::getScheduledImport(); + $vtigerMailer = new Vtiger_Mailer(); + $vtigerMailer->IsHTML(true); + foreach ($scheduledImports as $scheduledId => $importDataController) { + $current_user = $importDataController->user; + $importDataController->batchImport = false; + + if(!$importDataController->initializeImport()) { continue; } + $importDataController->importData(); + + $importStatusCount = $importDataController->getImportStatusCount(); + + $emailSubject = 'vtiger CRM - Scheduled Import Report for '.$importDataController->module; + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $importDataController->module); + $viewer->assign('IMPORT_RESULT', $importStatusCount); + $importResult = $viewer->fetch('Import_Result_Details.tpl'); + $importResult = str_replace('align="center"', '', $importResult); + $emailData = 'vtiger CRM has just completed your import process.

' . + $importResult . '

'. + 'We recommend you to login to the CRM and check few records to confirm that the import has been successful.'; + + $userName = getFullNameFromArray('Users', $importDataController->user->column_fields); + $userEmail = $importDataController->user->email1; + $vtigerMailer->to = array( array($userEmail, $userName)); + $vtigerMailer->Subject = $emailSubject; + $vtigerMailer->Body = $emailData; + $vtigerMailer->Send(); + + $importDataController->finishImport(); + } + Vtiger_Mailer::dispatchQueue(null); + } + + public static function getScheduledImport() { + + $scheduledImports = array(); + $importQueue = Import_Queue_Controller::getAll(Import_Queue_Controller::$IMPORT_STATUS_SCHEDULED); + foreach($importQueue as $importId => $importInfo) { + $userId = $importInfo['user_id']; + $user = new Users(); + $user->id = $userId; + $user->retrieve_entity_info($userId, 'Users'); + + $scheduledImports[$importId] = new Import_Data_Controller($importInfo, $user); + } + return $scheduledImports; + } + +} + +?> diff --git a/modules/Import/controllers/Import_Index_Controller.php b/modules/Import/controllers/Import_Index_Controller.php new file mode 100644 index 0000000..dd9cbd3 --- /dev/null +++ b/modules/Import/controllers/Import_Index_Controller.php @@ -0,0 +1,353 @@ +getDisplayType()) === 2 || + in_array($fieldInstance->getPresence(), array(1,3)) || + strcasecmp($fieldInstance->getFieldDataType(),"autogenerated") ===0 || + strcasecmp($fieldInstance->getFieldDataType(),"id") ===0 || + $fieldInstance->isReadOnly() == true || + $fieldInstance->getUIType() == 70 || + $fieldInstance->getUIType() == 4) { + + return false; + } + return true; + } + + public function getAccessibleFields($moduleName) { + global $current_user; + + if(empty(self::$_cached_module_meta[$moduleName][$current_user->id])) { + $moduleHandler = vtws_getModuleHandlerFromName($moduleName, $current_user); + self::$_cached_module_meta[$moduleName][$current_user->id] = $moduleHandler->getMeta(); + } + $meta = self::$_cached_module_meta[$moduleName][$current_user->id]; + $moduleFields = $meta->getModuleFields(); + $accessibleFields = array(); + foreach($moduleFields as $fieldName => $fieldInstance) { + if($fieldInstance->getPresence() === 1) { + continue; + } + $accessibleFields[$fieldName] = $fieldInstance; + } + return $accessibleFields; + } + + public function getMergableFields($moduleName) { + $accessibleFields = $this->getAccessibleFields($moduleName); + $mergableFields = array(); + foreach($accessibleFields as $fieldName => $fieldInstance) { + if($fieldInstance->getPresence() === 1) { + continue; + } + // We need to avoid Last Modified by or any such User reference field + // for now as Query Generator is not handling it well enough. + // The case in which query generator is failing to generate right query is, + // Assigned User field is not there either in the selected fields list or in the conditions + // and condition is added on the User reference field + // TODO - Cleanup this once Query Generator support is corrected + if($fieldInstance->getFieldDataType() == 'reference') { + $referencedModules = $fieldInstance->getReferenceList(); + if($referencedModules[0] == 'Users') { + continue; + } + } + $mergableFields[$fieldName] = $fieldInstance; + } + return $mergableFields; + } + + public function getMandatoryFields($moduleName) { + $focus = CRMEntity::getInstance($moduleName); + if(method_exists($focus, 'getMandatoryImportableFields')) { + $mandatoryFields = $focus->getMandatoryImportableFields(); + } else { + $moduleFields = $this->getAccessibleFields($moduleName); + $mandatoryFields = array(); + foreach($moduleFields as $fieldName => $fieldInstance) { + if($fieldInstance->isMandatory() + && $fieldInstance->getFieldDataType() != 'owner' + && $this->isEditableField($fieldInstance)) { + $mandatoryFields[$fieldName] = getTranslatedString($fieldInstance->getFieldLabelKey(), $moduleName); + } + } + } + return $mandatoryFields; + } + + public function getImportableFields($moduleName) { + $focus = CRMEntity::getInstance($moduleName); + if(method_exists($focus, 'getImportableFields')) { + $importableFields = $focus->getImportableFields(); + } else { + $moduleFields = $this->getAccessibleFields($moduleName); + $importableFields = array(); + foreach($moduleFields as $fieldName => $fieldInstance) { + if(($this->isEditableField($fieldInstance) + && ($fieldInstance->getTableName() != 'vtiger_crmentity' || $fieldInstance->getColumnName() != 'modifiedby') + ) || ($fieldInstance->getUIType() == '70' && $fieldName != 'modifiedtime')) { + $importableFields[$fieldName] = $fieldInstance; + } + } + } + return $importableFields; + } + + public function getEntityFields($moduleName) { + $moduleFields = $this->getAccessibleFields($moduleName); + $entityColumnNames = vtws_getEntityNameFields($moduleName); + $entityNameFields = array(); + foreach($moduleFields as $fieldName => $fieldInstance) { + $fieldColumnName = $fieldInstance->getColumnName(); + if(in_array($fieldColumnName, $entityColumnNames)) { + $entityNameFields[$fieldName] = $fieldInstance; + } + } + return $entityNameFields; + } + + public static function loadBasicSettings($userInputObject, $user) { + $moduleName = $userInputObject->get('module'); + $indexController = new Import_Index_Controller(); + + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('SUPPORTED_FILE_TYPES', Import_Utils::getSupportedFileExtensions()); + $viewer->assign('SUPPORTED_FILE_ENCODING', Import_Utils::getSupportedFileEncoding()); + $viewer->assign('SUPPORTED_DELIMITERS', Import_Utils::getSupportedDelimiters()); + $viewer->assign('AUTO_MERGE_TYPES', Import_Utils::getAutoMergeTypes()); + $viewer->assign('AVAILABLE_FIELDS', $indexController->getMergableFields($moduleName)); + $viewer->assign('ENTITY_FIELDS', $indexController->getEntityFields($moduleName)); + $viewer->assign('ERROR_MESSAGE', $userInputObject->get('error_message')); + $viewer->display('ImportBasic.tpl'); + } + + public static function loadAdvancedSettings($userInputObject, $user) { + global $current_user; + + $moduleName = $userInputObject->get('module'); + $indexController = new Import_Index_Controller(); + + $fileReader = Import_Utils::getFileReader($userInputObject, $current_user); + if($fileReader == null) { + $userInputObject->set('error_message', getTranslatedString('LBL_INVALID_FILE', 'Import')); + Import_Index_Controller::loadBasicSettings($userInputObject, $user); + exit; + } + + $hasHeader = $fileReader->hasHeader(); + $rowData = $fileReader->getFirstRowData($hasHeader); + + $autoMerge = $userInputObject->get('auto_merge'); + if(!$autoMerge) { + $userInputObject->set('merge_type', 0); + $userInputObject->set('merge_fields', ''); + } + + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('AVAILABLE_FIELDS', $indexController->getImportableFields($moduleName)); + $viewer->assign('HAS_HEADER', $hasHeader); + $viewer->assign('ROW_1_DATA', $rowData); + $viewer->assign('USER_INPUT', $userInputObject); + $viewer->assign('ENCODED_MANDATORY_FIELDS', + Zend_Json::encode($indexController->getMandatoryFields($moduleName))); + $viewer->assign('SAVED_MAPS', Import_Map::getAllByModule($moduleName)); + $viewer->assign('USERS_LIST', Import_Utils::getAssignedToUserList($moduleName)); + $viewer->assign('GROUPS_LIST', Import_Utils::getAssignedToGroupList($moduleName)); + $viewer->display('ImportAdvanced.tpl'); + } + + public static function validateFileUpload($userInputObject) { + global $current_user; + + $uploadMaxSize = Import_Utils::getMaxUploadSize(); + $importDirectory = Import_Utils::getImportDirectory(); + $temporaryFileName = Import_Utils::getImportFilePath($current_user); + + if(!is_uploaded_file($_FILES['import_file']['tmp_name'])) { + $userInputObject->set('error_message', getTranslatedString('LBL_FILE_UPLOAD_FAILED', 'Import')); + return false; + } + if ($_FILES['userfile']['size'] > $uploadMaxSize) { + $userInputObject->set('error_message', getTranslatedString('LBL_IMPORT_ERROR_LARGE_FILE', 'Import'). + ' $uploadMaxSize.'.getTranslatedString('LBL_IMPORT_CHANGE_UPLOAD_SIZE', 'Import')); + return false; + } + if(!is_writable($importDirectory)) { + $userInputObject->set('error_message', getTranslatedString('LBL_IMPORT_DIRECTORY_NOT_WRITABLE', 'Import')); + return false; + } + + $fileCopied = move_uploaded_file($_FILES['import_file']['tmp_name'], $temporaryFileName); + if(!$fileCopied) { + $userInputObject->set('error_message', getTranslatedString('LBL_IMPORT_FILE_COPY_FAILED', 'Import')); + return false; + } + $fileReader = Import_Utils::getFileReader($userInputObject, $current_user); + + if($fileReader == null) { + $userInputObject->set('error_message', getTranslatedString('LBL_INVALID_FILE', 'Import')); + return false; + } + + $hasHeader = $fileReader->hasHeader(); + $firstRow = $fileReader->getFirstRowData($hasHeader); + if($firstRow === false) { + $userInputObject->set('error_message', getTranslatedString('LBL_NO_ROWS_FOUND', 'Import')); + return false; + } + return true; + } + + public static function undoLastImport($userInputObject, $user) { + $adb = PearDatabase::getInstance(); + $moduleName = $userInputObject->get('module'); + $ownerId = $userInputObject->get('foruser'); + $owner = new Users(); + $owner->id = $ownerId; + $owner->retrieve_entity_info($ownerId, 'Users'); + $dbTableName = Import_Utils::getDbTableName($owner); + if(!is_admin($user) && $user->id != $owner->id) { + $viewer = new Import_UI_Viewer(); + $viewer->display('OperationNotPermitted.tpl', 'Vtiger'); + exit; + } + $result = $adb->query("SELECT recordid FROM $dbTableName WHERE status = ". Import_Data_Controller::$IMPORT_RECORD_CREATED + ." AND recordid IS NOT NULL"); + $noOfRecords = $adb->num_rows($result); + $noOfRecordsDeleted = 0; + for($i=0; $i<$noOfRecords; ++$i) { + $recordId = $adb->query_result($result, $i, 'recordid'); + if(isRecordExists($recordId) && isPermitted($moduleName, 'Delete', $recordId) == 'yes') { + $focus = CRMEntity::getInstance($moduleName); + $focus->id = $recordId; + $focus->trash($moduleName, $recordId); + $noOfRecordsDeleted++; + } + } + + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('TOTAL_RECORDS', $noOfRecords); + $viewer->assign('DELETED_RECORDS_COUNT', $noOfRecordsDeleted); + $viewer->display('ImportUndoResult.tpl'); + } + + public static function deleteMap($userInputObject, $user) { + $adb = PearDatabase::getInstance(); + $moduleName = $userInputObject->get('module'); + $mapId = $userInputObject->get('mapid'); + Import_Map::markAsDeleted($mapId); + + $viewer = new Import_UI_Viewer(); + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('SAVED_MAPS', Import_Map::getAllByModule($moduleName)); + echo $viewer->fetch('Import_Saved_Maps.tpl'); + } + + public static function process($requestObject, $user) { + + $moduleName = $requestObject->get('module'); + $mode = $requestObject->get('mode'); + + if($mode == 'undo_import') { + Import_Index_Controller::undoLastImport($requestObject, $user); + exit; + } elseif($mode == 'listview') { + Import_ListView_Controller::render($requestObject, $user); + exit; + } elseif($mode == 'delete_map') { + Import_Index_Controller::deleteMap($requestObject, $user); + exit; + } elseif($mode == 'clear_corrupted_data') { + Import_Utils::clearUserImportInfo($user); + } elseif($mode == 'cancel_import') { + $importId = $requestObject->get('import_id'); + $importInfo = Import_Queue_Controller::getImportInfoById($importId); + if($importInfo != null) { + if($importInfo['user_id'] == $user->id || is_admin($user)) { + $importuser = new Users(); + $importuser->id = $importInfo['user_id']; + $importuser->retrieve_entity_info($importInfo['user_id'], 'Users'); + $importDataController = new Import_Data_Controller($importInfo, $importuser); + $importStatusCount = $importDataController->getImportStatusCount(); + $importDataController->finishImport(); + Import_Controller::showResult($importInfo, $importStatusCount); + } + exit; + } + } + + // Check if import on the module is locked + $lockInfo = Import_Lock_Controller::isLockedForModule($moduleName); + if($lockInfo != null) { + $lockedBy = $lockInfo['userid']; + if($user->id != $lockedBy && !is_admin($user)) { + Import_Utils::showImportLockedError($lockInfo); + exit; + } else { + if($mode == 'continue_import' && $user->id == $lockedBy) { + $importController = new Import_Controller($requestObject, $user); + $importController->triggerImport(true); + } else { + $importInfo = Import_Queue_Controller::getImportInfoById($lockInfo['importid']); + $lockOwner = $user; + if($user->id != $lockedBy) { + $lockOwner = new Users(); + $lockOwner->id = $lockInfo['userid']; + $lockOwner->retrieve_entity_info( $lockInfo['userid'], 'Users'); + } + Import_Controller::showImportStatus($importInfo, $lockOwner); + } + exit; + + } + } + + if(Import_Utils::isUserImportBlocked($user)) { + $importInfo = Import_Queue_Controller::getUserCurrentImportInfo($user); + if($importInfo != null) { + Import_Controller::showImportStatus($importInfo, $user); + exit; + } else { + Import_Utils::showImportTableBlockedError($moduleName, $user); + exit; + } + } + Import_Utils::clearUserImportInfo($user); + + if($mode == 'upload_and_parse') { + if(Import_Index_Controller::validateFileUpload($requestObject)) { + Import_Index_Controller::loadAdvancedSettings($requestObject, $user); + exit; + } + } elseif($mode == 'import') { + Import_Controller::import($requestObject, $user); + exit; + } + + Import_Index_Controller::loadBasicSettings($requestObject, $user); + } +} + +?> \ No newline at end of file diff --git a/modules/Import/controllers/Import_ListView_Controller.php b/modules/Import/controllers/Import_ListView_Controller.php new file mode 100644 index 0000000..7346ce7 --- /dev/null +++ b/modules/Import/controllers/Import_ListView_Controller.php @@ -0,0 +1,112 @@ +id])) { + $moduleHandler = vtws_getModuleHandlerFromName($moduleName, $user); + self::$_cached_module_meta[$moduleName][$user->id] = $moduleHandler->getMeta(); + } + return self::$_cached_module_meta[$moduleName][$user->id]; + } + + public static function render($userInputObject, $user) { + global $list_max_entries_per_page; + $adb = PearDatabase::getInstance(); + + $viewer = new Import_UI_Viewer(); + + $ownerId = $userInputObject->get('foruser'); + $owner = new Users(); + $owner->id = $ownerId; + $owner->retrieve_entity_info($ownerId, 'Users'); + if(!is_admin($user) && $user->id != $owner->id) { + $viewer->display('OperationNotPermitted.tpl', 'Vtiger'); + exit; + } + $userDBTableName = Import_Utils::getDbTableName($owner); + + $moduleName = $userInputObject->get('module'); + $moduleMeta = self::getModuleMeta($moduleName, $user); + + $result = $adb->query('SELECT recordid FROM '.$userDBTableName.' WHERE status is NOT NULL AND recordid IS NOT NULL'); + $noOfRecords = $adb->num_rows($result); + + $importedRecordIds = array(); + for($i=0; $i<$noOfRecords; ++$i) { + $importedRecordIds[] = $adb->query_result($result, $i, 'recordid'); + } + if(count($importedRecordIds) == 0) $importedRecordIds[] = 0; + + + $focus = CRMEntity::getInstance($moduleName); + $queryGenerator = new QueryGenerator($moduleName, $user); + $customView = new CustomView($moduleName); + $viewId = $customView->getViewIdByName('All', $moduleName); + $queryGenerator->initForCustomViewById($viewId); + $list_query = $queryGenerator->getQuery(); + + // Fetch only last imported records + $list_query .= ' AND '.$focus->table_name.'.'.$focus->table_index.' IN ('. implode(',', $importedRecordIds).')'; + + if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){ + $count_result = $adb->query( mkCountQuery( $list_query)); + $noofrows = $adb->query_result($count_result,0,"count"); + }else{ + $noofrows = null; + } + + $start = ListViewSession::getRequestCurrentPage($moduleName, $list_query, $viewId, false); + + $navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$noofrows); + + $limit_start_rec = ($start-1) * $list_max_entries_per_page; + + if( $adb->dbType == "pgsql") + $list_result = $adb->pquery($list_query. " OFFSET $limit_start_rec LIMIT $list_max_entries_per_page", array()); + else + $list_result = $adb->pquery($list_query. " LIMIT $limit_start_rec, $list_max_entries_per_page", array()); + + $recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec,$noofrows); + $viewer->assign('recordListRange',$recordListRangeMsg); + + $controller = new ListViewController($adb, $user, $queryGenerator); + $listview_header = $controller->getListViewHeader($focus,$moduleName,$url_string,$sorder,$order_by,true); + $listview_entries = $controller->getListViewEntries($focus,$moduleName,$list_result,$navigation_array,true); + + $viewer->assign('CURRENT_PAGE', $start); + $viewer->assign('LISTHEADER', $listview_header); + $viewer->assign('LISTENTITY', $listview_entries); + + $viewer->assign('FOR_MODULE', $moduleName); + $viewer->assign('FOR_USER', $ownerId); + + $isAjax = $userInputObject->get('ajax'); + if(!empty($isAjax)) { + echo $viewer->fetch('ListViewEntries.tpl'); + } else { + $viewer->display('ImportListView.tpl'); + } + } +} + +?> diff --git a/modules/Import/controllers/Import_Lock_Controller.php b/modules/Import/controllers/Import_Lock_Controller.php new file mode 100644 index 0000000..ab19da6 --- /dev/null +++ b/modules/Import/controllers/Import_Lock_Controller.php @@ -0,0 +1,63 @@ +pquery('INSERT INTO vtiger_import_locks VALUES(?,?,?,?,?)', + array($adb->getUniqueID('vtiger_import_locks'), $user->id, getTabid($module), $importId, date('Y-m-d H:i:s'))); + } + + public static function unLock($user, $module=false) { + $adb = PearDatabase::getInstance(); + if(Vtiger_Utils::CheckTable('vtiger_import_locks')) { + $query = 'DELETE FROM vtiger_import_locks WHERE userid=?'; + $params = array($user->id); + if($module != false) { + $query .= ' AND tabid=?'; + array_push($params, getTabid($module)); + } + $adb->pquery($query, $params); + } + } + + public static function isLockedForModule($module) { + $adb = PearDatabase::getInstance(); + + if(Vtiger_Utils::CheckTable('vtiger_import_locks')) { + $lockResult = $adb->pquery('SELECT * FROM vtiger_import_locks WHERE tabid=?',array(getTabid($module))); + + if($lockResult && $adb->num_rows($lockResult) > 0) { + $lockInfo = $adb->query_result_rowdata($lockResult, 0); + return $lockInfo; + } + } + + return null; + } +} + +?> \ No newline at end of file diff --git a/modules/Import/controllers/Import_Queue_Controller.php b/modules/Import/controllers/Import_Queue_Controller.php new file mode 100644 index 0000000..9ae1215 --- /dev/null +++ b/modules/Import/controllers/Import_Queue_Controller.php @@ -0,0 +1,155 @@ +get('is_scheduled')) { + $status = self::$IMPORT_STATUS_SCHEDULED; + } else { + $status = self::$IMPORT_STATUS_NONE; + } + + $adb->pquery('INSERT INTO vtiger_import_queue VALUES(?,?,?,?,?,?,?,?)', + array($adb->getUniqueID('vtiger_import_queue'), + $user->id, + getTabid($userInputObject->get('module')), + Zend_Json::encode($userInputObject->get('field_mapping')), + Zend_Json::encode($userInputObject->get('default_values')), + $userInputObject->get('merge_type'), + Zend_Json::encode($userInputObject->get('merge_fields')), + $status)); + } + + public static function remove($importId) { + $adb = PearDatabase::getInstance(); + if(Vtiger_Utils::CheckTable('vtiger_import_queue')) { + $adb->pquery('DELETE FROM vtiger_import_queue WHERE importid=?', array($importId)); + } + } + + public static function removeForUser($user) { + $adb = PearDatabase::getInstance(); + if(Vtiger_Utils::CheckTable('vtiger_import_queue')) { + $adb->pquery('DELETE FROM vtiger_import_queue WHERE userid=?', array($user->id)); + } + } + + public static function getUserCurrentImportInfo($user) { + $adb = PearDatabase::getInstance(); + + if(Vtiger_Utils::CheckTable('vtiger_import_queue')) { + $queueResult = $adb->pquery('SELECT * FROM vtiger_import_queue WHERE userid=? LIMIT 1', array($user->id)); + + if($queueResult && $adb->num_rows($queueResult) > 0) { + $rowData = $adb->raw_query_result_rowdata($queueResult, 0); + return self::getImportInfoFromResult($rowData); + } + } + return null; + } + + public static function getImportInfo($module, $user) { + $adb = PearDatabase::getInstance(); + + if(Vtiger_Utils::CheckTable('vtiger_import_queue')) { + $queueResult = $adb->pquery('SELECT * FROM vtiger_import_queue WHERE tabid=? AND userid=?', + array(getTabid($module), $user->id)); + + if($queueResult && $adb->num_rows($queueResult) > 0) { + $rowData = $adb->raw_query_result_rowdata($queueResult, 0); + return self::getImportInfoFromResult($rowData); + } + } + return null; + } + + public static function getImportInfoById($importId) { + $adb = PearDatabase::getInstance(); + + if(Vtiger_Utils::CheckTable('vtiger_import_queue')) { + $queueResult = $adb->pquery('SELECT * FROM vtiger_import_queue WHERE importid=?', array($importId)); + + if($queueResult && $adb->num_rows($queueResult) > 0) { + $rowData = $adb->raw_query_result_rowdata($queueResult, 0); + return self::getImportInfoFromResult($rowData); + } + } + return null; + } + + public static function getAll($status=false) { + + $adb = PearDatabase::getInstance(); + + $query = 'SELECT * FROM vtiger_import_queue'; + $params = array(); + if($status !== false) { + $query .= ' WHERE status = ?'; + array_push($params, $status); + } + $result = $adb->pquery($query, $params); + + $noOfImports = $adb->num_rows($result); + $scheduledImports = array(); + for ($i = 0; $i < $noOfImports; ++$i) { + $rowData = $adb->raw_query_result_rowdata($result, $i); + $scheduledImports[$rowData['importid']] = self::getImportInfoFromResult($rowData); + } + return $scheduledImports; + } + + static function getImportInfoFromResult($rowData) { + return array( + 'id' => $rowData['importid'], + 'module' => getTabModuleName($rowData['tabid']), + 'field_mapping' => Zend_Json::decode($rowData['field_mapping']), + 'default_values' => Zend_Json::decode($rowData['default_values']), + 'merge_type' => $rowData['merge_type'], + 'merge_fields' => Zend_Json::decode($rowData['merge_fields']), + 'user_id' => $rowData['userid'], + 'status' => $rowData['status'] + ); + } + + static function updateStatus($importId, $status) { + $adb = PearDatabase::getInstance(); + + $adb->pquery('UPDATE vtiger_import_queue SET status=? WHERE importid=?', array($status, $importId)); + } + +} + +?> \ No newline at end of file diff --git a/modules/Import/index.php b/modules/Import/index.php new file mode 100644 index 0000000..98b1016 --- /dev/null +++ b/modules/Import/index.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/modules/Import/language/de_de.lang.php b/modules/Import/language/de_de.lang.php new file mode 100644 index 0000000..878712b --- /dev/null +++ b/modules/Import/language/de_de.lang.php @@ -0,0 +1,88 @@ + 'Import', + 'LBL_IMPORT_STEP_1' => 'Schritt 1', + 'LBL_IMPORT_STEP_2' => 'Schritt 2', + 'LBL_IMPORT_STEP_3' => 'Schritt 3', + 'LBL_IMPORT_STEP_4' => 'Schritt 4', + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'wähle Datei', + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'spezifiziere Format', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Vorgehensweise bei Duplikaten', + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Ordne die Felder den Spalten zu', + 'Skip' => 'überspringen', + 'Overwrite' => 'überschreiben', + 'Merge' => 'Zusammenführen', + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Unterstütze Dateityp(en): .CSV, .VCF', + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Wählen Sie diese Option um die Kriterien zum Zusammenführen festzulegen', + 'LBL_CHARACTER_ENCODING' => 'Format', + 'LBL_DELIMITER' => 'Trennzeichen', + 'LBL_HAS_HEADER' => 'hat Überschriften', + 'LBL_SPECIFY_MERGE_TYPE' => 'Wählen Sie diese Option um die Kriterien zum Zusammenführen festzulegen', + 'LBL_SELECT_MERGE_FIELDS' => 'Wählen Sie die Felder in denen nach Duplikaten gesucht werden soll', + 'LBL_AVAILABLE_FIELDS' => 'vorhandene Felder', + 'LBL_SELECTED_FIELDS' => 'die zu untersuchenden Felder', + 'UTF-8' => 'UTF-8', + 'ISO-8859-1' => 'ISO-8859-1', + 'comma' => ', (Komma)', + 'semicolon' => '; (Semikolon)', + 'LBL_USE_SAVED_MAPPING' => 'Nutze vorhandene Feldzuordnung', + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Speichere Zuordnung', + 'LBL_FILE_COLUMN_HEADER' => 'Überschrift', + 'LBL_ROW_1' => 'Datensatz 1', + 'LBL_CRM_FIELDS' => 'CRM Felder', + 'LBL_DEFAULT_VALUE' => 'Standardwert', + 'LBL_IMPORT_BUTTON_LABEL' => 'Import', + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Anzahl aller importierten Datensätze', + 'LBL_TOTAL_RECORDS_FAILED' => 'Anzahl aller fehlgeschlagenden Datensätze', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Anzahl neu erstellter Datensätze', + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Anzahl überschriebener Datensätze', + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Anzahl übersprungener Datensätze', + 'LBL_UNDO_LAST_IMPORT' => 'Letzten import Rückgängig machen', + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'zuletzt importierte Datensätze', + 'LBL_IMPORT_MORE' => 'weitere importieren', + 'LBL_FINISH_BUTTON_LABEL' => 'fertigstellen', + 'LBL_RESULT' => 'Ergebnis', + 'ERR_FILE_DOESNT_EXIST' => "Datei existiert nicht", + 'ERR_CANT_OPEN_FILE' => "Datei kann nicht zum lesen geöffnet werden", + 'ERR_UNIMPORTED_RECORDS_IN_QUEUE' => 'Der Benutzer hat noch nicht importierte Datensätze in der Warteschlange', + 'ERR_FILE_READ_FAILED' => 'Fehler beim lesen der Datei', + 'LBL_IMPORT_SCHEDULED' => 'Import geplant', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Ihr Import wurde geplant und Sie werden via E-Mail informiert werden, wenn der Import abgeschlossen ist.
+ Bitte stellen Sie sicher, dass der Postausgangsserver in den Einstellungen für ausgehende E-Mails konfiguriert ist.', + 'ERR_DETAILS_BELOW' => 'Details werden unten angezeigt', + 'LBL_ERROR' => 'Fehler', + 'LBL_OK_BUTTON_LABEL' => 'OK', + 'TOTAL_RECORDS' => 'Anzahl aller Datensätze', + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Anzahl aller gelöschten Datensätzen', + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Anzahl aller zusammengeführten Datensätze', + 'LBL_TOTAL_RECORDS' => 'Anzahl aller Datensätze', + 'LBL_UNDO_RESULT' => 'Import rückgängig machen', + 'LBL_LAST_IMPORTED_RECORDS' => 'zuletzt importierte Datensätze', + 'LBL_NO_ROWS_FOUND' => 'Anzahl gefundender Zeilen', + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'Es gibt immer noch nicht importierte Datensätze in der Warteschlange, die Sie daran hindern, weiter Datensätze zu importieren.
+ Setze Daten zurück und starte einen neuen Import.', + 'ERR_FAILED_TO_LOCK_MODULE' => 'Das Modul konnte für den Import nicht gesperrt werden. Versuchen Sie es später noch einmal.', + 'LBL_RUNNING' => 'läuft', + 'LBL_CLEAR_DATA' => 'Daten zurücksetzten', + 'ERR_MODULE_IMPORT_LOCKED' => 'Sind sind derzeit nicht berechtigt, in diesem Modul Datensätze zu importiere, da ein anderer Import läuft. Versuchen Sie es später noch einmal', + 'LBL_MODULE_NAME' => 'Modul', + 'LBL_USER_NAME' => 'Benutzer', + 'LBL_LOCKED_TIME' => 'Zeit gesperrt', + 'LBL_CANCEL_IMPORT' => 'Import abbrechen', + 'ERR_IMPORT_INTERRUPTED' => 'Aktuelle Import wurde unterbrochen. Bitte versuchen Sie es später erneut.', + + 'LBL_INVALID_FILE' => 'Ungültige Datei', + 'LBL_FILE_TYPE' => 'Dateityp', + 'csv' => 'CSV', + 'vcf' => 'VCard', +); +?> diff --git a/modules/Import/language/en_gb.lang.php b/modules/Import/language/en_gb.lang.php new file mode 100644 index 0000000..cf5cef4 --- /dev/null +++ b/modules/Import/language/en_gb.lang.php @@ -0,0 +1,230 @@ + 'Import', + 'LBL_IMPORT_STEP_1' => 'Step 1', + 'LBL_IMPORT_STEP_2' => 'Step 2', + 'LBL_IMPORT_STEP_3' => 'Step 3', + 'LBL_IMPORT_STEP_4' => 'Step 4', + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Select File', + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Specify Format', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Duplicate Record Handling', + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Map the Columns to Module Fields', + 'Skip' => 'Skip', + 'Overwrite' => 'Overwrite', + 'Merge' => 'Merge', + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Supported File Type(s): .CSV, .VCF', + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Select this option to enable and set duplicate merge criteria', + 'LBL_CHARACTER_ENCODING' => 'Character Encoding', + 'LBL_DELIMITER' => 'Delimiter:', + 'LBL_HAS_HEADER' => 'Has Header', + 'LBL_SPECIFY_MERGE_TYPE' => 'Select how duplicate records should be handled', + 'LBL_SELECT_MERGE_FIELDS' => 'Select the matching fields to find duplicate records', + 'LBL_AVAILABLE_FIELDS' => 'Available Fields', + 'LBL_SELECTED_FIELDS' => 'Fields to be matched on', + 'UTF-8' => 'UTF-8', + 'ISO-8859-1' => 'ISO-8859-1', + 'comma' => ', (comma)', + 'semicolon' => '; (semi-colon)', + 'LBL_USE_SAVED_MAPPING' => 'Use Saved Mapping:', + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Save as Custom Mapping', + 'LBL_FILE_COLUMN_HEADER' => 'Header', + 'LBL_ROW_1' => 'Row 1', + 'LBL_CRM_FIELDS' => 'CRM Fields', + 'LBL_DEFAULT_VALUE' => 'Default Value', + 'LBL_IMPORT_BUTTON_LABEL' => 'Import', + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Total number of records imported', + 'LBL_TOTAL_RECORDS_FAILED' => 'Total number of records failed', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Number of records created', + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Number of records overwritten', + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Number of records skipped', + 'LBL_UNDO_LAST_IMPORT' => 'Undo Last Import', + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Last Imported Records', + 'LBL_IMPORT_MORE' => 'Import More', + 'LBL_FINISH_BUTTON_LABEL' => 'Finish', + 'LBL_RESULT' => 'Result', + 'ERR_FILE_DOESNT_EXIST' => 'File doesn\'t exist', + 'ERR_CANT_OPEN_FILE' => 'Can\'t open file for read', + 'ERR_UNIMPORTED_RECORDS_IN_QUEUE' => 'User still has unimported records in queue.', + 'ERR_FILE_READ_FAILED' => 'File read failed', + 'LBL_IMPORT_SCHEDULED' => 'Import Scheduled', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Your import has been scheduled and you will receive an email, once the import is completed. Please make sure that the Outgoing server and your email address is configured to receive email notification', + 'ERR_DETAILS_BELOW' => 'Details listed below', + 'LBL_ERROR' => 'Error:', + 'LBL_OK_BUTTON_LABEL' => 'OK', + 'TOTAL_RECORDS' => 'Total number of records', + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Number of records deleted', + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Number of records merged', + 'LBL_TOTAL_RECORDS' => 'Total Number of Records', + 'LBL_UNDO_RESULT' => 'Undo Import Result', + 'LBL_LAST_IMPORTED_RECORDS' => 'Last Imported Records', + 'LBL_NO_ROWS_FOUND' => 'No Rows Found', + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'There are still some unimported records in your import queue, blocking you from importing more data. Clear data to clean it up and start with fresh import ', + 'ERR_FAILED_TO_LOCK_MODULE' => 'Failed to lock the module for import. Re-try again later', + 'LBL_RUNNING' => 'Running', + 'LBL_CLEAR_DATA' => 'Clear Data', + 'ERR_MODULE_IMPORT_LOCKED' => 'You are not allowed to import for this module right now, as another import is in progress. Try again later.', + 'LBL_MODULE_NAME' => 'Import', + 'LBL_USER_NAME' => 'User', + 'LBL_LOCKED_TIME' => 'Locked Time', + 'LBL_CANCEL_IMPORT' => 'Cancel Import', + 'ERR_IMPORT_INTERRUPTED' => 'Current Import has been interrupted. Please try again later.', + 'LBL_INVALID_FILE' => 'Invalid File', + 'LBL_FILE_TYPE' => 'File Type', + 'csv' => 'CSV', + 'vcf' => 'VCard', + 'LBL_IMPORT_MODULE_NO_DIRECTORY' => 'The directory ', + 'LBL_IMPORT_MODULE_NO_DIRECTORY_END' => ' does not exist or is not writable', + 'LBL_IMPORT_MODULE_ERROR_NO_UPLOAD' => 'File was not uploaded successfully, try again', + 'LBL_IMPORT_MODULE_ERROR_LARGE_FILE' => 'File is too large. Max:', + 'LBL_IMPORT_MODULE_ERROR_LARGE_FILE_END' => 'Bytes. Change $upload_maxsize in config.php', + 'LBL_TRY_AGAIN' => 'Try Again', + 'ERR_MULTIPLE' => 'Multiple columns have been defined with the same field name.', + 'ERR_MISSING_REQUIRED_FIELDS' => 'Missing required fields:', + 'ERR_SELECT_FULL_NAME' => 'You cannot select Full Name when First Name and Last Name are selected.', + 'ERR_SELECT_FILE' => 'Select a file to upload.', + 'LBL_SELECT_FILE' => 'Select file:', + 'LBL_CUSTOM' => 'Custom', + 'LBL_DONT_MAP' => '-- Do not map this field --', + 'LBL_STEP_1_TITLE' => 'Select the .CSV File', + 'LBL_WHAT_IS' => 'Please select a data source from the following:', + 'LBL_MICROSOFT_OUTLOOK' => 'Microsoft Outlook', + 'LBL_ACT' => 'Act!', + 'LBL_SALESFORCE' => 'Salesforce.com', + 'LBL_MY_SAVED' => 'My Saved Sources:', + 'LBL_PUBLISH' => 'publish', + 'LBL_DELETE' => 'delete', + 'LBL_PUBLISHED_SOURCES' => 'Published Sources:', + 'LBL_UNPUBLISH' => 'un-publish', + 'LBL_NEXT' => 'Next', + 'LBL_BACK' => 'Back', + 'LBL_STEP_2_TITLE' => 'Step 2 of 4: Upload Export File', + 'LBL_NUM_1' => '1.', + 'LBL_NUM_2' => '2.', + 'LBL_NUM_3' => '3.', + 'LBL_NUM_4' => '4.', + 'LBL_NUM_5' => '5.', + 'LBL_NUM_6' => '6.', + 'LBL_NUM_7' => '7.', + 'LBL_NUM_8' => '8.', + 'LBL_NUM_9' => '9.', + 'LBL_NUM_10' => '10.', + 'LBL_NUM_11' => '11.', + 'LBL_NUM_12' => '12.', + 'LBL_NOW_CHOOSE' => 'Now choose that file to import:', + 'LBL_IMPORT_OUTLOOK_TITLE' => 'Microsoft Outlook 98 and 2000 can export data in the Comma Separated Values format which can be used to import data into the system. To export your data from Outlook, follow the steps below:', + 'LBL_OUTLOOK_NUM_1' => 'Start Outlook', + 'LBL_OUTLOOK_NUM_2' => 'Select the File menu, then the Import and Export ... menu option', + 'LBL_OUTLOOK_NUM_3' => 'Choose Export to a file and click Next', + 'LBL_OUTLOOK_NUM_4' => 'Choose Comma Separated Values (Windows) and click Next.
Note: You may be prompted to install the export component', + 'LBL_OUTLOOK_NUM_5' => 'Select the Contacts folder and click Next. You can select different contacts folders if your contacts are stored in multiple folders', + 'LBL_OUTLOOK_NUM_6' => 'Choose a filename and click Next', + 'LBL_OUTLOOK_NUM_7' => 'Click Finish', + 'LBL_IMPORT_ACT_TITLE' => 'Act! can export data in the Comma Separated Values format which can be used to import data into the system. To export your data from Act!, follow the steps below:', + 'LBL_ACT_NUM_1' => 'Launch ACT!', + 'LBL_ACT_NUM_2' => 'Select the File menu, the Data Exchange menu option, then the Export... menu option', + 'LBL_ACT_NUM_3' => 'Select the file type Text-Delimited', + 'LBL_ACT_NUM_4' => 'Choose a filename and location for the exported data and click Next', + 'LBL_ACT_NUM_5' => 'Select Contacts records only', + 'LBL_ACT_NUM_6' => 'Click the Options... button', + 'LBL_ACT_NUM_7' => 'Select Comma as the field separator character', + 'LBL_ACT_NUM_8' => 'Check the Yes, export field names checkbox and click OK', + 'LBL_ACT_NUM_9' => 'Click Next', + 'LBL_ACT_NUM_10' => 'Select All Records and then Click Finish', + 'LBL_IMPORT_SF_TITLE' => 'Salesforce.com can export data in the Comma Separated Values format which can be used to import data into the system. To export your data from Salesforce.com, follow the steps below:', + 'LBL_SF_NUM_1' => 'Open your browser, go to http://www.salesforce.com, and login with your email address and password', + 'LBL_SF_NUM_2' => 'Click on the Reports tab on the top menu', + 'LBL_SF_NUM_3' => 'To export Organisations: Click on the Active Organisations link
To export Contacts: Click on the Mailing List link', + 'LBL_SF_NUM_4' => 'On Step 1: Select your report type, select Tabular Reportclick Next', + 'LBL_SF_NUM_5' => 'On Step 2: Select the report columns, choose the columns you want to export and click Next', + 'LBL_SF_NUM_6' => 'On Step 3: Select the information to summarize, just click Next', + 'LBL_SF_NUM_7' => 'On Step 4: Order the report columns, just click Next', + 'LBL_SF_NUM_8' => 'On Step 5: Select your report criteria, under Start Date, choose a date far enough in the past to include all your Accounts. You can also export a subset of Accounts using more advanced criteria. When you are done, click Run Report', + 'LBL_SF_NUM_9' => 'A report will be generated, and the page should display Report Generation Status: Complete. Now click Export to Excel', + 'LBL_SF_NUM_10' => 'On Export Report:, for Export File Format:, choose Comma Delimited .csv. Click Export.', + 'LBL_SF_NUM_11' => 'A dialog will pop up for you to save the export file to your computer.', + 'LBL_IMPORT_CUSTOM_TITLE' => 'Many applications will allow you to export data into a Comma Delimited text file (.csv). Generally most applications follow these general steps:', + 'LBL_CUSTOM_NUM_1' => 'Launch the application and Open the data file', + 'LBL_CUSTOM_NUM_2' => 'Select the Save As... or Export... menu option', + 'LBL_CUSTOM_NUM_3' => 'Save the file in a CSV or Comma Separated Values format', + 'LBL_STEP_3_TITLE' => 'Step 3 of 4: Confirm Fields and Import', + 'LBL_STEP_1' => 'Step 1 of 3 : ', + 'LBL_STEP_1_TEXT' => ' vtiger CRM supports importing records from .csv (Comma Separated Values ) files. To start import, browse to locate the .CSV file and click on the Next button to Continue.', + 'LBL_SELECT_FIELDS_TO_MAP' => 'In the list below, select the fields in your import file that should be imported into each field in the system. When you are finished, click Import Now', + 'LBL_DATABASE_FIELD' => 'Database Field', + 'LBL_HEADER_ROW' => 'Header Row', + 'LBL_ROW' => 'Row', + 'LBL_SAVE_AS_CUSTOM' => 'Save as Custom Mapping:', + 'LBL_CONTACTS_NOTE_1' => 'Either Last Name or Full Name must be mapped.', + 'LBL_CONTACTS_NOTE_2' => 'If Full Name is mapped, then First Name and Last Name are ignored.', + 'LBL_CONTACTS_NOTE_3' => 'If Full Name is mapped, then the data in Full Name will be split into First Name and Last Name when inserted into the database.', + 'LBL_CONTACTS_NOTE_4' => 'Fields ending in Address Street 2 and Address Street 3 are concatenated together with the main Address Street Field when inserted into the database.', + 'LBL_ACCOUNTS_NOTE_1' => 'Organisation Name must be mapped.', + 'LBL_ACCOUNTS_NOTE_2' => 'Fields ending in Address Street 2 and Address Street 3 are concatenated together with the main Address Street Field when inserted into the database.', + 'LBL_POTENTIALS_NOTE_1' => 'Potential Name, Orgnaisation Name, Date Closed, and Sales Stage are required fields.', + 'LBL_OPPORTUNITIES_NOTE_1' => 'Opportunity Name, Organisation Name, Date Closed, and Sales Stage are required fields.', + 'LBL_LEADS_NOTE_1' => 'Last Name must be mapped.', + 'LBL_LEADS_NOTE_2' => 'Company Name must be mapped.', + 'LBL_IMPORT_NOW' => 'Import Now', + 'LBL_' => '', + 'LBL_CANNOT_OPEN' => 'Cannot open the imported file for reading', + 'LBL_NOT_SAME_NUMBER' => 'There were not the same number of fields per line in your file', + 'LBL_NO_LINES' => 'There were no lines in your import file', + 'LBL_FILE_ALREADY_BEEN_OR' => 'The import file has already been processed or does not exist', + 'LBL_SUCCESS' => 'Success. ', + 'LBL_SUCCESSFULLY' => 'Succesfully Imported', + 'LBL_LAST_IMPORT_UNDONE' => 'Your Last import was undone', + 'LBL_NO_IMPORT_TO_UNDO' => 'There was no import to undo.', + 'LBL_FAIL' => 'Fail:', + 'LBL_RECORDS_SKIPPED' => 'records skipped because they were missing one or more required fields', + 'LBL_IDS_EXISTED_OR_LONGER' => 'records skipped because the ids either existed or where longer than 36 characters', + 'LBL_RESULTS' => 'Results', + 'LBL_FINISHED' => 'Finished', + 'LBL_SUCCESS_1' => 'No. of Records successfully imported/updated : ', + 'LBL_SKIPPED_1' => 'No. of Records skipped as they were missing one or more required fields : ', + 'LBL_PRODUCTS_NOTE_1' => 'Product Name must be mapped', + 'LBL_PRODUCTS_NOTE_2' => 'Before import please check whether a single column has been mapped twice', + 'LBL_FILE_LOCATION' => 'File Location :', + 'LBL_STEP_2_3' => 'Step 2 of 3 :', + 'LBL_LIST_MAPPING' => 'List & Mapping', + 'LBL_STEP_2_MSG' => 'The following tables shows the imported', + 'LBL_STEP_2_MSG1' => 'and other details.', + 'LBL_STEP_2_TXT' => 'To map the fields, select the corresponding in combo boxes for each', + 'LBL_MAPPING' => 'Mapping', + 'LBL_HEADERS' => 'Headers:', + 'LBL_ERROR_MULTIPLE' => 'Same fields may be mapped twice. Please check the mapped fields.', + 'LBL_STEP_3_3' => 'Step 3 of 3 : ', + 'LBL_MAPPING_RESULTS' => 'Mapping Results ', + 'LBL_LAST_IMPORTED' => 'Last Imported', + 'PLEASE_CHECK_MAPPING' => 'is mapped more than once. Please check the mapping.', + 'MAP_MANDATORY_FIELD' => 'Please map the mandatory field "', + 'ENTER_SAVEMAP_NAME' => 'Please Enter Save Map Name', + 'to' => 'to', + 'of' => 'of', + 'are_imported_succesfully' => 'are imported successfully', + 'LBL_LAST_IMPORT' => 'Last Imported', + 'Select_Criteria_For_Duplicate' => 'Select criteria For duplicate record handling', + 'Manual_Merging' => 'Manual Merging', + 'Auto_Merging' => 'Auto Merging', + 'Ignore_Duplicate' => 'Ignore the duplicate import records', + 'Overwrite_Duplicate' => 'Overwrite the duplicate records', + 'Duplicate_Records_Skipped_Info' => 'No. of Records skipped as they were duplicates: ', + 'Duplicate_Records_Overwrite_Info' => 'No. of Records overwritten as they were duplicates:', + 'LBL_STEP_4_4' => 'Step 4 of 4 : ', + 'LBL_STEP_3_4' => 'Step 3 of 4 :', + 'LBL_STEP_2_4' => 'Step 2 of 4 :', + 'LBL_STEP_1_4' => 'Step 1 of 4 : ', + 'LBL_FORMAT' => 'Format:', + 'LBL_MAX_FILE_SIZE' => 'is the max allowed filesize', + 'LBL_MERGE_FIELDS_DUPLICATE' => 'Merge fields For duplicate import records', + 'Customer Portal Login Details' => 'Customer Portal login details' +); +?> \ No newline at end of file diff --git a/modules/Import/language/en_us.lang.php b/modules/Import/language/en_us.lang.php new file mode 100644 index 0000000..725626d --- /dev/null +++ b/modules/Import/language/en_us.lang.php @@ -0,0 +1,88 @@ + 'Import', + 'LBL_IMPORT_STEP_1' => 'Step 1', + 'LBL_IMPORT_STEP_2' => 'Step 2', + 'LBL_IMPORT_STEP_3' => 'Step 3', + 'LBL_IMPORT_STEP_4' => 'Step 4', + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Select File', + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Specify Format', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Duplicate Record Handling', + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Map the Columns to Module Fields', + 'Skip' => 'Skip', + 'Overwrite' => 'Overwrite', + 'Merge' => 'Merge', + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Supported File Type(s): .CSV, .VCF', + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Select this option to enable and set duplicate merge criteria', + 'LBL_CHARACTER_ENCODING' => 'Character Encoding', + 'LBL_DELIMITER' => 'Delimiter', + 'LBL_HAS_HEADER' => 'Has Header', + 'LBL_SPECIFY_MERGE_TYPE' => 'Select how duplicate records should be handled', + 'LBL_SELECT_MERGE_FIELDS' => 'Select the matching fields to find duplicate records', + 'LBL_AVAILABLE_FIELDS' => 'Available Fields', + 'LBL_SELECTED_FIELDS' => 'Fields to be matched on', + 'UTF-8' => 'UTF-8', + 'ISO-8859-1' => 'ISO-8859-1', + 'comma' => ', (comma)', + 'semicolon' => '; (semi-colon)', + 'LBL_USE_SAVED_MAPPING' => 'Use Saved Mapping', + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Save as Custom Mapping', + 'LBL_FILE_COLUMN_HEADER' => 'Header', + 'LBL_ROW_1' => 'Row 1', + 'LBL_CRM_FIELDS' => 'CRM Fields', + 'LBL_DEFAULT_VALUE' => 'Default Value', + 'LBL_IMPORT_BUTTON_LABEL' => 'Import', + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Total number of records imported', + 'LBL_TOTAL_RECORDS_FAILED' => 'Total number of records failed', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Number of records created', + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Number of records overwritten', + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Number of records skipped', + 'LBL_UNDO_LAST_IMPORT' => 'Undo Last Import', + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Last Imported Records', + 'LBL_IMPORT_MORE' => 'Import More', + 'LBL_FINISH_BUTTON_LABEL' => 'Finish', + 'LBL_RESULT' => 'Result', + 'ERR_FILE_DOESNT_EXIST' => "File doesn't exist", + 'ERR_CANT_OPEN_FILE' => "Can't open file for read", + 'ERR_UNIMPORTED_RECORDS_IN_QUEUE' => 'User has unimported records in queue yet', + 'ERR_FILE_READ_FAILED' => 'File read failed', + 'LBL_IMPORT_SCHEDULED' => 'Import Scheduled', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Your import has been scheduled and you will receive an email, once the import is completed.
+ Please make sure that the Outgoing server and your email address is configured to receive email notification', + 'ERR_DETAILS_BELOW' => 'Details listed below', + 'LBL_ERROR' => 'Error', + 'LBL_OK_BUTTON_LABEL' => 'OK', + 'TOTAL_RECORDS' => 'Total number of records', + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Number of records deleted', + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Number of records merged', + 'LBL_TOTAL_RECORDS' => 'Total Number of Records', + 'LBL_UNDO_RESULT' => 'Undo Import Result', + 'LBL_LAST_IMPORTED_RECORDS' => 'Last Imported Records', + 'LBL_NO_ROWS_FOUND' => 'No Rows Found', + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'There are still some unimported records in your import queue, blocking you from importing more data.
+ Clear data to clean it up and start with fresh import', + 'ERR_FAILED_TO_LOCK_MODULE' => 'Failed to lock the module for import. Re-try again later', + 'LBL_RUNNING' => 'Running', + 'LBL_CLEAR_DATA' => 'Clear Data', + 'ERR_MODULE_IMPORT_LOCKED' => 'You are not allowed to import for this module right now, as another import is in progress. Try again later.', + 'LBL_MODULE_NAME' => 'Module', + 'LBL_USER_NAME' => 'User', + 'LBL_LOCKED_TIME' => 'Locked Time', + 'LBL_CANCEL_IMPORT' => 'Cancel Import', + 'ERR_IMPORT_INTERRUPTED' => 'Current Import has been interrupted. Please try again later.', + + 'LBL_INVALID_FILE' => 'Invalid File', + 'LBL_FILE_TYPE' => 'File Type', + 'csv' => 'CSV', + 'vcf' => 'VCard', +); +?> diff --git a/modules/Import/language/es_es.lang.php b/modules/Import/language/es_es.lang.php new file mode 100644 index 0000000..41e74d4 --- /dev/null +++ b/modules/Import/language/es_es.lang.php @@ -0,0 +1,87 @@ + 'Importar', + 'LBL_IMPORT_STEP_1' => 'Paso 1', + 'LBL_IMPORT_STEP_2' => 'Paso 2', + 'LBL_IMPORT_STEP_3' => 'Paso 3', + 'LBL_IMPORT_STEP_4' => 'Paso 4', + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Selecciona Fichero', + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Especifica Formato', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Manejo de Registros Duplicados', + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Asigna las Columnas a Campos del Módulo', + 'Skip' => 'Ignorar', + 'Overwrite' => 'Sobreescribir', + 'Merge' => 'Combinar', + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Formato(s) aceptados: .CSV, .VCF', + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Selecciona esta opción para habilitar y configurar el control de duplicados', + 'LBL_CHARACTER_ENCODING' => 'Codificación caracteres', + 'LBL_DELIMITER' => 'Delimitador', + 'LBL_HAS_HEADER' => 'Tiene cabecera', + 'LBL_SPECIFY_MERGE_TYPE' => 'Selecciona cómo se han de gestionar los registros duplicados', + 'LBL_SELECT_MERGE_FIELDS' => 'Selecciona los campos coincidentes para encontrar duplicados', + 'LBL_AVAILABLE_FIELDS' => 'Campos Disponibles', + 'LBL_SELECTED_FIELDS' => 'Campos Coincidentes', + 'UTF-8' => 'UTF-8', + 'ISO-8859-1' => 'ISO-8859-1', + 'comma' => ', (coma)', + 'semicolon' => '; (punto y coma)', + 'LBL_USE_SAVED_MAPPING' => 'Usar asignación personalizada', + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Guardar como asignación personalizada', + 'LBL_FILE_COLUMN_HEADER' => 'Cabecera', + 'LBL_ROW_1' => 'Fila 1', + 'LBL_CRM_FIELDS' => 'Campos CRM', + 'LBL_DEFAULT_VALUE' => 'Valor por defecto', + 'LBL_IMPORT_BUTTON_LABEL' => 'Importar', + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Número total de registros importados', + 'LBL_TOTAL_RECORDS_FAILED' => 'Número total de registros descartados', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Número de registros creados', + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Número de registros sobreescritos', + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Número de registros descartados', + 'LBL_UNDO_LAST_IMPORT' => 'Deshacer última importación', + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Registros Importados', + 'LBL_IMPORT_MORE' => 'Importar Más', + 'LBL_FINISH_BUTTON_LABEL' => 'Terminar', + 'LBL_RESULT' => 'Resultado', + 'ERR_FILE_DOESNT_EXIST' => "Fichero no existe", + 'ERR_CANT_OPEN_FILE' => "No se ha podido abrir el fichero para leer", + 'ERR_UNIMPORTED_RECORDS_IN_QUEUE' => 'Todavía hay registros en la cola pendientes de importar', + 'ERR_FILE_READ_FAILED' => 'Error en la lectura del fichero', + 'LBL_IMPORT_SCHEDULED' => 'Importación Planificada', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'La importación ha sido programada y recibirás un correo cuando termine el proceso.
+ Asegúrate de que puedes recibir correos de notificación de la aplicación', + 'ERR_DETAILS_BELOW' => 'Detalles a continuación', + 'LBL_ERROR' => 'Error', + 'LBL_OK_BUTTON_LABEL' => 'Vale', + 'TOTAL_RECORDS' => 'Número total de registros', + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Número total de registros eliminados', + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Número total de registros combinados', + 'LBL_TOTAL_RECORDS' => 'Número total de registros', + 'LBL_UNDO_RESULT' => 'Resultado de deshacer importación', + 'LBL_LAST_IMPORTED_RECORDS' => 'Ultimos Registros Importados', + 'LBL_NO_ROWS_FOUND' => 'No se han encontrado filas', + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'Todavía hay registros pendientes de importación en la cola, que impiden importar más información.
+ Vacía la cola de importación para iniciar el proceso de nuevo', + 'ERR_FAILED_TO_LOCK_MODULE' => 'No se ha podido bloquear el módulo para la importación. Inténtalo de nuevo más tarde.', + 'LBL_RUNNING' => 'En ejecución', + 'LBL_CLEAR_DATA' => 'Vaciar cola importación', + 'ERR_MODULE_IMPORT_LOCKED' => 'No puedes importar este módulo ahora mismo, ya que hay otro proceso de importación en ejecución. Inténtalo de nuevo más tarde.', + 'LBL_MODULE_NAME' => 'Módulo', + 'LBL_USER_NAME' => 'Usuario', + 'LBL_LOCKED_TIME' => 'Tiempo de bloqueo', + 'LBL_CANCEL_IMPORT' => 'Cancelar Importación', + 'ERR_IMPORT_INTERRUPTED' => 'La importación actual ha sido interrumpida.', + 'LBL_INVALID_FILE' => 'Fichero Inválido', + 'LBL_FILE_TYPE' => 'Tipo Fichero', + 'csv' => 'CSV', + 'vcf' => 'VCard', +); +?> diff --git a/modules/Import/language/es_mx.lang.php b/modules/Import/language/es_mx.lang.php new file mode 100644 index 0000000..0e03bed --- /dev/null +++ b/modules/Import/language/es_mx.lang.php @@ -0,0 +1,87 @@ + 'Importar', + 'LBL_IMPORT_STEP_1' => 'Paso 1', + 'LBL_IMPORT_STEP_2' => 'Paso 2', + 'LBL_IMPORT_STEP_3' => 'Paso 3', + 'LBL_IMPORT_STEP_4' => 'Paso 4', + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Selecciona Archivo', + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Especifica Formato', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Manejo de Registros Duplicados', + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Asigna las Columnas a Campos del Módulo', + 'Skip' => 'Ignorar', + 'Overwrite' => 'Sobreescribir', + 'Merge' => 'Combinar', + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Formato(s) aceptados: .CSV, .VCF', + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Selecciona esta opción para habilitar y configurar el control de duplicados', + 'LBL_CHARACTER_ENCODING' => 'Codificación de caracteres', + 'LBL_DELIMITER' => 'Delimitador', + 'LBL_HAS_HEADER' => 'Tiene cabecera', + 'LBL_SPECIFY_MERGE_TYPE' => 'Selecciona cómo se han de manejar los registros duplicados', + 'LBL_SELECT_MERGE_FIELDS' => 'Selecciona los campos coincidentes para encontrar duplicados', + 'LBL_AVAILABLE_FIELDS' => 'Campos Disponibles', + 'LBL_SELECTED_FIELDS' => 'Campos Coincidentes', + 'UTF-8' => 'UTF-8', + 'ISO-8859-1' => 'ISO-8859-1', + 'comma' => ', (coma)', + 'semicolon' => '; (punto y coma)', + 'LBL_USE_SAVED_MAPPING' => 'Usar asignación personalizada', + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Guardar como asignación personalizada', + 'LBL_FILE_COLUMN_HEADER' => 'Cabecera', + 'LBL_ROW_1' => 'Fila 1', + 'LBL_CRM_FIELDS' => 'Campos CRM', + 'LBL_DEFAULT_VALUE' => 'Valor por defecto', + 'LBL_IMPORT_BUTTON_LABEL' => 'Importar', + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Número total de registros importados', + 'LBL_TOTAL_RECORDS_FAILED' => 'Número total de registros descartados', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Número de registros creados', + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Número de registros sobreescritos', + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Número de registros descartados', + 'LBL_UNDO_LAST_IMPORT' => 'Deshacer última importación', + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Registros Importados', + 'LBL_IMPORT_MORE' => 'Importar Más', + 'LBL_FINISH_BUTTON_LABEL' => 'Terminar', + 'LBL_RESULT' => 'Resultado', + 'ERR_FILE_DOESNT_EXIST' => "Archivo no existe", + 'ERR_CANT_OPEN_FILE' => "No se ha podido abrir el Archivo para leer", + 'ERR_UNIMPORTED_RECORDS_IN_QUEUE' => 'Todavía hay registros en cola pendientes de importar ', + 'ERR_FILE_READ_FAILED' => 'Error en la lectura del Archivo', + 'LBL_IMPORT_SCHEDULED' => 'Importación Planificada', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'La importación ha sido programada y recibirás un correo cuando termine el proceso.
+ Asegúrate de que puedes recibir correos de notificación de la aplicación', + 'ERR_DETAILS_BELOW' => 'Detalles a continuación', + 'LBL_ERROR' => 'Error', + 'LBL_OK_BUTTON_LABEL' => 'Vale', + 'TOTAL_RECORDS' => 'Número total de registros', + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Número total de registros eliminados', + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Número total de registros combinados', + 'LBL_TOTAL_RECORDS' => 'Número total de registros', + 'LBL_UNDO_RESULT' => 'Resultado de deshacer importación', + 'LBL_LAST_IMPORTED_RECORDS' => 'Últimos registros importados', + 'LBL_NO_ROWS_FOUND' => 'No se han encontrado filas', + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'Todavía hay registros pendientes de importación en cola, que impiden importar más información.
+ Vacía la cola de importación para iniciar el proceso de nuevo', + 'ERR_FAILED_TO_LOCK_MODULE' => 'No se ha podido bloquear el módulo para la importación. Inténtalo de nuevo más tarde.', + 'LBL_RUNNING' => 'En ejecución', + 'LBL_CLEAR_DATA' => 'Vaciar cola de importación', + 'ERR_MODULE_IMPORT_LOCKED' => 'No puedes importar este módulo ahora mismo, ya que hay otro proceso de importación en ejecución. Inténtalo de nuevo más tarde.', + 'LBL_MODULE_NAME' => 'Módulo', + 'LBL_USER_NAME' => 'Usuario', + 'LBL_LOCKED_TIME' => 'Tiempo de bloqueo', + 'LBL_CANCEL_IMPORT' => 'Cancelar Importación', + 'ERR_IMPORT_INTERRUPTED' => 'La importación actual ha sido interrumpida.', + 'LBL_INVALID_FILE' => 'Archivo Inválido', + 'LBL_FILE_TYPE' => 'Tipo Archivo', + 'csv' => 'CSV', + 'vcf' => 'VCard', +); +?> diff --git a/modules/Import/language/fr_fr.lang.php b/modules/Import/language/fr_fr.lang.php new file mode 100644 index 0000000..6512cc9 --- /dev/null +++ b/modules/Import/language/fr_fr.lang.php @@ -0,0 +1,410 @@ + 'Le répertoire', + 'LBL_IMPORT_MODULE_NO_DIRECTORY_END' => ' n\'existe pas ou est en lecture seule', + 'LBL_IMPORT_MODULE_ERROR_NO_UPLOAD' => 'Erreur lors de l\'importation du fichier, veuillez réessayez.', + 'LBL_IMPORT_MODULE_ERROR_LARGE_FILE' => 'Fichier trop volumineux. Taille max :', + 'LBL_IMPORT_MODULE_ERROR_LARGE_FILE_END' => ' Octets. Vous pouvez modifier la valeur "Taille Max.de fichier téléchargement" dans le Config Editeur (droit administrateur requis)', + 'LBL_MODULE_NAME' => 'Importer', + 'LBL_TRY_AGAIN' => 'Réessayer', + 'LBL_ERROR' => 'Erreur :', + 'ERR_MULTIPLE' => 'Plusieurs colonnes portant le même nom existent.', + 'ERR_MISSING_REQUIRED_FIELDS' => 'Champs requis manquants :', + 'ERR_SELECT_FULL_NAME' => 'Vous ne pouvez pas choisir Nom complet quand Prénom et Nom sont sélectionnés.', + 'ERR_SELECT_FILE' => 'Sélectionnez le fichier à uploader.', + 'LBL_SELECT_FILE' => 'Sélectionnez fichier :', + 'LBL_CUSTOM' => 'Personnaliser', + 'LBL_DONT_MAP' => '|-- Ne pas mapper ce champ --|', + 'LBL_STEP_1_TITLE' => 'Sélectionnez le fichier .csv', + 'LBL_WHAT_IS' => 'Veuillez sélectionner une méthode d\'importation :', + 'LBL_MICROSOFT_OUTLOOK' => 'Microsoft Outlook', + 'LBL_ACT' => 'Act!', + 'LBL_SALESFORCE' => 'Salesforce.com', + 'LBL_MY_SAVED' => 'Mes mappings sauvegardées :', + 'LBL_PUBLISH' => 'publiés', + 'LBL_DELETE' => 'supprimer', + 'LBL_PUBLISHED_SOURCES' => 'Sources publiées :', + 'LBL_UNPUBLISH' => 'non-publiés', + 'LBL_NEXT' => 'suivant', + 'LBL_BACK' => 'précédent', + 'LBL_STEP_2_TITLE' => 'Etape 2 : Uploader le fichier', + 'LBL_HAS_HEADER' => 'A une ligne d\'en-tête :', + 'LBL_NUM_1' => '1.', + 'LBL_NUM_2' => '2.', + 'LBL_NUM_3' => '3.', + 'LBL_NUM_4' => '4.', + 'LBL_NUM_5' => '5.', + 'LBL_NUM_6' => '6.', + 'LBL_NUM_7' => '7.', + 'LBL_NUM_8' => '8.', + 'LBL_NUM_9' => '9.', + 'LBL_NUM_10' => '10.', + 'LBL_NUM_11' => '11.', + 'LBL_NUM_12' => '12.', + 'LBL_NOW_CHOOSE' => 'Sélectionnez le fichier à importer :', + 'LBL_IMPORT_OUTLOOK_TITLE' => 'Microsoft Outlook 98 et 2000 peuvent exporter les données au format CSV ou valeur séparée d\'une virgule, qui peuvent servir à importer des données dans le système. Pour exporter les données d\'Outlook, suivre les étapes suivantes :', + 'LBL_OUTLOOK_NUM_1' => 'Démarrer Outlook', + 'LBL_OUTLOOK_NUM_2' => 'Sélectionnez Fichier, puis l\'option Importer et Exporter ...', + 'LBL_OUTLOOK_NUM_3' => 'Sélectionnez Exporter vers un fichier et cliquer sur Suivant', + 'LBL_OUTLOOK_NUM_4' => 'Sélectionnez le format CSV (Windows) et cliquer sur Suivant. + Note : le CD d\'installation pourra vous être demandé pour installer la fonction', + 'LBL_OUTLOOK_NUM_5' => 'Sélectionnez le répertoire Contacts et cliquer sur Suivant. Puis sélectionner des répertoires différents si vos contacts sont stockés dans des répertoires multiples', + 'LBL_OUTLOOK_NUM_6' => 'Sélectionnez un nom de fichier et cliquer sur Suivant', + 'LBL_OUTLOOK_NUM_7' => 'Cliquez sur Finir', + 'LBL_IMPORT_ACT_TITLE' => 'Act! peut exporter les données dans un format CSV qui peut servir à importer les données dans le système. Pour exporter les données d\'Act!, suivre les étapes suivantes :', + 'LBL_ACT_NUM_1' => 'Lancer ACT!', + 'LBL_ACT_NUM_2' => 'Sélectionnez le menu Fichier, l\'option Data Exchange et l\'option Exporter...', + 'LBL_ACT_NUM_3' => 'Sélectionnez le type de fichier Texte-Delimité', + 'LBL_ACT_NUM_4' => 'Sélectionnez un nom de fichier et un répertoire pour l\'export des données et cliquer sur Suivant', + 'LBL_ACT_NUM_5' => 'Sélectionnez Enregistrement Contacts seulement', + 'LBL_ACT_NUM_6' => 'Cliquez sur le bouton Options...', + 'LBL_ACT_NUM_7' => 'Sélectionnez Virgule comme caractère de séparation des champs', + 'LBL_ACT_NUM_8' => 'Cochez Oui, exporter les noms de champs et cliquez sur OK', + 'LBL_ACT_NUM_9' => 'Cliquer sur Suivant', + 'LBL_ACT_NUM_10' => 'Sélectionnez Tous les enregistrements puis cliquez sur Finir', + 'LBL_IMPORT_SF_TITLE' => 'Salesforce.com peut exporter les données au format Comma Separated Values qui peut alors être utilisé pour importer les données dans votre système. Pour exporter vos données de Salesforce.com, suivre les étapes suivantes :', + 'LBL_SF_NUM_1' => 'Ouvrir votre browser, aller sur www.salesforce.com et connectez-vous avec vos mail et mot de passe', + 'LBL_SF_NUM_2' => 'Sélectionnez l\'onglet Rapports sur le menu en haut', + 'LBL_SF_NUM_3' => 'Pour exporter les comptes : Cliquez sur Comptes Actifs + Pour exportez les contacts : Cliquer sur Mailing Liste', + 'LBL_SF_NUM_4' => 'Dans Etape 1 : Sélectionnez le type de rapport, choisir Rapport Tabulaire cliquez sur Suivant', + 'LBL_SF_NUM_5' => 'Dans Etape 2 : Sélectionnez les colonnes du rapport, sélectionnez les colonnes que vous voulez exporter et cliquez sur Suivant', + 'LBL_SF_NUM_6' => 'Dans Etape 3: Sélectionnez les informations à résumer, cliquez sur Suivant', + 'LBL_SF_NUM_7' => 'Dans Etape 4: Ordonnez les colonnes du rapport, cliquez sur Suivant', + 'LBL_SF_NUM_8' => 'Dans Etape 5: Sélectionnez les critères du rapport, sous Date de début, choisir une date suffisament dans le passé pour inclure tous vos Comptes. Vous pouvez aussi exporter une partie des Comptes en définissant des critères plus avancés. Quand vous avez fini, cliquez sur Exécuter le rapport', + 'LBL_SF_NUM_9' => 'Un rapport sera généré et la page devrait montrer Statut de Génération rapport : complet. Cliquez sur Export sur Excel', + 'LBL_SF_NUM_10' => 'Dans Exporter rapport :, pour Format de fichier :, sélectionnez csv. Cliquez sur Exporter.', + 'LBL_SF_NUM_11' => 'Une fenêtre de dialogue va s\'ouvrir pour sauvegarder le fichier d\'export sur votre PC.', + 'LBL_IMPORT_CUSTOM_TITLE' => 'De nombreuses applications permettent l\'export de données au format csv. En général cette méthode d\'export des données est très simple :', + 'LBL_CUSTOM_NUM_1' => 'Lancer l\'application depuis laquelle vous désirez récupérer les données et ouvrez le fichier de données', + 'LBL_CUSTOM_NUM_2' => 'Sélectionnez Enregistrer-sous... ou l\'option du menu Exporter...', + 'LBL_CUSTOM_NUM_3' => 'Sauvegarder le fichier dans un format CSV ou Comma Separated Values', + 'LBL_STEP_3_TITLE' => 'Etape 3: Confirmation des champs et import', + 'LBL_STEP_1' => 'Etape 1 sur 3 : ', + 'LBL_STEP_1_TEXT' => ' vtiger CRM supporte l\'import de données au format .csv ( Comma Separated Values ). Pour démarrer l\'import, veuillez sélectionner un fichier .CSV puis cliquez sur le bouton suivant pour continuer.', + 'LBL_SELECT_FIELDS_TO_MAP' => 'Dans la liste ci-dessous, sélectionnez les champs de votre fichier importé qui doivent être injecté dans le système. Une fois terminé, veuillez cliquer sur Importer maintenant', + 'LBL_DATABASE_FIELD' => 'Champs de base de données', + 'LBL_HEADER_ROW' => 'Ligne d\'en-tête', + 'LBL_ROW' => 'Ligne', + 'LBL_SAVE_AS_CUSTOM' => 'Sauvegarder comme mapping personnalisé :', + 'LBL_CONTACTS_NOTE_1' => 'Nom ou Nom complet doivent être mappés.', + 'LBL_CONTACTS_NOTE_2' => 'Si le Nom complet est mappé, alors Prénom et Nom sont ignorés.', + 'LBL_CONTACTS_NOTE_3' => 'Si le mapping à Nom complet est choisi, alors les données de Nom Complet seront divisées en Prénom et Nom pour être insérées dans la base de données.', + 'LBL_CONTACTS_NOTE_4' => 'Les champs Adresse Rue 2 et Adresse Rue 3 sont concaténés à l\'Adresse Rue avant d\'être insérés dans la base de données.', + 'LBL_ACCOUNTS_NOTE_1' => 'Le Nom du compte doit être mappé.', + 'LBL_ACCOUNTS_NOTE_2' => 'Les champs Adresse Rue 2 et Adresse Rue 3 sont concaténés à l\'Adresse Rue avant d\'être insérés dans la base de données.', + 'LBL_POTENTIALS_NOTE_1' => 'Prospect, compte, date d\'échéance, et étape de vente sont des champs requis.', + 'LBL_OPPORTUNITIES_NOTE_1' => 'Nom affaire, Nom compte, Echéance, et Phase de vente sont des champs requis.', + 'LBL_LEADS_NOTE_1' => 'Le nom de famille doit être mappé.', + 'LBL_LEADS_NOTE_2' => 'Le nom de société doit être mappé.', + 'LBL_IMPORT_NOW' => 'Importer maintenant', + 'LBL_' => '', + 'LBL_CANNOT_OPEN' => 'impossible d\'ouvrir le fichier en lecture', + 'LBL_NOT_SAME_NUMBER' => 'Il n\'y avait pas le même nombre de champs par ligne sur votre fichier', + 'LBL_NO_LINES' => 'Fichier vide !', + 'LBL_FILE_ALREADY_BEEN_OR' => 'Le fichier a déjà été traité ou n\'existe pas', + 'LBL_SUCCESS' => 'Succès :', + 'LBL_SUCCESSFULLY' => 'enregistrements importés avec succès', + 'LBL_LAST_IMPORT_UNDONE' => 'Votre dernier import a été annulé', + 'LBL_NO_IMPORT_TO_UNDO' => 'Pas d\'import à annuler.', + 'LBL_FAIL' => 'Echec :', + 'LBL_RECORDS_SKIPPED' => 'enregistrements sautés car un ou plusieurs champs requis manquaient', + 'LBL_IDS_EXISTED_OR_LONGER' => 'enregistrement ou l\'id fait plus de 36 charactères ou existe déjà, enregistrements sautés', + 'LBL_RESULTS' => 'Résultats', + 'LBL_IMPORT_MORE' => 'Nouvel import', + 'LBL_FINISHED' => 'Effectué', + 'LBL_UNDO_LAST_IMPORT' => 'Annuler le dernier import', + 'LBL_SUCCESS_1' => 'N° d\'enregistrement importés : ', + 'LBL_SKIPPED_1' => 'N° d\'enregistrement non importés (vérifiez les champs obligatoires) : ', + 'LBL_PRODUCTS_NOTE_1' => 'Nom produit doit être mappé', + 'LBL_PRODUCTS_NOTE_2' => 'Avant l\'import veuillez vérifier qu\'une colonne n\'est pas mappée deux fois', + 'LBL_FILE_LOCATION' => 'Fichier :', + 'LBL_STEP_2_3' => 'Etape 2 sur 3 :', + 'LBL_LIST_MAPPING' => 'Liste & mapping', + 'LBL_STEP_2_MSG' => 'Le tableau suivant récapitule l\'importation', + 'LBL_STEP_2_MSG1' => 'et autre détails.', + 'LBL_STEP_2_TXT' => 'Pour mapper les champs, faîtes correspondre les listes de choix', + 'LBL_USE_SAVED_MAPPING' => 'Utiliser un mapping sauvegardé :', + 'LBL_MAPPING' => 'Mapping', + 'LBL_HEADERS' => 'Entêtes :', + 'LBL_ERROR_MULTIPLE' => 'Un même champ ne peut être mappé deux fois. Veuillez vérifier vos mappings.', + 'LBL_STEP_3_3' => 'Etape 3 sur 3 : ', + 'LBL_MAPPING_RESULTS' => 'Mise en correspondance des résultats ', + 'LBL_LAST_IMPORTED' => 'Derniers imports', + 'PLEASE_CHECK_MAPPING' => '\' est mappé plus d\'une fois. Veuillez vérifier.', + 'MAP_MANDATORY_FIELD' => 'Veuillez mapper tous les champs obligatoires "', + 'ENTER_SAVEMAP_NAME' => 'Veuillez saisir un nom pour ce mapping', + 'to' => 'à', + 'of' => 'de', + 'are_imported_succesfully' => 'sont importés correctement', + 'LBL_LAST_IMPORT' => 'Dernier importé', + 'Select_Criteria_For_Duplicate' => 'Selectionner les critères pour la gestion des doublons', + 'Manual_Merging' => 'Fusion manuelle', + 'Auto_Merging' => 'Fusion automatique', + 'Ignore_Duplicate' => 'Ne pas importer les doublons', + 'Overwrite_Duplicate' => 'Ecraser les doublons', + 'Duplicate_Records_Skipped_Info' => 'Nombres d\'enregistrements ignorés : ', + 'Duplicate_Records_Overwrite_Info' => 'Nombres d\'enregistrements écrasés : ', + 'LBL_STEP_4_4' => 'Etape 4 de 4 : ', + 'LBL_STEP_3_4' => 'Etape 3 de 4 :', + 'LBL_STEP_2_4' => 'Etape 2 de 4 :', + 'LBL_STEP_1_4' => 'Etape 1 de 4 : ', + 'LBL_DELIMITER' => 'Délimiteur :', + 'LBL_FORMAT' => 'Format :', + + // nouvelle version 5.4.0 + + 'LBL_IMPORT_STEP_1' => 'Etape 1', + 'LBL_IMPORT_STEP_2' => 'Etape 2', + 'LBL_IMPORT_STEP_3' => 'Etape 3', + 'LBL_IMPORT_STEP_4' => 'Etape 4', + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Choix du fichier', + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Format', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Option de fusion ', + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Mapping des colonnes des champs du module', + 'Skip' => 'Ignorer la mise à jour de la fiche', + 'Overwrite' => 'Ecraser (toutes les données d\'une fiche actuelle)', + 'Merge' => 'Fusionner (Met à jour uniquement les colonnes mappées )', + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Types de fichier supportés: .CSV, .VCF', + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Activer cette option dans le cas de la mise à jour de fiches existantes dans le CRM', + 'LBL_CHARACTER_ENCODING' => 'Encodage des caractères', + 'LBL_DELIMITER' => 'Delimiteur', + 'LBL_HAS_HEADER' => 'Contient une ligne d\'entetes', + 'LBL_SPECIFY_MERGE_TYPE' => 'Choisir comment les données mises à jour vont être traitées', + 'LBL_SELECT_MERGE_FIELDS' => 'Choisir les champs qui determinent la correspondance entre une ligne de votre fichier et la fiche dans le CRM', + 'LBL_AVAILABLE_FIELDS' => 'Champs disponibles', + 'LBL_SELECTED_FIELDS' => 'Champs sélectionnés', + 'UTF-8' => 'UTF-8', + 'ISO-8859-1' => 'ISO-8859-1', + 'comma' => ', (virgule)', + 'semicolon' => '; (point-virgule)', + 'LBL_USE_SAVED_MAPPING' => 'Utiliset le mapping sauvé', + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Sauver ce mapping', + 'LBL_FILE_COLUMN_HEADER' => 'Entêtes', + 'LBL_ROW_1' => 'Colonne 1', + 'LBL_CRM_FIELDS' => 'Champs du CRM', + 'LBL_DEFAULT_VALUE' => 'Valeur par défaut', + 'LBL_IMPORT_BUTTON_LABEL' => 'Import', + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Nombre total d\'enregistrements importés', + 'LBL_TOTAL_RECORDS_FAILED' => 'Nombre total d\'enregistrements échoués', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Nombre total d\'enregistrements créés', + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Nombre total d\'enregistrements fusionés', + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'Nombre total d\'enregistrements ignorés', + 'LBL_UNDO_LAST_IMPORT' => 'Annuler le dernier import', + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Derniers enregistrements imoportés', + 'LBL_IMPORT_MORE' => 'Importer plus d\'éléments', + 'LBL_FINISH_BUTTON_LABEL' => 'Terminer', + 'LBL_RESULT' => 'Resultats', + 'ERR_FILE_DOESNT_EXIST' => "Le fichier n\'existe pas", + 'ERR_CANT_OPEN_FILE' => "Ne peut être ouvert en lecture", + 'ERR_UNIMPORTED_RECORDS_IN_QUEUE' => 'Il existe des données non traités dans le processus d\'import', + 'ERR_FILE_READ_FAILED' => 'Echec de lecture du fichier', + 'LBL_IMPORT_SCHEDULED' => 'Import programmé', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Votre import a été programmé, vous recevrez un email une fois l\'import terminé.
+ Vérifier vos paramètres SMTP afin de recevoir correctement vos emails', + 'ERR_DETAILS_BELOW' => 'Détails ci-dessous', + 'LBL_ERROR' => 'Erreur', + 'LBL_OK_BUTTON_LABEL' => 'OK', + 'TOTAL_RECORDS' => 'Nombre d\'enregistrements', + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Nombre d\'enregistrements supprimés', + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Nombre d\'enregistrements fusionnés', + 'LBL_TOTAL_RECORDS' => 'Nombre total d\'enregistrements', + 'LBL_UNDO_RESULT' => 'Annler le résultat de l\'import', + 'LBL_LAST_IMPORTED_RECORDS' => 'Derniers enregistrements imoportés', + 'LBL_NO_ROWS_FOUND' => 'Aucune colonne disponible', + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'Il existe des données non traités dans le processus d\'import, vous empéchant d\'importer des données pour ce module.
+ Purger les données non importées pour relancer un nouvel import', + 'ERR_FAILED_TO_LOCK_MODULE' => 'Impossible de vérouiller ce module pour l\'import. Essayez plus tard', + + 'LBL_RUNNING' => 'En cours', + 'LBL_CLEAR_DATA' => 'Effacer les données', + 'ERR_MODULE_IMPORT_LOCKED' => 'Vous n\'êtes pas autorisé à importer pour ce module maintenant, un import est actuellement en cours pour ce module. Essayez plus tard', + 'LBL_MODULE_NAME' => 'Module', + 'LBL_USER_NAME' => 'Utilisateur', + 'LBL_LOCKED_TIME' => 'Temps bloqué', + 'LBL_CANCEL_IMPORT' => 'Annuler Import', + 'ERR_IMPORT_INTERRUPTED' => 'L\'import courant a été interrompu. Essayez plus tard.', + + 'LBL_INVALID_FILE' => 'Fichier invalide', + 'LBL_FILE_TYPE' => 'Type de fichier', + 'csv' => 'CSV', + 'vcf' => 'VCard', +); + +$mod_list_strings = array ( + 'contacts_import_fields' => array( + 'firstname' => 'Prénom', + 'lastname' => 'Nom', + 'salutationtype' => 'Salutation', + 'leadsource' => 'Origine', + 'birthday' => 'Date de naissance', + 'donotcall' => 'Ne pas appeler', + 'emailoptout' => 'Ne pas contacter par email', + 'account_id' => 'Nom compte', + 'title' => 'Fonction', + 'department' => 'Département', + 'homephone' => 'Téléphone (domicile)', + 'mobile' => 'Téléphone (mobile)', + 'phone' => 'Téléphone (bureau)', + 'otherphone' => 'Téléphone (alt.)', + 'fax' => 'Fax', + 'email' => 'Email', + 'otheremail' => 'Email (alt.)', + 'yahooid' => 'Yahoo ID', + 'assistant' => 'Assistant', + 'assistantphone' => 'Téléphone (assistant)', + 'mailingstreet' => 'Adresse', + 'mailingpobox' => 'Boite postale', + 'mailingcity' => 'Ville', + 'mailingstate' => 'Département', + 'mailingzip' => 'Code postal', + 'mailingcountry' => 'Pays', + 'otherstreet' => 'Adresse (alt.)', + 'otherpobox' => 'Boite postale (alt.)', + 'othercity' => 'Ville (alt.)', + 'otherstate' => 'Département (alt.)', + 'otherzip' => 'Code postal (alt.)', + 'othercountry' => 'Pays (alt.)', + 'description' => 'Description', + 'assigned_user_id' => 'Assigné à', + ), + 'accounts_import_fields' => array( + 'accountname' => 'Nom compte', + 'website' => 'Site Web', + 'industry' => 'Secteur', + 'accounttype' => 'Type', + 'tickersymbol' => 'Symbole boursier', + 'parent_name' => 'Filiale de', + 'employees' => 'Effectif', + 'ownership' => 'Propriétaire', + 'phone' => 'Téléphone', + 'fax' => 'Fax', + 'otherphone' => 'Téléphone (alt.)', + 'email1' => 'Email', + 'email2' => 'Email (alt.)', + 'rating' => 'Note', + 'siccode' => 'Code APE', + 'annual_revenue' => 'C.A. annuel', + 'bill_street' => 'Adresse (facturation)', + 'bill_pobox' => 'Boite postale (facturation)', + 'bill_city' => 'Ville (facturation)', + 'bill_state' => 'Département (facturation)', + 'bill_code' => 'Code postal (facturation)', + 'bill_country' => 'Pays (facturation)', + 'ship_street' => 'Adresse (livraison)', + 'ship_pobox' => 'Boite postale (livraison)', + 'ship_city' => 'Ville (livraison)', + 'ship_state' => 'Département (livraison)', + 'ship_code' => 'Code postal (livraison)', + 'ship_country' => 'Pays (livraison)', + 'description' => 'Description', + 'assigned_user_id' => 'Assigné à', + ), + 'potentials_import_fields' => array( + 'potentialname' => 'Nom affaire', + 'account_id' => 'Nom compte', + 'opportunity_type' => 'Type', + 'leadsource' => 'Origine', + 'amount' => 'Montant', + 'closingdate' => 'Date échéance', + 'nextstep' => 'Suivant', + 'sales_stage' => 'Phase de vente', + 'probability' => 'Probabilité', + 'description' => 'Description', + 'assigned_user_id' => 'Assigné à', + ), + 'leads_import_fields' => array( + 'salutationtype' => 'Salutation', + 'firstname' => 'Prénom', + 'phone' => 'Téléphone', + 'lastname' => 'Nom', + 'mobile' => 'Téléphone (mobile)', + 'company' => 'Société', + 'fax' => 'Fax', + 'designation' => 'Titre', + 'email' => 'Email', + 'leadsource' => 'Origine', + 'website' => 'Site Web', + 'industry' => 'Secteur', + 'leadstatus' => 'Statut', + 'annualrevenue' => 'Chiffre d\'affaire', + 'rating' => 'Evaluation', + 'licencekeystatus' => 'N° de licence', + 'noofemployees' => 'Effectif', + 'assigned_user_id' => 'Assigné à', + 'yahooid' => 'Yahoo ID', + 'lane' => 'Adresse', + 'pobox' => 'Boite postale', + 'code' => 'Code postal', + 'city' => 'Ville', + 'country' => 'Pays', + 'state' => 'Département', + 'description' => 'Description', + ), + 'products_import_fields' => array( + 'productname' => 'Nom du produit', + 'productcode' => 'Référence', + 'productcategory' => 'Catégorie', + 'manufacturer' => 'Fabriquant', + 'product_description' => 'Description', + 'qty_per_unit' => 'Quantité par unité', + 'unit_price' => 'Prix unitaire', + 'weight' => 'Poids', + 'pack_size' => 'Dimension', + 'start_date' => 'Date de mise en vente', + 'expiry_date' => 'Date de fin de vente', + 'cost_factor' => 'Cost Factor', + 'commissionmethod' => 'Commission', + 'discontinued' => 'Arreté', + 'commissionrate' => 'Taux de commission', + 'sales_start_date' => 'Date de début de support', + 'sales_end_date' => 'Date de fin de support', + 'usageunit' => 'Usage Unit', + 'serialno' => 'N° série', + 'currency' => 'Monnaie', + 'reorderlevel' => 'Niveau de réapprovisionnement', + 'website' => 'Site Web', + 'taxclass' => 'Classe de TVA', + 'mfr_part_no' => 'Part n°', + 'vendor_part_no' => 'Ref fournisseur', + 'qtyinstock' => 'Quantité en stock', + 'productsheet' => 'Fiche produit', + 'qtyindemand' => 'Quantité en demande', + 'glacct' => 'Code comptable', + 'assigned_user_id' => 'Assigné à', + ), + 'helpdesk_import_fields' => array( + 'ticketid' => 'Id Ticket', + 'priority' => 'Priorité', + 'severity' => 'Gravité', + 'status' => 'Statut', + 'category' => 'Categorie', + 'title' => 'Titre', + 'description' => 'Description', + 'solution' => 'Solution', + ), + 'vendors_import_fields' => array( + 'vendorid' => 'Fournisseur n°', + 'vendorname' => 'Fournisseur', + 'phone' => 'Téléphone', + 'email' => 'Email', + 'website' => 'Site Web', + 'category' => 'Categorie', + 'street' => 'Rue', + 'city' => 'Ville', + 'state' => 'Région', + 'pobox' => 'Boite postale', + 'postalcode' => 'Code postal', + 'country' => 'Pays', + 'description' => 'Description', + ), +); +?> \ No newline at end of file diff --git a/modules/Import/language/hu_hu.lang.php b/modules/Import/language/hu_hu.lang.php new file mode 100644 index 0000000..bb91974 --- /dev/null +++ b/modules/Import/language/hu_hu.lang.php @@ -0,0 +1,236 @@ + 'Importálás', + 'LBL_IMPORT_STEP_1' => '1. lépés', + 'LBL_IMPORT_STEP_2' => '2. lépés', + 'LBL_IMPORT_STEP_3' => '3. lépés', + 'LBL_IMPORT_STEP_4' => '4. lépés', + 'LBL_IMPORT_STEP_1_DESCRIPTION' => 'Válaszd ki a fájlt', + 'LBL_IMPORT_STEP_2_DESCRIPTION' => 'Határozd meg a formátumot', + 'LBL_IMPORT_STEP_3_DESCRIPTION' => 'Rekord duplikáció kezelése', + 'LBL_IMPORT_STEP_4_DESCRIPTION' => 'Rendeld össze az oszlopokat a Modul mezőkkel', + 'Skip' => 'Kihagy', + 'Overwrite' => 'Felülír', + 'Merge' => 'Összefűz', + 'LBL_IMPORT_SUPPORTED_FILE_TYPES' => 'Támogatott fájltípusok: .CSV, .VCF', + 'LBL_IMPORT_STEP_3_DESCRIPTION_DETAILED' => 'Engedélyezd ezt a lehetőséget és add meg a duplikáció szűrés feltételeit', + 'LBL_CHARACTER_ENCODING' => 'Karakter kódolás', + 'LBL_DELIMITER' => 'Mezőelválasztó:', + 'LBL_HAS_HEADER' => 'Van fejléc', + 'LBL_SPECIFY_MERGE_TYPE' => 'Válaszd ki, hogyan kezeljük a duplikált rekordokat', + 'LBL_SELECT_MERGE_FIELDS' => 'Válaszd ki azokat a mezőket, amiknek egyezniük kell, hogy a rekord duplikált legyen', + 'LBL_AVAILABLE_FIELDS' => 'Elérhető mezők', + 'LBL_SELECTED_FIELDS' => 'Mezők, amiknek egyezniük kell', + 'UTF-8' => 'UTF-8', + 'ISO-8859-1' => 'ISO-8859-1', + 'comma' => ', (vessző)', + 'semicolon' => '; (pontos vessző)', + 'LBL_USE_SAVED_MAPPING' => 'Elmentett hozzárendelés használata :', + 'LBL_SAVE_AS_CUSTOM_MAPPING' => 'Mentse el, mint egyedi hozzárendelést', + 'LBL_FILE_COLUMN_HEADER' => 'Fejléc', + 'LBL_ROW_1' => '1. sor', + 'LBL_CRM_FIELDS' => 'CRM mezők', + 'LBL_DEFAULT_VALUE' => 'Alapértelmezett érték', + 'LBL_IMPORT_BUTTON_LABEL' => 'Importálás', + 'LBL_TOTAL_RECORDS_IMPORTED' => 'Importált rekordok száma összesen ', + 'LBL_TOTAL_RECORDS_FAILED' => 'Hibásnak bizonyult rekordok száma összesen ', + 'LBL_NUMBER_OF_RECORDS_CREATED' => 'Létrehozott rekordok száma összesen ', + 'LBL_NUMBER_OF_RECORDS_UPDATED' => 'Módosított rekordok száma összesen ', + 'LBL_NUMBER_OF_RECORDS_SKIPPED' => 'A feldolgozás során átlépett rekordok száma összesen ', + 'LBL_UNDO_LAST_IMPORT' => 'Utolsó importálás visszavonása', + 'LBL_VIEW_LAST_IMPORTED_RECORDS' => 'Utoljára importált rekordok', + 'LBL_IMPORT_MORE' => 'További importálás', + 'LBL_FINISH_BUTTON_LABEL' => 'Befejezés', + 'LBL_RESULT' => 'Eredmény', + 'ERR_FILE_DOESNT_EXIST' => 'A fájl nem létezik', + 'ERR_CANT_OPEN_FILE' => 'A fájl nem nyitható meg olvasásra', + 'ERR_UNIMPORTED_RECORDS_IN_QUEUE' => 'Még fel nem dolgozott rekordok vannak a várósorban', + 'ERR_FILE_READ_FAILED' => 'A fájl olvasás nem sikerült', + 'LBL_IMPORT_SCHEDULED' => 'Időzített importálás', + 'LBL_SCHEDULED_IMPORT_DETAILS' => 'Az importálást időzítettük neked, és kapsz majd egy e-mailt, ha befejeződött.
Ellenőrizd, hogy a kimenő SMTP szerver és az e-mail címed be van-e helyesen állítva a levélküldéshez.', + 'ERR_DETAILS_BELOW' => 'Részletek listázása', + 'LBL_ERROR' => 'Hiba:', + 'LBL_OK_BUTTON_LABEL' => 'OK', + 'TOTAL_RECORDS' => 'Rekordok száma összesen', + 'LBL_NUMBER_OF_RECORDS_DELETED' => 'Törölt rekordok száma összesen ', + 'LBL_NUMBER_OF_RECORDS_MERGED' => 'Összefűzött rekordok száma összesen ', + 'LBL_TOTAL_RECORDS' => 'Rekordok száma összesen ', + 'LBL_UNDO_RESULT' => 'Utolsó import visszacsinálása', + 'LBL_LAST_IMPORTED_RECORDS' => 'Utoljára importált rekordok', + 'LBL_NO_ROWS_FOUND' => 'Nem található egyetlen adatsor sem', + 'ERR_UNIMPORTED_RECORDS_EXIST' => 'Még vannak a várósorodban fel nem dolgozott rekordok, amelyek megakadályozzák, hogy további adatokat importálhass.
Töröld az adatokat a takarításhoz, és egy új importálást kezdeményezz.', + 'ERR_FAILED_TO_LOCK_MODULE' => 'Nem sikerült lezárni a modult az importáláshoz. Próbáld meg később újra.', + 'LBL_RUNNING' => 'Működik', + 'LBL_CLEAR_DATA' => 'Adatok törlése', + 'ERR_MODULE_IMPORT_LOCKED' => 'Nem importálhatsz ebbe a modulba most, mivel egy másik import még folyamatban van. Próbáld meg később.', + 'LBL_MODULE_NAME' => 'Importálás', + 'LBL_USER_NAME' => 'Felhasználó', + 'LBL_LOCKED_TIME' => 'Lezárás ideje', + 'LBL_CANCEL_IMPORT' => 'Importálás visszavonása', + 'ERR_IMPORT_INTERRUPTED' => 'Ez az importálás megszakadt. Próbáld meg később.', + 'LBL_INVALID_FILE' => 'Hibás fájl', + 'LBL_FILE_TYPE' => 'Fájl típus', + 'csv' => 'CSV', + 'vcf' => 'VCard', + 'LBL_IMPORT_MODULE_NO_DIRECTORY' => 'A könyvtár ', + 'LBL_IMPORT_MODULE_NO_DIRECTORY_END' => ' nem létezik vagy írásvédett', + 'LBL_IMPORT_MODULE_ERROR_NO_UPLOAD' => 'Nem sikerült feltölteni a fájlt, próbáld meg újra', + 'LBL_IMPORT_MODULE_ERROR_LARGE_FILE' => 'A fájl túl nagy. Max:', + 'LBL_IMPORT_MODULE_ERROR_LARGE_FILE_END' => 'Bájt. Növeld meg a $upload_maxsize értékét a config.inc.php fájlban.', + 'LBL_TRY_AGAIN' => 'Próbáld újra', + 'ERR_MULTIPLE' => 'Több oszlopot is ugyanazzal a mezőnévvel kötöttél össze.', + 'ERR_MISSING_REQUIRED_FIELDS' => 'Kötelező mező hiányzik:', + 'ERR_SELECT_FULL_NAME' => 'Nem választhatod ki a Teljes név mezőt, ha a Keresztnév és a Vezetéknév mezőt már kiválasztottad.', + 'ERR_SELECT_FILE' => 'Válasszon ki egy fájlt a feltöltéshez.', + 'LBL_SELECT_FILE' => 'Fájl kiválasztása:', + 'LBL_CUSTOM' => 'Egyedi', + 'LBL_DONT_MAP' => '-- Ezt a mezőt ne feleltesse meg --', + 'LBL_STEP_1_TITLE' => 'Válaszd ki a .CSV fájlt', + 'LBL_WHAT_IS' => 'Válaszd ki az adatok forrását a következőkből:', + 'LBL_MICROSOFT_OUTLOOK' => 'Microsoft Outlook', + 'LBL_ACT' => 'Act!', + 'LBL_SALESFORCE' => 'Salesforce.com', + 'LBL_MY_SAVED' => 'Elmentett adatforrásaim:', + 'LBL_PUBLISH' => 'közzétesz', + 'LBL_DELETE' => 'Töröl', + 'LBL_PUBLISHED_SOURCES' => 'Közzétett források:', + 'LBL_UNPUBLISH' => 'visszavon', + 'LBL_NEXT' => 'Következő', + 'LBL_BACK' => 'Vissza', + 'LBL_STEP_2_TITLE' => '2. lépés a 4-ből: Töltsd fel a beolvasandó fájlt', + 'LBL_NUM_1' => '1.', + 'LBL_NUM_2' => '2.', + 'LBL_NUM_3' => '3.', + 'LBL_NUM_4' => '4.', + 'LBL_NUM_5' => '5.', + 'LBL_NUM_6' => '6.', + 'LBL_NUM_7' => '7.', + 'LBL_NUM_8' => '8.', + 'LBL_NUM_9' => '9.', + 'LBL_NUM_10' => '10.', + 'LBL_NUM_11' => '11.', + 'LBL_NUM_12' => '12.', + 'LBL_NOW_CHOOSE' => 'Most válaszd ki azt a fájlt beolvasásra:', + 'LBL_IMPORT_OUTLOOK_TITLE' => 'Microsoft Outlook 98 és 2000 (illetve az újabb verziói a programnak) ki tudja menteni az adatokat egy Comma Separated Values (CSV = Vesszővel Elválasztott Értékek) formátumú fájlba, amit be tudunk olvasni ebbe a rendszerbe. Hogy kimentsd az adataidat az Outlook-ból, kövesd az alábbi lépéseket:', + 'LBL_OUTLOOK_NUM_1' => 'Outlook indítása', + 'LBL_OUTLOOK_NUM_2' => 'Válaszd a Fájl menüt, és azon belül az Import és Export ... menüpontot', + 'LBL_OUTLOOK_NUM_3' => 'Válaszd az Export fájlba és kattints a Következő gombra', + 'LBL_OUTLOOK_NUM_4' => 'Válaszd a CSV (Windows) formátumot és kattints a Következő gombra.
Megjegyzés: Az Outlook program kérheti, hogy telepítsd az export komponenst', + 'LBL_OUTLOOK_NUM_5' => 'Válaszd a Kapcsolatok mappát és kattints a Következő gombra. Több Kapcsolatok mappából is választhatsz, ha a kapcsolataid több mappában voltak tárolva.', + 'LBL_OUTLOOK_NUM_6' => 'Válaszd ki a fájl nevet és kattints a Következő gombra', + 'LBL_OUTLOOK_NUM_7' => 'Kattints a Befejezés-re', + 'LBL_IMPORT_ACT_TITLE' => 'Act! is tudja exportálni az adatokat Vesszővel Elválasztott Értékek (Comma Separated Values) formátumba, amelyből az adatok betölthetők ebbe a rendszerbe. Kövesd az alábbi lépéseket az adatok kimentéséhez az Act! programból:', + 'LBL_ACT_NUM_1' => 'Lépj be az ACT!-ba', + 'LBL_ACT_NUM_2' => 'Válaszd a Fájl menüt, és azon belül a Data Exchange menüpontot, majd az Export... menüpontot', + 'LBL_ACT_NUM_3' => 'Válaszd fájl típusnak a Text-Delimited formátumot', + 'LBL_ACT_NUM_4' => 'Válassz egy fájlnevet és mentési könyvtárt a kimentendő adatoknak, és kattints a Next gombra', + 'LBL_ACT_NUM_5' => 'Válaszd a Contacts records only lehetőséget', + 'LBL_ACT_NUM_6' => 'Kattints az Options... gombra', + 'LBL_ACT_NUM_7' => 'Válaszd a Comma-t mint mező elválasztó karaktert', + 'LBL_ACT_NUM_8' => 'Jelöld be a Yes, export field names jelölő dobozt, és kattints az OK gombra', + 'LBL_ACT_NUM_9' => 'Kattints a Next gombra', + 'LBL_ACT_NUM_10' => 'Válaszd az All Records lehetőséget, majd kattints a Finish gombra', + 'LBL_IMPORT_SF_TITLE' => 'A Salesforce.com is tudja exportálni az adatokat Vesszővel Elválasztott Értékek (Comma Separated Values) formátumba, amelyből az adatok betölthetők ebbe a rendszerbe. Kövesd az alábbi lépéseket az adatok kimentéséhez a Salesforce.com programból:', + 'LBL_SF_NUM_1' => 'Nyisd meg a böngésződet és menj a http://www.salesforce.com oldalra, majd lépj be az e-mail címeddel és a jelszavaddal.', + 'LBL_SF_NUM_2' => 'Kattints a Reports fülre a felső menüben', + 'LBL_SF_NUM_3' => 'Cégek exportálásához kattins az Active Accounts linkre, Kapcsolatok exportálásához pedig kattints a Mailing List linkre', + 'LBL_SF_NUM_4' => '1. lépés: Jelentés típusának kiválasztása, válaszd a Tabular Report-t majd kattints a Next gombra', + 'LBL_SF_NUM_5' => '2. lépés: Jelentés oszlopainak kiválasztása, válaszd ki az oszlopokat, amiket exportálni akarsz, majd kattints a Next gombra', + 'LBL_SF_NUM_6' => '3. lépés: Összegzendő információk kiválasztása, csak kattints a Next gombra', + 'LBL_SF_NUM_7' => '4. lépés: Jelentés oszlopok sorba rendezése, csak kattints a Next gombra', + 'LBL_SF_NUM_8' => '5. lépés: Jelentés szempontjainak kiválasztása, a Start Date kapcsán válassz egy elegendően régi dátumot, hogy minden cég bele kerülhessen. A Cégek egy részét is exportálhatod, ha több feltételt adsz meg. Amikor kész vagy, kattints a Run Report gombra.', + 'LBL_SF_NUM_9' => 'A report will be generated, and the page should display Report Generation Status: Complete. Now click Export to Excel', + 'LBL_SF_NUM_10' => 'On Export Report:, for Export File Format:, choose Comma Delimited .csv. Click Export.', + 'LBL_SF_NUM_11' => 'Egy párbeszéd ablak ugrik fel, amin keresztül el tudod menteni az export fájlt a számítógépedre.', + 'LBL_IMPORT_CUSTOM_TITLE' => 'Sok alkalmazás támogatja az adatok exportálását vesszővel elválasztott értékeket tartalmazó szöveg fájlba (.csv). A legtöbb alkalmazás esetében követheted az alábbi lépéseket:', + 'LBL_CUSTOM_NUM_1' => 'Lépj be az alkalmazásba és nyisd meg az adatfájlt', + 'LBL_CUSTOM_NUM_2' => 'Válaszd a Mentés másként... vagy Exportálás... menüpontot', + 'LBL_CUSTOM_NUM_3' => 'Fájl mentése CSV vagyis Vesszővel Elválasztott Értékek (Comma Separated Values) formátumba.', + 'LBL_STEP_3_TITLE' => '3. lépés a 4-ből: Mezők jóváhagyása és Import', + 'LBL_STEP_1' => '1. lépés a 3-ból: ', + 'LBL_STEP_1_TEXT' => ' vtiger CRM támogatja a CSV (Vesszővel Elválasztott Értékek) fájlokból történő importálást. Az importálás megkezdéséhez böngésszél a .csv fájl után, majd nyomd meg a Következő gombot a folytatáshoz.', + 'LBL_SELECT_FIELDS_TO_MAP' => 'Az alábbi listából válaszd ki, hogy az importálandó fájl milyen mezőit milyen vtiger mezőkkel rendeled össze. Amikor kész vagy a leképezéssel kattints az Importálás most gombra.', + 'LBL_DATABASE_FIELD' => 'Adatbázis mező', + 'LBL_HEADER_ROW' => 'Fejléc sor', + 'LBL_ROW' => 'Sor', + 'LBL_SAVE_AS_CUSTOM' => 'Mentés egyedi Leképezésként :', + 'LBL_CONTACTS_NOTE_1' => 'A Vezetéknév vagy Keresztnév mezők valamelyikét hozzá kell rendelni.', + 'LBL_CONTACTS_NOTE_2' => 'Ha a Teljes név szerepel a mezőhozzárendelésben, akkor a Vezetéknév és Keresztnév mezőket figyelmen kívül hagyjuk.', + 'LBL_CONTACTS_NOTE_3' => 'Ha a Teljes név szerepel a mezőhozzárendelésben, akkor a Teljes név mező tartalma a Vezetéknév és Keresztnév mezőkbe automatikusan szét lesz osztva a betöltés során.', + 'LBL_CONTACTS_NOTE_4' => 'A cím mező 2. és 3. sorában szereplő adatokat hozzáadtuk az Utca, házszám mező végéhez, amikor beolvastuk őket az adatbázisba.', + 'LBL_ACCOUNTS_NOTE_1' => 'A Cégnév mezőhöz kell kapcsolni beolvasandó adatot.', + 'LBL_ACCOUNTS_NOTE_2' => 'A cím mező 2. és 3. sorában szereplő adatokat hozzáadtuk az Utca, házszám mező végéhez, amikor beolvastuk őket az adatbázisba.', + 'LBL_POTENTIALS_NOTE_1' => 'Lehetőség neve, Cégnév, Lezárás dátuma, és az Értékesítési fázis kötelező mezők.', + 'LBL_OPPORTUNITIES_NOTE_1' => 'Lehetőség neve, Cégnév, Lezárás dátuma, és az Értékesítési fázis kötelező mezők.', + 'LBL_LEADS_NOTE_1' => 'A Vezetéknév mezőhöz kell kapcsolni beolvasandó adatot.', + 'LBL_LEADS_NOTE_2' => 'A Cégnév mezőhöz kell kapcsolni beolvasandó adatot.', + 'LBL_IMPORT_NOW' => 'Importálás most', + 'LBL_' => '', + 'LBL_CANNOT_OPEN' => 'Az importálandó fájl nem nyitható meg olvasásra', + 'LBL_NOT_SAME_NUMBER' => 'A mezők száma különböző volt az egyes sorokban az iportálandó fájlban', + 'LBL_NO_LINES' => 'Egyetlen sor sem volt az importálandó fájlban', + 'LBL_FILE_ALREADY_BEEN_OR' => 'Az import fájlt már feldolgoztuk vagy nem létezik', + 'LBL_SUCCESS' => 'Sikeres! ', + 'LBL_SUCCESSFULLY' => 'Sikeresen importálva', + 'LBL_LAST_IMPORT_UNDONE' => 'Az utolsó importálást visszavontuk.', + 'LBL_NO_IMPORT_TO_UNDO' => 'Nincs visszavonható importálás.', + 'LBL_FAIL' => 'Hiba:', + 'LBL_RECORDS_SKIPPED' => ' rekordot kihagytunk, mivel egy vagy több kötelező mező hiányzott', + 'LBL_IDS_EXISTED_OR_LONGER' => ' rekordot kihagytunk, mivel az azonosítója már létezett, vagy 36 karakternél hosszabb volt', + 'LBL_RESULTS' => 'Eredmények', + 'LBL_FINISHED' => 'Befejeződött', + 'LBL_SUCCESS_1' => 'Sikeresen Importált/Frissített rekordok száma : ', + 'LBL_SKIPPED_1' => 'Egy vagy több kötelező mező hiánya miatt kihagyott rekordok száma : ', + 'LBL_PRODUCTS_NOTE_1' => 'Termék nevét hozzá kell rendelned', + 'LBL_PRODUCTS_NOTE_2' => 'Importálás előtt győződj meg arról, hogy nincs-e duplán leképzve egy mező a hozzárendelésben', + 'LBL_FILE_LOCATION' => 'Fájl helye :', + 'LBL_STEP_2_3' => '2. lépés a 3-ból :', + 'LBL_LIST_MAPPING' => 'Lista és Hozzárendelések', + 'LBL_STEP_2_MSG' => 'A következő táblázatok tartalmazzák az importáltakat', + 'LBL_STEP_2_MSG1' => 'és más adatokat.', + 'LBL_STEP_2_TXT' => 'A mezők hozzárendeléséhez válaszd ki a megfelelő kapcsolódásokat', + 'LBL_MAPPING' => 'Hozzárendelés', + 'LBL_HEADERS' => 'Fejléc :', + 'LBL_ERROR_MULTIPLE' => 'Ugyanazt a mezőt duplán rendelted hozzá. Ellenőrizd a hozzárendelt mezőket.', + 'LBL_STEP_3_3' => '3. lépés a 3-ból : ', + 'LBL_MAPPING_RESULTS' => 'Leképezés eredménye', + 'LBL_LAST_IMPORTED' => 'Utoljára importálva', + 'PLEASE_CHECK_MAPPING' => '\' több mint egyszer is mapped more than once. Please check the mapping.', + 'MAP_MANDATORY_FIELD' => 'A kötelező mezőkhöz szükséges beolvasandó adatot kapcsolnod.', + 'ENTER_SAVEMAP_NAME' => 'Add meg a Leképezés mentési nevét', + 'to' => 'to', + 'of' => 'of', + 'are_imported_succesfully' => 'sikeresen importálva.', + 'LBL_LAST_IMPORT' => 'Utolsóként importált', + 'Select_Criteria_For_Duplicate' => 'Válaszd ki a szempontot a rekord duplikáció kezelésére', + 'Manual_Merging' => 'Kézi összefűzés', + 'Auto_Merging' => 'Automatikus összefűzés', + 'Ignore_Duplicate' => 'Hagyd figyelmen kívül a duplikált import rekordokat', + 'Overwrite_Duplicate' => 'Írd felül a duplikált import rekordokat', + 'Duplicate_Records_Skipped_Info' => 'Kihagyott rekordok száma - duplikáció : ', + 'Duplicate_Records_Overwrite_Info' => 'Felülírt rekordok száma - duplikáció : ', + 'LBL_STEP_4_4' => '4. a 4 lépésből: ', + 'LBL_STEP_3_4' => '3. a 4 lépésből: ', + 'LBL_STEP_2_4' => '2. a 4 lépésből: ', + 'LBL_STEP_1_4' => '1. a 4 lépésből: ', + 'LBL_FORMAT' => 'Formátum:', + 'LBL_MAX_FILE_SIZE' => ' a maximális megengedett fájlméret', + 'LBL_MERGE_FIELDS_DUPLICATE' => 'Mezők összefűzése a beolvasott rekordok duplikálása végett', + 'Customer Portal Login Details' => 'Ügyfélszolgálati portál belépési adatok' +); +?> \ No newline at end of file diff --git a/modules/Import/language/nl_nl.lang.php b/modules/Import/language/nl_nl.lang.php new file mode 100644 index 0000000..cb17cfb --- /dev/null +++ b/modules/Import/language/nl_nl.lang.php @@ -0,0 +1,390 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.4 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Import/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_IMPORT_MODULE_NO_DIRECTORY'=>'De bestanden index ', +'LBL_IMPORT_MODULE_NO_DIRECTORY_END'=>' Deze bestaat niet of is niet overschrijfbaar', +'LBL_IMPORT_MODULE_ERROR_NO_UPLOAD'=>'Het bestand is niet succesvol verstuurd, probeer nog een keer', +'LBL_IMPORT_MODULE_ERROR_LARGE_FILE'=>'Bestand is te groot. Max:', +'LBL_IMPORT_MODULE_ERROR_LARGE_FILE_END'=>'Bytes. Verander $upload_maxsize in config.php', +'LBL_MODULE_NAME'=>'Importeren', +'LBL_TRY_AGAIN'=>'Probeer nog een keer', +'LBL_ERROR'=>'Foutmelding:', +'ERR_MULTIPLE'=>'Meerdere Kolommen zijn benoemd met dezelfde naam.', +'ERR_MISSING_REQUIRED_FIELDS'=>'Verplichte velden:', +'ERR_SELECT_FULL_NAME'=>'U kunt geen volledige naam kiezen als voornaam en achternaam geselecteerd zijn.', +'ERR_SELECT_FILE'=>'Selecteer een bestand om te versturen.', +'LBL_SELECT_FILE'=>'Selecteer een bestand:', +'LBL_CUSTOM'=>'Op maat', +'LBL_DONT_MAP'=>'-- Selecteer dit veld niet --', +'LBL_STEP_1_TITLE'=>'Stap 1 of 4: Selecteer data bron', +'LBL_WHAT_IS'=>'Selecteer een data bron van de hierna genoemde:', +'LBL_MICROSOFT_OUTLOOK'=>'Microsoft Outlook', +'LBL_ACT'=>'ACT!', +'LBL_SALESFORCE'=>'Salesforce.com', +'LBL_MY_SAVED'=>'Mijn bewaarde bronnen:', +'LBL_PUBLISH'=>'Publiceer', +'LBL_DELETE'=>'Verwijder', +'LBL_PUBLISHED_SOURCES'=>'Gepubliseerde bronnen:', +'LBL_UNPUBLISH'=>'Niet publiceren', +'LBL_NEXT'=>'Volgende', +'LBL_BACK'=>'Terug', +'LBL_STEP_2_TITLE'=>'Stap 2 of 4: Verstuur export bestand', +'LBL_HAS_HEADER'=>'Heeft koptekst', + +'LBL_NUM_1'=>'1.', +'LBL_NUM_2'=>'2.', +'LBL_NUM_3'=>'3.', +'LBL_NUM_4'=>'4.', +'LBL_NUM_5'=>'5.', +'LBL_NUM_6'=>'6.', +'LBL_NUM_7'=>'7.', +'LBL_NUM_8'=>'8.', +'LBL_NUM_9'=>'9.', +'LBL_NUM_10'=>'10.', +'LBL_NUM_11'=>'11.', +'LBL_NUM_12'=>'12.', +'LBL_NOW_CHOOSE'=>'Nu bestand kiezen om te importeren:', +'LBL_IMPORT_OUTLOOK_TITLE'=>'Microsoft Outlook 2000, 2003 en 2007 kunnen data exporteren in een komma gescheiden velden formaat om data te importeren naar het systeem. Om de data vanuit Outlook te exporteren, volg de volgende stappen:', +'LBL_OUTLOOK_NUM_1'=>'Start Outlook', +'LBL_OUTLOOK_NUM_2'=>'Selecteer de bestand menu, dan de importeer en exporteer ... menu optie', +'LBL_OUTLOOK_NUM_3'=>'Kies exporteer naar een bestand en klik volgende', +'LBL_OUTLOOK_NUM_4'=>'Kies komma gedeelde velden (Windows) en klik volgende.
Notitie: U kunt eraan herinnerd worden om de export componenten te installeren', +'LBL_OUTLOOK_NUM_5'=>'Selecteer de contacten mappen en klik volgende. U kunt meerdere contact mappen selecteren als uw contacten in meerder mappen bewaard worden', +'LBL_OUTLOOK_NUM_6'=>'Kies een bestandsnaam en klik volgende', +'LBL_OUTLOOK_NUM_7'=>'Klik Einde', +'LBL_IMPORT_ACT_TITLE'=>'Besluit! kan data exporteren in de komma gedeelde velden formaat wat gebruikt kan worden om data te importeren in het systeem. Om de data van besluit te exporteren, volg de benedenstaande stappen:', +'LBL_ACT_NUM_1'=>'Aanvatten Besluit!', +'LBL_ACT_NUM_2'=>'Selecteer de File menu, de data uitwisselen menu optie, dan de menu optie', +'LBL_ACT_NUM_3'=>'Selecteer bestandstype tekst-begrenzen', +'LBL_ACT_NUM_4'=>'Kies een bestandsnaam en locatie voor de ge�xporteerde data en klik volgende', +'LBL_ACT_NUM_5'=>'Selecteer alleen contact records', +'LBL_ACT_NUM_6'=>'Klik de opties... knop', +'LBL_ACT_NUM_7'=>'Selecteer komma als gescheiden veld karakter', +'LBL_ACT_NUM_8'=>'Markeer de ja, exporteer veld namen markeer en klik okee', +'LBL_ACT_NUM_9'=>'Klik volgende', +'LBL_ACT_NUM_10'=>'Selecteer alle records dan klikken einde', + +'LBL_IMPORT_SF_TITLE'=>'salesforce.com kan data exporteren in de komma gescheiden waarden formaat dat gebruikt kan worden om data te importeren in het systeem. Om uw data van salesforce.com te importeren, volg de benedenstaande stappen:', +'LBL_SF_NUM_1'=>'Open uw browser, en ga naar http://www.salesforce.com, en log in met uw e-mailadres en wachtwoord', +'LBL_SF_NUM_2'=>'Klik op de Rapporten knop bovenaan het menu', +'LBL_SF_NUM_3'=>'Exporteer accounts: klik op de activeer accounts link
exporteer contacten: klik op de mailinglijst link', +'LBL_SF_NUM_4'=>'Op stap 1: Selecteer uw rapport type, selecteer tabelvorm rapportklik volgende', +'LBL_SF_NUM_5'=>'Op stap 2: Selecteer de rapport kolommen, kies de kolommen die u wilt exporteren en klik volgende', +'LBL_SF_NUM_6'=>'Op stap 3: Selecteer de informatie om samen te vatten, klik volgende', +'LBL_SF_NUM_7'=>'Op stap 4: Bestel de rapport kolommen, klik volgende', +'LBL_SF_NUM_8'=>'Op stap 5: Selecteer uw rapport criteria, onder begindatum, kies een datum ver genoeg in het verleden om al uw accounts toe te voegen. U kunt ook een ondergroep van accounts exporteren als u meer geavenceerde criteria gebruikt. Wanneer u klaar bent, klik rapport draaien', +'LBL_SF_NUM_9'=>'Een rapport wordt gegenereerd, en u krijgt de pagina te zien rapport ontwikkeling status: compleet. nu klikken exporteer naar Excel', +'LBL_SF_NUM_10'=>'Op exporteer rapport:, voor exporteer bestandsformaat:, kies komma begrenst .csv. klik exporteer.', +'LBL_SF_NUM_11'=>'Een dialoog zal zichtbaar worden om het ge�xporteerde bestand te bewaren naar uw computer.', +'LBL_IMPORT_CUSTOM_TITLE'=>'Veel applicaties ondersteunen een gegevensexport naar eenkomma begrenst tekst bestand (.csv). Over het algemeen volgen de meeste applicaties deze algemene stappen:', +'LBL_CUSTOM_NUM_1'=>'Lanceer de applicatie en open het data bestand', +'LBL_CUSTOM_NUM_2'=>'Selecteer de bewaar als... of exporteer... menu opties', +'LBL_CUSTOM_NUM_3'=>'Bewaar het bestand in een CSV of komma gescheiden waarden formaat', + +'LBL_STEP_3_TITLE'=>'Stap 3 van 4: bevestig veld en import', +'LBL_STEP_1'=>'Stap 1 van 3 : ', +'LBL_STEP_1_TITLE'=>'Selecteer het .CSV bestand', +'LBL_STEP_1_TEXT'=> ' vTiger CRM ondersteunt records van .csv ( komma gescheiden waarden ) bestanden. Om met de import te beginnen, browse om het .CSV bestand te localiseren en klik op de volgende knop om door te gaan.', + +'LBL_SELECT_FIELDS_TO_MAP'=>'In de benedenstaande lijst, selecteer de velden in uw import bestand die in elk veld van het systeem geimporteerd moeten worden. Als u klaar bent, klik importeer nu', + +'LBL_DATABASE_FIELD'=>'Database veld', +'LBL_HEADER_ROW'=>'Toprij', +'LBL_ROW'=>'Rij', +'LBL_SAVE_AS_CUSTOM'=>'Bewaar als standaardmapping :', +'LBL_CONTACTS_NOTE_1'=>'Of achternaam of volledige naam moeten worden gekoppeld.', +'LBL_CONTACTS_NOTE_2'=>'Als de volledige naam is gekoppeld, worden de voornaam en achternaam genegeerd.', +'LBL_CONTACTS_NOTE_3'=>'Als de volledige naam is gekoppeld, zal de data van de volledige naam opgesplitst worden in voornaam en achternaam en in de database gezet worden.', +'LBL_CONTACTS_NOTE_4'=>'Velden die eindigen in adres straat 2 en adres straat 3 zijn aan elkaar geschakeld samen met het hoofdadres veld wanneer deze is ingegeven in de database.', +'LBL_ACCOUNTS_NOTE_1'=>'Accountnaam moet gekoppeld zijn.', +'LBL_ACCOUNTS_NOTE_2'=>'Velden in adres 2 en adres 3 worden samengevoegd in het hoofdadres wanneer men deze toevoegd in de database.', +'LBL_POTENTIALS_NOTE_1'=>'Naam verkoopkans, accountnaam, sluitingsdatum, en verkoop stadium zijn verplichte velden.', +'LBL_OPPORTUNITIES_NOTE_1'=>'Naam verkoopkans, accountnaam, sluitingsdatum, en verkoop stadium zijn verplichte velden.', +'LBL_LEADS_NOTE_1'=>'Achternaam moet gekoppeld zijn.', +'LBL_LEADS_NOTE_2'=>'Bedrijfsnaam moet gekoppeld zijn.', +'LBL_IMPORT_NOW'=>'Importeer nu', +'LBL_'=>'', +'LBL_CANNOT_OPEN'=>'Kan het geimporteerde bestand niet openen om te lezen', +'LBL_NOT_SAME_NUMBER'=>'Er zijn niet dezelfde aantal velden per regel in uw bestand', +'LBL_NO_LINES'=>'Er zijn geen regels in uw geimporteerde bestand', +'LBL_FILE_ALREADY_BEEN_OR'=>'Het geimporteerde bestand is reeds verwerkt of bestaat niet', +'LBL_SUCCESS'=>'Succes! ', +'LBL_SUCCESSFULLY'=>'Importeren succesvol', +'LBL_LAST_IMPORT_UNDONE'=>'Uw laatste import is niet gelukt', +'LBL_NO_IMPORT_TO_UNDO'=>'Geen import om te verwerken.', +'LBL_FAIL'=>'Mislukt:', +'LBL_RECORDS_SKIPPED'=>'Records overgeslagen omdat een of meer velden niet aanwezig zijn', +'LBL_IDS_EXISTED_OR_LONGER'=>'Records overgeslagen omdat de id\'s reeds bestaan of langer zijn dan 36 karakters', +'LBL_RESULTS'=>'Resultaten', +'LBL_IMPORT_MORE'=>'Importeer meer', +'LBL_FINISHED'=>'Klaar', +'LBL_UNDO_LAST_IMPORT'=>'Annuleer laatste import', + +'LBL_SUCCESS_1' => 'Aantal records succesvol geimporteerd : ', +'LBL_SKIPPED_1' => 'Aantal records overgeslagen aangezien 1 of meer verplichte velden missen : ', + +//Added for patch2 - Products Import Notes +'LBL_PRODUCTS_NOTE_1'=>'Productnaam moet gekoppeld zijn', +'LBL_PRODUCTS_NOTE_2'=>'Voor het importeren nakijken of een enkele kolom twee keer gekoppeld is. ', + +//Added for version 5 +'LBL_FILE_LOCATION'=>'Bestandslocatie :', +'LBL_STEP_2_3'=>'Stap 2 of 3 :', +'LBL_LIST_MAPPING'=>'Lijst & koppelen', +'LBL_STEP_2_MSG'=>'De volgende tabellen tonen de ge�mporteerde gegevens', +'LBL_STEP_2_MSG1'=>'en andere details.', +'LBL_STEP_2_TXT'=>'Om de velden te koppelen, selecteer het corresponderende van elk in combo boxes" ', +'LBL_USE_SAVED_MAPPING'=>'Gebruik al eerder gebruikte koppelingen :', +'LBL_MAPPING'=>'Koppelen', +'LBL_HEADERS'=>'Kopteksten :', +'LBL_ERROR_MULTIPLE'=>'Hetzelfde veld kan twee keer gekoppeld zijn. Bekijk de gekoppelde velden.', +'LBL_STEP_3_3'=>'Stap 3 van 3 : ', +'LBL_MAPPING_RESULTS'=>'Koppelings resultaten', +'LBL_LAST_IMPORTED'=>'Laatst geimporteerd', +//Added for sript alerts +'PLEASE_CHECK_MAPPING' => "' is meerdere keren gekoppeld. S.v.p. koppelingen nakijken.", +'MAP_MANDATORY_FIELD' => 'U dient de verplichte velden te koppelen "', +'ENTER_SAVEMAP_NAME' => 'Geef een naam aan deze koppelings lijst', + +//Added for 5.0.3 +'to'=>'aan', +'of'=>'van', +'are_imported_succesfully'=>'is succesvol geimporteerd', + +// Added after 5.0.4 GA + +//added for duplicate handling +'LBL_LAST_IMPORT'=>'Laatst Geimporteerd', +'Select_Criteria_For_Duplicate' => 'Selecteer Criteria voor Afhandeling Dubbele Records', +'Manual_Merging' => 'Handmatig Merging', +'Auto_Merging' => 'Automatisch Merging', +'Ignore_Duplicate' => 'Negeer Dubbele Records bij Importeren', +'Overwrite_Duplicate' => 'Overschrijf Dubbele Records bij Importeren', +'Duplicate_Records_Skipped_Info' => 'Aantal Records Overgeslagen i.v.m. dubbelen : ', +'Duplicate_Records_Overwrite_Info' => 'Aantal Records Overschreven i.v.m. dubbelen : ', +'LBL_STEP_4_4' => 'Stap 4 van 4 : ', +'LBL_STEP_3_4'=>'Stap 4 van 4 :', +'LBL_STEP_2_4'=>'Stap 2 van 4 :', +'LBL_STEP_1_4'=>'Stap 1 van 4 : ', + +'LBL_DELIMITER' => 'Scheidingsteken:', +'LBL_FORMAT' => 'Formaat:', + +'LBL_MERGE_FIELDS_DUPLICATE' => 'Samenvoegen van velden voro dubbele import records', +'Customer Portal Login Details' => 'Klantportaal Login Details', +); + +$mod_list_strings = Array( +'contacts_import_fields' => Array( + "firstname"=>"Voornaam" + ,"lastname"=>"Achternaam" + ,"salutationtype"=>"Aanhef" + ,"leadsource"=>"Lead bron" + ,"birthday"=>"Verjaardag" + ,"donotcall"=>"Niet bellen" + ,"emailoptout"=>"E-mail optie uit" + ,"account_id"=>"Accountnaam" + ,"title"=>"Titel" + ,"department"=>"Afdeling" + ,"homephone"=>"Telefoon (thuis)" + ,"mobile"=>"Telefoon (mobiel)" + ,"phone"=>"Telefoon (werk)" + ,"otherphone"=>"Telefoon (anders)" + ,"fax"=>"Fax" + ,"email"=>"e-mail" + ,"otheremail"=>"Ander e-mailadres" + ,"yahooid"=>"Tweede e-mailadres" + ,"assistant"=>"Assistent" + ,"assistantphone"=>"telfoonnummer assistent" + ,"mailingstreet"=>"Postadres Straat" + ,"mailingpobox"=>"Postadres Postbus" + ,"mailingcity"=>"Postadres Plaats" + ,"mailingstate"=>"Postadres Provincie" + ,"mailingzip"=>"Postadres Postcode" + ,"mailingcountry"=>"Postadres land" + ,"otherstreet"=>"Bezoekadres" + ,"otherpobox"=>"Bezoekadres postbus" + ,"othercity"=>"Bezoekadres plaats" + ,"otherstate"=>"Bezoekadres provincie" + ,"otherzip"=>"Bezoekadres postcode" + ,"othercountry"=>"Bezoekadres land" + ,"description"=>"Omschrijving" + ,"assigned_user_id"=>"Toegewezen aan" + ), + +'accounts_import_fields' => Array( + //"id"=>"Account ID", + "accountname"=>"Accountnaam", + "website"=>"Website", + "industry"=>"Industrie", + "accounttype"=>"Type", + "tickersymbol"=>"Ticker symbool", + "parent_name"=>"Onderdeel van", + "employees"=>"Werknemers", + "ownership"=>"Eigenaar", + "phone"=>"Telefoonnummer", + "fax"=>"Fax", + "otherphone"=>" Ander telefoonnummer", + "email1"=>"e-mail", + "email2"=>"Ander e-mailadres", + "rating"=>"Beoordeling", + "siccode"=>"BTW nummer", + "annual_revenue"=>"Jaarlijkse omzet", + "bill_street"=>"Postadres straat", + "bill_pobox"=>"Postadres postbusadres", + "bill_city"=>"Postadres Plaats", + "bill_state"=>"Postadres Provincie", + "bill_code"=>"Postadres Postcode", + "bill_country"=>"Postadres land", + "ship_street"=>"Postadres", + "ship_pobox"=>"Afleveradres Postbus", + "ship_city"=>"Afleveradres Plaats", + "ship_state"=>"Afleveradres Provincie", + "ship_code"=>"Afleveradres Postcode", + "ship_country"=>"Afleveradres Land", + "description"=>"Omschrijving", + "assigned_user_id"=>"Toegewezen aan" + ), + +'potentials_import_fields' => Array( + //"id"=>"Account ID" + "potentialname"=>"Naam potentieel" + , "account_id"=>"Accountnaam" + , "opportunity_type"=>"Type potentieel" + , "leadsource"=>"Lead bron" + , "amount"=>"Hoeveelheid" + , "closingdate"=>"Sluitingsdatum" + , "nextstep"=>"Volgende stap" + , "sales_stage"=>"Verkoopstadium" + , "probability"=>"Waarschijnlijkheid" + , "description"=>"Omschrijving" + ,"assigned_user_id"=>"Toegewezen aan" + ), + + +'leads_import_fields' => Array( + "salutationtype"=>"Aanhef", + "firstname"=>"Voornaam", + "phone"=>"Telefoon", + "lastname"=>"Achternaam", + "mobile"=>"Telefoon Mobiel", + "company"=>"Bedrijf", + "fax"=>"Fax", + "designation"=>"Benoeming", + "email"=>"e-mail", + "leadsource"=>"Lead bron", + "website"=>"Website", + "industry"=>"Industrie", + "leadstatus"=>"Lead status", + "annualrevenue"=>"Jaarlijkse Omzet", + "rating"=>"Beoordeling", + "licencekeystatus"=>"Licentie code", + "noofemployees"=>"Aantal werknemers", + "assigned_user_id"=>"Toegewezen aan", + "yahooid"=>"Tweede e-mailadres", + "lane"=>"Straat", + "pobox"=>"Postbus", + "code"=>"Postcode", + "city"=>"Plaats", + "country"=>"Land", + "state"=>"Provincie", + "description"=>"Omschrijving" + ,"assigned_user_id"=>"Toegewezen aan" + ), + + 'products_import_fields' => Array( + 'productname'=>'Productnaam', + 'productcode'=>'Productcode', + 'productcategory'=>'Product categorie', + 'manufacturer'=>'Fabrikant', + 'product_description'=>'Product omschrijving', + 'qty_per_unit'=>'Hoeveelheid per eenheid', + 'unit_price'=>'Stukprijs', + 'weight'=>'Gewicht', + 'pack_size'=>'Pakket omvang', + 'start_date'=>'Startdatum', + 'expiry_date'=>'Einddatum', + 'cost_factor'=>'Kost factor', + 'commissionmethod'=>'Commissie berekening', + 'discontinued'=>'Vervallen', + 'commissionrate'=>'Commissie (%)', + 'sales_start_date'=>'Startdatum verkoop', + 'sales_end_date'=>'Einddatum verkoop', + 'usageunit'=>'Gebruikseenheid', + 'serialno'=>'Serienummer', + 'currency'=>'Valuta', + 'reorderlevel'=>'Herbestellings niveau', + 'website'=>'Website', + 'taxclass'=>'Belasting percentage', + 'mfr_part_no'=>'Fabricatie partnummer', + 'vendor_part_no'=>'Verkoop partnummer', + 'qtyinstock'=>'Aantal in voorraad', + 'productsheet'=>'Productflyer', + 'qtyindemand'=>'Aantal in aanvraag', + 'glacct'=>'Grootboekrekening', + 'assigned_user_id'=>'Toegewezen aan' + ), + +//Pavani...adding list of import fields for helpdesk and vendors +'helpdesk_import_fields' => Array( + "ticketid"=>"Ticket Nr", + "priority"=>"Prioriteit", + "severity"=>"Ernstigheid", + "status"=>"Status", + "category"=>"Categorie", + "title"=>"Titel", + "description"=>"Omschrijving", + "solution"=>"Oplossing" + ), + +'vendors_import_fields' => Array( + "vendorid"=>"Leveranciersnummer", + "vendorname"=>"Leveranciersnaam", + "phone"=>"Telefoon", + "email"=>"Email", + "website"=>"Website", + "category"=>"Categorie", + "street"=>"Straat", + "city"=>"Plaats", + "state"=>"Provincie", + "pobox"=>"Postbus", + "postalcode"=>"Postcode", + "country"=>"Land", + "description"=>"Omschrijving" + ) +//Pavani...end list + +); + +?> diff --git a/modules/Import/models/Import_Map.php b/modules/Import/models/Import_Map.php new file mode 100644 index 0000000..e481271 --- /dev/null +++ b/modules/Import/models/Import_Map.php @@ -0,0 +1,106 @@ +map = $map; + $this->user = $user; + } + + public static function getInstanceFromDb($row, $user) { + $map = array(); + foreach($row as $key=>$value) { + if($key == 'content') { + $content = array(); + $pairs = explode("&", $value); + foreach($pairs as $pair) { + list($mappedName, $sequence) = explode("=", $pair); + $mappedName = str_replace('/eq/', '=', $mappedName); + $mappedName = str_replace('/amp/', '&', $mappedName); + $content["$mappedName"] = $sequence; + } + $map[$key] = $content; + + } else { + $map[$key] = $value; + } + } + return new Import_Map($map, $user); + } + + public static function markAsDeleted($mapId) { + $adb = PearDatabase::getInstance(); + $adb->pquery('UPDATE vtiger_import_maps SET deleted=1 WHERE id=?', array($mapId)); + } + + public function getId() { + $map = $this->map; + return $map['id']; + } + + public function getAllValues() { + return $this->map; + } + + public function getValue($key) { + $map = $this->map; + return $map[$key]; + } + + public function getStringifiedContent() { + if(empty($this->map['content'])) return; + $content = $this->map['content']; + $keyValueStrings = array(); + foreach($content as $key => $value) { + $key = str_replace('=', '/eq/', $key); + $key = str_replace('&', '/amp/', $key); + $keyValueStrings[] = $key.'='.$value; + } + $stringifiedContent = implode('&', $keyValueStrings); + return $stringifiedContent; + } + + public function save() { + $adb = PearDatabase::getInstance(); + + $map = $this->getAllValues(); + $map['content'] = "".$adb->getEmptyBlob().""; + $columnNames = array_keys($map); + $columnValues = array_values($map); + if(count($map) > 0) { + $adb->pquery('INSERT INTO '.self::$tableName.' ('. implode(',',$columnNames).') VALUES ('. generateQuestionMarks($columnValues).')', array($columnValues)); + $adb->updateBlob(self::$tableName,"content","name='". $adb->sql_escape_string($this->getValue('name')). + "' AND module='".$adb->sql_escape_string($this->getValue('module'))."'",$this->getStringifiedContent()); + } + } + + public static function getAllByModule($moduleName) { + global $current_user; + $adb = PearDatabase::getInstance(); + + $result = $adb->pquery('SELECT * FROM '.self::$tableName.' WHERE deleted=0 AND module=?', array($moduleName)); + $noOfMaps = $adb->num_rows($result); + + $savedMaps = array(); + for($i=0; $i<$noOfMaps; ++$i) { + $importMap = Import_Map::getInstanceFromDb($adb->query_result_rowdata($result, $i), $current_user); + $savedMaps[$importMap->getId()] = $importMap; + } + + return $savedMaps; + } + +} +?> diff --git a/modules/Import/readers/CSVReader.php b/modules/Import/readers/CSVReader.php new file mode 100644 index 0000000..2c19404 --- /dev/null +++ b/modules/Import/readers/CSVReader.php @@ -0,0 +1,90 @@ +getFileHandler(); + + $headers = array(); + $firstRowData = array(); + $currentRow = 0; + while($data = fgetcsv($fileHandler, 0, $this->userInputObject->get('delimiter'))) { + if($currentRow == 0 || ($currentRow == 1 && $hasHeader)) { + if($hasHeader && $currentRow == 0) { + foreach($data as $key => $value) { + $headers[$key] = $this->convertCharacterEncoding($value, $this->userInputObject->get('file_encoding'), $default_charset); + } + } else { + foreach($data as $key => $value) { + $firstRowData[$key] = $this->convertCharacterEncoding($value, $this->userInputObject->get('file_encoding'), $default_charset); + } + break; + } + } + $currentRow++; + } + + if($hasHeader) { + $noOfHeaders = count($headers); + $noOfFirstRowData = count($firstRowData); + // Adjust first row data to get in sync with the number of headers + if($noOfHeaders > $noOfFirstRowData) { + $firstRowData = array_merge($firstRowData, array_fill($noOfFirstRowData, $noOfHeaders-$noOfFirstRowData, '')); + } elseif($noOfHeaders < $noOfFirstRowData) { + $firstRowData = array_slice($firstRowData, 0, count($headers), true); + } + $rowData = array_combine($headers, $firstRowData); + } else { + $rowData = $firstRowData; + } + + unset($fileHandler); + return $rowData; + } + + public function read() { + global $default_charset; + + $fileHandler = $this->getFileHandler(); + $status = $this->createTable(); + if(!$status) { + return false; + } + + $fieldMapping = $this->userInputObject->get('field_mapping'); + + $i=-1; + while($data = fgetcsv($fileHandler, 0, $this->userInputObject->get('delimiter'))) { + $i++; + if($this->userInputObject->get('has_header') && $i == 0) continue; + $mappedData = array(); + $allValuesEmpty = true; + foreach($fieldMapping as $fieldName => $index) { + $fieldValue = $data[$index]; + $mappedData[$fieldName] = $fieldValue; + if($this->userInputObject->get('file_encoding') != $default_charset) { + $mappedData[$fieldName] = $this->convertCharacterEncoding($fieldValue, $this->userInputObject->get('file_encoding'), $default_charset); + } + if(!empty($fieldValue)) $allValuesEmpty = false; + } + if($allValuesEmpty) continue; + $fieldNames = array_keys($mappedData); + $fieldValues = array_values($mappedData); + $this->addRecordToDB($fieldNames, $fieldValues); + } + unset($fileHandler); + } +} +?> diff --git a/modules/Import/readers/FileReader.php b/modules/Import/readers/FileReader.php new file mode 100644 index 0000000..fdbd16e --- /dev/null +++ b/modules/Import/readers/FileReader.php @@ -0,0 +1,113 @@ +userInputObject = $userInputObject; + $this->user = $user; + } + + public function getStatus() { + return $this->status; + } + + public function getErrorMessage() { + return $this->errorMessage; + } + + public function getNumberOfRecordsRead() { + return $this->numberOfRecordsRead; + } + + public function hasHeader() { + if($this->userInputObject->get('has_header') == 'on' + || $this->userInputObject->get('has_header') == 1 + || $this->userInputObject->get('has_header') == true) { + return true; + } + return false; + } + + public function getFirstRowData($hasHeader=true) { + return null; + } + + public function getFilePath() { + return Import_Utils::getImportFilePath($this->user); + } + + public function getFileHandler() { + $filePath = $this->getFilePath(); + if(!file_exists($filePath)) { + $this->status = 'failed'; + $this->errorMessage = "ERR_FILE_DOESNT_EXIST"; + return false; + } + + $fileHandler = fopen($filePath, 'r'); + if(!$fileHandler) { + $this->status = 'failed'; + $this->errorMessage = "ERR_CANT_OPEN_FILE"; + return false; + } + return $fileHandler; + } + + public function convertCharacterEncoding($value, $fromCharset, $toCharset) { + if (function_exists("mb_convert_encoding")) { + $value = mb_convert_encoding($value, $toCharset, $fromCharset); + } else { + $value = iconv($toCharset, $fromCharset, $value); + } + return $value; + } + + public function read() { + // Sub-class need to implement this + } + + public function deleteFile() { + $filePath = $this->getFilePath(); + @unlink($filePath); + } + + public function createTable() { + $adb = PearDatabase::getInstance(); + + $tableName = Import_Utils::getDbTableName($this->user); + $fieldMapping = $this->userInputObject->get('field_mapping'); + + $columnsListQuery = 'id INT PRIMARY KEY AUTO_INCREMENT, status INT DEFAULT 0, recordid INT'; + foreach($fieldMapping as $fieldName => $index) { + $columnsListQuery .= ','.$fieldName.' TEXT'; + } + $createTableQuery = 'CREATE TABLE '. $tableName . ' ('.$columnsListQuery.')'; + $adb->query($createTableQuery); + return true; + } + + public function addRecordToDB($columnNames, $fieldValues) { + $adb = PearDatabase::getInstance(); + + $tableName = Import_Utils::getDbTableName($this->user); + $adb->pquery('INSERT INTO '.$tableName.' ('. implode(',', $columnNames).') VALUES ('. generateQuestionMarks($fieldValues) .')', $fieldValues); + $this->numberOfRecordsRead++; + } +} +?> diff --git a/modules/Import/readers/VCardReader.php b/modules/Import/readers/VCardReader.php new file mode 100644 index 0000000..fede381 --- /dev/null +++ b/modules/Import/readers/VCardReader.php @@ -0,0 +1,96 @@ +getFilePath(); + if(empty(self::$fileContents)) { + self::$fileContents = file_get_contents($filePath); + } + $fileContents = self::$fileContents; + + $data = null; + $matches = array(); + preg_match_all($this->vCardPattern, $fileContents, $matches); + + $row = $matches[0][0]; + $fieldValueMappings = explode("\r\n", $row); + $data = array(); + foreach($fieldValueMappings as $fieldValueMapping) { + list($label, $value) = explode(':', $fieldValueMapping, 2); + $value = str_replace(';', ' ', $value); + if(!in_array($label, $this->skipLabels)) { + $data[$label] = $this->convertCharacterEncoding($value, $this->userInputObject->get('file_encoding'), $default_charset); + } + } + return $data; + } + + public function read() { + global $default_charset; + + $filePath = $this->getFilePath(); + $status = $this->createTable(); + if(!$status) { + return false; + } + + $fieldMapping = $this->userInputObject->get('field_mapping'); + + if(empty(self::$fileContents)) { + self::$fileContents = file_get_contents($filePath); + } + $fileContents = self::$fileContents; + + $matches = array(); + preg_match_all($this->vCardPattern, $fileContents, $matches); + for($i=0; $iskipLabels)) { + $data[$valueCounter++] = $value; + } + } + $mappedData = array(); + $allValuesEmpty = true; + foreach($fieldMapping as $fieldName => $index) { + $fieldValue = $data[$index]; + $mappedData[$fieldName] = $fieldValue; + if($this->userInputObject->get('file_encoding') != $default_charset) { + $mappedData[$fieldName] = $this->convertCharacterEncoding($fieldValue, $this->userInputObject->get('file_encoding'), $default_charset); + } + if(!empty($fieldValue)) $allValuesEmpty = false; + } + if($allValuesEmpty) continue; + $fieldNames = array_keys($mappedData); + $fieldValues = array_values($mappedData); + $this->addRecordToDB($fieldNames, $fieldValues); + } + } +} +?> diff --git a/modules/Import/resources/Import.js b/modules/Import/resources/Import.js new file mode 100644 index 0000000..262bf0c --- /dev/null +++ b/modules/Import/resources/Import.js @@ -0,0 +1,283 @@ +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ************************************************************************************/ + +if (typeof(ImportJs) == 'undefined') { + /* + * Namespaced javascript class for Import + */ + ImportJs = { + + toogleMergeConfiguration: function() { + var mergeChecked = jQuery('#auto_merge').is(':checked'); + if(mergeChecked) { + jQuery('#duplicates_merge_configuration').show(); + } else { + jQuery('#duplicates_merge_configuration').hide(); + } + }, + + checkFileType: function() { + var filePath = jQuery('#import_file').val(); + if(filePath != '') { + var fileExtension = filePath.split('.').pop(); + jQuery('#type').val(fileExtension); + ImportJs.handleFileTypeChange(); + } + }, + + handleFileTypeChange: function() { + var fileType = jQuery('#type').val(); + if(fileType != 'csv') { + jQuery('#delimiter_container').hide(); + jQuery('#has_header_container').hide(); + } else { + jQuery('#delimiter_container').show(); + jQuery('#has_header_container').show(); + } + }, + + uploadAndParse: function() { + if(!ImportJs.validateFilePath()) return false; + if(!ImportJs.validateMergeCriteria()) return false; + return true; + }, + + validateFilePath: function() { + var filePath = jQuery('#import_file').val(); + if(jQuery.trim(filePath) == '') { + alert('Import File '+alert_arr.CANNOT_BE_EMPTY) + jQuery('#import_file').focus(); + return false; + } + if(!ImportJs.uploadFilter("import_file", "csv|vcf")) { + return false; + } + return true; + }, + + uploadFilter: function(elementId, allowedExtensions) { + var obj = jQuery('#'+elementId); + if(obj) { + var filePath = obj.val(); + var fileParts = filePath.toLowerCase().split('.'); + var fileType = fileParts[fileParts.length-1]; + var validExtensions = allowedExtensions.toLowerCase().split('|'); + + if(validExtensions.indexOf(fileType) < 0) { + alert(alert_arr.PLS_SELECT_VALID_FILE+' '+validExtensions); + obj.focus(); + return false; + } + } + return true; + }, + + validateMergeCriteria: function() { + $mergeChecked = jQuery('#auto_merge').is(':checked'); + if($mergeChecked) { + var selectedOptions = jQuery('#selected_merge_fields option'); + if(selectedOptions.length == 0) { + alert(alert_arr.ERR_SELECT_ATLEAST_ONE_MERGE_CRITERIA_FIELD); + return false; + } + } + convertOptionsToJSONArray('selected_merge_fields', 'merge_fields'); + return true; + }, + + sanitizeAndSubmit: function() { + if(!ImportJs.sanitizeFieldMapping()) return false; + if(!ImportJs.validateCustomMap()) return false; + return true; + }, + + sanitizeFieldMapping: function() { + var fieldsList = jQuery('.fieldIdentifier'); + var mappedFields = {}; + var mappedDefaultValues = {}; + for(var i=0; i 0) { + alert(alert_arr.ERR_PLEASE_MAP_MANDATORY_FIELDS + ' : ' + missingMandatoryFields.join(',')); + return false; + } + jQuery('#field_mapping').val(JSON.stringify(mappedFields)); + jQuery('#default_values').val(JSON.stringify(mappedDefaultValues)); + return true; + }, + + validateCustomMap: function() { + var saveMap = jQuery('#save_map').is(':checked'); + if(saveMap) { + var mapName = jQuery('#save_map_as').val(); + if(jQuery.trim(mapName) == '') { + alert(alert_arr.ERR_MAP_NAME_CANNOT_BE_EMPTY); + return false; + } + var mapOptions = jQuery('#saved_maps option'); + for(var i=0; i 0) { + var copyOfDefaultValueWidget = jQuery(':first', defaultValueContainer).detach(); + copyOfDefaultValueWidget.appendTo(allDefaultValuesContainer); + } + var selectedFieldDefValueContainer = jQuery('#'+selectedFieldName+'_defaultvalue_container', allDefaultValuesContainer); + var defaultValueWidget = selectedFieldDefValueContainer.detach(); + defaultValueWidget.appendTo(defaultValueContainer); + }, + + loadDefaultValueWidgetForMappedFields: function() { + var fieldsList = jQuery('.fieldIdentifier'); + fieldsList.each(function(i, element) { + var fieldElement = jQuery(element); + var mappedFieldName = jQuery('[name=mapped_fields]', fieldElement).val(); + if(mappedFieldName != '') { + ImportJs.loadDefaultValueWidget(fieldElement.attr('id')); + } + }); + + } + } + + jQuery(document).ready(function() { + ImportJs.toogleMergeConfiguration(); + ImportJs.loadDefaultValueWidgetForMappedFields(); + }); +} \ No newline at end of file diff --git a/modules/Import/resources/Utils.php b/modules/Import/resources/Utils.php new file mode 100644 index 0000000..6e68425 --- /dev/null +++ b/modules/Import/resources/Utils.php @@ -0,0 +1,178 @@ +'UTF-8', 'ISO-8859-1'=>'ISO-8859-1'); + static $supportedDelimiters = array(','=>'comma', ';'=>'semicolon'); + static $supportedFileExtensions = array('csv','vcf'); + + public function getSupportedFileExtensions() { + return self::$supportedFileExtensions; + } + + public function getSupportedFileEncoding() { + return self::$supportedFileEncoding; + } + + public function getSupportedDelimiters() { + return self::$supportedDelimiters; + } + + public static function getAutoMergeTypes() { + return array( + self::$AUTO_MERGE_IGNORE => 'Skip', + self::$AUTO_MERGE_OVERWRITE => 'Overwrite', + self::$AUTO_MERGE_MERGEFIELDS => 'Merge'); + } + + public static function getMaxUploadSize() { + global $upload_maxsize; + return $upload_maxsize; + } + + public static function getImportDirectory() { + global $import_dir; + return $import_dir; + } + + public static function getImportFilePath($user) { + $importDirectory = self::getImportDirectory(); + return $importDirectory. "IMPORT_".$user->id; + } + + + public static function getFileReaderInfo($type) { + $configReader = new ConfigReader('modules/Import/config.inc', 'ImportConfig'); + $importTypeConfig = $configReader->getConfig('importTypes'); + if(isset($importTypeConfig[$type])) { + return $importTypeConfig[$type]; + } + return null; + } + + public static function getFileReader($userInputObject, $user) { + $fileReaderInfo = self::getFileReaderInfo($userInputObject->get('type')); + if(!empty($fileReaderInfo)) { + require_once $fileReaderInfo['classpath']; + $fileReader = new $fileReaderInfo['reader'] ($userInputObject, $user); + } else { + $fileReader = null; + } + return $fileReader; + } + + public static function getDbTableName($user) { + $configReader = new ConfigReader('modules/Import/config.inc', 'ImportConfig'); + $userImportTablePrefix = $configReader->getConfig('userImportTablePrefix'); + return $userImportTablePrefix . $user->id; + } + + public static function showErrorPage($errorMessage, $errorDetails=false, $customActions=false) { + $viewer = new Import_UI_Viewer(); + $viewer->assign('ERROR_MESSAGE', $errorMessage); + $viewer->assign('ERROR_DETAILS', $errorDetails); + $viewer->assign('CUSTOM_ACTIONS', $customActions); + $viewer->display('ImportError.tpl'); + } + + public static function showImportLockedError($lockInfo) { + + $errorMessage = getTranslatedString('ERR_MODULE_IMPORT_LOCKED', 'Import'); + $errorDetails = array(getTranslatedString('LBL_MODULE_NAME', 'Import') => getTabModuleName($lockInfo['tabid']), + getTranslatedString('LBL_USER_NAME', 'Import') => getUserFullName($lockInfo['userid']), + getTranslatedString('LBL_LOCKED_TIME', 'Import') => $lockInfo['locked_since']); + + self::showErrorPage($errorMessage, $errorDetails); + } + + public static function showImportTableBlockedError($moduleName, $user) { + + $errorMessage = getTranslatedString('ERR_UNIMPORTED_RECORDS_EXIST', 'Import'); + $customActions = array('LBL_CLEAR_DATA' => "location.href='index.php?module={$moduleName}&action=Import&mode=clear_corrupted_data'"); + + self::showErrorPage($errorMessage, '', $customActions); + } + + public static function isUserImportBlocked($user) { + $adb = PearDatabase::getInstance(); + $tableName = self::getDbTableName($user); + + if(Vtiger_Utils::CheckTable($tableName)) { + $result = $adb->query('SELECT 1 FROM '.$tableName.' WHERE status = '.Import_Data_Controller::$IMPORT_RECORD_NONE); + if($adb->num_rows($result) > 0) { + return true; + } + } + return false; + } + + public static function clearUserImportInfo($user) { + $adb = PearDatabase::getInstance(); + $tableName = self::getDbTableName($user); + + $adb->query('DROP TABLE IF EXISTS '.$tableName); + Import_Lock_Controller::unLock($user); + Import_Queue_Controller::removeForUser($user); + } + + public static function getAssignedToUserList($module) { + global $current_user; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + $tabId = getTabid($module); + + if(!is_admin($current_user) && $profileGlobalPermission[2] == 1 + && ($defaultOrgSharingPermission[$tabId] == 3 or $defaultOrgSharingPermission[$tabId] == 0)) { + + return get_user_array(FALSE, "Active", $current_user->id,'private'); + } else { + return get_user_array(FALSE, "Active", $current_user->id); + } + } + + public static function getAssignedToGroupList($module) { + global $current_user; + require('user_privileges/user_privileges_'.$current_user->id.'.php'); + require('user_privileges/sharing_privileges_'.$current_user->id.'.php'); + $tabId = getTabid($module); + + if(!is_admin($current_user) && $profileGlobalPermission[2] == 1 + && ($defaultOrgSharingPermission[$tabId] == 3 or $defaultOrgSharingPermission[$tabId] == 0)) { + + return get_group_array(FALSE, "Active", $current_user->id,'private'); + } else { + return get_group_array(FALSE, "Active", $current_user->id); + } + } + + public static function hasAssignPrivilege($moduleName, $assignToUserId) { + $assignableUsersList = self::getAssignedToUserList($moduleName); + if(array_key_exists($assignToUserId, $assignableUsersList)) { + return true; + } + $assignableGroupsList = self::getAssignedToGroupList($moduleName); + if(array_key_exists($assignToUserId, $assignableGroupsList)) { + return true; + } + return false; + + } + +} +?> diff --git a/modules/Import/schema.xml b/modules/Import/schema.xml new file mode 100644 index 0000000..ff13790 --- /dev/null +++ b/modules/Import/schema.xml @@ -0,0 +1,32 @@ + + + + + vtiger_import_locks + +
+ + vtiger_import_queue + +
+
+
diff --git a/modules/Import/ui/Viewer.php b/modules/Import/ui/Viewer.php new file mode 100644 index 0000000..1bc6196 --- /dev/null +++ b/modules/Import/ui/Viewer.php @@ -0,0 +1,54 @@ +parameters[$key] = $value; + } + + function viewController() { + global $theme; + $themePath = "themes/".$theme."/"; + $imagePath = $themePath."images/"; + + $smarty = new vtigerCRM_Smarty(); + + foreach($this->parameters as $k => $v) { + $smarty->assign($k, $v); + } + + $smarty->assign('MODULE', 'Import'); + $smarty->assign('THEME', $theme); + $smarty->assign('IMAGE_PATH', $imagePath); + + return $smarty; + } + + function display($templateName, $moduleName='') { + $smarty = $this->viewController(); + if(empty($moduleName)) { + $moduleName = 'Import'; + } + $smarty->display(vtlib_getModuleTemplate($moduleName, $templateName)); + } + + function fetch($templateName, $moduleName='') { + $smarty = $this->viewController(); + if(empty($moduleName)) { + $moduleName = 'Import'; + } + return $smarty->fetch(vtlib_getModuleTemplate($moduleName, $templateName)); + } + +} \ No newline at end of file diff --git a/modules/Integration/Integration.js b/modules/Integration/Integration.js new file mode 100644 index 0000000..3fd0758 --- /dev/null +++ b/modules/Integration/Integration.js @@ -0,0 +1,8 @@ +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ************************************************************************************/ diff --git a/modules/Integration/Integration.php b/modules/Integration/Integration.php new file mode 100644 index 0000000..7319c66 --- /dev/null +++ b/modules/Integration/Integration.php @@ -0,0 +1,10 @@ + diff --git a/modules/Integration/IntegrationAjax.php b/modules/Integration/IntegrationAjax.php new file mode 100644 index 0000000..efae0a9 --- /dev/null +++ b/modules/Integration/IntegrationAjax.php @@ -0,0 +1,11 @@ + diff --git a/modules/Integration/IntegrationHandler.php b/modules/Integration/IntegrationHandler.php new file mode 100644 index 0000000..e91be34 --- /dev/null +++ b/modules/Integration/IntegrationHandler.php @@ -0,0 +1,24 @@ + diff --git a/modules/Integration/index.php b/modules/Integration/index.php new file mode 100644 index 0000000..de49182 --- /dev/null +++ b/modules/Integration/index.php @@ -0,0 +1,62 @@ +valuemap = $values; + } + function get($key, $defvalue='') { + $value = $defvalue; + if (isset($this->valuemap[$key])) { + $value = $this->valuemap[$key]; + } + if (!empty($value)) { + $value = vtlib_purify($value); + } + return $value; + } +} + +class Integration_Viewer extends vtigerCRM_Smarty { + function __construct() { + parent::__construct(); + + global $app_strings, $mod_strings, $currentModule, $theme; + + $this->assign('CUSTOM_MODULE', true); + + $this->assign('APP', $app_strings); + $this->assign('MOD', $mod_strings); + $this->assign('MODULE', $currentModule); + // TODO: Update Single Module Instance name here. + $this->assign('SINGLE_MOD', 'SINGLE_'.$currentModule); + $this->assign('CATEGORY', getParentTab($currentModule)); + $this->assign('IMAGE_PATH', "themes/$theme/images/"); + $this->assign('THEME', $theme); + } +} + +class Integration_Controller { + function process(Integration_Request $request) { + global $currentModule, $site_URL; + $viewer = new Integration_Viewer(); + $gmailBookmarklet = sprintf("javascript:(%s)();", + "function()%7Bvar%20doc=document;var%20bodyElement=document.body;doc.vtigerURL=%22$site_URL/%22;" . + "var%20scriptElement=document.createElement(%22script%22);scriptElement.type=%22text/javascript%22;". + "scriptElement.src=doc.vtigerURL+%22modules/Emails/GmailBookmarkletTrigger.js%22;bodyElement.appendChild(scriptElement);%7D"); + $viewer->assign('GMAIL_BOOKMARKLET', $gmailBookmarklet); + $viewer->display(vtlib_getModuleTemplate($currentModule, 'index.tpl')); + } +} + +$controller = new Integration_Controller(); +$controller->process(new Integration_Request($_REQUEST)); + +?> diff --git a/modules/Integration/language/de_de.lang.php b/modules/Integration/language/de_de.lang.php new file mode 100644 index 0000000..f7cf01a --- /dev/null +++ b/modules/Integration/language/de_de.lang.php @@ -0,0 +1,17 @@ + 'Integration', + 'SINGLE_Integration' => 'Integration', + + 'LBL_HOW_TO_USE' => 'Wie zu benutzen?', +); + +?> diff --git a/modules/Integration/language/en_us.lang.php b/modules/Integration/language/en_us.lang.php new file mode 100644 index 0000000..2ad5cc5 --- /dev/null +++ b/modules/Integration/language/en_us.lang.php @@ -0,0 +1,18 @@ + 'Integration', +'SINGLE_Integration' => 'Integration', + +'LBL_HOW_TO_USE' => 'How to use', + +); + +?> diff --git a/modules/Integration/language/es_es.lang.php b/modules/Integration/language/es_es.lang.php new file mode 100644 index 0000000..85f0c46 --- /dev/null +++ b/modules/Integration/language/es_es.lang.php @@ -0,0 +1,18 @@ + 'Integración', +'SINGLE_Integration' => 'Integración', + +'LBL_HOW_TO_USE' => 'Cómo utilizar', + +); + +?> diff --git a/modules/Integration/language/es_mx.lang.php b/modules/Integration/language/es_mx.lang.php new file mode 100644 index 0000000..85f0c46 --- /dev/null +++ b/modules/Integration/language/es_mx.lang.php @@ -0,0 +1,18 @@ + 'Integración', +'SINGLE_Integration' => 'Integración', + +'LBL_HOW_TO_USE' => 'Cómo utilizar', + +); + +?> diff --git a/modules/Integration/language/fr_fr.lang.php b/modules/Integration/language/fr_fr.lang.php new file mode 100644 index 0000000..3f66e81 --- /dev/null +++ b/modules/Integration/language/fr_fr.lang.php @@ -0,0 +1,15 @@ + 'Integration', + 'SINGLE_Integration' => 'Integration', + 'LBL_HOW_TO_USE' => 'Comment l\'utiliser?', +); +?> \ No newline at end of file diff --git a/modules/Integration/language/hu_hu.lang.php b/modules/Integration/language/hu_hu.lang.php new file mode 100644 index 0000000..81e0316 --- /dev/null +++ b/modules/Integration/language/hu_hu.lang.php @@ -0,0 +1,22 @@ + 'Integráció', + 'SINGLE_Integration' => 'Integráció', + 'LBL_HOW_TO_USE' => 'Hogyan hasznájuk ezt' +); +?> diff --git a/modules/Integration/language/zh_cn.lang.php b/modules/Integration/language/zh_cn.lang.php new file mode 100644 index 0000000..5044107 --- /dev/null +++ b/modules/Integration/language/zh_cn.lang.php @@ -0,0 +1,32 @@ + '系统整合工具', +'SINGLE_Integration' => '系统整合工具', + +'LBL_HOW_TO_USE' => '如何使用', + +); + +?> diff --git a/modules/Integration/res/images/gmail.gif b/modules/Integration/res/images/gmail.gif new file mode 100644 index 0000000..4ef5c8d Binary files /dev/null and b/modules/Integration/res/images/gmail.gif differ diff --git a/modules/Invoice/CallRelatedList.php b/modules/Invoice/CallRelatedList.php new file mode 100644 index 0000000..b695994 --- /dev/null +++ b/modules/Invoice/CallRelatedList.php @@ -0,0 +1,85 @@ +retrieve_entity_info($RECORD,$currentmodule); + $focus->id = $RECORD; + $focus->name=$focus->column_fields['subject']; + $log->debug("id is ".$focus->id); + $log->debug("name is ".$focus->name); + } + + global $mod_strings; + global $app_strings; + global $currentModule; + global $theme; + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $smarty = new vtigerCRM_Smarty; + + if (isset($focus->name)) $smarty->assign("NAME", $focus->name); + $related_array=getRelatedLists($currentModule,$focus); + $smarty->assign("RELATEDLISTS", $related_array); + + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + $relationId = vtlib_purify($_REQUEST['relation_id']); + RelatedListViewSession::addRelatedModuleToSession($relationId, + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); + + $smarty->assign("CATEGORY",$category); + if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') { + $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode'])); + } + $smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); + $smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); + $smarty->assign("ID",$focus->id); + + // Module Sequence Numbering + $mod_seq_field = getModuleSequenceField($currentModule); + if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; + } else { + $mod_seq_id = $focus->id; + } + $smarty->assign('MOD_SEQ_ID', $mod_seq_id); + // END + + $smarty->assign("MODULE",$currentmodule); + $smarty->assign("SINGLE_MOD",$mod_strings['Invoice']); + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $smarty->assign("MOD",$mod_strings); + $smarty->assign("APP",$app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + + $check_button = Button_Check($module); + $smarty->assign("CHECK", $check_button); + $smarty->display("RelatedLists.tpl"); +} +?> \ No newline at end of file diff --git a/modules/Invoice/CreatePDF.php b/modules/Invoice/CreatePDF.php new file mode 100644 index 0000000..866e8c6 --- /dev/null +++ b/modules/Invoice/CreatePDF.php @@ -0,0 +1,26 @@ +loadRecord(vtlib_purify($_REQUEST['record'])); +$invoice_no = getModuleSequenceNumber($currentModule,vtlib_purify($_REQUEST['record'])); +if(isset($_REQUEST['savemode']) && $_REQUEST['savemode'] == 'file') { + $id = vtlib_purify($_REQUEST['record']); + $filepath='test/product/'.$id.'_Invoice_'.$invoice_no.'.pdf'; + $controller->Output($filepath,'F'); //added file name to make it work in IE, also forces the download giving the user the option to save +} else { + $controller->Output('Invoice_'.$invoice_no.'.pdf', 'D');//added file name to make it work in IE, also forces the download giving the user the option to save + exit(); +} + +?> diff --git a/modules/Invoice/CustomView.php b/modules/Invoice/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/Invoice/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/Invoice/Delete.php b/modules/Invoice/Delete.php new file mode 100644 index 0000000..fdc8a92 --- /dev/null +++ b/modules/Invoice/Delete.php @@ -0,0 +1,38 @@ + \ No newline at end of file diff --git a/modules/Invoice/DetailView.php b/modules/Invoice/DetailView.php new file mode 100644 index 0000000..e5c1ca0 --- /dev/null +++ b/modules/Invoice/DetailView.php @@ -0,0 +1,139 @@ +retrieve_entity_info($_REQUEST['record'],"Invoice"); + $focus->id = $_REQUEST['record']; + $focus->name=$focus->column_fields['subject']; +} + +if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; +} + +$theme_path="themes/".$theme."/"; +$image_path=$theme_path."images/"; + +$log->info("Order detail view"); + + +$smarty = new vtigerCRM_Smarty; +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("MODULE",$currentModule); + +$smarty->assign("UPDATEINFO",updateInfo($focus->id)); + +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); + +if (isset($focus->name)) $smarty->assign("NAME", $focus->name); +else $smarty->assign("NAME", ""); +$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); + +$smarty->assign("CUSTOMFIELD", $cust_fld); +$smarty->assign("ID", vtlib_purify($_REQUEST['record'])); +$invoice_no = getModuleSequenceNumber($currentModule,vtlib_purify($_REQUEST['record'])); +$smarty->assign("INV_NO",$invoice_no); +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; +} else { + $mod_seq_id = $focus->id; +} +$smarty->assign('MOD_SEQ_ID', $mod_seq_id); +// END + +$smarty->assign("SINGLE_MOD", 'Invoice'); +$category = getParentTab(); +$smarty->assign("CATEGORY",$category); + +if(isPermitted("Invoice","EditView",$_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + +$smarty->assign("CREATEPDF","permitted"); + +if(isPermitted("Invoice","Delete",$_REQUEST['record']) == 'yes') + $smarty->assign("DELETE","permitted"); + +//Get the associated Products and then display above Terms and Conditions +$smarty->assign("ASSOCIATED_PRODUCTS",getDetailAssociatedProducts('Invoice',$focus)); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +$tabid = getTabid("Invoice"); +$validationData = getDBValidationData($focus->tab_name,$tabid); +$data = split_validationdataArray($validationData); +$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); +$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); +$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); +$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record'])); +$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); +$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); + +$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule)); +if($singlepane_view == 'true') +{ + $related_array = getRelatedLists($currentModule,$focus); + $smarty->assign("RELATEDLISTS", $related_array); + + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']), + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); +} + +$smarty->assign("SinglePane_View", $singlepane_view); + +if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){ + $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id); + VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id); +} + +// Record Change Notification +$focus->markAsViewed($current_user->id); +// END + +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action'])); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params)); + +$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true)); + +$smarty->display("Inventory/InventoryDetailView.tpl"); + +?> \ No newline at end of file diff --git a/modules/Invoice/DetailViewAjax.php b/modules/Invoice/DetailViewAjax.php new file mode 100644 index 0000000..31a8d58 --- /dev/null +++ b/modules/Invoice/DetailViewAjax.php @@ -0,0 +1,48 @@ +retrieve_entity_info($crmid,"Invoice"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Invoice"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){ + require_once 'include/ListView/RelatedListViewContents.php'; +} +?> \ No newline at end of file diff --git a/modules/Invoice/EditView.php b/modules/Invoice/EditView.php new file mode 100644 index 0000000..be28520 --- /dev/null +++ b/modules/Invoice/EditView.php @@ -0,0 +1,388 @@ +assign("SEARCH", $searchurl); +//4600 ends + +$currencyid = fetchCurrency($current_user->id); +$rate_symbol = getCurrencySymbolandCRate($currencyid); +$rate = $rate_symbol['rate']; +if (isset ($_REQUEST['record']) && $_REQUEST['record'] != '') { + if (isset ($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'quotetoinvoice') { + $quoteid = $_REQUEST['record']; + $quote_focus = new Quotes(); + $quote_focus->id = $quoteid; + $quote_focus->retrieve_entity_info($quoteid, "Quotes"); + $focus = getConvertQuoteToInvoice($focus, $quote_focus, $quoteid); + + // Reset the value w.r.t Quote Selected + $currencyid = $quote_focus->column_fields['currency_id']; + $rate = $quote_focus->column_fields['conversion_rate']; + + //Added to display the Quote's associated vtiger_products -- when we create vtiger_invoice from Quotes DetailView + $associated_prod = getAssociatedProducts("Quotes", $quote_focus); + $txtTax = (($quote_focus->column_fields['txtTax'] != '') ? $quote_focus->column_fields['txtTax'] : '0.000'); + $txtAdj = (($quote_focus->column_fields['txtAdjustment'] != '') ? $quote_focus->column_fields['txtAdjustment'] : '0.000'); + + $smarty->assign("CONVERT_MODE", vtlib_purify($_REQUEST['convertmode'])); + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $smarty->assign("MODE", $quote_focus->mode); + $smarty->assign("AVAILABLE_PRODUCTS", 'true'); + } + elseif (isset ($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'sotoinvoice') { + $soid = $_REQUEST['record']; + $so_focus = new SalesOrder(); + $so_focus->id = $soid; + $so_focus->retrieve_entity_info($soid, "SalesOrder"); + $focus = getConvertSoToInvoice($focus, $so_focus, $soid); + + // Reset the value w.r.t SalesOrder Selected + $currencyid = $so_focus->column_fields['currency_id']; + $rate = $so_focus->column_fields['conversion_rate']; + + //added to set the PO number and terms and conditions + $focus->column_fields['vtiger_purchaseorder'] = $so_focus->column_fields['vtiger_purchaseorder']; + $focus->column_fields['terms_conditions'] = $so_focus->column_fields['terms_conditions']; + + //Added to display the SalesOrder's associated vtiger_products -- when we create vtiger_invoice from SO DetailView + $associated_prod = getAssociatedProducts("SalesOrder", $so_focus); + $txtTax = (($so_focus->column_fields['txtTax'] != '') ? $so_focus->column_fields['txtTax'] : '0.000'); + $txtAdj = (($so_focus->column_fields['txtAdjustment'] != '') ? $so_focus->column_fields['txtAdjustment'] : '0.000'); + + $smarty->assign("CONVERT_MODE", vtlib_purify($_REQUEST['convertmode'])); + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $smarty->assign("MODE", $so_focus->mode); + $smarty->assign("AVAILABLE_PRODUCTS", 'true'); + + } + elseif (isset ($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'potentoinvoice') { + $focus->mode = ''; + } + elseif (isset ($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'update_so_val') { + //Updating the Selected SO Value in Edit Mode + foreach ($focus->column_fields as $fieldname => $val) { + if (isset ($_REQUEST[$fieldname])) { + $value = $_REQUEST[$fieldname]; + $focus->column_fields[$fieldname] = $value; + } + + } + //Handling for dateformat in vtiger_invoicedate vtiger_field + if ($focus->column_fields['invoicedate'] != '') { + $curr_due_date = $focus->column_fields['invoicedate']; + $focus->column_fields['invoicedate'] = DateTimeField::convertToDBFormat($curr_due_date); + } + + $soid = $focus->column_fields['salesorder_id']; + $so_focus = new SalesOrder(); + $so_focus->id = $soid; + $so_focus->retrieve_entity_info($soid, "SalesOrder"); + $focus = getConvertSoToInvoice($focus, $so_focus, $soid); + $focus->id = $_REQUEST['record']; + $focus->mode = 'edit'; + $focus->name = $focus->column_fields['subject']; + + // Reset the value w.r.t SalesOrder Selected + $currencyid = $so_focus->column_fields['currency_id']; + $rate = $so_focus->column_fields['conversion_rate']; + } else { + $focus->id = $_REQUEST['record']; + $focus->mode = 'edit'; + $focus->retrieve_entity_info($_REQUEST['record'], "Invoice"); + $focus->name = $focus->column_fields['subject']; + } +} else { + if (isset ($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'update_so_val') { + //Updating the Selected SO Value in Create Mode + foreach ($focus->column_fields as $fieldname => $val) { + if (isset ($_REQUEST[$fieldname])) { + $value = $_REQUEST[$fieldname]; + $focus->column_fields[$fieldname] = $value; + } + + } + //Handling for dateformat in vtiger_invoicedate vtiger_field + if ($focus->column_fields['invoicedate'] != '') { + $curr_due_date = $focus->column_fields['invoicedate']; + $focus->column_fields['invoicedate'] = DateTimeField::convertToDBFormat($curr_due_date); + } + + $soid = $focus->column_fields['salesorder_id']; + $so_focus = new SalesOrder(); + $so_focus->id = $soid; + $so_focus->retrieve_entity_info($soid, "SalesOrder"); + $focus = getConvertSoToInvoice($focus, $so_focus, $soid); + + // Reset the value w.r.t SalesOrder Selected + $currencyid = $so_focus->column_fields['currency_id']; + $rate = $so_focus->column_fields['conversion_rate']; + + //Added to display the SO's associated products -- when we select SO in New Invoice page + if (isset ($_REQUEST['salesorder_id']) && $_REQUEST['salesorder_id'] != '') { + $associated_prod = getAssociatedProducts("SalesOrder", $so_focus, $focus->column_fields['salesorder_id']); + } + + $smarty->assign("SALESORDER_ID", $focus->column_fields['salesorder_id']); + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $smarty->assign("MODE", $so_focus->mode); + $smarty->assign("AVAILABLE_PRODUCTS", 'true'); + + } +} +if (isset ($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $smarty->assign("DUPLICATE_FROM", $focus->id); + $INVOICE_associated_prod = getAssociatedProducts($currentModule, $focus); + $inventory_cur_info = getInventoryCurrencyInfo($currentModule, $focus->id); + $currencyid = $inventory_cur_info['currency_id']; + $focus->id = ""; + $focus->mode = ''; +} +if(empty($_REQUEST['record']) && $focus->mode != 'edit'){ + setObjectValuesFromRequest($focus); +} +if (isset ($_REQUEST['opportunity_id']) && $_REQUEST['opportunity_id'] != '') { + $potfocus = new Potentials(); + $potfocus->column_fields['potential_id'] = $_REQUEST['opportunity_id']; + $associated_prod = getAssociatedProducts("Potentials", $potfocus, $potfocus->column_fields['potential_id']); + +} +if (isset ($_REQUEST['product_id']) && $_REQUEST['product_id'] != '') { + $focus->column_fields['product_id'] = $_REQUEST['product_id']; + $log->debug("Invoice EditView: Product Id from the request is " . $_REQUEST['product_id']); + $associated_prod = getAssociatedProducts("Products", $focus, $focus->column_fields['product_id']); + for ($i=1; $i<=count($associated_prod);$i++) { + $associated_prod_id = $associated_prod[$i]['hdnProductId'.$i]; + $associated_prod_prices = getPricesForProducts($currencyid,array($associated_prod_id),'Products'); + $associated_prod[$i]['listPrice'.$i] = $associated_prod_prices[$associated_prod_id]; + } + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $smarty->assign("AVAILABLE_PRODUCTS", 'true'); +} +if (!empty ($_REQUEST['parent_id']) && !empty ($_REQUEST['return_module'])) { + if ($_REQUEST['return_module'] == 'Services') { + $focus->column_fields['product_id'] = vtlib_purify($_REQUEST['parent_id']); + $log->debug("Service Id from the request is " . vtlib_purify($_REQUEST['parent_id'])); + $associated_prod = getAssociatedProducts("Services", $focus, $focus->column_fields['product_id']); + for ($i=1; $i<=count($associated_prod);$i++) { + $associated_prod_id = $associated_prod[$i]['hdnProductId'.$i]; + $associated_prod_prices = getPricesForProducts($currencyid,array($associated_prod_id),'Services'); + $associated_prod[$i]['listPrice'.$i] = $associated_prod_prices[$associated_prod_id]; + } + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $smarty->assign("AVAILABLE_PRODUCTS", 'true'); + } +} + +if (isset ($_REQUEST['account_id']) && $_REQUEST['account_id'] != '' && ($_REQUEST['record'] == '' || $_REQUEST['convertmode'] == "potentoinvoice") && ($_REQUEST['convertmode'] != 'update_so_val')) { + require_once ('modules/Accounts/Accounts.php'); + $acct_focus = new Accounts(); + $acct_focus->retrieve_entity_info($_REQUEST['account_id'], "Accounts"); + $focus->column_fields['bill_city'] = $acct_focus->column_fields['bill_city']; + $focus->column_fields['ship_city'] = $acct_focus->column_fields['ship_city']; + $focus->column_fields['bill_street'] = $acct_focus->column_fields['bill_street']; + $focus->column_fields['ship_street'] = $acct_focus->column_fields['ship_street']; + $focus->column_fields['bill_state'] = $acct_focus->column_fields['bill_state']; + $focus->column_fields['ship_state'] = $acct_focus->column_fields['ship_state']; + $focus->column_fields['bill_code'] = $acct_focus->column_fields['bill_code']; + $focus->column_fields['ship_code'] = $acct_focus->column_fields['ship_code']; + $focus->column_fields['bill_country'] = $acct_focus->column_fields['bill_country']; + $focus->column_fields['ship_country'] = $acct_focus->column_fields['ship_country']; + $focus->column_fields['bill_pobox'] = $acct_focus->column_fields['bill_pobox']; + $focus->column_fields['ship_pobox'] = $acct_focus->column_fields['ship_pobox']; + +} + +global $theme; +$theme_path = "themes/" . $theme . "/"; +$image_path = $theme_path . "images/"; + +$disp_view = getView($focus->mode); +$mode = $focus->mode; + $smarty->assign("BLOCKS", getBlocks($currentModule, $disp_view, $mode, $focus->column_fields)); + + +$smarty->assign("OP_MODE", $disp_view); + +$smarty->assign("MODULE", $currentModule); +$smarty->assign("SINGLE_MOD", 'Invoice'); + +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); + +$log->info("Invoice view"); + +if (isset ($focus->name)) + $smarty->assign("NAME", $focus->name); +else + $smarty->assign("NAME", ""); + +if (isset ($_REQUEST['convertmode']) && $_REQUEST['convertmode'] == 'quotetoinvoice') { + $smarty->assign("MODE", $quote_focus->mode); + $se_array = getProductDetailsBlockInfo($quote_focus->mode, "Quotes", $quote_focus); +} +elseif (isset ($_REQUEST['convertmode']) && ($_REQUEST['convertmode'] == 'sotoinvoice' || $_REQUEST['convertmode'] == 'update_so_val')) { + $smarty->assign("MODE", $focus->mode); + $se_array = getProductDetailsBlockInfo($focus->mode, "SalesOrder", $so_focus); + + $txtTax = (($so_focus->column_fields['txtTax'] != '') ? $so_focus->column_fields['txtTax'] : '0.000'); + $txtAdj = (($so_focus->column_fields['txtAdjustment'] != '') ? $so_focus->column_fields['txtAdjustment'] : '0.000'); + + $associated_prod = getAssociatedProducts("SalesOrder", $so_focus); + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $smarty->assign("MODE", $focus->mode); +} +elseif ($focus->mode == 'edit') { + $smarty->assign("UPDATEINFO", updateInfo($focus->id)); + $associated_prod = getAssociatedProducts("Invoice", $focus); + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $smarty->assign("MODE", $focus->mode); +} +elseif (isset ($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $associated_prod = $INVOICE_associated_prod; + $smarty->assign("AVAILABLE_PRODUCTS", 'true'); + $smarty->assign("MODE", $focus->mode); +} +elseif ((isset ($_REQUEST['product_id']) && $_REQUEST['product_id'] != '') || (isset ($_REQUEST['opportunity_id']) && $_REQUEST['opportunity_id'] != '')) { + $smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + $InvTotal = getInventoryTotal($_REQUEST['return_module'], $_REQUEST['return_id']); + $smarty->assign("MODE", $focus->mode); + + //this is to display the Product Details in first row when we create new PO from Product relatedlist + if ($_REQUEST['return_module'] == 'Products') { + $smarty->assign("PRODUCT_ID", vtlib_purify($_REQUEST['product_id'])); + $smarty->assign("PRODUCT_NAME", getProductName($_REQUEST['product_id'])); + $smarty->assign("UNIT_PRICE", vtlib_purify($_REQUEST['product_id'])); + $smarty->assign("QTY_IN_STOCK", getPrdQtyInStck($_REQUEST['product_id'])); + $smarty->assign("VAT_TAX", getProductTaxPercentage("VAT", $_REQUEST['product_id'])); + $smarty->assign("SALES_TAX", getProductTaxPercentage("Sales", $_REQUEST['product_id'])); + $smarty->assign("SERVICE_TAX", getProductTaxPercentage("Service", $_REQUEST['product_id'])); + } +} + +if (isset ($cust_fld)) { + $smarty->assign("CUSTOMFIELD", $cust_fld); +} + +$smarty->assign("ASSOCIATEDPRODUCTS", $associated_prod); + +if (isset ($_REQUEST['return_module'])) + $smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module'])); +else + $smarty->assign("RETURN_MODULE", "Invoice"); +if (isset ($_REQUEST['return_action'])) + $smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action'])); +else + $smarty->assign("RETURN_ACTION", "index"); +if (isset ($_REQUEST['return_id'])) + $smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id'])); +if (isset ($_REQUEST['return_viewname'])) + $smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname'])); +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']); +$smarty->assign("ID", $focus->id); + +$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']); +$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + +//in create new Invoice, get all available product taxes and shipping & Handling taxes + +if ($focus->mode != 'edit') { + $tax_details = getAllTaxes('available'); + $sh_tax_details = getAllTaxes('available', 'sh'); +} else { + $tax_details = getAllTaxes('available', '', $focus->mode, $focus->id); + $sh_tax_details = getAllTaxes('available', 'sh', 'edit', $focus->id); +} +$smarty->assign("GROUP_TAXES", $tax_details); +$smarty->assign("SH_TAXES", $sh_tax_details); + +$tabid = getTabid("Invoice"); +$validationData = getDBValidationData($focus->tab_name, $tabid); +$data = split_validationdataArray($validationData); +$category = getParentTab(); +$smarty->assign("CATEGORY", $category); + +$smarty->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']); +$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']); +$smarty->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']); + +global $adb; +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if ($focus->mode != 'edit' && $mod_seq_field != null) { + $autostr = getTranslatedString('MSG_AUTO_GEN_ON_SAVE'); + $mod_seq_string = $adb->pquery("SELECT prefix, cur_id from vtiger_modentity_num where semodule = ? and active=1", array ( + $currentModule + )); + $mod_seq_prefix = $adb->query_result($mod_seq_string, 0, 'prefix'); + $mod_seq_no = $adb->query_result($mod_seq_string, 0, 'cur_id'); + if ($adb->num_rows($mod_seq_string) == 0 || $focus->checkModuleSeqNumber($focus->table_name, $mod_seq_field['column'], $mod_seq_prefix . $mod_seq_no)) + echo '
' . getTranslatedString('LBL_DUPLICATE') . ' ' . getTranslatedString($mod_seq_field['label']) . + ' - ' . getTranslatedString('LBL_CLICK') . ' ' . getTranslatedString('LBL_HERE') . ' ' . getTranslatedString('LBL_TO_CONFIGURE') . ' ' . getTranslatedString($mod_seq_field['label']) . ''; + else + $smarty->assign("MOD_SEQ_ID", $autostr); +} else { + $smarty->assign("MOD_SEQ_ID", $focus->column_fields[$mod_seq_field['name']]); +} +// END + +$smarty->assign("CURRENCIES_LIST", getAllCurrencies()); +if ($focus->mode == 'edit') { + $inventory_cur_info = getInventoryCurrencyInfo('Invoice', $focus->id); + $smarty->assign("INV_CURRENCY_ID", $inventory_cur_info['currency_id']); +} else { + $smarty->assign("INV_CURRENCY_ID", $currencyid); +} + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); +$smarty->assign("DUPLICATE",vtlib_purify($_REQUEST['isDuplicate'])); +$smarty->assign('CREATEMODE', vtlib_purify($_REQUEST['createmode'])); + +$picklistDependencyDatasource = Vtiger_DependencyPicklist::getPicklistDependencyDatasource($currentModule); +$smarty->assign("PICKIST_DEPENDENCY_DATASOURCE", Zend_Json::encode($picklistDependencyDatasource)); + +// Gather the help information associated with fields +$smarty->assign('FIELDHELPINFO', vtlib_getFieldHelpInfo($currentModule)); +// END + +if ($focus->mode == 'edit') + $smarty->display("Inventory/InventoryEditView.tpl"); +else + $smarty->display('Inventory/InventoryCreateView.tpl'); + +?> \ No newline at end of file diff --git a/modules/Invoice/Invoice.js b/modules/Invoice/Invoice.js new file mode 100644 index 0000000..d1c18bd --- /dev/null +++ b/modules/Invoice/Invoice.js @@ -0,0 +1,55 @@ +/********************************************************************************* +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ + +document.write(""; +exit() +?> diff --git a/modules/Invoice/Settings.php b/modules/Invoice/Settings.php new file mode 100644 index 0000000..980dd07 --- /dev/null +++ b/modules/Invoice/Settings.php @@ -0,0 +1,13 @@ + diff --git a/modules/Invoice/TagCloud.php b/modules/Invoice/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Invoice/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Invoice/UnifiedSearch.php b/modules/Invoice/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Invoice/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Invoice/index.php b/modules/Invoice/index.php new file mode 100644 index 0000000..986c4aa --- /dev/null +++ b/modules/Invoice/index.php @@ -0,0 +1,52 @@ + diff --git a/modules/Invoice/language/de_de.lang.php b/modules/Invoice/language/de_de.lang.php new file mode 100644 index 0000000..f1b6dab --- /dev/null +++ b/modules/Invoice/language/de_de.lang.php @@ -0,0 +1,197 @@ +'Rechnung', + 'LBL_SO_MODULE_NAME'=>'Rechnungen', + 'LBL_RELATED_PRODUCTS'=>'Artikelliste', + 'LBL_MODULE_TITLE'=>'Rechnungen: Home', + 'LBL_SEARCH_FORM_TITLE'=>'Rechnungen suchen', + 'LBL_LIST_FORM_TITLE'=>'Rechnungsliste', + 'LBL_LIST_SO_FORM_TITLE'=>'Liste der Kundenbestellungen', + 'LBL_NEW_FORM_TITLE'=>'Neue Rechnung', + 'LBL_NEW_FORM_SO_TITLE'=>'Neue Kundenbestellung', + 'LBL_MEMBER_ORG_FORM_TITLE'=>'Zugehörige Organisation', + + 'LBL_LIST_ACCOUNT_NAME'=>'Organisation', + 'LBL_LIST_CITY'=>'Ort', + 'LBL_LIST_WEBSITE'=>'Webseite', + 'LBL_LIST_STATE'=>'Bundesland', + 'LBL_LIST_PHONE'=>'Telefon', + 'LBL_LIST_EMAIL_ADDRESS'=>'E-Mail', + 'LBL_LIST_CONTACT_NAME'=>'Person', + + //DON'T CONVERT THESE THEY ARE MAPPINGS + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + + //END DON'T CONVERT + + 'LBL_ACCOUNT'=>'Organisation:', + 'LBL_ACCOUNT_NAME'=>'Organisation:', + 'LBL_PHONE'=>'Telefon:', + 'LBL_WEBSITE'=>'Webseite:', + 'LBL_FAX'=>'Fax:', + 'LBL_TICKER_SYMBOL'=>'Org. Namenszusatz:', + 'LBL_OTHER_PHONE'=>'anderes Telefon:', + 'LBL_ANY_PHONE'=>'weiteres Telefon:', + 'LBL_MEMBER_OF'=>'gehört zu:', + 'LBL_EMAIL'=>'E-Mail:', + 'LBL_EMPLOYEES'=>'Mitarbeiter:', + 'LBL_OTHER_EMAIL_ADDRESS'=>'weitere E-Mail:', + 'LBL_ANY_EMAIL'=>'andere E-Mail:', + 'LBL_OWNERSHIP'=>'Besitzer:', + 'LBL_RATING'=>'Bewertung:', + 'LBL_INDUSTRY'=>'Branche:', + 'LBL_SIC_CODE'=>'Börsen Code:', + 'LBL_TYPE'=>'Typ:', + 'LBL_ANNUAL_REVENUE'=>'Jahresumsatz:', + 'LBL_ADDRESS_INFORMATION'=>'Adresse', + 'LBL_Quote_INFORMATION'=>'Organisation', + 'LBL_CUSTOM_INFORMATION'=>'zusätzliche Information', + 'LBL_BILLING_ADDRESS'=>'Rechnungsadresse:', + 'LBL_SHIPPING_ADDRESS'=>'Lieferadresse:', + 'LBL_ANY_ADDRESS'=>'Andere Adresse:', + 'LBL_CITY'=>'Ort:', + 'LBL_STATE'=>'Bundesland:', + 'LBL_POSTAL_CODE'=>'PLZ:', + 'LBL_COUNTRY'=>'Land:', + 'LBL_DESCRIPTION_INFORMATION'=>'Zusatzinformationen', + 'LBL_DESCRIPTION'=>'Beschreibung:', + 'LBL_TERMS_INFORMATION'=>'Konditionen', + 'NTC_COPY_BILLING_ADDRESS'=>'Kopiere Rechnungsadresse zu Lieferadresse', + 'NTC_COPY_SHIPPING_ADDRESS'=>'Kopiere Lieferadresse zu Rechnungsadresse', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Möchten Sie diesen Eintrag wirklich löschen?', + 'LBL_DUPLICATE'=>'Eventuell doppelte Organisation angelegt', + 'MSG_DUPLICATE' => 'Das Anlegen dieser Organisation führt möglicherweise zu einer doppelten Eintragung. Sie können entweder mit der Auswahl einer Organisation aus der untenstehenden Liste fortfahren oder einen neue Organisation anlegen.', + + 'LBL_INVITEE'=>'Personen', + 'ERR_DELETE_RECORD'=>"Zum Löschen muss mindestens ein Eintrag markiert sein.", + + 'LBL_SELECT_ACCOUNT'=>'Organisation wählen', + 'LBL_GENERAL_INFORMATION'=>'Allgemeine Information', + + //for v4 release added + 'LBL_NEW_POTENTIAL'=>'Neues Verkaufspotential', + 'LBL_POTENTIAL_TITLE'=>'Potentials', + + 'LBL_NEW_TASK'=>'Neue Aufgabe', + 'LBL_TASK_TITLE'=>'Aufgaben', + 'LBL_NEW_CALL'=>'Neuer Anruf', + 'LBL_CALL_TITLE'=>'Anrufe', + 'LBL_NEW_MEETING'=>'Neues Meeting', + 'LBL_MEETING_TITLE'=>'Meetings', + 'LBL_NEW_EMAIL'=>'Neue E-Mail', + 'LBL_EMAIL_TITLE'=>'E-Mails', + 'LBL_NEW_CONTACT'=>'Neue Person', + 'LBL_CONTACT_TITLE'=>'Personen', + + //Added fields after RC1 - Release + 'LBL_ALL'=>'Alle', + 'LBL_PROSPECT'=>'Potentieller Kunde', + 'LBL_INVESTOR'=>'Investor', + 'LBL_RESELLER'=>'Wiederverkäufer', + 'LBL_PARTNER'=>'Partner', + + // Added for 4GA + 'LBL_TOOL_FORM_TITLE'=>'Werkzeuge', + //Added for 4GA + 'Subject'=>'Titel', + 'Quote Name'=>'Angebot', + 'Vendor Name'=>'Anbieter', + 'Invoice Terms'=>'Rechnungsbedingungen', + 'Contact Name'=>'Kontaktname',//to include contact name field in Invoice + 'Invoice Date'=>'Rechnungsdatum', + 'Sub Total'=>'Zwischensumme', + 'Due date'=>'Fälligkeit', + 'Carrier'=>'Transporteur', + 'Type'=>'Typ', + 'Sales Tax'=>'Verkaufssteuer', + 'Sales Commission'=>'Provision', + 'Excise Duty'=>'Abgaben', + 'Total'=>'Total', + 'Product Name'=>'Produktname', + 'Assigned To'=>'zuständig', + 'Billing Address'=>'Rechnungsadresse Strasse', + 'Shipping Address'=>'Lieferadresse Strasse', + 'Billing City'=>'Rechnungsadresse Ort', + 'Billing State'=>'Rechnungsadresse Bundesland', + 'Billing Code'=>'Rechnungsadresse PLZ', + 'Billing Country'=>'Rechnungsadresse Land', + 'Billing Po Box'=>'Rechnungsadresse Postfachnr.', + 'Shipping Po Box'=>'Lieferadresse Postfachnr.', + 'Shipping City'=>'Lieferadresse Ort', + 'Shipping State'=>'Lieferadresse Bundesland', + 'Shipping Code'=>'Lieferadresse PLZ', + 'Shipping Country'=>'Lieferadresse Land', + 'City'=>'Ort', + 'State'=>'Bundesland', + 'Code'=>'Code', + 'Country'=>'Land', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Description'=>'Beschreibung', + 'Potential Name'=>'Verkaufspotential', + 'Customer No'=>'Kundenzeichen', + 'Sales Order'=>'Bestellung', + 'Pending'=>'hängig', + 'Account Name'=>'Organisation', + 'Terms & Conditions'=>'Geschäftsbedingungen', + //Quote Info + 'LBL_INVOICE_INFORMATION'=>'Rechnungs Information', + 'LBL_INVOICE'=>'Rechnung:', + 'LBL_SO_INFORMATION'=>'Bestellungs Information', + 'LBL_SO'=>'Bestellung:', + + //Added in release 4.2 + 'LBL_SUBJECT'=>'Gegenstand:', + 'LBL_SALES_ORDER'=>'Bestellung:', + 'Invoice Id'=>'Rechnungsnummer', + 'LBL_MY_TOP_INVOICE'=>'meine top Rechnungen', + 'LBL_INVOICE_NAME'=>'Rechnung:', + 'Purchase Order'=>'Auftrag:', + 'Status'=>'Status', + 'Id'=>'Rechnungsnummer', + 'Invoice'=>'Rechnung', + + //Added for existing Picklist Entries + + 'Created'=>'erzeugt', + 'Approved'=>'bestätigt', + 'Sent'=>'gesendet', + 'Credit Invoice'=>'Gutschrift', + 'Paid'=>'bezahlt', + 'AutoCreated'=>'automatisch erzeugt', + //Added to Custom Invoice Number + 'Invoice No'=>'Rechnungsnr.', + 'Adjustment'=>'Anpassung', + + //Added for Reports (5.0.4) + 'Tax Type'=>'Steuertyp', + 'Discount Percent'=>'Rabatt in Prozent', + 'Discount Amount'=>'Rabattbetrag', + 'No'=>'Nr.', + 'Date'=>'Datum', + + // Added affter 5.0.4 GA + //Added for Documents module + 'Documents'=>'Dokumente', + + 'SINGLE_Invoice'=>'Rechnung', + 'Invoice ID'=>'Rechnungs-ID', +); + +?> \ No newline at end of file diff --git a/modules/Invoice/language/en_gb.lang.php b/modules/Invoice/language/en_gb.lang.php new file mode 100644 index 0000000..dfbc421 --- /dev/null +++ b/modules/Invoice/language/en_gb.lang.php @@ -0,0 +1,161 @@ + 'Invoice', + 'LBL_SO_MODULE_NAME' => 'Invoice', + 'LBL_RELATED_PRODUCTS' => 'Product Details', + 'LBL_MODULE_TITLE' => 'Invoice: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Invoice Search', + 'LBL_LIST_FORM_TITLE' => 'Invoice List', + 'LBL_LIST_SO_FORM_TITLE' => 'Sales Order List', + 'LBL_NEW_FORM_TITLE' => 'New Invoice', + 'LBL_NEW_FORM_SO_TITLE' => 'New Sales Order', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Member Organisations', + 'LBL_LIST_ACCOUNT_NAME' => 'Organisation Name', + 'LBL_LIST_CITY' => 'City', + 'LBL_LIST_WEBSITE' => 'Website', + 'LBL_LIST_STATE' => 'County', + 'LBL_LIST_PHONE' => 'Phone', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email Address', + 'LBL_LIST_CONTACT_NAME' => 'Contact Name', + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + 'LBL_ACCOUNT' => 'Organisation:', + 'LBL_ACCOUNT_NAME' => 'Organisation Name:', + 'LBL_PHONE' => 'Phone:', + 'LBL_WEBSITE' => 'Website:', + 'LBL_FAX' => 'Fax:', + 'LBL_TICKER_SYMBOL' => 'Ticker Symbol:', + 'LBL_OTHER_PHONE' => 'Other Phone:', + 'LBL_ANY_PHONE' => 'Any Phone:', + 'LBL_MEMBER_OF' => 'Member of:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMPLOYEES' => 'Employees:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:', + 'LBL_ANY_EMAIL' => 'Any Email:', + 'LBL_OWNERSHIP' => 'Ownership:', + 'LBL_RATING' => 'Rating:', + 'LBL_INDUSTRY' => 'Industry:', + 'LBL_SIC_CODE' => 'SIC Code:', + 'LBL_TYPE' => 'Type:', + 'LBL_ANNUAL_REVENUE' => 'Annual Revenue:', + 'LBL_ADDRESS_INFORMATION' => 'Address Information', + 'LBL_Quote_INFORMATION' => 'Organisation Information', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_BILLING_ADDRESS' => 'Invoice Address:', + 'LBL_SHIPPING_ADDRESS' => 'Delivery Address:', + 'LBL_ANY_ADDRESS' => 'Any Address:', + 'LBL_CITY' => 'City:', + 'LBL_STATE' => 'County:', + 'LBL_POSTAL_CODE' => 'Postcode:', + 'LBL_COUNTRY' => 'Country:', + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', + 'LBL_DESCRIPTION' => 'Description:', + 'LBL_TERMS_INFORMATION' => 'Terms and Conditions', + 'NTC_COPY_BILLING_ADDRESS' => 'Copy invoice address to delivery address', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Copy delivery address to invoice address', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Are you sure you want to remove this record as a member organisation?', + 'LBL_DUPLICATE' => 'Potential Duplicate Organisations', + 'MSG_DUPLICATE' => 'Creating this Organisation may potentialy create a duplicate. You may either select an Organisation from the list below or you may click on Create New Organisation to continue creating a new Organisation with the previously entered data.', + 'LBL_INVITEE' => 'Contacts', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the Organisation', + 'LBL_SELECT_ACCOUNT' => 'Select Organisation', + 'LBL_GENERAL_INFORMATION' => 'General Information', + 'LBL_NEW_POTENTIAL' => 'New Opportunity', + 'LBL_POTENTIAL_TITLE' => 'Opportunities', + 'LBL_NEW_TASK' => 'New Task', + 'LBL_TASK_TITLE' => 'Tasks', + 'LBL_NEW_CALL' => 'New Call', + 'LBL_CALL_TITLE' => 'Calls', + 'LBL_NEW_MEETING' => 'New Meeting', + 'LBL_MEETING_TITLE' => 'Meetings', + 'LBL_NEW_EMAIL' => 'New Email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_CONTACT' => 'New Contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_ALL' => 'All', + 'LBL_PROSPECT' => 'Prospect', + 'LBL_INVESTOR' => 'Investor', + 'LBL_RESELLER' => 'Reseller', + 'LBL_PARTNER' => 'Partner', + 'LBL_TOOL_FORM_TITLE' => 'Organisation Tools', + 'Subject' => 'Subject', + 'Quote Name' => 'Quote Name', + 'Vendor Name' => 'Vendor Name', + 'Invoice Terms' => 'Invoice Terms', + 'Contact Name' => 'Contact Name', + 'Invoice Date' => 'Invoice Date', + 'Sub Total' => 'Sub Total', + 'Due date' => 'Due Date', + 'Carrier' => 'Carrier', + 'Type' => 'Type', + 'Sales Tax' => 'VAT', + 'Sales Commission' => 'Sales Commission', + 'Excise Duty' => 'Excise Duty', + 'Total' => 'Total', + 'Product Name' => 'Product Name', + 'Assigned To' => 'Assigned To', + 'Billing Address' => 'Invoice Address', + 'Shipping Address' => 'Delivery Address', + 'Billing City' => 'Invoice City', + 'Billing State' => 'Invoice County', + 'Billing Code' => 'Invoice Postcode', + 'Billing Country' => 'Invoice Country', + 'Billing Po Box' => 'Invoice PO Box', + 'Shipping Po Box' => 'Delivery PO Box', + 'Shipping City' => 'Delivery City', + 'Shipping State' => 'Delivery County', + 'Shipping Code' => 'Delivery Postcode', + 'Shipping Country' => 'Delivery Country', + 'City' => 'City', + 'State' => 'County', + 'Code' => 'Code', + 'Country' => 'Country', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Description' => 'Description', + 'Potential Name' => 'Opportunity Name', + 'Customer No' => 'Customer No.', + 'Sales Order' => 'Sales Order', + 'Pending' => 'Pending', + 'Account Name' => 'Organisation Name', + 'Terms & Conditions' => 'Terms and Conditions', + 'LBL_INVOICE_INFORMATION' => 'Invoice Information', + 'LBL_INVOICE' => 'Invoice:', + 'LBL_SO_INFORMATION' => 'Sales Order Information', + 'LBL_SO' => 'Sales Order:', + 'LBL_SUBJECT' => 'Subject:', + 'LBL_SALES_ORDER' => 'Sales order:', + 'Invoice Id' => 'Invoice ID', + 'LBL_MY_TOP_INVOICE' => 'My Top Open Invoice', + 'LBL_INVOICE_NAME' => 'Invoice Name:', + 'Purchase Order' => 'Purchase Order', + 'Status' => 'Status', + 'Id' => 'Invoice ID', + 'Invoice' => 'Invoice', + 'Created' => 'Created', + 'Approved' => 'Approved', + 'Sent' => 'Sent', + 'Credit Invoice' => 'Credit Invoice', + 'Paid' => 'Paid', + 'AutoCreated' => 'Auto Created', + 'Invoice No' => 'Invoice No.', + 'Adjustment' => 'Adjustment', + 'Tax Type' => 'Tax Type', + 'Discount Percent' => 'Discount Percent', + 'Discount Amount' => 'Discount Amount', + 'No' => 'No', + 'Date' => 'Date', + 'Documents' => 'Documents', + 'SINGLE_Invoice' => 'Invoice', +); +?> \ No newline at end of file diff --git a/modules/Invoice/language/en_us.lang.php b/modules/Invoice/language/en_us.lang.php new file mode 100644 index 0000000..0b05cd0 --- /dev/null +++ b/modules/Invoice/language/en_us.lang.php @@ -0,0 +1,204 @@ +'Invoice', +'LBL_SO_MODULE_NAME'=>'Invoice', +'LBL_RELATED_PRODUCTS'=>'Product Details', +'LBL_MODULE_TITLE'=>'Invoice: Home', +'LBL_SEARCH_FORM_TITLE'=>'Invoice Search', +'LBL_LIST_FORM_TITLE'=>'Invoice List', +'LBL_LIST_SO_FORM_TITLE'=>'Sales Order List', +'LBL_NEW_FORM_TITLE'=>'New Invoice', +'LBL_NEW_FORM_SO_TITLE'=>'New Sales Order', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Member Organizations', + +'LBL_LIST_ACCOUNT_NAME'=>'Organization Name', +'LBL_LIST_CITY'=>'City', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'State', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_EMAIL_ADDRESS'=>'Email Address', +'LBL_LIST_CONTACT_NAME'=>'Contact Name', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Organization:', +'LBL_ACCOUNT_NAME'=>'Organization Name:', +'LBL_PHONE'=>'Phone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbol:', +'LBL_OTHER_PHONE'=>'Other Phone:', +'LBL_ANY_PHONE'=>'Any Phone:', +'LBL_MEMBER_OF'=>'Member of:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Employees:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Other Email:', +'LBL_ANY_EMAIL'=>'Any Email:', +'LBL_OWNERSHIP'=>'Ownership:', +'LBL_RATING'=>'Rating:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_SIC_CODE'=>'SIC Code:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_Quote_INFORMATION'=>'Organization Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', +'LBL_BILLING_ADDRESS'=>'Billing Address:', +'LBL_SHIPPING_ADDRESS'=>'Shipping Address:', +'LBL_ANY_ADDRESS'=>'Any Address:', +'LBL_CITY'=>'City:', +'LBL_STATE'=>'State:', +'LBL_POSTAL_CODE'=>'Postal Code:', +'LBL_COUNTRY'=>'Country:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', +'LBL_TERMS_INFORMATION'=>'Terms & Conditions', +'NTC_COPY_BILLING_ADDRESS'=>'Copy billing address to shipping address', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copy shipping address to billing address', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Are you sure you want to remove this record as a member organization?', +'LBL_DUPLICATE'=>'Opportunity Duplicate Organizations', +'MSG_DUPLICATE' => 'Creating this vtiger_account may vtiger_potentialy create a duplicate vtiger_account. You may either select an vtiger_account from the list below or you may click on Create New Organization to continue creating a new vtiger_account with the previously entered data.', + +'LBL_INVITEE'=>'Contacts', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", + +'LBL_SELECT_ACCOUNT'=>'Select Organization', +'LBL_GENERAL_INFORMATION'=>'General Information', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Opportunity', +'LBL_POTENTIAL_TITLE'=>'Opportunities', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investor', +'LBL_RESELLER'=>'Reseller', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Organization Tools', +//Added for 4GA +'Subject'=>'Subject', +'Quote Name'=>'Quote Name', +'Vendor Name'=>'Vendor Name', +'Invoice Terms'=>'Invoice Terms', +'Contact Name'=>'Contact Name',//to include contact name vtiger_field in Invoice +'Invoice Date'=>'Invoice Date', +'Sub Total'=>'Sub Total', +'Due date'=>'Due Date', +'Carrier'=>'Carrier', +'Type'=>'Type', +'Sales Tax'=>'Sales Tax', +'Sales Commission'=>'Sales Commission', +'Excise Duty'=>'Excise Duty', +'Total'=>'Total', +'Product Name'=>'Product Name', +'Assigned To'=>'Assigned To', +'Billing Address'=>'Billing Address', +'Shipping Address'=>'Shipping Address', +'Billing City'=>'Billing City', +'Billing State'=>'Billing State', +'Billing Code'=>'Billing Postal Code', +'Billing Country'=>'Billing Country', +'Billing Po Box'=>'Billing PO Box', +'Shipping Po Box'=>'Shipping PO Box', +'Shipping City'=>'Shipping City', +'Shipping State'=>'Shipping State', +'Shipping Code'=>'Shipping Postal Code', +'Shipping Country'=>'Shipping Country', +'City'=>'City', +'State'=>'State', +'Code'=>'Code', +'Country'=>'Country', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Description'=>'Description', +'Potential Name'=>'Opportunity Name', +'Customer No'=>'Customer No', +'Sales Order'=>'Sales Order', +'Pending'=>'Pending', +'Account Name'=>'Organization Name', +'Terms & Conditions'=>'Terms & Conditions', +//Quote Info +'LBL_INVOICE_INFORMATION'=>'Invoice Information', +'LBL_INVOICE'=>'Invoice:', +'LBL_SO_INFORMATION'=>'Sales Order Information', +'LBL_SO'=>'Sales Order:', + +//Added in release 4.2 +'LBL_SUBJECT'=>'Subject:', +'LBL_SALES_ORDER'=>'Sales order:', +'Invoice Id'=>'Invoice Id', +'LBL_MY_TOP_INVOICE'=>'My Top Open Invoice', +'LBL_INVOICE_NAME'=>'Invoice Name:', +'Purchase Order'=>'Purchase Order', +'Status'=>'Status', +'Id'=>'Invoice Id', +'Invoice'=>'Invoice', + +//Added for existing Picklist Entries + +'Created'=>'Created', +'Approved'=>'Approved', +'Sent'=>'Sent', +'Credit Invoice'=>'Credit Invoice', +'Paid'=>'Paid', +'AutoCreated'=>'AutoCreated', +//Added to Custom Invoice Number +'Invoice No'=>'Invoice No', +'Adjustment'=>'Adjustment', + +//Added for Reports (5.0.4) +'Tax Type'=>'Tax Type', +'Discount Percent'=>'Discount Percent', +'Discount Amount'=>'Discount Amount', +'No'=>'No', +'Date'=>'Date', + +// Added affter 5.0.4 GA +//Added for Documents module +'Documents'=>'Documents', + +'SINGLE_Invoice'=>'Invoice', +'Invoice ID'=>'Invoice ID', +); + +?> diff --git a/modules/Invoice/language/es_es.lang.php b/modules/Invoice/language/es_es.lang.php new file mode 100644 index 0000000..ca1e7ac --- /dev/null +++ b/modules/Invoice/language/es_es.lang.php @@ -0,0 +1,203 @@ +'Facturas', +'SINGLE_Invoice'=>'Factura', +'LBL_SO_MODULE_NAME'=>'Factura', +'LBL_RELATED_PRODUCTS'=>'Elementos', +'LBL_MODULE_TITLE'=>'Factura: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Factura', +'LBL_LIST_FORM_TITLE'=>'Lista de Facturas', +'LBL_LIST_SO_FORM_TITLE'=>'Listado de Pedidos', +'LBL_NEW_FORM_TITLE'=>'Nueva Factura', +'LBL_NEW_FORM_SO_TITLE'=>'Nuevo Pedido', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Organizaciones Miembro', + +'LBL_LIST_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_LIST_CITY'=>'Población', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_STATE'=>'Provincia', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_EMAIL_ADDRESS'=>'Direccion de Email', +'LBL_LIST_CONTACT_NAME'=>'Persona de Contacto', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Cuenta:', +'LBL_ACCOUNT_NAME'=>'Nombre de la cuenta:', +'LBL_PHONE'=>'Teléfono:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Abreviatura de bolsa:', +'LBL_OTHER_PHONE'=>'Tel. Directo:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_MEMBER_OF'=>'Miembro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empleados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email (Alternativo):', +'LBL_OWNERSHIP'=>'Propietario:', +'LBL_RATING'=>'Valoración:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_SIC_CODE'=>'CIF:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Ingresos Anuales:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_Quote_INFORMATION'=>'Información de la Empresa', +'LBL_CUSTOM_INFORMATION'=>'Información personalizada', +'LBL_BILLING_ADDRESS'=>'Dirección (Factura):', +'LBL_SHIPPING_ADDRESS'=>'Dirección (Envío):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Población:', +'LBL_STATE'=>'Provincia:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Información Adicional', +'LBL_DESCRIPTION'=>'Descripción:', +'LBL_TERMS_INFORMATION'=>'Condiciones Generales', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar Factura a Envío', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar Envío a Factura', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'¿Esta seguro que desea eliminar este expediente como organización miembro?', +'LBL_DUPLICATE'=>'Potenciales Cuentas Duplicadas', +'MSG_DUPLICATE' => 'Al dar de alta esta cuenta puede que se cree una cuenta duplicada. Puede seleccionar una cuenta del listado inferior o hacer click en Crear Nueva Cuenta para continuar creando la cuenta con los datos introducidos.', + +'LBL_INVITEE'=>'Contactos', +'ERR_DELETE_RECORD'=>" Debe especificar un registro para poder suprimir la cuenta.", + +'LBL_SELECT_ACCOUNT'=>'Seleccionar cuenta', +'LBL_GENERAL_INFORMATION'=>'Informació General', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nueva Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Nueva Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Nueva Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todos', +'LBL_PROSPECT'=>'Prospección', +'LBL_INVESTOR'=>'Inversionista', +'LBL_RESELLER'=>'Revendedor', +'LBL_PARTNER'=>'Socio', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Cuenta', +//Added for 4GA +'Subject'=>'Referencia', +'Quote Name'=>'Nombre del Presupuesto', +'Vendor Name'=>'Nombre del Proveedor', +'Invoice Terms'=>'Condiciones Generales de Facturación', +'Contact Name'=>'Persona de Contacto',//to include contact name field in Invoice +'Invoice Date'=>'Fecha de Factura', +'Sub Total'=>'Total', +'Due date'=>'Vencimiento', +'Carrier'=>'Transportista', +'Type'=>'Tipo', +'Sales Tax'=>'Impuesto sobre Ventas', +'Sales Commission'=>'Comisión sobre Ventas', +'Excise Duty'=>'Aranceles', +'Total'=>'Total', +'Product Name'=>'Nombre del Producto', +'Assigned To'=>'Asignado a', +'Billing Address'=>'Dirección (Facturación)', +'Shipping Address'=>'Dirección (Envío)', +'Billing City'=>'Población (Facturación)', +'Billing State'=>'Provincia (Facturación)', +'Billing Code'=>'Código (Facturación)', +'Billing Country'=>'País (Facturación)', +'Billing Po Box'=>'Apdo. de Correos (Facturación)', +'Shipping Po Box'=>'Apdo. de Correos (Envío)', +'Shipping City'=>'Población (Envío)', +'Shipping State'=>'Provincia (Envío)', +'Shipping Code'=>'Código (Envío)', +'Shipping Country'=>'País (Envío)', +'City'=>'Población', +'State'=>'Provincia', +'Code'=>'Código Postal', +'Country'=>'País', +'Created Time'=>'Fecha de creación', +'Modified Time'=>'Última Modificación', +'Description'=>'Descripción', +'Potential Name'=>'Nombre de la Oportunidad', +'Customer No'=>'Código de cliente', +'Sales Order'=>'Pedido', +'Pending'=>'Pendientes', +'Account Name'=>'Nombre de la cuenta', +//Quote Info +'LBL_INVOICE_INFORMATION'=>'Información de la Facturación', +'LBL_INVOICE'=>'Facturación:', +'LBL_SO_INFORMATION'=>'Información de Pedido', +'LBL_SO'=>'Pedido:', + +//Added in release 4.2 +'LBL_SUBJECT'=>'Referencia:', +'LBL_SALES_ORDER'=>'Pedido:', +'Invoice Id'=>'Identificador de la Factura', +'LBL_MY_TOP_INVOICE'=>'Mis Facturas pendientes', +'LBL_INVOICE_NAME'=>'Nombre de la Factura:', +'Purchase Order'=>'Orden de Compra', +'Status'=>'Estado', +'Id'=>'Número de Factura', +'Invoice'=>'Factura', + +//Added for existing Picklist Entries + +'Created'=>'Creada', +'Approved'=>'Aprobada', +'Sent'=>'Enviada', +'Credit Invoice'=>'Rectificativa', +'Paid'=>'Pagada', +'AutoCreated'=>'Automática', +//Added to Custom Invoice Number +'Invoice No'=>'Nº Factura', +'Adjustment'=>'Ajuste', + +//Added for Reports (5.0.4) +'Tax Type'=>'Impuesto', +'Discount Percent'=>'Descuento %', +'Discount Amount'=>'Descuento Importe', +'Terms & Conditions'=>'Condiciones Generales', +'No'=>'No', +'Date'=>'Fecha', + +// Added affter 5.0.4 GA +//Added for Documents module +'Documents'=>'Documentos', +'Invoice ID'=>'Id Factura', +); + +?> diff --git a/modules/Invoice/language/es_mx.lang.php b/modules/Invoice/language/es_mx.lang.php new file mode 100644 index 0000000..eba29e4 --- /dev/null +++ b/modules/Invoice/language/es_mx.lang.php @@ -0,0 +1,205 @@ +'Facturas', +'SINGLE_Invoice'=>'Factura', +'LBL_SO_MODULE_NAME'=>'Factura', +'LBL_RELATED_PRODUCTS'=>'Elementos', +'LBL_MODULE_TITLE'=>'Factura: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Factura', +'LBL_LIST_FORM_TITLE'=>'Lista de Facturas', +'LBL_LIST_SO_FORM_TITLE'=>'Listado de Pedidos', +'LBL_NEW_FORM_TITLE'=>'Nueva Factura', +'LBL_NEW_FORM_SO_TITLE'=>'Nuevo Pedido', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Organizaciones Miembro', + +'LBL_LIST_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_LIST_CITY'=>'Deleg./Mpio.', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_STATE'=>'Estado', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_EMAIL_ADDRESS'=>'Direccion de Email', +'LBL_LIST_CONTACT_NAME'=>'Persona de Contacto', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Cuenta:', +'LBL_ACCOUNT_NAME'=>'Nombre de la cuenta:', +'LBL_PHONE'=>'Teléfono:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Símbolo de bolsa:', +'LBL_OTHER_PHONE'=>'Tel. Directo:', +'LBL_ANY_PHONE'=>'Tel. Adicional:', +'LBL_MEMBER_OF'=>'Miembro de:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'Empleados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Email (Otro):', +'LBL_ANY_EMAIL'=>'Email (Alternativo):', +'LBL_OWNERSHIP'=>'Propietario:', +'LBL_RATING'=>'Valoración:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_SIC_CODE'=>'RFC:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Ingresos Anuales:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_Quote_INFORMATION'=>'Información de la Empresa', +'LBL_CUSTOM_INFORMATION'=>'Información personalizada', +'LBL_BILLING_ADDRESS'=>'Dirección (Factura):', +'LBL_SHIPPING_ADDRESS'=>'Dirección (Envío):', +'LBL_ANY_ADDRESS'=>'Dirección (Alternativa):', +'LBL_CITY'=>'Deleg./Mpio.:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'Código Postal:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Información Adicional', +'LBL_DESCRIPTION'=>'Descripción:', +'LBL_TERMS_INFORMATION'=>'Condiciones Generales', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar Factura a Envío', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar Envío a Factura', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'¿Esta seguro que desea eliminar este expediente como organización miembro?', +'LBL_DUPLICATE'=>'Posibles Cuentas Duplicadas', +'MSG_DUPLICATE' => 'Al dar de alta esta cuenta puede que se cree una cuenta duplicada. Puede seleccionar una cuenta del listado inferior o hacer click en Crear Nueva Cuenta para continuar creando la cuenta con los datos introducidos.', + +'LBL_INVITEE'=>'Contactos', +'ERR_DELETE_RECORD'=>" Debe especificar un registro para poder suprimir la cuenta.", + +'LBL_SELECT_ACCOUNT'=>'Seleccionar cuenta', +'LBL_GENERAL_INFORMATION'=>'Informació General', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nueva Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Nueva Llamada', +'LBL_CALL_TITLE'=>'Llamadas', +'LBL_NEW_MEETING'=>'Nueva Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todos', +'LBL_PROSPECT'=>'Prospecto', +'LBL_INVESTOR'=>'Inversionista', +'LBL_RESELLER'=>'Revendedor', +'LBL_PARTNER'=>'Socio', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Cuenta', +//Added for 4GA +'Subject'=>'Referencia', +'Quote Name'=>'Nombre de la Cotización', +'Vendor Name'=>'Nombre del Proveedor', +'Invoice Terms'=>'Condiciones Generales de Facturación', +'Contact Name'=>'Persona de Contacto',//to include contact name field in Invoice +'Invoice Date'=>'Fecha de Factura', +'Sub Total'=>'Total', +'Due date'=>'Vencimiento', +'Carrier'=>'Transportista', +'Type'=>'Tipo', +'Sales Tax'=>'Impuesto sobre Ventas', +'Sales Commission'=>'Comisión sobre Ventas', +'Excise Duty'=>'Impuestos', +'Total'=>'Total', +'Product Name'=>'Nombre del Producto', +'Assigned To'=>'Asignado a', +'Billing Address'=>'Dirección (Facturación)', +'Shipping Address'=>'Dirección (Envío)', +'Billing City'=>'Deleg./Mpio. (Facturación)', +'Billing State'=>'Estado (Facturación)', +'Billing Code'=>'Código (Facturación)', +'Billing Country'=>'País (Facturación)', +'Billing Po Box'=>'Colonia (Facturación)', +'Shipping Po Box'=>'Colonia (Envío)', +'Shipping City'=>'Deleg./Mpio. (Envío)', +'Shipping State'=>'Estado (Envío)', +'Shipping Code'=>'Código (Envío)', +'Shipping Country'=>'País (Envío)', +'City'=>'Deleg./Mpio.', +'State'=>'Estado', +'Code'=>'Código Postal', +'Country'=>'País', +'Created Time'=>'Fecha de creación', +'Modified Time'=>'Última Modificación', +'Description'=>'Descripción', +'Potential Name'=>'Nombre de la Oportunidad', +'Customer No'=>'Código de cliente', +'Sales Order'=>'Pedido', +'Pending'=>'Pendientes', +'Account Name'=>'Nombre de la cuenta', +'Terms & Conditions'=>'Condiciones Generales', +//Quote Info +'LBL_INVOICE_INFORMATION'=>'Información de la Facturación', +'LBL_INVOICE'=>'Facturación:', +'LBL_SO_INFORMATION'=>'Información de Pedido', +'LBL_SO'=>'Pedido:', + +//Added in release 4.2 +'LBL_SUBJECT'=>'Referencia:', +'LBL_SALES_ORDER'=>'Pedido:', +'Invoice Id'=>'Identificador de la Factura', +'LBL_MY_TOP_INVOICE'=>'Mis Facturas pendientes', +'LBL_INVOICE_NAME'=>'Nombre de la Factura:', +'Purchase Order'=>'Orden de Compra', +'Status'=>'Estado', +'Id'=>'Número de Factura', +'Invoice'=>'Factura', + +//Added for existing Picklist Entries + +'Created'=>'Creada', +'Approved'=>'Aprobada', +'Sent'=>'Enviada', +'Credit Invoice'=>'a Crédito', +'Paid'=>'Pagada', +'AutoCreated'=>'Automática', +//Added to Custom Invoice Number +'Invoice No'=>'Nº Factura', +'Adjustment'=>'Ajuste', + +//Added for Reports (5.0.4) +'Tax Type'=>'Impuesto', +'Discount Percent'=>'Descuento %', +'Discount Amount'=>'Descuento Importe', +'Terms & Conditions'=>'Terminos y Condiciones', +'No'=>'No', +'Date'=>'Fecha', + +// Added affter 5.0.4 GA +//Added for Documents module +'Documents'=>'Documentos', +'Invoice ID'=>'Id Factura', +); + +?> diff --git a/modules/Invoice/language/fr_fr.lang.php b/modules/Invoice/language/fr_fr.lang.php new file mode 100644 index 0000000..2e3e2eb --- /dev/null +++ b/modules/Invoice/language/fr_fr.lang.php @@ -0,0 +1,165 @@ + 'Facture', + 'LBL_SO_MODULE_NAME' => 'Facture', + 'LBL_RELATED_PRODUCTS' => 'Produits en relation', + 'LBL_MODULE_TITLE' => 'Facture : accueil', + 'LBL_SEARCH_FORM_TITLE' => 'Rechercher une facture', + 'LBL_LIST_FORM_TITLE' => 'Liste factures', + 'LBL_LIST_SO_FORM_TITLE' => 'Liste ventes', + 'LBL_NEW_FORM_TITLE' => 'Nouvelle facture', + 'LBL_NEW_FORM_SO_TITLE' => 'Nouvelle vente', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Filiale de', + 'LBL_LIST_ACCOUNT_NAME' => 'Nom compte', + 'LBL_LIST_CITY' => 'Ville', + 'LBL_LIST_WEBSITE' => 'Site Web', + 'LBL_LIST_STATE' => 'Département', + 'LBL_LIST_PHONE' => 'Téléphone', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email', + 'LBL_LIST_CONTACT_NAME' => 'Nom contact', + 'db_name' => LBL_LIST_ACCOUNT_NAME, + 'db_website' => LBL_LIST_WEBSITE, + 'db_billing_address_city' => LBL_LIST_CITY, + 'LBL_ACCOUNT' => 'Compte :', + 'LBL_ACCOUNT_NAME' => 'Nom compte :', + 'LBL_PHONE' => 'Téléphone :', + 'LBL_WEBSITE' => 'Site Web :', + 'LBL_FAX' => 'Fax :', + 'LBL_TICKER_SYMBOL' => 'Symbole boursier :', + 'LBL_OTHER_PHONE' => 'Téléphone (alt.) :', + 'LBL_ANY_PHONE' => 'Téléphone (alt.) :', + 'LBL_MEMBER_OF' => 'Filiale de :', + 'LBL_EMAIL' => 'Email :', + 'LBL_EMPLOYEES' => 'Employés :', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email (alt.) :', + 'LBL_ANY_EMAIL' => 'Email (alt.) :', + 'LBL_OWNERSHIP' => 'Propriétaire :', + 'LBL_RATING' => 'Etat :', + 'LBL_INDUSTRY' => 'Secteur :', + 'LBL_SIC_CODE' => 'Code APE :', + 'LBL_TYPE' => 'Type :', + 'LBL_ANNUAL_REVENUE' => 'C.A. annuel :', + 'LBL_ADDRESS_INFORMATION' => 'Adresse', + 'LBL_Quote_INFORMATION' => 'Détail compte', + 'LBL_CUSTOM_INFORMATION' => 'Informations personnalisées', + 'LBL_BILLING_ADDRESS' => 'Adresse (facturation) :', + 'LBL_SHIPPING_ADDRESS' => 'Adresse (livraison) :', + 'LBL_ANY_ADDRESS' => 'Adresse (alt.) :', + 'LBL_CITY' => 'Ville :', + 'LBL_STATE' => 'Département :', + 'LBL_POSTAL_CODE' => 'Code postal :', + 'LBL_COUNTRY' => 'Pays :', + 'LBL_DESCRIPTION_INFORMATION' => 'Information description', + 'LBL_DESCRIPTION' => 'Description :', + 'LBL_TERMS_INFORMATION' => 'Conditions particulières', + 'NTC_COPY_BILLING_ADDRESS' => 'Utiliser adresse de facturation pour la livraison', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Utiliser adresse de livraison pour la facturation', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Etes-vous certain de vouloir retirer cet enregistrement des membres de ce groupe ?', + 'LBL_DUPLICATE' => 'Compte en doublon probable', + 'MSG_DUPLICATE' => 'Créer ce compte engendrera probablement un doublon. Vous pouvez au choix, forcer la création de ce compte ou en sélectionner un dans la liste ci-dessous', + 'LBL_INVITEE' => 'Contacts', + 'ERR_DELETE_RECORD' => 'Une référence doit être spécifiée pour supprimer l\'enregistrement.', + 'LBL_SELECT_ACCOUNT' => 'Sélectionner un compte', + 'LBL_GENERAL_INFORMATION' => 'Informations générales', + 'LBL_NEW_POTENTIAL' => 'Ajouter affaire', + 'LBL_POTENTIAL_TITLE' => 'Affaires', + 'LBL_NEW_TASK' => 'Ajouter tâche', + 'LBL_TASK_TITLE' => 'Tâches', + 'LBL_NEW_CALL' => 'Ajouter appel', + 'LBL_CALL_TITLE' => 'Appels', + 'LBL_NEW_MEETING' => 'Ajouter rendez-vous', + 'LBL_MEETING_TITLE' => 'Rendez-vous', + 'LBL_NEW_EMAIL' => 'Ajouter email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_CONTACT' => 'Ajouter contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_ALL' => 'Tout', + 'LBL_PROSPECT' => 'Prospect', + 'LBL_INVESTOR' => 'Investisseur', + 'LBL_RESELLER' => 'Revendeur', + 'LBL_PARTNER' => 'Partenaire', + 'LBL_TOOL_FORM_TITLE' => 'Outils', + 'Subject' => 'Objet', + 'Quote Name' => 'Nom devis', + 'Vendor Name' => 'Nom vendeur', + 'Invoice Terms' => 'Conditions', + 'Contact Name' => 'Nom contact', + 'Invoice Date' => 'Date facturation', + 'Sub Total' => 'Sous-total', + 'Due Date' => 'Echéance', + 'Carrier' => 'Transporteur', + 'Type' => 'Type', + 'Sales Tax' => 'Taxe', + 'Sales Commission' => 'Commission', + 'Excise Duty' => 'Remise', + 'Total' => 'Total', + 'Product Name' => 'Nom produit', + 'Assigned To' => 'Assigné à', + 'Billing Address' => 'Adresse (facturation)', + 'Shipping Address' => 'Adresse (livraison)', + 'Billing City' => 'Ville (facturation)', + 'Billing State' => 'Département (facturation)', + 'Billing Code' => 'Code postal (facturation)', + 'Billing Country' => 'Pays (facturation)', + 'Billing Po Box' => 'Boite postale (facturation)', + 'Shipping Po Box' => 'Boite postale (livraison)', + 'Shipping City' => 'Ville (livraison)', + 'Shipping State' => 'Département (livraison)', + 'Shipping Code' => 'Code postal (livraison)', + 'Shipping Country' => 'Pays (livraison)', + 'City' => 'Ville', + 'State' => 'Département', + 'Code' => 'Code postal', + 'Country' => 'Pays', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Description' => 'Description', + 'Potential Name' => 'Nom affaire', + 'Customer No' => 'Ref', + 'Sales Order' => 'Bon de commande', + 'Pending' => 'En attente', + 'Account Name' => 'Nom compte', + 'Terms & Conditions' => 'Conditions générales', + 'LBL_INVOICE_INFORMATION' => 'Détail facture', + 'LBL_INVOICE' => 'Facture:', + 'LBL_SO_INFORMATION' => 'Détail vente', + 'LBL_SO' => 'Bon de commande', + 'LBL_SUBJECT' => 'Objet :', + 'LBL_SALES_ORDER' => 'Bon de commande', + 'Invoice Id' => 'Ref', + 'LBL_MY_TOP_INVOICE' => 'Top factures', + 'LBL_INVOICE_NAME' => 'Nom facture :', + 'Purchase Order' => 'Commande fournisseur', + 'Status' => 'Statut', + 'Id' => 'Ref', + 'Invoice' => 'Facture', + 'Created' => 'Créé', + 'Approved' => 'Approuvé', + 'Sent' => 'Envoyé', + 'AutoCreated' => 'Créé automatiquement', + 'Credit Invoice' => 'Crédit', + 'Paid' => 'Soldé', + 'Invoice No' => 'N° facture', + 'Adjustment' => 'Avoir/Remise', + 'Tax Type' => 'Taxe', + 'Discount Percent' => 'Remise en %', + 'Discount Amount' => 'Remise fixe', + 'No' => 'N°', + 'Date' => 'Date', + 'Documents' => 'Documents', + 'Issued Date' => 'Date d\'émission', + 'Valid Date' => 'Date de validité', + 'SINGLE_Invoice'=>'Facture', + 'Invoice ID'=>'Facture ID', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Invoice/language/hu_hu.lang.php b/modules/Invoice/language/hu_hu.lang.php new file mode 100644 index 0000000..dcda48c --- /dev/null +++ b/modules/Invoice/language/hu_hu.lang.php @@ -0,0 +1,175 @@ + 'Díjbekérő', + 'LBL_SO_MODULE_NAME' => 'Díjbekérő', + 'LBL_RELATED_PRODUCTS' => 'Termék adatok', + 'LBL_MODULE_TITLE' => 'Díjbekérő: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Díjbekérő Keresés', + 'LBL_LIST_FORM_TITLE' => 'Díjbekérő Lista', + 'LBL_LIST_SO_FORM_TITLE' => 'Megrendelések Listája', + 'LBL_NEW_FORM_TITLE' => 'Új Díjbekérő', + 'LBL_NEW_FORM_SO_TITLE' => 'Új Megrendelés', + 'LBL_MEMBER_ORG_FORM_TITLE' => 'Szervezeti tagság', + 'LBL_LIST_ACCOUNT_NAME' => 'Cég neve', + 'LBL_LIST_CITY' => 'Város', + 'LBL_LIST_WEBSITE' => 'Weboldal', + 'LBL_LIST_STATE' => 'Állam/megye', + 'LBL_LIST_PHONE' => 'Telefon', + 'LBL_LIST_EMAIL_ADDRESS' => 'Email cím', + 'LBL_LIST_CONTACT_NAME' => 'Kapcsolat neve', + 'db_name' => 'LBL_LIST_ACCOUNT_NAME', + 'db_website' => 'LBL_LIST_WEBSITE', + 'db_billing_address_city' => 'LBL_LIST_CITY', + 'LBL_ACCOUNT' => 'Cég:', + 'LBL_ACCOUNT_NAME' => 'Cég neve:', + 'LBL_PHONE' => 'Telefon:', + 'LBL_WEBSITE' => 'Weboldal:', + 'LBL_FAX' => 'Fax:', + 'LBL_TICKER_SYMBOL' => 'Tőzsdei rövidítés:', + 'LBL_OTHER_PHONE' => 'Telefon, másik:', + 'LBL_ANY_PHONE' => 'Telefon, bármilyen:', + 'LBL_MEMBER_OF' => 'Tagja:', + 'LBL_EMAIL' => 'Email:', + 'LBL_EMPLOYEES' => 'Alkalmazottak:', + 'LBL_OTHER_EMAIL_ADDRESS' => 'Email cím, másik:', + 'LBL_ANY_EMAIL' => 'Email cím, bármilyen:', + 'LBL_OWNERSHIP' => 'Tulajdonos:', + 'LBL_RATING' => 'Értékelés:', + 'LBL_INDUSTRY' => 'Iparág:', + 'LBL_SIC_CODE' => 'TEÁOR:', + 'LBL_TYPE' => 'Típus:', + 'LBL_ANNUAL_REVENUE' => 'Éves forgalom:', + 'LBL_ADDRESS_INFORMATION' => 'Cím adatok', + 'LBL_Quote_INFORMATION' => 'Cég Információ', + 'LBL_CUSTOM_INFORMATION' => 'Egyedi Információ', + 'LBL_BILLING_ADDRESS' => 'Számlázási cím:', + 'LBL_SHIPPING_ADDRESS' => 'Szállítási cím:', + 'LBL_ANY_ADDRESS' => 'Bármilyen cím:', + 'LBL_CITY' => 'Város:', + 'LBL_STATE' => 'Állam/Megye:', + 'LBL_POSTAL_CODE' => 'Irányítószám:', + 'LBL_COUNTRY' => 'Ország:', + 'LBL_DESCRIPTION_INFORMATION' => 'Leírás', + 'LBL_DESCRIPTION' => 'Leírás:', + 'LBL_TERMS_INFORMATION' => 'Határidők és Feltételek', + 'NTC_COPY_BILLING_ADDRESS' => 'Számlázási cím másolása a Szállítási címhez', + 'NTC_COPY_SHIPPING_ADDRESS' => 'Szállítási cím másolása a Számlázási címhez', + 'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Biztos vagy abban, hogy ezt a rekordot - mint tagszervezet - el akarod távolítani?', + 'LBL_DUPLICATE' => 'Valószínű Cég Duplikáció', + 'MSG_DUPLICATE' => 'Ennek a Cégnek a létrehozása valószínűleg duplikálni fog egy már létező Céget a rendszerben. Kiválaszthatsz egy már létező Céget a listáról innen alább, vagy kattinthatsz az Új Cég gombra, hogy folytasd a cég létrehozását a már bevitt adatokkal.', + 'LBL_INVITEE' => 'Kapcsolatok', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a VTiger-fiók törléséhez', + 'LBL_SELECT_ACCOUNT' => 'Cég kiválasztása', + 'LBL_GENERAL_INFORMATION' => 'Általános Információ', + 'LBL_NEW_POTENTIAL' => 'Új Lehetőség', + 'LBL_POTENTIAL_TITLE' => 'Lehetőségek', + 'LBL_NEW_TASK' => 'Új Feladatok', + 'LBL_TASK_TITLE' => 'Feladatok', + 'LBL_NEW_CALL' => 'Új Hívás', + 'LBL_CALL_TITLE' => 'Hívások', + 'LBL_NEW_MEETING' => 'Új Megbeszélés', + 'LBL_MEETING_TITLE' => 'Megbeszélések', + 'LBL_NEW_EMAIL' => 'Új Email', + 'LBL_EMAIL_TITLE' => 'Emailek', + 'LBL_NEW_CONTACT' => 'Új Kapcsolat', + 'LBL_CONTACT_TITLE' => 'Kapcsolatok', + 'LBL_ALL' => 'Minden', + 'LBL_PROSPECT' => 'Vevő jelölt', + 'LBL_INVESTOR' => 'Befektető', + 'LBL_RESELLER' => 'Viszonteladó', + 'LBL_PARTNER' => 'Partner', + 'LBL_TOOL_FORM_TITLE' => 'Cég Eszközök', + 'Subject' => 'Tárgy', + 'Quote Name' => 'Ajánlat neve', + 'Vendor Name' => 'Beszállító neve', + 'Invoice Terms' => 'Fizetési határidő', + 'Contact Name' => 'Kapcsolat neve', + 'Invoice Date' => 'Díjbekérő kiállítási dátuma', + 'Sub Total' => 'Részösszeg', + 'Due date' => 'Határidő', + 'Carrier' => 'Futár', + 'Type' => 'Típus', + 'Sales Tax' => 'ÁFA', + 'Sales Commission' => 'Értékesítési jutalék', + 'Excise Duty' => 'Jövedéki adó', + 'Total' => 'Összeg', + 'Product Name' => 'Termék neve', + 'Assigned To' => 'Felelős', + 'Billing Address' => 'Számlázási cím - Utca', + 'Shipping Address' => 'Szállítási cím - Utca', + 'Billing City' => 'Számlázási cím - Város', + 'Billing State' => 'Számlázási cím - Állam/megye', + 'Billing Code' => 'Számlázási cím - Irányítószám', + 'Billing Country' => 'Számlázási cím - Ország', + 'Billing Po Box' => 'Számlázási cím - Postafiók', + 'Shipping Po Box' => 'Szállítási cím - Postafiók', + 'Shipping City' => 'Szállítási cím - Város', + 'Shipping State' => 'Szállítási cím - Állam/megye', + 'Shipping Code' => 'Szállítási cím - Irányítószám', + 'Shipping Country' => 'Szállítási cím - Ország', + 'City' => 'Város', + 'State' => 'Állam/megye', + 'Code' => 'Kód', + 'Country' => 'Ország', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Description' => 'Megjegyzés', + 'Potential Name' => 'Lehetőség neve', + 'Customer No' => 'Ügyfél száma', + 'Sales Order' => 'Megrendelések', + 'Pending' => 'Függőben', + 'Account Name' => 'Cég neve', + 'Terms & Conditions' => 'Határidők és Feltételek', + 'LBL_INVOICE_INFORMATION' => 'Díjbekérő Információ', + 'LBL_INVOICE' => 'Díjbekérő:', + 'LBL_SO_INFORMATION' => 'Megrendelés adatai', + 'LBL_SO' => 'Megrendelés:', + 'LBL_SUBJECT' => 'Tárgy:', + 'LBL_SALES_ORDER' => 'Megrendelés:', + 'Invoice Id' => 'Díjbekérő No.', + 'LBL_MY_TOP_INVOICE' => 'Legfontosabb ki nem egyenlített Díjbekérőim', + 'LBL_INVOICE_NAME' => 'Díjbekérő neve:', + 'Purchase Order' => 'Beszerzések', + 'Status' => 'Állapot', + 'Id' => 'Díjbekérő No.', + 'Invoice' => 'Díjbekérő', + 'Created' => 'Létrehozott', + 'Approved' => 'Jóváhagyott', + 'Sent' => 'Elküldött', + 'Credit Invoice' => 'Utalásos Díjbekérő', + 'Paid' => 'Fizetett', + 'AutoCreated' => 'Automatikusan létrehozva', + 'Invoice No' => 'Díjbekérő No.', + 'Adjustment' => 'Kézi módosítási lehetőség', + 'Tax Type' => 'Adó típusa', + 'Discount Percent' => 'Kedvezmény Százalék', + 'Discount Amount' => 'Kedvezmény Összeg', + 'No' => 'Nem', + 'Date' => 'Dátum', + 'Documents' => 'Dokumentumok', + 'SINGLE_Invoice' => 'Díjbekérő', + 'Notes' => 'Jegyzetek', + 'invoice_no' => 'Díjbekérő No.' +); +?> \ No newline at end of file diff --git a/modules/Invoice/language/nl_nl.lang.php b/modules/Invoice/language/nl_nl.lang.php new file mode 100644 index 0000000..79c67c0 --- /dev/null +++ b/modules/Invoice/language/nl_nl.lang.php @@ -0,0 +1,216 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.5 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Invoice/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Facturen', +'LBL_SO_MODULE_NAME'=>'Facturen', +'LBL_RELATED_PRODUCTS'=>'Productdetails', +'LBL_MODULE_TITLE'=>'Factuur: Home', +'LBL_SEARCH_FORM_TITLE'=>'Zoek factuur', +'LBL_LIST_FORM_TITLE'=>'Factuurlijst', +'LBL_LIST_SO_FORM_TITLE'=>'Verkooporderlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuwe factuur', +'LBL_NEW_FORM_SO_TITLE'=>'Nieuwe verkooporder', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Leden organisaties', + +'LBL_LIST_ACCOUNT_NAME'=>'Accountnaam', +'LBL_LIST_CITY'=>'Plaats', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'Provincie', +'LBL_LIST_PHONE'=>'Telefoon', +'LBL_LIST_EMAIL_ADDRESS'=>'E-mailadres', +'LBL_LIST_CONTACT_NAME'=>'Contactnaam', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Account:', +'LBL_ACCOUNT_NAME'=>'Accountnaam:', +'LBL_PHONE'=>'Telefoon:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Ticker Symbool:', +'LBL_OTHER_PHONE'=>'Telefoon prive:', +'LBL_ANY_PHONE'=>'Telefoon bedrijf:', +'LBL_MEMBER_OF'=>'Onderdeel van:', +'LBL_EMAIL'=>'E-mail:', +'LBL_EMPLOYEES'=>'Medewerkers:', +'LBL_OTHER_EMAIL_ADDRESS'=>'Prive e-mail:', +'LBL_ANY_EMAIL'=>'Bedrijfs e-mail:', +'LBL_OWNERSHIP'=>'Eigenaar:', +'LBL_RATING'=>'Beoordeling:', +'LBL_INDUSTRY'=>'Industrie:', +'LBL_SIC_CODE'=>'SBI code 1:', +'LBL_TYPE'=>'Type:', +'LBL_ANNUAL_REVENUE'=>'Jaar Omzet:', +'LBL_ADDRESS_INFORMATION'=>'Adresinformatie', +'LBL_Quote_INFORMATION'=>'Accountinformatie', +'LBL_CUSTOM_INFORMATION'=>'Extra informatie', +'LBL_BILLING_ADDRESS'=>'Postadres:', +'LBL_SHIPPING_ADDRESS'=>'Afleveradres:', +'LBL_ANY_ADDRESS'=>'Bezoekadres:', +'LBL_CITY'=>'Plaats:', +'LBL_STATE'=>'Provincie:', +'LBL_POSTAL_CODE'=>'Postcode:', +'LBL_COUNTRY'=>'Land:', +'LBL_DESCRIPTION_INFORMATION'=>'Informatie', +'LBL_DESCRIPTION'=>'Omschrijving:', +'LBL_TERMS_INFORMATION'=>'Algemene Voorwaarden', +'NTC_COPY_BILLING_ADDRESS'=>'Kopieer Postadres naar Afleveradres', +'NTC_COPY_SHIPPING_ADDRESS'=>'Kopieer Afleveradres naar Postadres', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Wilt dit verwijderen?', +'LBL_DUPLICATE'=>'Mogelijk dubbel Account', +'MSG_DUPLICATE' => 'Gevaar voor een dubbel Account. U kunt ook een Account selecteren uit de lijst, of ga door met de door u reeds ingevoerde gegevens.', + +'LBL_INVITEE'=>'Contacten', +'ERR_DELETE_RECORD'=>"Selecteer een account om deze te verwijderen.", + +'LBL_SELECT_ACCOUNT'=>'Selecteer Account', +'LBL_GENERAL_INFORMATION'=>'Algemene informatie', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nieuwe verkoopkans', +'LBL_POTENTIAL_TITLE'=>'Verkoopkansen', + +'LBL_NEW_TASK'=>'Nieuwe taak', +'LBL_TASK_TITLE'=>'Taken', +'LBL_NEW_CALL'=>'Nieuw Telefoongesprek', +'LBL_CALL_TITLE'=>'Telefoongesprekken', +'LBL_NEW_MEETING'=>'Nieuwe vergadering', +'LBL_MEETING_TITLE'=>'Vergaderingen', +'LBL_NEW_EMAIL'=>'Nieuwe e-mail', +'LBL_EMAIL_TITLE'=>'E-mails', +'LBL_NEW_CONTACT'=>'Nieuw contact', +'LBL_CONTACT_TITLE'=>'Contacten', + +//Added fields after RC1 - Release +'LBL_ALL'=>'Alle', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investeerder', +'LBL_RESELLER'=>'Wederverkoper', +'LBL_PARTNER'=>'Partner', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Account gereedschap', +//Added for 4GA +'Subject'=>'Onderwerp', +'Quote Name'=>'Offerte naam', +'Vendor Name'=>'Naam leverancier', +'Invoice Terms'=>'Factuur voorwaarden', +'Contact Name'=>'Contactnaam',//to include contact name field in Invoice +'Invoice Date'=>'Factuurdatum', +'Sub Total'=>'Subtotaal', +'Due Date'=>'Vervaldatum', +'Carrier'=>'Vervoerder', +'Type'=>'Type', +'Sales Tax'=>'Verkoopbelasting', +'Sales Commission'=>'Verkoopcommissie', +'Excise Duty'=>'Accijnzen', // inland taxes +'Total'=>'Totaal', +'Product Name'=>'Productnaam', +'Assigned To'=>'Toegewezen aan', +'Billing Address'=>'Postadres', +'Shipping Address'=>'Afleveradres', +'Billing City'=>'P Plaats', +'Billing State'=>'P Provincie', +'Billing Code'=>'P Postcode', +'Billing Country'=>'P Land', +'Billing Po Box'=>'P Postbus', +'Shipping Po Box'=>'A Postbus', +'Shipping City'=>'A Plaats', +'Shipping State'=>'A Provincie', +'Shipping Code'=>'A Postcode', +'Shipping Country'=>'A Land', +'City'=>'Plaats', +'State'=>'Provincie', +'Code'=>'Postcode', +'Country'=>'Land', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', +'Description'=>'Omschrijving', +'Potential Name'=>'Naam verkoopkans', +'Customer No'=>'Klantnummer', +'Sales Order'=>'Verkooporder', +'Notes'=>'Notities', +'Pending'=>'In afwachting van', +'Account Name'=>'Accountnaam', +'Terms & Conditions'=>'Voorwaarden', + +//Quote Info +'LBL_INVOICE_INFORMATION'=>'Factuur informatie', +'LBL_INVOICE'=>'Factuur:', +'LBL_SO_INFORMATION'=>'Verkooporder informatie', +'LBL_SO'=>'Verkooporder:', + +//Added in release 4.2 +'LBL_SUBJECT'=>'Onderwerp:', +'LBL_SALES_ORDER'=>'Verkooporder:', +'Invoice Id'=>'Factuurnummer', +'LBL_MY_TOP_INVOICE'=>'Mijn Openstaande facturen', +'LBL_INVOICE_NAME'=>'Factuurnaam:', +'Purchase Order'=>'Inkooporder', +'Status'=>'Status', +'Id'=>'Factuurnummer', +'Invoice'=>'Factuur', + +//Added for existing Picklist Entries + +'Created'=>'Gemaakt', +'Approved'=>'Goedgekeurd', +'Sent'=>'Verstuurd', +'Credit Invoice'=>'Creditnota', +'Paid'=>'Betaald', +//Added to Custom Invoice Number +'invoice_no'=>'Factuurnummer', +'Adjustment'=>'Bijstelling', + + +//Added for Reports (5.0.4) +'Tax Type'=>'Belastingsoort', +'Discount Percent'=>'Kortingspercentage', +'Discount Amount'=>'Kortingsbedrag', +'Terms & Conditions'=>'Voorwaarden', +'No'=>'Nee', +'Date'=>'Datum', + +// Added affter 5.0.4 GA +//Added for Documents module +'Documents'=>'Documenten', + +); + +?> diff --git a/modules/Invoice/language/pt_br.lang.php b/modules/Invoice/language/pt_br.lang.php new file mode 100644 index 0000000..108259c --- /dev/null +++ b/modules/Invoice/language/pt_br.lang.php @@ -0,0 +1,204 @@ +'Fatura', +'LBL_SO_MODULE_NAME'=>'Fatura', +'LBL_RELATED_PRODUCTS'=>'Detalhes do Produto', +'LBL_MODULE_TITLE'=>'Fatura: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisar Fatura', +'LBL_LIST_FORM_TITLE'=>'Listar Fatura', +'LBL_LIST_SO_FORM_TITLE'=>'Listar Pedidos Vendas', +'LBL_NEW_FORM_TITLE'=>'Nova Fatura', +'LBL_NEW_FORM_SO_TITLE'=>'Novo Pedido Vendas', +'LBL_MEMBER_ORG_FORM_TITLE'=>'Organizações Membro', + +'LBL_LIST_ACCOUNT_NAME'=>'Nome Organização', +'LBL_LIST_CITY'=>'Cidade', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_STATE'=>'Estado', +'LBL_LIST_PHONE'=>'Fone', +'LBL_LIST_EMAIL_ADDRESS'=>'Endereço E-mail', +'LBL_LIST_CONTACT_NAME'=>'Nome Contato', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name' => 'LBL_LIST_ACCOUNT_NAME', +'db_website' => 'LBL_LIST_WEBSITE', +'db_billing_address_city' => 'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'Organização:', +'LBL_ACCOUNT_NAME'=>'Nome Organização:', +'LBL_PHONE'=>'Fone:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_TICKER_SYMBOL'=>'Cod. Bolsa:', +'LBL_OTHER_PHONE'=>'Fone Alternativo:', +'LBL_ANY_PHONE'=>'Outro Fone:', +'LBL_MEMBER_OF'=>'Membro de:', +'LBL_EMAIL'=>'E-mail:', +'LBL_EMPLOYEES'=>'Empregados:', +'LBL_OTHER_EMAIL_ADDRESS'=>'E-mail Alternativo:', +'LBL_ANY_EMAIL'=>'Outro E-mail:', +'LBL_OWNERSHIP'=>'Propriedade:', +'LBL_RATING'=>'Avaliação:', +'LBL_INDUSTRY'=>'Atividade:', +'LBL_SIC_CODE'=>'Cod CNAE:', +'LBL_TYPE'=>'Tipo:', +'LBL_ANNUAL_REVENUE'=>'Receita Anual:', +'LBL_ADDRESS_INFORMATION'=>'Dados do Endereço', +'LBL_Quote_INFORMATION'=>'Dados da Organização', +'LBL_CUSTOM_INFORMATION'=>'Informação Customizada', +'LBL_BILLING_ADDRESS'=>'Endereço Faturamento:', +'LBL_SHIPPING_ADDRESS'=>'Endereço Entrega:', +'LBL_ANY_ADDRESS'=>'Outro Endereço:', +'LBL_CITY'=>'Cidade:', +'LBL_STATE'=>'Estado:', +'LBL_POSTAL_CODE'=>'CEP:', +'LBL_COUNTRY'=>'País:', +'LBL_DESCRIPTION_INFORMATION'=>'Descrição', +'LBL_DESCRIPTION'=>'Descrição:', +'LBL_TERMS_INFORMATION'=>'Termos & Condições', +'NTC_COPY_BILLING_ADDRESS'=>'Copiar endereço Faturamento para endereço de Entrega', +'NTC_COPY_SHIPPING_ADDRESS'=>'Copiar endereço de Entrega para endereço de Faturamento', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'Tem certeza que deseja remover este registro como um membro da organização?', +'LBL_DUPLICATE'=>'Possibilidade Duplicação de Organizações', +'MSG_DUPLICATE' => 'Criando esta Organização pode ser que a mesma seja duplicada. Você pode selecionar também uma Organização da lista abaixo ou clicar sobre Criar Nova Organização para continuar criando uma nova Organização com os dados inseridos anteriormente.', + +'LBL_INVITEE'=>'Contatos', +'ERR_DELETE_RECORD'=>"Defina um número de registro para deletar a Organização.", + +'LBL_SELECT_ACCOUNT'=>'Selecione a Organização', +'LBL_GENERAL_INFORMATION'=>'Informação Geral', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nova Oportunidade', +'LBL_POTENTIAL_TITLE' => 'Oportunidades', + +'LBL_NEW_TASK'=>'Nova Tarefa', +'LBL_TASK_TITLE'=>'Tarefas', +'LBL_NEW_CALL'=>'Nova Chamada', +'LBL_CALL_TITLE'=>'Chamadas', +'LBL_NEW_MEETING'=>'Nova Reunião', +'LBL_MEETING_TITLE'=>'Reuniões', +'LBL_NEW_EMAIL'=>'Novo E-mail', +'LBL_EMAIL_TITLE'=>'E-mails', +'LBL_NEW_CONTACT'=>'Novo Contato', +'LBL_CONTACT_TITLE'=>'Contatos', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todos', +'LBL_PROSPECT'=>'Prospect', +'LBL_INVESTOR'=>'Investidor', +'LBL_RESELLER'=>'Revendedor', +'LBL_PARTNER'=>'Parceiro', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Ferramentas Organização', +//Added for 4GA +'Subject'=>'Assunto', +'Quote Name'=>'Nome Cotação', +'Vendor Name'=>'Nome Fornecedor', +'Invoice Terms'=>'Condições Fatura', +'Contact Name'=>'Nome Contato', //to include contact name vtiger_field in Invoice +'Invoice Date'=>'Data Fatura', +'Sub Total'=>'Sub-Total', +'Due Date'=>'Data Vencimento', +'Carrier'=>'Transportador', +'Type'=>'Tipo', +'Sales Tax'=>'ICMS', +'Sales Commission'=>'Comissão Vendas', +'Excise Duty'=>'IPI', +'Total'=>'Total', +'Product Name'=>'Nome Produto', +'Assigned To'=>'Responsável', +'Billing Address'=>'Endereço Faturamento', +'Shipping Address'=>'Endereço Entrega', +'Billing City'=>'Cidade Faturamento', +'Billing State'=>'Estado Faturamento', +'Billing Code'=>'CEP Faturamento', +'Billing Country'=>'País Faturamento', +'Billing Po Box'=>'Cx Postal Faturamento', +'Shipping Po Box'=>'Cx Postal Entrega', +'Shipping City'=>'Cidade Entrega', +'Shipping State'=>'Estado Entrega', +'Shipping Code'=>'CEP Entrega', +'Shipping Country'=>'País Entrega', +'City'=>'Cidade', +'State'=>'Estado', +'Code'=>'CEP', +'Country'=>'País', +'Created Time'=>'Data Criação', +'Modified Time'=>'Data Modificação', +'Description'=>'Descrição', +'Potential Name'=>'Nome Oportunidade', +'Customer No'=>'Cod. Cliente', +'Sales Order'=>'Pedido Vendas', +'Pending'=>'Pendente', +'Account Name'=>'Nome Organização', +'Terms & Conditions'=>'Prazos & Condições', +//Quote Info +'LBL_INVOICE_INFORMATION'=>'Informação Fatura', +'LBL_INVOICE'=>'Fatura:', +'LBL_SO_INFORMATION'=>'Dados do Pedido de Vendas', +'LBL_SO'=>'Pedido Vendas:', + +//Added in release 4.2 +'LBL_SUBJECT'=>'Assunto:', +'LBL_SALES_ORDER'=>'Pedido Vendas:', +'Invoice Id'=>'No. Fatura', +'LBL_MY_TOP_INVOICE'=>'Principais Faturas Abertas', +'LBL_INVOICE_NAME'=>'Nome Fatura:', +'Purchase Order'=>'Pedido Compra:', +'Status'=>'Status', +'Id'=>'No. Fatura', +'Invoice'=>'Fatura', + +//Added for existing Picklist Entries + +'Created'=>'Criada', +'Approved'=>'Aprovada', +'Sent'=>'Enviada', +'Credit Invoice'=>'Creditar Fatura', +'Paid'=>'Paga', +'AutoCreated'=>'Auto Criado', +//Added to Custom Invoice Number +'Invoice No'=>'No. Fatura', +'Adjustment'=>'Ajuste', + +//Added for Reports (5.0.4) +'Tax Type'=>'Tipo Imposto', +'Discount Percent'=>'Percentual Desconto', +'Discount Amount'=>'Total Desconto', +'No'=>'Não', +'Date'=>'Data', + +// Added affter 5.0.4 GA +//Added for Documents module +'Documents'=>'Documentos', + +'SINGLE_Invoice'=>'Fatura', +'Invoice ID'=>'ID Fatura', +); + +?> diff --git a/modules/Invoice/language/zh_cn.lang.php b/modules/Invoice/language/zh_cn.lang.php new file mode 100644 index 0000000..74ebd3b --- /dev/null +++ b/modules/Invoice/language/zh_cn.lang.php @@ -0,0 +1,202 @@ +'发货单', +'LBL_SO_MODULE_NAME'=>'发货单', +'LBL_RELATED_PRODUCTS'=>'系列产品', +'LBL_MODULE_TITLE'=>'发货单:首页', +'LBL_SEARCH_FORM_TITLE'=>'查找发货单', +'LBL_LIST_FORM_TITLE'=>'发货单列表', +'LBL_LIST_SO_FORM_TITLE'=>'销售订单列表', +'LBL_NEW_FORM_TITLE'=>'新增发货单', +'LBL_NEW_FORM_SO_TITLE'=>'新增销售订单', +'LBL_MEMBER_ORG_FORM_TITLE'=>'所属单位', + +'LBL_LIST_ACCOUNT_NAME'=>'客户名称', +'LBL_LIST_CITY'=>'城市', +'LBL_LIST_WEBSITE'=>'网站', +'LBL_LIST_STATE'=>'省份', +'LBL_LIST_PHONE'=>'电话', +'LBL_LIST_EMAIL_ADDRESS'=>'Email地址', +'LBL_LIST_CONTACT_NAME'=>'联系人姓名', + +//DON'T CONVERT THESE THEY ARE MAPPINGS +'db_name'=>'LBL_LIST_ACCOUNT_NAME', +'db_website'=>'LBL_LIST_WEBSITE', +'db_billing_address_city'=>'LBL_LIST_CITY', + +//END DON'T CONVERT + +'LBL_ACCOUNT'=>'客户:', +'LBL_ACCOUNT_NAME'=>'客户名称:', +'LBL_PHONE'=>'电话:', +'LBL_WEBSITE'=>'网站:', +'LBL_FAX'=>'传真:', +'LBL_TICKER_SYMBOL'=>'股票代码:', +'LBL_OTHER_PHONE'=>'其它电话:', +'LBL_ANY_PHONE'=>'其它电话:', +'LBL_MEMBER_OF'=>'上级单位:', +'LBL_EMAIL'=>'Email:', +'LBL_EMPLOYEES'=>'员工数:', +'LBL_OTHER_EMAIL_ADDRESS'=>'其它Email:', +'LBL_ANY_EMAIL'=>'其它Email:', +'LBL_OWNERSHIP'=>'所有制:', +'LBL_RATING'=>'评价:', +'LBL_INDUSTRY'=>'行业:', +'LBL_SIC_CODE'=>'行业编码:', +'LBL_TYPE'=>'类型:', +'LBL_ANNUAL_REVENUE'=>'年营业额:', +'LBL_ADDRESS_INFORMATION'=>'地址信息', +'LBL_Quote_INFORMATION'=>'客户信息', +'LBL_CUSTOM_INFORMATION'=>'自定义信息', +'LBL_BILLING_ADDRESS'=>'付款地址:', +'LBL_SHIPPING_ADDRESS'=>'收货地址:', +'LBL_ANY_ADDRESS'=>'任一地址:', +'LBL_CITY'=>'城市:', +'LBL_STATE'=>'省份:', +'LBL_POSTAL_CODE'=>'邮政编码:', +'LBL_COUNTRY'=>'国家:', +'LBL_DESCRIPTION_INFORMATION'=>'详细信息', +'LBL_DESCRIPTION'=>'描述:', +'LBL_TERMS_INFORMATION'=>'条款与条件', +'NTC_COPY_BILLING_ADDRESS'=>'复制付款地址到收货地址', +'NTC_COPY_SHIPPING_ADDRESS'=>'复制收货地址到付款地址', +'NTC_REMOVE_MEMBER_ORG_CONFIRMATION'=>'您确定要删除这条记录吗?', +'LBL_DUPLICATE'=>'可能有重复的客户', +'MSG_DUPLICATE'=>'创建这个客户可能与现有的数据重复。你可以选择客户列表中的客户复制创建新的记录,以继承它相关的数据。', + +'LBL_INVITEE'=>'联系人', +'ERR_DELETE_RECORD'=>'删除这个客户必须指定这个客户的记录编号。', +'LBL_SELECT_ACCOUNT'=>'选择客户', +'LBL_GENERAL_INFORMATION'=>'一般信息', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'新增销售机会', +'LBL_POTENTIAL_TITLE'=>'销售机会', + +'LBL_NEW_TASK'=>'新增任务', +'LBL_TASK_TITLE'=>'任务', +'LBL_NEW_CALL'=>'新增电话', +'LBL_CALL_TITLE'=>'电话', +'LBL_NEW_MEETING'=>'新增会议', +'LBL_MEETING_TITLE'=>'会议', +'LBL_NEW_EMAIL'=>'撰写新邮件', +'LBL_EMAIL_TITLE'=>'邮件', +'LBL_NEW_CONTACT'=>'新增联系人', +'LBL_CONTACT_TITLE'=>'联系人', + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'全部', +'LBL_PROSPECT'=>'潜在客户', +'LBL_INVESTOR'=>'投资商', +'LBL_RESELLER'=>'经销商', +'LBL_PARTNER'=>'合作伙伴', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'客户工具', +//Added for 4GA +'Subject'=>'标题', +'Quote Name'=>'报价单名称', +'Vendor Name'=>'供应商名称', +'Invoice Terms'=>'发货单条款', +'Contact Name'=>'联系人姓名',//to include contact name vtiger_field in Invoice +'Invoice Date'=>'开发货单日期', +'Sub Total'=>'小计', +'Issued Date'=>'发布日期', +'Due Date'=>'交付日期', +'Carrier'=>'物流公司', +'Type'=>'类型', +'Sales Tax'=>'销售税', +'Sales Commission'=>'销售佣金', +'Excise Duty'=>'营业税', +'Total'=>'合计', +'Product Name'=>'产品名称', +'Assigned To'=>'负责人', +'Billing Address'=>'付款地址', +'Shipping Address'=>'收货地址', +'Billing City'=>'付款城市', +'Billing State'=>'付款省份', +'Billing Code'=>'付款邮政编码', +'Billing Country'=>'付款国家', +'Billing Po Box'=>'付款邮政信箱', +'Shipping Po Box'=>'收货邮政信箱', +'Shipping City'=>'收货城市', +'Shipping State'=>'收货省份', +'Shipping Code'=>'收货邮政编码', +'Shipping Country'=>'收货国家', +'City'=>'城市', +'State'=>'省份', +'Code'=>'邮政编码', +'Country'=>'国家', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', +'Description'=>'描述', +'Potential Name'=>'销售机会名称', +'Customer No'=>'客户编号', +'Sales Order'=>'销售订单', +'Notes'=>'备忘录', +'Pending'=>'等待', +'Account Name'=>'客户名称', +'Terms & Conditions'=>'条款与条件', +//Quote Info +'LBL_INVOICE_INFORMATION'=>'发货单信息', +'LBL_INVOICE'=>'发货单:', +'LBL_SO_INFORMATION'=>'销售订单信息', +'LBL_SO'=>'销售订单:', + +//Added in release 4.2 +'LBL_SUBJECT'=>'主题:', +'LBL_SALES_ORDER'=>'销售订单:', +'Invoice Id'=>'发货单编号', +'LBL_MY_TOP_INVOICE'=>'未处理的发货单', +'LBL_INVOICE_NAME'=>'发货单名称:', +'Purchase Order'=>'采购订单', +'Status'=>'状态', +'Id'=>'发货单编号', +'Invoice'=>'发货单', + +//Added for existing Picklist Entries +'AutoCreated'=>'自动创建', +'Created'=>'已创建', +'Approved'=>'已审批', +'Sent'=>'已寄送', +'Credit Invoice'=>'抵扣发票', +'Paid'=>'已付款', +//Added to Custom Invoice Number +'Invoice No'=>'发货单编号', +'Adjustment'=>'调整', +//Added for Reports (5.0.4) +'Tax Type'=>'税的类型', +'Discount Percent'=>'折扣百分比', +'Discount Amount'=>'折扣金额', +'Terms & Conditions'=>'条款与条件', +'No'=>'编号', +'Date'=>'日期', + +// Added affter 5.0.4 GA +//Added for Documents module +'Documents'=>'文档', +); + +?> diff --git a/modules/Invoice/pdf_templates/footer.php b/modules/Invoice/pdf_templates/footer.php new file mode 100644 index 0000000..e5b2b01 --- /dev/null +++ b/modules/Invoice/pdf_templates/footer.php @@ -0,0 +1,35 @@ +addDescBlock($description, $app_strings["Description"], $descBlock); + +/* ************** End Description *********************** */ + + + +/* **************** Begin Terms ****************** */ +$termBlock=array("107",$top,"53", $num); +$pdf->addDescBlock($conditions, $app_strings["Terms & Conditions"], $termBlock); + +/* ************** End Terms *********************** */ + + +?> diff --git a/modules/Invoice/pdf_templates/header.php b/modules/Invoice/pdf_templates/header.php new file mode 100644 index 0000000..82d0471 --- /dev/null +++ b/modules/Invoice/pdf_templates/header.php @@ -0,0 +1,104 @@ +addImage( $logo_name, $imageBlock); + +// x,y,width +if($org_phone != '') + $phone ="\n".$app_strings["Phone"].":".$org_phone; + +$companyBlockPositions=array( "10","23","62" ); +$companyText=$org_address."\n".$org_city.", ".$org_state." ".$org_code." ".$org_country." ".$phone."\n".$org_website; +$pdf->addTextBlock( $org_name, $companyText ,$companyBlockPositions ); + +// ************** End company information ******************* + + + +// ************* Begin Top-Right Header *************** +// title +$titleBlock=array("147","7"); +$pdf->title( $app_strings["Invoice"],"", $titleBlock ); + +$soBubble=array("168","17","12"); +$pdf->addBubbleBlock($so_name, $app_strings["SalesOrder"], $soBubble); + +$poBubble=array("114","17","12"); +$pdf->addBubbleBlock($po_name, $app_strings["PurchaseOrder"], $poBubble); + +// page number +$pageBubble=array("147","17",0); +$pdf->addBubbleBlock($page_num, $app_strings["Page"], $pageBubble); +// ************** End Top-Right Header ***************** + + + +// ************** Begin Addresses ************** +// shipping Address +$shipLocation = array("147","40","61"); +if(trim($ship_street)!='') + $shipText = $ship_street."\n"; +if(trim($ship_city) !='') + $shipText .= $ship_city.", "; +if(trim($ship_state)!='' || trim($ship_code)!= '') + $shipText .= $ship_state." ".$ship_code."\n"; + + $shipText .=$ship_country; + +$pdf->addTextBlock( $app_strings["Shipping Address"].":", $shipText, $shipLocation ); + +// billing Address +$billPositions = array("10","51","61"); +if(trim($bill_street)!='') + $billText = $bill_street."\n"; +if(trim($bill_city) !='') + $billText .= $bill_city.", "; +if(trim($bill_state)!='' || trim($bill_code)!= '') + $billText .= $bill_state." ".$bill_code."\n"; + + $billText .=$bill_country; +$pdf->addTextBlock($app_strings["Billing Address"].":",$billText, $billPositions); +// ********** End Addresses ****************** + + + +/* ******** Begin Invoice Data ************************ */ +// terms block +$termBlock=array("10","67"); +$pdf->addRecBlock($account_name, $app_strings["Customer Name"], $termBlock); + +// issue date block +$issueBlock=array("80","37"); +$pdf->addRecBlock(DateTimeField::convertToUserFormat(date("Y-m-d")), $app_strings["Issue Date"],$issueBlock); + +// due date block +$dueBlock=array("81","52"); +$pdf->addRecBlock($valid_till, $app_strings["Due Date"],$dueBlock); + +// Contact Name block +$conBlock=array("79","67"); +$pdf->addRecBlock($contact_name, $app_strings["Contact Name"],$conBlock); + +// vtiger_invoice number block +$invBlock=array("145","67"); +$pdf->addRecBlock($invoice_no, $app_strings["Invoice Number"],$invBlock); + +/* ************ End Invoice Data ************************ */ + + + +?> diff --git a/modules/Invoice/pdf_templates/lastpage/body.php b/modules/Invoice/pdf_templates/lastpage/body.php new file mode 100644 index 0000000..fc4720c --- /dev/null +++ b/modules/Invoice/pdf_templates/lastpage/body.php @@ -0,0 +1,62 @@ +watermark( $app_strings["Thank You"], $waterMarkPositions, $waterMarkRotate ); +$waterMarkPositions=array("30","130"); +$pdf->watermark( $app_strings["For Your Business"], $waterMarkPositions, $waterMarkRotate ); + +// blowing bubbles +$Bubble=array("10","80","170","4"); +$pdf->addBubble("", "", $Bubble); + +$Bubble=array("168","131","12"); +//$pdf->addBubbleBlock("Neat Look", "For A", $Bubble); +$Bubble=array("10","131","12"); +//$pdf->addBubbleBlock("The Corners", "Line Up", $Bubble); + + +/* ************* Begin Totals ************************** */ +$totalBlock=array("59","135"); +$names=array($app_strings["Subtotal"],$app_strings["Tax"],$app_strings["Adjustment"],$app_strings["Total"]); +$totals=array($price_subtotal,$price_salestax,$price_adjustment,$price_total); +$pdf->addTotalsRec($names,$totals,$totalBlock); +/* ************* End Totals *************************** */ + +// lets add an image :) +$imageBlock=array("15","95","8","8"); +$pdf->addImage( "sale.jpeg", $imageBlock); +$imageBlock=array("185","95","8","8"); +$pdf->addImage( "sale.jpeg", $imageBlock); + +// descriptions that change sizes! +$descc=count(explode("\n",$description)); +$condc=count(explode("\n",$conditions)); +if( (strlen($description) > 256) || (strlen($conditions) > 256) || $condc >6 || $descc > 6 ) + $num=255; +else + $num=150; + +/* **************** Begin Description ****************** */ +$descBlock=array("10","160","53", $num); +$pdf->addDescBlock($description, $app_strings["Description"], $descBlock); + + +$termBlock=array("107","160","53", $num); +$pdf->addDescBlock($conditions, $app_strings["Terms & Conditions"], $termBlock); + +/* ************** End Terms *********************** */ + + +?> diff --git a/modules/Invoice/pdf_templates/lastpage/footer.php b/modules/Invoice/pdf_templates/lastpage/footer.php new file mode 100644 index 0000000..67de6bf --- /dev/null +++ b/modules/Invoice/pdf_templates/lastpage/footer.php @@ -0,0 +1,59 @@ +drawLine($linePos); + $i = (($i+$width)+$pad)-1; +} + +// company addy +if($org_phone != '') +$phone="\n".$app_strings["Phone"].": ".$org_phone; +if($org_fax != '') + $fax ="\nFax: ".$org_fax; +$companyBlockPositions=array( "10","220","60" ); +$companyText=$org_address."\n".$org_city.", ".$org_state." ".$org_code." ".$org_country." ".$phone." ".$fax."\n".$org_website ; +$pdf->addTextBlock( $org_name, $companyText ,$companyBlockPositions ); + + +// billing Address +$billPositions = array("85","235","60"); +if(trim($bill_street)!='') + $billText = $bill_street."\n"; +if(trim($bill_city) !='') + $billText .= $bill_city.", "; +if(trim($bill_state)!='' || trim($bill_code)!= '') + $billText .= $bill_state." ".$bill_code."\n"; + + $billText .=$bill_country; +$pdf->addTextBlock($app_strings["Billing Address"].":",$billText, $billPositions); + +// totals +$totalBlock=array("145","235","10", "110"); +$totalText=$app_strings["Subtotal"].": ".$price_subtotal."\n". + $app_strings["Tax"].": ".$price_salestax."\n". + $app_strings["Adjustment"].": ".$price_adjustment."\n". + $app_strings["Total"].": ".$price_total; +$pdf->addDescBlock($totalText, $app_strings["Total Due"], $totalBlock); + +$blurbBlock=array("10","265","150", "60"); +$blockText=$app_strings["Detach_Info"]; +$pdf->addDescBlock($blockText, $app_strings["Instructions"], $blurbBlock); + +?> diff --git a/modules/Invoice/updateRelations.php b/modules/Invoice/updateRelations.php new file mode 100644 index 0000000..eacef81 --- /dev/null +++ b/modules/Invoice/updateRelations.php @@ -0,0 +1,40 @@ + \ No newline at end of file diff --git a/modules/Leads/CallRelatedList.php b/modules/Leads/CallRelatedList.php new file mode 100644 index 0000000..b9ccc36 --- /dev/null +++ b/modules/Leads/CallRelatedList.php @@ -0,0 +1,113 @@ +retrieve_entity_info($RECORD,$currentmodule); + $focus->id = $RECORD; + $focus->firstname=$focus->column_fields['firstname']; + $focus->lastname=$focus->column_fields['lastname']; + $log->debug("id is ".$focus->id); + $log->debug("name is ".$focus->name); + } + + global $mod_strings; + global $app_strings; + global $theme; + global $currentModule; + global $current_user; + + $theme_path="themes/".$theme."/"; + $image_path=$theme_path."images/"; + + $smarty = new vtigerCRM_Smarty; + + + if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; + } + if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') { + $smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode'])); + } + + if(!$_SESSION['rlvs'][$module]) + { + unset($_SESSION['rlvs']); + } + + if(isset($_REQUEST['record']) && $_REQUEST['record']!='') + { + $userid = $current_user->id; + $sql = "select fieldname from vtiger_field where uitype = '13' and tabid = 7 and vtiger_field.presence in (0,2)"; + $result = $adb->pquery($sql, array()); + $num_fieldnames = $adb->num_rows($result); + for($i = 0; $i < $num_fieldnames; $i++) + { + $fieldname = $adb->query_result($result,$i,"fieldname"); + $permit= getFieldVisibilityPermission("Leads",$userid,$fieldname); + } + } + + $smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar')); + $smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events')); + $smarty->assign("CATEGORY",$category); + $parent_email = getEmailParentsList('Leads',$focus->id, $focus); + $smarty->assign("HIDDEN_PARENTS_LIST",$parent_email); + + // Module Sequence Numbering + $mod_seq_field = getModuleSequenceField($currentModule); + if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; + } else { + $mod_seq_id = $focus->id; + } + $smarty->assign('MOD_SEQ_ID', $mod_seq_id); + // END + + $smarty->assign("ID",$focus->id); + $smarty->assign("NAME",$focus->lastname.' '.$focus->firstname); + $smarty->assign("EMAIL",$focus->column_fields['email']); + $smarty->assign("SECONDARY_EMAIL",$focus->column_fields['secondaryemail']); + $related_array = getRelatedLists($currentModule,$focus); + $smarty->assign("RELATEDLISTS", $related_array); + + require_once('include/ListView/RelatedListViewSession.php'); + if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) { + $relationId = vtlib_purify($_REQUEST['relation_id']); + RelatedListViewSession::addRelatedModuleToSession($relationId, + vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); + + $smarty->assign("SINGLE_MOD",$app_strings['Lead']); + $smarty->assign("MODULE", $currentmodule); + $smarty->assign("UPDATEINFO",updateInfo($focus->id)); + $smarty->assign("MOD",$mod_strings); + $smarty->assign("APP",$app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + + $check_button = Button_Check($module); + $smarty->assign("CHECK", $check_button); + $smarty->display("RelatedLists.tpl"); +} +?> \ No newline at end of file diff --git a/modules/Leads/ConvertLead.php b/modules/Leads/ConvertLead.php new file mode 100644 index 0000000..e7e3266 --- /dev/null +++ b/modules/Leads/ConvertLead.php @@ -0,0 +1,38 @@ +debug(" the id is " . $id); +} +$category = getParentTab(); + +require_once 'modules/Leads/ConvertLeadUI.php'; +$uiinfo = new ConvertLeadUI($id, $current_user); + +$smarty = new vtigerCRM_Smarty(); +$smarty->assign('UIINFO', $uiinfo); +$smarty->assign('MODULE', 'Leads'); +$smarty->assign('CATEGORY', $category); +$smarty->assign('THEME', $theme_path); +$smarty->assign('DATE_FORMAT', $current_user->date_format); +$smarty->assign('CAL_DATE_FORMAT', parse_calendardate($app_strings['NTC_DATE_FORMAT'])); +$smarty->display(vtlib_getModuleTemplate($currentModule, 'ConvertLead.tpl')); +?> diff --git a/modules/Leads/ConvertLeadUI.php b/modules/Leads/ConvertLeadUI.php new file mode 100644 index 0000000..e625c97 --- /dev/null +++ b/modules/Leads/ConvertLeadUI.php @@ -0,0 +1,263 @@ +leadid = $leadid; + $this->current_user = $current_user; + $sql = "SELECT * FROM vtiger_leaddetails,vtiger_leadscf,vtiger_crmentity + WHERE vtiger_leaddetails.leadid=vtiger_leadscf.leadid + AND vtiger_leaddetails.leadid=vtiger_crmentity.crmid + AND vtiger_leaddetails.leadid =?"; + $result = $adb->pquery($sql, array($this->leadid)); + $this->row = $adb->fetch_array($result); + if (getFieldVisibilityPermission('Leads', $current_user->id, 'company') == '1') { + $this->row["company"] = ''; + } + $this->setAssignedToInfo(); + } + + function isModuleActive($module) { + include_once 'include/utils/VtlibUtils.php'; + if (vtlib_isModuleActive($module) && ((isPermitted($module, 'EditView') == 'yes'))) { + return true; + } + return false; + } + + function isActive($field, $mod) { + global $adb; + $tabid = getTabid($mod); + $query = 'select * from vtiger_field where fieldname = ? and tabid = ? and presence in (0,2)'; + $res = $adb->pquery($query, array($field, $tabid)); + $rows = $adb->num_rows($res); + if ($rows > 0) { + return true; + }else + return false; + } + + function isMandatory($module, $fieldname) { + $fieldInfo = $this->getFieldInfo($module, $fieldname); + if ($fieldInfo['mandatory']) { + return true; + } + return false; + } + + function getFieldInfo($module, $fieldname) { + global $current_user; + $describe = vtws_describe($module, $current_user); + foreach ($describe['fields'] as $index => $fieldInfo) { + if ($fieldInfo['name'] == $fieldname) { + return $fieldInfo; + } + } + return false; + } + + function setAssignedToInfo() { + $userid = $this->row["smownerid"]; + //Retreiving the current user id + if ($userid != '') { + global $adb; + $query = "SELECT * from vtiger_users WHERE id = ?"; + $res = $adb->pquery($query, array($userid)); + $rows = $adb->num_rows($res); + $this->leadowner = $userid; + if ($rows > 0) { + $this->userselected = 'checked'; + $this->userdisplay = 'block'; + } else { + $this->groupselected = 'checked'; + $this->groupdisplay = 'block'; + } + } else { + $this->leadowner = $this->getUserId(); + $this->userselected = 'checked'; + $this->userdisplay = 'block'; + } + } + + function getUserSelected() { + return $this->userselected; + } + + function getUserDisplay() { + return $this->userdisplay; + } + + function getGroupSelected() { + return $this->groupselected; + } + + function getGroupDisplay() { + return $this->groupdisplay; + } + + function getLeadInfo() { + //Retreive lead details from database + return $this->row; + } + + function getDateFormat() { + return $this->current_user->date_format; + } + + function getleadId() { + return $this->leadid; + } + + function getCompany() { + global $default_charset; + $value = html_entity_decode($this->row['company'], ENT_QUOTES, $default_charset); + return htmlentities($value, ENT_QUOTES, $default_charset); + } + + function getIndustryList() { + global$adb; + + require_once 'modules/PickList/PickListUtils.php'; + + global $adb; + $industry_list = array(); + if (is_admin($this->current_user)) { + $pick_list_values = getAllPickListValues('industry'); + } else { + $pick_list_values = getAssignedPicklistValues('industry', $this->current_user->roleid, $adb); + } + foreach ($pick_list_values as $value) { + $industry_list[$value]["value"] = $value; + } + return $industry_list; + } + + function getSalesStageList() { + global$adb; + + require_once 'modules/PickList/PickListUtils.php'; + + global $adb; + $sales_stage_list = array(); + if (is_admin($this->current_user)) { + $pick_list_values = getAllPickListValues('sales_stage'); + } else { + $pick_list_values = getAssignedPicklistValues('sales_stage', $this->current_user->roleid, $adb); + } + foreach ($pick_list_values as $value) { + $sales_stage_list[$value]["value"] = $value; + } + return $sales_stage_list; + } + + function getUserId() { + return $this->current_user->id; + } + + /* + * function to form the user/group list + * array( + * key=> + * [id]=> + * [name]=> + * ) + */ + + function getOwnerList($type) { + $private = self::checkOwnership($this->current_user); + if ($type === 'user') + $owner = get_user_array(false, "Active", $this->row["smownerid"], $private); + else + $owner = get_group_array(false, "Active", $this->row["smownerid"], $private); + $owner_list = array(); + foreach ($owner as $id => $name) { + if ($id == $this->row['smownerid']) + $owner_list[] = array($type . 'id' => $id, $type . 'name' => $name, 'selected' => true); + else + $owner_list[] = array($type . 'id' => $id, $type . 'name' => $name, 'selected' => false); + } + return $owner_list; + } + + static function checkOwnership($user) { + $private = ''; + if ($user->id != 1) { + include 'user_privileges/sharing_privileges_' . $user->id . '.php'; + $Acc_tabid = getTabid('Accounts'); + $con_tabid = getTabid('Contacts'); + if ($defaultOrgSharingPermission[$Acc_tabid] === 0 || $defaultOrgSharingPermission[$Acc_tabid] == 3) { + $private = 'private'; + } elseif ($defaultOrgSharingPermission[$con_tabid] === 0 || $defaultOrgSharingPermission[$con_tabid] == 3) { + $private = 'private'; + } + } + return $private; + } + + function getMappedFieldValue($module, $fieldName, $editable) { + global $adb,$default_charset; + + $fieldid = getFieldid(getTabid($module), $fieldName); + + $sql = "SELECT leadfid FROM vtiger_convertleadmapping + WHERE (accountfid=? + OR contactfid=? + OR potentialfid=?) + AND editable=?"; + $result = $adb->pquery($sql, array($fieldid, $fieldid, $fieldid, $editable)); + $leadfid = $adb->query_result($result, 0, 'leadfid'); + + $sql = "SELECT fieldname FROM vtiger_field WHERE fieldid=? AND tabid=?"; + $result = $adb->pquery($sql, array($leadfid, getTabid('Leads'))); + $leadfname = $adb->query_result($result, 0, 'fieldname'); + + $fieldinfo = $this->getFieldInfo($module, $fieldName); + if ($fieldinfo['type']['name'] == 'picklist' || $fieldinfo['type']['name'] == 'multipicklist') { + $valuelist = null; + switch ($fieldName) { + case 'industry':$valuelist = $this->getIndustryList(); + break; + case 'sales_stage':$valuelist = $this->getSalesStageList(); + break; + } + foreach ($fieldinfo['type']['picklistValues'] as $key => $values) { + if ($values['value'] == $this->row[$leadfname]) { + return $this->row[$leadfname]; + } + } + return $fieldinfo['default']; + } + $value = html_entity_decode($this->row[$leadfname], ENT_QUOTES, $default_charset); + return htmlentities($value, ENT_QUOTES, $default_charset); + //return $this->row[$leadfname]; + } + +} + +?> diff --git a/modules/Leads/CustomAction.php b/modules/Leads/CustomAction.php new file mode 100644 index 0000000..f72082d --- /dev/null +++ b/modules/Leads/CustomAction.php @@ -0,0 +1,12 @@ + diff --git a/modules/Leads/CustomView.php b/modules/Leads/CustomView.php new file mode 100644 index 0000000..93231ed --- /dev/null +++ b/modules/Leads/CustomView.php @@ -0,0 +1,14 @@ + diff --git a/modules/Leads/Delete.php b/modules/Leads/Delete.php new file mode 100644 index 0000000..2f7b16b --- /dev/null +++ b/modules/Leads/Delete.php @@ -0,0 +1,39 @@ + \ No newline at end of file diff --git a/modules/Leads/DetailView.php b/modules/Leads/DetailView.php new file mode 100644 index 0000000..0180f1d --- /dev/null +++ b/modules/Leads/DetailView.php @@ -0,0 +1,204 @@ +id = $_REQUEST['record']; + + $focus->retrieve_entity_info($_REQUEST['record'], "Leads"); + $focus->id = $_REQUEST['record']; + $log->debug("id is " . $focus->id); + $focus->firstname = $focus->column_fields['firstname']; + $focus->lastname = $focus->column_fields['lastname']; +} +if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { + $focus->id = ""; +} + +global $theme, $current_user; +$theme_path = "themes/" . $theme . "/"; +$image_path = $theme_path . "images/"; + +$log->info("Lead detail view"); + +$smarty = new vtigerCRM_Smarty; +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); + +$smarty->assign("THEME", $theme); +$smarty->assign("IMAGE_PATH", $image_path); +$smarty->assign("PRINT_URL", "phprint.php?jt=" . session_id() . $GLOBALS['request_string']); +$smarty->assign("ID", $focus->id); + +// Module Sequence Numbering +$mod_seq_field = getModuleSequenceField($currentModule); +if ($mod_seq_field != null) { + $mod_seq_id = $focus->column_fields[$mod_seq_field['name']]; +} else { + $mod_seq_id = $focus->id; +} +$smarty->assign('MOD_SEQ_ID', $mod_seq_id); +// END + +$smarty->assign("SINGLE_MOD", 'Lead'); + +$lead_name = $focus->lastname; +if (getFieldVisibilityPermission($currentModule, $current_user->id, 'firstname') == '0') { + $lead_name .= ' ' . $focus->firstname; +} +$smarty->assign("NAME", $lead_name); + +$smarty->assign("UPDATEINFO", updateInfo($focus->id)); +$smarty->assign("BLOCKS", getBlocks($currentModule, "detail_view", '', $focus->column_fields)); +$smarty->assign("CUSTOMFIELD", $cust_fld); + +if (useInternalMailer() == 1) + $smarty->assign("INT_MAILER", "true"); + + +$val = isPermitted("Leads", "EditView", $_REQUEST['record']); + +if (isPermitted("Leads", "EditView", $_REQUEST['record']) == 'yes') + $smarty->assign("EDIT_DUPLICATE", "permitted"); + + +require_once 'modules/Leads/ConvertLeadUI.php'; + +$uiinfo = new ConvertLeadUI($_REQUEST['record'], $current_user); + +if (isPermitted("Leads", "EditView", $_REQUEST['record']) == 'yes' + && isPermitted("Leads", "ConvertLead") == 'yes' + && (isPermitted("Accounts", "EditView") == 'yes' || isPermitted("Contacts", "EditView") == 'yes') + && (vtlib_isModuleActive('Contacts') || vtlib_isModuleActive('Accounts')) + && !isLeadConverted($focus->id) + && (($uiinfo->getCompany() != null) || ($uiinfo->isModuleActive('Contacts') == true)) +) { + $smarty->assign("CONVERTLEAD", "permitted"); +} + +$category = getParentTab(); +$smarty->assign("CATEGORY", $category); + + +if (isPermitted("Leads", "Delete", $_REQUEST['record']) == 'yes') + $smarty->assign("DELETE", "permitted"); + +if (isPermitted("Emails", "EditView", '') == 'yes') { + //Added to pass the parents list as hidden for Emails -- 09-11-2005 + $parent_email = getEmailParentsList('Leads', $_REQUEST['record'], $focus); + $smarty->assign("HIDDEN_PARENTS_LIST", $parent_email); + $vtwsObject = VtigerWebserviceObject::fromName($adb, $currentModule); + $vtwsCRMObjectMeta = new VtigerCRMObjectMeta($vtwsObject, $current_user); + $emailFields = $vtwsCRMObjectMeta->getEmailFields(); + + $smarty->assign("SENDMAILBUTTON","permitted"); + $emails=array(); + foreach($emailFields as $key => $value) { + $emails[]=$value; + } + $smarty->assign("EMAILS", $emails); + $cond="LTrim('%s') !=''"; + $condition=array(); + foreach($emails as $key => $value) { + $condition[]=sprintf($cond,$value); + } + $condition_str=implode("||",$condition); + $js="if(".$condition_str."){fnvshobj(this,'sendmail_cont');sendmail('".$currentModule."',".$_REQUEST['record'].");}else{OpenCompose('','create');}"; + + $smarty->assign('JS',$js); +} + +if (isPermitted("Leads", "Merge", '') == 'yes') { + global $current_user; + require("user_privileges/user_privileges_" . $current_user->id . ".php"); + + $wordTemplateResult = fetchWordTemplateList("Leads"); + $tempCount = $adb->num_rows($wordTemplateResult); + $tempVal = $adb->fetch_array($wordTemplateResult); + for ($templateCount = 0; $templateCount < $tempCount; $templateCount++) { + $optionString[$tempVal["templateid"]] = $tempVal["filename"]; + $tempVal = $adb->fetch_array($wordTemplateResult); + } + if ($is_admin) + $smarty->assign("MERGEBUTTON", "permitted"); + elseif ($tempCount > 0) + $smarty->assign("MERGEBUTTON", "permitted"); + + $smarty->assign("TEMPLATECOUNT", $tempCount); + $smarty->assign("WORDTEMPLATEOPTIONS", $app_strings['LBL_SELECT_TEMPLATE_TO_MAIL_MERGE']); + $smarty->assign("TOPTIONS", $optionString); +} + +$tabid = getTabid("Leads"); +$validationData = getDBValidationData($focus->tab_name, $tabid); +$data = split_validationdataArray($validationData); + +$smarty->assign("VALIDATION_DATA_FIELDNAME", $data['fieldname']); +$smarty->assign("VALIDATION_DATA_FIELDDATATYPE", $data['datatype']); +$smarty->assign("VALIDATION_DATA_FIELDLABEL", $data['fieldlabel']); + +$check_button = Button_Check($module); +$smarty->assign("CHECK", $check_button); + +$smarty->assign("MODULE", $currentModule); +$smarty->assign("EDIT_PERMISSION", isPermitted($currentModule, 'EditView', $_REQUEST['record'])); +$smarty->assign("TODO_PERMISSION", CheckFieldPermission('parent_id', 'Calendar')); +$smarty->assign("EVENT_PERMISSION", CheckFieldPermission('parent_id', 'Events')); + +$smarty->assign("IS_REL_LIST", isPresentRelatedLists($currentModule)); +$smarty->assign("USE_ASTERISK", get_use_asterisk($current_user->id)); + +if ($singlepane_view == 'true') { + $related_array = getRelatedLists($currentModule, $focus); + $smarty->assign("RELATEDLISTS", $related_array); + + require_once('include/ListView/RelatedListViewSession.php'); + if (!empty($_REQUEST['selected_header']) && !empty($_REQUEST['selected_tab_id'])) { + RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['selected_tab_id']), vtlib_purify($_REQUEST['selected_header'])); + } + $open_related_modules = RelatedListViewSession::getRelatedModulesFromSession(); + $smarty->assign("SELECTEDHEADERS", $open_related_modules); +} +$smarty->assign("SinglePane_View", $singlepane_view); + +if (PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule . '_listquery'])) { + $recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id); + VT_detailViewNavigation($smarty, $recordNavigationInfo, $focus->id); +} + +// Record Change Notification +$focus->markAsViewed($current_user->id); +// END + +include_once('vtlib/Vtiger/Link.php'); +$customlink_params = Array('MODULE' => $currentModule, 'RECORD' => $focus->id, 'ACTION' => vtlib_purify($_REQUEST['action'])); +$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC', 'DETAILVIEW', 'DETAILVIEWWIDGET'), $customlink_params)); + +$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true)); + +$smarty->display("DetailView.tpl"); +?> \ No newline at end of file diff --git a/modules/Leads/DetailViewAjax.php b/modules/Leads/DetailViewAjax.php new file mode 100644 index 0000000..fd3c44f --- /dev/null +++ b/modules/Leads/DetailViewAjax.php @@ -0,0 +1,47 @@ +retrieve_entity_info($crmid,"Leads"); + $modObj->column_fields[$fieldname] = $fieldvalue; + $modObj->id = $crmid; + $modObj->mode = "edit"; + $modObj->save("Leads"); + if($modObj->id != "") + { + echo ":#:SUCCESS"; + }else + { + echo ":#:FAILURE"; + } + }else + { + echo ":#:FAILURE"; + } +} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE"){ + require_once 'include/ListView/RelatedListViewContents.php'; +} +?> \ No newline at end of file diff --git a/modules/Leads/EditView.php b/modules/Leads/EditView.php new file mode 100644 index 0000000..4a6b4b5 --- /dev/null +++ b/modules/Leads/EditView.php @@ -0,0 +1,19 @@ +assign("campaignid",vtlib_purify($_REQUEST['campaignid'])); +} + +$smarty->display("salesEditView.tpl"); + +?> \ No newline at end of file diff --git a/modules/Leads/ExportRecords.php b/modules/Leads/ExportRecords.php new file mode 100644 index 0000000..dcbf10e --- /dev/null +++ b/modules/Leads/ExportRecords.php @@ -0,0 +1,13 @@ + diff --git a/modules/Leads/FindDuplicateRecords.php b/modules/Leads/FindDuplicateRecords.php new file mode 100644 index 0000000..d226f45 --- /dev/null +++ b/modules/Leads/FindDuplicateRecords.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/Leads/Import.php b/modules/Leads/Import.php new file mode 100644 index 0000000..ae570f6 --- /dev/null +++ b/modules/Leads/Import.php @@ -0,0 +1,14 @@ + diff --git a/modules/Leads/LeadConvertToEntities.php b/modules/Leads/LeadConvertToEntities.php new file mode 100644 index 0000000..1aa84a7 --- /dev/null +++ b/modules/Leads/LeadConvertToEntities.php @@ -0,0 +1,127 @@ +"; + echo "
"; + echo "
+ + + + + + + + + +
+ ". getTranslatedString('SINGLE_'.$currentModule, $currentModule)." ". + getTranslatedString('CANNOT_CONVERT', $currentModule) ." +
+
    ". getTranslatedString('LBL_FOLLOWING_ARE_POSSIBLE_REASONS', $currentModule) .": +
  • ". getTranslatedString('LBL_LEADS_FIELD_MAPPING_INCOMPLETE', $currentModule) ."
  • +
  • ". getTranslatedString('LBL_MANDATORY_FIELDS_ARE_EMPTY', $currentModule) ."
  • +
+
+
"; + + if (is_admin($current_user)) { + echo "". getTranslatedString('LBL_LEADS_FIELD_MAPPING', $currentModule) ."
"; + } + + echo "". getTranslatedString('LBL_GO_BACK', $currentModule) ."
"; + + echo "
+
+
"; +} +?> diff --git a/modules/Leads/Leads.js b/modules/Leads/Leads.js new file mode 100644 index 0000000..d436c41 --- /dev/null +++ b/modules/Leads/Leads.js @@ -0,0 +1,202 @@ +/********************************************************************************* +** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ + + +document.write(" +pquery($sql, array($templateid)); +$temparray = $adb->fetch_array($result); + +$fileContent = $temparray['data']; +$filename=html_entity_decode($temparray['filename'], ENT_QUOTES, $default_charset); + +// Fix For: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$filename= $randomfilename . "_word.doc"; + +$filesize=$temparray['filesize']; +$wordtemplatedownloadpath =$root_directory ."/test/wordtemplatedownload/"; + + +$handle = fopen($wordtemplatedownloadpath .$filename,"wb"); +fwrite($handle,base64_decode($fileContent),$filesize); +fclose($handle); + +//for mass merge +$mass_merge = $_REQUEST['allselectedboxes']; +$single_record = $_REQUEST['record']; + +if($mass_merge != "") +{ + $mass_merge = explode(";",$mass_merge); + //array_pop($mass_merge); + $temp_mass_merge = $mass_merge; + if(array_pop($temp_mass_merge)=="") + array_pop($mass_merge); + //$mass_merge = implode(",",$mass_merge); +}else if($single_record != "") +{ + $mass_merge = $single_record; +}else +{ + die("Record Id is not found"); +} + +//<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>> + +global $current_user; +require('user_privileges/user_privileges_'.$current_user->id.'.php'); +if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] == 0 || $module == "Users" || $module == "Emails") +{ + $query1="select tablename,columnname,fieldlabel from vtiger_field where tabid=7 and vtiger_field.presence in (0,2) order by tablename"; + $params1 = array(); +} +else +{ + $profileList = getCurrentUserProfileList(); + $query1="select vtiger_field.tablename,vtiger_field.columnname,vtiger_field.fieldlabel from vtiger_field INNER JOIN vtiger_profile2field ON vtiger_profile2field.fieldid=vtiger_field.fieldid INNER JOIN vtiger_def_org_field ON vtiger_def_org_field.fieldid=vtiger_field.fieldid where vtiger_field.tabid in (7) AND vtiger_profile2field.visible=0 AND vtiger_def_org_field.visible=0 AND vtiger_profile2field.profileid IN (". generateQuestionMarks($profileList) .") and vtiger_field.presence in (0,2) GROUP BY vtiger_field.fieldid order by vtiger_field.tablename"; + $params1 = array($profileList); + //Postgres 8 fixes + if( $adb->dbType == "pgsql") + $query1 = fixPostgresQuery( $query1, $log, 0); +} + +$result = $adb->pquery($query1, $params1); +$y=$adb->num_rows($result); +$userNameSql = getSqlForNameInDisplayFormat(array('first_name'=> + 'vtiger_users.first_name', 'last_name' => 'vtiger_users.last_name'), 'Users'); + +for ($x=0; $x<$y; $x++) +{ + $tablename = $adb->query_result($result,$x,"tablename"); + $columnname = $adb->query_result($result,$x,"columnname"); + $querycolumns[$x] = $tablename.".".$columnname; + if($columnname == "smownerid") + { + $querycolumns[$x] = "case when (vtiger_users.user_name not like '') then $userNameSql else vtiger_groups.groupname end as username,vtiger_users.first_name,vtiger_users.last_name,vtiger_users.user_name,vtiger_users.secondaryemail,vtiger_users.title,vtiger_users.phone_work,vtiger_users.department,vtiger_users.phone_mobile,vtiger_users.phone_other,vtiger_users.phone_fax,vtiger_users.email1,vtiger_users.phone_home,vtiger_users.email2,vtiger_users.address_street,vtiger_users.address_city,vtiger_users.address_state,vtiger_users.address_postalcode,vtiger_users.address_country"; + } + $field_label[$x] = "LEAD_".strtoupper(str_replace(" ","",$adb->query_result($result,$x,"fieldlabel"))); + if($columnname == "smownerid") + { + $field_label[$x] = $field_label[$x].",USER_FIRSTNAME,USER_LASTNAME,USER_USERNAME,USER_SECONDARYEMAIL,USER_TITLE,USER_OFFICEPHONE,USER_DEPARTMENT,USER_MOBILE,USER_OTHERPHONE,USER_FAX,USER_EMAIL,USER_HOMEPHONE,USER_OTHEREMAIL,USER_PRIMARYADDRESS,USER_CITY,USER_STATE,USER_POSTALCODE,USER_COUNTRY"; + } +} +$csvheader = implode(",",$field_label); +//<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>> + +if(count($querycolumns) > 0) +{ + $selectcolumns = implode($querycolumns,","); + +$query = "select ".$selectcolumns." from vtiger_leaddetails + inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_leaddetails.leadid + inner join vtiger_leadsubdetails on vtiger_leadsubdetails.leadsubscriptionid=vtiger_leaddetails.leadid + inner join vtiger_leadaddress on vtiger_leadaddress.leadaddressid=vtiger_leadsubdetails.leadsubscriptionid + inner join vtiger_leadscf on vtiger_leaddetails.leadid = vtiger_leadscf.leadid + left join vtiger_campaignleadrel on vtiger_leaddetails.leadid = vtiger_campaignleadrel.leadid + left join vtiger_campaignrelstatus on vtiger_campaignrelstatus.campaignrelstatusid = vtiger_campaignleadrel.campaignrelstatusid + LEFT JOIN vtiger_groups + ON vtiger_groups.groupid = vtiger_crmentity.smownerid + left join vtiger_users on vtiger_users.id = vtiger_crmentity.smownerid + where vtiger_crmentity.deleted=0 and vtiger_leaddetails.leadid in (". generateQuestionMarks($mass_merge) .")"; + +$result = $adb->pquery($query, array($mass_merge)); +$avail_pick_arr = getAccessPickListValues('Leads'); +while($columnValues = $adb->fetch_array($result)) +{ + $y=$adb->num_fields($result); + for($x=0; $x<$y; $x++) + { + $value = $columnValues[$x]; + foreach($columnValues as $key=>$val) + { + if($val == $value && $value != '') + { + if(array_key_exists($key,$avail_pick_arr)) + { + if(!in_array($val,$avail_pick_arr[$key])) + { + $value = "Not Accessible"; + } + } + } + } + //<<<<<<<<<<<<<<< For Blank Fields >>>>>>>>>>>>>>>>>>>>>>>>>>>> + if(trim($value) == "--None--" || trim($value) == "--none--") + { + $value = ""; + } + //<<<<<<<<<<<<<<< End >>>>>>>>>>>>>>>>>>>>>>>>>>>> + $actual_values[$x] = $value; + $actual_values[$x] = str_replace('"'," ",$actual_values[$x]); + //if value contains any line feed or carriage return replace the value with ".value." + if (preg_match ("/(\r?\n)/", $actual_values[$x])) + { + $actual_values[$x] = '"'.$actual_values[$x].'"'; + } + $actual_values[$x] = decode_html(str_replace(","," ",$actual_values[$x])); + } + $mergevalue[] = implode($actual_values,","); +} +$csvdata = implode($mergevalue,"###"); +}else +{ + die("No vtiger_fields to do Merge"); +} +// Fix for: http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/2107 +$datafilename = $randomfilename . "_data.csv"; + +$handle = fopen($wordtemplatedownloadpath.$datafilename,"wb"); +fwrite($handle,$csvheader."\r\n"); +fwrite($handle,str_replace("###","\r\n",$csvdata)); +fclose($handle); + +?> + + + + diff --git a/modules/Leads/Popup.php b/modules/Leads/Popup.php new file mode 100644 index 0000000..88877b4 --- /dev/null +++ b/modules/Leads/Popup.php @@ -0,0 +1,20 @@ + diff --git a/modules/Leads/ProcessDuplicates.php b/modules/Leads/ProcessDuplicates.php new file mode 100644 index 0000000..bb5047f --- /dev/null +++ b/modules/Leads/ProcessDuplicates.php @@ -0,0 +1,134 @@ +pquery("SELECT count(*) AS count FROM vtiger_crmentity WHERE crmid=? and deleted=0", array($merge_id)); + $count = $adb->query_result($result,0,'count'); + + if($count > 0) + { + // First, save the primary record + $focus->mode="edit"; + setObjectValuesFromRequest($focus); + $focus->save($module); + $rec_values=$focus->column_fields; + + // Remove the id of primary record from the list of records to be deleted. + $del_value=explode(",",$recordids,-1); + $offset = array_search($merge_id,$del_value); + unset($del_value[$offset]); + + // Transfer the related lists of the records to be deleted, to the primary record's related list + if(method_exists($focus, 'transferRelatedRecords')){ + $focus->transferRelatedRecords($module,$del_value,$merge_id); + } else { + transferRelatedRecords($module,$del_value,$merge_id); + } + + // Delete the records by id specified in the list + foreach($del_value as $value) + { + DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$value,""); + } + } + + ?> + +assign("EDIT_DUPLICATE",""); + if($record_count == 2) { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + else { + if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[2]) == 'yes' + && isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[2]) == 'yes') + $smarty->assign("EDIT_DUPLICATE","permitted"); + } + + $all_values_array=getRecordValues($exploded_id,$module); + $all_values=$all_values_array[0]; + $js_arr_val=$all_values_array[1]; + $fld_array=$all_values_array[2]; + $js_arr=implode(",",$js_arr_val); + + $imported_records = Array(); + $sql="select bean_id from vtiger_users_last_import where bean_type=? and deleted=0"; + $result = $adb->pquery($sql, array($module)); + $num_rows=$adb->num_rows($result); + $count=0; + for($i=0; $i<$num_rows;$i++) + { + foreach($exploded_id as $value) + if($value == $adb->query_result($result,$i,"bean_id")) + $count++; + array_push($imported_records,$adb->query_result($result,$i,"bean_id")); + } + + if ($record_count == $count) + $no_existing=1; + else + $no_existing=0; + + $smarty->assign("MOD", $mod_strings); + $smarty->assign("APP", $app_strings); + $smarty->assign("RECORD_COUNT",$record_count); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("MODULENAME", $module); + $smarty->assign("PARENT_TAB", $parent_tab); + $smarty->assign("JS_ARRAY", $js_arr); + $smarty->assign("ID_ARRAY", $exploded_id); + $smarty->assign("IDSTRING",$idstring); + $smarty->assign("ALLVALUES", $all_values); + $smarty->assign("FIELD_ARRAY", $fld_array); + $smarty->assign("IMPORTED_RECORDS", $imported_records); + $smarty->assign("NO_EXISTING", $no_existing); + $smarty->display("MergeFields.tpl"); +} + +?> diff --git a/modules/Leads/QuickCreate.php b/modules/Leads/QuickCreate.php new file mode 100644 index 0000000..8d5998b --- /dev/null +++ b/modules/Leads/QuickCreate.php @@ -0,0 +1,12 @@ + diff --git a/modules/Leads/Save.php b/modules/Leads/Save.php new file mode 100644 index 0000000..2e41f3f --- /dev/null +++ b/modules/Leads/Save.php @@ -0,0 +1,176 @@ +id = $_REQUEST['record']; +} +if(isset($_REQUEST['mode'])) +{ + $focus->mode = $_REQUEST['mode']; +} + +//$focus->retrieve($_REQUEST['record']); + +foreach($focus->column_fields as $fieldname => $val) +{ + if(isset($_REQUEST[$fieldname])) { + if(is_array($_REQUEST[$fieldname])) + $value = $_REQUEST[$fieldname]; + else + $value = trim($_REQUEST[$fieldname]); + $log->info("the value is ".$value); + $focus->column_fields[$fieldname] = $value; + } +} + +if($_REQUEST['assigntype'] == 'U') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id']; +} elseif($_REQUEST['assigntype'] == 'T') { + $focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id']; +} + +$focus->save("Leads"); + +$return_id = $focus->id; + $log->info("the return id is ".$return_id); +$parenttab = getParentTab(); +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']); +else $return_module = "Leads"; +if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']); +else $return_action = "DetailView"; +if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']); + +$local_log->debug("Saved record with id of ".$return_id); +//code added for returning back to the current view after edit from list view +if($_REQUEST['return_viewname'] == '') $return_viewname='0'; +if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']); + +if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] == "Campaigns") +{ + if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") + { + $campLeadStatusResult = $adb->pquery("select campaignrelstatusid from vtiger_campaignleadrel where campaignid=? AND leadid=?",array($_REQUEST['return_id'], $focus->id)); + $leadStatus = $adb->query_result($campLeadStatusResult,0,'campaignrelstatusid'); + $sql = "delete from vtiger_campaignleadrel where leadid = ?"; + $adb->pquery($sql, array($focus->id)); + if(isset($leadStatus) && $leadStatus !=''){ + $sql = "insert into vtiger_campaignleadrel values (?,?,?)"; + $adb->pquery($sql, array($_REQUEST['return_id'], $focus->id,$leadStatus)); + } + else{ + $sql = "insert into vtiger_campaignleadrel values (?,?,1)"; + $adb->pquery($sql, array($_REQUEST['return_id'], $focus->id)); + } + } +} +header("Location: index.php?action=$return_action&module=$return_module&record=$return_id&parenttab=$parenttab&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']).$search); +/** Function to save the Lead custom fields info into database + * @param integer $entity_id - leadid +*/ +function save_customfields($entity_id) +{ + $log->debug("Entering save_customfields(".$entity_id.") method ..."); + $log->debug("save custom vtiger_field invoked ".$entity_id); + global $adb; + $dbquery="select * from customfields where module='Leads'"; + $result = $adb->pquery($dbquery, array()); + $custquery = "select * from leadcf where leadid=?"; + $cust_result = $adb->pquery($custquery, array($entity_id)); + if($adb->num_rows($result) != 0) + { + + $columns=''; + $params = array(); + $update=''; + $noofrows = $adb->num_rows($result); + for($i=0; $i<$noofrows; $i++) + { + $fldName=$adb->query_result($result,$i,"fieldlabel"); + $colName=$adb->query_result($result,$i,"column_name"); + if(isset($_REQUEST[$colName])) + { + $fldvalue=$_REQUEST[$colName]; + $log->info("the columnName is ".$fldvalue); + if(get_magic_quotes_gpc() == 1) + { + $fldvalue = stripslashes($fldvalue); + } + } + else + { + $fldvalue = ''; + } + if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0) + { + //Update Block + if($i == 0) + { + $update = $colName.'=?'; + } + else + { + $update .= ', '.$colName.'=?'; + } + array_push($params, $fldvalue); + } + else + { + //Insert Block + if($i == 0) + { + $columns='leadid, '.$colName; + array_push($params, $entity_id); + } + else + { + $columns .= ', '.$colName; + } + array_push($params, $fldvalue); + } + + + } + if(isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $adb->num_rows($cust_result) !=0) + { + //Update Block + $query = 'update leadcf SET '.$update.' where leadid=?'; + array_push($params, $entity_id); + $adb->pquery($query, $params); + } + else + { + //Insert Block + $query = 'insert into leadcf ('.$columns.') values('. generateQuestionMarks($params) .')'; + $adb->pquery($query, $params); + } + + } + $log->debug("Exiting save_customfields method ..."); +} +?> diff --git a/modules/Leads/Settings.php b/modules/Leads/Settings.php new file mode 100644 index 0000000..1fb3422 --- /dev/null +++ b/modules/Leads/Settings.php @@ -0,0 +1,76 @@ +pquery("select * from vtiger_settings_field where name = ? and active=0",array('LBL_FIELDFORMULAS')); + if($adb->num_rows($sql_result) > 0) { + $menu_array['FieldFormulas']['location'] = $adb->query_result($sql_result, 0, 'linkto').'&formodule='.$module; + $menu_array['FieldFormulas']['image_src'] = $adb->query_result($sql_result, 0, 'iconpath'); + $menu_array['FieldFormulas']['desc'] = getTranslatedString($adb->query_result($sql_result, 0, 'description'), 'FieldFormulas'); + $menu_array['FieldFormulas']['label'] = getTranslatedString($adb->query_result($sql_result, 0, 'name'), 'FieldFormulas'); + } +} + +if(vtlib_isModuleActive('Tooltip')){ + $sql_result = $adb->pquery("select * from vtiger_settings_field where name = ? and active=0",array('LBL_TOOLTIP_MANAGEMENT')); + if($adb->num_rows($sql_result) > 0) { + $menu_array['Tooltip']['location'] = $adb->query_result($sql_result, 0, 'linkto').'&formodule='.$module; + $menu_array['Tooltip']['image_src'] = vtiger_imageurl($adb->query_result($sql_result, 0, 'iconpath'), $theme); + $menu_array['Tooltip']['desc'] = getTranslatedString($adb->query_result($sql_result, 0, 'description'),'Tooltip'); + $menu_array['Tooltip']['label'] = getTranslatedString($adb->query_result($sql_result, 0, 'name'),'Tooltip'); + } +} + +$menu_array['LeadsMapping']['location'] = 'index.php?module=Settings&action=CustomFieldList&parenttab=Settings&formodule='.$module; +$menu_array['LeadsMapping']['image_src'] = vtiger_imageurl('custom.gif', $theme); +$menu_array['LeadsMapping']['desc'] = getTranslatedString('LEADS_CUSTOM_FIELD_MAPPING_DESCRIPTION'); +$menu_array['LeadsMapping']['label'] = getTranslatedString('LEADS_CUSTOM_FIELD_MAPPING'); + + +$sql_result = $adb->pquery("SELECT * FROM vtiger_settings_field WHERE name = ? AND active=0",array('LBL_WORKFLOW_LIST')); +if($adb->num_rows($sql_result) > 0) { + $menu_array['Workflow']['location'] = $adb->query_result($sql_result, 0, 'linkto').'&list_module='.$module; + $menu_array['Workflow']['image_src'] = vtiger_imageurl($adb->query_result($sql_result, 0, 'iconpath'), $theme); + $menu_array['Workflow']['desc'] = getTranslatedString($adb->query_result($sql_result, 0, 'description'),'com_vtiger_workflow'); + $menu_array['Workflow']['label'] = getTranslatedString($adb->query_result($sql_result, 0, 'name'),'com_vtiger_workflow'); +} + +//add blanks for 3-column layout +$count = count($menu_array)%3; +if($count>0) { + for($i=0;$i<3-$count;$i++) { + $menu_array[] = array(); + } +} + +$smarty->assign("MOD",$mod_strings); +$smarty->assign("APP",$app_strings); +$smarty->assign("IMAGE_PATH", "themes/$theme/images/"); +$smarty->assign('MODULE',$module); +$smarty->assign('MODULE_LBL',getTranslatedString($module, $module)); +$smarty->assign('MENU_ARRAY', $menu_array); + +$smarty->display(vtlib_getModuleTemplate('Vtiger','Settings.tpl')); + +?> diff --git a/modules/Leads/TagCloud.php b/modules/Leads/TagCloud.php new file mode 100644 index 0000000..859b11f --- /dev/null +++ b/modules/Leads/TagCloud.php @@ -0,0 +1,12 @@ + diff --git a/modules/Leads/UnifiedSearch.php b/modules/Leads/UnifiedSearch.php new file mode 100644 index 0000000..9a37320 --- /dev/null +++ b/modules/Leads/UnifiedSearch.php @@ -0,0 +1,11 @@ + \ No newline at end of file diff --git a/modules/Leads/index.php b/modules/Leads/index.php new file mode 100644 index 0000000..acccb64 --- /dev/null +++ b/modules/Leads/index.php @@ -0,0 +1,21 @@ + diff --git a/modules/Leads/language/de_de.lang.php b/modules/Leads/language/de_de.lang.php new file mode 100644 index 0000000..c4e643c --- /dev/null +++ b/modules/Leads/language/de_de.lang.php @@ -0,0 +1,252 @@ +'Leads', + 'LBL_DIRECT_REPORTS_FORM_NAME'=>'Vorgesetzter', + 'LBL_MODULE_TITLE'=>'Leads: Home', + 'LBL_SEARCH_FORM_TITLE'=>'Lead suchen', + 'LBL_LIST_FORM_TITLE'=>'Leads', + 'LBL_NEW_FORM_TITLE'=>'neuer Lead', + 'LBL_LEAD_OPP_FORM_TITLE'=>'Kontakt-Verkaufspotential:', + 'LBL_LEAD'=>'Lead:', + 'LBL_ADDRESS_INFORMATION'=>'Adresse', + 'LBL_CUSTOM_INFORMATION'=>'zusätzliche Information', + + 'LBL_LIST_NAME'=>'Name', + 'LBL_LIST_LAST_NAME'=>'Nachname', + 'LBL_LIST_COMPANY'=>'Organisation', + 'LBL_LIST_WEBSITE'=>'Webseite', + 'LBL_LIST_LEAD_NAME'=>'Lead', + 'LBL_LIST_EMAIL'=>'E-Mail', + 'LBL_LIST_PHONE'=>'Telefon', + 'LBL_LIST_LEAD_ROLE'=>'Rolle', + + 'LBL_NAME'=>'Name:', + 'LBL_LEAD_NAME'=>'Lead Name:', + 'LBL_LEAD_INFORMATION'=>'Lead', + 'LBL_FIRST_NAME'=>'Vorname:', + 'LBL_PHONE'=>'Telefon:', + 'LBL_COMPANY'=>'Organisation:', + 'LBL_DESIGNATION'=>'Kennzeichnung:', + 'LBL_PHONE'=>'Telefon:', + 'LBL_LAST_NAME'=>'Nachname:', + 'LBL_MOBILE'=>'Handy:', + 'LBL_EMAIL'=>'E-Mail:', + 'LBL_LEAD_SOURCE'=>'Leadquelle:', + 'LBL_LEAD_STATUS'=>'Leadstatus:', + 'LBL_WEBSITE'=>'Webseite:', + 'LBL_FAX'=>'Fax:', + 'LBL_INDUSTRY'=>'Branche:', + 'LBL_ANNUAL_REVENUE'=>'Jahresumsatz:', + 'LBL_RATING'=>'Bewertung:', + 'LBL_LICENSE_KEY'=>'Lizenzschlüssel:', + 'LBL_NO_OF_EMPLOYEES'=>'Anzahl Angestellte:', + 'LBL_YAHOO_ID'=>'Yahoo E-Mail:', + + 'LBL_ADDRESS_STREET'=>'Strasse:', + 'LBL_ADDRESS_POSTAL_CODE'=>'PLZ:', + 'LBL_ADDRESS_CITY'=>'Ort:', + 'LBL_ADDRESS_COUNTRY'=>'Land:', + 'LBL_ADDRESS_STATE'=>'Bundesland:', + 'LBL_ADDRESS'=>'Adresse:', + 'LBL_DESCRIPTION_INFORMATION'=>'weitere Informationen', + 'LBL_DESCRIPTION'=>'Beschreibung:', + + 'LBL_CONVERT_LEAD'=>'Lead umwandeln:', + 'LBL_CONVERT_LEAD_INFORMATION'=>'Lead Informationen umwandeln', + 'LBL_ACCOUNT_NAME'=>'Organisation', + 'LBL_POTENTIAL_NAME'=>'Verkaufspotential', + 'LBL_POTENTIAL_CLOSE_DATE'=>'Abschlussdatum', + 'LBL_POTENTIAL_AMOUNT'=>'erwarteter Umsatz für das Potential', + 'LBL_POTENTIAL_SALES_STAGE'=>'Verkaufsstufe des Potentials', + + + 'NTC_DELETE_CONFIRMATION'=>'Möchten Sie diesen Eintrag löschen?', + 'NTC_REMOVE_CONFIRMATION'=>'Möchten Sie diesen Eintrag wirklich löschen?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Möchten Sie den Vorgesetzten von diesem Eintrag löschen?', + 'NTC_REMOVE_OPP_CONFIRMATION'=>'Möchten Sie diesen Eintrag vom Verkaufspotential löschen?', + 'ERR_DELETE_RECORD'=>"Zum Löschen muss mindestens ein Eintrag markiert sein.", + 'NTC_COPY_PRIMARY_ADDRESS'=>'Kopiere primäre Adresse zur alternativen Adresse', + 'NTC_COPY_ALTERNATE_ADDRESS'=>'Kopiere alternative Adresse zur primären Adresse', + + // Added fields in fetchfile.php, import.php -- crm4-Beta + 'LBL_COLON'=>' : ', + 'LBL_IMPORT_LEADS'=>'importiere Leads', + 'LBL_LEADS_FILE_LIST'=>'Dateiliste Leads', + 'LBL_INSTRUCTIONS'=>'Anleitung', + 'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'Bitte eine XLS-Datei angeben', + 'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'Mindestens eine Importdatei angeben', + + 'LBL_NONE'=>'keine', + 'LBL_ASSIGNED_TO'=>'zuständig:', + 'LBL_SELECT_LEAD'=>'Lead wählen', + 'LBL_GENERAL_INFORMATION'=>'allgemeine Information', + 'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'kein Verkaufspotential bei Umwandlung erstellen', + + //for v4 release added + 'LBL_NEW_POTENTIAL'=>'Neues Verkaufspotential', + 'LBL_POTENTIAL_TITLE'=>'Verkaufspotentiale', + + 'LBL_NEW_TASK'=>'neue Aufgabe', + 'LBL_TASK_TITLE'=>'Aufgaben', + 'LBL_NEW_CALL'=>'neuer Anruf', + 'LBL_CALL_TITLE'=>'Anrufe', + 'LBL_NEW_MEETING'=>'neue Besprechung', + 'LBL_MEETING_TITLE'=>'Besprechungen', + 'LBL_NEW_EMAIL'=>'neue E-Mail', + 'LBL_EMAIL_TITLE'=>'E-Mails', + 'LBL_NEW_NOTE'=>'neue Notiz', + 'LBL_NOTE_TITLE'=>'Notizen', + 'LBL_NEW_ATTACHMENT'=>'neuer Anhang', + 'LBL_ATTACHMENT_TITLE'=>'Anhänge', + + + //Added fields after RC1 - Release + 'LBL_ALL'=>'alle', + 'LBL_CONTACTED'=>'kontaktiert', + 'LBL_LOST'=>'verloren', + 'LBL_HOT'=>'heiss', + 'LBL_COLD'=>'kalt', + + // Added for 4GA + 'LBL_TOOL_FORM_TITLE'=>'Lead: Werkzeuge', + + 'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'Vorlage für Brief:', + + //Added for 4GA + 'Salutation'=>'Anrede', + 'First Name'=>'Vorname', + 'Phone'=>'Telefon', + 'Last Name'=>'Nachname', + 'Mobile'=>'Handy', + 'Company'=>'Organisation', + 'Fax'=>'Fax', + 'Email'=>'E-Mail', + 'Lead Source'=>'Leadquelle', + 'Website'=>'Webseite', + 'Annual Revenue'=>'Jahresumsatz', + 'Lead Status'=>'Leadstatus', + 'Industry'=>'Branche', + 'Rating'=>'Bewertung', + 'No Of Employees'=>'Anzahl Mitarbeiter', + 'Assigned To'=>'zuständig ', + 'Yahoo Id'=>'Yahoo E-Mail', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + 'Street'=>'Strasse', + 'Postal Code'=>'PLZ', + 'City'=>'Ort', + 'Country'=>'Land', + 'State'=>'Bundesland', + 'Description'=>'Beschreibung', + 'Po Box'=>'Postfach', + 'Campaign Source'=>'Kampagnequelle', + //Added for CustomView 4.2 Release + 'Name'=>'Name', + 'LBL_NEW_LEADS'=>'meine neuen Leads', + + //Added for Existing Picklist Entries + + '--None--'=>'--ohne--', + 'Mr.'=>'Sehr geehrter Herr', + 'Ms.'=>'Sehr geehrte Frau', + 'Mrs.'=>'Sehr geehrte Frau', + 'Dr.'=>'Sehr geehrter Herr Dr.', + 'Prof.'=>'Sehr geehrter Herr Prof.', + + 'Acquired'=>'erworben', + 'Active'=>'aktiv', + 'Market Failed'=>'Markt verfehlt', + 'Project Cancelled'=>'Projekt abgebrochen', + 'Shutdown'=>'Stillstand', + + 'Apparel'=>'Bekleidungsindustrie', + 'Banking'=>'Banken', + 'Biotechnology'=>'Biotechnologie', + 'Chemicals'=>'Chemie', + 'Communications'=>'Kommunikation', + 'Construction'=>'Anlagenbau', + 'Consulting'=>'Beratung', + 'Education'=>'Bildung', + 'Electronics'=>'Elektronik', + 'Energy'=>'Energie', + 'Engineering'=>'Ingenieurwesen', + 'Entertainment'=>'Unterhaltung', + 'Environmental'=>'Umwelt', + 'Finance'=>'Finanzen', + 'Food & Beverage'=>'Nahrungsmittel', + 'Government'=>'Behörde', + 'Healthcare'=>'Gesundheitswesen', + 'Hospitality'=>'Beherbergung', + 'Insurance'=>'Versicherung', + 'Machinery'=>'Maschinen', + 'Manufacturing'=>'Fertigung', + 'Media'=>'Medien', + 'Not For Profit'=>'gemeinnützig', + 'Recreation'=>'Freizeit und Erholung', + 'Retail'=>'Einzelhandel', + 'Shipping'=>'Spedition', + 'Technology'=>'Technologie', + 'Telecommunications'=>'Telekommunikation', + 'Transportation'=>'Transport', + 'Utilities'=>'Versorgungseinrichtung', + 'Other'=>'andere', + + 'Cold Call'=>'kalter Anruf', + 'Existing Customer'=>'existierender Kunde', + 'Self Generated'=>'selbst erzeugt', + 'Employee'=>'Mitarbeiter', + 'Partner'=>'Partner', + 'Public Relations'=>'Public Relations', + 'Direct Mail'=>'per Brief', + 'Conference'=>'Konferenz', + 'Trade Show'=>'Messe', + 'Web Site'=>'Web Seite', + 'Word of mouth'=>'Empfehlung', + + 'Attempted to Contact'=>'Kontaktierung versucht', + 'Cold'=>'kalt', + 'Contact in Future'=>'in der Zukunft kontaktieren', + 'Contacted'=>'kontaktiert', + 'Hot'=>'heiss', + 'Junk Lead'=>'wertloser Lead', + 'Lost Lead'=>'Lead verloren', + 'Not Contacted'=>'Nicht kontaktiert', + 'Pre Qualified'=>'vorqualifiziert', + 'Qualified'=>'qualifiziert', + 'Warm'=>'warm', + + // Added/Updated for vtiger CRM 5.0.4 + + 'Designation'=>'Funktion', + + // Added after 5.0.4 GA + + //Module Sequence Numbering + 'Lead No'=>'Lead Nr.', + // END + + 'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Übertrage zugeordnete Datensätze zu', + + 'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'Folgende könnten mögliche Gründe sein', + 'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'Alle Pflichtfelder sind nicht zugeordnet', + 'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Einige Pflichtfelder sind leer', + 'LBL_LEADS_FIELD_MAPPING' => 'Zuordnung der benutzerdefinierten Lead Felder', + 'LBL_FIELD_SETTINGS' => 'Feldeinstellungen', + 'Leads ID' => 'Leads-ID', +); + +?> \ No newline at end of file diff --git a/modules/Leads/language/en_gb.lang.php b/modules/Leads/language/en_gb.lang.php new file mode 100644 index 0000000..82a588d --- /dev/null +++ b/modules/Leads/language/en_gb.lang.php @@ -0,0 +1,207 @@ + 'Leads', + 'LBL_DIRECT_REPORTS_FORM_NAME' => 'Direct Reports', + 'LBL_MODULE_TITLE' => 'Leads: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Lead Search', + 'LBL_LIST_FORM_TITLE' => 'Lead List', + 'LBL_NEW_FORM_TITLE' => 'New Lead', + 'LBL_LEAD_OPP_FORM_TITLE' => 'Contact-Opportunity:', + 'LBL_LEAD' => 'Lead:', + 'LBL_ADDRESS_INFORMATION' => 'Address Information', + 'LBL_CUSTOM_INFORMATION' => 'Custom Information', + 'LBL_LIST_NAME' => 'Name', + 'LBL_LIST_LAST_NAME' => 'Last Name', + 'LBL_LIST_COMPANY' => 'Company', + 'LBL_LIST_WEBSITE' => 'Website', + 'LBL_LIST_LEAD_NAME' => 'Lead Name', + 'LBL_LIST_EMAIL' => 'Email', + 'LBL_LIST_PHONE' => 'Phone', + 'LBL_LIST_LEAD_ROLE' => 'Role', + 'LBL_NAME' => 'Name:', + 'LBL_LEAD_NAME' => 'Lead Name:', + 'LBL_LEAD_INFORMATION' => 'Lead Information', + 'LBL_FIRST_NAME' => 'First Name:', + 'LBL_PHONE' => 'Phone:', + 'LBL_COMPANY' => 'Company:', + 'LBL_DESIGNATION' => 'Designation:', + 'LBL_LAST_NAME' => 'Last Name:', + 'LBL_MOBILE' => 'Mobile:', + 'LBL_EMAIL' => 'Email:', + 'LBL_LEAD_SOURCE' => 'Lead Source:', + 'LBL_LEAD_STATUS' => 'Lead Status:', + 'LBL_WEBSITE' => 'Website:', + 'LBL_FAX' => 'Fax:', + 'LBL_INDUSTRY' => 'Industry:', + 'LBL_ANNUAL_REVENUE' => 'Annual Revenue:', + 'LBL_RATING' => 'Rating:', + 'LBL_LICENSE_KEY' => 'License Key:', + 'LBL_NO_OF_EMPLOYEES' => 'No. of Employees:', + 'LBL_YAHOO_ID' => 'Yahoo! ID:', + 'LBL_ADDRESS_STREET' => 'Street:', + 'LBL_ADDRESS_POSTAL_CODE' => 'Postcode:', + 'LBL_ADDRESS_CITY' => 'City:', + 'LBL_ADDRESS_COUNTRY' => 'Country:', + 'LBL_ADDRESS_STATE' => 'County:', + 'LBL_ADDRESS' => 'Address:', + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', + 'LBL_DESCRIPTION' => 'Description:', + 'LBL_CONVERT_LEAD' => 'Convert Lead:', + 'LBL_CONVERT_LEAD_INFORMATION' => 'Convert Lead Information', + 'LBL_ACCOUNT_NAME' => 'Organisation Name', + 'LBL_POTENTIAL_NAME' => 'Opportunity Name', + 'LBL_POTENTIAL_CLOSE_DATE' => 'Opportunity Close Date', + 'LBL_POTENTIAL_AMOUNT' => 'Opportunity Amount', + 'LBL_POTENTIAL_SALES_STAGE' => 'Opportunity Sales Stage', + 'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?', + 'NTC_REMOVE_CONFIRMATION' => 'Are you sure you want to remove this contact from this case?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Are you sure you want to remove this record as a direct report?', + 'NTC_REMOVE_OPP_CONFIRMATION' => 'Are you sure you want to remove this Contact from this Opportunity?', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the Contact.', + 'NTC_COPY_PRIMARY_ADDRESS' => 'Copy primary address to alternate address', + 'NTC_COPY_ALTERNATE_ADDRESS' => 'Copy alternate address to primary address', + 'LBL_COLON' => ':', + 'LBL_IMPORT_LEADS' => 'Import Leads', + 'LBL_LEADS_FILE_LIST' => 'Leads File List', + 'LBL_INSTRUCTIONS' => 'Instructions', + 'LBL_KINDLY_PROVIDE_AN_XLS_FILE' => 'Please provide a .xls file as input', + 'LBL_PROVIDE_ATLEAST_ONE_FILE' => 'Please provide at least one file as input', + 'LBL_NONE' => 'None', + 'LBL_ASSIGNED_TO' => 'Assigned To:', + 'LBL_SELECT_LEAD' => 'Select Lead', + 'LBL_GENERAL_INFORMATION' => 'General Information', + 'LBL_DO_NOT_CREATE_NEW_POTENTIAL' => 'Do not create a new Opportunity upon Conversion', + 'LBL_NEW_POTENTIAL' => 'New Opportunity', + 'LBL_POTENTIAL_TITLE' => 'Opportunities', + 'LBL_NEW_TASK' => 'New Task', + 'LBL_TASK_TITLE' => 'Tasks', + 'LBL_NEW_CALL' => 'New Call', + 'LBL_CALL_TITLE' => 'Calls', + 'LBL_NEW_MEETING' => 'New Meeting', + 'LBL_MEETING_TITLE' => 'Meetings', + 'LBL_NEW_EMAIL' => 'New Email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_NOTE' => 'New Document', + 'LBL_NOTE_TITLE' => 'Documents', + 'LBL_NEW_ATTACHMENT' => 'New Attachment', + 'LBL_ATTACHMENT_TITLE' => 'Attachments', + 'LBL_ALL' => 'All', + 'LBL_CONTACTED' => 'Contacted', + 'LBL_LOST' => 'Lost', + 'LBL_HOT' => 'Hot', + 'LBL_COLD' => 'Cold', + 'LBL_TOOL_FORM_TITLE' => 'Lead Tools', + 'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE' => 'Select template to Mail Merge:', + 'Salutation' => 'Salutation', + 'First Name' => 'First Name', + 'Phone' => 'Phone', + 'Last Name' => 'Last Name', + 'Mobile' => 'Mobile', + 'Company' => 'Company', + 'Fax' => 'Fax', + 'Email' => 'Email', + 'Lead Source' => 'Lead Source', + 'Website' => 'Website', + 'Annual Revenue' => 'Annual Revenue', + 'Lead Status' => 'Lead Status', + 'Industry' => 'Industry', + 'Rating' => 'Rating', + 'No Of Employees' => 'No of Employees', + 'Assigned To' => 'Assigned To', + 'Yahoo Id' => 'Yahoo ID', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'Street' => 'Street', + 'Postal Code' => 'Postcode', + 'City' => 'City', + 'Country' => 'Country', + 'State' => 'County', + 'Description' => 'Description', + 'Po Box' => 'PO Box', + 'Campaign Source' => 'Campaign Source', + 'Name' => 'Name', + 'LBL_NEW_LEADS' => 'My New Leads', + '--None--' => '--None--', + 'Mr.' => 'Mr.', + 'Ms.' => 'Ms.', + 'Mrs.' => 'Mrs.', + 'Dr.' => 'Dr.', + 'Prof.' => 'Prof.', + 'Acquired' => 'Acquired', + 'Active' => 'Active', + 'Market Failed' => 'Market Failed', + 'Project Cancelled' => 'Project Cancelled', + 'Shutdown' => 'Shutdown', + 'Apparel' => 'Apparel', + 'Banking' => 'Banking', + 'Biotechnology' => 'Biotechnology', + 'Chemicals' => 'Chemicals', + 'Communications' => 'Communications', + 'Construction' => 'Construction', + 'Consulting' => 'Consulting', + 'Education' => 'Education', + 'Electronics' => 'Electronics', + 'Energy' => 'Energy', + 'Engineering' => 'Engineering', + 'Entertainment' => 'Entertainment', + 'Environmental' => 'Environmental', + 'Finance' => 'Finance', + 'Food & Beverage' => 'Food & Beverage', + 'Government' => 'Government', + 'Healthcare' => 'Healthcare', + 'Hospitality' => 'Hospitality', + 'Insurance' => 'Insurance', + 'Machinery' => 'Machinery', + 'Manufacturing' => 'Manufacturing', + 'Media' => 'Media', + 'Not For Profit' => 'Not for Profit', + 'Recreation' => 'Recreation', + 'Retail' => 'Retail', + 'Shipping' => 'Shipping', + 'Technology' => 'Technology', + 'Telecommunications' => 'Telecommunications', + 'Transportation' => 'Transportation', + 'Utilities' => 'Utilities', + 'Other' => 'Other', + 'Cold Call' => 'Cold Call', + 'Existing Customer' => 'Existing Customer', + 'Self Generated' => 'Self Generated', + 'Employee' => 'Employee', + 'Partner' => 'Partner', + 'Public Relations' => 'Public Relations', + 'Direct Mail' => 'Direct Mail', + 'Conference' => 'Conference', + 'Trade Show' => 'Trade Show', + 'Web Site' => 'Web Site', + 'Word of mouth' => 'Word of mouth', + 'Attempted to Contact' => 'Attempted to contact', + 'Cold' => 'Cold', + 'Contact in Future' => 'Contact in future', + 'Contacted' => 'Contacted', + 'Hot' => 'Hot', + 'Junk Lead' => 'Junk Lead', + 'Lost Lead' => 'Lost Lead', + 'Not Contacted' => 'Not Contacted', + 'Pre Qualified' => 'Pre Qualified', + 'Qualified' => 'Qualified', + 'Warm' => 'Warm', + 'Designation' => 'Title', + 'Lead No' => 'Lead No.', + 'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Transfer related records to', + 'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'Following could be one of the possible reasons', + 'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'All the mandatory fields are not mapped', + 'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Some of the mandatory field value are empty', + 'LBL_LEADS_FIELD_MAPPING' => 'Leads Custom Field Mapping', + 'LBL_FIELD_SETTINGS' => 'Field Settings', + 'Leads ID' => 'Leads ID', +); +?> \ No newline at end of file diff --git a/modules/Leads/language/en_us.lang.php b/modules/Leads/language/en_us.lang.php new file mode 100644 index 0000000..d298fa9 --- /dev/null +++ b/modules/Leads/language/en_us.lang.php @@ -0,0 +1,252 @@ +'Leads', +'LBL_DIRECT_REPORTS_FORM_NAME'=>'Direct Reports', +'LBL_MODULE_TITLE'=>'Leads: Home', +'LBL_SEARCH_FORM_TITLE'=>'Lead Search', +'LBL_LIST_FORM_TITLE'=>'Lead List', +'LBL_NEW_FORM_TITLE'=>'New Lead', +'LBL_LEAD_OPP_FORM_TITLE'=>'Contact-Opportunity:', +'LBL_LEAD'=>'Lead:', +'LBL_ADDRESS_INFORMATION'=>'Address Information', +'LBL_CUSTOM_INFORMATION'=>'Custom Information', + +'LBL_LIST_NAME'=>'Name', +'LBL_LIST_LAST_NAME'=>'Last Name', +'LBL_LIST_COMPANY'=>'Company', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_LEAD_NAME'=>'Lead Name', +'LBL_LIST_EMAIL'=>'Email', +'LBL_LIST_PHONE'=>'Phone', +'LBL_LIST_LEAD_ROLE'=>'Role', + +'LBL_NAME'=>'Name:', +'LBL_LEAD_NAME'=>'Lead Name:', +'LBL_LEAD_INFORMATION'=>'Lead Information', +'LBL_FIRST_NAME'=>'First Name:', +'LBL_PHONE'=>'Phone:', +'LBL_COMPANY'=>'Company:', +'LBL_DESIGNATION'=>'Designation:', +'LBL_PHONE'=>'Phone:', +'LBL_LAST_NAME'=>'Last Name:', +'LBL_MOBILE'=>'Mobile:', +'LBL_EMAIL'=>'Email:', +'LBL_LEAD_SOURCE'=>'Lead Source:', +'LBL_LEAD_STATUS'=>'Lead Status:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_INDUSTRY'=>'Industry:', +'LBL_ANNUAL_REVENUE'=>'Annual Revenue:', +'LBL_RATING'=>'Rating:', +'LBL_LICENSE_KEY'=>'License Key:', +'LBL_NO_OF_EMPLOYEES'=>'No. of Employees:', +'LBL_YAHOO_ID'=>'Yahoo! ID:', + +'LBL_ADDRESS_STREET'=>'Street:', +'LBL_ADDRESS_POSTAL_CODE'=>'Postal Code:', +'LBL_ADDRESS_CITY'=>'City:', +'LBL_ADDRESS_COUNTRY'=>'Country:', +'LBL_ADDRESS_STATE'=>'State:', +'LBL_ADDRESS'=>'Address:', +'LBL_DESCRIPTION_INFORMATION'=>'Description Information', +'LBL_DESCRIPTION'=>'Description:', + +'LBL_CONVERT_LEAD'=>'Convert Lead:', +'LBL_CONVERT_LEAD_INFORMATION'=>'Convert Lead Information', +'LBL_ACCOUNT_NAME'=>'Organization Name', +'LBL_POTENTIAL_NAME'=>'Opportunity Name', +'LBL_POTENTIAL_CLOSE_DATE'=>'Opportunity Close Date', +'LBL_POTENTIAL_AMOUNT'=>'Opportunity Amount', +'LBL_POTENTIAL_SALES_STAGE'=>'Opportunity Sales Stage', + + +'NTC_DELETE_CONFIRMATION'=>'Are you sure you want to delete this record?', +'NTC_REMOVE_CONFIRMATION'=>'Are you sure you want to remove this contact from this case?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Are you sure you want to remove this record as a direct vtiger_report?', +'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?', +'ERR_DELETE_RECORD'=>"en_us A record number must be specified to delete the contact.", +'NTC_COPY_PRIMARY_ADDRESS'=>'Copy primary address to alternate address', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copy alternate address to primary address', + +// Added vtiger_fields in fetchfile.php, import.php -- crm4-Beta +'LBL_COLON'=>' : ', +'LBL_IMPORT_LEADS'=>'Import Leads', +'LBL_LEADS_FILE_LIST'=>'Leads File List', +'LBL_INSTRUCTIONS'=>'Instructions', +'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'Kindly provide an .xls file alone as input', +'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'Please provide at least one file as input', + +'LBL_NONE'=>'None', +'LBL_ASSIGNED_TO'=>'Assigned To:', +'LBL_SELECT_LEAD'=>'Select Lead', +'LBL_GENERAL_INFORMATION'=>'General Information', +'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'Do not create a New Opportunity upon Conversion', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'New Opportunity', +'LBL_POTENTIAL_TITLE'=>'Opportunities', + +'LBL_NEW_TASK'=>'New Task', +'LBL_TASK_TITLE'=>'Tasks', +'LBL_NEW_CALL'=>'New Call', +'LBL_CALL_TITLE'=>'Calls', +'LBL_NEW_MEETING'=>'New Meeting', +'LBL_MEETING_TITLE'=>'Meetings', +'LBL_NEW_EMAIL'=>'New Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'New Document', +'LBL_NOTE_TITLE'=>'Documents', +'LBL_NEW_ATTACHMENT'=>'New Attachment', +'LBL_ATTACHMENT_TITLE'=>'Attachments', + + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'All', +'LBL_CONTACTED'=>'Contacted', +'LBL_LOST'=>'Lost', +'LBL_HOT'=>'Hot', +'LBL_COLD'=>'Cold', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Lead Tools', + +'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'Select template to Mail Merge:', + +//Added for 4GA +'Salutation'=>'Salutation', +'First Name'=>'First Name', +'Phone'=>'Phone', +'Last Name'=>'Last Name', +'Mobile'=>'Mobile', +'Company'=>'Company', +'Fax'=>'Fax', +'Email'=>'Email', +'Lead Source'=>'Lead Source', +'Website'=>'Website', +'Annual Revenue'=>'Annual Revenue', +'Lead Status'=>'Lead Status', +'Industry'=>'Industry', +'Rating'=>'Rating', +'No Of Employees'=>'No Of Employees', +'Assigned To'=>'Assigned To', +'Yahoo Id'=>'Yahoo Id', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', +'Street'=>'Street', +'Postal Code'=>'Postal Code', +'City'=>'City', +'Country'=>'Country', +'State'=>'State', +'Description'=>'Description', +'Po Box'=>'PO Box', +'Campaign Source'=>'Campaign Source', +//Added for CustomView 4.2 Release +'Name'=>'Name', +'LBL_NEW_LEADS'=>'My New Leads', + +//Added for Existing Picklist Entries + +'--None--'=>'--None--', +'Mr.'=>'Mr.', +'Ms.'=>'Ms.', +'Mrs.'=>'Mrs.', +'Dr.'=>'Dr.', +'Prof.'=>'Prof.', + +'Acquired'=>'Acquired', +'Active'=>'Active', +'Market Failed'=>'Market Failed', +'Project Cancelled'=>'Project Cancelled', +'Shutdown'=>'Shutdown', + +'Apparel'=>'Apparel', +'Banking'=>'Banking', +'Biotechnology'=>'Biotechnology', +'Chemicals'=>'Chemicals', +'Communications'=>'Communications', +'Construction'=>'Construction', +'Consulting'=>'Consulting', +'Education'=>'Education', +'Electronics'=>'Electronics', +'Energy'=>'Energy', +'Engineering'=>'Engineering', +'Entertainment'=>'Entertainment', +'Environmental'=>'Environmental', +'Finance'=>'Finance', +'Food & Beverage'=>'Food & Beverage', +'Government'=>'Government', +'Healthcare'=>'Healthcare', +'Hospitality'=>'Hospitality', +'Insurance'=>'Insurance', +'Machinery'=>'Machinery', +'Manufacturing'=>'Manufacturing', +'Media'=>'Media', +'Not For Profit'=>'Not For Profit', +'Recreation'=>'Recreation', +'Retail'=>'Retail', +'Shipping'=>'Shipping', +'Technology'=>'Technology', +'Telecommunications'=>'Telecommunications', +'Transportation'=>'Transportation', +'Utilities'=>'Utilities', +'Other'=>'Other', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Existing Customer', +'Self Generated'=>'Self Generated', +'Employee'=>'Employee', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct Mail', +'Conference'=>'Conference', +'Trade Show'=>'Trade Show', +'Web Site'=>'Web Site', +'Word of mouth'=>'Word of mouth', + +'Attempted to Contact'=>'Attempted to Contact', +'Cold'=>'Cold', +'Contact in Future'=>'Contact in Future', +'Contacted'=>'Contacted', +'Hot'=>'Hot', +'Junk Lead'=>'Junk Lead', +'Lost Lead'=>'Lost Lead', +'Not Contacted'=>'Not Contacted', +'Pre Qualified'=>'Pre Qualified', +'Qualified'=>'Qualified', +'Warm'=>'Warm', + +// Added/Updated for vtiger CRM 5.0.4 + +'Designation'=>'Title', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Lead No'=>'Lead No', +// END + +'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Transfer related records to', + +'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'Following could be one of the possible reasons', +'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'All the mandatory fields are not mapped', +'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Some of the mandatory field value are empty', +'LBL_LEADS_FIELD_MAPPING' => 'Leads Custom Field Mapping', +'LBL_FIELD_SETTINGS' => 'Field Settings', +'Leads ID' => 'Leads ID', +); + +?> diff --git a/modules/Leads/language/es_es.lang.php b/modules/Leads/language/es_es.lang.php new file mode 100644 index 0000000..2c3a3fd --- /dev/null +++ b/modules/Leads/language/es_es.lang.php @@ -0,0 +1,262 @@ +'Pre-Contactos', +'LBL_DIRECT_REPORTS_FORM_NAME'=>'Informes Directos', +'LBL_MODULE_TITLE'=>'Pre-Contactos: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Pre-Contacto', +'LBL_LIST_FORM_TITLE'=>'Lista de Pre-Contactos', +'LBL_NEW_FORM_TITLE'=>'Nuevo Pre-Contactos', +'LBL_LEAD_OPP_FORM_TITLE'=>'Contacto-Oportunidad:', +'LBL_LEAD'=>'Pre-Contacto:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_CUSTOM_INFORMATION'=>'Información Específica', + +'LBL_LIST_NAME'=>'Nombre', +'LBL_LIST_LAST_NAME'=>'Apellido', +'LBL_LIST_COMPANY'=>'Cuenta', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_LEAD_NAME'=>'Pre-Contactos ', +'LBL_LIST_EMAIL'=>'Email', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_LEAD_ROLE'=>'Rol', + +'LBL_NAME'=>'Nombre:', +'LBL_LEAD_NAME'=>' Pre-Contacto:', +'LBL_LEAD_INFORMATION'=>'Infomación del Pre-Contacto', +'LBL_FIRST_NAME'=>'Nombre:', +'LBL_PHONE'=>'Teléfono:', +'LBL_COMPANY'=>'Cuenta:', +'LBL_DESIGNATION'=>'Designación:', +'LBL_PHONE'=>'Teléfono:', +'LBL_LAST_NAME'=>'Apellido:', +'LBL_MOBILE'=>'Tel. Móvil:', +'LBL_EMAIL'=>'Email:', +'LBL_LEAD_SOURCE'=>'Origen:', +'LBL_LEAD_STATUS'=>'Estado:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_ANNUAL_REVENUE'=>'Facturación Anual:', +'LBL_RATING'=>'Valoración:', +'LBL_LICENSE_KEY'=>'Clave de la Licencia:', +'LBL_NO_OF_EMPLOYEES'=>'Numero de Empleados:', +'LBL_YAHOO_ID'=>'Mensajería instantanea:', + +'LBL_ADDRESS_STREET'=>'Dirección:', +'LBL_ADDRESS_POSTAL_CODE'=>'Código Postal:', +'LBL_ADDRESS_CITY'=>'Población:', +'LBL_ADDRESS_COUNTRY'=>'País:', +'LBL_ADDRESS_STATE'=>'Provincia:', +'LBL_ADDRESS'=>'Dirección:', +'LBL_DESCRIPTION_INFORMATION'=>'Información Adicional', +'LBL_DESCRIPTION'=>'Descripción:', + +'LBL_CONVERT_LEAD'=>'Convertir Pre-Contacto:', +'LBL_CONVERT_LEAD_INFORMATION'=>'Convertir Información del Pre-Contacto', +'LBL_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_POTENTIAL_NAME'=>'Oportunidad', +'LBL_POTENTIAL_CLOSE_DATE'=>'Fecha de cierre de la Oportunidad', +'LBL_POTENTIAL_AMOUNT'=>'Importe de la Oportunidad', +'LBL_POTENTIAL_SALES_STAGE'=>'Estado de la Oportunidad', + + +'NTC_DELETE_CONFIRMATION'=>'¿Está seguro que desea eliminar este expediente?', +'NTC_REMOVE_CONFIRMATION'=>'¿Está seguro que desea eliminar el contacto de este Pre-contacto?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'¿Está usted seguro usted desea quitar este expediente como un informe directo?', +'NTC_REMOVE_OPP_CONFIRMATION'=>'¿Está seguro usted desea eliminar este contacto de esta oportunidad?', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para poder eliminar el contacto.', +'NTC_COPY_PRIMARY_ADDRESS'=>'Copiar principal a alternativa', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copiar alternativa a principal', + +// Added vtiger_fields in fetchfile.php, import.php -- crm4-Beta +'LBL_COLON'=>' : ', +'LBL_IMPORT_LEADS'=>'Importar Pre-Contacto', +'LBL_LEADS_FILE_LIST'=>'Lista de archivos Pre-Contacto', +'LBL_INSTRUCTIONS'=>'Instruciones', +'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'Indique un archivo .xls como entrada', +'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'Por favor, indique al menos un archivo como entrada', + +'LBL_NONE'=>'Ninguno', +'LBL_ASSIGNED_TO'=>'Asignado a:', +'LBL_SELECT_LEAD'=>'Seleccionar Pre-Contactos', +'LBL_GENERAL_INFORMATION'=>'Información General', +'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'No crear una nueva oportunidad tras la conversión', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nueva Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Nueva Llamada', +'LBL_CALL_TITLE'=>'Llamada', +'LBL_NEW_MEETING'=>'Nueva Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'Nuevo Documento', +'LBL_NOTE_TITLE'=>'Documentos', +'LBL_NEW_ATTACHMENT'=>'Nuevo Adjunto', +'LBL_ATTACHMENT_TITLE'=>'Adjuntos', + + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todo', +'LBL_CONTACTED'=>'Contactado', +'LBL_LOST'=>'Perdido', +'LBL_HOT'=>'Caliente', +'LBL_COLD'=>'Frio', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Pre-Contacto', + +'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'Seleccione una plantilla para enviar el Mailing:', + +//Added for 4GA +'Salutation'=>'Saludo', +'First Name'=>'Nombre', +'Phone'=>'Teléfono', +'Last Name'=>'Apellidos', +'Mobile'=>'Tel .Móvil', +'Company'=>'Empresa', +'Fax'=>'Fax', +'Email'=>'Email', +'Lead Source'=>'Origen del Pre-Contacto', +'Website'=>'Página Web', +'Annual Revenue'=>'Facturación Anual', +'Lead Status'=>'Estado del Pre-Contacto', +'Industry'=>'Actividad', +'Rating'=>'Valoración', +'No Of Employees'=>'Número de Empleados', +'Assigned To'=>'Asignado a', +'Yahoo Id'=>'Mensajería instantanea', +'Created Time'=>'Fecha de Creación', +'Modified Time'=>'Última Modificación', +'Street'=>'Dirección', +'Postal Code'=>'Código Postal', +'City'=>'Población', +'Country'=>'País', +'State'=>'Provincia', +'Description'=>'Descripción', +'Po Box'=>'Apdo. Correos', +'Campaign Source'=>'Campaña Origen', +//Added for CustomView 4.2 Release +'Name'=>'Nombre', +'LBL_NEW_LEADS'=>'Mis Pre-Contactos', + +//Added for Existing Picklist Entries + +'--None--'=>'-----', +'Mr.'=>'Sr.', +'Ms.'=>'Sra.', +'Mrs.'=>'Srta.', +'Dr.'=>'Dr.', +'Prof.'=>'Prof.', + +'Acquired'=>'Adquirido', +'Active'=>'Activo', +'Market Failed'=>'Mercado Inmaduro', +'Project Cancelled'=>'Cancelado', +'Shutdown'=>'Suspendido', + +'Apparel'=>'Ropa/Lenceria', +'Banking'=>'Banca', +'Biotechnology'=>'Biotecnología', +'Chemicals'=>'Químicas', +'Communications'=>'Comunicaciones', +'Construction'=>'Construcción', +'Consulting'=>'Consultoría', +'Education'=>'Educación', +'Electronics'=>'Electronica', +'Energy'=>'Energía', +'Engineering'=>'Ingeniería', +'Entertainment'=>'Entretenimiento', +'Environmental'=>'Medio Ambiente', +'Finance'=>'Finanzas', +'Food & Beverage'=>'Restauración', +'Government'=>'Gobierno', +'Healthcare'=>'Salud', +'Hospitality'=>'Hospital', +'Insurance'=>'Seguros', +'Machinery'=>'Maquinaria', +'Manufacturing'=>'Fabricación', +'Media'=>'Medios', +'Not For Profit'=>'ONG', +'Recreation'=>'Ocio', +'Retail'=>'Venta al por menor', +'Shipping'=>'Logística', +'Technology'=>'Tecnología', +'Telecommunications'=>'Telecomunicaciones', +'Transportation'=>'Transportes', +'Utilities'=>'Utilidades', +'Other'=>'Otros', + +'Cold Call'=>'Llamada', +'Existing Customer'=>'Cliente', +'Self Generated'=>'Autogenerada', +'Employee'=>'Trabajador', +'Partner'=>'Socio', +'Public Relations'=>'Relaciones Públicas', +'Direct Mail'=>'Mailing', +'Conference'=>'Conferencia', +'Trade Show'=>'Feria', +'Web Site'=>'Web Site', +'Word of mouth'=>'Boca a Boca', + +'Attempted to Contact'=>'Intentado Contactar', +'Cold'=>'Frio', +'Contact in Future'=>'Contactar más adelante', +'Contacted'=>'Contactado', +'Hot'=>'Caliente', +'Junk Lead'=>'Pre-Contacto Basura', +'Lost Lead'=>'Pre-Contacto Fallido', +'Not Contacted'=>'No Contactado', +'Pre Qualified'=>'Pre Calificado', +'Qualified'=>'Calificado', +'Warm'=>'Tibio', + +// Added/Updated for vtiger CRM 5.0.4 + +'Designation'=>'Designación', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Lead No'=>'Núm. Pre-Contacto', +// END + +'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Transferir elementos relacionados a', + +'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'A continuación se detallan algunas de las posibles causas', +'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'No se han vinculado todos los campos obligatorios', +'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Algún campo obligatorio está vacío', +'LBL_LEADS_FIELD_MAPPING' => 'Vinculación de Campos Personalizados', + +'LBL_FIELD_SETTINGS' => 'Configuración Campos', +'Leads ID' => 'Id PreContacto', + +); + +?> diff --git a/modules/Leads/language/es_mx.lang.php b/modules/Leads/language/es_mx.lang.php new file mode 100644 index 0000000..8c6069b --- /dev/null +++ b/modules/Leads/language/es_mx.lang.php @@ -0,0 +1,264 @@ +'Prospectos', +'LBL_DIRECT_REPORTS_FORM_NAME'=>'Informes Directos', +'LBL_MODULE_TITLE'=>'Prospectos: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Prospecto', +'LBL_LIST_FORM_TITLE'=>'Lista de Prospectos', +'LBL_NEW_FORM_TITLE'=>'Nuevo Prospecto', +'LBL_LEAD_OPP_FORM_TITLE'=>'Contacto-Oportunidad:', +'LBL_LEAD'=>'Prospecto:', +'LBL_ADDRESS_INFORMATION'=>'Información de la Dirección', +'LBL_CUSTOM_INFORMATION'=>'Información Específica', + +'LBL_LIST_NAME'=>'Nombre', +'LBL_LIST_LAST_NAME'=>'Apellido', +'LBL_LIST_COMPANY'=>'Cuenta', +'LBL_LIST_WEBSITE'=>'Página Web', +'LBL_LIST_LEAD_NAME'=>'Prospectos ', +'LBL_LIST_EMAIL'=>'Email', +'LBL_LIST_PHONE'=>'Teléfono', +'LBL_LIST_LEAD_ROLE'=>'Rol', + +'LBL_NAME'=>'Nombre:', +'LBL_LEAD_NAME'=>' Prospecto:', +'LBL_LEAD_INFORMATION'=>'Infomación del Prospecto', +'LBL_FIRST_NAME'=>'Nombre:', +'LBL_PHONE'=>'Teléfono:', +'LBL_COMPANY'=>'Cuenta:', +'LBL_DESIGNATION'=>'Designación:', +'LBL_PHONE'=>'Teléfono:', +'LBL_LAST_NAME'=>'Apellido:', +'LBL_MOBILE'=>'Tel. Móvil:', +'LBL_EMAIL'=>'Email:', +'LBL_LEAD_SOURCE'=>'Origen:', +'LBL_LEAD_STATUS'=>'Estado:', +'LBL_WEBSITE'=>'Página Web:', +'LBL_FAX'=>'Fax:', +'LBL_INDUSTRY'=>'Actividad:', +'LBL_ANNUAL_REVENUE'=>'Facturación Anual:', +'LBL_RATING'=>'Valoración:', +'LBL_LICENSE_KEY'=>'Clave de la Licencia:', +'LBL_NO_OF_EMPLOYEES'=>'Numero de Empleados:', +'LBL_YAHOO_ID'=>'Mensajería instantanea:', + +'LBL_ADDRESS_STREET'=>'Dirección:', +'LBL_ADDRESS_POSTAL_CODE'=>'Código Postal:', +'LBL_ADDRESS_CITY'=>'Deleg./Mpio.:', +'LBL_ADDRESS_COUNTRY'=>'País:', +'LBL_ADDRESS_STATE'=>'Estado:', +'LBL_ADDRESS'=>'Dirección:', +'LBL_DESCRIPTION_INFORMATION'=>'Información Adicional', +'LBL_DESCRIPTION'=>'Descripción:', + +'LBL_CONVERT_LEAD'=>'Convertir Prospecto:', +'LBL_CONVERT_LEAD_INFORMATION'=>'Convertir Información del Prospecto', +'LBL_ACCOUNT_NAME'=>'Nombre de la Cuenta', +'LBL_POTENTIAL_NAME'=>'Oportunidad', +'LBL_POTENTIAL_CLOSE_DATE'=>'Fecha de cierre de la Oportunidad', +'LBL_POTENTIAL_AMOUNT'=>'Importe de la Oportunidad', +'LBL_POTENTIAL_SALES_STAGE'=>'Estado de la Oportunidad', + + +'NTC_DELETE_CONFIRMATION'=>'¿Está seguro que desea eliminar este registro?', +'NTC_REMOVE_CONFIRMATION'=>'¿Está seguro que desea eliminar el contacto de este Prospecto?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'¿Está usted seguro usted desea quitar este registro como un informe directo?', +'NTC_REMOVE_OPP_CONFIRMATION'=>'¿Está seguro usted desea eliminar este contacto de esta oportunidad?', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para poder eliminar el contacto.', +'NTC_COPY_PRIMARY_ADDRESS'=>'Copiar principal a alternativa', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copiar alternativa a principal', + +// Added vtiger_fields in fetchfile.php, import.php -- crm4-Beta +'LBL_COLON'=>' : ', +'LBL_IMPORT_LEADS'=>'Importar Prospecto', +'LBL_LEADS_FILE_LIST'=>'Lista de archivos Prospecto', +'LBL_INSTRUCTIONS'=>'Instruciones', +'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'Indique un archivo .xls como entrada', +'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'Por favor, indique al menos un archivo como entrada', + +'LBL_NONE'=>'Ninguno', +'LBL_ASSIGNED_TO'=>'Asignado a:', +'LBL_SELECT_LEAD'=>'Seleccionar Prospectos', +'LBL_GENERAL_INFORMATION'=>'Información General', +'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'No crear una nueva oportunidad tras la conversión', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nueva Oportunidad', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nueva Tarea', +'LBL_TASK_TITLE'=>'Tareas', +'LBL_NEW_CALL'=>'Nueva Llamada', +'LBL_CALL_TITLE'=>'Llamada', +'LBL_NEW_MEETING'=>'Nueva Reunión', +'LBL_MEETING_TITLE'=>'Reuniones', +'LBL_NEW_EMAIL'=>'Nuevo Email', +'LBL_EMAIL_TITLE'=>'Emails', +'LBL_NEW_NOTE'=>'Nuevo Documento', +'LBL_NOTE_TITLE'=>'Documentos', +'LBL_NEW_ATTACHMENT'=>'Nuevo Adjunto', +'LBL_ATTACHMENT_TITLE'=>'Adjuntos', + + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todo', +'LBL_CONTACTED'=>'Contactado', +'LBL_LOST'=>'Perdido', +'LBL_HOT'=>'Caliente', +'LBL_COLD'=>'Frio', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Herramientas de Prospecto', + +'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'Seleccione una plantilla para enviar el Mailing:', + +//Added for 4GA +'Salutation'=>'Saludo', +'First Name'=>'Nombre', +'Phone'=>'Teléfono', +'Last Name'=>'Apellidos', +'Mobile'=>'Tel .Móvil', +'Company'=>'Empresa', +'Fax'=>'Fax', +'Email'=>'Email', +'Lead Source'=>'Origen del Prospecto', +'Website'=>'Página Web', +'Annual Revenue'=>'Facturación Anual', +'Lead Status'=>'Estado del Prospecto', +'Industry'=>'Actividad', +'Rating'=>'Valoración', +'No Of Employees'=>'Número de Empleados', +'Assigned To'=>'Asignado a', +'Yahoo Id'=>'Mensajería instantanea', +'Created Time'=>'Fecha de Creación', +'Modified Time'=>'Última Modificación', +'Street'=>'Dirección', +'Postal Code'=>'Código Postal', +'City'=>'Deleg./Mpio.', +'Country'=>'País', +'State'=>'Estado', +'Description'=>'Descripción', +'Po Box'=>'Colonia', +'Campaign Source'=>'Campaña Origen', +//Added for CustomView 4.2 Release +'Name'=>'Nombre', +'LBL_NEW_LEADS'=>'Mis Prospectos', + +//Added for Existing Picklist Entries + +'--None--'=>'-----', +'Mr.'=>'Sr.', +'Ms.'=>'Sra.', +'Mrs.'=>'Srta.', +'Dr.'=>'Dr.', +'Prof.'=>'Prof.', + +'Acquired'=>'Adquirido', +'Active'=>'Activo', +'Market Failed'=>'Mercado Inmaduro', +'Project Cancelled'=>'Cancelado', +'Shutdown'=>'Detenido', + +'Apparel'=>'Ropa/Lenceria', +'Banking'=>'Banca', +'Biotechnology'=>'Biotecnología', +'Chemicals'=>'Químicas', +'Communications'=>'Comunicaciones', +'Construction'=>'Construcción', +'Consulting'=>'Consultoría', +'Education'=>'Educación', +'Electronics'=>'Electronica', +'Energy'=>'Energía', +'Engineering'=>'Ingeniería', +'Entertainment'=>'Entretenimiento', +'Environmental'=>'Medio Ambiente', +'Finance'=>'Finanzas', +'Food & Beverage'=>'Restauración', +'Government'=>'Gobierno', +'Healthcare'=>'Salud', +'Hospitality'=>'Hospital', +'Insurance'=>'Seguros', +'Machinery'=>'Maquinaria', +'Manufacturing'=>'Fabricación', +'Media'=>'Medios', +'Not For Profit'=>'ONG', +'Recreation'=>'Ocio', +'Retail'=>'Venta al por menor', +'Shipping'=>'Logística', +'Technology'=>'Tecnología', +'Telecommunications'=>'Telecomunicaciones', +'Transportation'=>'Transportes', +'Utilities'=>'Utilidades', +'Other'=>'Otros', + +'Cold Call'=>'Llamada', +'Existing Customer'=>'Cliente', +'Self Generated'=>'Autogenerada', +'Employee'=>'Trabajador', +'Partner'=>'Socio', +'Public Relations'=>'Relaciones Públicas', +'Direct Mail'=>'Mailing', +'Conference'=>'Conferencia', +'Trade Show'=>'Feria', +'Web Site'=>'Web Site', +'Word of mouth'=>'Boca a Boca', + +'Attempted to Contact'=>'Intentado Contactar', +'Cold'=>'Frio', +'Contact in Future'=>'Contactar más adelante', +'Contacted'=>'Contactado', +'Hot'=>'Caliente', +'Junk Lead'=>'Prospecto Basura', +'Lost Lead'=>'Prospecto Fallido', +'Not Contacted'=>'No Contactado', +'Pre Qualified'=>'Pre Calificado', +'Qualified'=>'Calificado', +'Warm'=>'Tibio', + +// Added/Updated for vtiger CRM 5.0.4 + +'Designation'=>'Designación', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Lead No'=>'Núm. Prospecto', +// END + +'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Transferir elementos relacionados a', + +'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'A continuación se detallan algunas de las posibles causas', +'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'No se han vinculado todos los campos obligatorios', +'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Algún campo obligatorio está vacío', +'LBL_LEADS_FIELD_MAPPING' => 'Vinculación de Campos Personalizados', + +'LBL_FIELD_SETTINGS' => 'Configuración Campos', +'Leads ID' => 'Id Prospecto', + +); + +?> diff --git a/modules/Leads/language/fr_fr.lang.php b/modules/Leads/language/fr_fr.lang.php new file mode 100644 index 0000000..4eb320d --- /dev/null +++ b/modules/Leads/language/fr_fr.lang.php @@ -0,0 +1,218 @@ + 'Prospects', + 'LBL_DIRECT_REPORTS_FORM_NAME' => 'Supérieur hiérarchique', + 'LBL_MODULE_TITLE' => 'Prospects : accueil', + 'LBL_SEARCH_FORM_TITLE' => 'Recherche prospects', + 'LBL_LIST_FORM_TITLE' => 'Liste prospects', + 'LBL_NEW_FORM_TITLE' => 'Nouveau prospect', + 'LBL_LEAD_OPP_FORM_TITLE' => 'Contact-Affaire :', + 'LBL_LEAD' => 'Prospect :', + 'LBL_ADDRESS_INFORMATION' => 'Adresse', + 'LBL_CUSTOM_INFORMATION' => 'Informations personnalisées', + 'LBL_LIST_NAME' => 'Nom', + 'LBL_LIST_LAST_NAME' => 'Nom', + 'LBL_LIST_COMPANY' => 'Société', + 'LBL_LIST_WEBSITE' => 'Site Web', + 'LBL_LIST_LEAD_NAME' => 'Nom prospect', + 'LBL_LIST_EMAIL' => 'Email', + 'LBL_LIST_PHONE' => 'Téléphone', + 'LBL_LIST_LEAD_ROLE' => 'Rôle', + 'LBL_NAME' => 'Nom :', + 'LBL_LEAD_NAME' => 'Nom prospect :', + 'LBL_LEAD_INFORMATION' => 'Détail prospect', + 'LBL_FIRST_NAME' => 'Prénom :', + 'LBL_PHONE' => 'Téléphone :', + 'LBL_COMPANY' => 'Société :', + 'LBL_DESIGNATION' => 'Titre :', + 'LBL_LAST_NAME' => 'Nom :', + 'LBL_MOBILE' => 'Téléphone (mobile)', + 'LBL_EMAIL' => 'Email :', + 'LBL_LEAD_SOURCE' => 'Origine :', + 'LBL_LEAD_STATUS' => 'Statut :', + 'LBL_WEBSITE' => 'Site Web :', + 'LBL_FAX' => 'Fax :', + 'LBL_INDUSTRY' => 'Secteur :', + 'LBL_ANNUAL_REVENUE' => 'C.A. annuel :', + 'LBL_RATING' => 'Etat :', + 'LBL_LICENSE_KEY' => 'Licence :', + 'LBL_NO_OF_EMPLOYEES' => 'Nb. employés :', + 'LBL_YAHOO_ID' => 'Yahoo ID :', + 'LBL_ADDRESS_STREET' => 'Adresse :', + 'LBL_ADDRESS_POSTAL_CODE' => 'Code postal :', + 'LBL_ADDRESS_CITY' => 'Ville :', + 'LBL_ADDRESS_COUNTRY' => 'Pays :', + 'LBL_ADDRESS_STATE' => 'Département :', + 'LBL_ADDRESS' => 'Adresse :', + 'LBL_DESCRIPTION_INFORMATION' => 'Description', + 'LBL_DESCRIPTION' => 'Description :', + 'LBL_CONVERT_LEAD' => 'Convertir :', + 'LBL_CONVERT_LEAD_INFORMATION' => 'Détail conversion', + 'LBL_ACCOUNT_NAME' => 'Nom compte', + 'LBL_POTENTIAL_NAME' => 'Nom affaire', + 'LBL_POTENTIAL_CLOSE_DATE' => 'Echéance', + 'LBL_POTENTIAL_AMOUNT' => 'Montant', + 'LBL_POTENTIAL_SALES_STAGE' => 'Phase de vente', + 'NTC_DELETE_CONFIRMATION' => 'Etes-vous certain de vouloir supprimer cet enregistrement ?', + 'NTC_REMOVE_CONFIRMATION' => 'Etes-vous certain de vouloir supprimer ce contact ?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Etes-vous certain de vouloir retirer cet enregistrement du groupe ?', + 'NTC_REMOVE_OPP_CONFIRMATION' => 'Etes-vous certain de vouloir supprimer ce contact de cette affaire ?', + 'ERR_DELETE_RECORD' => 'Un numéro d\'enregistrement doit être spécifié pour supprimer ce contact.', + 'NTC_COPY_PRIMARY_ADDRESS' => 'Utiliser l\'adresse principale comme adresse alternative', + 'NTC_COPY_ALTERNATE_ADDRESS' => 'Utiliser l\'adresse alternative comme adresse principale', + 'LBL_COLON' => ' : ', + 'LBL_IMPORT_LEADS' => 'Importer', + 'LBL_LEADS_FILE_LIST' => 'Fichiers liste prospects', + 'LBL_INSTRUCTIONS' => 'Instructions', + 'LBL_KINDLY_PROVIDE_AN_XLS_FILE' => 'Fournir un fichier .xls seul pour la saisie', + 'LBL_PROVIDE_ATLEAST_ONE_FILE' => 'Fournir au moins un fichier svp', + 'LBL_NONE' => 'Aucun', + 'LBL_ASSIGNED_TO' => 'Assigné à', + 'LBL_SELECT_LEAD' => 'Sélectionner prospect', + 'LBL_GENERAL_INFORMATION' => 'Informations', + 'LBL_DO_NOT_CREATE_NEW_POTENTIAL' => 'Ne pas créer d\'affaire sur cette conversion', + 'LBL_NEW_POTENTIAL' => 'Ajouter affaire', + 'LBL_POTENTIAL_TITLE' => 'Affaires', + 'LBL_NEW_TASK' => 'Ajouter tâche', + 'LBL_TASK_TITLE' => 'Tâches', + 'LBL_NEW_CALL' => 'Ajouter appel', + 'LBL_CALL_TITLE' => 'Appels', + 'LBL_NEW_MEETING' => 'Ajouter rendez-vous', + 'LBL_MEETING_TITLE' => 'Rendez-vous', + 'LBL_NEW_EMAIL' => 'Ajouter email', + 'LBL_EMAIL_TITLE' => 'Emails', + 'LBL_NEW_NOTE' => 'Ajouter note', + 'LBL_NOTE_TITLE' => 'Notes', + 'LBL_NEW_ATTACHMENT' => 'Joindre fichier', + 'LBL_ATTACHMENT_TITLE' => 'Pièces jointes', + 'LBL_ALL' => 'Tous', + 'LBL_CONTACTED' => 'Contacté', + 'LBL_LOST' => 'Perdu', + 'LBL_HOT' => 'Chaud', + 'LBL_COLD' => 'Froid', + 'LBL_TOOL_FORM_TITLE' => 'Outils', + 'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE' => 'Sélectionnez un modèle de document pour publipostage :', + 'Salutation' => 'Civilité', + 'First Name' => 'Prénom', + 'Phone' => 'Téléphone', + 'Last Name' => 'Nom', + 'Mobile' => 'Téléphone (mobile)', + 'Company' => 'Société', + 'Fax' => 'Fax', + 'Email' => 'Email', + 'Lead Source' => 'Origine', + 'Website' => 'Site Web', + 'Annual Revenue' => 'C.A. annuel', + 'Lead Status' => 'Statut', + 'Industry' => 'Secteur', + 'Rating' => 'Note', + 'No Of Employees' => 'Effectif', + 'Assigned To' => 'Assigné à', + 'Yahoo Id' => 'Yahoo ID', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'Street' => 'Adresse', + 'Postal Code' => 'Code postal', + 'City' => 'Ville', + 'Country' => 'Pays', + 'State' => 'Département', + 'Description' => 'Description', + 'Po Box' => 'Boite postale', + 'Campaign Source' => 'Campagne', + 'Name' => 'Nom', + 'LBL_NEW_LEADS' => 'Mes nouveaux prospects', + '--None--' => '--Aucun--', + 'Mr.' => 'M', + 'Ms.' => 'Mme', + 'Mrs.' => 'Mlle', + 'Dr.' => 'Dr', + 'Prof.' => 'Prof', + 'Acquired' => 'Acquis', + 'Active' => 'Actif', + 'Market Failed' => 'Perdu', + 'Project Cancelled' => 'Projet abandonné', + 'Shutdown' => 'Arrêt', + 'Apparel' => 'Habillement', + 'Banking' => 'Banque', + 'Biotechnology' => 'Biotechnologie', + 'Chemicals' => 'Chimie', + 'Communications' => 'Communications', + 'Construction' => 'BTP', + 'Consulting' => 'Consulting', + 'Education' => 'Education', + 'Electronics' => 'Electronique', + 'Energy' => 'Energie', + 'Engineering' => 'Ingénierie', + 'Entertainment' => 'Divertissement', + 'Environmental' => 'Environnement', + 'Finance' => 'Finance', + 'Food & Beverage' => 'Agro-alimentaire', + 'Government' => 'Secteur public', + 'Healthcare' => 'Santé', + 'Hospitality' => 'Hopitaux', + 'Insurance' => 'Assurances', + 'Machinery' => 'Construction mécanique', + 'Manufacturing' => 'Fabrication', + 'Media' => 'Medias', + 'Not For Profit' => 'But non lucratif', + 'Recreation' => 'Récréatif', + 'Retail' => 'Détaillant', + 'Shipping' => 'Livreur', + 'Technology' => 'Technologie', + 'Telecommunications' => 'Télécommunications', + 'Transportation' => 'Transport', + 'Utilities' => 'Utilitaire', + 'Other' => 'Autre', + 'Cold Call' => 'Appel direct', + 'Existing Customer' => 'Client existant', + 'Self Generated' => 'Auto généré', + 'Employee' => 'Employée', + 'Partner' => 'Partenaire', + 'Public Relations' => 'Relation publique', + 'Direct Mail' => 'Email direct', + 'Conference' => 'Conférence', + 'Trade Show' => 'Salon', + 'Web Site' => 'Site Web', + 'Word of mouth' => 'Bouche à oreille', + 'Attempted to Contact' => 'Attente de contact', + 'Cold' => 'Froid', + 'Contact in Future' => 'A contacter', + 'Contacted' => 'Contacté', + 'Hot' => 'Chaud', + 'Junk Lead' => 'En sommeil', + 'Lost Lead' => 'Perdu', + 'Not Contacted' => 'Non contacté', + 'Pre Qualified' => 'Pré qualifié', + 'Qualified' => 'Qualifié', + 'Warm' => 'Brûlant', + 'Designation' => 'Titre', + 'LBL_DUPLICATE_DATA_IN' => 'Dupliquer ', + 'LBL_DELETE' => 'Supprimer', + 'LBL_MERGE_SELECT' => 'Fusionner la sélection', + 'LBL_MERGE' => 'Fusionner', + 'LBL_ACTION' => 'Action', + 'LBL_MERGE_DATA_IN' => 'Fusionner les enregistrements', + 'LBL_FIELDLISTS' => 'Liste des champs', + 'LBL_RECORD' => 'Enregistrement #', + 'Lead No' => 'Prospect N°', + 'Secondary Email' => 'Email alternatif', + + 'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Transférer les enregistrements relatifs à', + 'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'Voici les raisons possibles', + 'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'Tous les champs obligatoires ne sont pas mappés', + 'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Certains champs obligatoires sont vides', + 'LBL_LEADS_FIELD_MAPPING' => 'Mapping des champs du module prospects', + 'LBL_FIELD_SETTINGS' => 'Réglages des champs', + 'Leads ID' => 'Prospect ID', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Leads/language/hu_hu.lang.php b/modules/Leads/language/hu_hu.lang.php new file mode 100644 index 0000000..604e545 --- /dev/null +++ b/modules/Leads/language/hu_hu.lang.php @@ -0,0 +1,228 @@ + 'Jelöltek', + 'LBL_DIRECT_REPORTS_FORM_NAME' => 'Közvetlen Jelentések', + 'LBL_MODULE_TITLE' => 'Jelöltek: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Jelöltek Keresés', + 'LBL_LIST_FORM_TITLE' => 'Jelöltek Lista', + 'LBL_NEW_FORM_TITLE' => 'Új Jelölt', + 'LBL_LEAD_OPP_FORM_TITLE' => 'Kapcsolatfelvételi lehetőség:', + 'LBL_LEAD' => 'Jelöltek:', + 'LBL_ADDRESS_INFORMATION' => 'Cím adatok', + 'LBL_CUSTOM_INFORMATION' => 'Egyedi adatok', + 'LBL_LIST_NAME' => 'Név', + 'LBL_LIST_LAST_NAME' => 'Vezetéknév', + 'LBL_LIST_COMPANY' => 'Cég', + 'LBL_LIST_WEBSITE' => 'Weboldal', + 'LBL_LIST_LEAD_NAME' => 'Jelölt neve', + 'LBL_LIST_EMAIL' => 'Email', + 'LBL_LIST_PHONE' => 'Telefon', + 'LBL_LIST_LEAD_ROLE' => 'Munkakör', + 'LBL_NAME' => 'Név:', + 'LBL_LEAD_NAME' => 'Jelölt neve:', + 'LBL_LEAD_INFORMATION' => 'Jelölt adatai', + 'LBL_FIRST_NAME' => 'Keresztnév:', + 'LBL_PHONE' => 'Telefon:', + 'LBL_COMPANY' => 'Cégnév:', + 'LBL_DESIGNATION' => 'Rendeltetés:', + 'LBL_LAST_NAME' => 'Vezetéknév:', + 'LBL_MOBILE' => 'Mobil:', + 'LBL_EMAIL' => 'Email:', + 'LBL_LEAD_SOURCE' => 'Jelölt Forrás:', + 'LBL_LEAD_STATUS' => 'Jelölt állapota:', + 'LBL_WEBSITE' => 'Weboldal:', + 'LBL_FAX' => 'Fax:', + 'LBL_INDUSTRY' => 'Iparág:', + 'LBL_ANNUAL_REVENUE' => 'Éves forgalom:', + 'LBL_RATING' => 'Értékelés:', + 'LBL_LICENSE_KEY' => 'Licensz kulcs:', + 'LBL_NO_OF_EMPLOYEES' => 'Alkalmazottak száma:', + 'LBL_YAHOO_ID' => 'Yahoo! ID:', + 'LBL_ADDRESS_STREET' => 'Utca:', + 'LBL_ADDRESS_POSTAL_CODE' => 'Irányítószám:', + 'LBL_ADDRESS_CITY' => 'Város:', + 'LBL_ADDRESS_COUNTRY' => 'Ország:', + 'LBL_ADDRESS_STATE' => 'Állam/Megye:', + 'LBL_ADDRESS' => 'Cím:', + 'LBL_DESCRIPTION_INFORMATION' => 'Leírás', + 'LBL_DESCRIPTION' => 'Leírás:', + 'LBL_CONVERT_LEAD' => 'Jelöltet átalakít Kapcsolattá:', + 'LBL_CONVERT_LEAD_INFORMATION' => 'Átalakított Jelöltek adatai', + 'LBL_ACCOUNT_NAME' => 'Cég neve', + 'LBL_POTENTIAL_NAME' => 'Lehetőség neve', + 'LBL_POTENTIAL_CLOSE_DATE' => 'Lehetőség Lezárási Dátuma', + 'LBL_POTENTIAL_AMOUNT' => 'Lehetőség összege', + 'LBL_POTENTIAL_SALES_STAGE' => 'Lehetőség Értékesítési fázis', + 'NTC_DELETE_CONFIRMATION' => 'Biztos vagy abban, hogy törölni akarod ezt a rekordot?', + 'NTC_REMOVE_CONFIRMATION' => 'Biztos vagy abban, hogy el akarod távolítani ezt a Kapcsolatot ebből az esetből?', + 'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION' => 'Biztos vagy abban, hogy el akarod távolítani ezt a Jelentést, mint Közvetlen Jelentés?', + 'NTC_REMOVE_OPP_CONFIRMATION' => 'Biztos vagy abban, hogy el akarod távolítani ezt a Kapcsolatot ebből a Lehetőségből?', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a Kapcsolat törléséhez.', + 'NTC_COPY_PRIMARY_ADDRESS' => 'Az elsődleges cím másolása az alternatív címhez', + 'NTC_COPY_ALTERNATE_ADDRESS' => 'Az alternatív cím másolása az elsődleges címhez', + 'LBL_COLON' => ' : ', + 'LBL_IMPORT_LEADS' => 'Jelöltek Importálása', + 'LBL_LEADS_FILE_LIST' => 'Jelöltek Fájl Lista', + 'LBL_INSTRUCTIONS' => 'Útmutatás', + 'LBL_KINDLY_PROVIDE_AN_XLS_FILE' => 'Kérjük, hogy biztosíts egy .xls fájlt, mint egyedüli input', + 'LBL_PROVIDE_ATLEAST_ONE_FILE' => 'Kérjük, hogy biztosíts legalább egy fájlt, mint input', + 'LBL_NONE' => 'Nincs', + 'LBL_ASSIGNED_TO' => 'Felelős:', + 'LBL_SELECT_LEAD' => 'Jelölt Kiválasztása', + 'LBL_GENERAL_INFORMATION' => 'Általános adatok', + 'LBL_DO_NOT_CREATE_NEW_POTENTIAL' => 'Ne hozz létre egy új Lehetőséget az átalakításkor', + 'LBL_NEW_POTENTIAL' => 'Új Lehetőség', + 'LBL_POTENTIAL_TITLE' => 'Lehetőségek', + 'LBL_NEW_TASK' => 'Új Feladatok', + 'LBL_TASK_TITLE' => 'Feladatok', + 'LBL_NEW_CALL' => 'Új Hívás', + 'LBL_CALL_TITLE' => 'Hívások', + 'LBL_NEW_MEETING' => 'Új Megbeszélés', + 'LBL_MEETING_TITLE' => 'Megbeszélések', + 'LBL_NEW_EMAIL' => 'Új Email', + 'LBL_EMAIL_TITLE' => 'Emailek', + 'LBL_NEW_NOTE' => 'Új Dokumentum', + 'LBL_NOTE_TITLE' => 'Dokumentumok', + 'LBL_NEW_ATTACHMENT' => 'Új Melléklet', + 'LBL_ATTACHMENT_TITLE' => 'Mellékletek', + 'LBL_ALL' => 'Minden', + 'LBL_CONTACTED' => 'Kapcsolatba léptünk', + 'LBL_LOST' => 'Elvesztett', + 'LBL_HOT' => 'Forró', + 'LBL_COLD' => 'Hideg', + 'LBL_TOOL_FORM_TITLE' => 'Jelölt Eszközök', + 'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE' => 'Válassz egy sablont a csoportos email küldéshez:', + 'Salutation' => 'Megszólítás', + 'First Name' => 'Keresztnév', + 'Phone' => 'Telefon', + 'Last Name' => 'Vezetéknév', + 'Mobile' => 'Mobile', + 'Company' => 'Cég', + 'Fax' => 'Fax', + 'Email' => 'Email', + 'Lead Source' => 'Jelölt forrása', + 'Website' => 'Weboldal', + 'Annual Revenue' => 'Éves forgalom', + 'Lead Status' => 'Jelölt állapota', + 'Industry' => 'Iparág', + 'Rating' => 'Értékelés', + 'No Of Employees' => 'Alkalmazottak száma', + 'Assigned To' => 'Felelős', + 'Yahoo Id' => 'Yahoo azonosító', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'Street' => 'Utca', + 'Postal Code' => 'Irányítószám', + 'City' => 'Város', + 'Country' => 'Ország', + 'State' => 'Állam/megye', + 'Description' => 'Megjegyzés', + 'Po Box' => 'Postafiók', + 'Campaign Source' => 'Kampány Forrás', + 'Name' => 'Név', + 'LBL_NEW_LEADS' => 'Új Jelöltjeim', + '--None--' => '--', + 'Mr.' => 'Mr.', + 'Ms.' => 'Ms.', + 'Mrs.' => 'Mrs.', + 'Dr.' => 'Dr.', + 'Prof.' => 'Prof.', + 'Acquired' => 'Megszerzett', + 'Active' => 'Aktív', + 'Market Failed' => 'Rossz célpiac', + 'Project Cancelled' => 'Törölt projekt', + 'Shutdown' => 'Halott akta', + 'Apparel' => 'Ruházat - Felszerelés', + 'Banking' => 'Bank', + 'Biotechnology' => 'Biotechnológia', + 'Chemicals' => 'Vegyipar', + 'Communications' => 'Kommunikáció', + 'Construction' => 'Építőipar', + 'Consulting' => 'Tanácsadás', + 'Education' => 'Oktatás', + 'Electronics' => 'Elektronika', + 'Energy' => 'Energia szektor', + 'Engineering' => 'Mérnöki tevékenység', + 'Entertainment' => 'Szórakoztató ipar', + 'Environmental' => 'Környezetvédelem', + 'Finance' => 'Pénzügyek', + 'Food & Beverage' => 'Élelmiszer ipar', + 'Government' => 'Államigazgatás', + 'Healthcare' => 'Egészségügy', + 'Hospitality' => 'Vendéglátás', + 'Insurance' => 'Biztosítás', + 'Machinery' => 'Gépipar', + 'Manufacturing' => 'Gyártás', + 'Media' => 'Média', + 'Not For Profit' => 'Non-Profit', + 'Recreation' => 'Wellness', + 'Retail' => 'Kiskereskedelem', + 'Shipping' => 'Szállítás', + 'Technology' => 'Technológia', + 'Telecommunications' => 'Telekommunikáció', + 'Transportation' => 'Közlekedés', + 'Utilities' => 'Szolgáltatás', + 'Other' => 'Egyéb', + 'Cold Call' => 'Hideg Hívás', + 'Existing Customer' => 'Meglévő ügyfél', + 'Self Generated' => 'Saját magától jelentkezett', + 'Employee' => 'Alkalmazott', + 'Partner' => 'Partner', + 'Public Relations' => 'Public Relations', + 'Direct Mail' => 'Direct Mail', + 'Conference' => 'Konferencia', + 'Trade Show' => 'Árubemutató', + 'Web Site' => 'Weboldal', + 'Word of mouth' => 'Szóbeszéd', + 'Attempted to Contact' => 'Megkísérelt kapcsolatfelvétel', + 'Cold' => 'Hideg', + 'Contact in Future' => 'Jövőbeni kapcsolatfelvétel', + 'Contacted' => 'Kapcsolatba léptünk', + 'Hot' => 'Forró', + 'Junk Lead' => 'Alkalmatlan Jelölt', + 'Lost Lead' => 'Elvesztett Jelölt', + 'Not Contacted' => 'Nem lépett kapcsolatba', + 'Pre Qualified' => 'Előzetesen minősített', + 'Qualified' => 'Minősített', + 'Warm' => 'Meleg', + 'Designation' => 'Beosztás', + 'Lead No' => 'Jelölt No.', + 'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Transzfer miatt kapcsolódó rekordok ehhez: ', + 'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'A következő lehet az egyik lehetséges ok', + 'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'Minden kötelező mező nincs bent a leképezésben', + 'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Néhány a kötelező mezők közül üres', + 'LBL_LEADS_FIELD_MAPPING' => 'Jelöltek - Egyedi mezők leképezése', + 'LBL_FIELD_SETTINGS' => 'Mező beállítások', + 'Leads ID' => 'Jelöltek AZ', + 'Send SMS' => 'SMS küldés', + 'LBL_DUPLICATE_DATA_IN' => 'Duplikált adat ebben:', + 'LBL_DELETE' => 'Törlés', + 'LBL_MERGE_SELECT' => 'Válaszd ki az összefűzendő adatokat', + 'LBL_MERGE' => 'Összefűzés', + 'LBL_ACTION' => 'Műveletek', + 'LBL_MERGE_DATA_IN' => 'Adatok összefűzése ebben:', + 'LBL_FIELDLISTS' => 'Mezőlista', + 'LBL_RECORD' => 'Rekord' +); +?> \ No newline at end of file diff --git a/modules/Leads/language/nl_nl.lang.php b/modules/Leads/language/nl_nl.lang.php new file mode 100644 index 0000000..2321a04 --- /dev/null +++ b/modules/Leads/language/nl_nl.lang.php @@ -0,0 +1,271 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.6 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Leads/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Leads', +'LBL_DIRECT_REPORTS_FORM_NAME'=>'Medewerkers', +'LBL_MODULE_TITLE'=>'Leads: Home', +'LBL_SEARCH_FORM_TITLE'=>'Zoek Lead', +'LBL_LIST_FORM_TITLE'=>'Leadlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuwe Lead', +'LBL_LEAD_OPP_FORM_TITLE'=>'Contact:', +'LBL_LEAD'=>'Leads:', +'LBL_ADDRESS_INFORMATION'=>'Adresinformatie', +'LBL_CUSTOM_INFORMATION'=>'Klantinformatie', + +'LBL_LIST_NAME'=>'Naam', +'LBL_LIST_LAST_NAME'=>'Achternaam', +'LBL_LIST_COMPANY'=>'Bedrijf', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_LEAD_NAME'=>'Lead naam', +'LBL_LIST_EMAIL'=>'E-mail', +'LBL_LIST_PHONE'=>'Telefoon', +'LBL_LIST_LEAD_ROLE'=>'Rol', + +'LBL_NAME'=>'Naam:', +'LBL_LEAD_NAME'=>'Lead naam:', +'LBL_LEAD_INFORMATION'=>'Lead informatie', +'LBL_FIRST_NAME'=>'Voornaam:', +'LBL_PHONE'=>'Telefoon:', +'LBL_COMPANY'=>'Bedrijf:', +'LBL_DESIGNATION'=>'Functie:', +'LBL_PHONE'=>'Telefoon:', +'LBL_LAST_NAME'=>'Achternaam:', +'LBL_MOBILE'=>'Telefoon Mobiel:', +'LBL_EMAIL'=>'E-mail:', +'LBL_LEAD_SOURCE'=>'Lead bron:', +'LBL_LEAD_STATUS'=>'Lead status:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_INDUSTRY'=>'Industrie:', +'LBL_ANNUAL_REVENUE'=>'Jaaromzet:', +'LBL_RATING'=>'Beoordeling:', +'LBL_LICENSE_KEY'=>'Licentie code:', +'LBL_NO_OF_EMPLOYEES'=>'Aantal medewerkers:', +'LBL_YAHOO_ID'=>'Tweede e-mailadres:', + +'LBL_ADDRESS_STREET'=>'Straat:', +'LBL_ADDRESS_POSTAL_CODE'=>'Postcode:', +'LBL_ADDRESS_CITY'=>'Plaats:', +'LBL_ADDRESS_COUNTRY'=>'Land:', +'LBL_ADDRESS_STATE'=>'Provincie:', +'LBL_ADDRESS'=>'Adres:', +'LBL_DESCRIPTION_INFORMATION'=>'Omschrijving', +'LBL_DESCRIPTION'=>'Omschrijving:', + +'LBL_CONVERT_LEAD'=>'Converteer Lead:', +'LBL_CONVERT_LEAD_INFORMATION'=>'Converteer Lead informatie', +'LBL_ACCOUNT_NAME'=>'Accountnaam', +'LBL_POTENTIAL_NAME'=>'Naam verkoopkans', +'LBL_POTENTIAL_CLOSE_DATE'=>'Vervaldatum verkoopkans', +'LBL_POTENTIAL_AMOUNT'=>'Bedrag verkoopkans', +'LBL_POTENTIAL_SALES_STAGE'=>'Stadium verkoopkans', + + +'NTC_DELETE_CONFIRMATION'=>'Wilt u dit verwijderen?', +'NTC_REMOVE_CONFIRMATION'=>'Wilt u deze contactpersoon verwijderen?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Wilt u dit verwijderen?', +'NTC_REMOVE_OPP_CONFIRMATION'=>'Wilt u dit verwijderen?', +'ERR_DELETE_RECORD'=>"en_us Een veld moet gespecificeerd zijn om een contact te verwijderen.", +'NTC_COPY_PRIMARY_ADDRESS'=>'Kopieer Postadres naar Afleveradres', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Kopieer Afleveradres naar Postadres', + +// Added fields in fetchfile.php, import.php -- crm4-Beta +'LBL_COLON'=>' : ', +'LBL_IMPORT_LEADS'=>'Importeer Leads', +'LBL_LEADS_FILE_LIST'=>'Bestandslijst Lead', +'LBL_INSTRUCTIONS'=>'Instructies', +'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'Graag een .xls bestand A.U.B.', +'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'U moet in iedergeval 1 bestand leveren', + +'LBL_NONE'=>'Geen', +'LBL_ASSIGNED_TO'=>'Toegewezen aan:', +'LBL_SELECT_LEAD'=>'Selecteer lead', +'LBL_GENERAL_INFORMATION'=>'Algemene informatie', +'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'Hier geen nieuwe verkoopkans maken a.u.b.', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nieuwe Verkoopkans', +'LBL_POTENTIAL_TITLE'=>'Verkoopkans', + +'LBL_NEW_TASK'=>'Nieuwe taak', +'LBL_TASK_TITLE'=>'Taken', +'LBL_NEW_CALL'=>'Nieuw telefoongesprek', +'LBL_CALL_TITLE'=>'Telefoongesprekken', +'LBL_NEW_MEETING'=>'Nieuwe vergadering', +'LBL_MEETING_TITLE'=>'Vergaderingen', +'LBL_NEW_EMAIL'=>'Nieuwe e-mail', +'LBL_EMAIL_TITLE'=>'E-mails', +'LBL_NEW_NOTE'=>'Nieuwe notitie', +'LBL_NOTE_TITLE'=>'Notities', +'LBL_NEW_ATTACHMENT'=>'Nieuwe bijlage', +'LBL_ATTACHMENT_TITLE'=>'Bijlagen', + + +//Added fields after RC1 - Release +'LBL_ALL'=>'Alle', +'LBL_CONTACTED'=>'Contact', +'LBL_LOST'=>'Verloren', +'LBL_HOT'=>'Heet', +'LBL_COLD'=>'Koud', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Leads gereedschap', + +'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'Selecteer sjabloon voor e-mail merge:', + +//Added for 4GA +'Salutation'=>'Begroeting', +'First Name'=>'Voornaam', +'Phone'=>'Telefoon', +'Last Name'=>'Achternaam', +'Mobile'=>'Telefoon Mobiel', +'Company'=>'Bedrijf', +'Fax'=>'Fax', +'Designation'=>'Functie', +'Email'=>'E-mail', +'Lead Source'=>'Bron lead', +'Website'=>'Website', +'Annual Revenue'=>'Jaaromzet', +'Lead Status'=>'Status lead', +'Industry'=>'Industrie', +'Rating'=>'Beoordeling', +'No Of Employees'=>'Aantal medewerkers', +'Assigned To'=>'Toegewezen aan', +'Yahoo Id'=>'Tweede e-mailadres', +'Created Time'=>'Gemaakt', +'Modified Time'=>'Gewijzigd', +'Street'=>'Straat', +'Postal Code'=>'Postcode', +'City'=>'Plaats', +'Country'=>'Land', +'State'=>'Provincie', +'Description'=>'Omschrijving', +'Po Box'=>'Postbus', +'Campaign Source'=>'Bron campagne', +//Added for CustomView 4.2 Release +'Name'=>'Naam', +'LBL_NEW_LEADS'=>'Mijn nieuwe Leads', + +//Added for Existing Picklist Entries + +'--None--'=>'--Geen--', +'Mr.'=>'heer', +'Ms.'=>'mevrouw', +'Mrs.'=>'mejuffrouw', +'Dr.'=>'dr.', +'Prof.'=>'prof.', + +'Acquired'=>'Overname', +'Active'=>'Actief', +'Market Failed'=>'Slechte markt', +'Project Cancelled'=>'Project geannuleerd', +'Shutdown'=>'Afsluiten', + +'Apparel'=>'Kleding', +'Banking'=>'Banken', +'Biotechnology'=>'Biotechnologie', +'Chemicals'=>'Chemisch', +'Communications'=>'Communicatie', +'Construction'=>'Constructie', +'Consulting'=>'Consulting', +'Education'=>'Educatie', +'Electronics'=>'Electronica', +'Energy'=>'Energie', +'Engineering'=>'Installatie', +'Entertainment'=>'Entertainment', +'Environmental'=>'Milieu', +'Finance'=>'Financieel', +'Food & Beverage'=>'Voedingsmiddelen & Dranken', +'Government'=>'Overheid', +'Healthcare'=>'Gezondheidszorg', +'Hospitality'=>'Hotels en conferentie gelegenheden', +'Insurance'=>'Verzekering', +'Machinery'=>'Machinerie', +'Manufacturing'=>'Productie', +'Media'=>'Media', +'Not For Profit'=>'Non Profit', +'Recreation'=>'Recreatie', +'Retail'=>'Detailhandel', +'Shipping'=>'Distributie', +'Technology'=>'Technologie', +'Telecommunications'=>'Telecommunicatie', +'Transportation'=>'Transport', +'Utilities'=>'Nutsbedrijven', +'Other'=>'Anders', + +'Cold Call'=>'Koud bellen', +'Existing Customer'=>'Bestaande klant', +'Self Generated'=>'Eigen inspanning', +'Employee'=>'Werknemer', +'Partner'=>'Partner', +'Public Relations'=>'Public Relations', +'Direct Mail'=>'Direct mail', +'Conference'=>'Conferentie', +'Trade Show'=>'Beurs', +'Web Site'=>'Website', +'Word of mouth'=>'Mond tot mond', + +'Attempted to Contact'=>'Contact gezocht', +'Cold'=>'Koud', +'Contact in Future'=>'Contakt in toekomst', +'Contacted'=>'Gecontacteerd', +'Hot'=>'Warm', +'Junk Lead'=>'Junk Lead', +'Lost Lead'=>'Verloren Lead', +'Not Contacted'=>'Niet gecontacteerd', +'Pre Qualified'=>'Voorgekwalificeerd', +'Qualified'=>'Gekwalificeerd', +'Warm'=>'Warm', + +// Added/Updated for vtiger CRM 5.0.4 + +'Designation'=>'Functie', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Lead No'=>'Lead Nr', +// END + +'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Draag geselecteerde records over aan', + + +'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'Hetvolgende is een van de mogelijke redenen', +'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'Niet alle verplichte velden zijn gekoppeld', +'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Enkele van de verplichte velden zijn leeg', +'LBL_LEADS_FIELD_MAPPING' => 'Leads Maatwerk Veldmapping', + +); + +?> diff --git a/modules/Leads/language/pt_br.lang.php b/modules/Leads/language/pt_br.lang.php new file mode 100644 index 0000000..7a7d97f --- /dev/null +++ b/modules/Leads/language/pt_br.lang.php @@ -0,0 +1,256 @@ +'Leads', +'LBL_DIRECT_REPORTS_FORM_NAME'=>'Subordinado Direto', +'LBL_MODULE_TITLE'=>'Leads: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisa Lead', +'LBL_LIST_FORM_TITLE'=>'Lista Lead', +'LBL_NEW_FORM_TITLE'=>'Novo Lead', +'LBL_LEAD_OPP_FORM_TITLE'=>'Oportunidade-Contato:', +'LBL_LEAD'=>'Lead:', +'LBL_ADDRESS_INFORMATION'=>'Dados do Endereço', +'LBL_CUSTOM_INFORMATION'=>'Informação Customizada', + +'LBL_LIST_NAME'=>'Nome', +'LBL_LIST_LAST_NAME'=>'Sobrenome', +'LBL_LIST_COMPANY'=>'Empresa', +'LBL_LIST_WEBSITE'=>'Website', +'LBL_LIST_LEAD_NAME'=>'Nome Lead', +'LBL_LIST_EMAIL'=>'E-mail', +'LBL_LIST_PHONE'=>'Fone', +'LBL_LIST_LEAD_ROLE'=>'Função', + +'LBL_NAME'=>'Nome:', +'LBL_LEAD_NAME'=>'Nome Lead:', +'LBL_LEAD_INFORMATION'=>'Informação Lead', +'LBL_FIRST_NAME'=>'Nome:', +'LBL_PHONE'=>'Fone:', +'LBL_COMPANY'=>'Empresa:', +'LBL_DESIGNATION'=>'Função:', //Contribuição de Neimar Hahmeier +'LBL_PHONE'=>'Fone:', +'LBL_LAST_NAME'=>'Sobrenome:', +'LBL_MOBILE'=>'Celular:', +'LBL_EMAIL'=>'E-mail:', +'LBL_LEAD_SOURCE'=>'Fonte Lead:', +'LBL_LEAD_STATUS'=>'Status Lead:', +'LBL_WEBSITE'=>'Website:', +'LBL_FAX'=>'Fax:', +'LBL_INDUSTRY'=>'Atividade:', +'LBL_ANNUAL_REVENUE'=>'Receita Anual:', +'LBL_RATING'=>'Avaliação:', +'LBL_LICENSE_KEY'=>'Chave Licença:', +'LBL_NO_OF_EMPLOYEES'=>'No. Empregados:', +'LBL_YAHOO_ID'=>'ID Yahoo!:', + +'LBL_ADDRESS_STREET'=>'Rua:', +'LBL_ADDRESS_POSTAL_CODE'=>'CEP:', +'LBL_ADDRESS_CITY'=>'Cidade:', +'LBL_ADDRESS_COUNTRY'=>'País:', +'LBL_ADDRESS_STATE'=> 'Estado:', +'LBL_ADDRESS'=>'Endereço:', +'LBL_DESCRIPTION_INFORMATION'=>'Descrição', +'LBL_DESCRIPTION'=>'Descrição:', + +'LBL_CONVERT_LEAD'=>'Converter Lead:', +'LBL_CONVERT_LEAD_INFORMATION'=>'Converte Informação Lead', +'LBL_ACCOUNT_NAME'=>'Nome Organização', +'LBL_POTENTIAL_NAME'=>'Nome Oportunidade', +'LBL_POTENTIAL_CLOSE_DATE'=>'Data Oportunidade Fechada', +'LBL_POTENTIAL_AMOUNT'=>'Valor Oportunidade', +'LBL_POTENTIAL_SALES_STAGE'=>'Estágio Oportunidade de Vendas', + + +'NTC_DELETE_CONFIRMATION'=>'Você tem certeza que deseja deletar este registro?', +'NTC_REMOVE_CONFIRMATION'=>'Você tem certeza que deseja remover este Contato deste Caso?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'Você tem certeza que deseja remover este registro de um subordinado vtiger_report?', +'NTC_REMOVE_OPP_CONFIRMATION'=>'Você tem certeza que deseja remover este Contato desta Oportunidade?', +'ERR_DELETE_RECORD'=>"en_us Defina um número de registro para deletar o Contato.", +'NTC_COPY_PRIMARY_ADDRESS'=>'Copiar endereço Principal', +'NTC_COPY_ALTERNATE_ADDRESS'=>'Copiar endereço Alternativo', + +// Added vtiger_fields in fetchfile.php, import.php -- crm4-Beta +'LBL_COLON'=>' : ', +'LBL_IMPORT_LEADS'=>'Importar Leads', +'LBL_LEADS_FILE_LIST'=>'Lista de Arquivos de Leads', +'LBL_INSTRUCTIONS'=>'Instruções', +'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'Forneça um único arquivo .xls como entrada', +'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'Por favor forneça ao menos um arquivo como entrada', + +'LBL_NONE'=>'Nada', +'LBL_ASSIGNED_TO'=>'Responsável:', +'LBL_SELECT_LEAD'=>'Seleciona Lead', +'LBL_GENERAL_INFORMATION'=>'Informação Geral', +'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'Não criar Nova Oportunidade após Conversão', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'Nova Oportunidade', +'LBL_POTENTIAL_TITLE'=>'Oportunidades', + +'LBL_NEW_TASK'=>'Nova Tarefa', +'LBL_TASK_TITLE'=>'Tarefas', +'LBL_NEW_CALL'=>'Nova Chamada', +'LBL_CALL_TITLE'=>'Chamadas', +'LBL_NEW_MEETING'=>'Nova Reunião', +'LBL_MEETING_TITLE'=>'Reuniões', +'LBL_NEW_EMAIL'=>'Novo E-mail', +'LBL_EMAIL_TITLE'=>'E-mails', +'LBL_NEW_NOTE'=>'Novo Documento', +'LBL_NOTE_TITLE'=>'Documentos', +'LBL_NEW_ATTACHMENT'=>'Novo Anexo', +'LBL_ATTACHMENT_TITLE'=>'Anexos', + + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'Todos', +'LBL_CONTACTED'=>'Contactado', +'LBL_LOST'=>'Perdido', +'LBL_HOT'=>'Quente', +'LBL_COLD'=>'Frio', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'Ferramentas Lead', + +'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'Selecione modelo para Mesclar Mensagem:', + +//Added for 4GA +'Salutation'=>'Saudação', +'First Name'=>'Nome', +'Phone'=>'Fone', +'Last Name'=>'Sobrenome', +'Mobile'=>'Celular', +'Company'=>'Empresa', +'Fax'=>'Fax', +'Email'=>'E-mail', +'Lead Source'=>'Fonte Lead', +'Website'=>'Website', +'Annual Revenue'=>'Receita Anual', +'Lead Status'=>'Status Lead', +'Industry'=>'Atividade', +'Rating'=>'Avaliação', +'No Of Employees'=>'No. Empregados', +'Assigned To'=>'Responsável', +'Yahoo Id'=>'ID Yahoo!', +'Created Time'=>'Data Criação', +'Modified Time'=>'Data Modificação', +'Street'=>'Rua', +'Postal Code'=>'CEP', +'City'=>'Cidade', +'Country'=>'País', +'State'=>'Estado', +'Description'=>'Descrição', +'Po Box'=>'Cx Postal', +'Campaign Source'=>'Origem Campanha', +//Added for CustomView 4.2 Release +'Name'=>'Nome', +'LBL_NEW_LEADS'=>'Meus Novos Leads', + +//Added for Existing Picklist Entries + +'--None--'=>'--Nada--', +'Mr.'=>'Sr.', +'Ms.'=>'Sra.', +'Mrs.'=>'Srta.', +'Dr.'=>'Dr', +'Prof.'=>'Prof.', + +'Acquired'=>'Adquirido', +'Active'=>'Ativo', +'Market Failed'=>'Negócio Perdido', +'Project Cancelled'=>'Projeto Cancelado', +'Shutdown'=>'Fechado', + +'Apparel'=>'Vestuário', +'Banking'=>'Bancos', +'Biotechnology'=>'Biotecnologia', +'Chemicals'=>'Química', +'Communications'=>'Comunicações', +'Construction'=>'Construção', +'Consulting'=>'Consultoria', +'Education'=>'Educação', +'Electronics'=>'Eletrônica', +'Energy'=>'Energia', +'Engineering'=>'Engenharia', +'Entertainment'=>'Entretenimento', +'Environmental'=>'Meio Ambiente', +'Finance'=>'Finanças', +'Food & Beverage'=>'Alimentos & Bebidas', +'Government'=>'Governo', +'Healthcare'=>'Saúde', +'Hospitality'=>'Hotelaria', +'Insurance'=>'Seguro', +'Machinery'=>'Máquinas', +'Manufacturing'=>'Indústria', +'Media'=>'Mídia', +'Not For Profit'=>'ONGs', +'Recreation'=>'Recreação', +'Retail'=>'Comércio', +'Shipping'=>'Transporte Marítimo', +'Technology'=>'Tecnologia', +'Telecommunications'=>'Telecomunicações', +'Transportation'=>'Transportes', +'Utilities'=>'Serviço Público', +'Other'=>'Outro', + +'Cold Call'=>'Cold Call', +'Existing Customer'=>'Cliente Existente', +'Self Generated'=>'Auto Gerado', +'Employee'=>'Empregado', +'Partner'=>'Parceiro', +'Public Relations'=>'Relações Públicas', +'Direct Mail'=>'Mala Direta', +'Conference'=>'Conferência', +'Trade Show'=>'Feira Negócios', +'Web Site'=>'Web Site', +'Word of mouth'=>'Boca-boca', + +'Attempted to Contact'=>'Tentativa Contato', +'Cold'=>'Frio', +'Contact in Future'=>'Contactar no Futuro', +'Contacted'=>'Contactado', +'Hot'=>'Quente', +'Junk Lead'=>'Descartado', +'Lost Lead'=>'Perdido', +'Not Contacted'=>'Não Contactado', +'Pre Qualified'=>'Pré-Qualificado', +'Qualified'=>'Qualificado', +'Warm'=>'Morno', + +// Added/Updated for vtiger CRM 5.0.4 + +'Designation'=>'Título', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Lead No'=>'Cod. Lead', +// END + +'LBL_TRANSFER_RELATED_RECORDS_TO' => 'Transferir registros relacionados para', + +'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => 'O seguinte pode ser uma das possíveis razões', +'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => 'Todos os campos obrigatórios não são mapeados', +'LBL_MANDATORY_FIELDS_ARE_EMPTY' => 'Alguns dos valores dos campos obrigatórios estão vazios', +'LBL_LEADS_FIELD_MAPPING' => 'Mapeamento Campos Customizados do Lead', +'LBL_FIELD_SETTINGS' => 'Configurações do Campo', +'Leads ID' => 'ID Leads', + +//Missing label in vtiger CRM +'Secondary Email'=>'Email Alternativo', + +); + +?> diff --git a/modules/Leads/language/zh_cn.lang.php b/modules/Leads/language/zh_cn.lang.php new file mode 100644 index 0000000..d98b1b6 --- /dev/null +++ b/modules/Leads/language/zh_cn.lang.php @@ -0,0 +1,267 @@ +'潜在客户', +'LBL_DIRECT_REPORTS_FORM_NAME'=>'直接输出', +'LBL_MODULE_TITLE'=>'潜在客户: 首页', +'LBL_SEARCH_FORM_TITLE'=>'查找潜在客户', +'LBL_LIST_FORM_TITLE'=>'潜在客户列表', +'LBL_NEW_FORM_TITLE'=>'新增潜在客户', +'LBL_LEAD_OPP_FORM_TITLE'=>'联系人-销售机会:', +'LBL_LEAD'=>'潜在客户:', +'LBL_ADDRESS_INFORMATION'=>'地址信息', +'LBL_CUSTOM_INFORMATION'=>'自定义信息', + +'LBL_LIST_NAME'=>'名称', +'LBL_LIST_LAST_NAME'=>'姓名', +'LBL_LIST_COMPANY'=>'公司', +'LBL_LIST_WEBSITE'=>'网站', +'LBL_LIST_LEAD_NAME'=>'潜在客户名称', +'LBL_LIST_EMAIL'=>'Email', +'LBL_LIST_PHONE'=>'电话', +'LBL_LIST_LEAD_ROLE'=>'职位', + +'LBL_NAME'=>'名称:', +'LBL_LEAD_NAME'=>'潜在客户名称:', +'LBL_LEAD_INFORMATION'=>'潜在客户信息', +'LBL_FIRST_NAME'=>'英文名:', +'LBL_PHONE'=>'电话:', +'LBL_COMPANY'=>'公司:', +'LBL_DESIGNATION'=>'职位:', +'LBL_PHONE'=>'电话:', +'LBL_LAST_NAME'=>'姓名:', +'LBL_MOBILE'=>'手机:', +'LBL_EMAIL'=>'Email:', +'LBL_LEAD_SOURCE'=>'潜在客户来源:', +'LBL_LEAD_STATUS'=>'潜在客户状态:', +'LBL_WEBSITE'=>'网站:', +'LBL_FAX'=>'传真:', +'LBL_INDUSTRY'=>'行业:', +'LBL_ANNUAL_REVENUE'=>'年营业额:', +'LBL_RATING'=>'评价:', +'LBL_LICENSE_KEY'=>'许可证 Key:', +'LBL_NO_OF_EMPLOYEES'=>'员工数:', +'LBL_YAHOO_ID'=>'Yahoo! ID:', + +'LBL_ADDRESS_STREET'=>'邮寄地址:', +'LBL_ADDRESS_POSTAL_CODE'=>'邮政编码:', +'LBL_ADDRESS_CITY'=>'城市:', +'LBL_ADDRESS_COUNTRY'=>'国家:', +'LBL_ADDRESS_STATE'=>'省份:', +'LBL_ADDRESS'=>'地址:', +'LBL_DESCRIPTION_INFORMATION'=>'详细信息', +'LBL_DESCRIPTION'=>'描述:', + +'LBL_CONVERT_LEAD'=>'转化潜在客户:', +'LBL_CONVERT_LEAD_INFORMATION'=>'转化潜在客户信息', +'LBL_ACCOUNT_NAME'=>'客户名称', +'LBL_POTENTIAL_NAME'=>'销售机会名称', +'LBL_POTENTIAL_CLOSE_DATE'=>'销售机会结束日期', +'LBL_POTENTIAL_AMOUNT'=>'销售机会金额', +'LBL_POTENTIAL_SALES_STAGE'=>'销售机会销售阶段', + +'NTC_DELETE_CONFIRMATION'=>'您确定要删除这条记录?', +'NTC_REMOVE_CONFIRMATION'=>'您确定要从这个销售机会删除这个潜在客户?', +'NTC_REMOVE_DIRECT_REPORT_CONFIRMATION'=>'您确定要删除这笔直接报告的资料?', +'NTC_REMOVE_OPP_CONFIRMATION'=>'您确定要从这个销售机会删除这个联系人?', +'ERR_DELETE_RECORD'=>'删除这笔联系人记录必须指定记录编号.', +'NTC_COPY_PRIMARY_ADDRESS'=>'复制主要地址到其他地址', +'NTC_COPY_ALTERNATE_ADDRESS'=>'复制其他地址到主要地址', + +// Added vtiger_fields in fetchfile.php, import.php -- crm4-Beta +'LBL_COLON'=>' : ', +'LBL_IMPORT_LEADS'=>'导入潜在客户', +'LBL_LEADS_FILE_LIST'=>'潜在客户文件列表', +'LBL_INSTRUCTIONS'=>'指令', +'LBL_KINDLY_PROVIDE_AN_XLS_FILE'=>'友善的提供输入 .xls 文件', +'LBL_PROVIDE_ATLEAST_ONE_FILE'=>'请至少提供一个文件', + +'LBL_NONE'=>'无', +'LBL_ASSIGNED_TO'=>'负责人:', +'LBL_SELECT_LEAD'=>'选择潜在客户', +'LBL_GENERAL_INFORMATION'=>'一般信息', +'LBL_DO_NOT_CREATE_NEW_POTENTIAL'=>'在转换时不新增销售机会', + +//for v4 release added +'LBL_NEW_POTENTIAL'=>'新增销售机会', +'LBL_POTENTIAL_TITLE'=>'销售机会', + +'LBL_NEW_TASK'=>'新增任务', +'LBL_TASK_TITLE'=>'任务', +'LBL_NEW_CALL'=>'新增电话', +'LBL_CALL_TITLE'=>'电话', +'LBL_NEW_MEETING'=>'新增会议', +'LBL_MEETING_TITLE'=>'会议', +'LBL_NEW_EMAIL'=>'撰写新邮件', +'LBL_EMAIL_TITLE'=>'电子邮件', +'LBL_NEW_NOTE'=>'新增备忘录', +'LBL_NOTE_TITLE'=>'备忘录', +'LBL_NEW_ATTACHMENT'=>'新增附件', +'LBL_ATTACHMENT_TITLE'=>'附件', + + +//Added vtiger_fields after RC1 - Release +'LBL_ALL'=>'全部', +'LBL_CONTACTED'=>'已联系', +'LBL_LOST'=>'失去', +'LBL_HOT'=>'热情', +'LBL_COLD'=>'冷淡', + +// Added for 4GA +'LBL_TOOL_FORM_TITLE'=>'潜在客户工具', + +'LBL_SELECT_TEMPLATE_TO_MAIL_MERGE'=>'选择要合并的邮件模版:', + +//Added for 4GA +'Salutation'=>'称谓', +'First Name'=>'英文名', +'Phone'=>'电话', +'Last Name'=>'姓名', +'Mobile'=>'手机', +'Company'=>'公司', +'Fax'=>'传真', +'Email'=>'Email', +'Lead Source'=>'潜在客户来源', +'Website'=>'网站', +'Annual Revenue'=>'年营业额', +'Lead Status'=>'潜在客户状态', +'Industry'=>'行业', +'Rating'=>'评价', +'No Of Employees'=>'员工数', +'Assigned To'=>'负责人', +'Yahoo Id'=>'Yahoo Id', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', +'Street'=>'邮寄地址', +'Postal Code'=>'邮政编码', +'City'=>'城市', +'Country'=>'国家', +'State'=>'省份', +'Description'=>'描述', +'Po Box'=>'邮政信箱', +'Campaign Source'=>'营销活动来源', +//Added for CustomView 4.2 Release +'Name'=>'名称', +'LBL_NEW_LEADS'=>'我的最新潜在客户', + +//Added for Existing Picklist Entries + +'--None--'=>'-- 无 --', +'Mr.'=>'先生', +'Ms.'=>'女士', +'Mrs.'=>'小姐', +'Dr.'=>'博士', +'Prof.'=>'专家', + +'Acquired'=>'已获得', +'Active'=>'有意向', +'Market Failed'=>'市场失利', +'Project Cancelled'=>'项目取消', +'Shutdown'=>'关闭', + +'Apparel'=>'服装', +'Banking'=>'银行', +'Biotechnology'=>'生物', +'Chemicals'=>'化工', +'Communications'=>'交通', +'Construction'=>'建筑', +'Consulting'=>'咨询', +'Education'=>'教育', +'Electronics'=>'电子', +'Energy'=>'能源', +'Engineering'=>'工程', +'Entertainment'=>'娱乐', +'Environmental'=>'环保', +'Finance'=>'金融', +'Food & Beverage'=>'饮食', +'Government'=>'政府', +'Healthcare'=>'保健', +'Hospitality'=>'医院', +'Insurance'=>'保险', +'Machinery'=>'机械', +'Manufacturing'=>'制造业', +'Media'=>'媒体', +'Not For Profit'=>'非盈利机构', +'Recreation'=>'休闲', +'Retail'=>'零售', +'Shipping'=>'航运', +'Technology'=>'科技', +'Telecommunications'=>'电信', +'Transportation'=>'运输', +'Utilities'=>'公共事业', +'Real Estate'=>'房地产公司', +'State-owned Enterprises'=>'国有企业', +'Private Enterprise'=>'民营企业', +'Construction Company'=>'建筑公司', +'LED Manufacturer'=>'LED 工程公司', +'LED Lighting Company'=>'LED 照明公司', +'Other'=>'其它', + +'Cold Call'=>'陌生拜访', +'Existing Customer'=>'老客户', +'Self Generated'=>'自动产生', +'Employee'=>'员工', +'Partner'=>'合作伙伴', +'Public Relations'=>'公共关系', +'Direct Mail'=>'邮件营销', +'Conference'=>'研讨会', +'Trade Show'=>'贸易展览', +'Web Site'=>'网站', +'Word of mouth'=>'口碑', +'Other'=>'其他', + +'Attempted to Contact'=>'尝试接触', +'Cold'=>'关系冷淡', +'Contact in Future'=>'即将联系', +'Contacted'=>'联系中', +'Hot'=>'熟络', +'Junk Lead'=>'没有潜在价值', +'Lost Lead'=>'丢失的潜在客户', +'Not Contacted'=>'没有联系', +'Pre Qualified'=>'基本合格', +'Qualified'=>'合格', +'Warm'=>'很好', +// Added/Updated for vtiger CRM 5.0.4 + +'Designation'=>'职位', + +// Added after 5.0.4 GA + +//Module Sequence Numbering +'Lead No'=>'潜在客户编号', +'Email'=>'工作 Email', +'Secondary Email' => '私人 Email', +// END + +'LBL_TRANSFER_RELATED_RECORDS_TO' => '将相关记录转换为', + +'LBL_FOLLOWING_ARE_POSSIBLE_REASONS' => '可能是下面的原因之一', +'LBL_LEADS_FIELD_MAPPING_INCOMPLETE' => '不是所有必需映射的字段都已经映射', +'LBL_MANDATORY_FIELDS_ARE_EMPTY' => '一些不能为空的字段可能为空', +'LBL_LEADS_FIELD_MAPPING' => '潜在客户自定义字段映射', +'LBL_FIELD_SETTINGS' => '字段设置', +'Leads ID' => '潜在客户序号', +); + +?> diff --git a/modules/Leads/updateRelations.php b/modules/Leads/updateRelations.php new file mode 100644 index 0000000..f69712a --- /dev/null +++ b/modules/Leads/updateRelations.php @@ -0,0 +1,40 @@ + diff --git a/modules/MailManager/CREDITS.txt b/modules/MailManager/CREDITS.txt new file mode 100644 index 0000000..fe826d9 --- /dev/null +++ b/modules/MailManager/CREDITS.txt @@ -0,0 +1,10 @@ +Thanks to contributors of the open source library which is used for development. + +1. HTML_Safe (http://pear.php.net/package/HTML_Safe) +Under: BSD (3 Clause) License + +2. XML_HTMLSax3 (http://pear.php.net/package/XML_HTMLSax3) +Under: PHP License + +3. jQuery Tokenizing Autocomplete (like facebook) (http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/) +Under: MIT License (choosen) \ No newline at end of file diff --git a/modules/MailManager/License.txt b/modules/MailManager/License.txt new file mode 100644 index 0000000..a868598 --- /dev/null +++ b/modules/MailManager/License.txt @@ -0,0 +1,12 @@ +IMPORTANT: +If you are offering this module (or any part of source) for your customers, +please make sure to take permission from the Initial Developer (info@vtiger.com). + +/*+************************************************************************************ + * The contents of this source are subject to the vtiger CRM Public License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + **************************************************************************************/ \ No newline at end of file diff --git a/modules/MailManager/ListView.php b/modules/MailManager/ListView.php new file mode 100644 index 0000000..606eec6 --- /dev/null +++ b/modules/MailManager/ListView.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/MailManager/MailManager.js b/modules/MailManager/MailManager.js new file mode 100644 index 0000000..fb09bb8 --- /dev/null +++ b/modules/MailManager/MailManager.js @@ -0,0 +1,1645 @@ +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ************************************************************************************/ +if (typeof(MailManager) == 'undefined') { + /* + * Namespaced javascript class for MailManager + */ + MailManager = { + + MailManagerUploadLimit : 6, + + /* + * Utility function + * Usage: + * var output = MailManager.sprintf("String format %s, Number format %s", "VALUE", 10); + */ + sprintf: function(){ + var printString = arguments[0]; + for (var i = 1; i < arguments.length; ++i) { + // Replace any %s, %d, %c with the variables. + // TODO Format the argument w.r.t to format specifier + printString = printString.replace(/(%[a-z]+)/, arguments[i]); + } + return printString; + }, + + /* + * Progress indicator handlers. + */ + progress_show: function(msg, suffix){ + if (typeof(suffix) == 'undefined') + suffix = ''; + VtigerJS_DialogBox.block(); + if (typeof(msg) != 'undefined') + jQuery('#_progressmsg_').html(msg + suffix.toString()); + jQuery('#_progress_').show(); + }, + progress_hide: function(){ + VtigerJS_DialogBox.unblock(); + jQuery('#_progressmsg_').html(''); + jQuery('#_progress_').hide(); + }, + + /* Show error message */ + show_error: function(message){ + var errordiv = jQuery('#_messagediv_'); + + if (message == '') { + errordiv.text('').hide(); + } else { + errordiv.html('

' + message + '

').css('display','block').addClass('mm_error').removeClass('mm_message'); + MailManager.placeAtCenter(errordiv); + } + MailManager.hide_error(); + }, + + hide_error: function() { + setTimeout( function() { + jQuery('#_messagediv_').hide(); + }, 5000); + }, + + show_message: function(message){ + var errordiv = jQuery('#_messagediv_'); + if (message == '') { + errordiv.text('').hide(); + } else { + errordiv.html('

' + message + '

').css('display','block').removeClass('mm_error').addClass('mm_message'); + MailManager.placeAtCenter(errordiv); + } + MailManager.hide_error(); + }, + + /* Base url for any ajax actions */ + _baseurl: function(){ + return "module=MailManager&action=MailManagerAjax&file=index&mode=ajax&"; + }, + + /* Translation support */ + i18n: function(key){ + if (typeof(MailManageri18nInfo) != 'undefined') + return MailManageri18nInfo[key]; + if (typeof(alert_arr) != 'undefined' && alert_arr[key]) + return alert_arr[key]; + return key; + }, + + /* Build the main ui */ + mainui: function(){ + MailManager.openCurrentFolder(); + setTimeout(function() { + jQuery("#_folderprogress_").show(); + MailManager.mail_open_meta = {}; + if (MailManager.mail_reply_rteinstance) { + MailManager.mail_reply_rteinstance.destroy(); + MailManager.mail_reply_rteinstance = false; + } + MailManager.progress_show(MailManager.i18n('JSLBL_Loading_Please_Wait'), '...'); + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mainui", + onComplete: function(transport){ + var response = MailManager.removeHidElement(transport.responseText); + response = JSON.parse(response); + MailManager._mainui_callback(response); + jQuery("#_folderprogress_").hide(); + var timeOut = jQuery("#refresh_timeout").val(); + if(timeOut != "" && timeOut !=0) { + setInterval(MailManager.updateMailFolders, timeOut); + } + // Update the seleted folders to highlight them. + var folderName = jQuery('#mm_selected_folder').val(); + MailManager.updateSelectedFolder(folderName); + } + }); + }, 400); + }, + + openCurrentFolder : function() { + if(jQuery("#mailbox_folder")) { + var currentFolder = jQuery("#mailbox_folder").val(); + // This is added as we will be settings mailbox_folder with the current selected folder. + // By this time we would have lost the last mailbox folder also + if(currentFolder == 'mm_drafts') currentFolder = 'INBOX'; + + if(currentFolder) { + MailManager.folder_open(currentFolder); + }else { + MailManager.folder_open('INBOX'); + } + } else { + MailManager.folder_open('INBOX'); + } + }, + + updateMailFolders : function() { + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mainui", + onComplete: function(transport){ + var response = MailManager.removeHidElement(transport.responseText); + response = JSON.parse(response); + jQuery('#_mainfolderdiv_').html(response['result']['ui']); + MailManager.refreshCurrentFolder(); // this is used to refresh the mails in the folders + + var folderName = jQuery('#mm_selected_folder').val(); + MailManager.updateSelectedFolder(folderName); + } + }); + }, + + quicklinks_update: function() { + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mainui&_operationarg=_quicklinks", + onComplete: function(transport){ + var response = MailManager.removeHidElement(transport.responseText); + response = JSON.parse(response); + jQuery("#_quicklinks_mainuidiv_").html(response['result']['ui']); + } + }); + }, + + /* Intermedidate call back to build main ui */ + _mainui_callback: function(responseJSON){ + MailManager.progress_hide(); + jQuery('#_mainfolderdiv_').html(responseJSON['result']['ui']); + + if (!responseJSON['result']['mailbox']) { + MailManager.open_settings(); + } + }, + + + moveMail : function(element) { + + function execute() { + var temp = new Array(); + + function getCheckedMails() { + var cb_elements = jQuery('[name="mc_box"]'); + + for (var i = 0; i < cb_elements.length; i++) { + if (cb_elements[i].checked) { + temp.push(cb_elements[i].value); + } + } + } + + function validate() { + getCheckedMails(); // Check the selected mails + if(temp.length < 1) { + MailManager.show_error(MailManager.i18n('JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL')); + MailManager.resetFolderDropDown(); + return false; + } + return true; + } + + function callbackFunction(response) { + for(var i = 0; i%s (%s)", folder, count)); + } else { + jQuery('#_mailfolder_' + folder).addClass('mm_folder_selected').html(MailManager.sprintf("%s", folder)); + } + } + }, + + /* Basic search for folder emails */ + search_basic: function(form){ + var frmparams = Form.serialize(form); + + MailManager.progress_show(MailManager.i18n('JSLBL_Searching'), ' ...'); + + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=folder&_operationarg=open&" + frmparams, + onComplete: function(transport){ + MailManager.progress_hide(); + + MailManager.mail_close(); + var response = MailManager.removeHidElement(transport.responseText); + jQuery('#_contentdiv_').html(response); + } + }); + + return false; + }, + + // Meta information of currently opened mail + mail_open_meta: {}, + + /* Open email */ + mail_open: function(folder, msgno){ + + MailManager.progress_show(MailManager.i18n('JSLBL_Opening'), ' ...'); + + jQuery('#_mailrow_' + msgno).removeClass('mm_bold'); + jQuery('#_mailrow_' + msgno).addClass('mm_normal'); + + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mail&_operationarg=open&_folder=" + encodeURIComponent(folder) + "&_msgno=" + encodeURIComponent(msgno), + onComplete: function(transport){ + MailManager.progress_hide(); + var response = MailManager.removeHidElement(transport.responseText); + var responseJSON = JSON.parse(response); + var resultJSON = responseJSON['result']; + + if (!resultJSON['ui']) { + MailManager.show_error(MailManager.i18n('JSLBL_Failed_To_Open_Email')); + return; + } + + MailManager.close_all(); + jQuery('#_contentdiv2_').show(); + jQuery('#_contentdiv2_').html(resultJSON['ui']); + + MailManager.mail_open_meta = resultJSON['meta']; + var folderName = resultJSON['folder']; + + // Update folder count on UI + MailManager.folder_updateCount(folderName, resultJSON['unread']); + + MailManager.mail_find_relationship(); + } + }); + }, + + + /* Close email */ + mail_close: function(){ + MailManager.close_all(); + jQuery('#_contentdiv_').show(); + MailManager.mail_open_meta = {}; + }, + + /* Mark mail as read */ + mail_mark_unread: function(folder, msgno){ + + MailManager.progress_show(MailManager.i18n('JSLBL_Updating'), ' ...'); + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mail&_operationarg=mark&_markas=unread&_folder=" + encodeURIComponent(folder) + "&_msgno=" + encodeURIComponent(msgno), + onComplete: function(transport){ + MailManager.progress_hide(); + var response = MailManager.removeHidElement(transport.responseText); + var responseJSON = JSON.parse(response); + var resultJSON = responseJSON['result']; + + if (responseJSON && resultJSON['status']) { + MailManager.mail_close(); + + var msgno = resultJSON['msgno']; + jQuery('#_mailrow_' + msgno).removeClass('mm_normal'); + jQuery('#_mailrow_' + msgno).addClass('mm_bold'); + + MailManager.folder_updateCount(resultJSON['folder'], resultJSON['unread']); + } + } + }); + }, + + /* Lookup for mail relations in CRM */ + mail_find_relationship: function(){ + jQuery('#_mailrecord_findrel_btn_').html(MailManager.i18n('JSLBL_Finding_Relation') + '...'); + jQuery("#_mailrecord_findrel_btn_").attr('disabled', true); + + var meta = MailManager.mail_open_meta; + + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=relation&_operationarg=find&_mfrom=" + encodeURIComponent(meta['from']) + + '&_folder=' + + encodeURIComponent(meta['folder']) + + '&_msgno=' + + encodeURIComponent(meta['msgno']) + + '&_msguid=' + + encodeURIComponent(meta['msguid'].replace('<', '<').replace('>', '>')), + + onComplete: function(transport){ + + jQuery('#_mailrecord_findrel_btn_').html(MailManager.i18n('JSLBL_Find_Relation_Now')); + jQuery("#_mailrecord_findrel_btn_").attr('disabled', false); + jQuery('#_mailrecord_findrel_btn_').hide(); + var response = MailManager.removeHidElement(transport.responseText); + var responseJSON = JSON.parse(response); + var resultJSON = responseJSON['result']; + + jQuery('#_mailrecord_relationshipdiv_').html(resultJSON['ui']); + } + }); + }, + + /* Associate email to CRM record */ + mail_associate: function(form){ + + var frmparams = Form.serialize(form); + // No record is selected for linking? + if (frmparams.indexOf('_mlinkto') == -1) + return; + + MailManager.progress_show(MailManager.i18n('JSLBL_Associating'), ' ...'); + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=relation&_operationarg=link&" + frmparams, + onComplete: function(transport){ + MailManager.progress_hide(); + var response = MailManager.removeHidElement(transport.responseText); + var responseJSON = JSON.parse(response); + var resultJSON = responseJSON['result']; + if (resultJSON['ui']) { + jQuery('#_mailrecord_relationshipdiv_').html(resultJSON['ui']); + } + } + }); + }, + + /* Extended support for creating and linking */ + mail_associate_create_wizard: function(form){ + if (form._mlinktotype.value == '') { + MailManager.mail_associate_create_cancel(); + return; + } + var frmparams = Form.serialize(form); + MailManager.progress_show(MailManager.i18n('JSLBL_Loading'), ' ...'); + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=relation&_operationarg=create_wizard&" + frmparams, + onComplete: function(transport){ + MailManager.progress_hide(); + var response = MailManager.removeHidElement(transport.responseText); + jQuery('#_relationpopupdiv_').get(0).innerHTML = (response); + var scriptTags = $("_relationpopupdiv_").getElementsByTagName("script"); + for(var i = 0; i< scriptTags.length; i++){ + var scriptTag = scriptTags[i]; + eval(scriptTag.innerHTML); + } + // Place the popup at center + MailManager.placeAtCenter(jQuery('#_relationpopupdiv_')); + jQuery('#_relationpopupdiv_').css('visibility', '').show(); + + //Make it Dragable + jQuery('#_relationpopupdiv_').draggable().css('cursor','move'); + } + }); + }, + + /* This will be used to perform actions on mails with an Linked record*/ + mail_associate_actions : function(form) { + var selected = false; + + if(form._mlinkto.length != undefined) { + for(i=0; i' + + '
'+MailManager.i18n('JSLBL_UPLOAD_DROPFILES')+'
' + + '
'+MailManager.i18n('JSLBL_UPLOAD_FILE')+'
' + + '
    ' + + '
    ', + + // template for one item in file list + fileTemplate: '
  • ' + + '' + + '' + + '' + + ''+MailManager.i18n('JSLBL_UPLOAD_CANCEL')+'' + + '\n\ + ' + + ''+MailManager.i18n('JSLBL_UPLOAD_FAILED')+'' + + '
  • ', + multiple: false, + classes: { + // used to get elements from templates + button: 'qq-upload-button', + drop: 'qq-upload-drop-area', + dropActive: 'qq-upload-drop-area-active', + list: 'qq-upload-list', + + file: 'qq-upload-file', + spinner: 'qq-upload-spinner', + size: 'qq-upload-size', + cancel: 'qq-upload-cancel', + deleteupload: 'qq-upload-deleteupload', + // added to list item when upload completes + // used in css to hide progress spinner + success: 'qq-upload-success', + fail: 'qq-upload-fail' + } + }); + return uploader; + }, + + //draft + mail_draft: function(id){ + MailManager.close_all(); + MailManager.progress_show(MailManager.i18n('JSLBL_Loading'), ' ...'); + + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mail&_operationarg=getdraftmail&id="+ encodeURIComponent(id), + onComplete: function(response){ + jQuery('.qq-upload-list').children().remove(); + MailManager.progress_hide(); + jQuery('#_replydiv_').show(); + var responseJSON = JSON.parse(response.responseText); + + MailManager.mail_reply_rteinit(responseJSON['result'][0][0]['description']); + + jQuery("#_mail_replyfrm_to_").val(JSON.parse(responseJSON['result'][0][0]['saved_toid'])); + jQuery("#_mail_replyfrm_cc_").val(JSON.parse(responseJSON['result'][0][0]['ccmail'])); + jQuery("#_mail_replyfrm_bcc_").val(JSON.parse(responseJSON['result'][0][0]['bccmail'])); + jQuery("#_mail_replyfrm_subject_").val(responseJSON['result'][0][0]['subject']); + jQuery("#emailid").val(responseJSON['result'][0][0]['id']); + + var attachments = responseJSON['result'][0]['attachments']; + if(attachments != null) { + var attachmentsHTML = ""; + for(i=0; i\n\ + "+attachments[i]['size']+"\n\ + \n\ + "; + } + } + jQuery('#attachmentCount').val(attachments.length); + jQuery('.qq-upload-list').append(attachmentsHTML); + jQuery('#upload_target').children().remove(); + + // Updated to highlight selected folder + MailManager.updateSelectedFolder("mm_compose"); + jQuery('#mm_selected_folder').val("mm_compose"); + } + }); + }, + + + deleteAttachment : function(id, docid, ele) { + MailManager.progress_show(MailManager.i18n('JSLBL_Loading'), ' ...'); + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mail&_operationarg=deleteAttachment&emailid="+ encodeURIComponent(id) + +"&docid="+ encodeURIComponent(docid), + onComplete: function(response){ + MailManager.progress_hide(); + var responseJSON = JSON.parse(response.responseText); + if(responseJSON.result.success == true) { + MailManager.progress_hide(); + jQuery(ele).parent().fadeTo('slow', 0.0, function(){ + var count = jQuery('#attachmentCount').val(); + jQuery('#attachmentCount').val(--count); + jQuery(ele).parent().remove(); + }); + } else { + MailManager.show_error(MailManager.i18n('JSLBL_ATTACHMENT_NOT_DELETED')); + } + } + }); + }, + + /* Reply to mail */ + mail_reply: function(all){ + if (typeof(all) == 'undefined') + all = true; + + var from = jQuery('#_mailopen_from').html(); + var cc = jQuery('#_mailopen_cc') ? jQuery('#_mailopen_cc').html() : ''; + var subject = jQuery('#_mailopen_subject').html(); + var body = jQuery('#_mailopen_body').html(); + var date = jQuery('#_mailopen_date').html(); + + MailManager.close_all(); + jQuery('#_replydiv_').show(); + + // TODO Strip invalid HTML? + if (all) + jQuery("#_mail_replyfrm_cc_").val(cc); + else + jQuery("#_mail_replyfrm_cc_").val(''); + + jQuery("#_mail_replyfrm_to_").val(from); + jQuery("#_mail_replyfrm_bcc_").val(''); + var replySubject = (subject.toUpperCase().indexOf('RE:') == 0) ? subject : 'Re: ' + subject; + jQuery("#_mail_replyfrm_subject_").val(replySubject); + var replyBody = MailManager.sprintf('

    %s, %s, %s:

    %s

    ', 'On ' + date, from, 'wrote', body); + jQuery("#emailid").val(''); + jQuery("#attachmentCount").val(''); + MailManager.mail_reply_rteinit(replyBody); + MailManager.createUploader(); + + // Update the seleted folders to highlight them. + MailManager.updateSelectedFolder('mm_compose'); + jQuery('#mm_selected_folder').val('mm_compose'); + }, + + /* Track and Initialize RTE instance for reply */ + mail_reply_rteinstance: false, + mail_reply_rteinit: function(data){ + if (MailManager.mail_reply_rteinstance == false) { + var textAreaName = '_mail_replyfrm_body_'; + CKEDITOR.replace(textAreaName, { + toolbar: 'Full', + extraPlugins: 'uicolor', + uiColor: '#dfdff1' + }); + MailManager.mail_reply_rteinstance = CKEDITOR.instances[textAreaName]; + } + + MailManager.mail_reply_rteinstance.setData(data, function(){ + }); + MailManager.mail_reply_rteinstance.focus(); + }, + + /* Close reply UI */ + mail_reply_close: function(){ + jQuery('#_replydiv_').hide(); + if(jQuery('#mm_selected_folder').val()=='mm_settings'){ + MailManager.open_settings(); + } + else{ + var contentDiv2 = jQuery('#_contentdiv2_').html(); + if (contentDiv2 == '') { + jQuery('#_contentdiv_').show(); + } else { + jQuery('#_contentdiv2_').show(); + } + + + // Updated to highlight selected folder + var currentSelectedFolder = jQuery('#mailbox_folder').val(); + MailManager.updateSelectedFolder(currentSelectedFolder); + jQuery('#mm_selected_folder').val(currentSelectedFolder); + } + }, + + /* Forward email */ + mail_forward: function(messageId){ + + // Update the seleted folders to highlight them. + MailManager.updateSelectedFolder('mm_compose'); + jQuery('#mm_selected_folder').val('mm_compose'); + + var from = jQuery('#_mailopen_from').html(); + var to = jQuery('#_mailopen_to').html(); + var cc = jQuery('#_mailopen_cc') ? jQuery('#_mailopen_cc').html() : ''; + var subject = jQuery('#_mailopen_subject').html(); + var body = jQuery('#_mailopen_body').html(); + var date = jQuery('#_mailopen_date').html(); + + MailManager.close_all(); + jQuery('#_replydiv_').show(); + + var replyfrm = $('_mail_replyfrm_'); + + var fwdMsgMetaInfo = MailManager.i18n('JSLBL_FROM') + from + '
    '+MailManager.i18n('JSLBL_DATE') + date + '
    '+MailManager.i18n('JSLBL_SUBJECT') + subject; + if (to != '' && to != null) + fwdMsgMetaInfo += '
    '+MailManager.i18n('JSLBL_TO') + to; + if (cc != '' && cc != null) + fwdMsgMetaInfo += '
    '+MailManager.i18n('JSLBL_CC') + cc; + fwdMsgMetaInfo += '
    '; + + replyfrm.to.value = ''; + replyfrm.cc.value = ''; + replyfrm.bcc.value = ''; + replyfrm.subject.value = (subject.toUpperCase().indexOf('FWD:') == 0) ? subject : 'Fwd: ' + subject; + replyfrm.body.value = MailManager.sprintf('

    %s
    %s

    %s', MailManager.i18n('JSLBL_FORWARD_MESSAGE_TEXT'), fwdMsgMetaInfo, body); + + replyfrm.emailid.value = ''; + replyfrm.attachmentCount.value = ''; + MailManager.mail_reply_rteinit(replyfrm.body.value); + MailManager.createUploader(); + + var folder = jQuery('input[name=_folder]').val(); + + var attachmentCount = jQuery("#_mail_attachmentcount_").val(); + if(attachmentCount) { + VtigerJS_DialogBox.block(); + new Ajax.Request('index.php', { + method: 'post', + postBody: MailManager._baseurl() + "_operation=mail&_operationarg=forward&messageid=" + + encodeURIComponent(messageId) +"&folder=" + encodeURIComponent(folder) +"&subject=" + encodeURIComponent(replyfrm.subject.value), + onComplete: function(transport){ + var response = MailManager.removeHidElement(transport.responseText); + var responseJSON = JSON.parse(response); + if (responseJSON['success']) { + jQuery("#emailid").val(responseJSON['result']['emailid']) + var attachments = responseJSON['result']['attachments']; + if(attachments != '' && attachments != null) { //If attachments are present + for(i=0; i', '>') : ''); + + if(!MailManager.validateEmailFields(form.to.value, form.cc.value, form.bcc.value)) { + return false; + } + + if (form.to.value == '') { + MailManager.show_error(MailManager.i18n('JSLBL_Recepient_Cannot_Be_Empty')); + return false; + } + if (form.subject.value == '' && !confirm(MailManager.i18n('JSLBL_SendWith_EmptySubject'))) { + return false; + } + var bodyval = $('_mail_replyfrm_body_').value.trim(); + if (bodyval == '
    ' && !confirm(MailManager.i18n('JSLBL_SendWith_EmptyText'))) { + return false; + } + if (bodyval == '' && !confirm(MailManager.i18n('JSLBL_SendWith_EmptyText'))) { + return false; + } + MailManager.progress_show(MailManager.i18n('JSLBL_Sending'), ' ...'); + + var params = { + '_operation':'mail', '_operationarg':'send', + '_msgid':msguid, + 'to':encodeURIComponent(form.to.value), + 'cc':encodeURIComponent(form.cc.value), + 'bcc':encodeURIComponent(form.bcc.value), + 'subject':encodeURIComponent(form.subject.value), + 'body':encodeURIComponent(form.body.value), + 'linkto':encodeURIComponent(form.linkto.value), + 'emailid':encodeURIComponent(form.emailid.value) + }; + var baseurl = MailManager._baseurl(); + MailManager.Request('index.php?'+baseurl, params, function(transport) { + MailManager.progress_hide(); + var response = MailManager.removeHidElement(transport.responseText); + var responseJSON = JSON.parse(response); + if (responseJSON['success']) { + MailManager.mail_reply_close(); + MailManager.show_message(MailManager.i18n('JSLBL_MAIL_SENT')); + +// var currentSelectedFolder = jQuery('#mm_selected_folder').val(); +// MailManager.updateSelectedFolder(currentSelectedFolder); +// jQuery('#mm_selected_folder').val(currentSelectedFolder); + } else { + MailManager.show_error(MailManager.i18n('JSLBL_Failed_To_Send_Mail') + + ': ' + responseJSON['error']['message']); + } + }); + }, + + /* Send reply to email */ + save_draft: function(form){ + if (MailManager.mail_reply_rteinstance) { + MailManager.mail_reply_rteinstance.updateElement(); + } + + if(!MailManager.validateEmailFields(form.to.value, form.cc.value, form.bcc.value)) { + return false; + } + + if (form.subject.value == '' ) { + if(!confirm(MailManager.i18n('JSLBL_SaveWith_EmptySubject'))) { + return false; + } + } + + MailManager.progress_show(MailManager.i18n('JSLBL_Saving'), ' ...'); + var params = { + '_operation':'mail', '_operationarg':'save', + 'emailid':encodeURIComponent(form.emailid.value), + 'to':encodeURIComponent(form.to.value), + 'cc':encodeURIComponent(form.cc.value), + 'bcc':encodeURIComponent(form.bcc.value), + 'subject':encodeURIComponent(form.subject.value), + 'body':encodeURIComponent(form.body.value), + 'linkto':encodeURIComponent(form.linkto.value), + 'currentid':encodeURIComponent(form.emailid.value) + }; + var baseurl = MailManager._baseurl(); + MailManager.Request('index.php?'+baseurl, params, function(transport) { + MailManager.progress_hide(); + var response = MailManager.removeHidElement(transport.responseText); + var responseJSON = JSON.parse(response); + + if (responseJSON['success']) { + MailManager.show_message(MailManager.i18n('JSLBL_DRAFT_MAIL_SAVED')); + } else { + MailManager.show_error(MailManager.i18n('JSLBL_Failed_To_Save_Mail')); + } + }); + }, + + folder_drafts: function(page){ + MailManager.progress_show(MailManager.i18n('JSLBL_Loading'), ' ' +MailManager.i18n('JSLBL_Drafts') + '...'); + var params = { + '_operation':'folder', + '_operationarg':'drafts', + '_page':encodeURIComponent(page) + }; + var baseurl = MailManager._baseurl(); + MailManager.Request('index.php?'+baseurl, params, function(transport) { + MailManager.progress_hide(); + MailManager.mail_close(); + var response = MailManager.removeHidElement(transport.responseText); + jQuery('#_contentdiv_').html(response); + // Initialize upload + MailManager.createUploader(); + + MailManager.bindEnterKeyForSearch(); + + // Update the selected folder to highlight selected folder + MailManager.updateSelectedFolder('mm_drafts'); + jQuery('#mm_selected_folder').val('mm_drafts'); + jQuery('#mailbox_folder').val('mm_drafts'); + }); + }, + + search_popupui: function(target, handle){ + MailManager.progress_show(MailManager.i18n('JSLBL_Loading'), ' ...'); + + var params = { + '_operation':'search', + '_operationarg':'popupui' + }; + var baseurl = MailManager._baseurl(); + MailManager.Request('index.php?'+baseurl, params, function(transport) { + MailManager.progress_hide(); + var response = MailManager.removeHidElement(transport.responseText); + jQuery('#_popupsearch_').html(response); + MailManager.placeAtCenter(jQuery('#_popupsearch_')); + jQuery('#_popupsearch_').show().draggable(); + MailManager.search_popup_init(target); + }); + }, + + search_popup_init: function(target){ + var url = 'index.php?' + MailManager._baseurl() + "_operation=search&_operationarg=email&"; + + if (jQuery('#_search_popupui_target_')) { + jQuery('#_search_popupui_target_').val(target); + } + + var elem = jQuery('#_search_popupui_input_'); + if (elem) { + if (elem.attr('_tokeninput_init_')) + return; + elem.tokenInput(url, { + hintText: MailManager.i18n('JSLBL_Search_For_Email') + '...', + noResultsText: MailManager.i18n('JSLBL_Nothing_Found'), + searchingText: MailManager.i18n('JSLBL_Searching_Please_Wait') + '...', + minChars : 3, + classes: { + tokenList: "token-input-list-facebook", + token: "token-input-token-facebook", + tokenDelete: "token-input-delete-token-facebook", + selectedToken: "token-input-selected-token-facebook", + highlightedToken: "token-input-highlighted-token-facebook", + dropdown: "token-input-dropdown-facebook", + dropdownItem: "token-input-dropdown-item-facebook", + dropdownItem2: "token-input-dropdown-item2-facebook", + selectedDropdownItem: "token-input-selected-dropdown-item-facebook", + inputToken: "token-input-input-token-facebook" + } + }); + elem.attr('_tokeninput_init_', true); + } + }, + + search_consume_input: function(form){ + var inputstr = form._search_popupui_input_.value; + var target = form._search_popupui_target_.value; + + // Based on target perform the operation + var targetnode = $(target); + if (targetnode) { + if (targetnode.value.length > 0 && targetnode.value.substr(-1) != ',') { + inputstr = ',' + inputstr; + } + targetnode.value += inputstr; + } + MailManager.popup_close(); + }, + + popup_close: function(){ + jQuery('#_popupsearch_').html(''); + jQuery('#_popupsearch_').hide(); + }, + + clear_input: function(id){ + if (jQuery("#"+id)) + jQuery("#"+id).val(''); + }, + + removeHidElement: function(jsonresponse){ + // PHPSESSID is General value + // Session Name should be picked from php.ini + var replaceJsonTxt = jsonresponse.replace('/]?/', ''); + return replaceJsonTxt; + }, + + massMailDelete: function(folder){ + var cb_elements = jQuery('[name="mc_box"]'); + var temp = new Array(); + var len = jQuery('[name="mc_box"]').length; + for (var i = 0; i < len; i++) { + if (cb_elements[i].checked) { + temp.push(cb_elements[i].value); + } + } + if (temp.length == 0) { + MailManager.show_error(MailManager.i18n('JSLBL_NO_EMAILS_SELECTED')); + } else { + MailManager.maildelete(folder, temp, true); + } + }, + + maildelete: function(foldername, msgno, reloadfolder){ + if (!confirm(MailManager.i18n('JSLBL_Delete_Confirm'))) return; + + MailManager.progress_show(MailManager.i18n('JSLBL_Deleting'), ' ...'); + var params = { + '_operation':'mail', + '_operationarg':'delete', + '_folder':encodeURIComponent(foldername), + '_msgno':encodeURIComponent(msgno) + }; + var baseurl = MailManager._baseurl(); + MailManager.Request('index.php?'+baseurl, params, function() { + for(var i = 0;i\n\ + "+fileSize+"\n\ + Failed"; + element = jQuery(window.opener.document).find('.qq-upload-list'); + jQuery(element[0]).append(attachContent); + window.close(); + return false; + } + + attachContent = "
  • "+res['name']+"\n\ + "+fileSize+"\n\ + \n\ +
  • "; + + try + { + element = jQuery(window.opener.document).find('.qq-upload-list'); + + if(element[0]) { + jQuery(element[0]).append(attachContent); + } else { + element = jQuery.find('.qq-upload-list'); + jQuery(element[0]).append(attachContent); + } + window.close(); + } catch(e) { + element = jQuery.find('.qq-upload-list'); + jQuery(element[0]).append(attachContent); + } + // Update the attachment counter + MailManager.uploadCountUpdater(); + + }, + + + computeDisplayableFileSize : function(size) { + var fileSize; + if(size <= 1024) { + fileSize = size+"b"; + } else if(size > 1024 && size < 1048576) { + fileSize = (Math.round(size/1024))+"kB"; + } else if(size > (1024*1024)) { + fileSize = (Math.round(size/(1024*1024)))+"MB"; + } else { + fileSize = size; + } + return fileSize; + }, + + validateEmailFields : function(to, cc, bcc) { + if(to != "") { + if(!MailManager.mail_validate(to)) { + return false; + } + } + if(cc != "") { + if(!MailManager.mail_validate(cc)) { + return false; + } + } + if(bcc != "") { + if(!MailManager.mail_validate(bcc)) { + return false; + } + } + return true; + }, + + mail_validate : function(str) { + var email_regex = /^[a-zA-Z0-9]+([\_\-\.]*[a-zA-Z0-9]+[\_\-]?)*@[a-zA-Z0-9]+([\_\-]?[a-zA-Z0-9]+)*\.+([\_\-]?[a-zA-Z0-9])+(\.?[a-zA-Z0-9]+)*$/; + arr = new Array(); + arr = str.split(","); + var tmp; + for(var i=0; i<=arr.length-1; i++) { + tmp = arr[i]; + if(tmp.match('<') && tmp.match('>')) { + if(!MailManager.findAngleBracket(arr[i])) { + var errorMsg = MailManager.i18n("JSLBL_EMAIL_FORMAT_INCORRECT"); + MailManager.show_error(errorMsg+": "+arr[i]); + return false; + } + } else if(trim(arr[i]) != "" && !(email_regex.test(trim(arr[i])))) { + var errorMsg2 = MailManager.i18n("JSLBL_EMAIL_FORMAT_INCORRECT"); + MailManager.show_error(errorMsg2+": "+arr[i]); + return false; + } + } + return true; + }, + + findAngleBracket : function (mailadd) { + var strlen = mailadd.length; + var gt = 0; + var lt = 0; + var ret = ''; + for(i=0 ;i' && lt == 1) { + gt = 1; + } + if(mailadd.charAt(i) != '<' && lt == 1 && gt == 0) { + ret = ret + mailadd.charAt(i); + } + } + if(/^[a-z0-9]([a-z0-9_\-\.]*)@([a-z0-9_\-\.]*)(\.[a-z]{2,3}(\.[a-z]{2}){0,2})$/.test(ret)){ + return true; + } else { + return false; + } + }, + + uploadCountUpdater : function() { + var countElement; + if(jQuery('#attachmentCount').length) { + countElement = jQuery('#attachmentCount'); + } else { + countElement = jQuery(window.opener.document).find('#attachmentCount'); + } + var MailManagerCurrentUploadCount = countElement.val(); + if(MailManagerCurrentUploadCount == null || MailManagerCurrentUploadCount == "") { + MailManagerCurrentUploadCount = 0; + } + countElement.val(++MailManagerCurrentUploadCount); + }, + + checkUploadCount : function() { + var MailManagerCurrentUploadCount = jQuery("#attachmentCount").val(); + if(MailManagerCurrentUploadCount >= MailManager.MailManagerUploadLimit) { + MailManager.show_error(MailManager.i18n('JSLBL_FILEUPLOAD_LIMIT_EXCEEDED')); + return false; + } + return true; + }, + + + AjaxDuplicateValidate : function (module, fieldname, form) { + var deferred = jQuery.Deferred(); + + function execute() { + var fieldvalue = encodeURIComponent(trim(getObj(fieldname).value)); + var recordid = getObj('record').value; + + function validate() { + if(fieldvalue == '') { + MailManager.show_error(MailManager.i18n('JSLBL_ACCOUNTNAME_CANNOT_EMPTY')); + deffered.reject(form); + return false; + } + return true; + } + + function requestOnComplete(response) { + var str = response.responseText; + VtigerJS_DialogBox.unblock(); + if(str.indexOf('SUCCESS') > -1) { + deferred.resolve(form); + } else { + alert(str); + deferred.reject(form); + } + } + + if(validate()) { + VtigerJS_DialogBox.block(); + var params = { + 'module':encodeURIComponent(module), + 'action':encodeURIComponent(module)+"Ajax", + 'file':'Save', + 'dup_check':true, + 'record':encodeURIComponent(recordid) + }; + params[fieldname] = encodeURIComponent(fieldvalue); + MailManager.Request('index.php?', params, requestOnComplete); + VtigerJS_DialogBox.unblock(); + } + } + // Trigger the function call + execute(); + return deferred.promise(); + }, + + Request : function(url, params, callback) { + //var encodedParams = MailManager.getEncodedParameterString(params); + return jQuery.ajax( { + url : url, + type : 'POST', + data : params, + complete : function(response) { + callback(response); + } + }); + }, + + getEncodedParameterString : function (paramObject){ + var encodedParams = new Array(); + for(key in paramObject) { + encodedParams.push(key+'='+ paramObject[key]); + } + encodedParams = encodedParams.join('&'); + return encodedParams; + }, + + clearSearchString : function() { + jQuery('#search_txt').val(""); + jQuery('#search_type').val(""); + }, + + resetLinkToDropDown : function() { + jQuery('#_mlinktotype').val(""); + }, + + resetFolderDropDown : function() { + jQuery('#moveFolderList').val("") + }, + + toggleSelect : function(state, relCheckName) { + var elements = jQuery('[name='+relCheckName+']'); + for(i=0; ipquery("INSERT INTO vtiger_mailmanager_mailrel (mailuid, emailid, crmid) VALUES (?,?,?)", array($mailuid, $emailid, $crmid)); + } + + static function lookupMailInVtiger($searchTerm, $user) { + $handler = vtws_getModuleHandlerFromName('Emails', $user); + $meta = $handler->getMeta(); + $moduleFields = $meta->getModuleFields(); + $parentIdFieldInstance = $moduleFields['parent_id']; + $referenceModules = $parentIdFieldInstance->getReferenceList(); + + $filteredResult = array(); + foreach($referenceModules as $referenceModule) { + $referenceModuleHandler = vtws_getModuleHandlerFromName($referenceModule, $user); + $referenceModuleMeta = $referenceModuleHandler->getMeta(); + $referenceModuleEmailFields = $referenceModuleMeta->getEmailFields(); + $referenceModuleEntityFields = $referenceModuleMeta->getNameFields(); + $referenceModuleEntityFieldsArray = explode(',', $referenceModuleEntityFields); + $searchFieldList = array_merge($referenceModuleEmailFields, $referenceModuleEntityFieldsArray); + if(!empty($searchFieldList) && !empty($referenceModuleEmailFields)) { + $searchFieldListString = implode(',', $referenceModuleEmailFields); + $where = null; + for($i=0; $i $record[$searchField], 'name'=>$record[$searchField]." - ".getTranslatedString($referenceModule), + 'record'=>$record['id']); + } + } + } + } + } + return $filteredResult; + } + + static function lookupMailAssociation($mailuid) { + global $adb; + + // Mail could get associated with two-or-more records if they get deleted after linking. + $result = $adb->pquery( + "SELECT vtiger_mailmanager_mailrel.* FROM vtiger_mailmanager_mailrel INNER JOIN + vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_mailmanager_mailrel.crmid AND vtiger_crmentity.deleted=0 + AND vtiger_mailmanager_mailrel.mailuid=? LIMIT 1", array(decode_html($mailuid))); + if ($adb->num_rows($result)) { + $resultrow = $adb->fetch_array($result); + return $resultrow; + } + return false; + } + + static function lookupVTEMailAssociation($emailId) { + global $adb; + $result = $adb->pquery( + "SELECT vtiger_mailmanager_mailrel.* FROM vtiger_mailmanager_mailrel INNER JOIN + vtiger_crmentity ON vtiger_crmentity.crmid=vtiger_mailmanager_mailrel.crmid AND vtiger_crmentity.deleted=0 + AND vtiger_mailmanager_mailrel.mailuid=? LIMIT 1", array(decode_html($mailuid))); + if ($adb->num_rows($result)) { + $resultrow = $adb->fetch_array($result); + return $resultrow; + } + return false; + } + + static function checkModuleWriteAccessForCurrentUser($module) { + global $current_user; + if (isPermitted($module, 'EditView') == "yes" && vtlib_isModuleActive($module)) { + return true; + } + return false; + } + + /** + * function to check the read access for the current user + * @global Users Instance $current_user + * @param String $module - Name of the module + * @return Boolean + */ + static function checkModuleReadAccessForCurrentUser($module) { + global $current_user; + if (isPermitted($module, 'DetailView') == "yes" && vtlib_isModuleActive($module)) { + return true; + } + return false; + } + + /** + * Invoked when special actions are performed on the module. + * @param String $modulename - Module name + * @param String $event_type - Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall) + */ + function vtlib_handler($modulename, $event_type) { + if($event_type == 'module.postinstall') { + // TODO Handle actions when this module is installed. + } else if($event_type == 'module.disabled') { + // TODO Handle actions when this module is disabled. + } else if($event_type == 'module.enabled') { + // TODO Handle actions when this module is enabled. + } else if($event_type == 'module.preuninstall') { + // TODO Handle actions when this module is about to be deleted. + } else if($event_type == 'module.preupdate') { + // TODO Handle actions before this module is updated. + } else if($event_type == 'module.postupdate') { + // TODO Handle actions when this module is updated. + } + } +} + +?> diff --git a/modules/MailManager/MailManagerAjax.php b/modules/MailManager/MailManagerAjax.php new file mode 100644 index 0000000..58734fa --- /dev/null +++ b/modules/MailManager/MailManagerAjax.php @@ -0,0 +1,11 @@ + diff --git a/modules/MailManager/MailManagerHandler.php b/modules/MailManager/MailManagerHandler.php new file mode 100644 index 0000000..e181e49 --- /dev/null +++ b/modules/MailManager/MailManagerHandler.php @@ -0,0 +1,24 @@ + diff --git a/modules/MailManager/MailManagerUploadFile.js b/modules/MailManager/MailManagerUploadFile.js new file mode 100644 index 0000000..017fa4b --- /dev/null +++ b/modules/MailManager/MailManagerUploadFile.js @@ -0,0 +1,197 @@ +/*+********************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.1 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ************************************************************************************/ + +//extend the file upload xhr class +qq.extend(qq.UploadHandlerXhr.prototype, { + _upload: function(id, params){ + if(!MailManager.checkUploadCount()) { + return false; + } + var file = this._files[id], + name = this.getName(id), + size = this.getSize(id); + + this._loaded[id] = 0; + + var xhr = this._xhrs[id] = new XMLHttpRequest(); + var self = this; + + xhr.upload.onprogress = function(e){ + if (e.lengthComputable){ + self._loaded[id] = e.loaded; + self._options.onProgress(id, name, e.loaded, e.total); + } + }; + + xhr.onreadystatechange = function(){ + if (xhr.readyState == 4){ + self._onComplete(id, xhr); + } + }; + + params['emailid'] = params['currentid'] = jQuery('#emailid').val(); + params['to'] = jQuery('#_mail_replyfrm_to_').val(); + params['cc'] = jQuery('#_mail_replyfrm_cc_').val(); + params['bcc'] = jQuery('#_mail_replyfrm_bcc_').val(); + params['subject'] = jQuery('#_mail_replyfrm_subject_').val(); + + var body = CKEDITOR.instances['_mail_replyfrm_body_']; + if(body != undefined) { + params['body'] = body.getData(); + } + + // build query string + params = params || {}; + params['qqfile'] = name; + var queryString = qq.obj2url(params, this._options.action); + xhr.open("POST", queryString, true); + xhr.setRequestHeader("X-Requested-With", "XMLHttpRequest"); + xhr.setRequestHeader("X-File-Name", encodeURIComponent(name)); + xhr.setRequestHeader("Content-Type", "application/octet-stream"); + xhr.send(file); + }, + + _onComplete: function(id, xhr){ + // the request was aborted/cancelled + if (!this._files[id]) return; + + var name = this.getName(id); + var size = this.getSize(id); + + this._options.onProgress(id, name, size, size); + + if (xhr.status == 200){ + var response; + try { + response = eval("(" + xhr.responseText + ")"); + this._postcompletActions(id, name, response); + } catch(err){ + response = {}; + } + this._options.onComplete(id, name, response); + + } else { + this._options.onComplete(id, name, {}); + } + + this._files[id] = null; + this._xhrs[id] = null; + this._dequeue(id); + }, + + _postcompletActions : function(id, name, response) { + if(response.success == true) { + if(response.result.success == true) { + if(response.result.emailid != "") { + jQuery('#emailid').val(response.result.emailid); + } + } + } + } +}); + +// extending the file uploading class +qq.extend(qq.FileUploader.prototype, { + _onSubmit: function(id, fileName){ + qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments); + this._addToList(id, fileName); + }, + + _onComplete: function(id, fileName, response){ + qq.FileUploaderBasic.prototype._onComplete.apply(this, arguments); + + // mark completed + var item = this._getItemByFileId(id); + qq.remove(this._find(item, 'cancel')); + qq.remove(this._find(item, 'spinner')); + + if (!response.result.error){ + qq.addClass(item, this._classes.success); + + var fileElementDelete = this._find(item, 'deleteupload'); + fileElementDelete.style.display = 'inline'; + jQuery(fileElementDelete).html("") + this._attachDeleteHandler(response.result.emailid, response.result.docid, fileElementDelete); + MailManager.uploadCountUpdater(); + } else { + qq.addClass(item, this._classes.fail); + if(response.result.emailid != "") jQuery("#emailid").val(response.result.emailid); + MailManager.show_error(response.result.error); + MailManager.hide_error(); + } + }, + + _addToList: function(id, fileName){ + if(!MailManager.checkUploadCount()) { + return false; + } + var item = qq.toElement(this._options.fileTemplate); + item.qqFileId = id; + var fileElement = this._find(item, 'file'); + qq.setText(fileElement, this._formatFileName(fileName)); + + this._find(item, 'deleteupload').style.display = 'none'; + this._listElement.appendChild(item); + }, + + _attachDeleteHandler: function(emailId, docId, element) { + jQuery(element).bind('click', function() { + MailManager.deleteAttachment(emailId, docId, element); + }); + } +}); + +qq.extend(qq.UploadHandlerForm.prototype, { + _upload: function(id, params){ + var input = this._inputs[id]; + + if (!input){ + throw new Error('file with passed id was not added, or already uploaded or cancelled'); + } + + var fileName = this.getName(id); + + var iframe = this._createIframe(id); + + params['emailid'] = params['currentid'] = jQuery('#emailid').val(); + params['to'] = jQuery('#_mail_replyfrm_to_').val(); + params['cc'] = jQuery('#_mail_replyfrm_cc_').val(); + params['bcc'] = jQuery('#_mail_replyfrm_bcc_').val(); + params['subject'] = jQuery('#_mail_replyfrm_subject_').val(); + + var body = CKEDITOR.instances['_mail_replyfrm_body_']; + if(body != undefined) { + params['body'] = body.getData(); + } + + var form = this._createForm(iframe, params); + form.appendChild(input); + var self = this; + + this._attachLoadEvent(iframe, function(){ + var response = self._getIframeContentJSON(iframe); + + if(response.result != "" && response.result.emailid != "") { + jQuery('#emailid').val(response.result.emailid); + } + + self._options.onComplete(id, fileName, response); + self._dequeue(id); + + delete self._inputs[id]; + // timeout added to fix busy state in FF3.6 + setTimeout(function(){ + qq.remove(iframe); + }, 1); + }); + form.submit(); + qq.remove(form); + return id; + } +}); \ No newline at end of file diff --git a/modules/MailManager/Popup.php b/modules/MailManager/Popup.php new file mode 100644 index 0000000..004772c --- /dev/null +++ b/modules/MailManager/Popup.php @@ -0,0 +1,17 @@ +$val) { + foreach ($val as $i=>$v){ + $_FILES[$i]=$val[$i]; + } + } + foreach($_FILES as $key=>$details) { + $isFile = is_uploaded_file($_FILES[$key]['tmp_name']); + $target = "test/".basename($_FILES[$key]['name']) ; + if($isFile && $_FILES[$key]['error']!= 4){ + echo ''; + } + } + //echo serialize($_FILES); +?> \ No newline at end of file diff --git a/modules/MailManager/PopupMailManagerTemplate.php b/modules/MailManager/PopupMailManagerTemplate.php new file mode 100644 index 0000000..dbd6a3f --- /dev/null +++ b/modules/MailManager/PopupMailManagerTemplate.php @@ -0,0 +1,82 @@ + + + + + + <?php echo $mod_strings['LBL_EMAIL_TEMPLATES_LIST']; ?> + + + +
    +
    +
    + + + + + + + +pquery($sql, array()); + $temprow = $adb->fetch_array($result); + $subject_html_id = $_REQUEST['subject_id'].''; + $body_html_id = $_REQUEST['body_id'].''; + +$cnt=1; + +require_once('include/utils/UserInfoUtil.php'); +require('user_privileges/user_privileges_'.$current_user->id.'.php'); +do +{ + $templatename = $temprow["templatename"]; + if($is_admin == false) + { + $folderName = $temprow['foldername']; + if($folderName != 'Personal') + { + printf(""; + printf("",$temprow["description"]); + } + } + else + { + printf(""; + //echo "'.$temprow["templatename"].""; + echo "".$temprow["templatename"].""; + printf("",$temprow["description"]); + } + $cnt++; + +}while($temprow = $adb->fetch_array($result)); +?> +
    "); + echo "".$temprow["templatename"]."%s
    "); +// echo "'".$temprow["templatename"]."%s
    + + + diff --git a/modules/MailManager/TemplateMergeMailManager.php b/modules/MailManager/TemplateMergeMailManager.php new file mode 100644 index 0000000..7b9349d --- /dev/null +++ b/modules/MailManager/TemplateMergeMailManager.php @@ -0,0 +1,33 @@ + + + + +
    + \ No newline at end of file diff --git a/modules/MailManager/config.inc.php b/modules/MailManager/config.inc.php new file mode 100644 index 0000000..9ccc040 --- /dev/null +++ b/modules/MailManager/config.inc.php @@ -0,0 +1,42 @@ + 5242880, + + // Max Download Limit in Bytes, as the files are encoded the file size increases + // so the limit is set to close to 7MB + 'MAXDOWNLOADLIMIT'=>7000000, + + // Increase the memory_limit for larger attachments + 'MEMORY_LIMIT' => '256M' +); + + +/** + * Manages Mail Manager configurations + */ +class ConfigPrefs { + + /** + * Get configuration parameter configured value or default one + */ + static function get($key, $defvalue=false) { + global $MAILMANAGER_CONFIG; + if(isset($MAILMANAGER_CONFIG)){ + if(isset($MAILMANAGER_CONFIG[$key])) { + return $MAILMANAGER_CONFIG[$key]; + } + } + return $defvalue; + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/index.php b/modules/MailManager/index.php new file mode 100644 index 0000000..882901a --- /dev/null +++ b/modules/MailManager/index.php @@ -0,0 +1,61 @@ + array( 'file' => 'src/controllers/MainUIController.php', 'class' => 'MailManager_MainUIController' ), + 'folder' => array( 'file' => 'src/controllers/FolderController.php', 'class' => 'MailManager_FolderController' ), + 'mail' => array( 'file' => 'src/controllers/MailController.php', 'class' => 'MailManager_MailController' ), + 'relation'=>array( 'file' => 'src/controllers/RelationController.php','class'=> 'MailManager_RelationController'), + 'settings'=>array( 'file' => 'src/controllers/SettingsController.php','class'=> 'MailManager_SettingsController'), + 'search' =>array( 'file' => 'src/controllers/SearchController.php','class'=> 'MailManager_SearchController'), + ); + + function process(MailManager_Request $request) { + + if (!$request->has('_operation')) { + return $this->processRoot($request); + } + $operation = $request->getOperation(); + $controllerInfo = self::$controllers[$operation]; + + + // TODO Handle case when controller information is not available + $controllerFile = dirname(__FILE__) . '/' . $controllerInfo['file']; + checkFileAccessForInclusion($controllerFile); + include_once $controllerFile; + $controller = new $controllerInfo['class']; + + // Making sure to close the open connection + if ($controller) $controller->closeConnector(); + $response = $controller->process($request); + if ($response) $response->emit(); + + unset($request); + unset($response); + } + + function processRoot(MailManager_Request $request) { + global $currentModule; + $viewer = $this->getViewer(); + $viewer->display( $this->getModuleTpl('index.tpl') ); + return true; + } +} + +$controller = new MailManager_IndexController(); +$controller->process(new MailManager_Request($_REQUEST)); + +?> diff --git a/modules/MailManager/language/de_de.lang.php b/modules/MailManager/language/de_de.lang.php new file mode 100644 index 0000000..b55f329 --- /dev/null +++ b/modules/MailManager/language/de_de.lang.php @@ -0,0 +1,166 @@ + 'E-Mail Manager', + + // Translations for JS (please use the prefix JSLBL in key) + 'JSLBL_Loading_Please_Wait' => 'Bitte warten, Daten werden geladen', + 'JSLBL_Loading' => 'Laden', + 'JSLBL_Settings' => 'Einstellungen', + 'JSLBL_Opening' => 'Öffnen', + 'JSLBL_Deleting' => 'Löschen', + 'JSLBL_Updating' => 'Aktualisieren', + 'JSLBL_Associating' => 'Zuordnen', + 'JSLBL_Saving_And_Verifying' => 'Speichern & überprüfen', + 'JSLBL_Failed_To_Open_Mail' => 'Öffnen der E-Mail ist fehlgeschlagen', + 'JSLBL_Finding_Relation' => 'Beziehung finden', + 'JSLBL_Find_Relation_Now' => 'Beziehung jetzt finden', + 'JSLBL_Searching' => 'Suchen', + 'JSLBL_Searching_Please_Wait'=> 'Bitte warten, die Suche läuft', + 'JSLBL_Sending' => 'Senden', + 'JSLBL_Replied' => 'Beantwortet', + 'JSLBL_Failed_To_Send_Mail' => 'Senden der E-Mail ist fehlgeschlagen', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Empfäner darf nicht leer sein', + 'JSLBL_SendWith_EmptySubject' => 'Möchten Sie diese E-Mail ohne Betreff senden?', + 'JSLBL_Removing' => 'Entfernen', + 'JSLBL_Choose_Server_Type' => 'Servertyp auswählen', + 'JSLBL_Other' => 'Anderer', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'Suche nach E-Mail', + 'JSLBL_Nothing_Found' => 'Nichts gefunden', + 'JSLBL_Delete_Confirm' =>'Wollen Sie diese E-Mails dauerhaft löschen?', + 'JSLBL_Delete_Mails_Confirm' =>'Wollen Sie diese E-Mails löschen', + 'JSLBL_Receipents_Warning_Message'=>'Bitte wählen Sie Empfänger aus', + 'JSLBL_NO_MATCH' => 'Keine Ergebnisse gefunden', + 'JSLBL_Saving' => 'Speichern', + 'JSLBL_Failed_To_Save_Mail' => 'Speichern der E-Mail ist fehlgeschlagen', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'Der Anhang konnte nicht entfernt werden', + 'JSLBL_UPLOAD_CANCEL' => 'Abbruch', + 'JSLBL_UPLOAD_DROPFILES'=>'Dateien für den Upload bitte hier ablegen', + 'JSLBL_UPLOAD_FILE'=>'Upload', + 'JSLBL_UPLOAD_DELETE'=>'[x]', + 'JSLBL_UPLOAD_FAILED'=>'Fehlgeschlagen', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED'=>'Datei-Upload-Limit überschritten!!', + 'JSLBL_MAIL_SENT'=>'Mail wurde verschickt', + 'JSLBL_EMAIL_FORMAT_INCORRECT'=>'Bitte geben Sie eine richtige E-Mail-Adresse ein', + 'JSLBL_Saving'=>'Speichern', + 'JSLBL_SaveWith_EmptySubject'=>'Möchten Sie diese Mail ohne Betreff speichern?', + 'JSLBL_Delete' => 'Löschen', + 'JSLBL_Drafts'=>'Entwürfe', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY'=>'Passwort darf nicht leer sein', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY'=>'Server-Name darf nicht leer sein', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY'=>'Benutzername darf nicht leer sein', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY'=>'Konto-Name darf nicht leer sein', + 'JSLBL_FROM'=>'Von:', + 'JSLBL_DATE'=>'Datum: ', + 'JSLBL_SUBJECT'=>'Betreff: ', + 'JSLBL_TO'=>'An: ', + 'JSLBL_CC'=>'Cc: ', + 'JSLBL_FORWARD_MESSAGE_TEXT'=>'---------- Forwarded message ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL'=>'Bitte wählen Sie mindestens eine E-Mail aus', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD'=>'Bitte wählen Sie mindestens eine Aufzeichnung aus', + 'JSLBL_MAIL_MOVED'=>'E-Mails(s) verschoben', + 'JSLBL_MOVING'=>'Verschiebe E-Mail(s)', + 'JSLBL_LOADING_FOLDERS' => 'Ordner laden..', + 'JSLBL_ADD_COMMENT'=>'Kommentar hinzufügen', + 'JSLBL_Yahoo'=>'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Kommentar darf nicht leer sein', + 'JSLBL_NO_EMAILS_SELECTED' => 'Keine E-Mails ausgewählt.', + 'JSLBL_ENTER_SOME_VALUE' => 'Bitte geben Sie einen Suchbegriff ein', + 'JSLBL_DRAFT_MAIL_SAVED'=>'Ihre E-Mail wurde in den Entwürfen gespeichert', + + // General translations + 'LBL_Folders' => 'Ordner', + 'LBL_Newer' => 'Neuer', + 'LBL_Older' => 'älter', + 'LBL_No_Mails_Found' => 'Keine E-Mails gefunden.', + 'LBL_Go_Back' => 'Zurück', + 'LBL_Reply_All' => 'Allen antworten', + 'LBL_Reply' => 'Antworten', + 'LBL_Mark_As_Unread' => 'Als ungelesen markieren', + 'LBL_Previous' => 'vorheriges', + 'LBL_Next' => 'nächstes', + 'LBL_RELATED_RECORDS' => 'bezogene Daten', + 'LBL_Mailbox' => 'Mailbox', + 'LBL_Outbox' => 'CRM Ausgang', + 'LBL_Like' => 'z. B. wie', + 'LBL_Mail_Server' => 'Name des E-Mail-Server oder IP-Adresse', + 'LBL_Refresh' => 'Aktualisieren', + 'LBL_Cancel' => 'Abbruch', + 'LBL_Send' => 'Senden', + 'LBL_Compose' => 'Schreiben', + 'LBL_Forward' => 'Weiterleiten', + 'LBL_Remove' => 'Entfernen', + 'LBL_Associate' => 'Verbinden', + 'LBL_Create_Contact' => 'Kontakt erstellen', + 'LBL_No_Matching_Record_Found' => 'Keine passenden Datensätze gefunden.', + 'LBL_ACTIONS' => 'Aktionen', + 'LBL_Search' => 'Suchen', + 'LBL_Delete' => 'Löschen', + + 'LBL_Username' => 'Benutzername', + 'LBL_Your_Mailbox_Account' => 'Name des E-Mail-Kontos', + 'LBL_Password' => 'Passwort', + 'LBL_Account_Password' => 'Passwort des E-Mail-Kontos', + 'LBL_Protocol' => 'Protokoll', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'SSL Einstellungen', + 'LBL_No_TLS' => 'kein TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Zertifikat überprüfungen', + 'LBL_Validate_Cert' => 'überprüfe Zertifikat', + 'LBL_Do_Not_Validate_Cert' => 'Zertifikat nicht überprüfen', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Kontotyp auswählen', + + 'LBL_FROM' => 'Von', + 'LBL_TO' => 'An', + 'LBL_CC' => 'CC', + 'LBL_BCC' => 'BCC', + 'LBL_Date' => 'Datum', + 'LBL_Attachments' => 'Anhänge', + 'LBL_EMAIL_TEMPLATES_LIST'=>'E-Mail-Vorlagen', + 'LBL_SELECT_EMAIL_TEMPLATE'=>'E-Mail-Vorlage auswählen', + 'LBL_ATTACHMENTS' =>'Anhang:', + 'LBL_SELECT_DOCUMENTS'=>'Dokumente auswählen', + 'LBL_IN' =>'in', + 'LBL_FIND'=>'Finden', + 'LBL_SAVE_NOW'=>'Sofort Speichern', + 'LBL_Drafts'=>'Entwürfe', + 'LBL_NO_EMAILS_SELECTED' => 'Keine E-Mails ausgewählt.', + 'LBL_SUBJECT' => 'Betreff', + 'LBL_WRITE_ACCESS_FOR' =>'Schreibzugriff für', + 'LBL_READ_ACCESS_FOR' =>'Lesezugriff für', + 'LBL_MODULE_DENIED' => 'Modul verweigert!', + 'LBL_REFRESH_TIME'=>'Zeit aktualisieren', + 'LBL_NONE' => 'nie', + 'LBL_5_MIN' => 'alle 5 Minuten', + 'LBL_10_MIN' => 'alle 10 Minuten', + 'LBL_MOVE_TO'=>'Verschieben nach...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Kontakt hinzufügen', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Konto hinzufügen', + 'LBL_MAILMANAGER_ADD_Leads' => 'Lead hinzufügen', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Aufgabe hinzufügen', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Ticket hinzufügen', + 'LBL_MAILMANAGER_ADD_Emails' => 'E-Mail anhängen', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Kommentar hinzufügen', + 'LBL_ADD' => 'Hinzufügen', + 'JSLBL_SendWith_EmptyText' => 'Wollen Sie wirklich eine leere Email versenden?', + 'LBL_ALLMAILS' => 'Alle Emails', + 'LBL_TO_CONTACTS' => 'zu Person', + 'LBL_TO_ACCOUNTS' => 'zu Organisation', + 'LBL_TO_LEADS' => 'zu Lead', + 'LBL_TO_USERS' => 'zu Benutzer', + 'LBL_SENT_MAILS' => 'Sende Emails' +); + +?> diff --git a/modules/MailManager/language/en_gb.lang.php b/modules/MailManager/language/en_gb.lang.php new file mode 100644 index 0000000..e787805 --- /dev/null +++ b/modules/MailManager/language/en_gb.lang.php @@ -0,0 +1,158 @@ + 'Mail Manager', + 'JSLBL_Loading_Please_Wait' => 'Loading, please wait', + 'JSLBL_Loading' => 'Loading', + 'JSLBL_Settings' => 'Settings', + 'JSLBL_Opening' => 'Opening', + 'JSLBL_Deleting' => 'Deleting', + 'JSLBL_Updating' => 'Updating', + 'JSLBL_Associating' => 'Associating', + 'JSLBL_Saving_And_Verifying' => 'Saving & verifying', + 'JSLBL_Failed_To_Open_Mail' => 'Failed to open the email', + 'JSLBL_Finding_Relation' => 'Finding relation', + 'JSLBL_Find_Relation_Now' => 'Find relation now', + 'JSLBL_Searching' => 'Searching', + 'JSLBL_Searching_Please_Wait' => 'Searching, please wait', + 'JSLBL_Sending' => 'Sending', + 'JSLBL_Replied' => 'Replied', + 'JSLBL_Failed_To_Send_Mail' => 'Failed to send the email', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Recepient cannot be empty', + 'JSLBL_SendWith_EmptySubject' => 'Send with empty subject?', + 'JSLBL_Removing' => 'Removing', + 'JSLBL_Choose_Server_Type' => 'Choose server type', + 'JSLBL_Other' => 'Other', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'Search for email', + 'JSLBL_Nothing_Found' => 'Nothing found', + 'JSLBL_Delete_Confirm' => 'Do you want to delete the emails permanently?', + 'JSLBL_Delete_Mails_Confirm' => 'Do you want to delete the emails?', + 'JSLBL_Receipents_Warning_Message' => 'Please select recepients', + 'JSLBL_NO_MATCH' => 'No match found', + 'JSLBL_Saving' => 'Saving', + 'JSLBL_Failed_To_Save_Mail' => 'Failed to save the email', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'Attachment could not be deleted', + 'JSLBL_UPLOAD_CANCEL' => 'Cancel', + 'JSLBL_UPLOAD_DROPFILES' => 'Drop files here to upload', + 'JSLBL_UPLOAD_FILE' => 'Upload', + 'JSLBL_UPLOAD_DELETE' => '', + 'JSLBL_UPLOAD_FAILED' => 'Failed', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED' => 'File upload limit exceeded!', + 'JSLBL_MAIL_SENT' => 'Email sent', + 'JSLBL_EMAIL_FORMAT_INCORRECT' => 'Please provide a correctly formatted email address', + 'JSLBL_SaveWith_EmptySubject' => 'Save with empty subject?', + 'JSLBL_Delete' => 'Delete', + 'JSLBL_Drafts' => 'Drafts', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY' => 'Password cannot be empty', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY' => 'Server name cannot be empty', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY' => 'User name cannot be empty', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY' => 'Organisation name cannot be empty', + 'JSLBL_FROM' => 'From:', + 'JSLBL_DATE' => 'Date: ', + 'JSLBL_SUBJECT' => 'Subject: ', + 'JSLBL_TO' => 'To: ', + 'JSLBL_CC' => 'Cc: ', + 'JSLBL_FORWARD_MESSAGE_TEXT' => '---------- Forwarded message ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL' => 'Please select at least one email', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD' => 'Please select at least one record', + 'JSLBL_MAIL_MOVED' => 'Email(s) moved', + 'JSLBL_MOVING' => 'Moving email(s)', + 'JSLBL_LOADING_FOLDERS' => 'Loading folders..', + 'JSLBL_ADD_COMMENT' => 'Add comment', + 'JSLBL_Yahoo' => 'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Comment cannot be empty', + 'JSLBL_NO_EMAILS_SELECTED' => 'No emails selected.', + 'JSLBL_ENTER_SOME_VALUE' => 'Enter a string to search', + 'JSLBL_DRAFT_MAIL_SAVED' => 'Email is saved under Drafts', + 'LBL_Folders' => 'Folders', + 'LBL_Newer' => 'Newer', + 'LBL_Older' => 'Older', + 'LBL_No_Mails_Found' => 'No emails found.', + 'LBL_Go_Back' => 'Back', + 'LBL_Reply_All' => 'Reply all', + 'LBL_Reply' => 'Reply', + 'LBL_Mark_As_Unread' => 'Mark as unread', + 'LBL_Previous' => 'Previous', + 'LBL_Next' => 'next', + 'LBL_RELATED_RECORDS' => 'Related records', + 'LBL_Mailbox' => 'Mailbox', + 'LBL_Outbox' => 'CRM Outbox', + 'LBL_Like' => 'like', + 'LBL_Mail_Server' => 'Mail Server Name or IP', + 'LBL_Refresh' => 'Refresh', + 'LBL_Cancel' => 'Cancel', + 'LBL_Send' => 'Send', + 'LBL_Compose' => 'Compose', + 'LBL_Forward' => 'Forward', + 'LBL_Remove' => 'Remove', + 'LBL_Associate' => 'Associate', + 'LBL_Create_Contact' => 'Create Contact', + 'LBL_No_Matching_Record_Found' => 'No matching records found.', + 'LBL_ACTIONS' => 'Actions', + 'LBL_Search' => 'Search', + 'LBL_Delete' => 'Delete', + 'LBL_Username' => 'Username', + 'LBL_Your_Mailbox_Account' => 'your mailbox account', + 'LBL_Password' => 'Password', + 'LBL_Account_Password' => 'Account password', + 'LBL_Protocol' => 'Protocol', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'SSL Options', + 'LBL_No_TLS' => 'No TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Certificate validations', + 'LBL_Validate_Cert' => 'Validate certificate', + 'LBL_Do_Not_Validate_Cert' => 'Do not validate certificate', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Select Organisation type', + 'LBL_FROM' => 'From', + 'LBL_TO' => 'To', + 'LBL_CC' => 'Cc', + 'LBL_BCC' => 'Bcc', + 'LBL_Date' => 'Date', + 'LBL_Attachments' => 'Attachment:', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Email templates', + 'LBL_SELECT_EMAIL_TEMPLATE' => 'Select email template', + 'LBL_SELECT_DOCUMENTS' => 'Select documents', + 'LBL_IN' => 'in', + 'LBL_FIND' => 'Find', + 'LBL_SAVE_NOW' => 'Save now', + 'LBL_Drafts' => 'Drafts', + 'LBL_NO_EMAILS_SELECTED' => 'No emails selected.', + 'LBL_SUBJECT' => 'Subject', + 'LBL_WRITE_ACCESS_FOR' => 'Write access for', + 'LBL_READ_ACCESS_FOR' => 'Read access for', + 'LBL_MODULE_DENIED' => 'module denied!', + 'LBL_REFRESH_TIME' => 'Refresh time', + 'LBL_NONE' => 'None', + 'LBL_5_MIN' => '5 Minutes', + 'LBL_10_MIN' => '10 Minutes', + 'LBL_MOVE_TO' => 'Move To...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Add Contact', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Add Organisation', + 'LBL_MAILMANAGER_ADD_Leads' => 'Add Lead', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Add ToDo', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Add Ticket', + 'LBL_MAILMANAGER_ADD_Emails' => 'Attach Email', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Add Comment', + 'LBL_ADD' => 'Add', + 'JSLBL_SendWith_EmptyText' => 'Send without text in the body?', + 'LBL_ALLMAILS' => 'All Mails', + 'LBL_TO_CONTACTS' => 'To Contacts', + 'LBL_TO_ACCOUNTS' => 'To Organizations', + 'LBL_TO_LEADS' => 'To Leads', + 'LBL_TO_USERS' => 'To Users', + 'LBL_SENT_MAILS' => 'Sent Mails' +); +?> \ No newline at end of file diff --git a/modules/MailManager/language/en_us.lang.php b/modules/MailManager/language/en_us.lang.php new file mode 100644 index 0000000..7797b18 --- /dev/null +++ b/modules/MailManager/language/en_us.lang.php @@ -0,0 +1,166 @@ + 'Mail Manager', + + // Translations for JS (please use the prefix JSLBL in key) + 'JSLBL_Loading_Please_Wait' => 'Loading Please Wait', + 'JSLBL_Loading' => 'Loading', + 'JSLBL_Settings' => 'Settings', + 'JSLBL_Opening' => 'Opening', + 'JSLBL_Deleting' => 'Deleting', + 'JSLBL_Updating' => 'Updating', + 'JSLBL_Associating' => 'Associating', + 'JSLBL_Saving_And_Verifying' => 'Saving & Verifying', + 'JSLBL_Failed_To_Open_Mail' => 'Failed to open the mail', + 'JSLBL_Finding_Relation' => 'Finding relation', + 'JSLBL_Find_Relation_Now' => 'Find relation now', + 'JSLBL_Searching' => 'Searching', + 'JSLBL_Searching_Please_Wait'=> 'Searching Please Wait', + 'JSLBL_Sending' => 'Sending', + 'JSLBL_Replied' => 'Replied', + 'JSLBL_Failed_To_Send_Mail' => 'Failed to send the mail', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Recepient cannot be empty', + 'JSLBL_SendWith_EmptySubject' => 'Send with subject empty?', + 'JSLBL_Removing' => 'Removing', + 'JSLBL_Choose_Server_Type' => 'Choose server type', + 'JSLBL_Other' => 'Other', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'Search for email', + 'JSLBL_Nothing_Found' => 'Nothing found', + 'JSLBL_Delete_Confirm' =>'Do you want to delete the Emails permanently?', + 'JSLBL_Delete_Mails_Confirm' =>'Do you want to delete the Emails?', + 'JSLBL_Receipents_Warning_Message'=>'Please select recepients', + 'JSLBL_NO_MATCH' => 'No match found', + 'JSLBL_Saving' => 'Saving', + 'JSLBL_Failed_To_Save_Mail' => 'Failed to save the mail', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'Attachment could not be deleted', + 'JSLBL_UPLOAD_CANCEL' => 'Cancel', + 'JSLBL_UPLOAD_DROPFILES'=>'Drop files here to upload', + 'JSLBL_UPLOAD_FILE'=>'Upload', + 'JSLBL_UPLOAD_DELETE'=>'[x]', + 'JSLBL_UPLOAD_FAILED'=>'Failed', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED'=>'File Upload Limit exceeded!!', + 'JSLBL_MAIL_SENT'=>'Mail Sent', + 'JSLBL_EMAIL_FORMAT_INCORRECT'=>'Please provide proper email address', + 'JSLBL_Saving'=>'Saving', + 'JSLBL_SaveWith_EmptySubject'=>'Save with subject empty?', + 'JSLBL_Delete' => 'Delete', + 'JSLBL_Drafts'=>'Drafts', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY'=>'Password cannot be empty', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY'=>'Server Name cannot be empty', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY'=>'User Name cannot be empty', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY'=>'Organization Name cannot be empty', + 'JSLBL_FROM'=>'From:', + 'JSLBL_DATE'=>'Date: ', + 'JSLBL_SUBJECT'=>'Subject: ', + 'JSLBL_TO'=>'To: ', + 'JSLBL_CC'=>'Cc: ', + 'JSLBL_FORWARD_MESSAGE_TEXT'=>'---------- Forwarded message ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL'=>'Please select at least one mail', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD'=>'Please select at least one record', + 'JSLBL_MAIL_MOVED'=>'Mail(s) moved', + 'JSLBL_MOVING'=>'Moving Mail(s)', + 'JSLBL_LOADING_FOLDERS' => 'Loading Folders..', + 'JSLBL_ADD_COMMENT'=>'Add Comment', + 'JSLBL_Yahoo'=>'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Comment cannot be empty', + 'JSLBL_NO_EMAILS_SELECTED' => 'No Emails Selected.', + 'JSLBL_ENTER_SOME_VALUE' => 'Enter some string to search', + 'JSLBL_DRAFT_MAIL_SAVED'=>'Mail is saved under Drafts', + + // General translations + 'LBL_Folders' => 'Folders', + 'LBL_Newer' => 'Newer', + 'LBL_Older' => 'Older', + 'LBL_No_Mails_Found' => 'No mails found.', + 'LBL_Go_Back' => 'Back', + 'LBL_Reply_All' => 'Reply all', + 'LBL_Reply' => 'Reply', + 'LBL_Mark_As_Unread' => 'Mark as unread', + 'LBL_Previous' => 'previous', + 'LBL_Next' => 'next', + 'LBL_RELATED_RECORDS' => 'Related Records', + 'LBL_Mailbox' => 'Mailbox', + 'LBL_Outbox' => 'CRM Outbox', + 'LBL_Like' => 'like', + 'LBL_Mail_Server' => 'Mail Server Name or IP', + 'LBL_Refresh' => 'Refresh', + 'LBL_Cancel' => 'Cancel', + 'LBL_Send' => 'Send', + 'LBL_Compose' => 'Compose', + 'LBL_Forward' => 'Forward', + 'LBL_Remove' => 'Remove', + 'LBL_Associate' => 'Associate', + 'LBL_Create_Contact' => 'Create contact', + 'LBL_No_Matching_Record_Found' => 'No matching records found.', + 'LBL_ACTIONS' => 'Actions', + 'LBL_Search' => 'Search', + 'LBL_Delete' => 'Delete', + + 'LBL_Username' => 'User Name', + 'LBL_Your_Mailbox_Account' => 'your mailbox account', + 'LBL_Password' => 'Password', + 'LBL_Account_Password' => 'account password', + 'LBL_Protocol' => 'Protocol', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'SSL Options', + 'LBL_No_TLS' => 'No TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Certificate Validations', + 'LBL_Validate_Cert' => 'Validate cert', + 'LBL_Do_Not_Validate_Cert' => 'Do not validate cert', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Select Organization Type', + + 'LBL_FROM' => 'From', + 'LBL_TO' => 'To', + 'LBL_CC' => 'CC', + 'LBL_BCC' => 'BCC', + 'LBL_Date' => 'Date', + 'LBL_Attachments' => 'Attachments', + 'LBL_EMAIL_TEMPLATES_LIST'=>'Email Templates', + 'LBL_SELECT_EMAIL_TEMPLATE'=>'Select Email template', + 'LBL_ATTACHMENTS' =>'Attachment:', + 'LBL_SELECT_DOCUMENTS'=>'Select Documents', + 'LBL_IN' =>'in', + 'LBL_FIND'=>'Find', + 'LBL_SAVE_NOW'=>'Save Now', + 'LBL_Drafts'=>'Drafts', + 'LBL_NO_EMAILS_SELECTED' => 'No Emails Selected.', + 'LBL_SUBJECT' => 'Subject', + 'LBL_WRITE_ACCESS_FOR' =>'Write access for', + 'LBL_READ_ACCESS_FOR' =>'Read access for', + 'LBL_MODULE_DENIED' => 'module denied!', + 'LBL_REFRESH_TIME'=>'Refresh Time', + 'LBL_NONE' => 'None', + 'LBL_5_MIN' => '5 Minutes', + 'LBL_10_MIN' => '10 Minutes', + 'LBL_MOVE_TO'=>'Move To...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Add Contact', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Add Organization', + 'LBL_MAILMANAGER_ADD_Leads' => 'Add Lead', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Add ToDo', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Add Ticket', + 'LBL_MAILMANAGER_ADD_Emails' => 'Attach Email', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Add Comment', + 'LBL_ADD' => 'Add', + 'JSLBL_SendWith_EmptyText' => 'Send without text in the body?', + 'LBL_ALLMAILS' => 'All Mails', + 'LBL_TO_CONTACTS' => 'To Contacts', + 'LBL_TO_ACCOUNTS' => 'To Organizations', + 'LBL_TO_LEADS' => 'To Leads', + 'LBL_TO_USERS' => 'To Users', + 'LBL_SENT_MAILS' => 'Sent Mails' +); + +?> diff --git a/modules/MailManager/language/es_es.lang.php b/modules/MailManager/language/es_es.lang.php new file mode 100644 index 0000000..45b9370 --- /dev/null +++ b/modules/MailManager/language/es_es.lang.php @@ -0,0 +1,166 @@ + 'Administrador Correo', + + // Translations for JS (please use the prefix JSLBL in key) + 'JSLBL_Loading_Please_Wait' => 'Cargando, por favor espera', + 'JSLBL_Loading' => 'Cargando', + 'JSLBL_Settings' => 'Configuración', + 'JSLBL_Opening' => 'Abriendo', + 'JSLBL_Deleting' => 'Eliminando', + 'JSLBL_Updating' => 'Actualizando', + 'JSLBL_Associating' => 'Asociando', + 'JSLBL_Saving_And_Verifying' => 'Guardando & Verificando', + 'JSLBL_Failed_To_Open_Mail' => 'No se ha podido abrir el correo', + 'JSLBL_Finding_Relation' => 'Buscando relación', + 'JSLBL_Find_Relation_Now' => 'Buscar relación ahora', + 'JSLBL_Searching' => 'Buscando', + 'JSLBL_Searching_Please_Wait'=> 'Buscando, por favor espera', + 'JSLBL_Sending' => 'Enviando', + 'JSLBL_Replied' => 'Respondido', + 'JSLBL_Failed_To_Send_Mail' => 'No se ha podido enviar el correo', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Destinatario no puede quedar vacío', + 'JSLBL_SendWith_EmptySubject' => '¿Enviar sin asunto?', + 'JSLBL_Removing' => 'Eliminando', + 'JSLBL_Choose_Server_Type' => 'Elige tipo servidor', + 'JSLBL_Other' => 'Otro', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'Buscar correos', + 'JSLBL_Nothing_Found' => 'No se ha encontrado nada', + 'JSLBL_Delete_Confirm' =>'¿Quieres eliminar los correos permanentemente?', + 'JSLBL_Delete_Mails_Confirm' =>'¿Quieres eliminar los correos?', + 'JSLBL_Receipents_Warning_Message'=>'Por favor, selecciona destinatarios', + 'JSLBL_NO_MATCH' => 'No se ha encontrado coincidencia', + 'JSLBL_Saving' => 'Guardando', + 'JSLBL_Failed_To_Save_Mail' => 'No se ha podido guardar el correo', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'No se ha podido eliminar el adjunto', + 'JSLBL_UPLOAD_CANCEL' => 'Cancelar', + 'JSLBL_UPLOAD_DROPFILES'=>'Arrastra los ficheros aqui para cargarlos', + 'JSLBL_UPLOAD_FILE'=>'Cargar', + 'JSLBL_UPLOAD_DELETE'=>'[x]', + 'JSLBL_UPLOAD_FAILED'=>'Fallido', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED'=>'Límite de carga excedida!!', + 'JSLBL_MAIL_SENT'=>'Correo Enviado', + 'JSLBL_EMAIL_FORMAT_INCORRECT'=>'Por favor, introduce dirección de email correcta', + 'JSLBL_Saving'=>'Guardando', + 'JSLBL_SaveWith_EmptySubject'=>'¿Guardar sin asunto?', + 'JSLBL_Delete' => 'Eliminar', + 'JSLBL_Drafts'=>'Borradores', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY'=>'La contraseña no puede quedar vacía', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY'=>'El nombre del servidor no puede quedar vacío', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY'=>'El nombre del usuario no puede quedar vacío', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY'=>'El nombre de la cuenta no puede quedar vacío', + 'JSLBL_FROM'=>'De:', + 'JSLBL_DATE'=>'Fecha: ', + 'JSLBL_SUBJECT'=>'Asunto: ', + 'JSLBL_TO'=>'A: ', + 'JSLBL_CC'=>'Cc: ', + 'JSLBL_FORWARD_MESSAGE_TEXT'=>'---------- Mensaje Reenviado ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL'=>'Por favor selecciona al menos un email', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD'=>'Por favor selecciona al menos un registro', + 'JSLBL_MAIL_MOVED'=>'Correo(s) movido', + 'JSLBL_MOVING'=>'Moviendo Correo(s)', + 'JSLBL_LOADING_FOLDERS' => 'Cargando Carpetas..', + 'JSLBL_ADD_COMMENT'=>'Añadir Comentario', + 'JSLBL_Yahoo'=>'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Comentario no puede quedar vacío', + 'JSLBL_NO_EMAILS_SELECTED' => 'No se han seleccionado correos.', + 'JSLBL_ENTER_SOME_VALUE' => 'Introduce una cadena para buscar', + 'JSLBL_DRAFT_MAIL_SAVED'=>'Se ha guardado el correo en Borradores', + + // General translations + 'LBL_Folders' => 'Carpetas', + 'LBL_Newer' => 'Más nuevos', + 'LBL_Older' => 'Más viejos', + 'LBL_No_Mails_Found' => 'No se han encontrado correos.', + 'LBL_Go_Back' => 'Atrás', + 'LBL_Reply_All' => 'Responder a todos', + 'LBL_Reply' => 'Responder', + 'LBL_Mark_As_Unread' => 'Marcar como leído', + 'LBL_Previous' => 'anterior', + 'LBL_Next' => 'siguiente', + 'LBL_RELATED_RECORDS' => 'Registros Relacionados', + 'LBL_Mailbox' => 'Buzón', + 'LBL_Outbox' => 'Salida CRM', + 'LBL_Like' => 'como', + 'LBL_Mail_Server' => 'Nombre/IP Servidor de Correo', + 'LBL_Refresh' => 'Actualizar', + 'LBL_Cancel' => 'Cancelar', + 'LBL_Send' => 'Enviar', + 'LBL_Compose' => 'Redactar', + 'LBL_Forward' => 'Reenviar', + 'LBL_Remove' => 'Eliminar', + 'LBL_Associate' => 'Asociar', + 'LBL_Create_Contact' => 'Crear contacto', + 'LBL_No_Matching_Record_Found' => 'No se han encontrado registros.', + 'LBL_ACTIONS' => 'Acciones', + 'LBL_Search' => 'Buscar', + 'LBL_Delete' => 'Eliminar', + + 'LBL_Username' => 'Nombre Usuario', + 'LBL_Your_Mailbox_Account' => 'tu cuenta de correo', + 'LBL_Password' => 'Contraseña', + 'LBL_Account_Password' => 'contraseña cuenta', + 'LBL_Protocol' => 'Protocolo', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'Opciones SSL', + 'LBL_No_TLS' => 'Sin TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Validaciones de Certificado', + 'LBL_Validate_Cert' => 'Validar Certificado', + 'LBL_Do_Not_Validate_Cert' => 'No validar Certificado', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Selecciona Tipo Cuenta', + + 'LBL_FROM' => 'De', + 'LBL_TO' => 'A', + 'LBL_CC' => 'CC', + 'LBL_BCC' => 'BCC', + 'LBL_Date' => 'Fecha', + 'LBL_Attachments' => 'Adjuntos', + 'LBL_EMAIL_TEMPLATES_LIST'=>'Plantillas de Correo', + 'LBL_SELECT_EMAIL_TEMPLATE'=>'Selecciona Plantilla de Correo', + 'LBL_ATTACHMENTS' =>'Adjunto:', + 'LBL_SELECT_DOCUMENTS'=>'Selecciona Documentos', + 'LBL_IN' =>'en', + 'LBL_FIND'=>'Buscar', + 'LBL_SAVE_NOW'=>'Guardar Ahora', + 'LBL_Drafts'=>'Borradores', + 'LBL_NO_EMAILS_SELECTED' => 'No se ha seleccionado correos.', + 'LBL_SUBJECT' => 'Asunto', + 'LBL_WRITE_ACCESS_FOR' =>'Permiso escritura para', + 'LBL_READ_ACCESS_FOR' =>'Permiso lectura para', + 'LBL_MODULE_DENIED' => 'módulo denegado!', + 'LBL_REFRESH_TIME'=>'Frecuencia actualización', + 'LBL_NONE' => 'Ninguno', + 'LBL_5_MIN' => '5 Minutos', + 'LBL_10_MIN' => '10 Minutos', + 'LBL_MOVE_TO'=>'Mover a...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Añadir Contacto', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Añadir Cuenta', + 'LBL_MAILMANAGER_ADD_Leads' => 'Añadir PreContacto', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Añadir Tarea', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Añadir Incidencia', + 'LBL_MAILMANAGER_ADD_Emails' => 'Adjuntar Correo', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Añadir Comentario', + 'LBL_ADD' => 'Añadir', + 'JSLBL_SendWith_EmptyText' => '¿Enviar sin texto en el cuerpo?', + 'LBL_ALLMAILS' => 'Todos los Correos', + 'LBL_TO_CONTACTS' => 'A Contactos', + 'LBL_TO_ACCOUNTS' => 'A Cuentas', + 'LBL_TO_LEADS' => 'A PreContactos', + 'LBL_TO_USERS' => 'A Usuarios', + 'LBL_SENT_MAILS' => 'Correos Enviados' +); + +?> diff --git a/modules/MailManager/language/es_mx.lang.php b/modules/MailManager/language/es_mx.lang.php new file mode 100644 index 0000000..3d470fc --- /dev/null +++ b/modules/MailManager/language/es_mx.lang.php @@ -0,0 +1,160 @@ + 'Administrador de Correo', + + // Translations for JS (please use the prefix JSLBL in key) + 'JSLBL_Loading_Please_Wait' => 'Cargando, por favor espera', + 'JSLBL_Loading' => 'Cargando', + 'JSLBL_Settings' => 'Configuración', + 'JSLBL_Opening' => 'Abriendo', + 'JSLBL_Deleting' => 'Eliminando', + 'JSLBL_Updating' => 'Actualizando', + 'JSLBL_Associating' => 'Asociando', + 'JSLBL_Saving_And_Verifying' => 'Guardando & Verificando', + 'JSLBL_Failed_To_Open_Mail' => 'No se ha podido abrir el correo', + 'JSLBL_Finding_Relation' => 'Buscando relación', + 'JSLBL_Find_Relation_Now' => 'Buscar relación ahora', + 'JSLBL_Searching' => 'Buscando', + 'JSLBL_Searching_Please_Wait'=> 'Buscando, por favor espera', + 'JSLBL_Sending' => 'Enviando', + 'JSLBL_Replied' => 'Respondido', + 'JSLBL_Failed_To_Send_Mail' => 'No se ha podido enviar el correo', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Destinatario no puede quedar vacío', + 'JSLBL_SendWith_EmptySubject' => '¿Enviar sin asunto?', + 'JSLBL_Removing' => 'Eliminando', + 'JSLBL_Choose_Server_Type' => 'Elije el tipo de servidor', + 'JSLBL_Other' => 'Otro', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'Buscar correos', + 'JSLBL_Nothing_Found' => 'No se ha encontrado nada', + 'JSLBL_Delete_Confirm' =>'¿Quieres eliminar los correos permanentemente?', + 'JSLBL_Delete_Mails_Confirm' =>'¿Quieres eliminar los correos?', + 'JSLBL_Receipents_Warning_Message'=>'Por favor, selecciona destinatarios', + 'JSLBL_NO_MATCH' => 'No se ha encontrado coincidencia', + 'JSLBL_Saving' => 'Guardando', + 'JSLBL_Failed_To_Save_Mail' => 'No se ha podido guardar el correo', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'No se ha podido eliminar el adjunto', + 'JSLBL_UPLOAD_CANCEL' => 'Cancelar', + 'JSLBL_UPLOAD_DROPFILES'=>'Arrastra los archivos aquí para cargarlos', + 'JSLBL_UPLOAD_FILE'=>'Cargar', + 'JSLBL_UPLOAD_DELETE'=>'[x]', + 'JSLBL_UPLOAD_FAILED'=>'Fallido', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED'=>'Límite de carga excedida!!', + 'JSLBL_MAIL_SENT'=>'Correo Enviado', + 'JSLBL_EMAIL_FORMAT_INCORRECT'=>'Por favor, introduce una dirección de email correcta', + 'JSLBL_Saving'=>'Guardando', + 'JSLBL_SaveWith_EmptySubject'=>'¿Guardar sin asunto?', + 'JSLBL_Delete' => 'Eliminar', + 'JSLBL_Drafts'=>'Borradores', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY'=>'La contraseña no puede quedar vacía', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY'=>'El nombre del servidor no puede quedar vacío', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY'=>'El nombre del usuario no puede quedar vacío', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY'=>'El nombre de la cuenta no puede quedar vacío', + 'JSLBL_FROM'=>'De:', + 'JSLBL_DATE'=>'Fecha: ', + 'JSLBL_SUBJECT'=>'Asunto: ', + 'JSLBL_TO'=>'A: ', + 'JSLBL_CC'=>'Cc: ', + 'JSLBL_FORWARD_MESSAGE_TEXT'=>'---------- Mensaje Reenviado ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL'=>'Por favor selecciona al menos un email', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD'=>'Por favor selecciona al menos un registro', + 'JSLBL_MAIL_MOVED'=>'Correo(s) movido', + 'JSLBL_MOVING'=>'Moviendo Correo(s)', + 'JSLBL_LOADING_FOLDERS' => 'Cargando Carpetas..', + 'JSLBL_ADD_COMMENT'=>'Añadir Comentario', + 'JSLBL_Yahoo'=>'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Comentario no puede quedar vacío', + 'JSLBL_NO_EMAILS_SELECTED' => 'No se han seleccionado correos.', + 'JSLBL_ENTER_SOME_VALUE' => 'Introduce una cadena para buscar', + 'JSLBL_DRAFT_MAIL_SAVED'=>'Se ha guardado el correo en Borradores', + + // General translations + 'LBL_Folders' => 'Carpetas', + 'LBL_Newer' => 'Más nuevos', + 'LBL_Older' => 'Más viejos', + 'LBL_No_Mails_Found' => 'No se han encontrado correos.', + 'LBL_Go_Back' => 'Atrás', + 'LBL_Reply_All' => 'Responder a todos', + 'LBL_Reply' => 'Responder', + 'LBL_Mark_As_Unread' => 'Marcar como leído', + 'LBL_Previous' => 'anterior', + 'LBL_Next' => 'siguiente', + 'LBL_RELATED_RECORDS' => 'Registros Relacionados', + 'LBL_Mailbox' => 'Buzón', + 'LBL_Outbox' => 'Salida CRM', + 'LBL_Like' => 'como', + 'LBL_Mail_Server' => 'Nombre/IP Servidor de Correo', + 'LBL_Refresh' => 'Actualizar', + 'LBL_Cancel' => 'Cancelar', + 'LBL_Send' => 'Enviar', + 'LBL_Compose' => 'Redactar', + 'LBL_Forward' => 'Reenviar', + 'LBL_Remove' => 'Eliminar', + 'LBL_Associate' => 'Asociar', + 'LBL_Create_Contact' => 'Crear contacto', + 'LBL_No_Matching_Record_Found' => 'No se han encontrado registros.', + 'LBL_ACTIONS' => 'Acciones', + 'LBL_Search' => 'Buscar', + 'LBL_Delete' => 'Eliminar', + + 'LBL_Username' => 'Nombre Usuario', + 'LBL_Your_Mailbox_Account' => 'tu cuenta de correo', + 'LBL_Password' => 'Contraseña', + 'LBL_Account_Password' => 'contraseña cuenta', + 'LBL_Protocol' => 'Protocolo', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'Opciones SSL', + 'LBL_No_TLS' => 'Sin TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Validaciones de Certificado', + 'LBL_Validate_Cert' => 'Validar Certificado', + 'LBL_Do_Not_Validate_Cert' => 'No validar Certificado', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Selecciona Tipo Cuenta', + + 'LBL_FROM' => 'De', + 'LBL_TO' => 'A', + 'LBL_CC' => 'CC', + 'LBL_BCC' => 'BCC', + 'LBL_Date' => 'Fecha', + 'LBL_Attachments' => 'Adjuntos', + 'LBL_EMAIL_TEMPLATES_LIST'=>'Plantillas de Correo', + 'LBL_SELECT_EMAIL_TEMPLATE'=>'Selecciona Plantilla de Correo', + 'LBL_ATTACHMENTS' =>'Adjunto:', + 'LBL_SELECT_DOCUMENTS'=>'Selecciona Documentos', + 'LBL_IN' =>'en', + 'LBL_FIND'=>'Buscar', + 'LBL_SAVE_NOW'=>'Guardar Ahora', + 'LBL_Drafts'=>'Borradores', + 'LBL_NO_EMAILS_SELECTED' => 'No se ha seleccionado correos.', + 'LBL_SUBJECT' => 'Asunto', + 'LBL_WRITE_ACCESS_FOR' =>'Permiso escritura para', + 'LBL_READ_ACCESS_FOR' =>'Permiso lectura para', + 'LBL_MODULE_DENIED' => 'módulo denegado!', + 'LBL_REFRESH_TIME'=>'Frecuencia actualización', + 'LBL_NONE' => 'Ninguno', + 'LBL_5_MIN' => '5 Minutos', + 'LBL_10_MIN' => '10 Minutos', + 'LBL_MOVE_TO'=>'Mover a...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Añadir Contacto', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Añadir Cuenta', + 'LBL_MAILMANAGER_ADD_Leads' => 'Añadir Prospecto', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Añadir Tarea', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Añadir Caso', + 'LBL_MAILMANAGER_ADD_Emails' => 'Adjuntar Correo', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Añadir Comentario', + 'LBL_ADD' => 'Añadir' +); + +?> diff --git a/modules/MailManager/language/fr_fr.lang.php b/modules/MailManager/language/fr_fr.lang.php new file mode 100644 index 0000000..1c88cd5 --- /dev/null +++ b/modules/MailManager/language/fr_fr.lang.php @@ -0,0 +1,158 @@ + 'Mail Manager', + + // Translations for JS (please use the prefix JSLBL in key) + 'JSLBL_Loading_Please_Wait' => 'Chargement, Patientez', + 'JSLBL_Loading' => 'Chargement', + 'JSLBL_Settings' => 'Configuration', + 'JSLBL_Opening' => 'Ouverture', + 'JSLBL_Deleting' => 'Suppression', + 'JSLBL_Updating' => 'Mise à jour', + 'JSLBL_Associating' => 'En association', + 'JSLBL_Saving_And_Verifying' => 'Sauvez & Verifiez', + 'JSLBL_Failed_To_Open_Mail' => 'Erreur pendant l ouverture du message', + 'JSLBL_Finding_Relation' => 'Trouver une relation ', + 'JSLBL_Find_Relation_Now' => 'Trouver une relation maintenant', + 'JSLBL_Searching' => 'Recherche', + 'JSLBL_Searching_Please_Wait'=> 'Recherche, Patientez', + 'JSLBL_Sending' => 'Envoi en cours', + 'JSLBL_Replied' => 'Répondre', + 'JSLBL_Failed_To_Send_Mail' => 'Erreur pendant l envoi du message', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Le destinataire ne peut être vide', + 'JSLBL_SendWith_EmptySubject' => 'Envoi un message avec un objet vide?', + 'JSLBL_Removing' => 'Supression', + 'JSLBL_Choose_Server_Type' => 'Choisir un type de serveur', + 'JSLBL_Other' => 'Autre', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'Cherche un email', + 'JSLBL_Nothing_Found' => 'Aucun résultat', + 'JSLBL_Delete_Confirm' => 'Voulez-vous supprimer ces messages définitivement?', + 'JSLBL_Delete_Mails_Confirm' => 'Voulez-vous supprimer ces messages définitivement?', + 'JSLBL_Receipents_Warning_Message'=> 'Veuillez choisir un destinataire', + 'JSLBL_NO_MATCH' => 'Aucun résultat', + 'JSLBL_Saving' => 'Sauvez', + 'JSLBL_Failed_To_Save_Mail' => 'Erreur pendant la sauvegarde du message', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'Le fichier joint ne peut être supprimé', + 'JSLBL_UPLOAD_CANCEL' => 'Annuler', + 'JSLBL_UPLOAD_DROPFILES'=>'Déplacer les fichiers ici pour télécharger', + 'JSLBL_UPLOAD_FILE'=>'Télécharger', + 'JSLBL_UPLOAD_DELETE'=>'[x]', + 'JSLBL_UPLOAD_FAILED'=>'Erreur', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED'=>'Taille limite de fichier dépassée!!', + 'JSLBL_MAIL_SENT'=>'Message envoyé', + 'JSLBL_EMAIL_FORMAT_INCORRECT'=>'Saisir un format correct d email', + 'JSLBL_Saving'=>'Sauvegarde', + 'JSLBL_SaveWith_EmptySubject'=>'Sauver un message avec un objet vide?', + 'JSLBL_Delete' => 'Supprimer', + 'JSLBL_Drafts'=>'Brouillons', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY'=>'Le mot de passe ne peut être vide', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY'=>'Le nom de serveur ne peut être vide', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY'=>'Le nom d utilisateur ne peut être vide', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY'=>'Le nom du compte ne peut être vide', + 'JSLBL_FROM'=>'De:', + 'JSLBL_DATE'=>'Date: ', + 'JSLBL_SUBJECT'=>'Objet: ', + 'JSLBL_TO'=>'À: ', + 'JSLBL_CC'=>'Copie: ', + 'JSLBL_FORWARD_MESSAGE_TEXT'=>'---------- Message transféré ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL'=>'Choisir au moins un email', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD'=>'Choisir au moins un enregistrement', + 'JSLBL_MAIL_MOVED'=>'Message(s) déplacés', + 'JSLBL_MOVING'=>'Message(s) en déplacement', + 'JSLBL_LOADING_FOLDERS' => 'Chargement des dossiers..', + 'JSLBL_ADD_COMMENT'=>'Ajouter Commentaire', + 'JSLBL_Yahoo'=>'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Le commentaire ne peut être vide', + 'JSLBL_NO_EMAILS_SELECTED' => 'Aucun email sélectionné.', + 'JSLBL_ENTER_SOME_VALUE' => 'Saisir une chaine à rechercher', + 'JSLBL_DRAFT_MAIL_SAVED'=>'Message sauvé dans les brouillons', + + // General translations + 'LBL_Folders' => 'Dossiers', + 'LBL_Newer' => 'Nouveau', + 'LBL_Older' => 'Ancien', + 'LBL_No_Mails_Found' => 'Aucun message trouvé.', + 'LBL_Go_Back' => 'Retour', + 'LBL_Reply_All' => 'Répondre à tous', + 'LBL_Reply' => 'Répondre', + 'LBL_Mark_As_Unread' => 'Marqué comme non lu', + 'LBL_Previous' => 'Précédent', + 'LBL_Next' => 'Suivant', + 'LBL_RELATED_RECORDS' => 'Enregistrements liés', + 'LBL_Mailbox' => 'Boite de réception', + 'LBL_Outbox' => 'Meassages envoyés depuis le CRM', + 'LBL_Like' => 'Comme ', + 'LBL_Mail_Server' => 'Nom du serveur de mail ou IP', + 'LBL_Refresh' => 'Actualiser', + 'LBL_Cancel' => 'Annuler', + 'LBL_Send' => 'Envoyer', + 'LBL_Compose' => 'Nouveau message', + 'LBL_Forward' => 'Transférer', + 'LBL_Remove' => 'Supprimer', + 'LBL_Associate' => 'Associer', + 'LBL_Create_Contact' => 'Créer contact', + 'LBL_No_Matching_Record_Found' => 'Aucun enregistrement trouvé.', + 'LBL_ACTIONS' => 'Actions', + 'LBL_Search' => 'Recherche', + 'LBL_Delete' => 'Supprimer', + 'LBL_Username' => 'Nom d utilisateur', + 'LBL_Your_Mailbox_Account' => 'Votre compte Email', + 'LBL_Password' => 'Mot de passe', + 'LBL_Account_Password' => 'Mot de passe du compte', + 'LBL_Protocol' => 'Protocole', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'Options SSL', + 'LBL_No_TLS' => 'No TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Certificate Validations', + 'LBL_Validate_Cert' => 'Validate cert', + 'LBL_Do_Not_Validate_Cert' => 'Do not validate cert', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Choisir un type de compte', + + 'LBL_FROM' => 'De', + 'LBL_TO' => 'À', + 'LBL_CC' => 'CC', + 'LBL_BCC' => 'CCi', + 'LBL_Date' => 'Date', + 'LBL_Attachments' => 'Pièces jointes', + 'LBL_EMAIL_TEMPLATES_LIST'=>'Modèles d\'emails ', + 'LBL_SELECT_EMAIL_TEMPLATE'=>'Choix d\'un modèle d\'emails ', + 'LBL_ATTACHMENTS' =>'Pièces jointes:', + 'LBL_SELECT_DOCUMENTS'=>'Choix des documents', + 'LBL_IN' =>'dans', + 'LBL_FIND'=>'Trouver', + 'LBL_SAVE_NOW'=>'Enregistrer', + 'LBL_Drafts'=>'Brouillons', + 'LBL_NO_EMAILS_SELECTED' => 'Aucun message sélectionné', + 'LBL_SUBJECT' => 'Objet', + 'LBL_WRITE_ACCESS_FOR' =>'Accès en écriture pour', + 'LBL_READ_ACCESS_FOR' =>'Accès en lecture pour', + 'LBL_MODULE_DENIED' => 'module refusé!', + 'LBL_REFRESH_TIME'=>'Délai de rafraîchissement', + 'LBL_NONE' => 'Aucun', + 'LBL_5_MIN' => '5 Minutes', + 'LBL_10_MIN' => '10 Minutes', + 'LBL_MOVE_TO'=>'Déplacer vers...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Ajouter Contact', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Ajouter Compte', + 'LBL_MAILMANAGER_ADD_Leads' => 'Ajouter Prospect', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Ajouter Tâche', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Ajouter Ticket', + 'LBL_MAILMANAGER_ADD_Emails' => 'Attacher le message', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Ajouter Commentaire', + 'LBL_ADD' => 'Ajouter' +); + +?> \ No newline at end of file diff --git a/modules/MailManager/language/hu_hu.lang.php b/modules/MailManager/language/hu_hu.lang.php new file mode 100644 index 0000000..436f664 --- /dev/null +++ b/modules/MailManager/language/hu_hu.lang.php @@ -0,0 +1,164 @@ + 'E-mail Menedzser', + 'JSLBL_Loading_Please_Wait' => 'Betöltés folyamatban, várj egy kicsit', + 'JSLBL_Loading' => 'Betöltés', + 'JSLBL_Settings' => 'Beállítások', + 'JSLBL_Opening' => 'Megnyitás', + 'JSLBL_Deleting' => 'Törlés', + 'JSLBL_Updating' => 'Frissítés', + 'JSLBL_Associating' => 'Hozzárendelés', + 'JSLBL_Saving_And_Verifying' => 'Mentés és Ellenőrzés', + 'JSLBL_Failed_To_Open_Mail' => 'Hiba az e-mail megnyitása közben', + 'JSLBL_Finding_Relation' => 'Kapcsolódás keresése', + 'JSLBL_Find_Relation_Now' => 'Találj egy kapcsolódást most', + 'JSLBL_Searching' => 'Keresés', + 'JSLBL_Searching_Please_Wait' => 'Keresés folyamatban, várj egy kicsit', + 'JSLBL_Sending' => 'Küldés', + 'JSLBL_Replied' => 'Megválaszolt', + 'JSLBL_Failed_To_Send_Mail' => 'Levél küldése nem sikerült', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Címzett nem maradhat üresen', + 'JSLBL_SendWith_EmptySubject' => 'Tárgysor nélkül küldjük a levelet?', + 'JSLBL_Removing' => 'Törlés', + 'JSLBL_Choose_Server_Type' => 'Válassz szerver típust', + 'JSLBL_Other' => 'Egyéb', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'E-mail keresése', + 'JSLBL_Nothing_Found' => 'Nem található', + 'JSLBL_Delete_Confirm' => 'Véglegesen törölni akarja az e-maileket?', + 'JSLBL_Delete_Mails_Confirm' => 'Törölni akarja az e-maileket?', + 'JSLBL_Receipents_Warning_Message' => 'Válaszd ki a Címzetteket', + 'JSLBL_NO_MATCH' => 'Nincs találat', + 'JSLBL_Saving' => 'Mentés', + 'JSLBL_Failed_To_Save_Mail' => 'Hiba az e-mail mentése közben', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'A Melléklet nem törölhető', + 'JSLBL_UPLOAD_CANCEL' => 'Mégse', + 'JSLBL_UPLOAD_DROPFILES' => 'Húzd be ide a fájlt a feltöltéshez', + 'JSLBL_UPLOAD_FILE' => 'Feltöltés ', + 'JSLBL_UPLOAD_DELETE' => 'Feltöltés törlése', + 'JSLBL_UPLOAD_FAILED' => 'Hiba', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED' => 'Fájl feltöltési limit túllépve!!', + 'JSLBL_MAIL_SENT' => 'E-Mail sikeresen elküldve', + 'JSLBL_EMAIL_FORMAT_INCORRECT' => 'Adj meg egy megfelelő e-mail címet', + 'JSLBL_SaveWith_EmptySubject' => 'Tárgysor nélkül mentsük?', + 'JSLBL_Delete' => 'Törlés', + 'JSLBL_Drafts' => 'Piszkozat', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY' => 'Jelszó nem lehet üres', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY' => 'Szervernév nem lehet üres', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY' => 'Felhasználónév nem lehet üres', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY' => 'Fióknév nem lehet üres', + 'JSLBL_FROM' => 'Feladó:', + 'JSLBL_DATE' => 'Dátum: ', + 'JSLBL_SUBJECT' => 'Tárgysor: ', + 'JSLBL_TO' => 'Címzett: ', + 'JSLBL_CC' => 'Másolat: ', + 'JSLBL_FORWARD_MESSAGE_TEXT' => '---------- Továbbított üzenet ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL' => 'Kérjük, hogy válassz ki legalább egy e-mailt', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD' => 'Kérjük, hogy válassz ki legalább egy rekordot', + 'JSLBL_MAIL_MOVED' => 'E-Mailt áthelyeztünk', + 'JSLBL_MOVING' => 'E-Mail(ek) áthelyezése', + 'JSLBL_LOADING_FOLDERS' => 'Mappák betöltése..', + 'JSLBL_ADD_COMMENT' => 'Megjegyzés hozzáadása', + 'JSLBL_Yahoo' => 'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Megjegyzés nem lehet üres', + 'JSLBL_NO_EMAILS_SELECTED' => 'Nincs E-mail kiválasztva.', + 'JSLBL_ENTER_SOME_VALUE' => 'Adj meg egy kifejezést a kereséshez', + 'JSLBL_DRAFT_MAIL_SAVED' => 'Az E-Mailt mentettük a Piszkozat mappába', + 'LBL_Folders' => 'Mappák', + 'LBL_Newer' => 'Újabb', + 'LBL_Older' => 'Régebbi', + 'LBL_No_Mails_Found' => 'Nem található e-mail.', + 'LBL_Go_Back' => 'Vissza', + 'LBL_Reply_All' => 'Válasz mindenkinek', + 'LBL_Reply' => 'Válasz', + 'LBL_Mark_As_Unread' => 'Jelöld olvasatlannak', + 'LBL_Previous' => 'előző', + 'LBL_Next' => 'következő', + 'LBL_RELATED_RECORDS' => 'Kapcsolódó rekord', + 'LBL_Mailbox' => 'Email fiók', + 'LBL_Outbox' => 'CRM Elküldött levelek', + 'LBL_Like' => 'pl:', + 'LBL_Mail_Server' => 'E-Mail Szerver neve vagy IP', + 'LBL_Refresh' => 'Frissít', + 'LBL_Cancel' => 'Mégse', + 'LBL_Send' => 'Küldés', + 'LBL_Compose' => 'Levelet ír', + 'LBL_Forward' => 'Továbbít', + 'LBL_Remove' => 'Töröl', + 'LBL_Associate' => 'Iktat', + 'LBL_Create_Contact' => 'Kapcsolat létrehozása', + 'LBL_No_Matching_Record_Found' => 'Nincs kapcsolódó adatbázis rekordot.', + 'LBL_ACTIONS' => 'Műveletek', + 'LBL_Search' => 'Keresés', + 'LBL_Delete' => 'Törlés', + 'LBL_Username' => 'Felhasználónév', + 'LBL_Your_Mailbox_Account' => 'Az e-mail fiókod', + 'LBL_Password' => 'Jelszó', + 'LBL_Account_Password' => 'Fiók jelszó', + 'LBL_Protocol' => 'Protocol', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'SSL beállítások', + 'LBL_No_TLS' => 'Nincs TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Tanusítvány ellenőrzés', + 'LBL_Validate_Cert' => 'Ellenőrizze', + 'LBL_Do_Not_Validate_Cert' => 'Ne ellenőrizze', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Válassz fiók típust', + 'LBL_FROM' => 'Feladó', + 'LBL_TO' => 'Címzett', + 'LBL_CC' => 'Másolat', + 'LBL_BCC' => 'Rejtett másolat', + 'LBL_Date' => 'Dátum', + 'LBL_Attachments' => 'Melléklet:', + 'LBL_EMAIL_TEMPLATES_LIST' => 'E-mail sablonok', + 'LBL_SELECT_EMAIL_TEMPLATE' => 'Válassz E-mail sablont', + 'LBL_SELECT_DOCUMENTS' => 'Válassz dokumentumot', + 'LBL_IN' => 'itt:', + 'LBL_FIND' => 'Keress', + 'LBL_SAVE_NOW' => 'Mentés most', + 'LBL_Drafts' => 'Piszkozat', + 'LBL_NO_EMAILS_SELECTED' => 'Nincs e-mail kiválasztva.', + 'LBL_SUBJECT' => 'Tárgysor', + 'LBL_WRITE_ACCESS_FOR' => 'Írási jog: ', + 'LBL_READ_ACCESS_FOR' => 'Olvasási jog: ', + 'LBL_MODULE_DENIED' => 'modul letiltva!', + 'LBL_REFRESH_TIME' => 'Frissítési idő', + 'LBL_NONE' => 'Nincs', + 'LBL_5_MIN' => '5 perc', + 'LBL_10_MIN' => '10 perc', + 'LBL_MOVE_TO' => 'Áthelyzés...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Kapcsolat hozzáadása', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Cég hozzáadása', + 'LBL_MAILMANAGER_ADD_Leads' => 'Jelölt hozzáadása', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Teendő hozzáadása', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Kérés hozzáadása', + 'LBL_MAILMANAGER_ADD_Emails' => 'E-mail iktatása', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Feljegyzés hozzáadása', + 'LBL_ADD' => 'Hozzáad', + 'or' => 'vagy', + 'SUBJECT' => 'Tárgysor', + 'TO' => 'Címzett', + 'CC' => 'Másolat', + 'BCC' => 'Rejtett másolat', + 'FROM' => 'Feladó', + 'BODY' => 'Levél szövege', + 'JSLBL_SendWith_EmptyText' => 'Elküldjük anélkül, hogy szöveg lenne az e-mail törzsben?' +); +?> \ No newline at end of file diff --git a/modules/MailManager/language/nl_nl.lang.php b/modules/MailManager/language/nl_nl.lang.php new file mode 100644 index 0000000..867c544 --- /dev/null +++ b/modules/MailManager/language/nl_nl.lang.php @@ -0,0 +1,183 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.4 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/MailManager/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array ( + 'MailManager' => 'Mail Manager', + + // Translations for JS (please use the prefix JSLBL in key) + 'JSLBL_Loading_Please_Wait' => 'Laden, een ogenblik geduld a.u.b.', + 'JSLBL_Loading' => 'Laden', + 'JSLBL_Settings' => 'Instellingen', + 'JSLBL_Opening' => 'Openen', + 'JSLBL_Deleting' => 'Verwijderen', + 'JSLBL_Updating' => 'Bijwerken', + 'JSLBL_Associating' => 'Koppelen', + 'JSLBL_Saving_And_Verifying' => 'Opslaan & Controleren', + 'JSLBL_Failed_To_Open_Mail' => 'Niet gelukt om de e-mail te openen', + 'JSLBL_Finding_Relation' => 'Zoeken naar relatie', + 'JSLBL_Find_Relation_Now' => 'Zoek relatie nu', + 'JSLBL_Searching' => 'Zoeken', + 'JSLBL_Searching_Please_Wait'=> 'Zoeken, een ogenblik geduld a.u.b.', + 'JSLBL_Sending' => 'Verzenden', + 'JSLBL_Replied' => 'Beantwoord', + 'JSLBL_Failed_To_Send_Mail' => 'Niet gelukt om de e-mail te versturen', + 'JSLBL_Recepient_Cannot_Be_Empty' => 'Ontvanger mag niet leeg zijn', + 'JSLBL_SendWith_EmptySubject' => 'Versturen met leeg onderwerp?', + 'JSLBL_Removing' => 'Verwijderen ', + 'JSLBL_Choose_Server_Type' => 'Kies server type', + 'JSLBL_Other' => 'Ander', + 'JSLBL_Gmail' => 'Gmail', + 'JSLBL_Fastmail' => 'Fastmail', + 'JSLBL_Search_For_Email' => 'Zoek naar e-mail', + 'JSLBL_Nothing_Found' => 'Niets gevonden', + 'JSLBL_Delete_Confirm' =>'Wilt u de e-mails permanent verwijderen?', + 'JSLBL_Delete_Mails_Confirm' =>'Wilt u de e-mails verwijderen?', + 'JSLBL_Receipents_Warning_Message'=>'Selecteer ontvangers a.u.b.', + 'JSLBL_NO_MATCH' => 'Geen gelijkenis gevonden', + 'JSLBL_Saving' => 'Opslaan', + 'JSLBL_Failed_To_Save_Mail' => 'Niet gelukt om de e-mail op te slaan', + 'JSLBL_ATTACHMENT_NOT_DELETED' => 'Bijlage kon niet worden verwijderd', + 'JSLBL_UPLOAD_CANCEL' => 'Annuleer', + 'JSLBL_UPLOAD_DROPFILES'=> 'Drop bestanden hier op te uploaden', + 'JSLBL_UPLOAD_FILE'=>'Upload', + 'JSLBL_UPLOAD_DELETE'=>'[x]', + 'JSLBL_UPLOAD_FAILED'=>'Mislukt', + 'JSLBL_FILEUPLOAD_LIMIT_EXCEEDED'=>'Bestandsomvang overschreden!!', + 'JSLBL_MAIL_SENT'=>'E-mail verzonden', + 'JSLBL_EMAIL_FORMAT_INCORRECT'=>'Geef een valide e-mailadres a.u.b.', + 'JSLBL_Saving'=>'Opslaan', + 'JSLBL_SaveWith_EmptySubject'=>'Opslaan met leeg onderwerp?', + 'JSLBL_Delete' => 'Verwijder', + 'JSLBL_Drafts'=>'Concepten', + 'JSLBL_PASSWORD_CANNOT_BE_EMPTY'=>'Wachtwoord mag niet leeg zijn', + 'JSLBL_SERVERNAME_CANNOT_BE_EMPTY'=>'Servernaam mag niet leeg zijn', + 'JSLBL_USERNAME_CANNOT_BE_EMPTY'=>'Gebruikersnaam mag niet leeg zijn', + 'JSLBL_ACCOUNTNAME_CANNOT_EMPTY'=>'Accountnaam mag niet leeg zijn', + 'JSLBL_FROM'=>'Van:', + 'JSLBL_DATE'=>'Datum: ', + 'JSLBL_SUBJECT'=>'Onderwerp: ', + 'JSLBL_TO'=>'Aan: ', + 'JSLBL_CC'=>'Cc: ', + 'JSLBL_FORWARD_MESSAGE_TEXT'=>'---------- Doorgestuurd bericht ----------', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_MAIL'=>'Selecteer ten minste één e-mail a.u.b.', + 'JSLBL_PLEASE_SELECT_ATLEAST_ONE_RECORD'=>'Selecteer ten minste één record a.u.b.', + 'JSLBL_MAIL_MOVED'=>'E-mail(s) verplaatst', + 'JSLBL_MOVING'=>'Verplaatsen E-mail(s)', + 'JSLBL_LOADING_FOLDERS' => 'Mappen laden..', + 'JSLBL_ADD_COMMENT'=>'Toevoegen opmerking', + 'JSLBL_Yahoo'=>'Yahoo', + 'JSLBL_CANNOT_ADD_EMPTY_COMMENT' => 'Commentaar mag niet leeg zijn', + 'JSLBL_NO_EMAILS_SELECTED' => 'Geen E-mails geselecteerd.', + 'JSLBL_ENTER_SOME_VALUE' => 'Voer tekst in om te zoeken', + 'JSLBL_DRAFT_MAIL_SAVED'=>'De e-mail is opgeslagen onder concepten', + + // General translations + 'LBL_Folders' => 'Mappen', + 'LBL_Newer' => 'Nieuwer', + 'LBL_Older' => 'Ouder', + 'LBL_No_Mails_Found' => 'Geen e-mails gevonden.', + 'LBL_Go_Back' => 'Terug', + 'LBL_Reply_All' => 'Antwoord Allen', + 'LBL_Reply' => 'Antwoord', + 'LBL_Mark_As_Unread' => 'Markeer als ongelezen', + 'LBL_Previous' => 'vorige', + 'LBL_Next' => 'volgende', + 'LBL_RELATED_RECORDS' => 'Gerelateerde Records', + 'LBL_Mailbox' => 'Mailbox', + 'LBL_Outbox' => 'CRM Outbox', + 'LBL_Like' => 'zoals', + 'LBL_Mail_Server' => 'Mailserver naam of IP', + 'LBL_Refresh' => 'Ververs', + 'LBL_Cancel' => 'Annuleer', + 'LBL_Send' => 'Verzend', + 'LBL_Compose' => 'Nieuwe e-mail', + 'LBL_Forward' => 'Doorsturen', + 'LBL_Remove' => 'Verwijder', + 'LBL_Associate' => 'Associeer', + 'LBL_Create_Contact' => 'Maak contact', + 'LBL_No_Matching_Record_Found' => 'Geen matchende records gevonden.', + 'LBL_ACTIONS' => 'Acties', + 'LBL_Search' => 'Zoek', + 'LBL_Delete' => 'Verwijder', + + 'LBL_Username' => 'Gebruikers', + 'LBL_Your_Mailbox_Account' => 'Uw mailbox account', + 'LBL_Password' => 'Wachtwoord', + 'LBL_Account_Password' => 'account wachtwoord', + 'LBL_Protocol' => 'Protocol', + 'LBL_Imap2' => 'IMAP2', + 'LBL_Imap4' => 'IMAP4', + 'LBL_SSL_Options' => 'SSL Opties', + 'LBL_No_TLS' => 'Geen TLS', + 'LBL_TLS' => 'TLS', + 'LBL_SSL' => 'SSL', + 'LBL_Certificate_Validations' => 'Certificaat Validaties', + 'LBL_Validate_Cert' => 'Valideer certificaat', + 'LBL_Do_Not_Validate_Cert' => 'Certificaat niet valideren', + 'LBL_SELECT_ACCOUNT_TYPE' => 'Selecteer Accounttype', + + 'LBL_FROM' => 'Van', + 'LBL_TO' => 'Aan', + 'LBL_CC' => 'CC', + 'LBL_BCC' => 'BCC', + 'LBL_Date' => 'Datum', + 'LBL_Attachments' => 'Bijlagen', + 'LBL_EMAIL_TEMPLATES_LIST'=>'E-mail sjablonen', + 'LBL_SELECT_EMAIL_TEMPLATE'=>'Selecteer e-mail sjabloon', + 'LBL_ATTACHMENTS' =>'Bijlage:', + 'LBL_SELECT_DOCUMENTS'=>'Selecteer Documenten', + 'LBL_IN' =>'in', + 'LBL_FIND'=>'Zoek', + 'LBL_SAVE_NOW'=>'Nu Opslaan', + 'LBL_Drafts'=>'Concepten', + 'LBL_NO_EMAILS_SELECTED' => 'Geen E-mails Geselecteerd.', + 'LBL_SUBJECT' => 'Onderwerp', + 'LBL_WRITE_ACCESS_FOR' =>'Schrijftoegang voor', + 'LBL_READ_ACCESS_FOR' =>'Leestoegang voor', + 'LBL_MODULE_DENIED' => 'Module geweigerd!', + 'LBL_REFRESH_TIME'=>'VerversTijd', + 'LBL_NONE' => 'Geen', + 'LBL_5_MIN' => '5 Minuten', + 'LBL_10_MIN' => '10 Minuten', + 'LBL_MOVE_TO'=>'Verplaats Naar...', + 'LBL_MAILMANAGER_ADD_Contacts' => 'Contact toevoegen', + 'LBL_MAILMANAGER_ADD_Accounts' => 'Account toevoegen', + 'LBL_MAILMANAGER_ADD_Leads' => 'Lead toevoegen', + 'LBL_MAILMANAGER_ADD_Calendar' => 'Actie toevoegen', + 'LBL_MAILMANAGER_ADD_HelpDesk' => 'Ticket toevoegen', + 'LBL_MAILMANAGER_ADD_Emails' => 'E-mail toevoegen', + 'LBL_MAILMANAGER_ADD_ModComments' => 'Commentaar toevoegen', + 'LBL_ADD' => 'Toevoegen' +); + +?> diff --git a/modules/MailManager/resources/jquery-1.6.2.min.js b/modules/MailManager/resources/jquery-1.6.2.min.js new file mode 100644 index 0000000..48590ec --- /dev/null +++ b/modules/MailManager/resources/jquery-1.6.2.min.js @@ -0,0 +1,18 @@ +/*! + * jQuery JavaScript Library v1.6.2 + * http://jquery.com/ + * + * Copyright 2011, John Resig + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * Copyright 2011, The Dojo Foundation + * Released under the MIT, BSD, and GPL Licenses. + * + * Date: Thu Jun 30 14:16:56 2011 -0400 + */ +(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"":"")+""),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;ic)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c
    a",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="
    ",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="
    t
    ",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i. +shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

    ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
    ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g0)for(h=g;h0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/",""],legend:[1,"
    ","
    "],thead:[1,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],col:[2,"","
    "],area:[1,"",""],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div
    ","
    "]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j +)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
    ").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b
    ";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window); \ No newline at end of file diff --git a/modules/MailManager/resources/jquery-ui-1.8.16.custom.min.js b/modules/MailManager/resources/jquery-ui-1.8.16.custom.min.js new file mode 100644 index 0000000..f0a10ec --- /dev/null +++ b/modules/MailManager/resources/jquery-ui-1.8.16.custom.min.js @@ -0,0 +1,150 @@ +/*! + * jQuery UI 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI + */ +(function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", +keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= +this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, +"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": +"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, +outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, +"tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& +a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Draggable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
    ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; +this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); +this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, +_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= +false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, +10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| +!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& +a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= +this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), +10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), +10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, +(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= +"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), +10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ +this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& +!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e
    ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== +String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy(); +var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a= +false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"}); +this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff= +{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis]; +if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false}, +_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f, +{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight: +Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(cb.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left= +null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+ +a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+ +c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]); +b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(), +10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top- +f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType? +e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a= +e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing, +step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement= +e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset; +var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left: +a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top- +d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition, +f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25, +display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b= +e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height= +d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery); +; \ No newline at end of file diff --git a/modules/MailManager/resources/jquery.tokeninput.js b/modules/MailManager/resources/jquery.tokeninput.js new file mode 100644 index 0000000..b7b5767 --- /dev/null +++ b/modules/MailManager/resources/jquery.tokeninput.js @@ -0,0 +1,597 @@ +/* + * jQuery Plugin: Tokenizing Autocomplete Text Entry + * Version 1.1 + * + * Copyright (c) 2009 James Smith (http://loopj.com) + * Licensed jointly under the GPL and MIT licenses, + * choose which one suits your project best! + * + */ + +(function($) { + +$.fn.tokenInput = function (url, options) { + var settings = $.extend({ + url: url, + hintText: "Type in a search term", + noResultsText: "No results", + searchingText: "Searching...", + searchDelay: 300, + minChars: 1, + tokenLimit: null, + jsonContainer: null, + method: "GET", + contentType: "json", + queryParam: "q", + onResult: null + }, options); + + settings.classes = $.extend({ + tokenList: "token-input-list", + token: "token-input-token", + tokenDelete: "token-input-delete-token", + selectedToken: "token-input-selected-token", + highlightedToken: "token-input-highlighted-token", + dropdown: "token-input-dropdown", + dropdownItem: "token-input-dropdown-item", + dropdownItem2: "token-input-dropdown-item2", + selectedDropdownItem: "token-input-selected-dropdown-item", + inputToken: "token-input-input-token" + }, options.classes); + + return this.each(function () { + var list = new $.TokenList(this, settings); + }); +}; + +$.TokenList = function (input, settings) { + // + // Variables + // + + // Input box position "enum" + var POSITION = { + BEFORE: 0, + AFTER: 1, + END: 2 + }; + + // Keys "enum" + var KEY = { + BACKSPACE: 8, + TAB: 9, + RETURN: 13, + ESC: 27, + LEFT: 37, + UP: 38, + RIGHT: 39, + DOWN: 40, + COMMA: 188 + }; + + // Save the tokens + var saved_tokens = []; + + // Keep track of the number of tokens in the list + var token_count = 0; + + // Basic cache to save on db hits + var cache = new $.TokenList.Cache(); + + // Keep track of the timeout + var timeout; + + // Create a new text input an attach keyup events + var input_box = $("") + .css({ + outline: "none" + }) + .focus(function () { + if (settings.tokenLimit == null || settings.tokenLimit != token_count) { + show_dropdown_hint(); + } + }) + .blur(function () { + hide_dropdown(); + }) + .keydown(function (event) { + var previous_token; + var next_token; + + switch(event.keyCode) { + case KEY.LEFT: + case KEY.RIGHT: + case KEY.UP: + case KEY.DOWN: + if(!$(this).val()) { + previous_token = input_token.prev(); + next_token = input_token.next(); + + if((previous_token.length && previous_token.get(0) === selected_token) || (next_token.length && next_token.get(0) === selected_token)) { + // Check if there is a previous/next token and it is selected + if(event.keyCode == KEY.LEFT || event.keyCode == KEY.UP) { + deselect_token($(selected_token), POSITION.BEFORE); + } else { + deselect_token($(selected_token), POSITION.AFTER); + } + } else if((event.keyCode == KEY.LEFT || event.keyCode == KEY.UP) && previous_token.length) { + // We are moving left, select the previous token if it exists + select_token($(previous_token.get(0))); + } else if((event.keyCode == KEY.RIGHT || event.keyCode == KEY.DOWN) && next_token.length) { + // We are moving right, select the next token if it exists + select_token($(next_token.get(0))); + } + } else { + var dropdown_item = null; + + if(event.keyCode == KEY.DOWN || event.keyCode == KEY.RIGHT) { + dropdown_item = $(selected_dropdown_item).next(); + } else { + dropdown_item = $(selected_dropdown_item).prev(); + } + + if(dropdown_item.length) { + select_dropdown_item(dropdown_item); + } + return false; + } + break; + + case KEY.BACKSPACE: + previous_token = input_token.prev(); + + if(!$(this).val().length) { + if(selected_token) { + delete_token($(selected_token)); + } else if(previous_token.length) { + select_token($(previous_token.get(0))); + } + + return false; + } else if($(this).val().length == 1) { + hide_dropdown(); + } else { + // set a timeout just long enough to let this function finish. + setTimeout(function(){do_search(false);}, 5); + } + break; + + case KEY.TAB: + case KEY.RETURN: + case KEY.COMMA: + if(selected_dropdown_item) { + add_token($(selected_dropdown_item)); + return false; + } + break; + + case KEY.ESC: + hide_dropdown(); + return true; + + default: + if(is_printable_character(event.keyCode)) { + // set a timeout just long enough to let this function finish. + setTimeout(function(){do_search(false);}, 5); + } + break; + } + }); + + // Keep a reference to the original input box + var hidden_input = $(input) + .hide() + .focus(function () { + input_box.focus(); + }) + .blur(function () { + input_box.blur(); + }); + + // Keep a reference to the selected token and dropdown item + var selected_token = null; + var selected_dropdown_item = null; + + // The list to store the token items in + var token_list = $("
      ") + .addClass(settings.classes.tokenList) + .insertAfter(hidden_input) + .click(function (event) { + var li = get_element_from_event(event, "li"); + if(li && li.get(0) != input_token.get(0)) { + toggle_select_token(li); + return false; + } else { + input_box.focus(); + + if(selected_token) { + deselect_token($(selected_token), POSITION.END); + } + } + }) + .mouseover(function (event) { + var li = get_element_from_event(event, "li"); + if(li && selected_token !== this) { + li.addClass(settings.classes.highlightedToken); + } + }) + .mouseout(function (event) { + var li = get_element_from_event(event, "li"); + if(li && selected_token !== this) { + li.removeClass(settings.classes.highlightedToken); + } + }) + .mousedown(function (event) { + // Stop user selecting text on tokens + var li = get_element_from_event(event, "li"); + if(li){ + return false; + } + }); + + + // The list to store the dropdown items in + var dropdown = $("
      ") + .addClass(settings.classes.dropdown) + .insertAfter(token_list) + .hide(); + + // The token holding the input box + var input_token = $("
    • ") + .addClass(settings.classes.inputToken) + .appendTo(token_list) + .append(input_box); + + init_list(); + + // + // Functions + // + + + // Pre-populate list if items exist + function init_list () { + li_data = settings.prePopulate; + if(li_data && li_data.length) { + for(var i in li_data) { + var this_token = $("
    • "+li_data[i].name+"

    • ") + .addClass(settings.classes.token) + .insertBefore(input_token); + + $("x") + .addClass(settings.classes.tokenDelete) + .appendTo(this_token) + .click(function () { + delete_token($(this).parent()); + return false; + }); + + $.data(this_token.get(0), "tokeninput", {"id": li_data[i].id, "name": li_data[i].name}); + + // Clear input box and make sure it keeps focus + input_box + .val("") + .focus(); + + // Don't show the help dropdown, they've got the idea + hide_dropdown(); + + // Save this token id + var id_string = li_data[i].id + "," + hidden_input.val(hidden_input.val() + id_string); + } + } + } + + function is_printable_character(keycode) { + if((keycode >= 48 && keycode <= 90) || // 0-1a-z + (keycode >= 96 && keycode <= 111) || // numpad 0-9 + - / * . + (keycode >= 186 && keycode <= 192) || // ; = , - . / ^ + (keycode >= 219 && keycode <= 222) // ( \ ) ' + ) { + return true; + } else { + return false; + } + } + + // Get an element of a particular type from an event (click/mouseover etc) + function get_element_from_event (event, element_type) { + var target = $(event.target); + var element = null; + + if(target.is(element_type)) { + element = target; + } else if(target.parent(element_type).length) { + element = target.parent(element_type+":first"); + } + + return element; + } + + // Inner function to a token to the list + function insert_token(id, value) { + var this_token = $("
    • "+ value +"

    • ") + .addClass(settings.classes.token) + .insertBefore(input_token); + + // The 'delete token' button + $("x") + .addClass(settings.classes.tokenDelete) + .appendTo(this_token) + .click(function () { + delete_token($(this).parent()); + return false; + }); + + $.data(this_token.get(0), "tokeninput", {"id": id, "name": value}); + + return this_token; + } + + // Add a token to the token list based on user input + function add_token (item) { + var li_data = $.data(item.get(0), "tokeninput"); + var this_token = insert_token(li_data.id, li_data.name); + + // Clear input box and make sure it keeps focus + input_box + .val("") + .focus(); + + // Don't show the help dropdown, they've got the idea + hide_dropdown(); + + // Save this token id + var id_string = li_data.id + "," + hidden_input.val(hidden_input.val() + id_string); + + token_count++; + + if(settings.tokenLimit != null && settings.tokenLimit >= token_count) { + input_box.hide(); + hide_dropdown(); + } + } + + // Select a token in the token list + function select_token (token) { + token.addClass(settings.classes.selectedToken); + selected_token = token.get(0); + + // Hide input box + input_box.val(""); + + // Hide dropdown if it is visible (eg if we clicked to select token) + hide_dropdown(); + } + + // Deselect a token in the token list + function deselect_token (token, position) { + token.removeClass(settings.classes.selectedToken); + selected_token = null; + + if(position == POSITION.BEFORE) { + input_token.insertBefore(token); + } else if(position == POSITION.AFTER) { + input_token.insertAfter(token); + } else { + input_token.appendTo(token_list); + } + + // Show the input box and give it focus again + input_box.focus(); + } + + // Toggle selection of a token in the token list + function toggle_select_token (token) { + if(selected_token == token.get(0)) { + deselect_token(token, POSITION.END); + } else { + if(selected_token) { + deselect_token($(selected_token), POSITION.END); + } + select_token(token); + } + } + + // Delete a token from the token list + function delete_token (token) { + // Remove the id from the saved list + var token_data = $.data(token.get(0), "tokeninput"); + + // Delete the token + token.remove(); + selected_token = null; + + // Show the input box and give it focus again + input_box.focus(); + + // Delete this token's id from hidden input + var str = hidden_input.val() + var start = str.indexOf(token_data.id+","); + var end = str.indexOf(",", start) + 1; + + if(end >= str.length) { + hidden_input.val(str.slice(0, start)); + } else { + hidden_input.val(str.slice(0, start) + str.slice(end, str.length)); + } + + token_count--; + + if (settings.tokenLimit != null) { + input_box + .show() + .val("") + .focus(); + } + } + + // Hide and clear the results dropdown + function hide_dropdown () { + dropdown.hide().empty(); + selected_dropdown_item = null; + } + + function show_dropdown_searching () { + dropdown + .html("

      "+settings.searchingText+"

      ") + .show(); + } + + function show_dropdown_hint () { + dropdown + .html("

      "+settings.hintText+"

      ") + .show(); + } + + // Highlight the query part of the search term + function highlight_term(value, term) { + return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); + } + + // Populate the results dropdown with some results + function populate_dropdown (query, results) { + if(results.length) { + dropdown.empty(); + var dropdown_ul = $("
        ") + .appendTo(dropdown) + .mouseover(function (event) { + select_dropdown_item(get_element_from_event(event, "li")); + }) + .click(function (event) { + add_token(get_element_from_event(event, "li")); + }) + .mousedown(function (event) { + // Stop user selecting text on tokens + return false; + }) + .hide(); + + for(var i in results) { + if (results.hasOwnProperty(i)) { + var this_li = $("
      • "+highlight_term(results[i].name, query)+"
      • ") + .appendTo(dropdown_ul); + + if(i%2) { + this_li.addClass(settings.classes.dropdownItem); + } else { + this_li.addClass(settings.classes.dropdownItem2); + } + + if(i == 0) { + select_dropdown_item(this_li); + } + + $.data(this_li.get(0), "tokeninput", {"id": results[i].id, "name": results[i].name}); + } + } + + dropdown.show(); + dropdown_ul.slideDown("fast"); + + } else { + dropdown + .html("

        "+settings.noResultsText+"

        ") + .show(); + } + } + + // Highlight an item in the results dropdown + function select_dropdown_item (item) { + if(item) { + if(selected_dropdown_item) { + deselect_dropdown_item($(selected_dropdown_item)); + } + + item.addClass(settings.classes.selectedDropdownItem); + selected_dropdown_item = item.get(0); + } + } + + // Remove highlighting from an item in the results dropdown + function deselect_dropdown_item (item) { + item.removeClass(settings.classes.selectedDropdownItem); + selected_dropdown_item = null; + } + + // Do a search and show the "searching" dropdown if the input is longer + // than settings.minChars + function do_search(immediate) { + var query = input_box.val().toLowerCase(); + + if (query && query.length) { + if(selected_token) { + deselect_token($(selected_token), POSITION.AFTER); + } + if (query.length >= settings.minChars) { + show_dropdown_searching(); + if (immediate) { + run_search(query); + } else { + clearTimeout(timeout); + timeout = setTimeout(function(){run_search(query);}, settings.searchDelay); + } + } else { + hide_dropdown(); + } + } + } + + // Do the actual search + function run_search(query) { + var cached_results = cache.get(query); + if(cached_results) { + populate_dropdown(query, cached_results); + } else { + var queryStringDelimiter = settings.url.indexOf("?") < 0 ? "?" : "&"; + var callback = function(results) { + if($.isFunction(settings.onResult)) { + results = settings.onResult.call(this, results); + } + cache.add(query, settings.jsonContainer ? results[settings.jsonContainer] : results); + populate_dropdown(query, settings.jsonContainer ? results[settings.jsonContainer] : results); + }; + + if(settings.method == "POST") { + $.post(settings.url + queryStringDelimiter + settings.queryParam + "=" + query, {}, callback, settings.contentType); + } else { + $.get(settings.url + queryStringDelimiter + settings.queryParam + "=" + query, {}, callback, settings.contentType); + } + } + } +}; + +// Really basic cache for the results +$.TokenList.Cache = function (options) { + var settings = $.extend({ + max_size: 50 + }, options); + + var data = {}; + var size = 0; + + var flush = function () { + data = {}; + size = 0; + }; + + this.add = function (query, results) { + if(size > settings.max_size) { + flush(); + } + + if(!data[query]) { + size++; + } + + data[query] = results; + }; + + this.get = function (query) { + return data[query]; + }; +}; + +})(jQuery); \ No newline at end of file diff --git a/modules/MailManager/resources/token-input-facebook.css b/modules/MailManager/resources/token-input-facebook.css new file mode 100644 index 0000000..40c90dc --- /dev/null +++ b/modules/MailManager/resources/token-input-facebook.css @@ -0,0 +1,120 @@ +/* tokeninput Facebook style */ +ul.token-input-list-facebook { + overflow: hidden; + /*height: auto !important; */ + /*height: 1%; */ + width: 400px; + border: 1px solid #8496ba; + cursor: text; + font-size: 12px; + font-family: Verdana; + min-height: 1px; + z-index: 999; + margin: 0; + padding: 0; + background-color: #fff; + line-height: 1em; +} + +ul.token-input-list-facebook { + list-style-type: none; +} + +ul.token-input-list-facebook li input { + border: 0; + width: 100px; + /*padding: 3px 8px;*/ + padding: 0; + background-color: white; + margin: 2px 0; +} + +li.token-input-token-facebook { + overflow: hidden; + height: auto !important; + height: 1%; + margin: 3px; + padding: 1px 3px 4px 1px; + background-color: #eff2f7; + color: #000; + cursor: default; + border: 1px solid #ccd5e4; + font-size: 11px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + float: left; +} + +li.token-input-token-facebook p { + display: inline; + padding: 0; + margin: 0; +} + +li.token-input-token-facebook span { + color: #a6b3cf; + margin-left: 5px; + font-weight: bold; + cursor: pointer; +} + +li.token-input-selected-token-facebook { + background-color: #5670a6; + border: 1px solid #3b5998; + color: #fff; +} + +li.token-input-input-token-facebook { + float: left; + padding: 0; +} + +div.token-input-dropdown-facebook { + position: absolute; + width: 400px; + background-color: #fff; + overflow: hidden; + border-left: 1px solid #ccc; + border-right: 1px solid #ccc; + border-bottom: 1px solid #ccc; + cursor: default; + font-size: 11px; + font-family: Verdana; + z-index: 1; +} + +div.token-input-dropdown-facebook p { + margin: 0; + padding: 5px; + font-weight: bold; + color: #777; +} + +div.token-input-dropdown-facebook ul { + margin: 0; + padding: 0; +} + +div.token-input-dropdown-facebook ul li { + background-color: #fff; + padding: 3px; +} + +div.token-input-dropdown-facebook ul li.token-input-dropdown-item-facebook { + background-color: #fff; +} + +div.token-input-dropdown-facebook ul li.token-input-dropdown-item2-facebook { + background-color: #fff; +} + +div.token-input-dropdown-facebook ul li em { + font-weight: bold; + font-style: inherit; +} + +div.token-input-dropdown-facebook ul li.token-input-selected-dropdown-item-facebook { + background-color: #3b5998; + color: #fff; +} + diff --git a/modules/MailManager/schema.xml b/modules/MailManager/schema.xml new file mode 100644 index 0000000..ad694e0 --- /dev/null +++ b/modules/MailManager/schema.xml @@ -0,0 +1,48 @@ + + + + + vtiger_mailmanager_mailrel + +
        + + vtiger_mailmanager_mailrecord + +
        + + vtiger_mailmanager_mailattachments + +
        +
        +
        diff --git a/modules/MailManager/src/connectors/Connector.php b/modules/MailManager/src/connectors/Connector.php new file mode 100644 index 0000000..edf0dbd --- /dev/null +++ b/modules/MailManager/src/connectors/Connector.php @@ -0,0 +1,388 @@ +protocol(), 'pop') === 0) $port = 110; // NOT IMPLEMENTED + else if (strcasecmp($model->ssltype(), 'ssl') === 0) $port = 993; // IMAP SSL + + $url = sprintf('{%s:%s/%s/%s/%s}%s', $model->server(), $port, $model->protocol(), + $model->ssltype(), $model->certvalidate(), $folder); + $baseUrl = sprintf('{%s:%s/%s/%s/%s}', $model->server(), $port, $model->protocol(), + $model->ssltype(), $model->certvalidate()); + return new self($url, $model->username(), $model->password(), $baseUrl); + } + + + /** + * Opens up imap connection to the specified url + * @param $url String - mail server url + * @param $username String - user name of the mail box + * @param $password String - pass word of the mail box + * @param $baseUrl Optional - url of the mailserver excluding folder name. + * This is used to fetch the folders of the mail box + */ + function __construct($url, $username, $password, $baseUrl=false) { + $boxUrl = $this->convertCharacterEncoding(html_entity_decode($url),'UTF7-IMAP','UTF-8'); //handle both utf8 characters and html entities + $this->mBoxUrl = $boxUrl; + $this->mBoxBaseUrl = $baseUrl; // Used for folder List + $this->mBox = @imap_open($url, $username, $password); + $this->isError(); + } + + + /** + * Closes the connection + */ + function __destruct() { + $this->close(); + } + + + /** + * Closes the imap connection + */ + function close() { + if (!empty($this->mBox)) { + + if ($this->mModified) imap_close($this->mBox, CL_EXPUNGE); + else imap_close($this->mBox); + + $this->mBox = null; + } + } + + + /** + * Checks for the connection + */ + function isConnected() { + return !empty($this->mBox); + } + + + /** + * Returns the last imap error + */ + function isError() { + $this->mError = imap_last_error(); + return $this->hasError(); + } + + + /** + * Checks if the error exists + */ + function hasError() { + return !empty($this->mError); + } + + + /** + * Returns the error + */ + function lastError() { + return $this->mError; + } + + + /** + * Reads mail box folders + * @param string $ref Optional - + */ + function folders($ref="{folder}") { + if ($this->mFolders) return $this->mFolders; + + $result = imap_getmailboxes($this->mBox, $ref, "*"); + if ($this->isError()) return false; + + $folders = array(); + foreach($result as $row) { + $folderName = str_replace($ref, "", $row->name); + $folder = $this->convertCharacterEncoding( $folderName, "ISO_8859-1", "UTF7-IMAP" ); //Decode folder name + $folders[] = $this->folderInstance($folder); + } + $this->mFolders = $folders; + return $folders; + } + + + /** + * Used to update the folders optionus + * @param imap_stats flag $options + */ + function updateFolders($options=SA_UNSEEN) { + $this->folders(); // Initializes the folder Instance + foreach($this->mFolders as $folder) { + $this->updateFolder($folder, $options); + } + } + + + /** + * Updates the mail box's folder + * @param MailManager_Model_Folder $folder - folder instance + * @param $options imap_status flags like SA_UNSEEN, SA_MESSAGES etc + */ + function updateFolder($folder, $options) { + $mailbox = $this->convertCharacterEncoding($folder->name($this->mBoxUrl), "UTF7-IMAP","ISO_8859-1"); //Encode folder name + $result = @imap_status($this->mBox, $mailbox, $options); + if ($result) { + if (isset($result->unseen)) $folder->setUnreadCount($result->unseen); + if (isset($result->messages)) $folder->setCount($result->messages); + } + } + + + /** + * Returns MailManager_Model_Folder Instance + * @param String $name - folder name + */ + function folderInstance($name) { + return new MailManager_Model_Folder($name); + } + + + /** + * Sets a list of mails with paging + * @param String $folder - MailManager_Model_Folder Instance + * @param Integer $start - Page number + * @param Integer $maxLimit - Number of mails + */ + function folderMails($folder, $start, $maxLimit) { + $folderCheck = @imap_check($this->mBox); + if ($folderCheck->Nmsgs) { + + $reverse_start = $folderCheck->Nmsgs - ($start*$maxLimit); + $reverse_end = $reverse_start - $maxLimit + 1; + + if ($reverse_start < 1) $reverse_start = 1; + if ($reverse_end < 1) $reverse_end = 1; + + $sequence = sprintf("%s:%s", $reverse_start, $reverse_end); + + $records = imap_fetch_overview($this->mBox, $sequence); + $mails = array(); + foreach($records as $result) { + array_unshift($mails, MailManager_Model_Message::parseOverview($result)); + } + $folder->setMails($mails); + $folder->setPaging($reverse_end, $reverse_start, $maxLimit, $folderCheck->Nmsgs, $start); + } + } + + + /** + * Return the cache interval + */ + function clearDBCacheInterval() { + // TODO Provide configuration option. + if (self::$DB_CACHE_CLEAR_INTERVAL) { + return strtotime(self::$DB_CACHE_CLEAR_INTERVAL); + } + return false; + } + + + /** + * Clears the cache data + */ + function clearDBCache() { + // Trigger purne any older mail saved in DB first + $interval = $this->clearDBCacheInterval(); + + $timenow = strtotime("now"); + + // Optimization to avoid trigger for ever mail open (with interval specified) + $lastClearTimeFromSession = false; + if ($interval && isset($_SESSION) && isset($_SESSION['mailmanager_clearDBCacheIntervalLast'])) { + $lastClearTimeFromSession = intval($_SESSION['mailmanager_clearDBCacheIntervalLast']); + if (($timenow - $lastClearTimeFromSession) < ($timenow - $interval)) { + $interval = false; + } + } + if ($interval) { + MailManager_Model_Message::pruneOlderInDB($interval); + $_SESSION['mailmanager_clearDBCacheIntervalLast'] = $timenow; + } + } + + + /** + * Function which deletes the mails + * @param String $msgno - List of message number seperated by commas. + */ + function deleteMail($msgno){ + $msgno = trim($msgno,','); + $msgno = explode(',',$msgno); + for($i = 0;$imBox, $msgno[$i]); + } + } + + + /** + * Function which moves mail to another folder + * @param String $msgno - List of message number separated by commas + * @param String $folderName - folder name + */ + function moveMail($msgno, $folderName){ + $msgno = trim($msgno,','); + $msgno = explode(',',$msgno); + $folder = $this->convertCharacterEncoding(html_entity_decode($folderName),'UTF7-IMAP','UTF-8'); //handle both utf8 characters and html entities + for($i = 0;$imBox, $msgno[$i], $folder); + } + @imap_expunge($this->mBox); + } + + + /** + * Creates an instance of Message + * @param String $msgno - Message number + * @return MailManager_Model_Message + */ + function openMail($msgno) { + $this->clearDBCache(); + return new MailManager_Model_Message($this->mBox, $msgno, true); + } + + + /** + * Marks the mail as Unread + * @param $msgno - Message Number + */ + function markMailUnread($msgno) { + imap_clearflag_full( $this->mBox, $msgno, '\\Seen'); + $this->mModified = true; + } + + + /** + * Marks the mail as Read + * @param String $msgno - Message Number + */ + function markMailRead($msgno) { + imap_setflag_full($this->mBox, $msgno, '\\Seen'); + $this->mModified = true; + } + + + /** + * Searches the Mail Box with the query + * @param String $query - imap search format + * @param MailManager_Model_Folder $folder - folder instance + * @param Integer $start - Page number + * @param Integer $maxLimit - Number of mails + */ + function searchMails($query, $folder, $start, $maxLimit) { + $nos = imap_search($this->mBox, $query); + + if (!empty($nos)) { + $nmsgs = count($nos); + + $reverse_start = $nmsgs - ($start*$maxLimit); + $reverse_end = $reverse_start - $maxLimit; + + if ($reverse_start < 1) $reverse_start = 1; + if ($reverse_end < 1) $reverse_end = 0; + + if($nmsgs > 1) + $nos = array_slice($nos, $reverse_end, ($reverse_start-$reverse_end)); + + // Reverse order the messages + rsort($nos, SORT_NUMERIC); + + $mails = array(); + $records = imap_fetch_overview($this->mBox, implode(',', $nos)); + foreach($records as $result) { + array_unshift($mails, MailManager_Model_Message::parseOverview($result)); + } + $folder->setMails($mails); + $folder->setPaging($reverse_end, $reverse_start, $maxLimit, $nmsgs, $start); //-1 as it starts from 0 + } + } + + + /** + * Returns list of Folder for the Mail Box + * @return Array folder list + */ + function getFolderList() { + if(!empty($this->mBoxBaseUrl)) { + $list = @imap_list($this->mBox, $this->mBoxBaseUrl, '*'); + if (is_array($list)) { + foreach ($list as $val) { + $folder = $this->convertCharacterEncoding( $val, 'ISO_8859-1', 'UTF7-IMAP' ); //Decode folder name + $folderList[] = preg_replace("/{(.*?)}/", "", $folder); + } + } + } + return $folderList; + } + + function convertCharacterEncoding($value, $toCharset, $fromCharset) { + if (function_exists('mb_convert_encoding')) { + $value = mb_convert_encoding($value, $toCharset, $fromCharset); + } else { + $value = iconv($toCharset, $fromCharset, $value); + } + return $value; + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/Controller.php b/modules/MailManager/src/controllers/Controller.php new file mode 100644 index 0000000..53fe777 --- /dev/null +++ b/modules/MailManager/src/controllers/Controller.php @@ -0,0 +1,122 @@ +assign('MAILBOX', $this->getMailboxModel()); + $viewer->assign('MODULE', $currentModule); + return $viewer; + } + + /** + * Function which fetches the template file + * @global String $currentModule + * @param String $filename + * @return template file + */ + function getModuleTpl($filename) { + global $currentModule; + return vtlib_getModuleTemplate($currentModule, $filename); + } + + /** + * Mail Manager Connector + * @var MailManager_Connector + */ + protected $mConnector = false; + + /** + * MailBox folder name + * @var string + */ + protected $mFolder = false; + + /** + * Connector to the IMAP server + * @var MailManager_Model_Mailbox + */ + protected $mMailboxModel = false; + + /** + * Returns the active Instance of Current Users MailBox + * @return MailManager_Model_Mailbox + */ + protected function getMailboxModel() { + if ($this->mMailboxModel === false) { + $this->mMailboxModel = MailManager_Model_Mailbox::activeInstance(); + } + return $this->mMailboxModel; + } + + /** + * Checks if the current users has provided Mail Server details + * @return Boolean + */ + protected function hasMailboxModel() { + $model = $this->getMailboxModel(); + return $model->exists(); + } + + /** + * Returns a Connector to either MailBox or Internal Drafts + * @param String $folder - Name of the folder + * @return MailManager_Connector + */ + protected function getConnector($folder='') { + if (!$this->mConnector || ($this->mFolder != $folder)) { + if($folder == "__vt_drafts") { + $draftController = new MailManager_DraftController(); + $this->mConnector = $draftController->connectorWithModel(); + } else { + if ($this->mConnector) $this->mConnector->close(); + + $model = $this->getMailboxModel(); + $this->mConnector = MailManager_Connector::connectorWithModel($model, $folder); + } + $this->mFolder = $folder; + } + return $this->mConnector; + } + + /** + * Function that closes connection to IMAP server + */ + function closeConnector() { + if ($this->mConnector) { + $this->mConnector->close(); + $this->mConnector = false; + } + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/DraftController.php b/modules/MailManager/src/controllers/DraftController.php new file mode 100644 index 0000000..d8e5319 --- /dev/null +++ b/modules/MailManager/src/controllers/DraftController.php @@ -0,0 +1,45 @@ +'SUBJECT', 'saved_toid'=>'TO','description'=>'BODY','bccmail'=>'BCC','ccmail'=>'CC'); + return $options; + } + + /** + * Function which returns the Draft Model + * @return MailManager_Model_DraftEmail + */ + function connectorWithModel() { + if ($this->mMailboxModel === false) { + $this->mMailboxModel = MailManager_Model_DraftEmail::getInstance(); + } + return $this->mMailboxModel; + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/FolderController.php b/modules/MailManager/src/controllers/FolderController.php new file mode 100644 index 0000000..e0e5f95 --- /dev/null +++ b/modules/MailManager/src/controllers/FolderController.php @@ -0,0 +1,86 @@ + $list_max_entries_per_page + * @param MailManager_Request $request + * @return MailManager_Response + */ + function process(MailManager_Request $request) { + global $list_max_entries_per_page; + $response = new MailManager_Response(); + + if ('open' == $request->getOperationArg()) { + $q = $request->get('q'); + $foldername = $request->get('_folder'); + $type = $request->get('type'); + + $connector = $this->getConnector($foldername); + $folder = $connector->folderInstance($foldername); + + if (empty($q)) { + $connector->folderMails($folder, intval($request->get('_page', 0)), $list_max_entries_per_page); + } else { + if(empty($type)) { + $type='ALL'; + } + $q = ''.$type.' "'.vtlib_purify($q).'"'; + $connector->searchMails($q, $folder, intval($request->get('_page', 0)), $list_max_entries_per_page); + } + + $folderList = $connector->getFolderList(); + + $viewer = $this->getViewer(); + + $viewer->assign('TYPE', $type); + $viewer->assign('QUERY', $request->get('q')); + $viewer->assign('FOLDER', $folder); + $viewer->assign('FOLDERLIST', $folderList); + $viewer->assign('SEARCHOPTIONS' ,self::getSearchOptions()); + + $response->setResult( $viewer->fetch( $this->getModuleTpl( 'Folder.Open.tpl' ) ) ); + } elseif('drafts' == $request->getOperationArg()) { + $q = $request->get('q'); + $type = $request->get('type'); + $page = intval($request->get('_page', 0)); + + $connector = $this->getConnector('__vt_drafts'); + $folder = $connector->folderInstance(); + + if(empty($q)) { + $draftMails = $connector->getDrafts($page, $list_max_entries_per_page, $folder); + } else { + $draftMails = $connector->searchDraftMails($q, $type, $page, $list_max_entries_per_page, $folder); + } + + $viewer = $this->getViewer(); + $viewer->assign('MAILS', $draftMails); + $viewer->assign('FOLDER', $folder); + $viewer->assign('SEARCHOPTIONS' ,MailManager_DraftController::getSearchOptions()); + $response->setResult($viewer->fetch($this->getModuleTpl('Folder.Drafts.tpl'))); + } + return $response; + } + + /** + * Returns the List of search string on the MailBox + * @return string + */ + static function getSearchOptions(){ + $options = array('SUBJECT','TO','BODY','BCC','CC','FROM'); + return $options; + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/MailController.php b/modules/MailManager/src/controllers/MailController.php new file mode 100644 index 0000000..371f267 --- /dev/null +++ b/modules/MailManager/src/controllers/MailController.php @@ -0,0 +1,312 @@ +getOperationArg()) { + $foldername = $request->get('_folder'); + $connector = $this->getConnector($foldername); + $folder = $connector->folderInstance($foldername); + + $connector->markMailRead($request->get('_msgno')); + + $mail = $connector->openMail($request->get('_msgno')); + + // Get updated count after opening the email + $connector->updateFolder($folder, SA_MESSAGES|SA_UNSEEN); + + $viewer = $this->getViewer(); + $viewer->assign('FOLDER', $folder); + $viewer->assign('MAIL', $mail); + $uicontent = $viewer->fetch($this->getModuleTpl('Mail.Open.tpl')); + + $metainfo = array( + 'from' => $mail->from(), 'subject' => $mail->subject(), + 'msgno' => $mail->msgNo(), 'msguid' => $mail->uniqueid(), + 'folder' => $foldername ); + + $response->isJson(true); + $response->setResult( array( + 'folder' => $foldername, 'unread' => $folder->unreadCount(), + 'ui' => $uicontent, 'meta' => $metainfo ) + ); + + } else if ('mark' == $request->getOperationArg()) { + $foldername = $request->get('_folder'); + $connector = $this->getConnector($foldername); + $folder = $connector->folderInstance($foldername); + $connector->updateFolder($folder, SA_UNSEEN); + + if ('unread' == $request->get('_markas')) { + $connector->markMailUnread($request->get('_msgno')); + } + + $response->isJson(true); + $response->setResult ( array('folder' => $foldername, 'unread' => $folder->unreadCount()+1, + 'status' => true, 'msgno' => $request->get('_msgno') )); + + }else if('delete' == $request->getOperationArg()){ + $msg_no = $request->get('_msgno'); + $foldername = $request->get('_folder'); + $connector = $this->getConnector($foldername); + $connector->deleteMail($msg_no); + + $response->isJson(true); + $response->setResult(array('folder' => $foldername,'status'=>true)); + } else if('move' == $request->getOperationArg()){ + $msg_no = $request->get('_msgno'); + $foldername = $request->get('_folder'); + + $moveToFolder = $request->get('_moveFolder'); + $connector = $this->getConnector($foldername); + $connector->moveMail($msg_no, $moveToFolder); + + $response->isJson(true); + $response->setResult(array('folder' => $foldername,'status'=>true)); + } else if ('send' == $request->getOperationArg()) { + require_once 'modules/MailManager/config.inc.php'; + + // This is to handle larger uploads + $memory_limit = ConfigPrefs::get('MEMORY_LIMIT'); + ini_set('memory_limit', $memory_limit); + + $to_string = rtrim($request->get('to'), ','); + $connector = $this->getConnector('__vt_drafts'); + + if (!empty($to_string)) { + $toArray = explode(',', $to_string); + foreach($toArray as $to) { + $relatedtos = MailManager::lookupMailInVtiger($to, $current_user); + $referenceArray = Array('Contacts','Accounts','Leads'); + for($j=0;$j 0){ + $relateto = vtws_getIdComponents($relatedtos[0]['record']); + $parentIds = $relateto[1]."@1"; + break; + } + } + + $cc_string = rtrim($request->get('cc'), ','); + $bcc_string= rtrim($request->get('bcc'), ','); + $subject = $request->get('subject'); + $body = $request->get('body'); + + if($relateto[1]!= NULL) { + $entityId = $relateto[1]; + $parent_module = getSalesEntityType($entityId); + $description = getMergedDescription($body,$entityId,$parent_module); + } else { + $description = $body; + } + + $fromEmail = $connector->getFromEmailAddress(); + $userFullName = getFullNameFromArray('Users', $current_user->column_fields); + $userId = $current_user->id; + + $mailer = new Vtiger_Mailer(); + $mailer->IsHTML(true); + $mailer->ConfigSenderInfo($fromEmail, $userFullName, $current_user->email1); + $mailer->Subject = $subject; + $mailer->Body = $description; + $mailer->addSignature($userId); + if($mailer->Signature != '') { + $mailer->Body.= $mailer->Signature; + } + + $ccs = empty($cc_string)? array() : explode(',', $cc_string); + $bccs= empty($bcc_string)?array() : explode(',', $bcc_string); + $emailId = $request->get('emailid'); + + $attachments = $connector->getAttachmentDetails($emailId); + + $mailer->AddAddress($to); + foreach($ccs as $cc) $mailer->AddCC($cc); + foreach($bccs as $bcc)$mailer->AddBCC($bcc); + global $root_directory; + + if(is_array($attachments)) { + foreach($attachments as $attachment){ + $fileNameWithPath = $root_directory.$attachment['path'].$attachment['fileid']."_".$attachment['attachment']; + if(is_file($fileNameWithPath)) { + $mailer->AddAttachment($fileNameWithPath, $attachment['attachment']); + } + } + } + $status = $mailer->Send(true); + } + } + + if ($status === true) { + $email = CRMEntity::getInstance('Emails'); + $email->column_fields['assigned_user_id'] = $current_user->id; + $email->column_fields['date_start'] = date('Y-m-d'); + $email->column_fields['time_start'] = date('H:i'); + $email->column_fields['parent_id'] = $parentIds; + $email->column_fields['subject'] = $mailer->Subject; + $email->column_fields['description'] = $mailer->Body; + $email->column_fields['activitytype'] = 'Emails'; + $email->column_fields['from_email'] = $mailer->From; + $email->column_fields['saved_toid'] = $to_string; + $email->column_fields['ccmail'] = $cc_string; + $email->column_fields['bccmail'] = $bcc_string; + $email->column_fields['email_flag'] = 'SENT'; + if(empty($emailId)) { + $email->save('Emails'); + } else { + $email->id = $emailId; + $email->mode = 'edit'; + $email->save('Emails'); + } + $response->isJson(true); + $response->setResult( array('sent'=> true) ); + } else { + $response->isJson(true); + $response->setError(112, 'please verify outgoing server.'); + } + } else if ('attachment_dld' == $request->getOperationArg()) { + $attachmentName = $request->get('_atname'); + $attachmentName= str_replace(' ', '_', $attachmentName); + + if (MailManager_Utils::allowedFileExtension($attachmentName)) { + // This is to handle larger uploads + $memory_limit = ConfigPrefs::get('MEMORY_LIMIT'); + ini_set('memory_limit', $memory_limit); + + $mail = new MailManager_Model_Message(false, false); + $mail->readFromDB($request->get('_muid')); + $attachment = $mail->attachments(true, $attachmentName); + + if($attachment[$attachmentName]) { + // Send as downloadable + header("Content-type: application/octet-stream"); + header("Pragma: public"); + header("Cache-Control: private"); + header("Content-Disposition: attachment; filename=$attachmentName"); + echo $attachment[$attachmentName]; + } else { + header("Content-Disposition: attachment; filename=INVALIDFILE"); + echo ""; + } + } else { + header("Content-Disposition: attachment; filename=INVALIDFILE"); + echo ""; + } + flush(); + exit; + } elseif('getdraftmail' == $request->getOperationArg()) { + $connector = $this->getConnector('__vt_drafts'); + $draftMail = $connector->getDraftMail($request); + $response->isJson(true); + $response->setResult(array($draftMail)); + } elseif('save' == $request->getOperationArg()){ + $connector = $this->getConnector('__vt_drafts'); + $draftId = $connector->saveDraft($request); + + $response->isJson(true); + if(!empty($draftId)) { + $response->setResult( array('success'=> true,'emailid'=>$draftId) ); + } else { + $response->setResult( array('success'=> false,'error'=>"Draft was not saved") ); + } + } elseif('deleteAttachment' == $request->getOperationArg()) { + $connector = $this->getConnector('__vt_drafts'); + $deleteResponse = $connector->deleteAttachment($request); + + $response->isJson(true); + $response->setResult(array('success'=> $deleteResponse)); + + } elseif('forward' == $request->getOperationArg()) { + $messageId = $request->get('messageid'); + $folderName = $request->get('folder'); + + $connector = $this->getConnector($folderName); + $mail = $connector->openMail($messageId); + + $attachments = $mail->attachments(true); + + $draftConnector = $this->getConnector('__vt_drafts'); + $draftId = $draftConnector->saveDraft($request); + + if (!empty($attachments)) { + foreach($attachments as $aName => $aValue) { + $attachInfo = $mail->__SaveAttachmentFile($aName, $aValue); + if(is_array($attachInfo) && !empty($attachInfo) && $attachInfo['size'] > 0) { + + if(!MailManager::checkModuleWriteAccessForCurrentUser('Documents')) return; + + $document = CRMEntity::getInstance('Documents'); + $document->column_fields['notes_title'] = $attachInfo['name']; + $document->column_fields['filename'] = $attachInfo['name']; + $document->column_fields['filestatus'] = 1; + $document->column_fields['filelocationtype'] = 'I'; + $document->column_fields['folderid'] = 1; // Default Folder + $document->column_fields['filesize'] = $attachInfo['size']; + $document->column_fields['assigned_user_id'] = $current_user->id; + $document->save('Documents'); + + //save doc-attachment relation + $draftConnector->saveAttachmentRel($document->id, $attachInfo['attachid']); + + //save email-doc relation + $draftConnector->saveEmailDocumentRel($draftId, $document->id); + + //save email-attachment relation + $draftConnector->saveAttachmentRel($draftId, $attachInfo['attachid']); + + $attachmentInfo[] = array('name'=>$attachInfo['name'], 'size'=>$attachInfo['size'], 'emailid'=>$draftId, 'docid'=>$document->id); + } + unset($aValue); + } + } + $response->isJson(true); + $response->setResult(array('attachments'=>$attachmentInfo, 'emailid'=>$draftId)); + } + return $response; + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/MainUIController.php b/modules/MailManager/src/controllers/MainUIController.php new file mode 100644 index 0000000..5525c64 --- /dev/null +++ b/modules/MailManager/src/controllers/MainUIController.php @@ -0,0 +1,50 @@ +getViewer(); + if($request->getOperationArg() == "_quicklinks") { + $content = $viewer->fetch($this->getModuleTpl('Mainui.QuickLinks.tpl')); + $response->setResult( array('ui' => $content)); + return $response; + } else { + if ($this->hasMailboxModel()) { + $connector = $this->getConnector(); + + if ($connector->hasError()) { + $viewer->assign('ERROR', $connector->lastError()); + } else { + $folders = $connector->folders(); + $connector->updateFolders(); + $viewer->assign('FOLDERS', $folders); + } + $this->closeConnector(); + } + $viewer->assign('MODULE', $currentModule); + $content = $viewer->fetch($this->getModuleTpl('Mainui.tpl')); + $response->setResult( array('mailbox' => $this->hasMailboxModel(), 'ui' => $content)); + return $response; + } + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/RelationController.php b/modules/MailManager/src/controllers/RelationController.php new file mode 100644 index 0000000..6ec58d7 --- /dev/null +++ b/modules/MailManager/src/controllers/RelationController.php @@ -0,0 +1,406 @@ +skipConnection) return false; + return parent::getMailboxModel(); + } + + /** + * List of modules used to match the Email address + * @var Array + */ + static $MODULES = array ( 'Contacts', 'Accounts', 'Leads'); + + /** + * Process the request to perform relationship operations + * @global Users Instance $current_user + * @global PearDataBase Instance $adb + * @global String $currentModule + * @param MailManager_Request $request + * @return boolean + */ + function process(MailManager_Request $request) { + global $current_user, $adb; + $response = new MailManager_Response(true); + $viewer = $this->getViewer(); + + if ('find' == $request->getOperationArg()) { + $this->skipConnection = true; // No need to connect to mailbox here, improves performance + + // Check if the message is already linked. + $linkedto = MailManager_RelationControllerAction::associatedLink($request->get('_msguid')); + // If the message was not linked, lookup for matching records, using FROM address + if (empty($linkedto)) { + $results = array(); + $modules = array(); + $allowedModules = $this->getCurrentUserMailManagerAllowedModules(); + foreach (self::$MODULES as $MODULE) { + if(!in_array($MODULE, $allowedModules)) continue; + + $from = $request->get('_mfrom'); + if(empty($from)) continue; + + $results[$MODULE] = $this->lookupModuleRecordsWithEmail($MODULE, $from); + $describe = $this->ws_describe($MODULE); + $modules[$MODULE] = array('label' => $describe['label'], 'name' => textlength_check($describe['name']), 'id' => $describe['idPrefix'] ); + + // If look is found in a module, skip rest. - for performance + //if (!empty($results[$MODULE])) break; + } + $viewer->assign('LOOKUPS', $results); + $viewer->assign('MODULES', $modules); + } else { + $viewer->assign('LINKEDTO', $linkedto); + } + + $viewer->assign('LinkToAvailableActions', $this->linkToAvailableActions()); + $viewer->assign('AllowedModules', $allowedModules); + $viewer->assign('MSGNO', $request->get('_msgno')); + $viewer->assign('FOLDER', $request->get('_folder')); + + $response->setResult( array( 'ui' => $viewer->fetch( $this->getModuleTpl('Relationship.tpl') ) ) ); + + } else if ('link' == $request->getOperationArg()) { + + $linkto = $request->get('_mlinkto'); + $foldername = $request->get('_folder'); + $connector = $this->getConnector($foldername); + + // This is to handle larger uploads + $memory_limit = ConfigPrefs::get('MEMORY_LIMIT'); + ini_set('memory_limit', $memory_limit); + + $mail = $connector->openMail($request->get('_msgno')); + $mail->attachments(); // Initialize attachments + + $linkedto = MailManager_RelationControllerAction::associate($mail, $linkto); + + $viewer->assign('LinkToAvailableActions', $this->linkToAvailableActions()); + $viewer->assign('AllowedModules', $this->getCurrentUserMailManagerAllowedModules()); + $viewer->assign('LINKEDTO', $linkedto); + $viewer->assign('MSGNO', $request->get('_msgno')); + $viewer->assign('FOLDER', $foldername); + $response->setResult( array( 'ui' => $viewer->fetch( $this->getModuleTpl('Relationship.tpl') ) ) ); + + } else if ('create_wizard' == $request->getOperationArg()) { + global $currentModule; + $moduleName = $request->get('_mlinktotype'); + $parent = $request->get('_mlinkto'); + $foldername = $request->get('_folder'); + + $connector = $this->getConnector($foldername); + $mail = $connector->openMail($request->get('_msgno')); + + $qcreate_array = QuickCreate($moduleName); + $validationData = $qcreate_array['data']; + $data = split_validationdataArray($validationData); + + $qcreate_array['form'] = $this->processFormData($qcreate_array['form'], $mail); + + $viewer->assign("QUICKCREATE", $qcreate_array['form']); + + if($moduleName == 'Calendar') + $viewer->assign("QCMODULE", getTranslatedString('Todo', 'Calendar')); + elseif($moduleName == "HelpDesk") + $viewer->assign("QCMODULE", getTranslatedString('Ticket', 'HelpDesk')); + else + $viewer->assign("QCMODULE",getTranslatedString("SINGLE_".$moduleName, $moduleName)); + + $viewer->assign("PARENT", $parent); + $viewer->assign("MODULE", $moduleName); + $viewer->assign('MSGNO', $request->get('_msgno')); + $viewer->assign('FOLDER', $foldername); + $viewer->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); + $viewer->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); + $viewer->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); + $viewer->display( $this->getModuleTpl('Relationship.CreateWizard.tpl') ); + $response = false; + + } else if ('create' == $request->getOperationArg()) { + $linkModule = $request->get('_mlinktotype'); + $parent = $request->get('_mlinkto'); + + $focus = CRMEntity::getInstance($linkModule); + + // This is added as ModComments module has a bug that will not initialize column_fields + // Basically $currentModule is set to MailManager, so the fields are not set properly. + if(empty($focus->column_fields)) { + $focus->column_fields = getColumnFields($linkModule); + } + + setObjectValuesFromRequest($focus); + + if($request->get('assigntype') == 'U') { + $focus->column_fields['assigned_user_id'] = $request->get('assigned_user_id'); + } elseif($request->get('assigntype') == 'T') { + $focus->column_fields['assigned_user_id'] = $request->get('assigned_group_id'); + } + + $foldername = $request->get('_folder'); + + if(!empty($foldername)) { + // This is to handle larger uploads + $memory_limit = ConfigPrefs::get('MEMORY_LIMIT'); + ini_set('memory_limit', $memory_limit); + + $connector = $this->getConnector($foldername); + $mail = $connector->openMail($request->get('_msgno')); + $attachments = $mail->attachments(); // Initialize attachments + } + + $linkedto = MailManager_RelationControllerAction::getSalesEntityInfo($parent); + + switch ($linkModule) { + case 'Calendar' : if (empty($focus->column_fields['activitytype'])) { + $focus->column_fields['activitytype'] = 'Task'; + } + + if (empty($focus->column_fields['due_date'])) { + if(!empty($focus->column_fields['date_start'])) { + $dateStart = getValidDBInsertDateValue($focus->column_fields['date_start']); + $focus->column_fields['due_date'] = date("Y-m-d", strtotime(date("Y-m-d", strtotime($dateStart)) . " +1 day")); + } else { + $focus->column_fields['due_date'] = date('Y-m-d', strtotime("+1 day")); + } + } + if(!empty($parent)) { + if($linkedto['module'] == 'Contacts') { + $focus->column_fields['contact_id'] = $parent; + } else { + $focus->column_fields['parent_id'] = $parent; + } + } + break; + + case 'HelpDesk' : $from = $mail->from(); + $focus->column_fields['parent_id'] = $this->setParentForHelpDesk($parent, $from); + break; + + case 'ModComments': $focus->column_fields['assigned_user_id'] = $current_user->id; + $focus->column_fields['creator'] = $current_user->id; + $focus->column_fields['related_to'] = $parent; + break; + } + + try { + $focus->save($linkModule); + + // This condition is added so that emails are not created for Tickets and Todo without Parent, + // as there is no way to relate them + if(empty($parent) && $linkModule != 'HelpDesk' && $linkModule != 'Calendar') { + $linkedto = MailManager_RelationControllerAction::associate($mail, $focus->id); + } + + // add attachments to the tickets as Documents + if($linkModule == 'HelpDesk' && !empty($attachments)) { + $relationController = new MailManager_RelationControllerAction(); + $relationController->__SaveAttachements($mail, $linkModule, $focus); + } + + $viewer->assign('MSGNO', $request->get('_msgno')); + $viewer->assign('LINKEDTO', $linkedto); + $viewer->assign('AllowedModules', $this->getCurrentUserMailManagerAllowedModules()); + $viewer->assign('LinkToAvailableActions', $this->linkToAvailableActions()); + $viewer->assign('FOLDER', $foldername); + + $response->setResult( array( 'ui' => $viewer->fetch( $this->getModuleTpl('Relationship.tpl') ) ) ); + } catch(Exception $e) { + $response->setResult( array( 'ui' => '', 'error' => $e )); + } + + } else if ('savedraft' == $request->getOperationArg()) { + $connector = $this->getConnector('__vt_drafts'); + $draftResponse = $connector->saveDraft($request); + $response->setResult($draftResponse); + } else if ('saveattachment' == $request->getOperationArg()) { + $connector = $this->getConnector('__vt_drafts'); + $uploadResponse = $connector->saveAttachment($request); + $response->setResult($uploadResponse); + } else if ('commentwidget' == $request->getOperationArg()) { + $viewer->assign('LINKMODULE', $request->get('_mlinktotype')); + $viewer->assign('PARENT', $request->get('_mlinkto')); + $viewer->assign('MSGNO', $request->get('_msgno')); + $viewer->assign('FOLDER', $request->get('_folder')); + $viewer->display( $this->getModuleTpl('MailManager.CommentWidget.tpl') ); + $response = false; + } + return $response; + } + + /** + * Returns the Parent for Tickets module + * @global Users Instance $current_user + * @param Integer $parent - crmid of Parent + * @param Email Address $from - Email Address of the received mail + * @return Integer - Parent(crmid) + */ + public function setParentForHelpDesk($parent, $from) { + global $current_user; + if(empty($parent)) { + if(!empty($from)) { + $parentInfo = MailManager::lookupMailInVtiger($from[0], $current_user); + if(!empty($parentInfo[0]['record'])) { + $parentId = vtws_getIdComponents($parentInfo[0]['record']); + return $parentId[1]; + } + } + } else { + return $parent; + } + } + + + /** + * Function used to set the record fields with the information from mail. + * @param Array $qcreate_array + * @param MailManager_Model_Message $mail + * @return Array + */ + function processFormData($qcreate_array, $mail) { + $subject = $mail->subject(); + $from = $mail->from(); + + if(!empty($from)) $mail_fromAddress = implode(',', $from); + if(!empty($mail_fromAddress)) $name = explode('@', $mail_fromAddress); + if(!empty($name[1])) $companyName = explode('.', $name[1]); + + $defaultFieldValueMap = array( 'lastname' => $name[0], + 'email' => $mail_fromAddress, + 'email1' => $mail_fromAddress, + 'accountname' => $companyName[0], + 'company' => $companyName[0], + 'ticket_title' => $subject, + 'subject' => $subject, + ); + $defaultFieldValueMapKeys = array_keys($defaultFieldValueMap); + + foreach($qcreate_array as $qc_array) { + $new_qc_array = array(); + foreach($qc_array as $q_array) { + if(in_array($q_array[2][0], $defaultFieldValueMapKeys)) { + if($q_array[2][0] == "lastname") { + $q_array[3][1] = $defaultFieldValueMap[$q_array[2][0]]; + } else { + $q_array[3][0] = $defaultFieldValueMap[$q_array[2][0]]; + } + } + $new_qc_array[] = $q_array; + } + $new_qcreate_array[] = $new_qc_array; + } + return $new_qcreate_array; + } + + /** + * Returns the available List of accessible modules for Mail Manager + * @return Array + */ + public function getCurrentUserMailManagerAllowedModules() { + $moduleListForCreateRecordFromMail = array('Contacts', 'Accounts', 'Leads', 'HelpDesk', 'Calendar'); + + foreach($moduleListForCreateRecordFromMail as $module) { + if(MailManager::checkModuleWriteAccessForCurrentUser($module)) { + $mailManagerAllowedModules[] = $module; + } + } + return $mailManagerAllowedModules; + } + + /** + * Returns the list of accessible modules on which Actions(Relationship) can be taken. + * @return string + */ + public function linkToAvailableActions() { + $moduleListForLinkTo = array('Calendar','HelpDesk','ModComments','Emails'); + + foreach($moduleListForLinkTo as $module) { + if(MailManager::checkModuleWriteAccessForCurrentUser($module)) { + $mailManagerAllowedModules[] = $module; + } + } + return $mailManagerAllowedModules; + } + + /** + * Helper function to scan for relations + */ + protected $wsDescribeCache = array(); + function ws_describe($module) { + global $current_user; + if (!isset($this->wsDescribeCache[$module])) { + $this->wsDescribeCache[$module] = vtws_describe( $module, $current_user ); + } + return $this->wsDescribeCache[$module]; + } + + /** + * Funtion used to build Web services query + * @param String $module - Name of the module + * @param String $text - Search String + * @param String $type - Tyoe of fields Phone, Email etc + * @return String + */ + function buildSearchQuery($module, $text, $type) { + $describe = $this->ws_describe($module); + $whereClause = ''; + foreach($describe['fields'] as $field) { + if (strcasecmp($type, $field['type']['name']) === 0) { + $whereClause .= sprintf( " %s LIKE '%%%s%%' OR", $field['name'], $text ); + } + } + return sprintf( "SELECT %s FROM %s WHERE %s;", $describe['labelFields'], $module, rtrim($whereClause, 'OR') ); + } + + /** + * Returns the List of Matching records with the Email Address + * @global Users Instance $current_user + * @param String $module + * @param Email Address $email + * @return Array + */ + function lookupModuleRecordsWithEmail($module, $email) { + global $current_user; + $query = $this->buildSearchQuery($module, $email, 'EMAIL'); + $qresults = vtws_query( $query, $current_user ); + $describe = $this->ws_describe($module); + $labelFields = explode(',', $describe['labelFields']); + + $results = array(); + foreach($qresults as $qresult) { + $labelValues = array(); + foreach($labelFields as $fieldname) { + if(isset($qresult[$fieldname])) $labelValues[] = $qresult[$fieldname]; + } + $ids = vtws_getIdComponents($qresult['id']); + $results[] = array( 'wsid' => $qresult['id'], 'id' => $ids[1], 'label' => implode(' ', $labelValues)); + } + return $results; + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/RelationControllerAction.php b/modules/MailManager/src/controllers/RelationControllerAction.php new file mode 100644 index 0000000..a62269e --- /dev/null +++ b/modules/MailManager/src/controllers/RelationControllerAction.php @@ -0,0 +1,278 @@ +getMeta(); + if ($meta->hasWriteAccess() != true) { + return false; + } + + $focus = new Emails(); + $focus->column_fields['activitytype'] = 'Emails'; + $focus->column_fields['subject'] = $mailrecord->_subject; + + if(!empty($module)) $focus->column_fields['parent_type'] = $module; + if(!empty($linkfocus->id)) $focus->column_fields['parent_id'] = "$linkfocus->id@-1|"; + + $focus->column_fields['description'] = $mailrecord->getBodyHTML(); + $focus->column_fields['assigned_user_id'] = $linkfocus->column_fields['assigned_user_id']; + $focus->column_fields["date_start"]= date('Y-m-d', $mailrecord->_date); + $focus->column_fields["email_flag"] = 'MailManager'; + + $from=$mailrecord->_from[0]; + $to = $mailrecord->_to[0]; + $cc = (!empty($mailrecord->_cc))? implode(',', $mailrecord->_cc) : ''; + $bcc= (!empty($mailrecord->_bcc))? implode(',', $mailrecord->_bcc) : ''; + + //emails field were restructured and to,bcc and cc field are JSON arrays + $focus->column_fields['from_email'] = $from; + $focus->column_fields['saved_toid'] = $to; + $focus->column_fields['ccmail'] = $cc; + $focus->column_fields['bccmail'] = $bcc; + $focus->save('Emails'); + + $emailid = $focus->id; + + // TODO: Handle attachments of the mail (inline/file) + $this->__SaveAttachements($mailrecord, 'Emails', $focus); + + return $emailid; + } + + /** + * Save attachments from the email and add it to the module record. + * @global PearDataBase $adb + * @global String $root_directory + * @param MailManager_Model_Message $mailrecord + * @param String $basemodule + * @param CRMEntity $basefocus + */ + function __SaveAttachements($mailrecord, $basemodule, $basefocus) { + global $adb, $root_directory; + + // If there is no attachments return + if(!$mailrecord->_attachments) return; + + $userid = $basefocus->column_fields['assigned_user_id']; + $setype = "$basemodule Attachment"; + + $date_var = $adb->formatDate(date('YmdHis'), true); + + foreach($mailrecord->_attachments as $filename=>$filecontent) { + + if(empty($filecontent)) continue; + + $attachid = $adb->getUniqueId('vtiger_crmentity'); + $description = $filename; + $usetime = $adb->formatDate($date_var, true); + + $adb->pquery("INSERT INTO vtiger_crmentity(crmid, smcreatorid, smownerid, + modifiedby, setype, description, createdtime, modifiedtime, presence, deleted) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + Array($attachid, $userid, $userid, $userid, $setype, $description, $usetime, $usetime, 1, 0)); + + $issaved = $this->__SaveAttachmentFile($attachid, $filename, $filecontent); + + if($issaved) { + // To compute file size & type + $attachRes = $adb->pquery("SELECT * FROM vtiger_attachments WHERE attachmentsid = ?", array($attachid)); + if($adb->num_rows($attachRes)) { + $filePath = $adb->query_result($attachRes, 0, 'path'); + $completeFilePath = $root_directory.$filePath. $attachid.'_'. $filename; + if(file_exists($completeFilePath)) { + $fileSize = filesize($completeFilePath); + $mimetype = MailAttachmentMIME::detect($completeFilePath); + } + } + + // Create document record + $docInfo = array('title'=>$filename, 'filename'=>$filename, 'assigneduser'=>$userid, + 'size'=> $fileSize, 'filetype'=>$mimetype); + $documentId = $this->createDocument($docInfo); + + // Link file attached to document + if(!empty($documentId) && !empty($attachid)) { + $this->relateAttachment($documentId, $attachid); + } + + // Link document to base record + if(!empty($basefocus->id) && !empty($documentId)) { + $this->relatedDocument($basefocus->id, $documentId); + } + + // Link file attached to emails also, for it to appear on email's page + if(!empty($basefocus->id) && !empty($attachid)) { + $this->relateAttachment($basefocus->id, $attachid); + } + } + } + } + + /** + * Creates a Document + * @global Users $current_user + * @param Array $info + * @return Integer + */ + function createDocument($info) { + global $current_user; + $handler = vtws_getModuleHandlerFromName('Documents', $current_user); + $meta = $handler->getMeta(); + if ($meta->hasWriteAccess() != true) { + return false; + } + $document = CRMEntity::getInstance('Documents'); + $document->column_fields['notes_title'] = $info['title']; + $document->column_fields['filename'] = $info['filename']; + $document->column_fields['filesize'] = $info['size']; + $document->column_fields['filetype'] = $info['filetype']; + $document->column_fields['filestatus'] = 1; + $document->column_fields['filelocationtype'] = 'I'; + $document->column_fields['folderid'] = 1; // Default Folder + $document->column_fields['assigned_user_id'] = $info['assigneduser']; + $document->save('Documents'); + return $document->id; + } + + /** + * + * @global Users $current_user + * @param MailManager_Model_Message $mailrecord + * @param Integer $linkto + * @return Array + */ + static function associate($mailrecord, $linkto) { + global $current_user; + $instance = new self(); + + $modulename = getSalesEntityType($linkto); + $linkfocus = CRMEntity::getInstance($modulename); + $linkfocus->retrieve_entity_info($linkto, $modulename); + $linkfocus->id = $linkto; + + $emailid = $instance->__CreateNewEmail($mailrecord, $modulename, $linkfocus); + + if (!empty($emailid)) { + MailManager::updateMailAssociation($mailrecord->uniqueid(), $emailid, $linkfocus->id); + } + + $name = getEntityName($modulename, $linkto); + $detailInformation = self::buildDetailViewLink($modulename, $linkfocus->id, $name[$linkto]); + return $detailInformation; + } + + /** + * Returns the information about the Parent + * @param String $module + * @param Integer $record + * @param String $label + * @return Array + */ + static function buildDetailViewLink($module, $record, $label) { + $detailViewLink = sprintf("%s", + $module, $record, textlength_check($label)); + return array('record'=>$record, 'module'=>$module, 'label'=>$label, 'detailviewlink'=> $detailViewLink); + } + + /** + * Returns the related entity for a Mail + * @global PearDataBase $adb + * @param integer $mailuid - Mail Number + * @return Array + */ + static function associatedLink($mailuid) { + global $adb; + + $info = MailManager::lookupMailAssociation($mailuid); + if ($info) { + return self::getSalesEntityInfo($info['crmid']); + } + return false; + } + + /** + * Returns the information about the Parent + * @global PearDataBase $adb + * @param Integer $crmid + * @return Array + */ + static function getSalesEntityInfo($crmid){ + global $adb; + $result = $adb->pquery("SELECT setype FROM vtiger_crmentity WHERE crmid=? AND deleted=0", array($crmid)); + if ($adb->num_rows($result)) { + $modulename = $adb->query_result($result, 0, 'setype'); + $recordlabels = getEntityName($modulename, array($crmid)); + return self::buildDetailViewLink($modulename, $crmid, $recordlabels[$crmid]); + } + } + + /** + * + * @global PearDataBase $adb + * @param $modulewsid + * @return + */ + static function ws_modulename($modulewsid) { + global $adb; + $result = $adb->pquery("SELECT name FROM vtiger_ws_entity WHERE id=?", array($modulewsid)); + if ($adb->num_rows($result)) return $adb->query_result($result, 0, 'name'); + return false; + } + + /** + * Related an attachment to a Email record + * @global PearDataBase $adb + * @param Integer $crmId + * @param Integer $attachId + */ + function relateAttachment($crmId, $attachId) { + global $adb; + $adb->pquery("INSERT INTO vtiger_seattachmentsrel(crmid, attachmentsid) VALUES(?,?)", + array($crmId, $attachId)); + } + + /** + * Related a Document to a record + * @global PearDataBase $adb + * @param Integer $crmId + * @param Integer $docId + */ + function relatedDocument($crmId, $docId) { + global $adb; + $adb->pquery("INSERT INTO vtiger_senotesrel(crmid, notesid) VALUES(?,?)", + Array($crmId, $docId)); + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/SearchController.php b/modules/MailManager/src/controllers/SearchController.php new file mode 100644 index 0000000..4d5b1b7 --- /dev/null +++ b/modules/MailManager/src/controllers/SearchController.php @@ -0,0 +1,49 @@ + $current_user + * @param MailManager_Request $request + * @return boolean + */ + function process(MailManager_Request $request) { + + $response = new MailManager_Response(true); + $viewer = $this->getViewer(); + + if ('popupui' == $request->getOperationArg()) { + $viewer->display( $this->getModuleTpl('Search.Popupui.tpl') ); + $response = false; + + } else if ('email' == $request->getOperationArg()) { + global $current_user; + + $searchTerm = $request->get('q'); + if (empty($searchTerm)) $searchTerm = '%@'; // To avoid empty value of email to be filtered. + else $searchTerm = "%$searchTerm%"; + + $filteredResult = MailManager::lookupMailInVtiger($searchTerm, $current_user); + + MailManager_Utils::emitJSON($filteredResult); + $response = false; + } + return $response; + } +} + +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/SettingsController.php b/modules/MailManager/src/controllers/SettingsController.php new file mode 100644 index 0000000..676dd65 --- /dev/null +++ b/modules/MailManager/src/controllers/SettingsController.php @@ -0,0 +1,67 @@ +getOperationArg()) { + $model = $this->getMailBoxModel(); + $serverName = $model->serverName(); + $viewer = $this->getViewer(); + $viewer->assign('SERVERNAME', $serverName); + $response->setResult( $viewer->fetch( $this->getModuleTpl( 'Settings.tpl' ) ) ); + + } else if ('save' == $request->getOperationArg()) { + + $model = $this->getMailBoxModel(); + + $model->setServer($request->get('_mbox_server')); + $model->setUsername($request->get('_mbox_user')); + $model->setPassword($request->get('_mbox_pwd')); + $model->setProtocol($request->get('_mbox_protocol', 'imap2')); + $model->setSSLType($request->get('_mbox_ssltype', 'tls')); + $model->setCertValidate($request->get('_mbox_certvalidate', 'novalidate-cert')); + $model->setRefreshTimeOut($request->get('_mbox_refresh_timeout')); + + $connector = $this->getConnector(); + + if ($connector->isConnected()) { + $model->save(); + + $request->set('_operation', 'mainui'); + return parent::process($request); + } else if($connector->hasError()) { + $response->isJSON(true); + $response->setError( 101, $connector->lastError()); + } + } else if ('remove' == $request->getOperationArg()) { + + $model = $this->getMailBoxModel(); + $model->delete(); + + $response->isJSON(true); + $response->setResult( array ('status' => true) ); + } + + return $response; + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/controllers/UploadController.php b/modules/MailManager/src/controllers/UploadController.php new file mode 100644 index 0000000..a2cf5b3 --- /dev/null +++ b/modules/MailManager/src/controllers/UploadController.php @@ -0,0 +1,309 @@ +true, 'error'=>$errorMessage); + } + require_once 'data/CRMEntity.php'; + $document = CRMEntity::getInstance('Documents'); + + $attachid = $this->saveAttachment(); + + if($attachid !== false) { + // Create document record + $document = new Documents(); + $document->column_fields['notes_title'] = $this->getName() ; + $document->column_fields['filename'] = $this->getName(); + $document->column_fields['filestatus'] = 1; + $document->column_fields['filelocationtype'] = 'I'; + $document->column_fields['folderid'] = 1; + $document->column_fields['filesize'] = $this->getSize(); + $document->column_fields['assigned_user_id'] = $current_user->id; + $document->save('Documents'); + + // Link file attached to document + $adb->pquery("INSERT INTO vtiger_seattachmentsrel(crmid, attachmentsid) VALUES(?,?)", + Array($document->id, $attachid)); + + return array('success'=>true, 'docid'=>$document->id, 'attachid'=>$attachid); + } + return false; + } + + /** + * Save an attachment + * @global PearDataBase $adb + * @global Array $upload_badext + * @global Users $current_user + * @return Integer + */ + function saveAttachment() { + global $adb, $upload_badext, $current_user; + $uploadPath = decideFilePath(); + $fileName = $this->getName(); + if(!empty($fileName)) { + $attachid = $adb->getUniqueId('vtiger_crmentity'); + + //sanitize the filename + $binFile = sanitizeUploadFileName($fileName, $upload_badext); + $fileName = ltrim(basename(" ".$binFile)); + + $saveAttchment = $this->save($uploadPath.$attachid."_".$fileName); + if($saveAttchment) { + $description = $fileName; + $date_var = $adb->formatDate(date('YmdHis'), true); + $usetime = $adb->formatDate($date_var, true); + + $adb->pquery("INSERT INTO vtiger_crmentity(crmid, smcreatorid, smownerid, + modifiedby, setype, description, createdtime, modifiedtime, presence, deleted) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + Array($attachid, $current_user->id, $current_user->id, $current_user->id, "Documents Attachment", $description, $usetime, $usetime, 1, 0)); + + $mimetype = MailAttachmentMIME::detect($uploadPath.$attachid."_".$fileName); + $adb->pquery("INSERT INTO vtiger_attachments SET attachmentsid=?, name=?, description=?, type=?, path=?", + Array($attachid, $fileName, $description, $mimetype, $uploadPath)); + + return $attachid; + } + } + return false; + } + + /** + * Function used to Create Document and Attachments + */ + function process() { + return $this->createDocument(); + } +} + +/** + * Class used to Upload file using Form, used to IE + */ +class MailManager_UploadFileForm extends qqUploadedFileForm { + + /** + * Saves the uploaded file + * @global String $root_directory + * @param String $path + * @return Boolean + */ + function save($path) { + global $root_directory; + if(is_file($root_directory."/".$path)) { + return true; + } else if(move_uploaded_file($_FILES['qqfile']['tmp_name'], $path)) { + return true; + } + return false; + } + + /** + * Function used to Create Document and Attachments + */ + function process() { + return $this->createDocument(); + } + + /** + * Used to create Documents + * @global Users $current_user + * @global PearDataBase $adb + * @global String $currentModule + */ + function createDocument() { + global $current_user, $adb, $currentModule; + + if(!MailManager::checkModuleWriteAccessForCurrentUser('Documents')) { + $errorMessage = getTranslatedString('LBL_WRITE_ACCESS_FOR', $currentModule)." ".getTranslatedString('Documents')." ".getTranslatedString('LBL_MODULE_DENIED', $currentModule); + return array('success'=>true, 'error'=>$errorMessage); + } + require_once 'data/CRMEntity.php'; + $document = CRMEntity::getInstance('Documents'); + + $attachid = $this->saveAttachment(); + + if($attachid !== false) { + // Create document record + $document = new Documents(); + $document->column_fields['notes_title'] = $this->getName() ; + $document->column_fields['filename'] = $this->getName(); + $document->column_fields['filestatus'] = 1; + $document->column_fields['filelocationtype'] = 'I'; + $document->column_fields['folderid'] = 1; + $document->column_fields['filesize'] = $this->getSize(); + $document->column_fields['assigned_user_id'] = $current_user->id; + $document->save('Documents'); + + // Link file attached to document + $adb->pquery("INSERT INTO vtiger_seattachmentsrel(crmid, attachmentsid) VALUES(?,?)", + Array($document->id, $attachid)); + + return array('success'=>true, 'docid'=>$document->id, 'attachid'=>$attachid); + } + return false; + } + + /** + * Creates an Attachments + * @global PearDataBase $adb + * @global Array $upload_badext + * @global Users $current_user + */ + function saveAttachment() { + global $adb, $upload_badext, $current_user; + $uploadPath = decideFilePath(); + $fileName = $this->getName(); + if(!empty($fileName)) { + $attachid = $adb->getUniqueId('vtiger_crmentity'); + + //sanitize the filename + $binFile = sanitizeUploadFileName($fileName, $upload_badext); + $fileName = ltrim(basename(" ".$binFile)); + + $saveAttachment = $this->save($uploadPath.$attachid."_".$fileName); + if($saveAttachment) { + $description = $fileName; + $date_var = $adb->formatDate(date('YmdHis'), true); + $usetime = $adb->formatDate($date_var, true); + + $adb->pquery("INSERT INTO vtiger_crmentity(crmid, smcreatorid, smownerid, + modifiedby, setype, description, createdtime, modifiedtime, presence, deleted) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + Array($attachid, $current_user->id, $current_user->id, $current_user->id, "Documents Attachment", $description, $usetime, $usetime, 1, 0)); + + $mimetype = MailAttachmentMIME::detect($uploadPath.$attachid."_".$fileName); + + $adb->pquery("INSERT INTO vtiger_attachments SET attachmentsid=?, name=?, description=?, type=?, path=?", + Array($attachid, $fileName, $description, $mimetype, $uploadPath)); + + return $attachid; + } + } + return false; + } +} + +/** + * Class used to control Uploading files + */ +class MailManager_Uploader extends qqFileUploader { + + /** + * Constructor used to invoke the Uploading Handler + * @param Array $allowedExtensions + * @param Integer $sizeLimit + */ + function __construct($allowedExtensions, $sizeLimit) { + + $this->setAllowedFileExtension($allowedExtensions); + + $this->setMaxUploadSize($sizeLimit); + + if (isset($_GET['qqfile'])) { + $this->file = new MailManager_UploadFileXHR(); + } elseif (isset($_FILES['qqfile'])) { + $this->file = new MailManager_UploadFileForm(); + } else { + $this->file = false; + } + } + + /** + * Function used to handle the upload + * @param String $uploadDirectory + * @param Boolean $replaceOldFile + * @return Array + */ + function handleUpload($uploadDirectory, $replaceOldFile = FALSE){ + if(!isPermitted('Documents', 'EditView')) { + return array('error' => "Permission not available"); + } + if (!is_writable($uploadDirectory)){ + return array('error' => "Server error. Upload directory isn't writable."); + } + if (!$this->file){ + return array('error' => 'No files were uploaded.'); + } + $size = $this->file->getSize(); + if ($size == 0) { + return array('error' => 'File is empty'); + } + if ($size > $this->sizeLimit) { + return array('error' => 'File is too large'); + } + $pathinfo = pathinfo($this->file->getName()); + $filename = $pathinfo['filename']; + + $ext = $pathinfo['extension']; + + if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){ + $these = implode(', ', $this->allowedExtensions); + return array('error' => 'File has an invalid extension, it should be one of '. $these . '.'); + } + + $response = $this->file->process(); + if ($response['success'] == true) { + return $response; + } else { + return array('error'=> 'Could not save uploaded file.' . + 'The upload was cancelled, or server error encountered'); + } + + } + + /* + * get the max file upload sizr + */ + function getMaxUploadSize() { + return $this->sizeLimit; + } + + /* + * Sets the max file upload size + */ + function setMaxUploadSize($value) { + $this->sizeLimit = $value; + } + + /* + * gets the allowed file extension + */ + function getAllowedFileExtension() { + return $this->allowedExtensions; + } + + /* + * sets the allowed file extension + */ + function setAllowedFileExtension($values) { + if(!empty($values)) { + $this->allowedExtensions = $values; + } + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/helpers/Request.php b/modules/MailManager/src/helpers/Request.php new file mode 100644 index 0000000..7bdabc4 --- /dev/null +++ b/modules/MailManager/src/helpers/Request.php @@ -0,0 +1,52 @@ +valuemap = $values; + } + + function has($key) { + return isset($this->valuemap[$key]); + } + + function get($key, $defvalue='') { + $value = $defvalue; + if (isset($this->valuemap[$key])) { + $value = $this->valuemap[$key]; + } + if (!empty($value)) { + $value = vtlib_purify($value); + } + return urldecode($value); + } + + function set($key, $value) { + $this->valuemap[$key] = $value; + } + + function values() { + return $this->valuemap; + } + + function keys() { + return array_keys($this->valuemap); + } + + function getOperation($defvalue='') { + return $this->get('_operation', $defvalue); + } + + function getOperationArg($defvalue='') { + return $this->get('_operationarg', $defvalue); + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/helpers/Response.php b/modules/MailManager/src/helpers/Response.php new file mode 100644 index 0000000..a312ca8 --- /dev/null +++ b/modules/MailManager/src/helpers/Response.php @@ -0,0 +1,81 @@ +json = $isjson; + } + + function isJson($flag) { + $this->json = $flag; + } + + function setError($code, $message) { + $error = array('code' => $code, 'message' => $message); + $this->error = $error; + } + + function getError() { + return $this->error; + } + + function hasError() { + return !is_null($this->error); + } + + function setResult($result) { + $this->result = $result; + } + + function getResult() { + return $this->result; + } + + function addToResult($key, $value) { + $this->result[$key] = $value; + } + + function prepareResponse() { + $response = array(); + if($this->result === NULL) { + $response['success'] = false; + $response['error'] = $this->error; + } else { + $response['success'] = true; + $response['result'] = $this->result; + } + return $response; + } + + function emit() { + if ($this->json) + echo $this->emitJSON(); + else + echo $this->emitHTML(); + } + + function emitJSON() { + // Allow use of native json encoder/decoder for better performance when the content is huge + Zend_Json::$useBuiltinEncoderDecoder = true; + $response = Zend_Json::encode($this->prepareResponse()); + return $response; + } + + function emitHTML() { + if($this->result === NULL) return (is_string($this->error))? $this->error : var_export($this->error, true); + return $this->result; + } + +} \ No newline at end of file diff --git a/modules/MailManager/src/helpers/Utils.php b/modules/MailManager/src/helpers/Utils.php new file mode 100644 index 0000000..7e74934 --- /dev/null +++ b/modules/MailManager/src/helpers/Utils.php @@ -0,0 +1,36 @@ +parse($string); + } + + function allowedFileExtension($filename) { + global $upload_badext; + $parts = explode('.', $filename); + if (count($parts) > 1) { + $extension = $parts[count($parts)-1]; + return (in_array(strtolower($extension), $upload_badext) === false); + } + return false; + } + + function emitJSON($object) { + Zend_Json::$useBuiltinEncoderDecoder = true; + echo Zend_Json::encode($object); + } +} + +?> \ No newline at end of file diff --git a/modules/MailManager/src/models/Draft.php b/modules/MailManager/src/models/Draft.php new file mode 100644 index 0000000..042d040 --- /dev/null +++ b/modules/MailManager/src/models/Draft.php @@ -0,0 +1,318 @@ +constructAllClause($q); + } else { + $where = $type ." LIKE '%". $q ."%'" ; + } + $where = " AND ".$where; + $draftMails = $this->getDrafts($page, $limit, $folder, $where); + return $draftMails; + } + + function constructAllClause($query) { + $fields = array('bccmail','ccmail','subject','saved_toid','description'); + for($i=0; $igetMeta(); + if(!$meta->hasReadAccess()) { + return false; + } + + if(!empty($page)) { + $limitClause = "LIMIT ".($limit*$page).", ".$limit; + } else { + $limitClause = "LIMIT 0, ".$limit; + } + $query = "SELECT * FROM Emails where email_flag='SAVED' $where $limitClause;"; + $draftMails = vtws_query($query, $current_user); + for($i=0; $i$fieldvalue) { + if($fieldname == "saved_toid" || $fieldname == "ccmail" || $fieldname == "bccmail") { + if(!empty($fieldvalue)) { + $value = implode(',',Zend_Json::decode($fieldvalue)); + if(strlen($value) > 45) { + $value = substr($value, 0, 45)."...."; + } + $draftMails[$i][$fieldname] = $value; + } + } else if($fieldname == "id") { + $emailId = vtws_getIdComponents($fieldvalue); + $draftMails[$i][$fieldname] = $emailId[1]; + } + } + } + if($where) { + $folder->setPaging($limit*$page+1, $limit*$page+$limit, $limit, count($draftMails), $page); + } else { + $total = $this->getTotalDraftCount(); + $folder->setPaging($limit*$page+1, $limit*$page+$limit, $limit, $total, $page); + } + $folder->setMails($draftMails); + + return $draftMails ; + } + + function getTotalDraftCount() { + global $adb, $current_user; + if(empty(self::$totalDraftCount)) { + $DraftRes = $query = "SELECT * FROM Emails where email_flag='SAVED';"; + $draftMails = vtws_query($query, $current_user); + self::$totalDraftCount = count($draftMails); + return self::$totalDraftCount; + } else { + return self::$totalDraftCount; + } + } + + function getDraftMail($request) { + global $adb, $current_user; + $handler = vtws_getModuleHandlerFromName('Emails', $current_user); + $meta = $handler->getMeta(); + if(!$meta->hasReadAccess()) { + return false; + } + $id = vtws_getWebserviceEntityId('Emails', $request->get('id')); + $draftMail = vtws_query("SELECT * FROM Emails where id = $id;", $current_user); + $emailId = vtws_getIdComponents($id); + $draftMail['attachments'] = $this->getAttachmentDetails($emailId[1]); + $draftMail[0]['id'] = $request->get('id'); + return $draftMail; + } + + function getAttachmentDetails($crmid) { + global $adb; + $documentRes = $adb->pquery("SELECT * FROM vtiger_senotesrel + INNER JOIN vtiger_crmentity ON vtiger_senotesrel.notesid = vtiger_crmentity.crmid AND vtiger_senotesrel.crmid = ? + INNER JOIN vtiger_notes ON vtiger_notes.notesid = vtiger_senotesrel.notesid + INNER JOIN vtiger_seattachmentsrel ON vtiger_seattachmentsrel.crmid = vtiger_notes.notesid + INNER JOIN vtiger_attachments ON vtiger_attachments.attachmentsid = vtiger_seattachmentsrel.attachmentsid + WHERE vtiger_crmentity.deleted = 0", array($crmid)); + if($adb->num_rows($documentRes)) { + for($i=0; $i<$adb->num_rows($documentRes); $i++) { + $draftMail[$i]['name'] = $adb->query_result($documentRes, $i, 'filename'); + $filesize = $adb->query_result($documentRes, $i, 'filesize'); + $draftMail[$i]['size'] = $this->getFormattedFileSize($filesize); + $draftMail[$i]['docid'] = $adb->query_result($documentRes, $i, 'notesid'); + $draftMail[$i]['path'] = $adb->query_result($documentRes, $i, 'path'); + $draftMail[$i]['fileid'] = $adb->query_result($documentRes, $i, 'attachmentsid'); + $draftMail[$i]['attachment'] = $adb->query_result($documentRes, $i, 'name'); + } + } + return $draftMail; + } + + function saveDraft($request) { + global $current_user, $adb; + + if(!MailManager::checkModuleWriteAccessForCurrentUser('Emails')) { + return false; + } + + $email = CRMEntity::getInstance('Emails'); + + $to_string = rtrim($request->get('to'), ','); + $cc_string = rtrim($request->get('cc'), ','); + $bcc_string= rtrim($request->get('bcc'), ','); + + $parentIds = $this->getParentFromEmails($to_string); + + $emailId = $request->get('emailid'); + $subject = $request->get('subject'); + + $email = CRMEntity::getInstance('Emails'); + $email->column_fields['assigned_user_id'] = $current_user->id; + $email->column_fields['date_start'] = date('Y-m-d'); + $email->column_fields['time_start'] = date('H:i'); + $email->column_fields['parent_id'] = $parentIds; + $email->column_fields['subject'] = (!empty($subject)) ? $subject : "No Subject"; + $email->column_fields['description'] = $request->get('body'); + $email->column_fields['activitytype'] = 'Emails'; + $email->column_fields['from_email'] = $fromEmail; + $email->column_fields['saved_toid'] = (!empty($to_string)) ? $to_string : "SAVED"; + $email->column_fields['ccmail'] = $cc_string; + $email->column_fields['bccmail'] = $bcc_string; + $email->column_fields['email_flag'] = 'SAVED'; + + if(empty($emailId)) { + $email->save('Emails'); + } else { + $email->id = $emailId; + $email->mode = 'edit'; + $email->save('Emails'); + } + //save parent and email relation, to show up in Emails section of the parent + $this->saveEmailParentRel($email->id, $parentIds); + + return $email->id; + } + + function saveEmailParentRel($emailId, $parentIds) { + global $adb; + $myids = explode("|", $parentIds); //2@71| + if(!empty($emailId)) { + $adb->pquery("delete from vtiger_seactivityrel where activityid=?",array($emailId)); //remove all previous relation + } + for ($i=0; $i<(count($myids)); $i++) { + $realid = explode("@",$myids[$i]); + if(!empty($realid[0]) && !empty($emailId)) { + // this is needed as we might save the mail in draft mode earlier + $result = $adb->pquery("SELECT * FROM vtiger_seactivityrel WHERE crmid=? AND activityid=?",array($realid[0], $emailId)); + if(!$adb->num_rows($result)) { + $adb->pquery('INSERT INTO vtiger_seactivityrel(crmid, activityid) VALUES(?,?)',array($realid[0], $emailId)); + } + } + } + } + + + function getFromEmailAddress() { + global $adb, $current_user; + $fromEmail = false; + if (Vtiger_Version::check('5.2.0', '>=')) { + $smtpFromResult = $adb->pquery('SELECT from_email_field FROM vtiger_systems WHERE server_type=?', array('email')); + if ($adb->num_rows($smtpFromResult)) { + $fromEmail = decode_html($adb->query_result($smtpFromResult, 0, 'from_email_field')); + } + } + if (empty($fromEmail)) $fromEmail = $current_user->column_fields['email1']; + return $fromEmail; + } + + function saveAttachment($request) { + global $current_user, $adb; + + //need to handle earlier as Emails save will save the uploaded files from $_FILES + $uploadResponse = $this->handleUpload(); + + $emailId = $this->saveDraft($request); + + if($emailId != false) { + + if($uploadResponse && $uploadResponse['success'] == true) { + // Link document to base record + if(!empty($uploadResponse['docid'])) $this->saveEmailDocumentRel($emailId, $uploadResponse['docid']); + if(!empty($uploadResponse['attachid'])) $this->saveAttachmentRel($emailId, $uploadResponse['attachid']); + } + $uploadResponse['emailid'] = $emailId; + } else { + $uploadResponse['error'] = true; + } + return $uploadResponse; + } + + function getParentFromEmails($to_string) { + global $current_user; + if (!empty($to_string)) { + $toArray = explode(',', $to_string); + foreach($toArray as $to) { + $relatedtos = MailManager::lookupMailInVtiger(trim($to), $current_user); + if (!empty($relatedtos) && is_array($relatedtos)) { + for($i=0; $ihandleUpload($filePath, false); + } + + function saveEmailDocumentRel($emailId, $documentId) { + global $adb; + if(!empty($emailId) && !empty($documentId)) { + $adb->pquery("INSERT INTO vtiger_senotesrel(crmid, notesid) VALUES(?,?)", + Array($emailId, $documentId)); + } + } + + function saveAttachmentRel($crmid, $attachId) { + global $adb; + if(!empty($crmid) && !empty($attachId)) { + $adb->pquery("INSERT INTO vtiger_seattachmentsrel(crmid, attachmentsid) VALUES(?,?)", + Array($crmid, $attachId)); + } + } + + function deleteMail($ids) { + global $current_user; + $focus = CRMEntity::getInstance('Emails'); + $idList = explode(',', $ids); + foreach($idList as $id) { + $focus->trash('Emails', $id); + } + } + + function deleteAttachment($request) { + global $adb; + $emailid = $request->get('emailid'); + $docid = $request->get('docid'); + if(!empty($docid) && !empty($emailid)) { + $adb->pquery("DELETE FROM vtiger_senotesrel WHERE crmid = ? AND notesid = ?", array($emailid, $docid)); + return true; + } + return false; + } + + function getFormattedFileSize($filesize) { + if($filesize < 1024) + $filesize = sprintf("%0.2f",round($filesize, 2)).'b'; + elseif($filesize > 1024 && $filesize < 1048576) + $filesize = sprintf("%0.2f",round($filesize/1024, 2)).'kB'; + else if($filesize > 1048576) + $filesize = sprintf("%0.2f",round($filesize/(1024*1024), 2)).'MB'; + return $filesize; + } +} +?> diff --git a/modules/MailManager/src/models/DraftFolder.php b/modules/MailManager/src/models/DraftFolder.php new file mode 100644 index 0000000..f85b6bd --- /dev/null +++ b/modules/MailManager/src/models/DraftFolder.php @@ -0,0 +1,29 @@ +mPageStart <= $this->mCount && ($this->mPageCurrent > 0)); + } + + function hasNextPage() { + return ($this->mPageEnd < $this->mCount); + } + + function pageInfo() { + $s = max(1, $this->mPageCurrent * $this->mPageLimit+1); + $e = min($s+$this->mPageLimit-1, $this->mCount); + $t = $this->mCount; + return sprintf("%s - %s of %s", $s, $e, $t); + } +} +?> diff --git a/modules/MailManager/src/models/Folder.php b/modules/MailManager/src/models/Folder.php new file mode 100644 index 0000000..b22d1a1 --- /dev/null +++ b/modules/MailManager/src/models/Folder.php @@ -0,0 +1,110 @@ +setName($name); + } + + function name($prefix='') { + $endswith = false; + if (!empty($prefix)) { + $endswith = (strrpos($prefix, $this->mName) === strlen($prefix)-strlen($this->mName)); + } + if ($endswith) { + return $prefix; + } else { + return $prefix.$this->mName; + } + } + + function setName($name) { + $this->mName = $name; + } + + function mails() { + return $this->mMails; + } + + function setMails($mails) { + $this->mMails = $mails; + } + + function setPaging($start, $end, $limit, $total, $current) { + $this->mPageStart = intval($start); + $this->mPageEnd = intval($end); + $this->mPageLimit = intval($limit); + $this->mCount = intval($total); + $this->mPageCurrent = intval($current); + } + + function pageStart() { + return $this->mPageStart; + } + + function pageEnd() { + return $this->mPageEnd; + } + + function pageInfo() { + $offset = 0; + if($this->mPageCurrent != 0) { // this is needed as set the start correctly + $offset = 1; + } + $s = max(1, $this->mPageCurrent * $this->mPageLimit + $offset); + + $st = ($s==1)? 0 : $s-1; // this is needed to set end page correctly + + $e = min($st + $this->mPageLimit, $this->mCount); + $t = $this->mCount; + return sprintf("%s - %s of %s", $s, $e, $t); + } + + function pageCurrent($offset=0) { + return $this->mPageCurrent + $offset; + } + + function hasNextPage() { + return ($this->mPageStart > 1); + } + + function hasPrevPage() { + return ($this->mPageStart != $this->mPageEnd) && ($this->mPageEnd < $this->mCount); + } + + function count() { + return $this->mCount; + } + + function setCount($count) { + $this->mCount = $count; + } + + function unreadCount() { + return $this->mUnreadCount; + } + + function setUnreadCount($unreadCount) { + $this->mUnreadCount = $unreadCount; + } +} + +?> \ No newline at end of file diff --git a/modules/MailManager/src/models/Mailbox.php b/modules/MailManager/src/models/Mailbox.php new file mode 100644 index 0000000..21b5646 --- /dev/null +++ b/modules/MailManager/src/models/Mailbox.php @@ -0,0 +1,171 @@ +mId); + } + + function decrypt($value) { + require_once('include/utils/encryption.php'); + $e = new Encryption(); + return $e->decrypt($value); + } + + function encrypt($value) { + require_once('include/utils/encryption.php'); + $e = new Encryption(); + return $e->encrypt($value); + } + + function server() { + return $this->mServer; + } + + function setServer($server) { + $this->mServer = trim($server); + } + + function serverName() { + return $this->mServerName; + } + + function username() { + return $this->mUsername; + } + + function setUsername($username) { + $this->mUsername = trim($username); + } + + function password($decrypt=true) { + if ($decrypt) return $this->decrypt($this->mPassword); + return $this->mPassword; + } + + function setPassword($password) { + $this->mPassword = $this->encrypt(trim($password)); + } + + function protocol() { + return $this->mProtocol; + } + + function setProtocol($protocol) { + $this->mProtocol = trim($protocol); + } + + function ssltype() { + if (strcasecmp($this->mSSLType, 'ssl') === 0) { + return $this->mSSLType; + } + return $this->mSSLType; + } + + function setSSLType($ssltype) { + $this->mSSLType = trim($ssltype); + } + + function certvalidate() { + return $this->mCertValidate; + } + + function setCertValidate($certvalidate) { + $this->mCertValidate = trim($certvalidate); + } + + function setRefreshTimeOut($value) { + $this->mRefreshTimeOut = $value; + } + + function refreshTimeOut() { + return $this->mRefreshTimeOut; + } + + function delete() { + global $adb, $current_user; + $adb->pquery("DELETE FROM vtiger_mail_accounts WHERE user_id = ? AND account_id = ?", array($current_user->id, $this->mId)); + } + + function save() { + global $adb, $current_user, $list_max_entries_per_page; + + $account_id = 1; + $maxresult = $adb->pquery("SELECT max(account_id) as max_account_id FROM vtiger_mail_accounts", array()); + if ($adb->num_rows($maxresult)) $account_id += intval($adb->query_result($maxresult, 0, 'max_account_id')); + + $isUpdate = !empty($this->mId); + + $sql = ""; + $parameters = array($this->username(), $this->server(), $this->username(), $this->password(false), $this->protocol(), $this->ssltype(), $this->certvalidate(), $this->refreshTimeOut(), $current_user->id); + + if ($isUpdate) { + $sql = "UPDATE vtiger_mail_accounts SET display_name=?, mail_servername=?, mail_username=?, mail_password=?, mail_protocol=?, ssltype=?, sslmeth=?, box_refresh=? WHERE user_id=? AND account_id=?"; + $parameters[] = $this->mId; + } else { + $sql = "INSERT INTO vtiger_mail_accounts(display_name, mail_servername, mail_username, mail_password, mail_protocol, ssltype, sslmeth, box_refresh, user_id, mails_per_page, account_name, status, set_default, account_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; + $parameters[] = $list_max_entries_per_page; // Number of emails per page + $parameters[] = $this->username(); + $parameters[] = 1; // Status + $parameters[] = '0'; // Set Default + $parameters[] = $account_id; + } + $adb->pquery($sql, $parameters); + if (!$isUpdate) { + $this->mId = $account_id; + } + } + + + static function activeInstance() { + global $adb, $current_user; + $instance = new MailManager_Model_Mailbox(); + + $result = $adb->pquery("SELECT * FROM vtiger_mail_accounts WHERE user_id=? AND status=1 AND set_default=0", array($current_user->id)); + if ($adb->num_rows($result)) { + $instance->mServer = trim($adb->query_result($result, 0, 'mail_servername')); + $instance->mUsername = trim($adb->query_result($result, 0, 'mail_username')); + $instance->mPassword = trim($adb->query_result($result, 0, 'mail_password')); + $instance->mProtocol = trim($adb->query_result($result, 0, 'mail_protocol')); + $instance->mSSLType = trim($adb->query_result($result, 0, 'ssltype')); + $instance->mCertValidate = trim($adb->query_result($result, 0, 'sslmeth')); + $instance->mId = trim($adb->query_result($result, 0, 'account_id')); + $instance->mRefreshTimeOut = trim($adb->query_result($result, 0, 'box_refresh')); + $instance->mServerName = self::setServerName($instance->mServer); + } + return $instance; + } + + static function setServerName($mServer) { + if($mServer == 'imap.gmail.com') { + $mServerName = 'gmail'; + } else if($mServer == 'imap.mail.yahoo.com') { + $mServerName = 'yahoo'; + } else if($mServer == 'mail.messagingengine.com') { + $mServerName = 'fastmail'; + } else { + $mServerName = 'other'; + } + return $mServerName; + } + +} + +?> \ No newline at end of file diff --git a/modules/MailManager/src/models/Message.php b/modules/MailManager/src/models/Message.php new file mode 100644 index 0000000..afd9a7d --- /dev/null +++ b/modules/MailManager/src/models/Message.php @@ -0,0 +1,561 @@ +mBox = $mBox; + $this->mMsgNo = $msgno; + $loaded = false; + + // Unique ID based on sequence number + $this->mUid = imap_uid($mBox, $msgno); + if ($fetchbody) { + // Lookup if there was previous cached message + $loaded = $this->readFromDB($this->mUid); + } + if (!$loaded) { + parent::__construct($mBox, $msgno, $fetchbody); + if ($fetchbody) { + // Save for further use + $loaded = $this->saveToDB($this->mUid); + } + } + if ($loaded) { + $this->setRead(true); + $this->setMsgNo(intval($msgno)); + } + } + } + + /** + * Gets the Mail Body and Attachments + * @param String $imap - Mail Box connection string + * @param Integer $messageid - Mail Number + * @param Object $p + * @param Integer $partno + */ + // Modified: http://in2.php.net/manual/en/function.imap-fetchstructure.php#85685 + function __getpart($imap, $messageid, $p, $partno) { + // $partno = '1', '2', '2.1', '2.1.3', etc if multipart, 0 if not multipart + + if($partno) { + $maxDownLoadLimit = ConfigPrefs::get('MAXDOWNLOADLIMIT'); + if($p->bytes < $maxDownLoadLimit) { + $data = imap_fetchbody($imap,$messageid,$partno); // multipart + } + } else { + $data = imap_body($imap,$messageid); //not multipart + } + // Any part may be encoded, even plain text messages, so check everything. + if ($p->encoding==4) $data = quoted_printable_decode($data); + elseif ($p->encoding==3) $data = base64_decode($data); + // no need to decode 7-bit, 8-bit, or binary + + // PARAMETERS + // get all parameters, like charset, filenames of attachments, etc. + $params = array(); + if ($p->parameters) { + foreach ($p->parameters as $x) $params[ strtolower( $x->attribute ) ] = $x->value; + } + if ($p->dparameters) { + foreach ($p->dparameters as $x) $params[ strtolower( $x->attribute ) ] = $x->value; + } + + // ATTACHMENT + // Any part with a filename is an attachment, + // so an attached text file (type 0) is not mistaken as the message. + if ($params['filename'] || $params['name']) { + // filename may be given as 'Filename' or 'Name' or both + $filename = ($params['filename'])? $params['filename'] : $params['name']; + // filename may be encoded, so see imap_mime_header_decode() + if(!$this->_attachments) $this->_attachments = Array(); + $this->_attachments[$filename] = $data; // TODO: this is a problem if two files have same name + } + // embedded images right now are treated as attachments + elseif ($p->ifdisposition && $p->disposition == "INLINE" && $p->bytes > 0 && + $p->subtype != 'PLAIN' && $p->subtype != 'HTML') { + $this->_attachments["noname".$partno. "." .$p->subtype] = $data; + } + // TEXT + elseif ($p->type==0 && $data) { + $this->_charset = $params['charset']; // assume all parts are same charset + $data = self::__convert_encoding($data, 'UTF-8', $this->_charset); + + // Messages may be split in different parts because of inline attachments, + // so append parts together with blank row. + if (strtolower($p->subtype)=='plain') $this->_plainmessage .= trim($data) ."\n\n"; + else $this->_htmlmessage .= $data ."

        "; + } + + // EMBEDDED MESSAGE + // Many bounce notifications embed the original message as type 2, + // but AOL uses type 1 (multipart), which is not handled here. + // There are no PHP functions to parse embedded messages, + // so this just appends the raw source to the main message. + elseif ($p->type==2 && $data) { + $this->_plainmessage .= trim($data) ."\n\n"; + } + + // SUBPART RECURSION + if ($p->parts) { + foreach ($p->parts as $partno0=>$p2) + $this->__getpart($imap,$messageid,$p2,$partno.'.'.($partno0+1)); // 1.2, 1.2.1, etc. + } + } + + /** + * Clears the cache data + * @global PearDataBase Instance $adb + * @global Users Instance $current_user + * @param Integer $waybacktime + */ + static function pruneOlderInDB($waybacktime) { + global $adb, $current_user; + + //remove the saved attachments + self::removeSavedAttachmentFiles($waybacktime); + + $adb->pquery("DELETE FROM vtiger_mailmanager_mailrecord + WHERE userid=? AND lastsavedtime < ?", array($current_user->id, $waybacktime)); + $adb->pquery("DELETE FROM vtiger_mailmanager_mailattachments + WHERE userid=? AND lastsavedtime < ?", array($current_user->id, $waybacktime)); + } + + /** + * Used to remove the saved attachments + * @global Users Instance $current_user + * @global PearDataBase Instance $adb + * @param Integer $waybacktime - timestamp + */ + static function removeSavedAttachmentFiles($waybacktime) { + global $current_user, $adb; + + $mailManagerAttachments = $adb->pquery("SELECT attachid, aname, path FROM vtiger_mailmanager_mailattachments + WHERE userid=? AND lastsavedtime < ?", array($current_user->id, $waybacktime)); + + for($i=0; $i<$adb->num_rows($mailManagerAttachments); $i++) { + $atResultRow = $adb->raw_query_result_rowdata($mailManagerAttachments, $i); + + $adb->pquery("UPDATE vtiger_crmentity set deleted = 1 WHERE crmid = ?", array($atResultRow['attachid'])); + + $filepath = $atResultRow['path'] ."/". $atResultRow['attachid'] ."_". $atResultRow['aname']; + if(file_exists($filepath)) { + unlink($filepath); + } + } + } + + /** + * Reads the Mail information from the Database + * @global PearDataBase Instance $adb + * @global User Instance $current_user + * @param Integer $uid + * @return Boolean + */ + + function readFromDB($uid) { + global $adb, $current_user; + $result = $adb->pquery("SELECT * FROM vtiger_mailmanager_mailrecord + WHERE userid=? AND muid=?", array($current_user->id, $uid)); + if ($adb->num_rows($result)) { + $resultrow = $adb->fetch_array($result); + $this->mUid = decode_html($resultrow['muid']); + + $this->_from = Zend_Json::decode(decode_html($resultrow['mfrom'])); + $this->_to = Zend_Json::decode(decode_html($resultrow['mto'])); + $this->_cc = Zend_Json::decode(decode_html($resultrow['mcc'])); + $this->_bcc = Zend_Json::decode(decode_html($resultrow['mbcc'])); + + $this->_date = decode_html($resultrow['mdate']); + $this->_subject = str_replace("_"," ",decode_html($resultrow['msubject'])); + $this->_body = decode_html($resultrow['mbody']); + $this->_charset = decode_html($resultrow['mcharset']); + + $this->_isbodyhtml = intval($resultrow['misbodyhtml'])? true : false; + $this->_plainmessage = intval($resultrow['mplainmessage'])? true:false; + $this->_htmlmessage = intval($resultrow['mhtmlmessage'])? true :false; + $this->_uniqueid = decode_html($resultrow['muniqueid']); + $this->_bodyparsed = intval($resultrow['mbodyparsed'])? true : false; + + return true; + } + return false; + } + + /** + * Loads the Saved Attachments from the DB + * @global PearDataBase Instance$adb + * @global Users Instance $current_user + * @global Array $upload_badext - List of bad extensions + * @param Boolean $withContent - Used to load the Attachments with/withoud content + * @param String $aName - Attachment Name + */ + protected function loadAttachmentsFromDB($withContent, $aName=false) { + global $adb, $current_user, $upload_badext; + + if (empty($this->_attachments)) { + $this->_attachments = array(); + + $params = array($current_user->id, $this->muid()); + + $filteredColumns = "aname, attachid"; + if($withContent) $filteredColumns = "aname, attachid, path"; + + $whereClause = ""; + if ($aName) { $whereClause = " AND aname=?"; $params[] = $aName; } + + $atResult = $adb->pquery("SELECT {$filteredColumns} FROM vtiger_mailmanager_mailattachments + WHERE userid=? AND muid=? $whereClause", $params); + + if ($adb->num_rows($atResult)) { + for($atIndex = 0; $atIndex < $adb->num_rows($atResult); ++$atIndex) { + $atResultRow = $adb->raw_query_result_rowdata($atResult, $atIndex); + if($withContent) { + $binFile = sanitizeUploadFileName($atResultRow['aname'], $upload_badext); + $saved_filename = $atResultRow['path'] . $atResultRow['attachid']. '_' .$binFile; + if(file_exists($saved_filename)) $fileContent = @fread(fopen($saved_filename, "r"), filesize($saved_filename)); + } + $this->_attachments[$atResultRow['aname']] = ($withContent? $fileContent: false); + unset($fileContent); // Clear immediately + } + + $atResult->free(); + unset($atResult); // Indicate cleanup + } + } + } + + /** + * Save the Mail information to DB + * @global PearDataBase Instance $adb + * @global Users Instance $current_user + * @param Integer $uid - Mail Unique Number + * @return Boolean + */ + protected function saveToDB($uid) { + global $adb, $current_user; + + $savedtime = strtotime("now"); + + $params = array($current_user->id); + $params[] = $uid; + $params[] = Zend_Json::encode($this->_from); + $params[] = Zend_Json::encode($this->_to); + $params[] = Zend_Json::encode($this->_cc); + $params[] = Zend_Json::encode($this->_bcc); + $params[] = $this->_date; + $params[] = $this->_subject; + $params[] = $this->_body; + $params[] = $this->_charset; + $params[] = $this->_isbodyhtml; + $params[] = $this->_plainmessage; + $params[] = $this->_htmlmessage; + $params[] = $this->_uniqueid; + $params[] = $this->_bodyparsed; + $params[] = $savedtime; + + $adb->pquery("INSERT INTO vtiger_mailmanager_mailrecord (userid, muid, mfrom, mto, mcc, mbcc, + mdate, msubject, mbody, mcharset, misbodyhtml, mplainmessage, mhtmlmessage, muniqueid, + mbodyparsed, lastsavedtime) VALUES (".generateQuestionMarks($params).")", $params); + + // Take care of attachments... + if (!empty($this->_attachments)) { + foreach($this->_attachments as $aName => $aValue) { + + $attachInfo = $this->__SaveAttachmentFile($aName, $aValue); + + if(is_array($attachInfo) && !empty($attachInfo)) { + $adb->pquery("INSERT INTO vtiger_mailmanager_mailattachments + (userid, muid, attachid, aname, path, lastsavedtime) VALUES (?, ?, ?, ?, ?, ?)", + array($current_user->id, $uid, $attachInfo['attachid'], $attachInfo['name'], $attachInfo['path'], $savedtime)); + + unset($this->_attachments[$aName]); // This is needed first when we save attachment with invalid file extension, + $this->_attachments[$attachInfo['name']] = $aValue; // so the file name has to renamed. + } + unset($aValue); + } + } + return true; + } + + /** + * Save the Mail Attachments to DB + * @global PearDataBase Instance $adb + * @global Users Instance $current_user + * @global Array $upload_badext + * @param String $filename - name of the file + * @param Text $filecontent + * @return Array with attachment information + */ + function __SaveAttachmentFile($filename, $filecontent) { + require_once 'modules/Settings/MailScanner/core/MailAttachmentMIME.php'; + + global $adb, $current_user, $upload_badext; + + $dirname = decideFilePath(); + $usetime = $adb->formatDate(date('ymdHis'), true); + $binFile = sanitizeUploadFileName($filename, $upload_badext); + + $attachid = $adb->getUniqueId('vtiger_crmentity'); + $saveasfile = "$dirname/$attachid". "_" .$binFile; + + $fh = fopen($saveasfile, 'wb'); + fwrite($fh, $filecontent); + fclose($fh); + + $mimetype = MailAttachmentMIME::detect($saveasfile); + + $adb->pquery("INSERT INTO vtiger_crmentity(crmid, smcreatorid, smownerid, + modifiedby, setype, description, createdtime, modifiedtime, presence, deleted) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)", + Array($attachid, $current_user->id, $current_user->id, $current_user->id, "MailManager Attachment", $binFile, $usetime, $usetime, 1, 0)); + + $adb->pquery("INSERT INTO vtiger_attachments SET attachmentsid=?, name=?, description=?, type=?, path=?", + Array($attachid, $binFile, $binFile, $mimetype, $dirname)); + + $attachInfo = array('attachid'=>$attachid, 'path'=>$dirname, 'name'=>$binFile, 'type'=>$mimetype, 'size'=>filesize($saveasfile)); + + return $attachInfo; + } + + /** + * Gets the Mail Attachments + * @param Boolean $withContent + * @param String $aName + * @return List of Attachments + */ + function attachments($withContent=true, $aName=false) { + $this->loadAttachmentsFromDB($withContent, $aName); + return $this->_attachments; + } + + /** + * Gets the Mail Subject + * @param Boolean $safehtml + * @return String + */ + function subject($safehtml=true) { + if ($safehtml==true) { + return MailManager_Utils::safe_html_string($this->_subject); + } + return $this->_subject; + } + + /** + * Sets the Mail Subject + * @param String $subject + */ + function setSubject($subject) { + $mailSubject = str_replace("_", " ", $subject); + $this->_subject = @self::__mime_decode($subject); + } + + /** + * Gets the Mail Body + * @param Boolean $safehtml + * @return String + */ + function body($safehtml=true) { + return $this->getBodyHTML($safehtml); + } + + /** + * Gets the Mail Body + * @param Boolean $safehtml + * @return String + */ + function getBodyHTML($safehtml=true) { + $bodyhtml = parent::getBodyHTML(); + if ($safehtml) { + $bodyhtml = MailManager_Utils::safe_html_string($bodyhtml); + } + return $bodyhtml; + } + + /** + * Gets the Mail From + * @param Integer $maxlen + * @return string + */ + function from($maxlen = 0) { + $fromString = $this->_from; + if ($maxlen && strlen($fromString) > $maxlen) { + $fromString = substr($fromString, 0, $maxlen-3).'...'; + } + return $fromString; + } + + /** + * Sets the Mail From Email Address + * @param Email $from + */ + function setFrom($from) { + $mailFrom = str_replace("_", " ", $from); + $this->_from = @self::__mime_decode($mailFrom); + } + + /** + * Gets the Mail To Email Addresses + * @return Email(s) + */ + function to() { + return $this->_to; + } + + /** + * Gets the Mail CC Email Addresses + * @return Email(s) + */ + function cc() { + return $this->_cc; + } + + /** + * Gets the Mail BCC Email Addresses + * @return Email(s) + */ + function bcc() { + return $this->_bcc; + } + + /** + * Gets the Mail Unique Identifier + * @return String + */ + function uniqueid() { + return $this->_uniqueid; + } + + /** + * Gets the Mail Unique Number + * @return Integer + */ + function muid() { + // unique message sequence id = imap_uid($msgno) + return $this->mUid; + } + + /** + * Gets the Mail Date + * @param Boolean $format + * @return Date + */ + function date($format = false) { + $date = $this->_date; + if ($format) { + if (preg_match(sprintf("/%s ([^ ]+)/", date('D, d M Y')), $date, $m)) { + $date = $m[1]; // Pick only time part for today + } else if (preg_match("/[a-zA-Z]{3}, ([0-9]{1,2} [a-zA-Z]{3} [0-9]{4})/", $date, $m)) { + $date = $m[1]; // Pick only date part + } + $userDate = str_replace('--','',getValidDisplayDate($date)); + return $userDate; + } else { + $dateWithTime = new DateTimeField(date('Y-m-d H:i:s',$date)); + $userDateTime = $dateWithTime->getDisplayDateTimeValue(); + return $userDateTime; + } + } + + /** + * Sets the Mail Date + * @param Date $date + */ + function setDate($date) { + $this->_date = $date; + } + + /** + * Checks if the Mail is read + * @return Boolean + */ + function isRead() { + return $this->mRead; + } + + /** + * Sets if the Mail is read + * @param Boolean $read + */ + function setRead($read) { + $this->mRead = $read; + } + + /** + * Gets the Mail Message Number + * @param Integer $offset + * @return Integer + */ + function msgNo($offset=0) { + return $this->mMsgNo + $offset; + } + + /** + * Sets the Mail Message Number + * @param Integer $msgno + */ + function setMsgNo($msgno) { + $this->mMsgNo = $msgno; + } + + /** + * Sets the Mail Headers + * @param Object $result + * @return self + */ + static function parseOverview($result) { + $instance = new self(); + $instance->setSubject($result->subject); + $instance->setFrom($result->from); + $instance->setDate($result->date); + $instance->setRead($result->seen); + $instance->setMsgNo($result->msgno); + return $instance; + } + +} +?> \ No newline at end of file diff --git a/modules/MailManager/src/viewers/Viewer.php b/modules/MailManager/src/viewers/Viewer.php new file mode 100644 index 0000000..65c528d --- /dev/null +++ b/modules/MailManager/src/viewers/Viewer.php @@ -0,0 +1,32 @@ +assign('CUSTOM_MODULE', true); + + $this->assign('APP', $app_strings); + $this->assign('MOD', $mod_strings); + $this->assign('MODULE', $currentModule); + // TODO: Update Single Module Instance name here. + $this->assign('SINGLE_MOD', 'SINGLE_'.$currentModule); + $this->assign('CATEGORY', getParentTab()); + $this->assign('IMAGE_PATH', "themes/$theme/images/"); + $this->assign('THEME', $theme); + return parent::vtigerCRM_Smarty(); + } +} +?> \ No newline at end of file diff --git a/modules/MailManager/third-party/AjaxUpload/ajaxUpload.php b/modules/MailManager/third-party/AjaxUpload/ajaxUpload.php new file mode 100644 index 0000000..e9d0d09 --- /dev/null +++ b/modules/MailManager/third-party/AjaxUpload/ajaxUpload.php @@ -0,0 +1,152 @@ +getSize()){ + return false; + } + + $target = fopen($path, "w"); + fseek($temp, 0, SEEK_SET); + stream_copy_to_stream($temp, $target); + fclose($target); + return true; + } + function getName() { + return $_GET['qqfile']; + } + function getSize() { + if (isset($_SERVER["CONTENT_LENGTH"])){ + return (int)$_SERVER["CONTENT_LENGTH"]; + } else { + throw new Exception('Getting content length is not supported.'); + } + } +} + +/** + * Handle file uploads via regular form post (uses the $_FILES array) + */ +class qqUploadedFileForm { + + /** + * Save the file to the specified path + * @return boolean TRUE on success + */ + function save($path) { + if(!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path)){ + return false; + } + return true; + } + function getName() { + return $_FILES['qqfile']['name']; + } + function getSize() { + return $_FILES['qqfile']['size']; + } +} + +class qqFileUploader { + protected $allowedExtensions = array(); + protected $sizeLimit = 10485760; + protected $file; + + function __construct(array $allowedExtensions = array(), $sizeLimit = 10485760){ + $allowedExtensions = array_map("strtolower", $allowedExtensions); + + $this->allowedExtensions = $allowedExtensions; + $this->sizeLimit = $sizeLimit; + + $this->checkServerSettings(); + + if (isset($_GET['qqfile'])) { + $this->file = new qqUploadedFileXhr(); + } elseif (isset($_FILES['qqfile'])) { + $this->file = new qqUploadedFileForm(); + } else { + $this->file = false; + } + } + + function checkServerSettings(){ + $postSize = $this->toBytes(ini_get('post_max_size')); + $uploadSize = $this->toBytes(ini_get('upload_max_filesize')); + + if ($postSize < $this->sizeLimit || $uploadSize < $this->sizeLimit){ + $size = max(1, $this->sizeLimit / 1024 / 1024) . 'M'; + die("{'error':'increase post_max_size and upload_max_filesize to $size'}"); + } + } + + function toBytes($str){ + $val = trim($str); + $last = strtolower($str[strlen($str)-1]); + switch($last) { + case 'g': $val *= 1024; + case 'm': $val *= 1024; + case 'k': $val *= 1024; + } + return $val; + } + + /** + * Returns array('success'=>true) or array('error'=>'error message') + */ + function handleUpload($uploadDirectory, $replaceOldFile = FALSE){ + if (!is_writable($uploadDirectory)){ + return array('error' => "Server error. Upload directory isn't writable."); + } + + if (!$this->file){ + return array('error' => 'No files were uploaded.'); + } + + $size = $this->file->getSize(); + + if ($size == 0) { + return array('error' => 'File is empty'); + } + + if ($size > $this->sizeLimit) { + return array('error' => 'File is too large'); + } + + $pathinfo = pathinfo($this->file->getName()); + $filename = $pathinfo['filename']; + //$filename = md5(uniqid()); + $ext = $pathinfo['extension']; + + if($this->allowedExtensions && !in_array(strtolower($ext), $this->allowedExtensions)){ + $these = implode(', ', $this->allowedExtensions); + return array('error' => 'File has an invalid extension, it should be one of '. $these . '.'); + } + + if(!$replaceOldFile){ + /// don't overwrite previous files that were uploaded + while (file_exists($uploadDirectory . $filename . '.' . $ext)) { + $filename .= rand(10, 99); + } + } + + if ($this->file->save($uploadDirectory . $filename . '.' . $ext)){ + return array('success'=>true); + } else { + return array('error'=> 'Could not save uploaded file.' . + 'The upload was cancelled, or server error encountered'); + } + + } +} \ No newline at end of file diff --git a/modules/MailManager/third-party/AjaxUpload/fileuploader.css b/modules/MailManager/third-party/AjaxUpload/fileuploader.css new file mode 100644 index 0000000..e7871ee --- /dev/null +++ b/modules/MailManager/third-party/AjaxUpload/fileuploader.css @@ -0,0 +1,40 @@ +.qq-uploader { position:relative; width: 100%;} + +.qq-upload-button { + display:block; /* or inline-block */ + width: 40px; height: 15px; padding: 5px 0; text-align:center; + background:#ff9900; border-bottom:1px solid #ddd;color:#FFFFFF; + font-weight:bold;font-size: 11px;font-family: Arial,Helvetica,sans-serif; + padding-top: 0;padding-right:6px;padding-bottom:0;padding-left:6px; + border-top-width:2px;border-right-width :2px;border-bottom-width:2px; + border-left-width:2px;border-top-color :#F0F0F0;border-right-color :#F0F0F0; + border-bottom-color :#F0F0F0;border-left-color :#F0F0F0;border-top-style :outset; + border-right-style :outset;border-bottom-style :outset;border-left-style :outset; + float:right; +} + +.qq-upload-button-hover {background:red; z-index: 0} +.qq-upload-button-focus {outline:1px dotted black;} + +.qq-upload-drop-area { + position:absolute; top:0; left:0; width:100%; height:100%; min-height: 70px; z-index:2; + background:#FF9797; text-align:center; +} +.qq-upload-drop-area span { + display:block; position:absolute; top: 50%; width:100%; margin-top:-8px; font-size:16px; +} +.qq-upload-drop-area-active {background:#FF7171;} + +.qq-upload-list { margin:0 20px;padding:0; list-style:disc;} +.qq-upload-list li { margin:0; padding:0; line-height:15px; font-size:12px;} +.qq-upload-file, .qq-upload-spinner, .qq-upload-size, .qq-upload-cancel, .qq-upload-failed-text { + margin-right: 7px; +} + +.qq-upload-file {} +.qq-upload-spinner {display:inline-block; background: url("loading.gif"); width:15px; height:15px; vertical-align:text-bottom;} +.qq-upload-size,.qq-upload-cancel {font-size:11px;} + +.qq-upload-failed-text {display:none;} +.qq-upload-fail .qq-upload-failed-text {display:inline;} +.qq-upload-deleteupload{color: red} \ No newline at end of file diff --git a/modules/MailManager/third-party/AjaxUpload/fileuploader.js b/modules/MailManager/third-party/AjaxUpload/fileuploader.js new file mode 100644 index 0000000..0c389a6 --- /dev/null +++ b/modules/MailManager/third-party/AjaxUpload/fileuploader.js @@ -0,0 +1,1242 @@ +/** + * http://github.com/valums/file-uploader + * + * Multiple file upload component with progress-bar, drag-and-drop. + * © 2010 Andrew Valums ( andrew(at)valums.com ) + * + * Licensed under GNU GPL 2 or later, see license.txt. + */ + +// +// Helper functions +// + +var qq = qq || {}; + +/** + * Adds all missing properties from second obj to first obj + */ +qq.extend = function(first, second){ + for (var prop in second){ + first[prop] = second[prop]; + } +}; + +/** + * Searches for a given element in the array, returns -1 if it is not present. + * @param {Number} [from] The index at which to begin the search + */ +qq.indexOf = function(arr, elt, from){ + if (arr.indexOf) return arr.indexOf(elt, from); + + from = from || 0; + var len = arr.length; + + if (from < 0) from += len; + + for (; from < len; from++){ + if (from in arr && arr[from] === elt){ + return from; + } + } + return -1; +}; + +qq.getUniqueId = (function(){ + var id = 0; + return function(){return id++;}; +})(); + +// +// Events + +qq.attach = function(element, type, fn){ + if (element.addEventListener){ + element.addEventListener(type, fn, false); + } else if (element.attachEvent){ + element.attachEvent('on' + type, fn); + } +}; +qq.detach = function(element, type, fn){ + if (element.removeEventListener){ + element.removeEventListener(type, fn, false); + } else if (element.attachEvent){ + element.detachEvent('on' + type, fn); + } +}; + +qq.preventDefault = function(e){ + if (e.preventDefault){ + e.preventDefault(); + } else{ + e.returnValue = false; + } +}; + +// +// Node manipulations + +/** + * Insert node a before node b. + */ +qq.insertBefore = function(a, b){ + b.parentNode.insertBefore(a, b); +}; +qq.remove = function(element){ + element.parentNode.removeChild(element); +}; + +qq.contains = function(parent, descendant){ + // compareposition returns false in this case + if (parent == descendant) return true; + + if (parent.contains){ + return parent.contains(descendant); + } else { + return !!(descendant.compareDocumentPosition(parent) & 8); + } +}; + +/** + * Creates and returns element from html string + * Uses innerHTML to create an element + */ +qq.toElement = (function(){ + var div = document.createElement('div'); + return function(html){ + div.innerHTML = html; + var element = div.firstChild; + div.removeChild(element); + return element; + }; +})(); + +// +// Node properties and attributes + +/** + * Sets styles for an element. + * Fixes opacity in IE6-8. + */ +qq.css = function(element, styles){ + if (styles.opacity != null){ + if (typeof element.style.opacity != 'string' && typeof(element.filters) != 'undefined'){ + styles.filter = 'alpha(opacity=' + Math.round(100 * styles.opacity) + ')'; + } + } + qq.extend(element.style, styles); +}; +qq.hasClass = function(element, name){ + var re = new RegExp('(^| )' + name + '( |$)'); + return re.test(element.className); +}; +qq.addClass = function(element, name){ + if (!qq.hasClass(element, name)){ + element.className += ' ' + name; + } +}; +qq.removeClass = function(element, name){ + var re = new RegExp('(^| )' + name + '( |$)'); + element.className = element.className.replace(re, ' ').replace(/^\s+|\s+$/g, ""); +}; +qq.setText = function(element, text){ + element.innerText = text; + element.textContent = text; +}; + +// +// Selecting elements + +qq.children = function(element){ + var children = [], + child = element.firstChild; + + while (child){ + if (child.nodeType == 1){ + children.push(child); + } + child = child.nextSibling; + } + + return children; +}; + +qq.getByClass = function(element, className){ + if (element.querySelectorAll){ + return element.querySelectorAll('.' + className); + } + + var result = []; + var candidates = element.getElementsByTagName("*"); + var len = candidates.length; + + for (var i = 0; i < len; i++){ + if (qq.hasClass(candidates[i], className)){ + result.push(candidates[i]); + } + } + return result; +}; + +/** + * obj2url() takes a json-object as argument and generates + * a querystring. pretty much like jQuery.param() + * + * how to use: + * + * `qq.obj2url({a:'b',c:'d'},'http://any.url/upload?otherParam=value');` + * + * will result in: + * + * `http://any.url/upload?otherParam=value&a=b&c=d` + * + * @param Object JSON-Object + * @param String current querystring-part + * @return String encoded querystring + */ +qq.obj2url = function(obj, temp, prefixDone){ + var uristrings = [], + prefix = '&', + add = function(nextObj, i){ + var nextTemp = temp + ? (/\[\]$/.test(temp)) // prevent double-encoding + ? temp + : temp+'['+i+']' + : i; + if ((nextTemp != 'undefined') && (i != 'undefined')) { + uristrings.push( + (typeof nextObj === 'object') + ? qq.obj2url(nextObj, nextTemp, true) + : (Object.prototype.toString.call(nextObj) === '[object Function]') + ? encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj()) + : encodeURIComponent(nextTemp) + '=' + encodeURIComponent(nextObj) + ); + } + }; + + if (!prefixDone && temp) { + prefix = (/\?/.test(temp)) ? (/\?$/.test(temp)) ? '' : '&' : '?'; + uristrings.push(temp); + uristrings.push(qq.obj2url(obj)); + } else if ((Object.prototype.toString.call(obj) === '[object Array]') && (typeof obj != 'undefined') ) { + // we wont use a for-in-loop on an array (performance) + for (var i = 0, len = obj.length; i < len; ++i){ + add(obj[i], i); + } + } else if ((typeof obj != 'undefined') && (obj !== null) && (typeof obj === "object")){ + // for anything else but a scalar, we will use for-in-loop + for (var i in obj){ + add(obj[i], i); + } + } else { + uristrings.push(encodeURIComponent(temp) + '=' + encodeURIComponent(obj)); + } + + return uristrings.join(prefix) + .replace(/^&/, '') + .replace(/%20/g, '+'); +}; + +// +// +// Uploader Classes +// +// + +var qq = qq || {}; + +/** + * Creates upload button, validates upload, but doesn't create file list or dd. + */ +qq.FileUploaderBasic = function(o){ + this._options = { + // set to true to see the server response + debug: false, + action: '/server/upload', + params: {}, + button: null, + multiple: true, + maxConnections: 3, + // validation + allowedExtensions: [], + sizeLimit: 0, + minSizeLimit: 0, + // events + // return false to cancel submit + onSubmit: function(id, fileName){}, + onProgress: function(id, fileName, loaded, total){}, + onComplete: function(id, fileName, responseJSON){}, + onCancel: function(id, fileName){}, + // messages + messages: { + typeError: "{file} has invalid extension. Only {extensions} are allowed.", + sizeError: "{file} is too large, maximum file size is {sizeLimit}.", + minSizeError: "{file} is too small, minimum file size is {minSizeLimit}.", + emptyError: "{file} is empty, please select files again without it.", + onLeave: "The files are being uploaded, if you leave now the upload will be cancelled." + }, + showMessage: function(message){ + alert(message); + } + }; + qq.extend(this._options, o); + + // number of files being uploaded + this._filesInProgress = 0; + this._handler = this._createUploadHandler(); + + if (this._options.button){ + this._button = this._createUploadButton(this._options.button); + } + + this._preventLeaveInProgress(); +}; + +qq.FileUploaderBasic.prototype = { + setParams: function(params){ + this._options.params = params; + }, + getInProgress: function(){ + return this._filesInProgress; + }, + _createUploadButton: function(element){ + var self = this; + + return new qq.UploadButton({ + element: element, + multiple: this._options.multiple && qq.UploadHandlerXhr.isSupported(), + onChange: function(input){ + self._onInputChange(input); + } + }); + }, + _createUploadHandler: function(){ + var self = this, + handlerClass; + + if(qq.UploadHandlerXhr.isSupported()){ + handlerClass = 'UploadHandlerXhr'; + } else { + handlerClass = 'UploadHandlerForm'; + } + + var handler = new qq[handlerClass]({ + debug: this._options.debug, + action: this._options.action, + maxConnections: this._options.maxConnections, + onProgress: function(id, fileName, loaded, total){ + self._onProgress(id, fileName, loaded, total); + self._options.onProgress(id, fileName, loaded, total); + }, + onComplete: function(id, fileName, result){ + self._onComplete(id, fileName, result); + self._options.onComplete(id, fileName, result); + }, + onCancel: function(id, fileName){ + self._onCancel(id, fileName); + self._options.onCancel(id, fileName); + } + }); + + return handler; + }, + _preventLeaveInProgress: function(){ + var self = this; + + qq.attach(window, 'beforeunload', function(e){ + if (!self._filesInProgress){return;} + + var e = e || window.event; + // for ie, ff + e.returnValue = self._options.messages.onLeave; + // for webkit + return self._options.messages.onLeave; + }); + }, + _onSubmit: function(id, fileName){ + this._filesInProgress++; + }, + _onProgress: function(id, fileName, loaded, total){ + }, + _onComplete: function(id, fileName, result){ + this._filesInProgress--; + if (result.error){ + this._options.showMessage(result.error); + } + }, + _onCancel: function(id, fileName){ + this._filesInProgress--; + }, + _onInputChange: function(input){ + if (this._handler instanceof qq.UploadHandlerXhr){ + this._uploadFileList(input.files); + } else { + if (this._validateFile(input)){ + this._uploadFile(input); + } + } + this._button.reset(); + }, + _uploadFileList: function(files){ + for (var i=0; i this._options.sizeLimit){ + this._error('sizeError', name); + return false; + + } else if (size && size < this._options.minSizeLimit){ + this._error('minSizeError', name); + return false; + } + + return true; + }, + _error: function(code, fileName){ + var message = this._options.messages[code]; + function r(name, replacement){message = message.replace(name, replacement);} + + r('{file}', this._formatFileName(fileName)); + r('{extensions}', this._options.allowedExtensions.join(', ')); + r('{sizeLimit}', this._formatSize(this._options.sizeLimit)); + r('{minSizeLimit}', this._formatSize(this._options.minSizeLimit)); + + this._options.showMessage(message); + }, + _formatFileName: function(name){ + if (name.length > 33){ + name = name.slice(0, 19) + '...' + name.slice(-13); + } + return name; + }, + _isAllowedExtension: function(fileName){ + var ext = (-1 !== fileName.indexOf('.')) ? fileName.replace(/.*[.]/, '').toLowerCase() : ''; + var allowed = this._options.allowedExtensions; + + if (!allowed.length){return true;} + + for (var i=0; i 99); + + return Math.max(bytes, 0.1).toFixed(1) + ['kB', 'MB', 'GB', 'TB', 'PB', 'EB'][i]; + } +}; + + +/** + * Class that creates upload widget with drag-and-drop and file list + * @inherits qq.FileUploaderBasic + */ +qq.FileUploader = function(o){ + // call parent constructor + qq.FileUploaderBasic.apply(this, arguments); + + // additional options + qq.extend(this._options, { + element: null, + // if set, will be used instead of qq-upload-list in template + listElement: null, + + template: '
        ' + + '
        Drop files here to upload
        ' + + '
        Upload file
        ' + + '
          ' + + '
          ', + + // template for one item in file list + fileTemplate: '
        • ' + + '' + + '' + + '' + + 'Cancel' + + 'Failed' + + '
        • ', + + classes: { + // used to get elements from templates + button: 'qq-upload-button', + drop: 'qq-upload-drop-area', + dropActive: 'qq-upload-drop-area-active', + list: 'qq-upload-list', + + file: 'qq-upload-file', + spinner: 'qq-upload-spinner', + size: 'qq-upload-size', + cancel: 'qq-upload-cancel', + + // added to list item when upload completes + // used in css to hide progress spinner + success: 'qq-upload-success', + fail: 'qq-upload-fail' + } + }); + // overwrite options with user supplied + qq.extend(this._options, o); + + this._element = this._options.element; + this._element.innerHTML = this._options.template; + this._listElement = this._options.listElement || this._find(this._element, 'list'); + + this._classes = this._options.classes; + + this._button = this._createUploadButton(this._find(this._element, 'button')); + + this._bindCancelEvent(); + this._setupDragDrop(); +}; + +// inherit from Basic Uploader +qq.extend(qq.FileUploader.prototype, qq.FileUploaderBasic.prototype); + +qq.extend(qq.FileUploader.prototype, { + /** + * Gets one of the elements listed in this._options.classes + **/ + _find: function(parent, type){ + var element = qq.getByClass(parent, this._options.classes[type])[0]; + if (!element){ + throw new Error('element not found ' + type); + } + return element; + }, + _setupDragDrop: function(){ + var self = this, + dropArea = this._find(this._element, 'drop'); + + var dz = new qq.UploadDropZone({ + element: dropArea, + onEnter: function(e){ + qq.addClass(dropArea, self._classes.dropActive); + e.stopPropagation(); + }, + onLeave: function(e){ + e.stopPropagation(); + }, + onLeaveNotDescendants: function(e){ + qq.removeClass(dropArea, self._classes.dropActive); + }, + onDrop: function(e){ + dropArea.style.display = 'none'; + qq.removeClass(dropArea, self._classes.dropActive); + self._uploadFileList(e.dataTransfer.files); + } + }); + + dropArea.style.display = 'none'; + + qq.attach(document, 'dragenter', function(e){ + if (!dz._isValidFileDrag(e)) return; + + dropArea.style.display = 'block'; + }); + qq.attach(document, 'dragleave', function(e){ + if (!dz._isValidFileDrag(e)) return; + + var relatedTarget = document.elementFromPoint(e.clientX, e.clientY); + // only fire when leaving document out + if ( ! relatedTarget || relatedTarget.nodeName == "HTML"){ + dropArea.style.display = 'none'; + } + }); + }, + _onSubmit: function(id, fileName){ + qq.FileUploaderBasic.prototype._onSubmit.apply(this, arguments); + this._addToList(id, fileName); + }, + _onProgress: function(id, fileName, loaded, total){ + qq.FileUploaderBasic.prototype._onProgress.apply(this, arguments); + + var item = this._getItemByFileId(id); + var size = this._find(item, 'size'); + size.style.display = 'inline'; + var text; + if (loaded != total){ + text = Math.round(loaded / total * 100) + '% from ' + this._formatSize(total); + } else { + text = this._formatSize(total); + } + + qq.setText(size, text); + }, + _onComplete: function(id, fileName, result){ + qq.FileUploaderBasic.prototype._onComplete.apply(this, arguments); + + // mark completed + var item = this._getItemByFileId(id); + qq.remove(this._find(item, 'cancel')); + qq.remove(this._find(item, 'spinner')); + + if (result.success){ + qq.addClass(item, this._classes.success); + } else { + qq.addClass(item, this._classes.fail); + } + }, + _addToList: function(id, fileName){ + var item = qq.toElement(this._options.fileTemplate); + item.qqFileId = id; + + var fileElement = this._find(item, 'file'); + qq.setText(fileElement, this._formatFileName(fileName)); + this._find(item, 'size').style.display = 'none'; + + this._listElement.appendChild(item); + }, + _getItemByFileId: function(id){ + var item = this._listElement.firstChild; + + // there can't be txt nodes in dynamically created list + // and we can use nextSibling + while (item){ + if (item.qqFileId == id) return item; + item = item.nextSibling; + } + }, + /** + * delegate click event for cancel link + **/ + _bindCancelEvent: function(){ + var self = this, + list = this._listElement; + + qq.attach(list, 'click', function(e){ + e = e || window.event; + var target = e.target || e.srcElement; + + if (qq.hasClass(target, self._classes.cancel)){ + qq.preventDefault(e); + + var item = target.parentNode; + self._handler.cancel(item.qqFileId); + qq.remove(item); + } + }); + } +}); + +qq.UploadDropZone = function(o){ + this._options = { + element: null, + onEnter: function(e){}, + onLeave: function(e){}, + // is not fired when leaving element by hovering descendants + onLeaveNotDescendants: function(e){}, + onDrop: function(e){} + }; + qq.extend(this._options, o); + + this._element = this._options.element; + + this._disableDropOutside(); + this._attachEvents(); +}; + +qq.UploadDropZone.prototype = { + _disableDropOutside: function(e){ + // run only once for all instances + if (!qq.UploadDropZone.dropOutsideDisabled ){ + + qq.attach(document, 'dragover', function(e){ + if (e.dataTransfer){ + e.dataTransfer.dropEffect = 'none'; + e.preventDefault(); + } + }); + + qq.UploadDropZone.dropOutsideDisabled = true; + } + }, + _attachEvents: function(){ + var self = this; + + qq.attach(self._element, 'dragover', function(e){ + if (!self._isValidFileDrag(e)) return; + + var effect = e.dataTransfer.effectAllowed; + if (effect == 'move' || effect == 'linkMove'){ + e.dataTransfer.dropEffect = 'move'; // for FF (only move allowed) + } else { + e.dataTransfer.dropEffect = 'copy'; // for Chrome + } + + e.stopPropagation(); + e.preventDefault(); + }); + + qq.attach(self._element, 'dragenter', function(e){ + if (!self._isValidFileDrag(e)) return; + + self._options.onEnter(e); + }); + + qq.attach(self._element, 'dragleave', function(e){ + if (!self._isValidFileDrag(e)) return; + + self._options.onLeave(e); + + var relatedTarget = document.elementFromPoint(e.clientX, e.clientY); + // do not fire when moving a mouse over a descendant + if (qq.contains(this, relatedTarget)) return; + + self._options.onLeaveNotDescendants(e); + }); + + qq.attach(self._element, 'drop', function(e){ + if (!self._isValidFileDrag(e)) return; + + e.preventDefault(); + self._options.onDrop(e); + }); + }, + _isValidFileDrag: function(e){ + var dt = e.dataTransfer, + // do not check dt.types.contains in webkit, because it crashes safari 4 + isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1; + + // dt.effectAllowed is none in Safari 5 + // dt.types.contains check is for firefox + return dt && dt.effectAllowed != 'none' && + (dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files'))); + + } +}; + +qq.UploadButton = function(o){ + this._options = { + element: null, + // if set to true adds multiple attribute to file input + multiple: false, + // name attribute of file input + name: 'file', + onChange: function(input){}, + hoverClass: 'qq-upload-button-hover', + focusClass: 'qq-upload-button-focus' + }; + + qq.extend(this._options, o); + + this._element = this._options.element; + + // make button suitable container for input + qq.css(this._element, { + position: 'relative', + overflow: 'hidden', + // Make sure browse button is in the right side + // in Internet Explorer + direction: 'ltr' + }); + + this._input = this._createInput(); +}; + +qq.UploadButton.prototype = { + /* returns file input element */ + getInput: function(){ + return this._input; + }, + /* cleans/recreates the file input */ + reset: function(){ + if (this._input.parentNode){ + qq.remove(this._input); + } + + qq.removeClass(this._element, this._options.focusClass); + this._input = this._createInput(); + }, + _createInput: function(){ + var input = document.createElement("input"); + + if (this._options.multiple){ + input.setAttribute("multiple", "multiple"); + } + + input.setAttribute("type", "file"); + input.setAttribute("name", this._options.name); + + qq.css(input, { + position: 'absolute', + // in Opera only 'browse' button + // is clickable and it is located at + // the right side of the input + right: 0, + top: 0, + fontFamily: 'Arial', + // 4 persons reported this, the max values that worked for them were 243, 236, 236, 118 + //fontSize: '118px', + margin: 0, + padding: 0, + cursor: 'pointer', + opacity: 0 + }); + + this._element.appendChild(input); + + var self = this; + qq.attach(input, 'change', function(){ + self._options.onChange(input); + }); + + qq.attach(input, 'mouseover', function(){ + qq.addClass(self._element, self._options.hoverClass); + }); + qq.attach(input, 'mouseout', function(){ + qq.removeClass(self._element, self._options.hoverClass); + }); + qq.attach(input, 'focus', function(){ + qq.addClass(self._element, self._options.focusClass); + }); + qq.attach(input, 'blur', function(){ + qq.removeClass(self._element, self._options.focusClass); + }); + + // IE and Opera, unfortunately have 2 tab stops on file input + // which is unacceptable in our case, disable keyboard access + if (window.attachEvent){ + // it is IE or Opera + input.setAttribute('tabIndex', "-1"); + } + + return input; + } +}; + +/** + * Class for uploading files, uploading itself is handled by child classes + */ +qq.UploadHandlerAbstract = function(o){ + this._options = { + debug: false, + action: '/upload.php', + // maximum number of concurrent uploads + maxConnections: 999, + onProgress: function(id, fileName, loaded, total){}, + onComplete: function(id, fileName, response){}, + onCancel: function(id, fileName){} + }; + qq.extend(this._options, o); + + this._queue = []; + // params for files in queue + this._params = []; +}; +qq.UploadHandlerAbstract.prototype = { + log: function(str){ + if (this._options.debug && window.console) console.log('[uploader] ' + str); + }, + /** + * Adds file or file input to the queue + * @returns id + **/ + add: function(file){}, + /** + * Sends the file identified by id and additional query params to the server + */ + upload: function(id, params){ + var len = this._queue.push(id); + + var copy = {}; + qq.extend(copy, params); + this._params[id] = copy; + + // if too many active uploads, wait... + if (len <= this._options.maxConnections){ + this._upload(id, this._params[id]); + } + }, + /** + * Cancels file upload by id + */ + cancel: function(id){ + this._cancel(id); + this._dequeue(id); + }, + /** + * Cancells all uploads + */ + cancelAll: function(){ + for (var i=0; i= max && i < max){ + var nextId = this._queue[max-1]; + this._upload(nextId, this._params[nextId]); + } + } +}; + +/** + * Class for uploading files using form and iframe + * @inherits qq.UploadHandlerAbstract + */ +qq.UploadHandlerForm = function(o){ + qq.UploadHandlerAbstract.apply(this, arguments); + + this._inputs = {}; +}; +// @inherits qq.UploadHandlerAbstract +qq.extend(qq.UploadHandlerForm.prototype, qq.UploadHandlerAbstract.prototype); + +qq.extend(qq.UploadHandlerForm.prototype, { + add: function(fileInput){ + fileInput.setAttribute('name', 'qqfile'); + var id = 'qq-upload-handler-iframe' + qq.getUniqueId(); + + this._inputs[id] = fileInput; + + // remove file input from DOM + if (fileInput.parentNode){ + qq.remove(fileInput); + } + + return id; + }, + getName: function(id){ + // get input value and remove path to normalize + return this._inputs[id].value.replace(/.*(\/|\\)/, ""); + }, + _cancel: function(id){ + this._options.onCancel(id, this.getName(id)); + + delete this._inputs[id]; + + var iframe = document.getElementById(id); + if (iframe){ + // to cancel request set src to something else + // we use src="javascript:false;" because it doesn't + // trigger ie6 prompt on https + iframe.setAttribute('src', 'javascript:false;'); + + qq.remove(iframe); + } + }, + _upload: function(id, params){ + var input = this._inputs[id]; + + if (!input){ + throw new Error('file with passed id was not added, or already uploaded or cancelled'); + } + + var fileName = this.getName(id); + + var iframe = this._createIframe(id); + var form = this._createForm(iframe, params); + form.appendChild(input); + + var self = this; + + this._attachLoadEvent(iframe, function(){ + self.log('iframe loaded'); + + var response = self._getIframeContentJSON(iframe); + + self._options.onComplete(id, fileName, response); + self._dequeue(id); + + delete self._inputs[id]; + // timeout added to fix busy state in FF3.6 + setTimeout(function(){ + qq.remove(iframe); + }, 1); + }); + + form.submit(); + qq.remove(form); + + return id; + }, + _attachLoadEvent: function(iframe, callback){ + qq.attach(iframe, 'load', function(){ + // when we remove iframe from dom + // the request stops, but in IE load + // event fires + if (!iframe.parentNode){ + return; + } + + // fixing Opera 10.53 + if (iframe.contentDocument && + iframe.contentDocument.body && + iframe.contentDocument.body.innerHTML == "false"){ + // In Opera event is fired second time + // when body.innerHTML changed from false + // to server response approx. after 1 sec + // when we upload file with iframe + return; + } + + callback(); + }); + }, + /** + * Returns json object received by iframe from server. + */ + _getIframeContentJSON: function(iframe){ + // iframe.contentWindow.document - for IE<7 + var doc = iframe.contentDocument ? iframe.contentDocument: iframe.contentWindow.document, + response; + + this.log("converting iframe's innerHTML to JSON"); + this.log("innerHTML = " + doc.body.innerHTML); + + try { + response = eval("(" + doc.body.innerHTML + ")"); + } catch(err){ + response = {}; + } + + return response; + }, + /** + * Creates iframe with unique name + */ + _createIframe: function(id){ + // We can't use following code as the name attribute + // won't be properly registered in IE6, and new window + // on form submit will open + // var iframe = document.createElement('iframe'); + // iframe.setAttribute('name', id); + + var iframe = qq.toElement(''; + +echo ''; +?> \ No newline at end of file diff --git a/modules/Webmails/Forms.php b/modules/Webmails/Forms.php new file mode 100644 index 0000000..7de5228 --- /dev/null +++ b/modules/Webmails/Forms.php @@ -0,0 +1,35 @@ +'; + $the_form .= 'Folders'; + $the_form .= '","","","",""); +$listview_entries = array(); + +$displayed_msgs=0; +$info = imap_status($MailBox->mbox, "{".$MailBox->imapServerAddress."}", SA_UNSEEN); +$unread_msgs = $info->unseen; +//$new_msgs=0; +if(($numEmails) <= 0) + $listview_entries[0][] = ''; +else { + + if(isset($_REQUEST["search"]) && trim($_REQUEST["search_input"]) != '') { + for($l=$MailBox->mails_per_page-1;$l>=0;$l--){ + if($overview[$l]->msgno!="") + $listview_entries[] = show_msg($mails,$overview[$l]->msgno); + } + }else{ + $i=1; + while ($i<=$MailBox->mails_per_page) { + if($start_message > 0){ + $listview_entries[] = show_msg($mails,$start_message); + $start_message--; + } + $i++; + } + } + + flush(); + // MAIN LOOP + // Main loop to create listview entries + +} + +$search_html = ''; + +// Build folder list and move_to dropdown box +$list = imap_getmailboxes($MailBox->mbox, "{".$MailBox->imapServerAddress."}", "*"); +sort($list); +$i=0; +if (is_array($list)) { + $boxes = ''; +} + +imap_close($MailBox->mbox); +$smarty = new vtigerCRM_Smarty; +$smarty->assign("SEARCH_VALUE",vtlib_purify($_REQUEST['search_input'])); +$smarty->assign("USERID", $current_user->id); +$smarty->assign("MOD", $mod_strings); +$smarty->assign("APP", $app_strings); +$smarty->assign("IMAGE_PATH",$image_path); +$smarty->assign("LISTENTITY", $listview_entries); +$smarty->assign("LISTHEADER", $listview_header); +$smarty->assign("SEARCH_HTML", $search_html); +$smarty->assign("MODULE","Webmails"); +$smarty->assign("SINGLE_MOD",getTranslatedString('SINGLE_'.$currentModule, $currentModule)); +$smarty->assign("BUTTONS",$other_text); +$smarty->assign("CATEGORY","My Home Page"); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("FOLDER_SELECT", $boxes); +$smarty->assign("NUM_EMAILS", $numEmails); +$smarty->assign("MAILBOX", $MailBox->mailbox); +$smarty->assign("ACCOUNT", $MailBox->display_name); +$smarty->assign("BOXLIST",$folders); +$smarty->assign("DEGRADED_SERVICE",$degraded_service); +$smarty->assign("THEME",$theme); +$smarty->display("Webmails.tpl"); +?> diff --git a/modules/Webmails/ListViewAjax.php b/modules/Webmails/ListViewAjax.php new file mode 100644 index 0000000..9c4cf07 --- /dev/null +++ b/modules/Webmails/ListViewAjax.php @@ -0,0 +1,214 @@ +mbox || !isset($mods["imap"]) || $mods["imap"] == "") { + echo "

          ".$mod_strings['LBL_CONFIGURE_MAIL_SETTINGS']."

          "; + exit(); +} + +// Set the system into degraded service mode where needed +$degraded_service='false'; +if($MailBox->mail_protocol == "imap" || $MailBox->mail_protocol == "pop3") + $degraded_service='true'; + +$save_path=$root_directory.'modules/Webmails/tmp'; +$user_dir=$save_path."/".$_SESSION["authenticated_user_id"]; + +// Get the list of mails for this mailbox +$elist = $MailBox->mailList; +$numEmails = $elist["count"]; + +$mails_per_page = $MailBox->mails_per_page; + +// Calculate paging information ahead before retrieving overviews +if($start == 1 || $start == "") { + $start_message=$numEmails; +} else { + $start_message=($numEmails-(($start-1)*$mails_per_page)); +} + +$c=$numEmails; + +$numPages = ceil($numEmails/$MailBox->mails_per_page); +if($numPages > 1) { + if($start != 1){ + $navigationOutput = "  "; + $navigationOutput .= "  "; + } + if($start <= ($numPages-1)){ + $navigationOutput .= "  "; + $navigationOutput .= "  "; + } +} + +$js_array = ""; +$overview=$elist["overview"]; +$mails = array(); +if (is_array($overview)) +{ + foreach ($overview as $val) + { + $mails[$val->msgno] = $val; + $hdr = @imap_headerinfo($MailBox->mbox, $val->msgno); + $val->from = utf8_decode(utf8_encode(imap_utf8(addslashes($val->from)))); + $val->to = utf8_decode(utf8_encode(imap_utf8(addslashes($val->to)))); + $val->subject = utf8_decode(utf8_encode(imap_utf8($val->subject))); + $to = str_replace("<",":",$val->to); + $to_list = str_replace(">","",$to); + $from = str_replace("<",":",$val->from); + $from_list = str_replace(">","",$from); + $cc = str_replace("<",":",$hdr->ccaddress); + $cc_list = str_replace(">","",$cc); + /*$js_array .= "webmail2[".$val->msgno."] = new Array();"; + $js_array .= "webmail2[".$val->msgno."]['from'] = '".addslashes($from_list)."';"; + $js_array .= "webmail2[".$val->msgno."]['to'] = '".addslashes($to_list)."';"; + $js_array .= "webmail2[".$val->msgno."]['subject'] = '".addslashes($val->subject)."';"; + $js_array .= "webmail2[".$val->msgno."]['date'] = '".addslashes($val->date)."';"; + $js_array .= "webmail2[".$val->msgno."]['cc'] = '".$cc_list."';";*/ + } +} +$search_fields = Array("SUBJECT","BODY","TO","CC","BCC","FROM"); +$listview_header = array("","","","",""); +$listview_entries = array(); + +$displayed_msgs=0; + +if(($numEmails) <= 0) + $listview_entries[0][] = ''; +else { + + if($_REQUEST["search_input"] != '') { + for($l=$MailBox->mails_per_page-1;$l>=0;$l--){ + if($overview[$l]->msgno!="") + $listview_entries[] = show_msg($mails,$overview[$l]->msgno); + } + }else{ + $i=1; + while ($i<=$MailBox->mails_per_page) { + if($start_message > 0){ + $listview_entries[] = show_msg($mails,$start_message); + $start_message--; + } + $i++; + } + } + + flush(); + // MAIN LOOP + // Main loop to create listview entries + +} + +$search_html = ''; + +// Build folder list and move_to dropdown box +$list = imap_getmailboxes($MailBox->mbox, "{".$MailBox->imapServerAddress."}", "*"); +sort($list); +$i=0; +if (is_array($list)) { + $boxes = ''; +} +imap_close($MailBox->mbox); +$smarty = new vtigerCRM_Smarty; +$smarty->assign("MOD", $mod_strings); +$smarty->assign("UNREAD_COUNT",$unread_msgs); +$smarty->assign("LISTENTITY", $listview_entries); +$smarty->assign("LISTHEADER", $listview_header); +$smarty->assign("NAVIGATION", $navigationOutput); +$smarty->assign("FOLDER_SELECT", $boxes); +$smarty->assign("NUM_EMAILS", $numEmails); +$smarty->assign("MAILBOX", $MailBox->mailbox); +$smarty->assign("ACCOUNT", $MailBox->display_name); +$smarty->assign("BOXLIST",$folders); +$smarty->assign("MAIL_INFO",$js_array); +$smarty->display("ListViewAjax.tpl"); +?> diff --git a/modules/Webmails/MailBox.php b/modules/Webmails/MailBox.php new file mode 100644 index 0000000..3cc6c8a --- /dev/null +++ b/modules/Webmails/MailBox.php @@ -0,0 +1,266 @@ +db = PearDatabase::getInstance(); + $this->db->println("Entering MailBox($mailbox)"); + + $this->mailbox = $mailbox; + $tmp = getMailServerInfo($current_user); + + if($this->db->num_rows($tmp) < 1) + $this->enabled = 'false'; + else + $this->enabled = 'true'; + + $this->boxinfo = $this->db->fetch_array($tmp); + + $this->login_username=trim($this->boxinfo["mail_username"]); + $this->secretkey=$oencrypt->decrypt(trim($this->boxinfo["mail_password"])); + $this->imapServerAddress=gethostbyname(trim($this->boxinfo["mail_servername"])); + $this->mail_protocol=$this->boxinfo["mail_protocol"]; + $this->ssltype=$this->boxinfo["ssltype"]; + $this->sslmeth=$this->boxinfo["sslmeth"]; + + $this->box_refresh=trim($this->boxinfo["box_refresh"]); + $this->mails_per_page=trim($this->boxinfo["mails_per_page"]); + if($this->mails_per_page < 1) + $this->mails_per_page=20; + + $this->account_name=$this->boxinfo["account_name"]; + $this->display_name=$this->boxinfo["display_name"]; + //$this->imapServerAddress=$this->boxinfo["mail_servername"]; + + $this->db->println("Setting Mailbox Name"); + if($this->mailbox != "") + $this->mailbox=$mailbox; + + $this->db->println("Opening Mailbox"); + if(!$this->mbox && $this->mailbox != "") + $this->getImapMbox(); + + $this->db->println("Loading mail list"); + $pa=$p; + $se=$s; + if($this->mbox){ + if ($se != ""){$this->mailList = $this->searchMailList($se,$pa);} + else if ($pa == ""){$this->mailList = $this->customMailList(0);} + else {$this->mailList = $this->customMailList($pa);} + } + + $this->db->println("Exiting MailBox($mailbox)"); + } + + function customMailList($page) { + $info = imap_check($this->mbox); + $numEmails = $info->Nmsgs; + $current_mails = ceil($page*$this->mails_per_page); + $current_mails = $numEmails - $current_mails; + $start =$current_mails-$this->mails_per_page+1; + if ($start<=0) $start=1; + if ($current_mails<=0)$current_mails=0; + + $mailOverviews = @imap_fetch_overview($this->mbox, "$start:$current_mails", 0); + $out = array("overview"=>$mailOverviews,"count"=>$numEmails); + return $out; + } + + function searchMailList($searchstring,$page) { + $search=""; + $searchlist = Array(); + + $searchlist = imap_search($this->mbox,$searchstring); + if ($searchlist==false) return $out; + $num_searches = count($searchlist); + if ($num_searches < $this->mails_per_page){ + $current_mails = $num_searches -1; + }else{ + $current_mails = ceil($page*$this->mails_per_page); + $current_mails = $num_searches - $current_mails-1; + } + $start = $current_mails-$this->mails_per_page; + if ($start < 0)$start=0; + $j=0; + for($i=$current_mails; $i >= $start ; $i--){ + if($i==$current_mails){ + $search=$searchlist[$i]; + }else $search=$search.",".$searchlist[$i]; + $j++; + } + if ($search!="") + $result = @imap_fetch_overview($this->mbox, "$search",0); + $out = array("overview"=>$result,"count"=>count($searchlist)); + return $out; + } + + function fullMailList() { + $mailHeaders = @imap_headers($this->mbox); + $numEmails = sizeof($mailHeaders); + $mailOverviews = @imap_fetch_overview($this->mbox, "1:$numEmails", 0); + $out = array("headers"=>$mailHeaders,"overview"=>$mailOverviews,"count"=>$numEmails); + return $out; + } + + function isBase64($iVal){ + $_tmp=preg_replace("/[^A-Z0-9\+\/\=]/i","",$iVal); + return (strlen($_tmp) % 4 == 0 ) ? "y" : "n"; + } + + function getImapMbox() { + $this->db->println("Entering getImapMbox()"); + $mods = parsePHPModules(); + $this->db->println("Parsing PHP Modules"); + + // first we will try a regular old IMAP connection: + if($this->ssltype == "") {$this->ssltype = "notls";} + if($this->sslmeth == "") {$this->sslmeth = "novalidate-cert";} + + if($this->mail_protocol == "pop3") + $port = "110"; + else + { + if($mods["imap"]["SSL Support"] == "enabled" && ($this->ssltype == "tls" || $this->ssltype == "ssl")) + $port = "993"; + else + $port = "143"; + } + + $this->db->println("Building connection string"); + if(preg_match("/@/",$this->login_username)) + { + $mailparts = split("@",$this->login_username); + $user="".trim($mailparts[0]).""; + $domain="".trim($mailparts[1]).""; + + // This section added to fix a bug when connecting as user@domain.com + if($this->readonly == "true") + { + if($mods["imap"]["SSL Support"] == "enabled") + $connectString = "/".$this->ssltype."/".$this->sslmeth."/user={$user}@{$domain}/readonly"; + else + $connectString = "/notls/novalidate-cert/user={$user}@{$domain}/readonly"; + } + else + { + if($mods["imap"]["SSL Support"] == "enabled") + $connectString = "/".$this->ssltype."/".$this->sslmeth."/user={$user}@{$domain}"; + else + $connectString = "/notls/novalidate-cert/user={$user}@{$domain}"; + } + } + else + { + if($this->readonly == "true") + { + if($mods["imap"]["SSL Support"] == "enabled") + $connectString = "/".$this->ssltype."/".$this->sslmeth."/readonly"; + else + $connectString = "/notls/novalidate-cert/readonly"; + } + else + { + if($mods["imap"]["SSL Support"] == "enabled") + $connectString = "/".$this->ssltype."/".$this->sslmeth; + else + $connectString = "/notls/novalidate-cert"; + } + } + + //$connectString = "{".$this->imapServerAddress."/".$this->mail_protocol.":".$port.$connectString."}".$this->mailbox; + $connectString = "{".$this->imapServerAddress.":".$port."/".$this->mail_protocol.$connectString."}".$this->mailbox; + //Reference - http://forums.vtiger.com/viewtopic.php?p=33478#33478 - which has no tls or validate-cert + $connectString1 = "{".$this->imapServerAddress."/".$this->mail_protocol.":".$port."}".$this->mailbox; + + $this->db->println("Done Building Connection String.. $connectString Connecting to box"); + //checking the imap support in php + if(!function_exists('imap_open')) + { + echo "".$mod_strings['LBL_ENABLE_IMAP_SUPPORT'].""; + exit(); + } + + if(!$this->mbox = @imap_open($connectString, $this->login_username, $this->secretkey)) + { + //try second string which has no tls or validate-cert + if(!$this->mbox = @imap_open($connectString1, $this->login_username, $this->secretkey)) + { + global $current_user,$mod_strings; + $this->db->println("CONNECTION ERROR - Could not be connected to the server using imap_open function through the connection strings $connectString and $connectString1"); + echo "
           ".$mod_strings['LBL_MAIL_CONNECT_ERROR']." ".$mod_strings['LBL_HERE'].". ".$mod_strings['LBL_PLEASE']." ".$mod_strings['LBL_CLICK_HERE']."".$mod_strings['LBL_GOTO_EMAILS_MODULE']." "; + exit; + } + } + + $this->db->println("Done connecting to box"); + } +} // END CLASS + + +function parsePHPModules() { + ob_start(); + phpinfo(INFO_MODULES); + $s = ob_get_contents(); + ob_end_clean(); + + $s = strip_tags($s,'

          "; + + if ($mails[$start_message]->deleted) + { + $listview_entries[$num][] = ''; + $listview_entries[$num][] = ''; + $listview_entries[$num][] = ''; + } + elseif(!$mails[$start_message]->seen || $mails[$start_message]->recent) + { + $listview_entries[$num][] = ''; + $listview_entries[$num][] = ''; + $listview_entries[$num][] = ''; + } + else + { + //IMPORTANT - This UTF-8 conversion has been done in ListView.php so no need to do again here + //Added to shown the original UTF-8 characters - Mickie - 30-11-06 - Starts + //we can use the option 1 or option 2 + //Option 1 - Starts + /* + $translated_subject = imap_mime_header_decode($mails[$start_message]->subject); + for($i=0;$icharset != 'default') + { + $tmp .= $translated_subject[$i]->text; + $mails[$start_message]->subject = utf8_decode($tmp);//$tmp; + } + } + //Option 1 - Ends + */ + //Option 2 - Starts + //$mails[$start_message]->subject = utf8_decode(imap_utf8($mails[$start_message]->subject));//imap_utf8($mails[$start_message]->subject); + //Option 2 - Ends + //Added to shown the original UTF-8 characters - Mickie - 30-11-06 - Ends + + $listview_entries[$num][] = ''; + $listview_entries[$num][] = ''; + $listview_entries[$num][] = ''; + } + + + + if($mails[$start_message]->deleted) + $listview_entries[$num][] = ''; + else + $listview_entries[$num][] = ''; + + + return $listview_entries[$num]; +} + +?> diff --git a/modules/Webmails/Save.php b/modules/Webmails/Save.php new file mode 100644 index 0000000..f6047bc --- /dev/null +++ b/modules/Webmails/Save.php @@ -0,0 +1,201 @@ +mbox; +$email = new Webmails($MailBox->mbox, $_REQUEST["mailid"]); +$subject = imap_utf8($email->subject); +$date = $email->date; +$array_tab = Array(); +$email->loadMail($array_tab); +$msgData = str_replace('',"",$email->body); +$content['attachtab'] = $email->attachtab; +while ($tmp = array_pop($content['attachtab'])){ + if ((!preg_match('/ATTACHMENT/i', $tmp['disposition'])) && $conf->display_text_attach && (preg_match('/text\/plain/i', $tmp['mime']))) + $msgData .= '
          '.view_part_detail($mail, $mailid, $tmp['number'], $tmp['transfer'], $tmp['charset'], $charset); +} +$focus->column_fields['subject']=$subject; +$focus->column_fields["activitytype"]="Emails"; + +$ddate = date("Y-m-d",strtotime($date)); +$dtime = date("h:m"); +$focus->column_fields["assigned_user_id"] = $current_user->id; +$focus->column_fields["date_start"] = $ddate; +$focus->column_fields["time_start"] = $dtime; +//Set the flag as 'Webmails' to show up the sent date +$focus->column_fields["email_flag"] = "WEBMAIL"; + +//Save the To field information in vtiger_emaildetails +$all_to_ids = $email->to; +$focus->column_fields["saved_toid"] = implode(',',$all_to_ids); + +//store the sent date in 'yyyy-mm-dd' format +$user_old_date_format = $current_user->date_format; +$current_user->date_format = 'yyyy-mm-dd'; + +$focus->column_fields["description"]=$msgData; + +//to save the email details in vtiger_emaildetails vtiger_tables +$fieldid = $adb->query_result($adb->pquery('select fieldid from vtiger_field where tablename="vtiger_contactdetails" and fieldname="email" and columnname="email" and vtiger_field.presence in (0,2)', array()),0,'fieldid'); + +if(count($email->relationship) != 0) { + $focus->column_fields['parent_id']=$email->relationship["id"].'@'.$fieldid.'|'; + + $focus->save("Emails"); + if($email->relationship["type"] == "Contacts") + add_attachment_to_contact($email->relationship["id"],$email,$focus->id); +}else { + //if relationship is not available create a contact and relate the email to the contact + require_once('modules/Contacts/Contacts.php'); + $contact_focus = new Contacts(); + //Populate the lastname as emailid if email doesn't have from name + if($email->fromname){ + $contact_focus->column_fields['lastname'] =$email->fromname; + }else{ + $contact_focus->column_fields['lastname'] =$email->from; + } + + $contact_focus->column_fields['email'] = $email->from; + $contact_focus->column_fields["assigned_user_id"]=$current_user->id; + $contact_focus->save("Contacts"); + $focus->column_fields['parent_id']=$contact_focus->id.'@'.$fieldid.'|'; + + $focus->save("Emails"); + add_attachment_to_contact($contact_focus->id,$email,$focus->id); +} + +function add_attachment_to_contact($cid,$email,$emailid) { + // add vtiger_attachments to contact + global $adb,$current_user,$default_charset; + for($j=0;$j<2;$j++) { + if($j==0) + $attachments=$email->downloadAttachments(); + else + $attachments=$email->downloadInlineAttachments(); + + $upload_filepath = decideFilePath(); + for($i=0,$num_files=count($attachments);$i<$num_files;$i++) + { + $current_id = $adb->getUniqueID("vtiger_crmentity"); + $date_var = $adb->formatDate(date('Y-m-d H:i:s'), true); + + $filename = preg_replace("/[ ()-]+/", "_",$attachments[$i]["filename"]); + preg_match_all('/=\?([^\?]+)\?([^\?]+)\?([^\?]+)\?=/', $filename, $matches); + $totalmatches = count($matches[0]); + + for($index = 0; $index < $totalmatches; ++$index) { + $charset = $matches[1][$index]; + $encoding= strtoupper($matches[2][$index]); + $data = $matches[3][$index]; + + if($encoding == 'B') { + $filename = base64_decode($data); + } else if($encoding == 'Q') { + $filename = quoted_printable_decode($data); + } + $filename = iconv(str_replace('_','-',$charset),$default_charset,$filename); + } + + $saveasfile = $upload_filepath.'/'.$current_id.'_'.$filename; + $filetype = MailAttachmentMIME::detect($saveasfile); + $filesize = $attachments[$i]["filesize"]; + + $query = "insert into vtiger_crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values(?,?,?,?,?,?,?)"; + $qparams = array($current_id, $current_user->id, $current_user->id, 'Contacts Attachment', 'Uploaded from webmail during qualification', $date_var, $date_var); + $result = $adb->pquery($query, $qparams); + + $sql = "insert into vtiger_attachments (attachmentsid,name,description,type,path) values(?,?,?,?,?)"; + $params = array($current_id, $filename, 'Uploaded '.$filename.' from webmail', $filetype, $upload_filepath); + $result = $adb->pquery($sql, $params); + + if(!empty($result)){ + + // Create document record + $document = new Documents(); + $document->column_fields['notes_title'] = $filename; + $document->column_fields['filename'] = $filename; + $document->column_fields['filesize'] = $filesize; + $document->column_fields['filetype'] = $filetype; + $document->column_fields['filestatus'] = 1; + $document->column_fields['filelocationtype'] = 'I'; + $document->column_fields['folderid'] = 1; // Default Folder + $document->column_fields['assigned_user_id'] = $current_user->id; + $document->save('Documents'); + + $sql1 = "insert into vtiger_senotesrel values(?,?)"; + $params1 = array($cid, $document->id); + $result = $adb->pquery($sql1, $params1); + + $sql1 = "insert into vtiger_seattachmentsrel values(?,?)"; + $params1 = array($document->id, $current_id); + $result = $adb->pquery($sql1, $params1); + + $sql1 = "insert into vtiger_seattachmentsrel values(?,?)"; + $params1 = array($emailid, $current_id); + $result = $adb->pquery($sql1, $params1); + } + + //we have to add attachmentsid_ as prefix for the filename + $move_filename = $upload_filepath.'/'.$current_id.'_'.$filename; + + $fp = fopen($move_filename, "w") or die("Can't open file"); + fputs($fp, base64_decode($attachments[$i]["filedata"])); + fclose($fp); + } + } +} +//Display the sent date in logged in user date format +$current_user->date_format = $user_old_date_format; + +function view_part_detail($mail,$mailid,$part_no, &$transfer, &$msg_charset, &$charset) +{ + $text = imap_fetchbody($mail,$mailid,$part_no); + if ($transfer == 'BASE64') + $str = nl2br(imap_base64($text)); + elseif($transfer == 'QUOTED-PRINTABLE') + $str = nl2br(quoted_printable_decode($text)); + else + $str = nl2br($text); + return ($str); +} + +$_REQUEST['parent_id'] = $focus->column_fields['parent_id']; + +$return_id = vtlib_purify($_REQUEST["mailid"]); +$return_module='Webmails'; +$return_action='ListView'; + +if($_POST["ajax"] != "true") + header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); + +return; +?> \ No newline at end of file diff --git a/modules/Webmails/TODO b/modules/Webmails/TODO new file mode 100644 index 0000000..711fa27 --- /dev/null +++ b/modules/Webmails/TODO @@ -0,0 +1,19 @@ +webmail todos: +-------------- +1) Add attachment uploading code for emails added to vtiger -- Done 05-25-06 -- mmbrich +2) Create "Add to Vtiger" link to "Quick View" -- Done 01-30-06 -- mmbrich +3) BCC current_user on all outgoing emails -- Done 01-30-06 -- mmbrich +4) Automatically import threads on mbox refresh +5) Multiple email accounts +6) Fix entity relationships so entites will show up in "Emails" module under "More Information" -- Done 05-24-06 -- vtiger +7) Store the msg-id of the imported emails (for checking the thread and importing) -- not needed +8) Add all needed tab relationships to the DB +9) Generate a related list of some kind for webmails -- Done 01-30-06 -- mmbrich +10) Enable the following relationships with an Emails entity: + a) HelpDesk + b) Vendor + c) Product + d) {Multiple} Other Emails (for thread relationships) + e) ?? +11) Enable radio boxes and massdelete funtion +12) Figure out a way to AJAX'ify checks for new messages and automatically insert them in the table? -- Done 05-25-06 -- mmbrich diff --git a/modules/Webmails/Webmails.php b/modules/Webmails/Webmails.php new file mode 100644 index 0000000..e2ba2c6 --- /dev/null +++ b/modules/Webmails/Webmails.php @@ -0,0 +1,1042 @@ +db = PearDatabase::getInstance(); + $this->db->println("Entering Webmail($mbox,$mailid)"); + $this->log = &LoggerManager::getLogger('WEBMAILS'); + $this->mbox=$mbox; + $this->mailid=$mailid; + + $this->headers = $this->load_headers(); + + $this->to = $this->headers["theader"]["to"]; + $this->to_name = $this->headers["theader"]["to_name"]; + $this->db->println("Webmail TO:"); + $this->db->println($this->to); + + $this->from = $this->headers["theader"]["from"]; + $this->fromname = $this->headers["theader"]["from_name"]; + $this->fromaddr = $this->headers["theader"]["fromaddr"]; + + $this->reply_to = $this->headers["theader"]["reply_to"]; + $this->reply_to_name = $this->headers["theader"]["reply_to_name"]; + + $this->cc_list = $this->headers["cc_list"]; + $this->cc_list_name = $this->headers["cc_list_name"]; + + $this->subject = $this->headers["theader"]["subject"]; + $this->date = $this->headers["theader"]["date"]; + + $this->has_attachments = $this->get_attachments(); + $this->db->println("Exiting Webmail($mbox,$mailid)"); + + $this->relationship = $this->find_relationships(); // Added by Puneeth for 5231 + $this->replyToInformation = null; + } + + public function getReplyToInformation() { + if(empty($this->replyToInformation)) { + $this->replyToInformation = $this->findRelationshipsForReplyToSender(); + } + return $this->replyToInformation; + } + + function delete() { + imap_delete($this->mbox, $this->mailid); + } + + function loadMail($attach_tab) { + + $this->email = $this->load_mail($attach_tab); + $this->body = $this->email["body"]; + $this->attachtab = $this->email["attachtab"]; + $this->att= $this->email["att"]; + } + + function replyBody() { + $tmpvar = "

          ".$mod_strings['IN_REPLY_TO_THE_MESSAGE'].$this->reply_name." on ".$this->date."

          "; + $tmpvar .= "
          ".$this->body."
          "; + return $tmpvar; + } + + function unDeleteMsg() { + imap_undelete($this->mbox, $this->mailid); + } + + function setFlag() { + $status=imap_setflag_full($this->mbox,$this->mailid,"\\Flagged"); + } + + function delFlag() { + $status=imap_clearflag_full($this->mbox,$this->mailid,"\\Flagged"); + } + + function getBodyType() { + return $this->body_type; + } + + function downloadInlineAttachments() { + return $this->dl_inline(); + } + + function downloadAttachments() { + return $this->dl_attachments(); + } + + function load_headers() { + // get the header info + $mailHeader=Array(); + $theader = @imap_headerinfo($this->mbox, $this->mailid); + $tmpvar = imap_mime_header_decode($theader->fromaddress); + + for($p=0;$pto);$p++) { + $mailHeader['to'][] = $theader->to[$p]->mailbox.'@'.$theader->to[$p]->host; + $mailHeader['to_name'][] = $theader->to[$p]->personal; + } + $mailHeader['from'] = $theader->from[0]->mailbox.'@'.$theader->from[0]->host; + $mailHeader['from_name'] = $theader->from[0]->personal; + $mailHeader['fromaddr'] = $theader->fromaddress; + + $mailHeader['subject'] = strip_tags($theader->subject); + $mailHeader['date'] = $theader->date; + + for($p=0;$preply_to);$p++) { + $mailHeader['reply_to'][] = $theader->reply_to[$p]->mailbox.'@'.$theader->reply_to[$p]->host; + $mailHeader['reply_to_name'][] = $theader->reply_to[$p]->personal; + } + for($p=0;$pcc);$p++) { + $mailHeader['cc_list'][] = $theader->cc[$p]->mailbox.'@'.$theader->cc[$p]->host; + $mailHeader['cc_list_name'][] = $theader->cc[$p]->personal; + } + return $ret = Array("theader"=>$mailHeader); + } + + function get_attachments() { + $struct = @imap_fetchstructure($this->mbox, $this->mailid); + $parts = $struct->parts; + + $done="false"; + $i = 0; + if (!$parts) + return false; // simple message + else { + $stack = array(); + $inline = array(); + + $endwhile = false; + + while (!$endwhile) { + if (!$parts[$i]) { + if (count($stack) > 0) { + $parts = $stack[count($stack)-1]["p"]; + $i = $stack[count($stack)-1]["i"] + 1; + array_pop($stack); + } else { + $endwhile = true; + } + } + if (!$endwhile) { + + $partstring = ""; + foreach ($stack as $s) { + $partstring .= ($s["i"]+1) . "."; + } + $partstring .= ($i+1); + + if (strtoupper($parts[$i]->disposition) == "INLINE" || strtoupper($parts[$i]->disposition) == "ATTACHMENT") + return true; + } + if ($parts[$i]->parts) { + $stack[] = array("p" => $parts, "i" => $i); + $parts = $parts[$i]->parts; + $i = 0; + } else { + $i++; + } + } + } + return false; + } + + function find_relationships() { + // leads search + $sql = "SELECT * from vtiger_leaddetails left join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_leaddetails.leadid where vtiger_leaddetails.email = ? AND vtiger_crmentity.deleted='0' and converted=0"; + $res = $this->db->pquery($sql,array(trim($this->from)),true,"Error: "."
          $query"); + $numRows = $this->db->num_rows($res); + if($numRows > 0) + return array('type'=>"Leads",'id'=>$this->db->query_result($res,0,"leadid"),'name'=>$this->db->query_result($res,0,"firstname")." ".$this->db->query_result($res,0,"lastname")); + + // contacts search + $sql = "SELECT * from vtiger_contactdetails left join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_contactdetails.contactid where vtiger_contactdetails.email = ? AND vtiger_crmentity.deleted='0'"; + $res = $this->db->pquery($sql,array(trim($this->from)),true,"Error: "."
          $query"); + $numRows = $this->db->num_rows($res); + if($numRows > 0) + return array('type'=>"Contacts",'id'=>$this->db->query_result($res,0,"contactid"),'name'=>$this->db->query_result($res,0,"firstname")." ".$this->db->query_result($res,0,"lastname")); + + // vtiger_accounts search + $sql = "SELECT * from vtiger_account left join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_account.accountid where vtiger_account.email1 = ? OR vtiger_account.email2=? AND vtiger_crmentity.deleted='0'"; + $res = $this->db->pquery($sql, array(trim($this->from), trim($this->from)), true,"Error: "."
          $query"); + $numRows = $this->db->num_rows($res); + if($numRows > 0) + return array('type'=>"Accounts",'id'=>$this->db->query_result($res,0,"accountid"),'name'=>$this->db->query_result($res,0,"accountname")); + + return array(); + } + + + public function searchModule($module) { + global $current_user; + $queryGenerator = new QueryGenerator($module, $current_user); + $queryGenerator->initForGlobalSearchByType('email', trim($this->reply_to[0]), 'e'); + $query = $queryGenerator->getQuery(); + $res = $this->db->pquery($query,array(),true,"Error: "."
          $query"); + $meta = $queryGenerator->getMeta($module); + $fieldList = $meta->getFieldListByType('email'); + $found = false; + $fieldId = null; + $numRows = $this->db->num_rows($res); + if($numRows > 0) { + foreach ($fieldList as $field) { + $value = from_html($this->db->query_result($res,0,$field->getColumnName())); + if($value == trim($this->reply_to[0])) { + $found = true; + $fieldId = $field->getFieldId(); + break; + } + } + $nameListFields = explode(',', $meta->getNameFields()); + $name = ''; + foreach ($nameListFields as $nameColumn) { + $name .= $this->db->query_result($res,0,$nameColumn); + } + if($found) { + return array('type'=>$module,'fieldId'=>$fieldId ,'id'=>$this->db->query_result($res,0, + $meta->getIdColumn()),'name'=>$name); + } + } + return null; + } + + function findRelationshipsForReplyToSender() { + $result = $this->searchModule('Contacts'); + if(empty($result)) { + $result = $this->searchModule('Leads'); + } + if(empty($result)) { + $result = $this->searchModule('Accounts'); + } + if(empty($result)) { + $result = array(); + } + return $result; + } + + function dl_inline() + { + $struct = @imap_fetchstructure($this->mbox, $this->mailid); + $parts = $struct->parts; + + $i = 0; + if (!$parts) + return; + else + { + $stack = array(); + $inline = array(); + + $endwhile = false; + + while (!$endwhile) + { + if (!$parts[$i]) + { + if (count($stack) > 0) + { + $parts = $stack[count($stack)-1]["p"]; + $i = $stack[count($stack)-1]["i"] + 1; + array_pop($stack); + } + else + { + $endwhile = true; + } + } + if (!$endwhile) + { + $partstring = ""; + foreach ($stack as $s) + { + $partstring .= ($s["i"]+1) . "."; + } + $partstring .= ($i+1); + + if (strtoupper($parts[$i]->disposition) == "INLINE") + { + //if the type is JPEG or GIF then call mail_fetchpart else fetchbody + if($parts[$i]->subtype == "JPEG" || $parts[$i]->subtype == "GIF") + $filedata = $this->mail_fetchpart($partstring); + else + $filedata = imap_fetchbody($this->mbox, $this->mailid, $partstring); + + //Added to get the UTF-8 string - 30-11-06 - Mickie + $parts[$i]->dparameters[0]->value = utf8_decode(imap_utf8($parts[$i]->dparameters[0]->value)); + + //Added to get the UTF-8 string - 02-02-06 - Mickie + $filedata = utf8_decode(imap_utf8($filedata)); + + $inline[] = array("filename" => $parts[$i]->dparameters[0]->value,"filedata"=>$filedata,"subtype"=>$parts[$i]->subtype,"filesize"=>$parts[$i]->bytes); + } + } + if ($parts[$i]->parts) + { + $stack[] = array("p" => $parts, "i" => $i); + $parts = $parts[$i]->parts; + $i = 0; + } + else + { + $i++; + } + } + } + return $inline; + } + + function dl_attachments() + { + + $struct = @imap_fetchstructure($this->mbox, $this->mailid); + $parts = $struct->parts; + + $i = 0; + if (!$parts) + return; + else + { + $stack = array(); + $attachment = array(); + + $endwhile = false; + + while (!$endwhile) + { + if (!$parts[$i]) + { + if (count($stack) > 0) + { + $parts = $stack[count($stack)-1]["p"]; + $i = $stack[count($stack)-1]["i"] + 1; + array_pop($stack); + } + else + { + $endwhile = true; + } + } + if (!$endwhile) + { + $partstring = ""; + foreach ($stack as $s) + { + $partstring .= ($s["i"]+1) . "."; + } + $partstring .= ($i+1); + + if (strtoupper($parts[$i]->disposition) == "ATTACHMENT") + { + $filedata = imap_fetchbody($this->mbox, $this->mailid, $partstring); + $attachment[] = array("filename" => $parts[$i]->dparameters[0]->value,"filedata"=>$filedata,"subtype"=>$parts[$i]->subtype,"filesize"=>$parts[$i]->bytes); + } + } + if ($parts[$i]->parts) + { + $stack[] = array("p" => $parts, "i" => $i); + $parts = $parts[$i]->parts; + $i = 0; + } + else + { + $i++; + } + } + } + return $attachment; + } + + + + + + function graphicalsmilies($body) { + $user_prefs = $_SESSION['nocc_user_prefs']; + if (isset($user_prefs->graphical_smilies) && $user_prefs->graphical_smilies) { + $body = preg_replace("/\;-?\)/","\"wink\"/", $body); + $body = preg_replace("/\;-?D/","\"grin\"/", $body); + $body = preg_replace("/:\'\(?/","\"cry\"/", $body); + $body = preg_replace("/:-?[xX]/","\"confused\"/", $body); + $body = preg_replace("/:-?\[\)/","\"embarassed\"/", $body); + $body = preg_replace("/:-?\*/","\"love\"/", $body); + $body = preg_replace("/:-?[pP]/","\"tongue\"/", $body); + $body = preg_replace("/:-?\)/","\"happy\"/", $body); + $body = preg_replace("/:-?\(/","\"unhappy\"/", $body); + $body = preg_replace("/:-[oO]/","\"surprised\"/", $body); + $body = preg_replace("/8-?\)/","\"cool\"/", $body); + } + return ($body); + } + +// based on a function from matt@bonneau.net +function GetPart(&$attach_tab, &$this_part, $part_no, &$display_rfc822) +{ + $att_name = '[unknown]'; + if ($this_part->ifdescription == true) + { + $att_name = $this_part->description; + } + for ($i = 0; $i < count($this_part->parameters); $i++) + { + // PHP 5.x doesn't allow to convert a stdClass object to an array + // We sometimes have this issue with Mailer daemon reports + if (!(get_class($this_part->parameters) == "stdClass") && + !(get_class($this_part->parameters) == "stdclass")) + { + $param = $this_part->parameters[$i]; + if ((($param->attribute == 'NAME') || ($param->attribute == 'name')) && ($param->value != '')) + { + $att_name = $param->value; + break; + } + } + } + if (isset($this_part->type)) + { + switch ($this_part->type) + { + case 0: + $mime_type = 'text'; + break; + case 1: + $mime_type = 'multipart'; + for ($i = 0; $i < count($this_part->parts); $i++) + { + if ($part_no != ''){ + $len = strlen($part_no); + if(!strpos($part_no,'.',($len-1))) + $part_no = $part_no . '.'; + } + // if it's an alternative, we skip the text part to only keep the HTML part + if ($this_part->subtype == 'ALTERNATIVE')// && $read == true) + $this->GetPart($attach_tab, $this_part->parts[++$i], $part_no . ($i + 1), $display_rfc822); + else + $this->GetPart($attach_tab, $this_part->parts[$i], $part_no . ($i + 1), $display_rfc822); + } + break; + case 2: + $mime_type = 'message'; + // well it's a message we have to parse it to find attachments or text message + if(isset($this_part->parts[0]->parts)) + { + $num_parts = count($this_part->parts[0]->parts); + for ($i = 0; $i < $num_parts; $i++) + { + $this->GetPart($attach_tab, $this_part->parts[0]->parts[$i], $part_no . '.' . ($i + 1), $display_rfc822); + } + } + break; + // Maybe we can do something with the mime types later ?? + case 3: + $mime_type = 'application'; + break; + case 4: + $mime_type = 'audio'; + break; + case 5: + $mime_type = 'image'; + break; + case 6: + $mime_type = 'video'; + break; + case 7: + $mime_type = 'other'; + break; + default: + $mime_type = 'unknown'; + } + } + else + { + $mime_type = 'text'; + } + $full_mime_type = $mime_type . '/' . $this_part->subtype; + if (isset($this_part->encoding)) + { + switch ($this_part->encoding) + { + case 0: + $encoding = '7BIT'; + break; + case 1: + $encoding = '8BIT'; + break; + case 2: + $encoding = 'BINARY'; + break; + case 3: + $encoding = 'BASE64'; + break; + case 4: + $encoding = 'QUOTED-PRINTABLE'; + break; + case 5: + $encoding = 'OTHER'; + break; + default: + $encoding = 'none'; + break; + } + } + else + { + $encoding = '7BIT'; + } + + if (($full_mime_type == 'message/RFC822' && $display_rfc822 == true) || ($mime_type != 'multipart' && $full_mime_type != 'message/RFC822')) + { + $charset = ''; + if ($this_part->ifparameters) + while ($obj = array_pop($this_part->parameters)) + if (strtolower($obj->attribute) == 'charset') + { + $charset = $obj->value; + break; + } + $tmp = Array( + 'number' => ($part_no != '' ? $part_no : 1), + 'id' => $this_part->ifid ? $this_part->id : 0, + 'name' => $att_name, + 'mime' => $full_mime_type, + 'transfer' => $encoding, + 'disposition' => $this_part->ifdisposition ? $this_part->disposition : '', + 'charset' => $charset, + 'size' => ($this_part->bytes > 1000) ? ceil($this_part->bytes / 1000) : 1 + ); + + array_unshift($attach_tab, $tmp); + } +} + +function GetCodeScoreAll($Data,$beg_charset) { + global $cad_StatsTableWin, $cad_StatsTableKoi; + $PairSize = 2; + + $Data=substr($Data,$beg_charset,100); + $Data=preg_replace('/[\n\r]/','',$Data); + setlocale(LC_CTYPE,'ru_RU.KOI8-R'); + + $Mark_koi=0; + $Mark_win=0; + $cnt=0; + $max_detect_limit=10; + + $sp=preg_split('/[\.\,\-\s\:\;\?\!\'\"\(\)\d<>]+/',$Data); + while ( list($key2,$val2) = each($sp) ) { + $rc=preg_match("/(.*)([\x7F-\xFF]+)/x",$val2); + if($rc == 0) { + continue; + } + + if($cnt > $max_detect_limit) { + break; + } else { + $cnt++; + } + $dlina=strlen($val2)-$PairSize; + if($dlina < 1) {$cnt--; continue;} + $val3=strtolower($val2); + if (ucfirst($val3) == $val2) { + $scaleK=2; + } else { + $scaleK=1; + } + if(substr($val3,0,1).strtoupper(substr($val2,1,strlen($val2))) == $val2) { + $scaleW=2; + } else { + $scaleW=1; + } + $Cur_mark_koi=0; + $Cur_mark_win=0; + for ($i=0; $i<$dlina; $i++ ) { + $pp=substr ($val3, $i, $PairSize); + if (isset($cad_StatsTableKoi[$pp])) { + $Cur_mark_koi += $cad_StatsTableKoi[$pp]; + } + if (isset($cad_StatsTableWin[$pp])) { + $Cur_mark_win += $cad_StatsTableWin[$pp]; + } + } + $Mark_koi+=$Cur_mark_koi*$scaleK; + $Mark_win+=$Cur_mark_win*$scaleW; + } + $Mark_list=array($Mark_koi,$Mark_win); + //setlocale(LC_CTYPE,$old_locale); + return $Mark_list; +} + +/* lxnt: patched to return charset names that iconv() understands*/ +function detect_charset($Data,$dbg_fl = 0) { + /* for many small pices of text - list of sender/subject*/ + $rc=preg_match("/(.*)([\x7F-\xFF]+)/xU",$Data,$tst_ar); + if($rc == 0) { + return 'US-ASCII'; + } else { + $beg_charset=strpos($Data,$tst_ar[2]); + } + list($KoiMark,$WinMark) = GetCodeScoreAll($Data,$beg_charset); + $Ratio['koi8-r'] = $KoiMark/($WinMark + 1); + $Ratio['windows-1251'] = $WinMark/($KoiMark + 1); + + list($MaxRation,$MaxRatioKey)=max_from_ratio($Ratio); + return $MaxRatioKey; +} + + + + + + + +function mime_header_decode(&$header) +{ + $output_charset = $GLOBALS['charset']; + $source = imap_mime_header_decode($header); + $result[] = new result; + $result[0]->text=''; + $result[0]->charset='UTF-8'; + for ($j = 0; $j < count($source); $j++ ) + { + $element_charset = ($source[$j]->charset == "default") ? $this->detect_charset($source[$j]->text) : $source[$j]->charset; + if ($element_charset == 'x-unknown') + $element_charset = 'UTF-8'; + + if(empty($output_charset)) $output_charset = $default_charset; + $element_converted = function_exists(iconv) ? @iconv( $element_charset, $output_charset, $source[$j]->text): $source[$j]->text ; + $result[$j]->text = $element_converted; + $result[$j]->charset = $output_charset; + } + return $result; +} + + + + +function link_att(&$mail, $attach_tab, &$display_part_no,$ev) +{ + sort($attach_tab); + $link = ''; + $ct = 0; + while ($tmp = array_shift($attach_tab)) + if (!empty($tmp['name'])) + { + $mime = str_replace('/', '-', $tmp['mime']); + if ($display_part_no == true) + //$link .= $tmp['number']-1 . '  '; + unset($att_name); + $att_name_array = imap_mime_header_decode($tmp['name']); + for ($i=0; $itext; + } + if(!preg_match("/unknown/",$att_name)) + $this->attname[$ct] = $att_name; + $att_name_dl = $att_name; + $att_name = $this->convertLang2Html($att_name); + if(!preg_match("/unknown/",$att_name)){ + $link .= ($ct+1).'. ' . $att_name . '  ' . $tmp['mime'] . '  ' . $tmp['size'] . '
          '; + $this->anchor_arr[$ct] = ''; + $this->att_details[$ct]['name'] = $att_name; + $this->att_details[$ct]['size'] = $tmp['size']; + $this->att_details[$ct]['type'] = $tmp['mime']; + $this->att_details[$ct]['part'] = $tmp['number']; + $this->att_details[$ct]['transfer'] = $tmp['transfer']; + $ct++; + } + } + return ($link); +} + +// Convert mail data (from, to, ...) to HTML +function convertMailData2Html($maildata, $cutafter = 0) + { + if (($cutafter > 0) && (strlen($maildata) > $cutafter)) + { + return htmlspecialchars(substr($maildata, 0, $cutafter)) . '…'; + } + else + { + return htmlspecialchars($maildata); + } + } + + // Convert a language string to HTML + function convertLang2Html($langstring) { + global $charset; + return htmlentities($langstring, 2, $charset); + } + + function load_mail($attach_tab) + { + // parse the message + global $default_charset; + $ref_contenu_message = @imap_headerinfo($this->mbox, $this->mailid); + $struct_msg = @imap_fetchstructure($this->mbox, $this->mailid); + $mail = $this->mbox; + $ev = $this->mailid; + $conf->display_rfc822 = true; + if ($struct_msg->type == 3 || (isset($struct_msg->parts) && (sizeof($struct_msg->parts) > 0))) + { + $this->GetPart($attach_tab, $struct_msg, NULL, $conf->display_rfc822); + } + else + { + $pop_fetchheader_mail_ev = @imap_fetchheader($mail, $ev); + $pop_body_mail_ev = @imap_body($mail, $ev); + GetSinglePart($attach_tab, $struct_msg, $pop_fetchheader_mail_ev, $pop_body_mail_ev); + } + $conf->use_verbose = true; + $header = ""; + if (($verbose == 1) && ($conf->use_verbose == true)) { + $header = imap_fetchheader($mail, $ev); + } + + $tmpvar = array_pop($attach_tab); + if ($struct_msg->type == 3) + { + $body = ''; + } + else + { + $body = @imap_fetchbody($mail,$ev,$tmpvar['number']); + + } + + + + if (preg_match("/text\/html/i", $tmpvar['mime']) || preg_match("/text\/plain/i", $tmpvar['mime'])) + { + if ($tmpvar['transfer'] == 'QUOTED-PRINTABLE') + $body = imap_qprint($body); + if ($tmpvar['transfer'] == 'BASE64') + $body = base64_decode($body); + $body = remove_stuff($body, $tmpvar['mime']); + $body_charset = ($tmpvar['charset'] == "default") ? $this->detect_charset($body) : $tmpvar['charset']; + + + if (strtolower($body_charset) == "us-ascii") { + $body_charset = "UTF-8"; + } + + if ($body_charset == "" || $body_charset == null) { + if (isset($conf->default_charset) && $conf->default_charset != "") { + $body_charset = $conf->default_charset; + } else { + $body_charset = "UTF-8"; + } + } + + if (isset($_REQUEST['user_charset']) && $_REQUEST['user_charset'] != '') { + $body_charset = $_REQUEST['user_charset']; + } + $this->charsets = $body_charset; + if(empty($GLOBALS['charset'])) $GLOBALS['charset'] = $default_charset; + $body_converted = function_exists(iconv) ? @iconv( $body_charset, $GLOBALS['charset'], $body) : $body; + $body = ($body_converted===FALSE) ? $body : $body_converted; + $tmpvar['charset'] = ($body_converted===FALSE) ? $body_charset : $GLOBALS['charset']; + } + else + { + array_push($attach_tab, $tmpvar); + } + $link_att = ''; + $att_links = '';//variable added to display the attachments in full email view + $conf->display_part_no = true; + if ($struct_msg->subtype != 'ALTERNATIVE' || $struct_msg->subtype != 'RELATED') + { + switch (sizeof($attach_tab)) + { + case 0: + $link_att = '
          '; + break; + case 1: + $link_att = ''; + $this->att_links .= $this->link_att($mail, $attach_tab, $conf->display_part_no,$ev)."
          "; + break; + default: + $link_att = '
          '; + $this->att_links .= $this->link_att($mail, $attach_tab, $conf->display_part_no,$ev)."
          "; + break; + } + }else + { + $link_att = '
          '; + } + + $struct_msg = @imap_fetchstructure($mail, $ev); + $msg_charset = ''; + if ($struct_msg->ifparameters) { + while ($obj = array_pop($struct_msg->parameters)) { + if (strtolower($obj->attribute) == 'charset') { + $msg_charset = $obj->value; + break; + } + } + } + if ($msg_charset == '') { + $msg_charset = 'UTF-8'; + } + + + $subject_header = str_replace('x-unknown', $msg_charset, $ref_contenu_message->subject); + $subject_array = $this->mime_header_decode($subject_header); + for ($j = 0; $j < count($subject_array); $j++) + $subject .= $subject_array[$j]->text; + + $from_header = str_replace('x-unknown', $msg_charset, $ref_contenu_message->fromaddress); + $from_array = $this->mime_header_decode($from_header); + for ($j = 0; $j < count($from_array); $j++) + $from .= $from_array[$j]->text; + //fixed the issue #3235 + $toheader = @imap_fetchheader($this->mbox, $this->mailid); + $to_arr = explode("To:",$toheader); + if(!stripos($to_arr[1],'mime')){ + $to_add = stripos($to_arr[1],"CC:")?explode("CC:",$to_arr[1]):explode("Subject:",$to_arr[1]); + $to_header = trim($to_add[0]); + } + else + $to_header = str_replace('x-unknown', $msg_charset, $ref_contenu_message->toaddress); + $to_array = $this->mime_header_decode($to_header); + for ($j = 0; $j < count($to_array); $j++) + $to .= $to_array[$j]->text; + $to = str_replace(',', ', ', $to); + $this->to_header = $to_header; + $cc_header = isset($ref_contenu_message->ccaddress) ? $ref_contenu_message->ccaddress : ''; + $cc_header = str_replace('x-unknown', $msg_charset, $cc_header); + $cc_array = isset($ref_contenu_message->ccaddress) ? imap_mime_header_decode($cc_header) :0; + if ($cc_array != 0) { + for ($j = 0; $j < count($cc_array); $j++) + $cc .= $cc_array[$j]->text; + } + $cc = str_replace(',', ', ', $cc); + $this->cc_header = $cc_header; + $reply_to_header = isset($ref_contenu_message->reply_toaddress) ? $ref_contenu_message->reply_toaddress : ''; + $reply_to_header = str_replace('x-unknown', $msg_charset, $reply_to_header); + $reply_to_array = isset($ref_contenu_message->reply_toaddress) ? imap_mime_header_decode($reply_to_header) : 0; + if ($reply_to_array != 0) { + for ($j = 0; $j < count($reply_to_array); $j++) + $reply_to .= $reply_to_array[$j]->text; + } + + $timestamp = chop($ref_contenu_message->udate); + $date = format_date($timestamp, $lang); + $time = format_time($timestamp, $lang); + $content = Array( + 'from' => $from, + 'to' => $to, + 'cc' => $cc, + 'reply_to' => $reply_to, + 'subject' => $subject, + 'date' => $date, + 'time' => $time, + 'complete_date' => $date, + 'att' => $link_att, + 'body' => $this->graphicalsmilies($body), + 'body_mime' => $this->convertLang2Html($tmpvar['mime']), + 'body_transfer' => $this->convertLang2Html($tmpvar['transfer']), + 'header' => $header, + 'verbose' => $verbose, + 'prev' => $prev_msg, + 'next' => $next_msg, + 'msgnum' => $mail, + 'attachtab' => $attach_tab, + 'charset' => $body_charset + ); + return ($content); + } + + // get the body of a part of a message according to the + // string in $part + function mail_fetchpart($part) + { + $parts = $this->mail_fetchparts(); + + $partNos = explode(".", $part); + + $currentPart = $parts; + while(list ($key, $val) = each($partNos)) + { + $currentPart = $currentPart[$val]; + } + + if ($currentPart != "") return $currentPart; + else return false; + } + + // splits a message given in the body if it is + // a mulitpart mime message and returns the parts, + // if no parts are found, returns false + function mail_mimesplit($header, $body) + { + $parts = array(); + + $PN_EREG_BOUNDARY = "/Content-Type:(.*)boundary=\"([^\"]+)\"/i"; + + if (preg_match ($PN_EREG_BOUNDARY, $header, $regs)) + { + $boundary = $regs[2]; + + $delimiterReg = "/([^\r\n]*)$boundary([^\r\n]*)/i"; + if (preg_match ($delimiterReg, $body, $results)) + { + $delimiter = $results[0]; + $parts = explode($delimiter, $body); + $parts = array_slice ($parts, 1, -1); + } + + return $parts; + } + else + { + return false; + } + } + + // returns an array with all parts that are + // subparts of the given part + // if no subparts are found, return the body of + // the current part + function mail_mimesub($part) + { + $i = 1; + $headDelimiter = "\r\n\r\n"; + $delLength = strlen($headDelimiter); + + // get head & body of the current part + $endOfHead = strpos( $part, $headDelimiter); + $head = substr($part, 0, $endOfHead); + $body = substr($part, $endOfHead + $delLength, strlen($part)); + + // check whether it is a message according to rfc822 + if (stristr($head, "Content-Type: message/rfc822")) + { + $part = substr($part, $endOfHead + $delLength, strlen($part)); + $returnParts[1] = $this->mail_mimesub($part); + return $returnParts; + // if no message, get subparts and call function recursively + } + elseif ($subParts = $this->mail_mimesplit($head, $body)) + { + // got more subparts + while (list ($key, $val) = each($subParts)) + { + $returnParts[$i] = $this->mail_mimesub($val); + $i++; + } + return $returnParts; + } + else + { + return $body; + } + } + + // get an array with the bodies all parts of an email + // the structure of the array corresponds to the + // structure that is available with imap_fetchstructure + function mail_fetchparts() + { + $parts = array(); + $header = imap_fetchheader($this->mbox, $this->mailid); + $body = imap_body($this->mbox, $this->mailid, FT_INTERNAL); + + $i = 1; + + if ($newParts = $this->mail_mimesplit($header, $body)) + { + while (list ($key, $val) = each($newParts)) + { + $parts[$i] = $this->mail_mimesub($val); + $i++; + } + } + else + { + $parts[$i] = $body; + } + return $parts; + } + + + + + + +} +function decode_header($string) +{ + $elements = imap_mime_header_decode($string); + for ($i=0; $itext; + } + return $result; +} +?> diff --git a/modules/Webmails/WebmailsAjax.php b/modules/Webmails/WebmailsAjax.php new file mode 100644 index 0000000..fce7c8e --- /dev/null +++ b/modules/Webmails/WebmailsAjax.php @@ -0,0 +1,158 @@ +enabled == 'false') { + echo 'FAILED'; + exit(); + } else { + echo 'SUCCESS'; + exit(); + } + exit(); +} +if(isset($_REQUEST['file']) && $_REQUEST['file']!='' && !isset($_REQUEST['ajax'])){ + checkFileAccessForInclusion("modules/".$_REQUEST['module']."/".$_REQUEST['file'].".php"); + require_once("modules/".$_REQUEST['module']."/".$_REQUEST['file'].".php"); + exit(); +} +$mailid = vtlib_purify($_REQUEST["mailid"]); +if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "") {$mailbox=vtlib_purify($_REQUEST["mailbox"]);} else {$mailbox="INBOX";} + +$adb->println("Inside WebmailsAjax.php"); + +if(isset($_POST["file"]) && $_POST["ajax"] == "true") { + checkFileAccessForInclusion("modules/".$_REQUEST["module"]."/".$_POST["file"].".php"); + require_once("modules/".$_REQUEST["module"]."/".$_POST["file"].".php"); +} + +if(isset($_REQUEST["command"]) && $_REQUEST["command"] != "") { + $command = $_REQUEST["command"]; + if($command == "expunge") { + $MailBox = new MailBox($mailbox); + imap_expunge($MailBox->mbox); + $MailBox = new MailBox($mailbox); + $elist = $MailBox->mailList; + $num_mails = $elist['count']; + $start_page = cal_start($num_mails,$MailBox->mails_per_page); + imap_close($MailBox->mbox); + echo $start_page; + flush(); + exit(); + } + if($command == "delete_msg") { + $adb->println("DELETE SINGLE WEBMAIL MESSAGE $mailid"); + $MailBox = new MailBox($mailbox); + imap_delete($MailBox->mbox,$mailid); + imap_expunge($MailBox->mbox); + $email = new Webmails($MailBox->mbox,$mailid); + $MailBox = new MailBox($mailbox); + $elist = $MailBox->mailList; + $num_mails = $elist['count']; + $start_page = cal_start($num_mails,$MailBox->mails_per_page); + imap_close($MailBox->mbox); + echo "start=".$start_page.";"; + echo "id=".$mailid.";"; + flush(); + exit(); + } + if($command == "delete_multi_msg") { + $MailBox = new MailBox($mailbox); + $tlist = explode(":",$mailid); + foreach($tlist as $id) { + imap_delete($MailBox->mbox,$id); + $adb->println("DELETE MULTI MESSAGE $id"); + $email = new Webmails($MailBox->mbox,$id); + $email->delete(); + } + imap_expunge($MailBox->mbox); + $MailBox = new MailBox($mailbox); + $elist = $MailBox->mailList; + $num_mails = $elist['count']; + $start_page = cal_start($num_mails,$MailBox->mails_per_page); + imap_close($MailBox->mbox); + echo "start=".$start_page.";"; + echo "ids='".$mailid."';"; + flush(); + exit(); + } + if($_POST["command"] == "move_msg" && $_POST["ajax"] == "true") { + $MailBox = new MailBox($mailbox); + if(isset($_REQUEST["mailid"]) && $_REQUEST["mailid"] != '') { + $mailids = explode(':',$_REQUEST["mailid"]); + } + foreach($mailids as $mailid) { + imap_mail_move($MailBox->mbox,$mailid,$_REQUEST["mvbox"]); + } + imap_expunge($MailBox->mbox); + imap_close($MailBox->mbox); + $MailBox = new MailBox($mailbox); + $elist = $MailBox->mailList; + $num_mails = $elist['count']; + $start_page = cal_start($num_mails,$MailBox->mails_per_page); + imap_close($MailBox->mbox); + echo $start_page; + flush(); + exit(); + } + + if($command == "undelete_msg") { + $MailBox = new MailBox($mailbox); + $email = new Webmails($MailBox->mbox,$mailid); + $email->unDeleteMsg(); + imap_close($MailBox->mbox); + echo $mailid; + flush(); + exit(); + } + if($command == "set_flag") { + $MailBox = new MailBox($mailbox); + $email = new Webmails($MailBox->mbox,$mailid); + $email->setFlag(); + imap_close($MailBox->mbox); + echo $mailid; + flush(); + exit(); + } + if($command == "clear_flag") { + $MailBox = new MailBox($mailbox); + $email = new Webmails($MailBox->mbox,$mailid); + $email->delFlag(); + imap_close($MailBox->mbox); + echo $mailid; + flush(); + exit(); + } + imap_close($MailBox->mbox); + flush(); + exit(); +} +function cal_start($num_mails,$mail_per_page) { + if(isset($_REQUEST['start']) && $_REQUEST['start']!=0) { + $pre_start = $_REQUEST['start']; + $cal = (($pre_start-1) * $mail_per_page); + if($num_mails > $cal) + $res = $pre_start; + else + $res = $pre_start - 1; + } else + $res = 0; + return $res; +} +?> \ No newline at end of file diff --git a/modules/Webmails/body.php b/modules/Webmails/body.php new file mode 100644 index 0000000..6fd1cb6 --- /dev/null +++ b/modules/Webmails/body.php @@ -0,0 +1,161 @@ +id) {echo "ajax failed";flush();exit();} +$mailid=vtlib_purify($_REQUEST["mailid"]); +if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "") +{ + $mailbox=vtlib_purify($_REQUEST["mailbox"]); +} +else +{ + $mailbox="INBOX"; +} +$MailBox = new MailBox($mailbox); +$mail = $MailBox->mbox; +$email = new Webmails($MailBox->mbox,$mailid); +$status=imap_setflag_full($MailBox->mbox,$mailid,"\\Seen"); +$attach_tab=array(); +$email->loadMail($attach_tab); +echo "\n"; +$subject = utf8_decode(utf8_encode(imap_utf8($email->subject))); +$from = decode_header($email->from); +$to = decode_header($email->to_header); +$cc = decode_header($email->cc_header); +$date = decode_header($email->date); +for($i=0;$iattname);$i++){ + $attachment_links .= $email->anchor_arr[$i].decode_header($email->attname[$i])."
                               "; +} +$content['body'] = $email->body; +$content['attachtab'] = $email->attachtab; +if(!$_REQUEST['fullview']) + $class_str = 'class="tableHeadBg"'; +else + $class_str = 'style="font-size:15px"'; + +?> + + + + + +
          '; + $the_boxes=array(); + if (is_array($list)) { + foreach ($list as $key => $val) { + $the_boxes[] = $val->name; + } + } + sort($the_boxes); + for($i=0;$i".preg_replace(array("/\{.*?\}/i"),array(""),$the_boxes[$i])."
          "; + } + + $the_form .= get_left_form_footer(); + $the_form .= get_validate_record_js(); + +return $the_form; +} +?> diff --git a/modules/Webmails/ListView.php b/modules/Webmails/ListView.php new file mode 100644 index 0000000..c7a19ac --- /dev/null +++ b/modules/Webmails/ListView.php @@ -0,0 +1,427 @@ +".$mod_strings['LBL_ENABLE_IMAP_SUPPORT'].""; + exit(); +} +require_once('Smarty_setup.php'); +require_once("data/Tracker.php"); +require_once('include/logging.php'); +require_once('include/utils/utils.php'); +require_once('include/utils/UserInfoUtil.php'); +require_once("modules/Webmails/MailBox.php"); +require_once("modules/Webmails/Webmails.php"); +require_once("modules/Webmails/MailParse.php"); + +if(trim($_REQUEST["search_input"]) != ''){ + $searchstring = vtlib_purify($_REQUEST["search_type"]).' "'.vtlib_purify($_REQUEST["search_input"]).'"'; + $MailBox = new MailBox($mailbox,$start-1,$searchstring); + } +else $MailBox = new MailBox($mailbox,$start-1); + +// Check for a valid mailbox and also make sure the needed php_imap module is installed +$mods = parsePHPModules(); + +if(!$MailBox->mbox || !isset($mods["imap"]) || $mods["imap"] == "") { + echo "

          ".$mod_strings['LBL_CONFIGURE_MAIL_SETTINGS']."

          "; + exit(); +} + +// Set the system into degraded service mode where needed +$degraded_service='false'; +if($MailBox->mail_protocol == "imap" || $MailBox->mail_protocol == "pop3") + $degraded_service='true'; + +if($_POST["command"] == "check_mbox_all") { + exit(); + $boxes = array(); + $i=0; + foreach ($_SESSION["mailboxes"] as $key => $val) { + $MailBox = new MailBox($key); + $box = imap_status($MailBox->mbox, "{".$MailBox->imapServerAddress."}".$key, SA_ALL); + + $boxes[$i]["name"] = $key; + if($val == $box->unseen) + $boxes[$i]["newmsgs"] = 0; + elseif($val < $box->unseen) { + $boxes[$i]["newmsgs"] = ($box->unseen-$val); + $_SESSION["mailboxes"][$key] = $box->unseen; + } else { + $boxes[$i]["newmsgs"] = 0; + $_SESSION["mailboxes"][$key] = $box->unseen; + } + $i++; + imap_close($MailBox->mbox); + } + + $ret = ''; + if(count($boxes) > 0) { + $ret = '{"msgs":['; + for($i=0,$num=count($boxes);$i<$num;$i++) { + $ret .= '{"msg":'; + $ret .= '{'; + $ret .= '"box":"'.$boxes[$i]["name"].'",'; + $ret .= '"newmsgs":"'.$boxes[$i]["newmsgs"].'"}'; + + if(($i+1) == $num) + $ret .= '}'; + else + $ret .= '},'; + } + $ret .= ']}'; + } + echo $ret; + flush(); + exit(); +} +//This is invoked from Webmails.js as a result of the periodic event function call, checks only for NEW mails; this in turn checks for new mails in all the mailboxes +if($_POST["command"] == "check_mbox") { + $adb->println("Inside check_mbox AJAX command"); + + $search = imap_search($MailBox->mbox, 'NEW'); + + //if($search === false) {echo "failed";flush();exit();} + + $adb->println("imap_search($MailBox->mbox, $criteria) ===> "); + $adb->println($search); + + $data = imap_fetch_overview($MailBox->mbox,implode(',',$search)); + $num=sizeof($data); + + $adb->println("fetched data using imap_fetch_overview ==>"); + $adb->println($data); + + $ret = ''; + if($num > 0) { + $ret = '{"mails":['; + for($i=0;$i<$num;$i++) + { + //Added condition to avoid show the deleted mails and readed mails + if($data[$i]->deleted == 0)// && $data[$i]->seen == 0) + { + $ret .= '{"mail":'; + $ret .= '{'; + $ret .= '"mailid":"'.$data[$i]->msgno.'",'; + $ret .= '"subject":"'.substr($data[$i]->subject,0,40).'",'; + $ret .= '"date":"'.substr($data[$i]->date,0,30).'",'; + $ret .= '"from":"'.substr($data[$i]->from,0,20).'",'; + $ret .= '"to":"'.$data[$i]->to.'",'; + echo ' to field is ' .$data[$i]->to; + $email = new Webmails($MailBox->mbox,$data[$i]->msgno); + if($email->has_attachments) + $ret .= '"attachments":"1"}'; + else + $ret .= '"attachments":"0"}'; + if(($i+1) == $num) + $ret .= '}'; + else + $ret .= '},'; + } + } + $ret .= ']}'; + $adb->println("Ret Value ==> $ret"); + } + + echo $ret; + flush(); + imap_close($MailBox->mbox); + exit(); +} + +?> + + + + +mbox,$mailid,$_REQUEST["mvbox"]); + } + imap_expunge($MailBox->mbox); + imap_close($MailBox->mbox); + $MailBox = new MailBox($mailbox); + $elist = $MailBox->mailList; + $num_mails = $elist['count']; + $start_page = ceil($num_mails/$MailBox->mails_per_page); + imap_close($MailBox->mbox); + echo "start=".$start_page.";"; + echo "id=".$mailid.";"; + flush(); + exit(); +} + +// Function to remove directories used for tmp attachment storage +function SureRemoveDir($dir) { + if(!$dh = @opendir($dir)) return; + while (($obj = readdir($dh))) { + if($obj=='.' || $obj=='..') continue; + if (!@unlink($dir.'/'.$obj)) { + SureRemoveDir($dir.'/'.$obj); + } else { + $file_deleted++; + } + } + if (@rmdir($dir)) $dir_deleted++; +} +$save_path=$root_directory.'modules/Webmails/tmp'; +$user_dir=$save_path."/".$_SESSION["authenticated_user_id"]; + +// Get the list of mails for this mailbox +$elist = $MailBox->mailList; +$numEmails = $elist["count"]; +$mails_per_page = $MailBox->mails_per_page; + +// Calculate paging information ahead before retrieving overviews +if($start == 1 || $start == "") { + $start_message=$numEmails; +} else { + $start_message=($numEmails-(($start-1)*$mails_per_page)); +} + +$numPages = ceil($numEmails/$MailBox->mails_per_page); +if($numPages > 1) { + if($start != 1){ + $navigationOutput = "  "; + $navigationOutput .= "  "; + } + if($start <= ($numPages-1)){ + $navigationOutput .= "  "; + $navigationOutput .= "  "; + } +} + +if(isPermitted('Contacts','EditView','') == 'yes') + $show_qualify = "yes"; +else + $show_qualify = "no"; +$overview=$elist["overview"]; +?> + +"; + +$search_fields = Array("SUBJECT","BODY","TO","CC","BCC","FROM"); +$listview_header = array("
          ".$mod_strings['LBL_INFO']."".$mod_strings['LBL_LIST_SUBJECT']."".$mod_strings['LABEL_DATE']."".$mod_strings['LABEL_FROM']."".$mod_strings['LBL_DEL']."'.$mod_strings['LBL_NO_EMAILS'].'".$mod_strings['LBL_INFO']."".$mod_strings['LBL_LIST_SUBJECT']."".$mod_strings['LABEL_DATE']."".$mod_strings['LABEL_FROM']."".$mod_strings['LBL_DEL']."'.$mod_strings['LBL_NO_EMAILS'].''); + $s = preg_replace('/]*>([^<]+)<\/th>/',"\\1",$s); + $s = preg_replace('/]*>([^<]+)<\/td>/',"\\1",$s); + $vTmp = preg_split('/(

          [^<]+<\/h2>)/',$s,-1,PREG_SPLIT_DELIM_CAPTURE); + $vModules = array(); + for ($i=1;$i([^<]+)<\/h2>/',$vTmp[$i],$vMat)) { + $vName = trim($vMat[1]); + $vTmp2 = explode("\n",$vTmp[$i+1]); + foreach ($vTmp2 AS $vOne) { + $vPat = '([^<]+)<\/info>'; + $vPat3 = "/$vPat\s*$vPat\s*$vPat/"; + $vPat2 = "/$vPat\s*$vPat/"; + if (preg_match($vPat3,$vOne,$vMat)) { // 3cols + $vModules[$vName][trim($vMat[1])] = array(trim($vMat[2]),trim($vMat[3])); + } elseif (preg_match($vPat2,$vOne,$vMat)) { // 2cols + $vModules[$vName][trim($vMat[1])] = trim($vMat[2]); + } + } + } + } + return $vModules; +} +?> diff --git a/modules/Webmails/MailParse.php b/modules/Webmails/MailParse.php new file mode 100644 index 0000000..96c3c72 --- /dev/null +++ b/modules/Webmails/MailParse.php @@ -0,0 +1,153 @@ +msgno; + $msg_ob = new Webmails($MailBox->mbox,$mails[$start_message]->msgno); + // TODO: scan the current db vtiger_tables to find a + // matching email address that will make a good + // candidate for record_id + // this module will also need to be able to associate to any entity type + $record_id=''; + + if($mails[$start_message]->subject=="") + $mails[$start_message]->subject="(No Subject)"; + + // Let's pre-build our URL parameters since it's too much of a pain not to + $detailParams = 'record='.$num.'&mailbox='.$mailbox.'&mailid='.$num.'&parenttab=My Home Page'; + + $displayed_msgs++; + if ($mails[$start_message]->deleted && !$show_hidden) + { + $flags = "

          "; + } + elseif (!$mails[$start_message]->seen || $mails[$start_message]->recent) + { + $flags = "
          "; + $new_msgs++; + } + else + { + $flags = "
          "; + + } + + //enable-diable download attachment button + if($msg_ob->has_attachments){ + $enableDownlaodAttachment = 'yes'; + }else + $enableDownlaodAttachment = 'no'; + + // Attachment Icons + if($msg_ob->has_attachments) + $flags.=' '; + else + $flags.=' '; + + + + // read/unread/forwarded/replied + if(!$mails[$start_message]->seen || $mails[$start_message]->recent) + { + $flags.=' '; + } + elseif ($mails[$start_message]->in_reply_to || $mails[$start_message]->references || preg_match("/^re:/i",$mails[$start_message]->subject)) + { + $flags.=' '; + } + elseif (preg_match("/^fw:/i",$mails[$start_message]->subject)) + { + $flags.=' '; + } + else + { + $flags.=' '; + } + + // Set IMAP flag + if($mails[$start_message]->flagged) + { + $flags.=''; + } + else + { + $flags.=''; + + } + + $tmp=imap_mime_header_decode($mails[$start_message]->from); + $from = $tmp[0]->text; + $listview_entries[$num] = array(); + + $listview_entries[$num][] = $flags."'.substr($mails[$start_message]->subject,0,40).''.substr($mails[$start_message]->date,0,25).''.substr($from,0,20).''.substr($mails[$start_message]->subject,0,40).''.substr($mails[$start_message]->date,0,25).'            '.substr($from,0,20).''.substr($mails[$start_message]->subject,0,40).''.substr($mails[$start_message]->date,0,25).''.substr($from,0,20).'del
          del
          ' . $html_att . ':' . $this->link_att($mail, $attach_tab, $conf->display_part_no,$ev) . '
          ' . $html_atts . ':' . $this->link_att($mail, $attach_tab, $conf->display_part_no,$ev) . '
          width="100%" border="0" cellpadding="0" cellspacing="0"> + + + + + + + + + + + + + + +
           
           
           
           
            + + + +
           :
           
          + + + +att; +if(!$_REQUEST['fullview']) + echo '
          '; +else + echo '
          '; +echo $content['body']; + +//test added by Richie +if (!isset($_REQUEST['display_images']) || $_REQUEST['display_images'] != 1) +{ + $content['body'] = preg_replace('/src="[[:alpha:]]+:\/\/[^<>[:space:]]+[[:alnum:]\/]"/i', 'src="none"', $content['body']); + $content['body'] = preg_replace('/src=[[:alpha:]]+:\/\/[^<>[:space:]]+[[:alnum:]\/]/i', 'src="none"', $content['body']); +} + +//Display embedded HTML images +$tmp_attach_tab=$content['attachtab']; +$i = 0; +$conf->display_img_attach = true; +$conf->display_text_attach = true; + +while ($tmp = array_pop($tmp_attach_tab)) +{ + if ($conf->display_img_attach && (preg_match("/image/i", $tmp['mime']) && ($tmp['number'] != ''))) + { + $exploded = explode('/', $tmp['mime']); + $img_type = array_pop($exploded); + if (preg_match("/JPEG/i", $img_type) || preg_match("/JPG/i", $img_type) || preg_match("/GIF/i", $img_type) || preg_match ('/PNG/i', $img_type)) + { + $new_img_src = 'src="get_img.php?mail=' . $mailid.'&num=' . $tmp['number'] . '&mime=' . $img_type . '&transfer=' . $tmp['transfer'] . '"'; + $img_id = str_replace('<', '', $tmp['id']); + $img_id = str_replace('>', '', $img_id); + $content['body'] = str_replace('src="cid:'.$img_id.'"', $new_img_src, $content['body']); + $content['body'] = str_replace('src=cid:'.$img_id, $new_img_src, $content['body']); + } + } +} +while ($tmp = array_pop($content['attachtab'])) +{ + if ((!preg_match("/ATTACHMENT/i", $tmp['disposition'])) && $conf->display_text_attach && (preg_match("/text\/plain/i", $tmp['mime']))) + echo '
          '.view_part_detail($mail, $mailid, $tmp['number'], $tmp['transfer'], $tmp['charset'], $charset); + if ($conf->display_img_attach && (preg_match("/image/i", $tmp['mime']) && ($tmp['number'] != ''))) + { + $exploded = explode('/', $tmp['mime']); + $img_type = array_pop($exploded); + if (preg_match("/JPEG/i", $img_type) || preg_match("/JPG/i", $img_type) || preg_match("/GIF/i", $img_type) || preg_match ('/PNG/g', $img_type)) + { + echo '
          '; + echo '
          '; + echo ''; + echo '
          '; + } +} +} + + +echo '
          '; +//test ended by Richie + +imap_close($MailBox->mbox); + +?> \ No newline at end of file diff --git a/modules/Webmails/conf.php b/modules/Webmails/conf.php new file mode 100644 index 0000000..53c5741 --- /dev/null +++ b/modules/Webmails/conf.php @@ -0,0 +1,290 @@ + + * Copyright 2001 Olivier Cahagne + * Copyright 2002 Mike Rylander + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + */ + +// ################### This is the main configuration for NOCC ########## // + +// ==> Required parameters + +// Will be checked by html/*.php file. If it's not available, these files won't +// be loaded. +$conf->loaded = true; + +// Default smtp server and smtp_port (default is 25) +// If a domain has no smtp server, this one will be used +// If no smtp server is provided, Nocc will default to the mail() function, +// and try to use Sendmail or any other MTA (Postfix) +$conf->default_smtp_server = 'smtp'; +$conf->default_smtp_port = 25; + +// List of domains people can log in +// You can have as many domains as you need + +// $conf->domains[$i]->domain = 'sourceforge.net'; +// domain name e.g 'sourceforge.net'. This field is used when sending message +// +// $conf->domains[$i]->in = 'mail.sourceforge.net:110/pop3'; +// imap or pop3 server name + port + protocol (only if not imap) +// [server_name]:[port number]/[protocol]/[options] +// ex for an imap server : mail.sourceforge.net:143 +// ex for an imap server with explicit TLS/SSL negociation desactivated : mail.sourceforge.net:143/notls (may be useful for some courier-imap installation). + //(may be useful for some courier-imap installation). +// ex for an ssl imap server : mail.sourceforge.net:993/ssl +// ex for an ssl imap server with a self-signed certificate : mail.sourceforge.net:993/ssl/novalidate-cert +// ex for a pop3 server : mail.sourceforge.net:110/pop3 +// ex for a pop3 server with explicit TLS/SSL negociation desactivated : mail.sourceforge.net:110/pop3/notls (may be useful for some courier-imap installation). +// ex for an ssl pop3 server : mail.sourceforge.net:995/pop3/ssl +// ex for an ssl pop3 server with a self-signed certificate : mail.sourceforge.net:995/pop3/ssl/novalidate-cert +// protocol can only be pop3 +// +// $conf->domains[$i]->smtp = 'smtp.isp.com'; +// Optional: smtp server name or IP address +// Leave empty to send mail via sendmail +// +// $conf->domains[$i]->smtp_port = 25; +// Port number to connect to smtp server (usually 25) + +$i = 0; + +$conf->domains[$i]->domain = ''; +$conf->domains[$i]->in ='' ; +//$conf->domains[$i]->in = ''; +$conf->domains[$i]->smtp = 'smtp'; +$conf->domains[$i]->smtp_port = 25; +// Uncomment for 'userdomain.com' style logins +//$conf->domains[$i]->login_with_domain = 1; +// Uncomment and select character to use for login_with_domain option +//$conf->domains[$i]->login_with_domain_character = '@'; +// Fill in if you require login suffixes for your mail server +$conf->domains[$i]->login_suffix = ''; +// Uncomment for login aliases and use the following syntax: +// login_aliases = array('alias1' => 'real_login_1','alias2' => 'real_login_2'); +// If you want to use an external file, use the following syntax: +// login_aliases = '@/path/to/file/'; +// See login_alias.sample file for example. +//$conf->domains[$i]->login_aliases = array(); +// Uncomment for allowed logins and use the following syntax: +// login_allowed = array('login_1' => '', 'login_2' => ''); +// If you want to use an external file, use the following syntax: +// login_allowed = '@/path/to/file/'; +// See login_allowed.sample file for example. +//$conf->domains[$i]->login_allowed = array(); +// Select SMTP AUTH method. +// Supported AUTH methods are : +// '' : no authentification method +// 'PLAIN' : AUTH PLAIN method +// 'LOGIN' : AUTH LOGIN method +$conf->domains[$i]->smtp_auth_method = ''; +// Select IMAP Namespace +$conf->domains[$i]->imap_namespace = "INBOX."; + +// If you want to add more domains, uncomment the following +// lines and fill them in + +//$i++; +//$conf->domains[$i]->domain = ''; +//$conf->domains[$i]->in = ''; +//$conf->domains[$i]->smtp = ''; +//$conf->domains[$i]->smtp_port = 25; +//$conf->domains[$i]->login_with_domain = 1; +//$conf->domains[$i]->login_suffix = ''; +//$conf->domains[$i]->login_aliases = array(); +//$conf->domains[$i]->login_allowed = array(); +//$conf->domains[$i]->smtp_auth_method = ''; +//$conf->domains[$i]->imap_namespace = "INBOX."; + +//$i++; +//$conf->domains[$i]->domain = ''; +//$conf->domains[$i]->in = ''; +//$conf->domains[$i]->smtp = ''; +//$conf->domains[$i]->smtp_port = 25; +//$conf->domains[$i]->login_with_domain = 1; +//$conf->domains[$i]->login_suffix = ''; +//$conf->domains[$i]->login_aliases = array(); +//$conf->domains[$i]->login_allowed = array(); +//$conf->domains[$i]->smtp_auth_method = ''; +//$conf->domains[$i]->imap_namespace = "INBOX."; + +// If you use many mail domains, the one used will be we one of the HTTP host, +// and the user won't be asked for the domain to connect. +// Set to true to enable. +$conf->vhost_domain_login = false; + +// Is the user allowed to change his "From:" address? (true/false) +$conf->allow_address_change = true; + +// Default tmp directory (where to store temporary uploaded files) +// This should be something like '/tmp' on Unix System +// And 'c:\\temp' on Win32 (note that we must escape "\") +$conf->tmpdir = '/tmp'; + +// Preferences and contacts data directory +// IMPORTANT: This directory must exist and be writable by the user +// the webserver is running as (e.g. 'apache', or 'nobody'). For +// Apache, see the User directive in the httpd.conf file. +// See README for more about this. +// This should be something like 'profiles/' on Unix System +// or 'prefs\\' on Win32 (note that we must escape "\"). +// You should not use a subfolder within your Nocc installation, as it will +// be readable by everybody, and will contain sensible information as email +// addresses and names. +// If left empty, preferences, contacts and session saving will be disabled. +$conf->prefs_dir = '.'; + +// Master key for session password encryption. Longer is better. +// It must not be left empty. +$conf->master_key = 'abc'; + +// Default folder to go first +$conf->default_folder = 'INBOX'; + +// ===> End of required parameters + +// The following parameters can be changed but it's not necessary to +// get a working version of nocc + +// if browser has no preferred language, we use the default language +// This is only needed for browsers that don't send any preferred +// language such as W3 Amaya +$conf->default_lang = 'en'; + +// force default language to be set, rather than browser prefered language +$conf->force_default_lang = false; + +// How many messages to display in the inbox (devel only) +$conf->max_msg_num = 1; + +// let user see the header of a message +$conf->use_verbose = true; + +// the user can logout or not (if nocc is used within your website +// enter 'false' here else leave 'true') +$conf->enable_logout = true; + +// the user can change their 'reply leadin' string +$conf->enable_reply_leadin = false; + +// Whether or not to display attachment part number +$conf->display_part_no = true; + +// Whether or not to display the Message/RFC822 into the attachments +// (the attachments of that part are still available even if false is set +$conf->display_rfc822 = true; + +// If you don't want to display images (GIF, JPEG and PNG) sent as attachements +// set it to 'false' +$conf->display_img_attach = true; + +// If you don't want to display text/plain attachments set it to 'false' +$conf->display_text_attach = true; + +// By default the messages are sorted by date +$conf->default_sort = '1'; + +// By default the most recent is in top ('1' --> sorting top to bottom, +// '0' --> bottom to top) +$conf->default_sortdir = '1'; + +// For old UCB POP server, change this setting to 1 to enable +// new mail detection. Recommended: leave it to 0 for any other POP or +// IMAP server. +// See FAQ for more details. +$conf->have_ucb_pop_server = false; + +// If you wanna make your own theme and force people to use that one, +// set $conf->use_theme to false and fill in the $conf->default_theme to +// the theme name you want to use +// Theme handling: allows users to choose a theme on the login page +$conf->use_theme = true; + +// Default theme +$conf->default_theme = 'standard'; + +// Error reporting +// Display all errors (including IMAP connection errors, such as +// 'host not found' or 'invalid login') +//$conf->debug_level = E_ALL & ~E_NOTICE; // Leave the debug level to PHP configuration + +// Base URL where NOCC is hosted (only needed for Xitami servers, see #463390) +// (NOTE: should end in a slash). Leave blank to detect it automagically. +//$conf->base_url = 'http://www.yoursite.com/webmail/'; +$conf->base_url = ''; + +// Another tip for Xitami users, whose $_SERVER['PHP_SELF'] is broken +// (see http://sourceforge.net/tracker/index.php?func=detail&aid=505194&group_id=12177&atid=112177) +//$_SERVER['PHP_SELF'] = 'action.php'; + +// Use old-style forwarding (quote original message, and attach original attachments). +// This is discouraged, because it mangles the original message, removing important headers etc. +$conf->broken_forwarding = false; + +// This sets the number of messages per page to display from a imap folder or pop mailbox +$conf->msg_per_page = '25'; + +// Set this to '1' to enable the status line for folders at the bottom of the inbox page. +// If you get slow page loads, set it to '0' to disable this (rather slow) function. +$conf->status_line = '1'; + +//Uncomment this to allow secure typed domain logins +//$conf->typed_domain_login = '1'; + +// ################### Messages Signature ################### // + +// This message is added to every message, the user cannot delete it +// Be careful if you modify this, do not forget to write '\r\n' to switch +// to the next line ! +$conf->ad = "___________________________________\r\nNOCC, http://nocc.sourceforge.net"; + +// PHP error reporting for this application +error_reporting($conf->debug_level); + +// Prevent mangling of uploaded attachments +set_magic_quotes_runtime(0); + +// Delay between 2 mail send (in second) +$conf->send_delay = 30; + +// Number of contacts per user, 0 to disable contacts list +$conf->contact_number_max = 10; + +// Allow more memory than default setting in order to handle correctly +// large mails attachments. Try to find correct setting (about 2.5x total +// attachment size) +$conf->memory_limit="20M"; + +// Allow only specified characters for login. The format of this configuration +// variable is any valid regular expression. +// Example: '^[a-zA-Z0-9_]+$' : login only with letters (upper and lower case), +// numbers and '_' character +// Set to '' to disable +$conf->allowed_char=''; + +// Select the CRLF to use. +// According to rfc-822 CRLF is "\r\n" +// OS independent, this is a MTA problem +// not ours. +$conf->crlf = "\r\n"; + +// Enable quota checks. +// Works only with c-client2000 or more recent, and IMAP inbox +$conf->quota_enable=false; + +// Quota types. +// Possible values are STORAGE or MESSAGE +$conf->quota_type="STORAGE"; + +// Default encoding charset to use to display email which does not include one. +$conf->default_charset = 'UTF-8'; +/* +################### End of Configuration #################### +*/ + +?> diff --git a/modules/Webmails/dlAttachments.php b/modules/Webmails/dlAttachments.php new file mode 100644 index 0000000..42b6e83 --- /dev/null +++ b/modules/Webmails/dlAttachments.php @@ -0,0 +1,51 @@ +mbox,$mailid); +$attach_tab = Array(); +$email->loadMail($attach_tab); +echo "".$mod_strings['LBL_ATTACHMENTS'].""; +echo "\n"; +echo ""; +echo ""; +echo ""; +echo ""; + +echo ""; +echo ""; + +if(count($email->attname) <= 0) + echo ""; +else{ + for($i=0;$iattname);$i++){ + $attachment_links .= "    ".$email->anchor_arr[$i].$email->attname[$i]."
          "; + } + echo "
          ".$mod_strings['LBL_ATTACHMENTS']."
          ".$mod_strings['LBL_NO_ATTACHMENTS']."

          "; + echo ""; + echo "
          ".$mod_strings['LBL_THERE_ARE']." ".count($email->attname)." ".$mod_strings['LBL_ATTACHMENTS_TO_CHOOSE'].":
          ".$attachment_links."
          "; +} + +echo "
          "; + +?> \ No newline at end of file diff --git a/modules/Webmails/download.php b/modules/Webmails/download.php new file mode 100644 index 0000000..937e8e4 --- /dev/null +++ b/modules/Webmails/download.php @@ -0,0 +1,79 @@ + + * Copyright 2001 Olivier Cahagne + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + * + * File for downloading the attachments + */ +require_once('modules/Webmails/MailBox.php'); + +if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "") +{ + $mailbox=$_REQUEST["mailbox"]; +} +else +{ + $mailbox="INBOX"; +} +$MailBox = new MailBox($mailbox); +$mail = $MailBox->mbox; + +if(!isset($HTTP_USER_AGENT)) + $HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT']; +$mailid = $_REQUEST['mailid']; +$mime = $_REQUEST['mime']; +$filename = $_REQUEST['filename']; +$transfer = $_REQUEST['transfer']; +$part = $_REQUEST['part']; +$filename = base64_decode($filename); +$filename = preg_replace('/[\\/:\*\?"<>\|;]/', '_', str_replace(' ', ' ', $filename)); +$isIE = $isIE6 = 0; +// Set correct http headers. +// Thanks to Squirrelmail folks :-) +if (strstr($HTTP_USER_AGENT, 'compatible; MSIE ') !== false && + strstr($HTTP_USER_AGENT, 'Opera') === false) { + $isIE = 1; +} + +if (strstr($HTTP_USER_AGENT, 'compatible; MSIE 6') !== false && + strstr($HTTP_USER_AGENT, 'Opera') === false) { + $isIE6 = 1; +} + +if ($isIE) { + $filename=rawurlencode($filename); + header ("Pragma: public"); + header ("Cache-Control: no-store, max-age=0, no-cache, must-revalidate"); // HTTP/1.1 + header ("Cache-Control: post-check=0, pre-check=0", false); + header ("Cache-Control: private"); + + //set the inline header for IE, we'll add the attachment header later if we need it + header ("Content-Disposition: inline; filename=$filename"); +} + +header ("Content-Type: application/octet-stream; name=\"$filename\""); +header ("Content-Disposition: attachment; filename=\"$filename\""); + +if ($isIE && !$isIE6) { + header ("Content-Type: application/download; name=\"$filename\""); +} else { + header ("Content-Type: application/octet-stream; name=\"$filename\""); +} + +$file = imap_fetchbody($mail,$mailid,$part); + +if ($transfer == 'BASE64') + $file = imap_base64($file); +elseif($transfer == 'QUOTED-PRINTABLE') + $file = imap_qprint($file); + +imap_close($mail); + +header('Content-Length: ' . strlen($file)); +echo ($file); +?> diff --git a/modules/Webmails/functions.php b/modules/Webmails/functions.php new file mode 100644 index 0000000..829c5a0 --- /dev/null +++ b/modules/Webmails/functions.php @@ -0,0 +1,814 @@ + + * Copyright 2001 Olivier Cahagne + * Copyright 2002 Mike Rylander + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + */ + + +/* ----------------------------------------------------- */ + +function inbox(&$pop, $skip = 0, &$ev) +{ + global $conf; + global $charset; + + $user_prefs = $_SESSION['nocc_user_prefs']; + + $msg_list = array(); + + $lang = $_SESSION['nocc_lang']; + $sort = $_SESSION['nocc_sort']; + $sortdir = $_SESSION['nocc_sortdir']; + + $num_msg = $pop->num_msg(); + $per_page = get_per_page(); + + $start_msg = $skip * $per_page; + $end_msg = $start_msg + $per_page; + + $sorted = $pop->sort($sort, $sortdir, $ev, true); + if(NoccException::isException($ev)) return; + + $end_msg = ($num_msg > $end_msg) ? $end_msg : $num_msg; + if ($start_msg > $num_msg) { + return $msg_list; + } + + for ($i = $start_msg; $i < $end_msg; $i++) + { + $subject = $from = $to = ''; + $msgnum = $sorted[$i]; + $pop_msgno_msgnum = $pop->msgno($msgnum); + $ref_contenu_message = $pop->headerinfo($pop_msgno_msgnum, $ev); + if(NoccException::isException($ev)) return; + $struct_msg = $pop->fetchstructure($pop_msgno_msgnum, $ev); + if(NoccException::isException($ev)) return; + + // Get message charset + $msg_charset = ''; + if ($struct_msg->ifparameters) { + while ($obj = array_pop($struct_msg->parameters)) + if (strtolower($obj->attribute) == 'charset') { + $msg_charset = $obj->value; + break; + } + } + if ($msg_charset == '') { + $msg_charset = 'UTF-8'; + } + + // Get subject + $subject_header = str_replace('x-unknown', $msg_charset, $ref_contenu_message->subject); + $subject_array = nocc_imap::mime_header_decode($subject_header); + + for ($j = 0; $j < count($subject_array); $j++) + $subject .= $subject_array[$j]->text; + + // Get from + $from_header = str_replace('x-unknown', $msg_charset, $ref_contenu_message->fromaddress); + $from_array = nocc_imap::mime_header_decode($from_header); + for ($j = 0; $j < count($from_array); $j++) + $from .= $from_array[$j]->text; + + // Get to + $to_header = str_replace('x-unknown', $msg_charset, $ref_contenu_message->toaddress); + $to_array = nocc_imap::mime_header_decode($to_header); + for ($j = 0; $j < count($to_array); $j++) { + $to = $to . $to_array[$j]->text . ", "; + } + $to = substr($to, 0, strlen($to)-2); + $msg_size = 0; + if ($pop->is_imap()) + $msg_size = get_mail_size($struct_msg); + else + if(isset($struct_msg->bytes)) + $msg_size = ($struct_msg->bytes > 1000) ? ceil($struct_msg->bytes / 1000) : 1; + if (isset($struct_msg->type) && ( $struct_msg->type == 1 || $struct_msg->type == 3)) + { + if ($struct_msg->subtype == 'ALTERNATIVE' || $struct_msg->subtype == 'RELATED') + $attach = ' '; + else + $attach = ''; + } + else + $attach = ' '; + // Check Status Line with UCB POP Server to + // see if this is a new message. This is a + // non-RFC standard line header. + // Set this in conf.php + if ($conf->have_ucb_pop_server) + { + $header_msg = $pop->fetchheader($pop->msgno($msgnum), $ev); + if(NoccException::isException($ev)) return; + $header_lines = explode("\r\n", $header_msg); + while (list($k, $v) = each($header_lines)) + { + list ($header_field, $header_value) = explode(':', $v); + if ($header_field == 'Status') + $new_mail_from_header = $header_value; + } + } + else + { + if (($ref_contenu_message->Unseen == 'U') || ($ref_contenu_message->Recent == 'N')) + $new_mail_from_header = ''; + else + $new_mail_from_header = ' '; + } + if ($new_mail_from_header == '') + $newmail = ''; + else + $newmail = ' '; + $timestamp = chop($ref_contenu_message->udate); + $date = format_date($timestamp, $lang); + $time = format_time($timestamp, $lang); + $msg_list[$i] = Array( + 'new' => $newmail, + 'number' => $pop->msgno($msgnum), + 'attach' => $attach, + 'to' => $to, + 'from' => $from, + 'subject' => $subject, + 'date' => $date, + 'time' => $time, + 'complete_date' => $date, + 'size' => $msg_size, + 'sort' => $sort, + 'sortdir' => $sortdir); + } + return ($msg_list); +} + + +/* ----------------------------------------------------- */ + +// BUG: returns text/plain when Content-Type: application/x-zip (e.g.) + +function GetSinglePart(&$attach_tab, &$this_part, &$header, &$body) +{ + if (preg_match("/text\/html/i", $header)) + $full_mime_type = 'text/html'; + else + $full_mime_type = 'text/plain'; + + if (isset($this_part->encoding)) + { + switch ($this_part->encoding) + { + case 0: + $encoding = '7BIT'; + break; + case 1: + $encoding = '8BIT'; + break; + case 2: + $encoding = 'BINARY'; + break; + case 3: + $encoding = 'BASE64'; + break; + case 4: + $encoding = 'QUOTED-PRINTABLE'; + break; + case 5: + $encoding = 'OTHER'; + break; + default: + $encoding = 'none'; + break; + } + } + else + { + $encoding = '7BIT'; + } + $charset = ''; + if ($this_part->ifparameters) + while ($obj = array_pop($this_part->parameters)) + if (strtolower($obj->attribute) == 'charset') + { + $charset = $obj->value; + break; + } + $tmpvar = Array( + 'number' => 1, + 'id' => $this_part->ifid ? $this_part->id : 0, + 'name' => '', + 'mime' => $full_mime_type, + 'transfer' => $encoding, + 'disposition' => $this_part->ifdisposition ? $this_part->disposition : '', + 'charset' => $charset + ); + if(isset($this_part->bytes)) + $tmpvar['size'] = ($this_part->bytes > 1000) ? ceil($this_part->bytes / 1000) : 1; + + array_unshift($attach_tab, $tmpvar); +} + +/* ----------------------------------------------------- */ + +function remove_stuff(&$body, &$mime) +{ + $PHP_SELF = $_SERVER['PHP_SELF']; + + $lang = $_SESSION['nocc_lang']; + + if (preg_match("/html/i", $mime)) + { + $to_removed_array = array ( + "''si", + "''si", + "']*>'si", + "''si", + "']*>.*?'si", + "']*>.*?'si", + "']*>.*?'si", + "']*>.*?'si", + "']*>.*?'si", + "']*>.*?'si", + "']*>.*?'si", + "']*>'si" + ); + $body = preg_replace($to_removed_array, '', $body); + //this line is not needed, commented to fix #3245 + //$body=preg_replace("/(http:\/\/|ftp:\/\/)([^\s,]*)/i","$1$2 target=_blank",$body ); + $body = preg_replace("|href=\"(.*)script:|i", 'href="nocc_removed_script:', $body); + $body = preg_replace("|<([^>]*)java|i", ']*)&{.*}([^>]*)>|i", "<&{;}\\3>", $body); + $body = preg_replace("/href=\"mailto:([a-zA-Z0-9+-=%&:_.~?@]+[#a-zA-Z0-9+]*)\"/i","HREF=\"mailto:\\1\"", $body); + $body = preg_replace("/href=mailto:([a-zA-Z0-9+-=%&:_.~?@]+[#a-zA-Z0-9+]*)/i","HREF=\"$PHP_SELF?action=write&mail_to=\\1\"", $body); + $body = preg_replace("/href=\"([a-zA-Z0-9+-=%&:_.~?]+[#a-zA-Z0-9+]*)\"/i","href=\"javascript:void(0);\" onclick=\"window.open('\\1');\"", $body); + $body = preg_replace("/href=([a-zA-Z0-9+-=%&:_.~?]+[#a-zA-Z0-9+]*)/i","href=\"javascript:void(0);\" onclick=\"window.open('\\1');\"", $body); + } + elseif (preg_match("/plain/i", $mime)) + { + $user_prefs = $_SESSION['nocc_user_prefs']; + $body = htmlspecialchars($body); + $body = preg_replace("/(http|https|ftp):\/\/([a-zA-Z0-9+-=%&:_.~?]+[#a-zA-Z0-9+]*)/","\\1://\\2", $body); + // Bug #511302: Comment out following line if you have the 'Invalid Range End' problem + // New rewritten preg_replace should fix the problem, bug #522389 + $body = preg_replace("/([0-9a-zA-Z]([-_.]?[0-9a-zA-Z])*@[0-9a-zA-Z]([-.]?[0-9a-zA-Z])*\.[a-zA-Z]{2,})/", "\\1", $body); + if ( !isset($user_prefs->colored_quotes) || (isset($user_prefs->colored_quotes) && $user_prefs->colored_quotes)) { + $body = preg_replace('/^(> *> *> *> *>)(.*?)(\r?\n)/m', '\\1\\2\\3', $body); + $body = preg_replace('/^(> *> *> *>)(.*?)(\r?\n)/m', '\\1\\2\\3', $body); + $body = preg_replace('/^(> *> *>)(.*?)(\r?\n)/m', '\\1\\2\\3', $body); + $body = preg_replace('/^(> *>)(.*?)(\r?\n)/m', '\\1\\2\\3', $body); + $body = preg_replace('/^(>)(.*?)(\r?\n)/m', '\\1\\2\\3', $body); + } + if (isset($user_prefs->display_struct) && $user_prefs->display_struct) { + $body = preg_replace('/(\s)\+\/-/', '\\1±', $body); // +/- + $body = preg_replace('/(\w|\))\^([0-9]+)/', '\\1\\2', $body); // 10^6, a^2, (a+b)^2 + $body = preg_replace('/(\s)(\*)([^\s\*]+[^\*\r\n]+)(\*)/', '\\1\\2\\3\\4', $body); // *strong* + $body = preg_replace('/(\s)(\/)([^\s\/]+[^\/\r\n<>]+)(\/)/', '\\1\\2\\3\\4', $body); // /emphasis/ + $body = preg_replace('/(\s)(_)([^\s_]+[^_\r\n]+)(_)/', '\\1\\2\\3\\4', $body); // _underline_ + $body = preg_replace('/(\s)(\|)([^\s\|]+[^\|\r\n]+)(\|)/', '\\1\\2\\3\\4', $body); // |code| + + } + $body = nl2br($body); + if (function_exists('wordwrap')) + $body = wordwrap($body, 80, "\n"); + } + return ($body); +} + +/* ----------------------------------------------------- */ + +function link_att(&$mail, $attach_tab, &$display_part_no) +{ + sort($attach_tab); + $link = ''; + while ($tmp = array_shift($attach_tab)) + if (!empty($tmp['name'])) + { + $mime = str_replace('/', '-', $tmp['mime']); + if ($display_part_no == true) + $link .= $tmp['number'] . '  '; + unset($att_name); + $att_name_array = imap_mime_header_decode($tmp['name']); + for ($i=0; $itext; + } + $att_name_dl = $att_name; + $att_name = convertLang2Html($att_name); + $link .= '' . $att_name . '  ' . $tmp['mime'] . '  ' . $tmp['size'] . '
          '; + } + return ($link); +} + +/* ----------------------------------------------------- */ +// Return date formatted as a string, according to locale + +function format_date(&$date, &$lang) +{ + global $default_date_format; + global $lang_locale; + global $no_locale_date_format; + + // handle bad inputs + if (empty($date)) + return ''; + + // if locale can't be set, use default for no locale + if (!setlocale (LC_TIME, $lang_locale)) + $default_date_format = $no_locale_date_format; + + // format dates + return strftime($default_date_format, $date); +} + +function format_time(&$time, &$lang) +{ + global $default_time_format; + global $lang_locale; + + // handle bad inputs + if (empty($time)) + return ''; + + // if locale can't be set, use default for no locale + setlocale (LC_TIME, $lang_locale); + + // format dates + return strftime($default_time_format, $time); +} + + +/* ----------------------------------------------------- */ + +// We have to figure out the entire mail size +function get_mail_size(&$this_part) +{ + $size = (isset($this_part->bytes) ? $this_part->bytes : 0); + if (isset($this_part->parts)) + for ($i = 0; $i < count($this_part->parts); $i++) + $size += (isset($this_part->parts[$i]->bytes) ? $this_part->parts[$i]->bytes : 0); + $size = ($size > 1000) ? ceil($size / 1000) : 1; + return ($size); +} + +/* ----------------------------------------------------- */ + +// this function build an array with all the recipients of the message for later reply or reply all +function get_reply_all(&$from, &$to, &$cc) +{ + $login = $_SESSION['nocc_login']; + $domain = $_SESSION['nocc_domain']; + if (!preg_match("/$login@$domain/i", $from)) + $rcpt = $from.'; '; + $tab = explode(',', $to); + while ($tmpvar = array_shift($tab)) + if (!preg_match("/$login@$domain/i", $tmpvar)) + $rcpt .= $tmpvar.'; '; + $tab = explode(',', $cc); + while ($tmpvar = array_shift($tab)) + if (!preg_match("/$login@$domain/i", $tmpvar)) + $rcpt .= $tmpvar.'; '; + $rcpt = isset($rcpt) ? substr($rcpt, 0, strlen($rcpt) - 2) : $from; + return ($rcpt); +} + +/* ----------------------------------------------------- */ + +// We need that to build a correct list of all the recipient when we send a message +function cut_address(&$addr, &$charset) +{ + global $charset; + // Strip slashes from input + $addr = safestrip($addr); + + // Break address line into individual addresses, taking + // quoted addresses into account + $addresses = array(); + $token = ''; + $quote_esc = false; + for ($i = 0; $i < strlen($addr); $i++) { + $c = substr($addr, $i, 1); + + // Are we entering/leaving escaped mode + if($c == '"') { + $quote_esc = !$quote_esc; + } + + // Is this an address seperator (comma/semicolon) + if($c == ',' || $c == ';') { + if(!$quote_esc) { + $token = trim($token); + if($token != '') { + $addresses[] = $token; + } + $token = ''; + continue; + } + } + + $token .= $c; + } + if(!$quote_esc) { + $token = trim($token); + if($token != '') { + $addresses[] = $token; + } + } + + /* old way + // Replace commas with semicolons as address seperator + $addr = str_replace(',', ';', $addr); + + // Break address line into individual addresses + $addresses = explode(';', $addr); + */ + + // Loop through addresses + for ($i = 0; $i < sizeof($addresses); $i++) + { + // Wrap address in brackets, if not already + $pos = strrpos($addresses[$i], '<'); + if (!is_int($pos)) + $addresses[$i] = '<'.$addresses[$i].'>'; + + else + { + $name = ''; + if ($pos != 0) + $name = '=?'.$charset.'?B?'.base64_encode(substr($addresses[$i], 0, $pos - 1)).'?= '; + $addr = substr($addresses[$i], $pos); + $addresses[$i] = '"'.$name.'" '.$addr.''; + } + } + return ($addresses); +} + +/* ----------------------------------------------------- */ + +function view_part(&$pop, &$mail, $part_no, &$transfer, &$msg_charset, &$charset) +{ + if(NoccException::isException($ev)) { + return "

          ".$ev->getMessage."

          "; + } + $text = $pop->fetchbody($mail, $part_no, $ev); + if(NoccException::isException($ev)) { + return "

          ".$ev->getMessage."

          "; + } + if ($transfer == 'BASE64') + $str = nl2br(nocc_imap::base64($text)); + elseif($transfer == 'QUOTED-PRINTABLE') + $str = nl2br(quoted_printable_decode($text)); + else + $str = nl2br($text); + return ($str); +} + +/* ----------------------------------------------------- */ + +function encode_mime(&$string, &$charset) +{ + /*$text = '=?' . $charset . '?Q?'; + for($i = 0; $i < strlen($string); $i++ ) + { + $val = ord($string[$i]); + $val = dechex($val); + $text .= '=' . $val; + } + $text .= '?='; + return ($text); + */ + $string = rawurlencode($string); + $string = str_replace('%', '=', $string); + $string = '=?' . $charset . '?Q?' . $string . '?='; + return ($string); +} + +/* ----------------------------------------------------- */ + +// This function removes temporary attachment files and +// removes any attachment information from the session +function clear_attachments() +{ + global $conf; + if (isset($_SESSION['nocc_attach_array']) && is_array($_SESSION['nocc_attach_array'])) + while ($tmpvar = array_shift($_SESSION['nocc_attach_array'])) + @unlink($conf->tmpdir.'/'.$tmpvar->tmp_file); + unset($_SESSION['nocc_attach_array']); +} + +/* ----------------------------------------------------- */ + +// This function chops the bit from a +// full 'Blah Blah ' address, or not +// depending on the 'hide_addresses' preference. +function display_address(&$address) +{ + global $html_att_unknown; + // Check for null + if($address == '') + return $html_att_unknown; + + // Get preference + $user_prefs = $_SESSION['nocc_user_prefs']; + + // If not set, return full address. + if(!isset($user_prefs->hide_addresses)) + return $address; + + if($user_prefs->hide_addresses!=1 && $user_prefs->hide_addresses!="on") + return $address; + + // If no '<', return full address. + $bracketpos = strpos($address, "<"); + if($bracketpos === false) + return $address; + + // Return up to the first '<', or end of string if not found + //return substr($address, 0, $bracketpos - 1); + $formatted_address = ''; + while (!($bracketpos === false)) { + $formatted_address = substr($address, 0, $bracketpos - 1); + $formatted_address .= substr($address, strpos($address, ">")+1); + $address = $formatted_address; + $bracketpos = strpos($address, "<"); + } + return $address; +} + +/* ----------------------------------------------------- */ + +function mailquote(&$body, &$from, $html_wrote) +{ + $user_prefs = $_SESSION['nocc_user_prefs']; + + $crlf = "\r\n"; + $from = ucwords(trim(preg_replace("/<.*>/", "", str_replace("\"", "", $from)))); + + if (isset($user_prefs->wrap_msg)) { + $wrap_msg = $user_prefs->wrap_msg; + } else { + $wrap_msg = 0; + } + // If we must wrap the message + if ($wrap_msg) + { + $msg = ''; + //Break message in table with "\r\n" as separator + $tbl = explode ("\r\n", $body); + // For each line + for ($i = 0, $buffer = ''; $i < count ($tbl); ++$i) + { + unset($buffer); + // Number of "> " + $q = substr_count($tbl[$i], "> "); + + $tbl[$i] = rtrim ($tbl[$i]); + // Erase the "> " + $tbl[$i] = str_replace ("> ", "", $tbl[$i]); + // Erase the break line + $tbl[$i] = str_replace ("\n", " ", $tbl[$i]); + // length of "> > ...." + $length = ($q + 1) * strlen ("> "); + // Add the quote if ligne is not to long + if (strlen ($tbl[$i]) + $length <= $wrap_msg) + $msg .= str_pad($tbl[$i], strlen ($tbl[$i]) + $length, "> ", STR_PAD_LEFT) . $crlf; + // If line is to long, create new line + else + { + $words = explode (" ", $tbl[$i]); + for ($j = 0; $j < count ($words); ++$j) + { + if (strlen ($buffer) + strlen ($words[$j]) + $length <= $wrap_msg) + $buffer .= $words[$j] . " "; + else + { + $msg .= str_pad(rtrim ($buffer), strlen (rtrim ($buffer)) + $length, "> ", STR_PAD_LEFT) . $crlf; + $buffer = $words[$j] . " "; + } + } + //if ($q != substr_count($tbl[$i + 1], "> ")) + $msg .= str_pad(rtrim ($buffer), strlen (rtrim ($buffer)) + $length, "> ", STR_PAD_LEFT) . $crlf; + } + } + $body = $msg; + } + else + $body = "> " . preg_replace("/\n/", "\n> ", trim($body)); + return($from . ' ' . $html_wrote . " :\n\n" . $body); + +} +/* ----------------------------------------------------- */ + +// If running with magic_quotes_gpc (get/post/cookie) set +// in php.ini, we will need to strip slashes from every +// field we receive from a get/post operation. +function safestrip(&$string) +{ + if(get_magic_quotes_gpc()) + $string = stripslashes($string); + return $string; +} + + +// Wrap outgoing messages to +function wrap_outgoing_msg ($txt, $length, $newline) +{ + $msg = ''; + // cut message in segment + $tbl = explode ("\r\n", $txt); + // Clean the end of the line + for ($i = 0, $buffer = ''; $i < count ($tbl); ++$i) + { + $tbl[$i] = rtrim ($tbl[$i]); + if (strlen ($tbl[$i]) <= $length) + $msg .= $tbl[$i] . $newline; + else + { + unset( $buffer); + $words = explode (" ", $tbl[$i]); + for ($j = 0; $j < count ($words); ++$j) + { + if ((strlen ($buffer) + strlen ($words[$j])) <= $length) + $buffer .= $words[$j] . " "; + else + { + $msg .= rtrim ($buffer) . $newline; + $buffer = $words[$j] . " "; + } + } + $msg .= rtrim ($buffer) . $newline; + } + } + return $msg; +} + +function strip_tags2(&$string, $allow) +{ + $string = preg_replace('/<<', $string); + $string = preg_replace('/>>/', '>;', $string); + $string = strip_tags($string, $allow . ''); + $string = preg_replace('//', '<', $string); + return preg_replace('//', '>', $string); +} + +/* ----------------------------------------------------- */ + +// Check e-mail address and return TRUE if it looks valid. +function valid_email($email) +{ + /* Regex of valid characters */ + $regexp = "/^[A-Za-z0-9\._-]+@([A-Za-z0-9][A-Za-z0-9-]{1,62})(\.[A-Za-z0-9][A-Za-z0-9-]{1,62})+$/"; + if(!preg_match($regexp, $email)) + return FALSE; + return TRUE; +} + +function get_per_page() { + global $conf; + $user_prefs = $_SESSION['nocc_user_prefs']; + $msg_per_page = 0; + if (isset($conf->msg_per_page)) + $msg_per_page = $conf->msg_per_page; + if (isset($user_prefs->msg_per_page)) + $msg_per_page = $user_prefs->msg_per_page; + // Failsafe + if($msg_per_page < 1) + $msg_per_page = 25; + return $msg_per_page; +} + +// ============================ Contact List ================================== + +function load_list ($path) +{ + $fp = @fopen($path, "r"); + if (!$fp) + return array(); + // Create the contact list + $contacts = array (); + // Load the contact list + while(!feof ($fp)) + { + $buffer = trim(fgets($fp, 4096)); + if ($buffer != "") + array_push ($contacts, $buffer); + } + + fclose($fp); + // return the list + return $contacts; +} + + +function save_list ($path, $contacts, $conf, &$ev) +{ + include ('lang/' . $_SESSION['nocc_lang'] . '.php'); + if(file_exists($path) && !is_writable($path)){ + $ev = new NoccException($html_err_file_contacts); + return; + } + if (!is_writeable($conf->prefs_dir)) { + $ev = new NoccException($html_err_file_contacts); + return; + } + $fp = fopen($path, "w"); + + for ($i = 0; $i < count ($contacts); ++$i) + { + if (trim($contacts[$i]) != "") + fwrite ($fp, $contacts[$i]."\n"); + } + + fclose($fp); +} + +// Convert html entities to normal characters +function unhtmlentities ($string) +{ + $trans_tbl = get_html_translation_table (HTML_ENTITIES); + $trans_tbl = array_flip ($trans_tbl); + return strtr ($string, $trans_tbl); +} + +// Convert mail data (from, to, ...) to HTML +function convertMailData2Html($maildata, $cutafter = 0) { + if (($cutafter > 0) && (strlen($maildata) > $cutafter)) { + return htmlspecialchars(substr($maildata, 0, $cutafter)) . '…'; + } else { + return htmlspecialchars($maildata); + } +} + +// Save session informations. +function saveSession(&$ev) +{ + global $conf; + if (!empty($conf->prefs_dir)) { + // generate string with session information + unset ($cookie_string); + $cookie_string = $_SESSION['nocc_user']; + $cookie_string .= " " . $_SESSION['nocc_passwd']; + $cookie_string .= " " . $_SESSION['nocc_lang']; + $cookie_string .= " " . $_SESSION['nocc_smtp_server']; + $cookie_string .= " " . $_SESSION['nocc_smtp_port']; + $cookie_string .= " " . $_SESSION['nocc_theme']; + $cookie_string .= " " . $_SESSION['nocc_domain']; + $cookie_string .= " " . $_SESSION['imap_namespace']; + $cookie_string .= " " . $_SESSION['nocc_servr']; + $cookie_string .= " " . $_SESSION['nocc_folder']; + $cookie_string .= " " . $_SESSION['smtp_auth']; + + // encode cookie string to base64 + $cookie_string = base64_encode($cookie_string); + + // save string to file + $filename = $conf->prefs_dir . '/' . $_SESSION['nocc_user'].'@'.$_SESSION['nocc_domain'] . '.session'; + if (file_exists($filename) && !is_writable($filename)) { + $ev = new NoccException($html_session_file_error); + return; + } + if (!is_writable($conf->prefs_dir)) { + $ev = new NoccException($html_session_file_error); + return; + } + $file = fopen($filename, 'w'); + if (!$file) { + $ev = new NoccException($html_session_file_error); + return; + } + fwrite ($file, $cookie_string . "\n"); + fclose ($file); + } +} + +// Restore session informations. +function loadSession(&$ev, &$key) +{ + global $conf; + + if (empty($conf->prefs_dir)) { + return ''; + } + + $filename = $conf->prefs_dir . '/' . $key . '.session'; + if (!file_exists($filename)) { + return ''; + } + + $file = fopen($filename, 'r'); + if (!$file) { + $ev = new NoccException("Could not open $filename for reading user session"); + return ''; + } + + $line = trim(fgets($file, 1024)); + return $line; +} + +// Convert a language string to HTML +function convertLang2Html($langstring) { + global $charset; + return htmlentities($langstring, ENT_COMPAT, $charset); +} +?> diff --git a/modules/Webmails/get_img.php b/modules/Webmails/get_img.php new file mode 100644 index 0000000..8b7dbc8 --- /dev/null +++ b/modules/Webmails/get_img.php @@ -0,0 +1,35 @@ + + * Copyright 2001 Olivier Cahagne + * + * See the enclosed file COPYING for license information (GPL). If you + * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. + */ +require_once('modules/Webmails/MailBox.php'); + +if(isset($_REQUEST["mailbox"]) && $_REQUEST["mailbox"] != "") +{ + $mailbox=$_REQUEST["mailbox"]; +} +else +{ + $mailbox="INBOX"; +} +$MailBox = new MailBox($mailbox); +$mail = $MailBox->mbox; +$mailid = $_REQUEST['mail']; +$num = $_REQUEST['num']; +$transfer = $_REQUEST['transfer']; +$mime = $_REQUEST['mime']; +$img = imap_fetchbody($mail,$mailid,$num); +if ($transfer == 'BASE64') + $img = imap_base64($img); +elseif ($transfer == 'QUOTED-PRINTABLE') + $img = imap_qprint($img); +imap_close($mail); +header('Content-type: image/'.$mime); +echo $img; +?> diff --git a/modules/Webmails/images/delitem.png b/modules/Webmails/images/delitem.png new file mode 100644 index 0000000..1b4bd3b Binary files /dev/null and b/modules/Webmails/images/delitem.png differ diff --git a/modules/Webmails/images/down_pointer.png b/modules/Webmails/images/down_pointer.png new file mode 100644 index 0000000..8494f5c Binary files /dev/null and b/modules/Webmails/images/down_pointer.png differ diff --git a/modules/Webmails/images/draft.png b/modules/Webmails/images/draft.png new file mode 100644 index 0000000..32531b0 Binary files /dev/null and b/modules/Webmails/images/draft.png differ diff --git a/modules/Webmails/images/end.gif b/modules/Webmails/images/end.gif new file mode 100644 index 0000000..4ade99f Binary files /dev/null and b/modules/Webmails/images/end.gif differ diff --git a/modules/Webmails/images/flag.png b/modules/Webmails/images/flag.png new file mode 100644 index 0000000..3240b29 Binary files /dev/null and b/modules/Webmails/images/flag.png differ diff --git a/modules/Webmails/images/folder.png b/modules/Webmails/images/folder.png new file mode 100644 index 0000000..0495d87 Binary files /dev/null and b/modules/Webmails/images/folder.png differ diff --git a/modules/Webmails/images/gnome-fs-trash-empty.png b/modules/Webmails/images/gnome-fs-trash-empty.png new file mode 100644 index 0000000..8562d26 Binary files /dev/null and b/modules/Webmails/images/gnome-fs-trash-empty.png differ diff --git a/modules/Webmails/images/gnome-fs-trash-full.png b/modules/Webmails/images/gnome-fs-trash-full.png new file mode 100644 index 0000000..e8ef5e8 Binary files /dev/null and b/modules/Webmails/images/gnome-fs-trash-full.png differ diff --git a/modules/Webmails/images/inbox.png b/modules/Webmails/images/inbox.png new file mode 100644 index 0000000..72159b1 Binary files /dev/null and b/modules/Webmails/images/inbox.png differ diff --git a/modules/Webmails/images/index.php b/modules/Webmails/images/index.php new file mode 100644 index 0000000..8e261fa --- /dev/null +++ b/modules/Webmails/images/index.php @@ -0,0 +1,23 @@ + diff --git a/modules/Webmails/images/mail_reply.png b/modules/Webmails/images/mail_reply.png new file mode 100644 index 0000000..7bb70b9 Binary files /dev/null and b/modules/Webmails/images/mail_reply.png differ diff --git a/modules/Webmails/images/minus.png b/modules/Webmails/images/minus.png new file mode 100644 index 0000000..3d78a57 Binary files /dev/null and b/modules/Webmails/images/minus.png differ diff --git a/modules/Webmails/images/next.gif b/modules/Webmails/images/next.gif new file mode 100644 index 0000000..e480c5b Binary files /dev/null and b/modules/Webmails/images/next.gif differ diff --git a/modules/Webmails/images/no.gif b/modules/Webmails/images/no.gif new file mode 100644 index 0000000..4413013 Binary files /dev/null and b/modules/Webmails/images/no.gif differ diff --git a/modules/Webmails/images/plus.gif b/modules/Webmails/images/plus.gif new file mode 100644 index 0000000..e0a1a6a Binary files /dev/null and b/modules/Webmails/images/plus.gif differ diff --git a/modules/Webmails/images/plus.png b/modules/Webmails/images/plus.png new file mode 100644 index 0000000..9bc4736 Binary files /dev/null and b/modules/Webmails/images/plus.png differ diff --git a/modules/Webmails/images/previous.gif b/modules/Webmails/images/previous.gif new file mode 100644 index 0000000..e740aa7 Binary files /dev/null and b/modules/Webmails/images/previous.gif differ diff --git a/modules/Webmails/images/sec_remove_eng.png b/modules/Webmails/images/sec_remove_eng.png new file mode 100644 index 0000000..5798a2b Binary files /dev/null and b/modules/Webmails/images/sec_remove_eng.png differ diff --git a/modules/Webmails/images/senti.png b/modules/Webmails/images/senti.png new file mode 100644 index 0000000..d2f814c Binary files /dev/null and b/modules/Webmails/images/senti.png differ diff --git a/modules/Webmails/images/sm_logo.png b/modules/Webmails/images/sm_logo.png new file mode 100644 index 0000000..da454b1 Binary files /dev/null and b/modules/Webmails/images/sm_logo.png differ diff --git a/modules/Webmails/images/sort_none.png b/modules/Webmails/images/sort_none.png new file mode 100644 index 0000000..152faf1 Binary files /dev/null and b/modules/Webmails/images/sort_none.png differ diff --git a/modules/Webmails/images/start.gif b/modules/Webmails/images/start.gif new file mode 100644 index 0000000..53efba6 Binary files /dev/null and b/modules/Webmails/images/start.gif differ diff --git a/modules/Webmails/images/stock_attach.png b/modules/Webmails/images/stock_attach.png new file mode 100644 index 0000000..9023807 Binary files /dev/null and b/modules/Webmails/images/stock_attach.png differ diff --git a/modules/Webmails/images/stock_macro-jump-back.png b/modules/Webmails/images/stock_macro-jump-back.png new file mode 100644 index 0000000..8dc0809 Binary files /dev/null and b/modules/Webmails/images/stock_macro-jump-back.png differ diff --git a/modules/Webmails/images/stock_mail-flag-for-followup-done.png b/modules/Webmails/images/stock_mail-flag-for-followup-done.png new file mode 100644 index 0000000..c21a388 Binary files /dev/null and b/modules/Webmails/images/stock_mail-flag-for-followup-done.png differ diff --git a/modules/Webmails/images/stock_mail-flag-for-followup.png b/modules/Webmails/images/stock_mail-flag-for-followup.png new file mode 100644 index 0000000..08e5e6d Binary files /dev/null and b/modules/Webmails/images/stock_mail-flag-for-followup.png differ diff --git a/modules/Webmails/images/stock_mail-forward.png b/modules/Webmails/images/stock_mail-forward.png new file mode 100644 index 0000000..b3ea97e Binary files /dev/null and b/modules/Webmails/images/stock_mail-forward.png differ diff --git a/modules/Webmails/images/stock_mail-hide-read.png b/modules/Webmails/images/stock_mail-hide-read.png new file mode 100644 index 0000000..4edb84b Binary files /dev/null and b/modules/Webmails/images/stock_mail-hide-read.png differ diff --git a/modules/Webmails/images/stock_mail-open.png b/modules/Webmails/images/stock_mail-open.png new file mode 100644 index 0000000..a337885 Binary files /dev/null and b/modules/Webmails/images/stock_mail-open.png differ diff --git a/modules/Webmails/images/stock_mail-priority-high.png b/modules/Webmails/images/stock_mail-priority-high.png new file mode 100644 index 0000000..17860f6 Binary files /dev/null and b/modules/Webmails/images/stock_mail-priority-high.png differ diff --git a/modules/Webmails/images/stock_mail-read.png b/modules/Webmails/images/stock_mail-read.png new file mode 100644 index 0000000..75bdd3e Binary files /dev/null and b/modules/Webmails/images/stock_mail-read.png differ diff --git a/modules/Webmails/images/stock_mail-replied.png b/modules/Webmails/images/stock_mail-replied.png new file mode 100644 index 0000000..9ddc5fb Binary files /dev/null and b/modules/Webmails/images/stock_mail-replied.png differ diff --git a/modules/Webmails/images/stock_mail-reply.png b/modules/Webmails/images/stock_mail-reply.png new file mode 100644 index 0000000..6996ade Binary files /dev/null and b/modules/Webmails/images/stock_mail-reply.png differ diff --git a/modules/Webmails/images/stock_mail-unread.png b/modules/Webmails/images/stock_mail-unread.png new file mode 100644 index 0000000..e8af668 Binary files /dev/null and b/modules/Webmails/images/stock_mail-unread.png differ diff --git a/modules/Webmails/images/stock_mail.png b/modules/Webmails/images/stock_mail.png new file mode 100644 index 0000000..bb6bf86 Binary files /dev/null and b/modules/Webmails/images/stock_mail.png differ diff --git a/modules/Webmails/images/stock_trash_full.png b/modules/Webmails/images/stock_trash_full.png new file mode 100644 index 0000000..40f722a Binary files /dev/null and b/modules/Webmails/images/stock_trash_full.png differ diff --git a/modules/Webmails/images/trashcan_empty.png b/modules/Webmails/images/trashcan_empty.png new file mode 100644 index 0000000..f5cb2b8 Binary files /dev/null and b/modules/Webmails/images/trashcan_empty.png differ diff --git a/modules/Webmails/images/up_pointer.png b/modules/Webmails/images/up_pointer.png new file mode 100644 index 0000000..871ef0e Binary files /dev/null and b/modules/Webmails/images/up_pointer.png differ diff --git a/modules/Webmails/index.php b/modules/Webmails/index.php new file mode 100644 index 0000000..8be202c --- /dev/null +++ b/modules/Webmails/index.php @@ -0,0 +1,32 @@ +". getTranslatedString('LBL_INSTEAD_OF_WEBMAILS_USE', $currentModule). + " ".getTranslatedString('MailManager', 'MailManager').".
          ". + getTranslatedString('LBL_PLEASE_CLICK_HERE_TO_GO_TO', $currentModule) . + " ".getTranslatedString('Emails', 'Emails')." ". + getTranslatedString('LBL_MODULE', $currentModule) ."
          "; + +?> diff --git a/modules/Webmails/js/script.js b/modules/Webmails/js/script.js new file mode 100644 index 0000000..6056db2 --- /dev/null +++ b/modules/Webmails/js/script.js @@ -0,0 +1,91 @@ +/********************************************************************************* + ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ +function showhide(argg) +{ + var x=document.getElementById(argg).style; + if (x.display=="none") + { + x.display="block" + + } + else { + x.display="none" + } +} + + +function showhideRepeat(argg1,argg2) +{ + var x=document.getElementById(argg2).style; + var y=document.getElementById(argg1).checked; + + if (y) + { + x.display="block"; + } + else { + x.display="none"; + } + +} + + + +function gshow(argg1) +{ + var y=document.getElementById(argg1).style; + + if (y.display=="none") + { + y.display="block"; + + + } +} + +function ghide(argg2) +{ + var z=document.getElementById(argg2).style; + if (z.display=="block" ) + { + z.display="none" + + } +} + + function moveMe(arg1) { + var posx = 0; + var posy = 0; + var e=document.getElementById(arg1); + + if (!e) var e = window.event; + + if (e.pageX || e.pageY) + { + posx = e.pageX; + posy = e.pageY; + } + else if (e.clientX || e.clientY) + { + posx = e.clientX + document.body.scrollLeft; + posy = e.clientY + document.body.scrollTop; + } + } + +function switchClass(myModule,toStatus) { + var x=document.getElementById(myModule); + if (toStatus=="on") { + x.className="dvtSelectedCell"; + } + if (toStatus=="off") { + x.className="dvtUnSelectedCell"; + } + +} diff --git a/modules/Webmails/language/de_de.lang.php b/modules/Webmails/language/de_de.lang.php new file mode 100644 index 0000000..9c3bfd0 --- /dev/null +++ b/modules/Webmails/language/de_de.lang.php @@ -0,0 +1,181 @@ +'E-Mails', + 'LBL_MODULE_TITLE'=>'E-Mails: Home', + 'LBL_SEARCH_FORM_TITLE'=>'E-Mail Suche', + 'LBL_LIST_FORM_TITLE'=>'E-Mail Liste', + 'LBL_NEW_FORM_TITLE'=>'Track E-Mail', + + 'LBL_LIST_SUBJECT'=>'Betreff', + 'LBL_LIST_CONTACT'=>'Person', + 'LBL_LIST_RELATED_TO'=>'Bezogen auf', + 'LBL_LIST_DATE'=>'Sendedatum', + 'LBL_LIST_TIME'=>'Sendezeit', + 'LBL_MOVE_TO'=>'Verschieben zu', + 'LBL_DELETE'=>'Löschen', + + 'ERR_DELETE_RECORD'=>"Um einen Eintrag zu löschen, muss einer ausgewählt werden.", + 'LBL_DATE_SENT'=>'Sendedatum: ', + 'LBL_SUBJECT'=>'Betreff: ', + 'LBL_DATE_AND_TIME'=>'Sendedatum und -zeit: ', + 'LBL_DATE'=>'Datum: ', + 'LBL_TIME'=>'Sendezeit: ', + 'LBL_BODY'=>'Nachricht: ', + 'LBL_CONTACT_NAME'=>' Name: ', + 'LBL_EMAIL'=>'E-Mail: ', + 'LBL_COLON'=>':', + 'LBL_TO'=>'An: ', + 'LBL_CHK_MAIL'=>'Mails holen', + 'LBL_COMPOSE'=>'Neu', + 'LBL_SETTINGS'=>'Einstellungen', + 'LBL_EMAIL_FOLDERS'=>'E-Mail Ordner', + 'LBL_INBOX'=>'Inbox', + 'LBL_SENT_MAILS'=>'gesendete Mails', + 'LBL_TRASH'=>'Junk', + 'LBL_JUNK_MAILS'=>'Junk Mails', + 'LBL_TO_LEADS'=>'zu Leads', + 'LBL_TO_CONTACTS'=>'zu Personen', + 'LBL_TO_ACCOUNTS'=>'zu Organisationen', + 'LBL_MY_MAILS'=>'meine Mails', + 'LBL_QUAL_CONTACT'=>'qualifizierte Mails (Als Personen)', + 'LBL_MAILS'=>'Mails', + 'LBL_QUALIFY_BUTTON'=>'Qualifiziere', + 'LBL_REPLY_BUTTON'=>'Antworten', + 'LBL_FORWARD_BUTTON'=>'Weiterleiten', + 'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Download Anhänge', + 'LBL_FROM'=>'Von: ', + 'LBL_CC'=>'CC: ', + 'LBL_REPLY_TO_SENDER'=>'Sender antworten', + 'LBL_REPLY_ALL'=>'Allen antworten', + 'LBL_SHOW_HIDDEN'=>'zeige Papierkorb', + 'LBL_EXPUNGE_MAILBOX'=>'Papierkorb löschen', + + 'NTC_REMOVE_INVITEE'=>'Sind Sie sicher, dass Sie den Empfänger von der E-Mail löschen wollen?', + 'LBL_INVITEE'=>'Empfänger', + + // Added Fields + // Contacts-SubPanelViewContactsAndUsers.php + 'LBL_BULK_MAILS'=>'Massen-Mails', + 'LBL_ATTACHMENT'=>'Anhang', + 'LBL_UPLOAD'=>'Laden', + 'LBL_FILE_NAME'=>'Dateiname', + 'LBL_SEND'=>'Sende', + + 'LBL_EMAIL_TEMPLATES'=>'E-Mail Vorlagen', + 'LBL_TEMPLATE_NAME'=>'Vorlagenname', + 'LBL_DESCRIPTION'=>'Beschreibung', + 'LBL_EMAIL_TEMPLATES_LIST'=>'E-Mail Vorlagenliste', + 'LBL_EMAIL_INFORMATION'=>'E-Mail Information', + + + + + //for v4 release added + 'LBL_NEW_LEAD'=>'Neuer Lead', + 'LBL_LEAD_TITLE'=>'Leads', + + 'LBL_NEW_PRODUCT'=>'Neues Produkt', + 'LBL_PRODUCT_TITLE'=>'Produkts', + 'LBL_NEW_CONTACT'=>'Neue Person', + 'LBL_CONTACT_TITLE'=>'Personen', + 'LBL_NEW_ACCOUNT'=>'Neue Organisation', + 'LBL_ACCOUNT_TITLE'=>'Organisationen', + + // Added fields after vtiger4 - Beta + 'LBL_USER_TITLE'=>'Benutzer', + 'LBL_NEW_USER'=>'Neuer Benutzer', + + // Added for 4 GA + 'LBL_TOOL_FORM_TITLE'=>'E-Mail Werkzeuge', + //Added for 4GA + 'Date & Time Sent'=>'Sendedatum und -zeit', + 'Sales Enity Module'=>'Verkaufsmodul', + 'Activtiy Type'=>'Aktivitätentyp', + 'Related To'=>'bezogen auf', + 'Assigned To'=>'zuständig', + 'Subject'=>'Betreff', + 'Attachment'=>'Anhang', + 'Description'=>'Beschreibung', + 'Time Start'=>'Startzeit', + 'Created Time'=>'erstellt', + 'Modified Time'=>'geändert', + + 'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Bitte überprüfen Sie den Namen des Mailservers...', + 'MESSAGE_CHECK_MAIL_ID'=>'Bitte überprüfen Sie die E-Mail Adresse des zuständigen Nutzers...', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'Eine Mail wurde an die folgeden Benutzer gesendet :', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'Eine Mail wurde an die folgeden Personen gesendet :', + 'MESSAGE_MAIL_ID_IS_INCORRECT'=>'Die Mail Adresse ist nicht korrekt. Bitte überprüfen...', + 'MESSAGE_ADD_USER_OR_CONTACT'=>'Fügen Sie Benutzer oder Personen hinzu...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' Mail erfolgreich versendet!', + + // Added for web mail post 4.0.1 release + 'LBL_FETCH_WEBMAIL'=>'Web Mail empfangen', + //Added for 4.2 Release -- CustomView + 'LBL_ALL'=>'Alle', + 'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Diese Person möchte keine Mail empfangen.', + 'LBL_WEBMAILS_TITLE'=>'WebMails', + 'LBL_EMAILS_TITLE'=>'E-Mails', + 'LBL_MAIL_CONNECT_ERROR_INFO'=>'Fehler bei der Verbindung zum Mailserver!
          Überprüfen Sie in Mein Konto ->Mailserver auflisten Ihr Mail-Konto', + // Added for 5.0.3 release + 'LBL_MAIL_CONNECT_ERROR'=>'Der Mail Server konnte nicht erreicht werden. Bitte überprüfen Sie Ihre Einstellungen für den Serverzugang', + 'IN_REPLY_TO_THE_MESSAGE' => 'Als Antwort zu der Nachricht von ', + 'LBL_CLICK_HERE' => 'klicken Sie hier ', + 'LBL_GOTO_EMAILS_MODULE' => ' um das E-Mail Modul direkt aufzurufen.', + 'LBL_NO_EMAILS'=>'Das Verzeichnis ist leer.', + 'LBL_MOVE_TO'=>'verschiebe zu ...', + 'LBL_DEL'=>'Lö ', + 'LABEL_FROM'=>'Von', + 'LBL_INFO'=>'Info', + 'LABEL_DATE'=>'Datum', + 'LBL_NO_IFRAMES_SUPPORTED'=>'Iframes werden nicht unterstützt', + 'LBL_EMAIL_ATTACHMENTS'=>'E-Mail Anhänge:', + 'LBL_ALLMAILS'=>'Alle Mails', + 'LBL_TO_USERS'=>'zu Benutzer', + 'LBL_TO_GROUPS'=>'zu Gruppen', + 'SUBJECT' => 'Betreff', + 'BODY' => 'Inhalt', + 'TO' => 'An:', + 'CC' => 'CC:', + 'BCC' => 'BCC:', + 'FROM' => 'Von:', + 'IN'=>'in', + 'ADD_FOLDER' => 'Erstelle Verzeichnis[X]', + //Added for 5.0.3 + 'LBL_LOADING_IMAGE' => 'Bild wird geladen', + 'LBL_ENABLE_IMAP_SUPPORT' => 'Sie müssen IMAP in php zulassen, um dieses Modul zu nutzen.', + + // Added/Updated for vtiger CRM 5.0.4 + 'LBL_CONFIGURE_MAIL_SETTINGS'=>'Bitte die Maileinstellungen konfigurieren.', + 'LBL_PLEASE'=>'Bitte', + 'LBL_HERE'=>'hier', + + // Added after 5.0.4 GA + 'LBL_FULL_EMAIL_VIEW'=>'komplette E-Mail Ansicht', + 'LBL_MESSAGE'=>'Nachricht', + 'LBL_MESSAGES'=>'Nachrichten', + + 'LBL_NO_ATTACHMENTS'=>'keine Dateien zum Download', + 'LBL_THERE_ARE'=>'Es gibt ', + 'LBL_ATTACHMENTS_TO_CHOOSE'=>' Anhänge zur Auswahl', + 'LBL_ATTACHMENTS'=>'Anhänge', + + 'LBL_LIST_COUNT'=>'Zeige', + + 'LBL_INSTEAD_OF_WEBMAILS_USE' => 'Statt Webmails, klicken Sie bitte hier, um zu verwenden', + 'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Bitte klicken Sie hier ', +); +?> \ No newline at end of file diff --git a/modules/Webmails/language/en_gb.lang.php b/modules/Webmails/language/en_gb.lang.php new file mode 100644 index 0000000..984d496 --- /dev/null +++ b/modules/Webmails/language/en_gb.lang.php @@ -0,0 +1,143 @@ + 'Email', + 'LBL_MODULE_TITLE' => 'Email: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Email Search', + 'LBL_LIST_FORM_TITLE' => 'Email List', + 'LBL_NEW_FORM_TITLE' => 'Track Email', + 'LBL_LIST_SUBJECT' => 'Subject', + 'LBL_LIST_CONTACT' => 'Contact', + 'LBL_LIST_RELATED_TO' => 'Related to', + 'LBL_LIST_DATE' => 'Date Sent', + 'LBL_LIST_TIME' => 'Time Sent', + 'LBL_MOVE_TO' => 'Move To...', + 'LBL_DELETE' => 'Delete', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the Organisation', + 'LBL_DATE_SENT' => 'Date Sent:', + 'LBL_SUBJECT' => 'Subject: ', + 'LBL_DATE_AND_TIME' => 'Date & Time Sent:', + 'LBL_DATE' => 'Date:', + 'LBL_TIME' => 'Time Sent:', + 'LBL_BODY' => 'Body:', + 'LBL_CONTACT_NAME' => 'Contact Name:', + 'LBL_EMAIL' => 'Email:', + 'LBL_COLON' => ':', + 'LBL_TO' => 'To: ', + 'LBL_CHK_MAIL' => 'Check Email', + 'LBL_COMPOSE' => 'Compose', + 'LBL_SETTINGS' => 'Incoming Mail Server Settings', + 'LBL_EMAIL_FOLDERS' => 'Email Folders', + 'LBL_INBOX' => 'Inbox', + 'LBL_SENT_MAILS' => 'Sent Emails', + 'LBL_TRASH' => 'Trash', + 'LBL_JUNK_MAILS' => 'Junk Emails', + 'LBL_TO_LEADS' => 'To Leads', + 'LBL_TO_CONTACTS' => 'To Contacts', + 'LBL_TO_ACCOUNTS' => 'To Organisations', + 'LBL_MY_MAILS' => 'My Emails', + 'LBL_QUAL_CONTACT' => 'Qualified Emails (As Contacts)', + 'LBL_MAILS' => 'Emails', + 'LBL_QUALIFY_BUTTON' => 'Qualify', + 'LBL_REPLY_BUTTON' => 'Reply', + 'LBL_FORWARD_BUTTON' => 'Forward', + 'LBL_DOWNLOAD_ATTCH_BUTTON' => 'Download Attachments', + 'LBL_FROM' => 'From: ', + 'LBL_CC' => 'Cc:', + 'LBL_REPLY_TO_SENDER' => 'Reply to Sender', + 'LBL_REPLY_ALL' => 'Reply All', + 'LBL_SHOW_HIDDEN' => 'Show Hidden Emails', + 'LBL_EXPUNGE_MAILBOX' => 'Trim Mailbox', + 'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this recipient from the email?', + 'LBL_INVITEE' => 'Recipients', + 'LBL_BULK_MAILS' => 'Bulk Emails', + 'LBL_ATTACHMENT' => 'Attachment', + 'LBL_UPLOAD' => 'Upload', + 'LBL_FILE_NAME' => 'File Name', + 'LBL_SEND' => 'Send', + 'LBL_EMAIL_TEMPLATES' => 'Email Templates', + 'LBL_TEMPLATE_NAME' => 'Template Name', + 'LBL_DESCRIPTION' => 'Description', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Email Templates List', + 'LBL_EMAIL_INFORMATION' => 'Email Information', + 'LBL_NEW_LEAD' => 'New Lead', + 'LBL_LEAD_TITLE' => 'Leads', + 'LBL_NEW_PRODUCT' => 'New Product', + 'LBL_PRODUCT_TITLE' => 'Products', + 'LBL_NEW_CONTACT' => 'New Contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_NEW_ACCOUNT' => 'New Organisation', + 'LBL_ACCOUNT_TITLE' => 'Organisations', + 'LBL_USER_TITLE' => 'Users', + 'LBL_NEW_USER' => 'New User', + 'LBL_TOOL_FORM_TITLE' => 'Email Tools', + 'Date & Time Sent' => 'Date & Time Sent', + 'Sales Enity Module' => 'Sales Enity Module', + 'Activtiy Type' => 'Activtiy Type', + 'Related To' => 'Related To', + 'Assigned To' => 'Assigned To', + 'Subject' => 'Subject', + 'Attachment' => 'Attachment', + 'Description' => 'Description', + 'Time Start' => 'Time Start', + 'Created Time' => 'Created Time', + 'Modified Time' => 'Modified Time', + 'MESSAGE_CHECK_MAIL_SERVER_NAME' => 'Please check the mail server name...', + 'MESSAGE_CHECK_MAIL_ID' => 'Please check the email address of "Assigned To" User...', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS' => 'Email has been sent to the following User(s) :', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => 'Email has been sent to the following Contact(s) :', + 'MESSAGE_MAIL_ID_IS_INCORRECT' => 'Email address is incorrect. Please Check this email address...', + 'MESSAGE_ADD_USER_OR_CONTACT' => 'Please add any User(s) or Contact(s)...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY' => 'email(s) sent successfully!', + 'LBL_FETCH_WEBMAIL' => 'Fetch Webmail', + 'LBL_ALL' => 'All', + 'MESSAGE_CONTACT_NOT_WANT_MAIL' => 'This Contact does not want to receive emails.', + 'LBL_WEBMAILS_TITLE' => 'Web Mails', + 'LBL_EMAILS_TITLE' => 'Email', + 'LBL_MAIL_CONNECT_ERROR_INFO' => 'Error connecting email server.
          Check in My Accounts->List Mail Server->List Mail Account', + 'LBL_MAIL_CONNECT_ERROR' => 'Could not connect to the email server. Please check the email server details', + 'IN_REPLY_TO_THE_MESSAGE' => 'In reply to the message sent by ', + 'LBL_CLICK_HERE' => 'Click Here ', + 'LBL_GOTO_EMAILS_MODULE' => 'go to Email module', + 'LBL_NO_EMAILS' => 'No email in this folder', + 'LBL_DEL' => 'Del ', + 'LABEL_FROM' => 'From', + 'LBL_INFO' => 'Info', + 'LABEL_DATE' => 'Date', + 'LBL_NO_IFRAMES_SUPPORTED' => 'No Iframes supported', + 'LBL_EMAIL_ATTACHMENTS' => 'Email Attachments:', + 'LBL_ALLMAILS' => 'Email', + 'LBL_TO_USERS' => 'To Users', + 'LBL_TO_GROUPS' => 'To Groups', + 'BODY' => 'Body:', + 'TO' => 'To:', + 'CC' => 'Cc:', + 'BCC' => 'Bcc:', + 'FROM' => 'From:', + 'IN' => 'in', + 'ADD_FOLDER' => 'Add Folder[X]', + 'LBL_LOADING_IMAGE' => 'Loading Image', + 'LBL_ENABLE_IMAP_SUPPORT' => 'Please enable IMAP support in PHP to run this module', + 'LBL_CONFIGURE_MAIL_SETTINGS' => 'Please configure your Email settings', + 'LBL_PLEASE' => 'Please', + 'LBL_HERE' => 'Here', + 'LBL_FULL_EMAIL_VIEW' => 'Full Email View', + 'LBL_MESSAGE' => 'Message', + 'LBL_MESSAGES' => 'Messages', + 'LBL_NO_ATTACHMENTS' => 'No files to download', + 'LBL_THERE_ARE' => 'There are ', + 'LBL_ATTACHMENTS_TO_CHOOSE' => 'attachment(s) to choose from', + 'LBL_ATTACHMENTS' => 'Attachments', + 'LBL_LIST_COUNT' => 'Showing', + 'LBL_INSTEAD_OF_WEBMAILS_USE' => 'Instead of Webmails, please click here to use', + 'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Please click here to go to ', +); +?> \ No newline at end of file diff --git a/modules/Webmails/language/en_us.lang.php b/modules/Webmails/language/en_us.lang.php new file mode 100644 index 0000000..12cdbc2 --- /dev/null +++ b/modules/Webmails/language/en_us.lang.php @@ -0,0 +1,185 @@ +'Email', +'LBL_MODULE_TITLE'=>'Email: Home', +'LBL_SEARCH_FORM_TITLE'=>'Email Search', +'LBL_LIST_FORM_TITLE'=>'Email List', +'LBL_NEW_FORM_TITLE'=>'Track Email', + +'LBL_LIST_SUBJECT'=>'Subject', +'LBL_LIST_CONTACT'=>'Contact', +'LBL_LIST_RELATED_TO'=>'Related to', +'LBL_LIST_DATE'=>'Date Sent', +'LBL_LIST_TIME'=>'Time Sent', +'LBL_MOVE_TO'=>'Move To', +'LBL_DELETE'=>'Delete', + +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the vtiger_account.", +'LBL_DATE_SENT'=>'Date Sent:', +'LBL_SUBJECT'=>'Subject :', +'LBL_DATE_AND_TIME'=>'Date & Time Sent:', +'LBL_DATE'=>'Date :', +'LBL_TIME'=>'Time Sent:', +'LBL_BODY'=>'Body:', +'LBL_CONTACT_NAME'=>' Contact Name: ', +'LBL_EMAIL'=>'Email:', +'LBL_COLON'=>':', +'LBL_TO'=>'To :', +'LBL_CHK_MAIL'=>'Check Mail', +'LBL_COMPOSE'=>'Compose', +'LBL_SETTINGS'=>'Incoming MailServer Settings', +'LBL_EMAIL_FOLDERS'=>'Email Folders', +'LBL_INBOX'=>'Inbox', +'LBL_SENT_MAILS'=>'Sent Mails', +'LBL_TRASH'=>'Trash', +'LBL_JUNK_MAILS'=>'Junk Mails', +'LBL_TO_LEADS'=>'To Leads', +'LBL_TO_CONTACTS'=>'To Contacts', +'LBL_TO_ACCOUNTS'=>'To Organizations', +'LBL_MY_MAILS'=>'My Mails', +'LBL_QUAL_CONTACT'=>'Qualified Mails (As Contacts)', +'LBL_MAILS'=>'Mails', +'LBL_QUALIFY_BUTTON'=>'Qualify', +'LBL_REPLY_BUTTON'=>'Reply', +'LBL_FORWARD_BUTTON'=>'Forward', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Download Attachments', +'LBL_FROM'=>'From :', +'LBL_CC'=>'cc :', +'LBL_REPLY_TO_SENDER'=>'Reply to Sender', +'LBL_REPLY_ALL'=>'Reply All', +'LBL_SHOW_HIDDEN'=>'Show Hidden Mails', +'LBL_EXPUNGE_MAILBOX'=>'Trim Mailbox', + +'NTC_REMOVE_INVITEE'=>'Are you sure you want to remove this recipient from the email?', +'LBL_INVITEE'=>'Recipients', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Bulk Mails', +'LBL_ATTACHMENT'=>'Attachment', +'LBL_UPLOAD'=>'Upload', +'LBL_FILE_NAME'=>'File Name', +'LBL_SEND'=>'Send', + +'LBL_EMAIL_TEMPLATES'=>'Email Templates', +'LBL_TEMPLATE_NAME'=>'Template Name', +'LBL_DESCRIPTION'=>'Description', +'LBL_EMAIL_TEMPLATES_LIST'=>'Email Templates List', +'LBL_EMAIL_INFORMATION'=>'Email Information', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'New Lead', +'LBL_LEAD_TITLE'=>'Leads', + +'LBL_NEW_PRODUCT'=>'New Product', +'LBL_PRODUCT_TITLE'=>'Products', +'LBL_NEW_CONTACT'=>'New Contact', +'LBL_CONTACT_TITLE'=>'Contacts', +'LBL_NEW_ACCOUNT'=>'New Organization', +'LBL_ACCOUNT_TITLE'=>'Organizations', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Users', +'LBL_NEW_USER'=>'New User', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Email Tools', +//Added for 4GA +'Date & Time Sent'=>'Date & Time Sent', +'Sales Enity Module'=>'Sales Enity Module', +'Activtiy Type'=>'Activtiy Type', +'Related To'=>'Related To', +'Assigned To'=>'Assigned To', +'Subject'=>'Subject', +'Attachment'=>'Attachment', +'Description'=>'Description', +'Time Start'=>'Time Start', +'Created Time'=>'Created Time', +'Modified Time'=>'Modified Time', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Please Check the Mail Server Name...', +'MESSAGE_CHECK_MAIL_ID'=>'Please Check the Email Id of "Assigned To" User...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'Mail has been sent to the following User(s) :', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'Mail has been sent to the following Contact(s) :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'Mail Id is incorrect. Please Check this Mail Id...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Please Add any User(s) or Contact(s)...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' Mail(s) sent successfully!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Fetch Web Mail', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'All', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'This Contact does not want to receive mails.', +'LBL_WEBMAILS_TITLE'=>'WebMails', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'Error connecting mail server!
          Check in My Accounts->List Mail Server -> List Mail Account', +// Added for 5.0.3 release +'LBL_MAIL_CONNECT_ERROR'=>'Could not connect to the mail server. Please check the mail server details', +'IN_REPLY_TO_THE_MESSAGE' => 'In reply to the message sent by ', +'LBL_CLICK_HERE' => 'Click Here ', +'LBL_GOTO_EMAILS_MODULE' => ' go to Email module', +'LBL_NO_EMAILS'=>'No Email In This Folder', +'LBL_MOVE_TO'=>'Move To...', +'LBL_DEL'=>'Del ', +'LABEL_FROM'=>'From', +'LBL_INFO'=>'Info', +'LABEL_DATE'=>'Date', +'LBL_NO_IFRAMES_SUPPORTED'=>'No Iframes supported', +'LBL_EMAIL_ATTACHMENTS'=>'Email Attachments:', +'LBL_ALLMAILS'=>'Email', +'LBL_TO_USERS'=>'To Users', +'LBL_TO_GROUPS'=>'To Groups', +'SUBJECT' => 'Subject', +'BODY' => 'Body', +'TO' => 'To:', +'CC' => 'CC:', +'BCC' => 'BCC:', +'FROM' => 'From:', +'IN'=>'in', +'ADD_FOLDER' => 'Add Folder[X]', +//Added for 5.0.3 +'LBL_LOADING_IMAGE' => 'Loading Image', +'LBL_ENABLE_IMAP_SUPPORT' => 'Please enable the IMAP support in php to run this module', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Please configure your mail settings', +'LBL_PLEASE'=>'Please', +'LBL_HERE'=>'Here', + +// Added after 5.0.4 GA +'LBL_FULL_EMAIL_VIEW'=>'Full Email View', +'LBL_MESSAGE'=>'Message', +'LBL_MESSAGES'=>'Messages', + +'LBL_NO_ATTACHMENTS'=>'No files to download', +'LBL_THERE_ARE'=>'There are ', +'LBL_ATTACHMENTS_TO_CHOOSE'=>' attachment(s) to choose from', +'LBL_ATTACHMENTS'=>'Attachments', + +'LBL_LIST_COUNT'=>'Showing', + +'LBL_INSTEAD_OF_WEBMAILS_USE' => 'Instead of Webmails, please click here to use', +'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Please click here to go to ', +); +?> \ No newline at end of file diff --git a/modules/Webmails/language/es_es.lang.php b/modules/Webmails/language/es_es.lang.php new file mode 100644 index 0000000..e184b89 --- /dev/null +++ b/modules/Webmails/language/es_es.lang.php @@ -0,0 +1,187 @@ +'Webmail', +'LBL_MODULE_TITLE'=>'Webmail: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Email', +'LBL_LIST_FORM_TITLE'=>'Listado de Email', +'LBL_NEW_FORM_TITLE'=>'Seguimiento de Correo', + +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_CONTACT'=>'Persona', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DATE'=>'Fecha de Envío', +'LBL_LIST_TIME'=>'Hora de Envío', +'LBL_MOVE_TO'=>'Mover A', +'LBL_DELETE'=>'Borrar', + +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +'LBL_DATE_SENT'=>'Fecha de Envío:', +'LBL_SUBJECT'=>'Asunto:', +'LBL_DATE_AND_TIME'=>'Fecha y Hora de Envío:', +'LBL_DATE'=>'Fecha de Envío:', +'LBL_TIME'=>'Hora de Envío:', +'LBL_BODY'=>'Cuerpo:', +'LBL_CONTACT_NAME'=>' Nombre: ', +'LBL_EMAIL'=>'Email:', +'LBL_COLON'=>':', +'LBL_TO'=>'Para :', +'LBL_CHK_MAIL'=>'Comprobar Correo', +'LBL_COMPOSE'=>'Redactar', +'LBL_SETTINGS'=>'Configuración', +'LBL_EMAIL_FOLDERS'=>'Carpetas de Email', +'LBL_INBOX'=>'Bandeja de Entrada', +'LBL_SENT_MAILS'=>'Emails Enviados', +'LBL_TRASH'=>'Papelera', +'LBL_JUNK_MAILS'=>'Eliminados', +'LBL_TO_LEADS'=>'A Pre-Contactos', +'LBL_TO_CONTACTS'=>'A Contactos', +'LBL_TO_ACCOUNTS'=>'A Cuentas', +'LBL_MY_MAILS'=>'Mis Correos', +'LBL_QUAL_CONTACT'=>'Emails Clasificados por Contactos', +'LBL_MAILS'=>'Correos', +'LBL_QUALIFY_BUTTON'=>'Clasificar', +'LBL_REPLY_BUTTON'=>'Responder', +'LBL_FORWARD_BUTTON'=>'Reenviar', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Descargar Adjuntos', +'LBL_FROM'=>'De: ', +'LBL_CC'=>'CC: ', +'LBL_REPLY_TO_SENDER'=>'Responder', +'LBL_REPLY_ALL'=>'Responder a Todos', +'LBL_SHOW_HIDDEN'=>'Mostrar Borrados', +'LBL_EXPUNGE_MAILBOX'=>'Borrar Mensajes', + +'NTC_REMOVE_INVITEE'=>'¿Está seguro de eliminar esta dirección de Email?', +'LBL_INVITEE'=>'Receptores', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Email en blanco', +'LBL_ATTACHMENT'=>'Adjunto', +'LBL_UPLOAD'=>'Subir', +'LBL_FILE_NAME'=>'Nombre de Archivo', +'LBL_SEND'=>'Enviado', + +'LBL_EMAIL_TEMPLATES'=>'Plantillas de Email', +'LBL_TEMPLATE_NAME'=>'Nombre de Plantilla', +'LBL_DESCRIPTION'=>'Descripción', +'LBL_EMAIL_TEMPLATES_LIST'=>'Lista de Plantillas de email', +'LBL_EMAIL_INFORMATION'=>'Información de Email', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Nuevo Pre-Contacto', +'LBL_LEAD_TITLE'=>'Pre-Contacto', + +'LBL_NEW_PRODUCT'=>'Nuevo Producto', +'LBL_PRODUCT_TITLE'=>'Productos', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', +'LBL_NEW_ACCOUNT'=>'Nueva Cuenta', +'LBL_ACCOUNT_TITLE'=>'Cuentas', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Usuarios', +'LBL_NEW_USER'=>'Nuevo Usuario', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Herramienta de Email', +//Added for 4GA +'Date & Time Sent'=>'Fecha y Hora de Envío', +'Sales Enity Module'=>'Módulo de Ventas', +'Activtiy Type'=>'Tipo de Actividad', +'Related To'=>'Relacionado con', +'Assigned To'=>'Asignado a', +'Subject'=>'Asunto', +'Attachment'=>'Adjunto', +'Description'=>'Descripción', +'Time Start'=>'Fecha de Inicio', +'Created Time'=>'Creada', +'Modified Time'=>'Modificada', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Por favor compruebe el nombre del servidor de mail...', +'MESSAGE_CHECK_MAIL_ID'=>'Por favor compruebe el Email del usuario "Asignado a"...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'El correo se ha enviado a los siguientes usuarios:', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'El correo se ha enviado a los siguientes contactos:', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'El Email es incorrecto. Compruebe el Email ...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Añada un Usuario o Contacto...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' ¡El Email se ha enviado correctamente!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Actualizar Correo', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Todos', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Este contacto no quiere recibir correos.', +'LBL_WEBMAILS_TITLE'=>'Email', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'¡Error conectando con el servidor de email!
          Compruebe en Configuración -> Lista de Servidores de Correo -> Lista de cuentas de correo', +// Added for 5.0.3 release +'LBL_MAIL_CONNECT_ERROR'=>'No se ha podido conectar al Servidor de Correo. Compruebe la configuración del Servidor ', +'IN_REPLY_TO_THE_MESSAGE' => 'En respuesta al mensaje enviado por', +'LBL_CLICK_HERE' => 'Pinche Aquí ', +'LBL_GOTO_EMAILS_MODULE' => ' para ir al módulo de Email', +'LBL_NO_EMAILS'=>'Carpeta vacía', +'LBL_MOVE_TO'=>'Mover a...', +'LBL_DEL'=>'Supr', +'LABEL_FROM'=>'De', +'LBL_INFO'=>'Info', +'LABEL_DATE'=>'Fecha', +'LBL_NO_IFRAMES_SUPPORTED'=>'Iframes no soportado', +'LBL_EMAIL_ATTACHMENTS'=>'Archivos adjuntos:', +'LBL_ALLMAILS'=>'Todos los Correos', +'LBL_TO_USERS'=>'A Usuarios', +'LBL_TO_GROUPS'=>'A Grupos', +'SUBJECT' => ' Asunto', +'BODY' => ' Cuerpo', +'TO' => ' Para:', +'CC' => ' CC:', +'BCC' => ' CCo:', +'FROM' => ' De:', +'IN'=>'en', +'ADD_FOLDER' => 'Añadir Carpeta [X]', +//Added for 5.0.3 +'LBL_LOADING_IMAGE' => 'Cargando Imagen', +'LBL_ENABLE_IMAP_SUPPORT' => 'Active el soporte IMAP en php para activar el módulo', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Por Favor establezca la configuración de su Email', +'LBL_PLEASE'=>'Por Favor', +'LBL_HERE'=>'Aquí', + +// Added after 5.0.4 GA +'LBL_FULL_EMAIL_VIEW'=>'Vista completa', +'LBL_MESSAGE'=>'Mensaje', +'LBL_MESSAGES'=>'Mensajes', + +'LBL_NO_ATTACHMENTS'=>'No hay ficheros adjuntos', +'LBL_THERE_ARE'=>'Hay ', +'LBL_ATTACHMENTS_TO_CHOOSE'=>' adjunto(s) para descargar', +'LBL_ATTACHMENTS'=>'Adjuntos', +'LBL_LIST_COUNT'=>'Mostrando', + +'LBL_INSTEAD_OF_WEBMAILS_USE' => 'En vez de Webmail, utiliza', +'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Haz click aquí para ir a ', +); +?> diff --git a/modules/Webmails/language/es_mx.lang.php b/modules/Webmails/language/es_mx.lang.php new file mode 100644 index 0000000..b79ad06 --- /dev/null +++ b/modules/Webmails/language/es_mx.lang.php @@ -0,0 +1,187 @@ +'Webmail', +'LBL_MODULE_TITLE'=>'Webmail: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Email', +'LBL_LIST_FORM_TITLE'=>'Listado de Email', +'LBL_NEW_FORM_TITLE'=>'Seguimiento de Correo', + +'LBL_LIST_SUBJECT'=>'Asunto', +'LBL_LIST_CONTACT'=>'Persona', +'LBL_LIST_RELATED_TO'=>'Relacionado con', +'LBL_LIST_DATE'=>'Fecha de Envío', +'LBL_LIST_TIME'=>'Hora de Envío', +'LBL_MOVE_TO'=>'Mover A', +'LBL_DELETE'=>'Borrar', + +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +'LBL_DATE_SENT'=>'Fecha de Envío:', +'LBL_SUBJECT'=>'Asunto:', +'LBL_DATE_AND_TIME'=>'Fecha y Hora de Envío:', +'LBL_DATE'=>'Fecha de Envío:', +'LBL_TIME'=>'Hora de Envío:', +'LBL_BODY'=>'Cuerpo:', +'LBL_CONTACT_NAME'=>' Nombre: ', +'LBL_EMAIL'=>'Email:', +'LBL_COLON'=>':', +'LBL_TO'=>'Para :', +'LBL_CHK_MAIL'=>'Comprobar Correo', +'LBL_COMPOSE'=>'Redactar', +'LBL_SETTINGS'=>'Configuración', +'LBL_EMAIL_FOLDERS'=>'Carpetas de Email', +'LBL_INBOX'=>'Bandeja de Entrada', +'LBL_SENT_MAILS'=>'Emails Enviados', +'LBL_TRASH'=>'Papelera', +'LBL_JUNK_MAILS'=>'Eliminados', +'LBL_TO_LEADS'=>'A Prospectos', +'LBL_TO_CONTACTS'=>'A Contactos', +'LBL_TO_ACCOUNTS'=>'A Cuentas', +'LBL_MY_MAILS'=>'Mis Correos', +'LBL_QUAL_CONTACT'=>'Emails Clasificados por Contactos', +'LBL_MAILS'=>'Correos', +'LBL_QUALIFY_BUTTON'=>'Clasificar', +'LBL_REPLY_BUTTON'=>'Responder', +'LBL_FORWARD_BUTTON'=>'Reenviar', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Descargar Adjuntos', +'LBL_FROM'=>'De: ', +'LBL_CC'=>'CC: ', +'LBL_REPLY_TO_SENDER'=>'Responder', +'LBL_REPLY_ALL'=>'Responder a Todos', +'LBL_SHOW_HIDDEN'=>'Mostrar Borrados', +'LBL_EXPUNGE_MAILBOX'=>'Borrar Mensajes', + +'NTC_REMOVE_INVITEE'=>'¿Está seguro de eliminar esta dirección de Email?', +'LBL_INVITEE'=>'Receptores', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Email en blanco', +'LBL_ATTACHMENT'=>'Adjunto', +'LBL_UPLOAD'=>'Subir', +'LBL_FILE_NAME'=>'Nombre de Archivo', +'LBL_SEND'=>'Enviado', + +'LBL_EMAIL_TEMPLATES'=>'Plantillas de Email', +'LBL_TEMPLATE_NAME'=>'Nombre de Plantilla', +'LBL_DESCRIPTION'=>'Descripción', +'LBL_EMAIL_TEMPLATES_LIST'=>'Lista de Plantillas de email', +'LBL_EMAIL_INFORMATION'=>'Información de Email', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Nuevo Prospecto', +'LBL_LEAD_TITLE'=>'Prospecto', + +'LBL_NEW_PRODUCT'=>'Nuevo Producto', +'LBL_PRODUCT_TITLE'=>'Productos', +'LBL_NEW_CONTACT'=>'Nuevo Contacto', +'LBL_CONTACT_TITLE'=>'Contactos', +'LBL_NEW_ACCOUNT'=>'Nueva Cuenta', +'LBL_ACCOUNT_TITLE'=>'Cuentas', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Usuarios', +'LBL_NEW_USER'=>'Nuevo Usuario', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Herramienta de Email', +//Added for 4GA +'Date & Time Sent'=>'Fecha y Hora de Envío', +'Sales Enity Module'=>'Módulo de Ventas', +'Activtiy Type'=>'Tipo de Actividad', +'Related To'=>'Relacionado con', +'Assigned To'=>'Asignado a', +'Subject'=>'Asunto', +'Attachment'=>'Adjunto', +'Description'=>'Descripción', +'Time Start'=>'Fecha de Inicio', +'Created Time'=>'Creada', +'Modified Time'=>'Modificada', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Por favor compruebe el nombre del servidor de mail...', +'MESSAGE_CHECK_MAIL_ID'=>'Por favor compruebe el Email del usuario "Asignado a"...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'El correo se ha enviado a los siguientes usuarios:', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'El correo se ha enviado a los siguientes contactos:', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'El Email es incorrecto. Compruebe el Email ...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Añada un Usuario o Contacto...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' ¡El Email se ha enviado correctamente!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Actualizar Correo', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Todos', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Este contacto no quiere recibir correos.', +'LBL_WEBMAILS_TITLE'=>'Email', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'¡Error conectando con el servidor de email!
          Compruebe en Configuración -> Lista de Servidores de Correo -> Lista de cuentas de correo', +// Added for 5.0.3 release +'LBL_MAIL_CONNECT_ERROR'=>'No se ha podido conectar al Servidor de Correo. Compruebe la configuración del Servidor ', +'IN_REPLY_TO_THE_MESSAGE' => 'En respuesta al mensaje enviado por', +'LBL_CLICK_HERE' => 'Pinche Aquí ', +'LBL_GOTO_EMAILS_MODULE' => ' para ir al módulo de Email', +'LBL_NO_EMAILS'=>'Carpeta vacía', +'LBL_MOVE_TO'=>'Mover a...', +'LBL_DEL'=>'Supr', +'LABEL_FROM'=>'De', +'LBL_INFO'=>'Info', +'LABEL_DATE'=>'Fecha', +'LBL_NO_IFRAMES_SUPPORTED'=>'Iframes no soportado', +'LBL_EMAIL_ATTACHMENTS'=>'Archivos adjuntos:', +'LBL_ALLMAILS'=>'Todos los Correos', +'LBL_TO_USERS'=>'A Usuarios', +'LBL_TO_GROUPS'=>'A Grupos', +'SUBJECT' => ' Asunto', +'BODY' => ' Cuerpo', +'TO' => ' Para:', +'CC' => ' CC:', +'BCC' => ' CCo:', +'FROM' => ' De:', +'IN'=>'en', +'ADD_FOLDER' => 'Agregar Carpeta [X]', +//Added for 5.0.3 +'LBL_LOADING_IMAGE' => 'Cargando Imagen', +'LBL_ENABLE_IMAP_SUPPORT' => 'Active el soporte IMAP en php para activar el módulo', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Por Favor establezca la configuración de su Email', +'LBL_PLEASE'=>'Por Favor', +'LBL_HERE'=>'Aquí', + +// Added after 5.0.4 GA +'LBL_FULL_EMAIL_VIEW'=>'Vista completa', +'LBL_MESSAGE'=>'Mensaje', +'LBL_MESSAGES'=>'Mensajes', + +'LBL_NO_ATTACHMENTS'=>'No hay archivos adjuntos', +'LBL_THERE_ARE'=>'Hay ', +'LBL_ATTACHMENTS_TO_CHOOSE'=>' adjunto(s) para descargar', +'LBL_ATTACHMENTS'=>'Adjuntos', +'LBL_LIST_COUNT'=>'Mostrando', + +'LBL_INSTEAD_OF_WEBMAILS_USE' => 'En vez de Webmail, utiliza', +'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Haz click aquí para ir a ', +); +?> diff --git a/modules/Webmails/language/fr_fr.lang.php b/modules/Webmails/language/fr_fr.lang.php new file mode 100644 index 0000000..6e53ec3 --- /dev/null +++ b/modules/Webmails/language/fr_fr.lang.php @@ -0,0 +1,147 @@ + 'Messagerie', + 'LBL_MODULE_TITLE' => 'Messagerie', + 'LBL_SEARCH_FORM_TITLE' => 'Recherche', + 'LBL_LIST_FORM_TITLE' => 'Liste', + 'LBL_NEW_FORM_TITLE' => 'Suivi Email', + 'LBL_LIST_SUBJECT' => 'Objet', + 'LBL_LIST_CONTACT' => 'Contact', + 'LBL_LIST_RELATED_TO' => 'Relatif à', + 'LBL_LIST_DATE' => 'Date d\'envoi', + 'LBL_LIST_TIME' => 'Heure d\'envoi', + 'LBL_MOVE_TO' => 'Déplacer vers...', + 'LBL_DELETE' => 'Supprimer', + 'ERR_DELETE_RECORD' => 'Un enregistrement doit être sélectionné pour être supprimer.', + 'LBL_DATE_SENT' => 'Date d\'envoi:', + 'LBL_SUBJECT' => 'Objet:', + 'LBL_DATE_AND_TIME' => 'Date & heure d\'envoi:', + 'LBL_DATE' => 'Date d\'envoi:', + 'LBL_TIME' => 'Heure d\'envoi:', + 'LBL_BODY' => 'Corps:', + 'LBL_CONTACT_NAME' => ' Contact: ', + 'LBL_EMAIL' => 'Email:', + 'LBL_COLON' => ':', + 'LBL_TO' => 'à :', + 'LBL_CHK_MAIL' => 'Vérifier le courrier', + 'LBL_COMPOSE' => 'Nouveau message', + 'LBL_SETTINGS' => 'Configuration', + 'LBL_EMAIL_FOLDERS' => 'Dossier', + 'LBL_INBOX' => 'Entrant', + 'LBL_SENT_MAILS' => 'Par type de destinataire', + 'LBL_TRASH' => 'Corbeille', + 'LBL_JUNK_MAILS' => 'Corbeille', + 'LBL_TO_LEADS' => 'Vers prospects', + 'LBL_TO_CONTACTS' => 'Vers contacts', + 'LBL_TO_ACCOUNTS' => 'Vers comptes', + 'LBL_MY_MAILS' => 'Explorateur des dossiers', + 'LBL_QUAL_CONTACT' => 'Emails qualifiés (Contacts)', + 'LBL_MAILS' => 'Mails', + 'LBL_QUALIFY_BUTTON' => 'Qualifier', + 'LBL_REPLY_BUTTON' => 'Répondre', + 'LBL_FORWARD_BUTTON' => 'Transférer', + 'LBL_DOWNLOAD_ATTCH_BUTTON' => 'Télécharger', + 'LBL_FROM' => 'de :', + 'LBL_CC' => 'CC :', + 'LBL_REPLY_TO_SENDER' => 'Répondre', + 'LBL_REPLY_ALL' => 'Répondre à tous', + 'LBL_SHOW_HIDDEN' => 'Afficher tout', + 'LBL_EXPUNGE_MAILBOX' => 'Vider les messages supprimés', + 'NTC_REMOVE_INVITEE' => 'êtes-vous certain de vouloir retirer ces destinataires du message ?', + 'LBL_INVITEE' => 'Destinataires', + 'LBL_BULK_MAILS' => 'Email de masse', + 'LBL_ATTACHMENT' => 'Pièces jointes', + 'LBL_UPLOAD' => 'Télécharger', + 'LBL_FILE_NAME' => 'Fichier', + 'LBL_SEND' => 'Envoi', + 'LBL_EMAIL_TEMPLATES' => 'Modèles de message', + 'LBL_TEMPLATE_NAME' => 'Nom modèle', + 'LBL_DESCRIPTION' => 'Description', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Liste modèle', + 'LBL_EMAIL_INFORMATION' => 'Information message', + 'LBL_NEW_LEAD' => 'Nouveau prospect', + 'LBL_LEAD_TITLE' => 'Prospect', + 'LBL_NEW_PRODUCT' => 'Nouveau produit', + 'LBL_PRODUCT_TITLE' => 'Produits', + 'LBL_NEW_CONTACT' => 'Nouveau contact', + 'LBL_CONTACT_TITLE' => 'Contacts', + 'LBL_NEW_ACCOUNT' => 'Nouveau compte', + 'LBL_ACCOUNT_TITLE' => 'Comptes', + 'LBL_USER_TITLE' => 'Collaborateur', + 'LBL_NEW_USER' => 'Nouveau collaborateur', + 'LBL_TOOL_FORM_TITLE' => 'Outils', + 'Date & Time Sent' => 'Date & heure d\'envoi', + 'Sales Enity Module' => 'Module de vente', + 'Activtiy Type' => 'Type d\'activité', + 'Related To' => 'Relatif à', + 'Assigned To' => 'Assigné à', + 'Subject' => 'Objet', + 'Attachment' => 'Pièce jointe', + 'Description' => 'Description', + 'Time Start' => 'Début', + 'Created Time' => 'Créé le', + 'Modified Time' => 'Modifié le', + 'MESSAGE_CHECK_MAIL_SERVER_NAME' => 'Veuillez vérifier le nom de votre serveur de messagerie...', + 'MESSAGE_CHECK_MAIL_ID' => 'Le collaborateur "Assigné à" ne semble pas avoir configuré sont adresse email...', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS' => 'Le message à été envoyé au(x) collaborateur(s) suivant(s):', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => 'Le message à été envoyé au(x) contact(s) suivant(s):', + 'MESSAGE_MAIL_ID_IS_INCORRECT' => 'Veuillez saisir une adresse email correcte...', + 'MESSAGE_ADD_USER_OR_CONTACT' => 'Veuillez sélectionner un collaborateur ou contact...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY' => ' Message(s) envoyé !', + 'LBL_FETCH_WEBMAIL' => 'Rapatrier', + 'LBL_ALL' => 'Tout', + 'MESSAGE_CONTACT_NOT_WANT_MAIL' => 'Ce contact ne désire pas être contacter par email.', + 'LBL_WEBMAILS_TITLE' => 'Messagerie', + 'LBL_EMAILS_TITLE' => 'Emails', + 'LBL_MAIL_CONNECT_ERROR_INFO' => 'Erreur de connexion au serveur de messagerie! + Veuillez vérifier vos paramètres dans la configuration messagerie', + 'LBL_MAIL_CONNECT_ERROR' => 'Connexion au serveur impossible. Veuillez vérifier votre configuration.', + 'IN_REPLY_TO_THE_MESSAGE' => 'En réponse au message envoyé par ', + 'LBL_CLICK_HERE' => 'Cliquez ici ', + 'LBL_GOTO_EMAILS_MODULE' => ' aller aux messages', + 'LBL_NO_EMAILS' => 'Aucun message dans ce dossier', + 'LBL_DEL' => 'Sup ', + 'LABEL_FROM' => 'De', + 'LBL_INFO' => 'Info', + 'LABEL_DATE' => 'Date', + 'LBL_NO_IFRAMES_SUPPORTED' => 'Iframe non supportés par votre navigateur', + 'LBL_EMAIL_ATTACHMENTS' => 'Pièces jointes:', + 'LBL_ALLMAILS' => 'Tous les messages', + 'LBL_TO_USERS' => 'Vers collaborateur', + 'LBL_TO_GROUPS' => 'Vers équipe', + 'SUBJECT' => 'dans l\'objet', + 'BODY' => 'dans le corp', + 'TO' => 'à:', + 'CC' => 'CC:', + 'BCC' => 'BCC:', + 'FROM' => 'Expéditeur:', + 'IN' => 'dans', + 'ADD_FOLDER' => 'Ajouter un dossier[X]', + 'LBL_LOADING_IMAGE' => 'Chargement de l\'image', + 'LBL_ENABLE_IMAP_SUPPORT' => 'Votre configuration de PHP doit supporter IMAP pour utiliser ce module', + 'LBL_CONFIGURE_MAIL_SETTINGS' => 'Merci de configurer vos paramètres Email', + 'LBL_PLEASE' => 'Merci', + 'LBL_HERE' => 'Ici', + 'LBL_FULL_EMAIL_VIEW'=>'Vue complète de l\'email', + 'LBL_MESSAGE'=>'Message', + 'LBL_MESSAGES'=>'Messages', + + 'LBL_NO_ATTACHMENTS'=>'Aucun fichier à télécharger', + 'LBL_THERE_ARE'=>'Il y a ', + 'LBL_ATTACHMENTS_TO_CHOOSE'=>' pièce(s) jointe(s) à choisir pour', + 'LBL_ATTACHMENTS'=>'Pièces jointes', + 'LBL_LIST_COUNT'=>'Affichage', + 'LBL_INSTEAD_OF_WEBMAILS_USE' => 'Au lieu du Webmails, Cliquez ici pour utiliser', + 'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Cliquez ici pour aller ', +); +$mod_list_strings = array ( +); +?> \ No newline at end of file diff --git a/modules/Webmails/language/hu_hu.lang.php b/modules/Webmails/language/hu_hu.lang.php new file mode 100644 index 0000000..e188237 --- /dev/null +++ b/modules/Webmails/language/hu_hu.lang.php @@ -0,0 +1,154 @@ + 'Email', + 'LBL_MODULE_TITLE' => 'Email: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Email Keresés', + 'LBL_LIST_FORM_TITLE' => 'Email Lista', + 'LBL_NEW_FORM_TITLE' => 'Email nyomkövetése', + 'LBL_LIST_SUBJECT' => 'Tárgy', + 'LBL_LIST_CONTACT' => 'Kapcsolat', + 'LBL_LIST_RELATED_TO' => 'Kapcsolódik', + 'LBL_LIST_DATE' => 'Küldés Dátuma', + 'LBL_LIST_TIME' => 'Küldés Ideje', + 'LBL_MOVE_TO' => 'Mozgat...', + 'LBL_DELETE' => 'Töröl', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a VTiger-fiók törléséhez', + 'LBL_DATE_SENT' => 'Küldés Dátuma:', + 'LBL_SUBJECT' => 'Tárgy :', + 'LBL_DATE_AND_TIME' => 'Küldés Dátuma és Ideje:', + 'LBL_DATE' => 'Dátum :', + 'LBL_TIME' => 'Küldés Ideje:', + 'LBL_BODY' => 'Törzs:', + 'LBL_CONTACT_NAME' => ' Kapcsolat neve: ', + 'LBL_EMAIL' => 'Email:', + 'LBL_COLON' => ':', + 'LBL_TO' => 'Címzett :', + 'LBL_CHK_MAIL' => 'Emailek Letöltése', + 'LBL_COMPOSE' => 'Email összeállítás', + 'LBL_SETTINGS' => 'Bejövő MailSzerver Beállítások', + 'LBL_EMAIL_FOLDERS' => 'Email Mappák', + 'LBL_INBOX' => 'Bejövő', + 'LBL_SENT_MAILS' => 'Elküldöttek', + 'LBL_TRASH' => 'Töröltek', + 'LBL_JUNK_MAILS' => 'Szemét Levelek', + 'LBL_TO_LEADS' => 'Jelölteknek', + 'LBL_TO_CONTACTS' => 'Kapcsolatoknak', + 'LBL_TO_ACCOUNTS' => 'Cégeknek', + 'LBL_MY_MAILS' => 'Leveleim', + 'LBL_QUAL_CONTACT' => 'Iktatott levelek (Kapcsolatként)', + 'LBL_MAILS' => 'Emailek', + 'LBL_QUALIFY_BUTTON' => 'Iktat', + 'LBL_REPLY_BUTTON' => 'Válasz', + 'LBL_FORWARD_BUTTON' => 'Továbbítás', + 'LBL_DOWNLOAD_ATTCH_BUTTON' => 'Mellékletek letöltése', + 'LBL_FROM' => 'Feladó :', + 'LBL_CC' => 'Másolat :', + 'LBL_REPLY_TO_SENDER' => 'Válasz a Feladónak', + 'LBL_REPLY_ALL' => 'Válasz Mindenkinek', + 'LBL_SHOW_HIDDEN' => 'A rejtett levelek mutatása', + 'LBL_EXPUNGE_MAILBOX' => 'A Levelesláda tömörítése', + 'NTC_REMOVE_INVITEE' => 'Biztos vagy abban, hogy törölni akarod ezt a Címzettet az emailből?', + 'LBL_INVITEE' => 'Címzettek', + 'LBL_BULK_MAILS' => 'Tömeges email', + 'LBL_ATTACHMENT' => 'Melléklet', + 'LBL_UPLOAD' => 'Feltöltés', + 'LBL_FILE_NAME' => 'Fájl neve', + 'LBL_SEND' => 'Küldés', + 'LBL_EMAIL_TEMPLATES' => 'Email Sablon', + 'LBL_TEMPLATE_NAME' => 'Sablon neve', + 'LBL_DESCRIPTION' => 'Megjegyzés', + 'LBL_EMAIL_TEMPLATES_LIST' => 'Email Sablon Lista', + 'LBL_EMAIL_INFORMATION' => 'Email Információ', + 'LBL_NEW_LEAD' => 'Új Jelölt', + 'LBL_LEAD_TITLE' => 'Jelöltek', + 'LBL_NEW_PRODUCT' => 'Új Termék', + 'LBL_PRODUCT_TITLE' => 'Termékek', + 'LBL_NEW_CONTACT' => 'Új Kapcsolat', + 'LBL_CONTACT_TITLE' => 'Kapcsolatok', + 'LBL_NEW_ACCOUNT' => 'Új Cég', + 'LBL_ACCOUNT_TITLE' => 'Cégek', + 'LBL_USER_TITLE' => 'Felhasználók', + 'LBL_NEW_USER' => 'Új Felhasználó', + 'LBL_TOOL_FORM_TITLE' => 'Email Eszközök', + 'Date & Time Sent' => 'Küldés Dátuma és Ideje', + 'Sales Enity Module' => 'Értékesítési Entitás Modul', + 'Activtiy Type' => 'Aktivitás Típus', + 'Related To' => 'Kapcsolódik', + 'Assigned To' => 'Felelős', + 'Subject' => 'Tárgy', + 'Attachment' => 'Melléklet', + 'Description' => 'Megjegyzés', + 'Time Start' => 'Kezdés Ideje', + 'Created Time' => 'Létrehozva', + 'Modified Time' => 'Módosítva', + 'MESSAGE_CHECK_MAIL_SERVER_NAME' => 'Kérjük, hogy ellenőrizd a Mail Szerver nevét...', + 'MESSAGE_CHECK_MAIL_ID' => 'Kérjük, hogy ellenőrizd a "Felelős" Felhasználó Email ID-jét...', + 'MESSAGE_MAIL_HAS_SENT_TO_USERS' => 'Az Emailt elküldtük a következő Felhasználó(k)nak :', + 'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS' => 'Az Emailt elküldtük a következő Kapcsolat(ok)nak :', + 'MESSAGE_MAIL_ID_IS_INCORRECT' => 'A Mail ID hibás. Kérjük, hogy ellenőrizd ezt a Mail ID-t...', + 'MESSAGE_ADD_USER_OR_CONTACT' => 'Adj meg bármilyen Felhasználó(ka)t vagy Kapcsolato(ka)t ...', + 'MESSAGE_MAIL_SENT_SUCCESSFULLY' => ' Az Email(eke)t sikeresen elküldtük!', + 'LBL_FETCH_WEBMAIL' => 'Fetch Web Mail', + 'LBL_ALL' => 'Minden', + 'MESSAGE_CONTACT_NOT_WANT_MAIL' => 'Ez a Kapcsolat nem óhajt emailt kapni.', + 'LBL_WEBMAILS_TITLE' => 'WebMails', + 'LBL_EMAILS_TITLE' => 'Email', + 'LBL_MAIL_CONNECT_ERROR_INFO' => 'Hiba a mail szerverhez kapcsolódás során!
          Ellenőrizd: Beállításaim -> Mail Szerverek Listája -> Email fiókok Listája', + 'LBL_MAIL_CONNECT_ERROR' => 'Nem tudtunk kapcsolódni a mail szerverhez. Kérjük, hogy ellenőrizd a mail szerver adatait', + 'IN_REPLY_TO_THE_MESSAGE' => 'Válasz üzenet küldve általa ', + 'LBL_CLICK_HERE' => 'Kattints ide ', + 'LBL_GOTO_EMAILS_MODULE' => ' menj az Email modulhoz', + 'LBL_NO_EMAILS' => 'Nincs Email ebben a mappában', + 'LBL_DEL' => 'Töröl ', + 'LABEL_FROM' => 'Küldő', + 'LBL_INFO' => 'Info', + 'LABEL_DATE' => 'Dátum', + 'LBL_NO_IFRAMES_SUPPORTED' => 'Az Iframe nincs támogatva', + 'LBL_EMAIL_ATTACHMENTS' => 'Email Mellékletek:', + 'LBL_ALLMAILS' => 'Email', + 'LBL_TO_USERS' => 'Felhasználóknak', + 'LBL_TO_GROUPS' => 'Csoportoknak', + 'BODY' => 'Levéltörzs', + 'TO' => 'Címzett:', + 'CC' => 'Másolat:', + 'BCC' => 'Rejtett másolat:', + 'FROM' => 'Küldő:', + 'IN' => 'in', + 'ADD_FOLDER' => 'Mappát Hozzáad[X]', + 'LBL_LOADING_IMAGE' => 'Kép betöltése', + 'LBL_ENABLE_IMAP_SUPPORT' => 'Kérjük, hogy engedélyezd az IMAP támogatást a php-ben, hogy használni tudd ezt a modult', + 'LBL_CONFIGURE_MAIL_SETTINGS' => 'Kérjük, hogy add meg az email beállításaidat', + 'LBL_PLEASE' => 'Kérjük', + 'LBL_HERE' => 'Itt', + 'LBL_FULL_EMAIL_VIEW' => 'Teljes Email Nézet', + 'LBL_MESSAGE' => 'Üzenet', + 'LBL_MESSAGES' => 'Üzenetek', + 'LBL_NO_ATTACHMENTS' => 'Nincs letölthető fájl', + 'LBL_THERE_ARE' => 'Itt van(nak) választható ', + 'LBL_ATTACHMENTS_TO_CHOOSE' => ' melléklet(ek)', + 'LBL_ATTACHMENTS' => 'Mellékletek', + 'LBL_LIST_COUNT' => 'Mutatjuk', + 'LBL_INSTEAD_OF_WEBMAILS_USE' => 'A Webmails helyett, kattints ide, ha használni akarod a ', + 'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Kattints ide, hogy menj a ', + 'LBL_PRINT_EMAIL_BUTTON' => 'Email nyomtatása' +); +?> \ No newline at end of file diff --git a/modules/Webmails/language/nl_nl.lang.php b/modules/Webmails/language/nl_nl.lang.php new file mode 100644 index 0000000..55fbc3d --- /dev/null +++ b/modules/Webmails/language/nl_nl.lang.php @@ -0,0 +1,200 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.4 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Webmails/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'E-mail', +'LBL_MODULE_TITLE'=>'E-mail: Home', +'LBL_SEARCH_FORM_TITLE'=>'Zoek e-mail', +'LBL_LIST_FORM_TITLE'=>'E-mail lijst', +'LBL_NEW_FORM_TITLE'=>'Zoek e-mail', + +'LBL_LIST_SUBJECT'=>'Onderwerp', +'LBL_LIST_CONTACT'=>'Contact', +'LBL_LIST_RELATED_TO'=>'Gerelateerd aan', +'LBL_LIST_DATE'=>'Verzenddatum', +'LBL_LIST_TIME'=>'Tijd van verzenden', +'LBL_MOVE_TO'=>'Verplaats naar', +'LBL_DELETE'=>'Verwijder', + +'ERR_DELETE_RECORD'=>"Een veld moet zijn weergegeven om vTiger_account te verwijderen.", +'LBL_DATE_SENT'=>'Verzenddatum:', +'LBL_SUBJECT'=>'Onderwerp:', +'LBL_DATE_AND_TIME'=>'Verzenddatum & verzendtijd:', +'LBL_DATE'=>'Datum :', +'LBL_TIME'=>'Verzendtijd:', +'LBL_BODY'=>'Body:', +'LBL_CONTACT_NAME'=>' Contactpersoon: ', +'LBL_EMAIL'=>'E-mail:', +'LBL_COLON'=>':', +'LBL_TO'=>'Naar :', +'LBL_CHK_MAIL'=>'Bekijk e-mail', +'LBL_COMPOSE'=>'Nieuwe e-mail', +'LBL_SETTINGS'=>'Inkomende mailserver instellingen', +'LBL_EMAIL_FOLDERS'=>'E-mail mappen', +'LBL_INBOX'=>'Postbus', +'LBL_SENT_MAILS'=>'Verstuurde e-mails', +'LBL_TRASH'=>'Prullenbak', +'LBL_JUNK_MAILS'=>'Spam', +'LBL_TO_LEADS'=>'Naar leads', +'LBL_TO_CONTACTS'=>'Naar contacten ', +'LBL_TO_ACCOUNTS'=>'Naar accounts', +'LBL_MY_MAILS'=>'Mijn e-mails', +'LBL_QUAL_CONTACT'=>'Kwalificeer e-mails (als kontakten)', +'LBL_MAILS'=>'E-mails', +'LBL_QUALIFY_BUTTON'=>'Kwalificeer', +'LBL_REPLY_BUTTON'=>'Antwoorden', +'LBL_FORWARD_BUTTON'=>'Doorsturen', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Bijlage(n) Downloaden', +'LBL_PRINT_EMAIL_BUTTON'=>'Printen', +'LBL_FROM'=>'Van:', +'LBL_CC'=>'cc :', +'LBL_REPLY_TO_SENDER'=>'Beantwoorden', +'LBL_REPLY_ALL'=>'Allen beantwoorden', +'LBL_SHOW_HIDDEN'=>'Laat verborgen e-mail zien', +'LBL_EXPUNGE_MAILBOX'=>'Postbus opschonen', + +'NTC_REMOVE_INVITEE'=>'Weet u zeker dat u deze ontvanger van de e-mail wilt verwijderen?', +'LBL_INVITEE'=>'Ontvanger', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Bulk e-mails', +'LBL_ATTACHMENT'=>'Bijlage', +'LBL_UPLOAD'=>'Upload', +'LBL_FILE_NAME'=>'Bestandsnaam', +'LBL_SEND'=>'Versturen', + +'LBL_EMAIL_TEMPLATES'=>'E-mail sjabloon', +'LBL_TEMPLATE_NAME'=>'Naam sjabloon', +'LBL_DESCRIPTION'=>'Omschrijving', +'LBL_EMAIL_TEMPLATES_LIST'=>'E-mail sjabloonlijst', +'LBL_EMAIL_INFORMATION'=>'E-mail Informatie', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Nieuwe lead', +'LBL_LEAD_TITLE'=>'leads', + +'LBL_NEW_PRODUCT'=>'Nieuwe Producten', +'LBL_PRODUCT_TITLE'=>'Producten', +'LBL_NEW_CONTACT'=>'Nieuwe contacten', +'LBL_CONTACT_TITLE'=>'Contacten', +'LBL_NEW_ACCOUNT'=>'Nieuwe account', +'LBL_ACCOUNT_TITLE'=>'Accounts', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Gebruikers', +'LBL_NEW_USER'=>'Nieuwe gebruiker', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'E-mail gereedschap', +//Added for 4GA +'Date & Time Sent'=>'Verzenddatum & Verzendtijd', +'Sales Enity Module'=>'Verkoop entiteit module', +'Activtiy Type'=>'Activiteits type', +'Related To'=>'Gerelateerd aan', +'Assigned To'=>'Toegewezen aan', +'Subject'=>'Onderwerp', +'Attachment'=>'Bijlage', +'Description'=>'Omschrijving', +'Time Start'=>'Starttijd', +'Created Time'=>'Tijd gemaakt', +'Modified Time'=>'Tijd veranderd', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'aub e-mail server naam nakijken...', +'MESSAGE_CHECK_MAIL_ID'=>'aub e-mail id nakijken van "Toegewezen aan" gebruiker...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'E-mail is verstuurd naar de volgende gebruikers:', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'E-mail is verstuurd naar de volgende contacten:', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'E-mailadres is niet correct. aub e-mailadres nakijken...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Voeg een gebruiker of contactpersoon toe...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' e-mail is succesvol verstuurd!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Web e-mail importeren', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Alles', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Deze contactpersoon wil geen e-mails ontvangen.', +'LBL_WEBMAILS_TITLE'=>'Web e-mails', +'LBL_EMAILS_TITLE'=>'E-mail', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'Foutmelding connectie met de e-mail server!
          Bekijk mijn accounts->lijst e-mail server -> Lijst e-mail account', +// Added for 5.0.3 release +'LBL_MAIL_CONNECT_ERROR'=>'Kan connectie met e-mail server niet maken. aub Bekijk de details van de e-mail server', +'IN_REPLY_TO_THE_MESSAGE' => 'In antwoord op uw bericht gestuurd door', +'LBL_CLICK_HERE' => 'Klik hier ', +'LBL_GOTO_EMAILS_MODULE' => ' Ga naar de e-mail module', +'LBL_NO_EMAILS'=>'Geen e-mail in deze map', +'LBL_MOVE_TO'=>'Verhuis naar', +'LBL_DEL'=>'Verwijder ', +'LABEL_FROM'=>'Van', +'LBL_INFO'=>'Info', +'LABEL_DATE'=>'Datum', +'LBL_NO_IFRAMES_SUPPORTED'=>'Ondersteund geen Iframes', +'LBL_EMAIL_ATTACHMENTS'=>'E-mail bijlage:', +'LBL_ALLMAILS'=>'E-mail', +'LBL_TO_USERS'=>'Aan gebruikers', +'LBL_TO_GROUPS'=>'Aan groepen', +'SUBJECT' => 'Onderwerp', +'BODY' => 'Omvang', +'TO' => 'Naar:', +'CC' => 'CC:', +'BCC' => 'BCC:', +'FROM' => 'Van:', +'IN'=>'In', +'ADD_FOLDER' => 'Map toevoegen[X]', +//Added for 5.0.3 +'LBL_LOADING_IMAGE' => 'Afbeelding laden', +'LBL_ENABLE_IMAP_SUPPORT' => 'aub Autoriseer IMAP support in php om deze module te draaien', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_CONFIGURE_MAIL_SETTINGS'=>'E-mail instellingen', +'LBL_PLEASE'=>'A.U.B.', +'LBL_HERE'=>'Hier', + +// Added after 5.0.4 GA +'LBL_FULL_EMAIL_VIEW'=>'Volledige e-mail', +'LBL_MESSAGE'=>'bericht', +'LBL_MESSAGES'=>'Berichten', + +'LBL_NO_ATTACHMENTS'=>'Er zijn geen bestanden om te downloaden', +'LBL_THERE_ARE'=>'Er zijn ', +'LBL_ATTACHMENTS_TO_CHOOSE'=>' bijlage(n)om uit te selecteren', +'LBL_ATTACHMENTS'=>'Bijlagen', +'LBL_LIST_COUNT'=>'Toon', + +'LBL_INSTEAD_OF_WEBMAILS_USE' => 'Klik hier om in plaats van Webmail te gebruiken: ', +'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Klik hier om te gaan naar ', + +); +?> diff --git a/modules/Webmails/language/pt_br.lang.php b/modules/Webmails/language/pt_br.lang.php new file mode 100644 index 0000000..de74bd5 --- /dev/null +++ b/modules/Webmails/language/pt_br.lang.php @@ -0,0 +1,185 @@ +'Email', +'LBL_MODULE_TITLE'=>'E-mail: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Procurar Email', +'LBL_LIST_FORM_TITLE'=>'Listar Email', +'LBL_NEW_FORM_TITLE'=>'Rastrear Email', + +'LBL_LIST_SUBJECT'=>'Assunto', +'LBL_LIST_CONTACT'=>'Contato', +'LBL_LIST_RELATED_TO'=>'Relacionado à', +'LBL_LIST_DATE'=>'Data Envio', +'LBL_LIST_TIME'=>'Hora Envio', +'LBL_MOVE_TO'=>'Mover Para', +'LBL_DELETE'=>'Apagar', + +'ERR_DELETE_RECORD'=>"Um registro deve ser especificado para apagar a Organização.", +'LBL_DATE_SENT'=>'Data Envio:', +'LBL_SUBJECT'=>'Assunto :', +'LBL_DATE_AND_TIME'=>'Data & Hora Envio:', +'LBL_DATE'=>'Data :', +'LBL_TIME'=>'Hora Envio:', +'LBL_BODY'=>'Corpo:', +'LBL_CONTACT_NAME'=>' Nome Contato: ', +'LBL_EMAIL'=>'E-mail:', +'LBL_COLON'=>':', +'LBL_TO'=>'Para :', +'LBL_CHK_MAIL'=>'Verificar', +'LBL_COMPOSE'=>'Nova', +'LBL_SETTINGS'=>'Configurar', +'LBL_EMAIL_FOLDERS'=>'Pastas Email', +'LBL_INBOX'=>'Caixa Entrada', +'LBL_SENT_MAILS'=>'Enviadas', +'LBL_TRASH'=>'Lixo', +'LBL_JUNK_MAILS'=>'Lixo', +'LBL_TO_LEADS'=>'Para Leads', +'LBL_TO_CONTACTS'=>'Para Contatos', +'LBL_TO_ACCOUNTS'=>'Para Organizações', +'LBL_MY_MAILS'=>'Meus E-mails', +'LBL_QUAL_CONTACT'=>'Mensagens Qualificadas (Como Contatos)', +'LBL_MAILS'=>'Mensagens', +'LBL_QUALIFY_BUTTON'=>'Qualificar', +'LBL_REPLY_BUTTON'=>'Responder', +'LBL_FORWARD_BUTTON'=>'Reenviar', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'Download Anexos', +'LBL_FROM'=>'De :', +'LBL_CC'=>'cc :', +'LBL_REPLY_TO_SENDER'=>'Responder para Remetente', +'LBL_REPLY_ALL'=>'Responder para Todos', +'LBL_SHOW_HIDDEN'=>'Mostrar Ocultos', +'LBL_EXPUNGE_MAILBOX'=>'Eliminar Caixa Correio', + +'NTC_REMOVE_INVITEE'=>'Você tem certeza que deseja remover este destinatário?', +'LBL_INVITEE'=>'Destinatários', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'Email em massa', +'LBL_ATTACHMENT'=>'Anexo', +'LBL_UPLOAD'=>'Transferir', +'LBL_FILE_NAME'=>'Nome Arquivo', +'LBL_SEND'=>'Enviar', + +'LBL_EMAIL_TEMPLATES'=>'Modelo E-mail', +'LBL_TEMPLATE_NAME'=>'Nome Modelo', +'LBL_DESCRIPTION'=>'Descrição', +'LBL_EMAIL_TEMPLATES_LIST'=>'Lista de Modelo Email', +'LBL_EMAIL_INFORMATION'=>'Informação E-mail', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'Novo Lead', +'LBL_LEAD_TITLE'=>'Leads', + +'LBL_NEW_PRODUCT'=>'Novo Produto', +'LBL_PRODUCT_TITLE'=>'Produtos', +'LBL_NEW_CONTACT'=>'Novo Contato', +'LBL_CONTACT_TITLE'=>'Contatos', +'LBL_NEW_ACCOUNT'=>'Nova Organização', +'LBL_ACCOUNT_TITLE'=>'Organizações', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'Usuários', +'LBL_NEW_USER'=>'Novo Usuário', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'Ferramentas Email', +//Added for 4GA +'Date & Time Sent'=>'Data & Hora Envio', +'Sales Enity Module'=>'Módulo Vendas', +'Activtiy Type'=>'Tipo Atividade', +'Related To'=>'Relacionado à', +'Assigned To'=>'Responsável', +'Subject'=>'Assunto', +'Attachment'=>'Anexo', +'Description'=>'Descrição', +'Time Start'=>'Hora Início', +'Created Time'=>'Hora Criação', +'Modified Time'=>'Hora Modificação', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'Por favor verifique o nome do Servidor de Correio...', +'MESSAGE_CHECK_MAIL_ID'=>'Por favor, verifique o ID do Email do Destinatário...', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'O Email foi enviado para o seguinte(s) Usuário(s):', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'O Email foi enviado para os seguinte(s) Contato(s) :', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'O ID da Mensagem está incorreto. Por favor verifique o ID da Mensagem...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'Por favor adicionar qualquer Usuário(s) ou Contato(s)...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>' E-mail(s) enviado(s) com sucesso!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'Receber E-mail', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'Todos', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'Este Contato não deseja receber e-mails.', +'LBL_WEBMAILS_TITLE'=>'WebMails', +'LBL_EMAILS_TITLE'=>'Email', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'Erro conectando Servidor de Mensagem!
          Verifique em Minhas Organizações->Lista Servidor Mensagem-> Lista Organização Correio', +// Added for 5.0.3 release +'LBL_MAIL_CONNECT_ERROR'=>'Não é possível conectar ao Servidor de Mensagem. Por favor, verifique os detalhes do Servidor de Mensagem', +'IN_REPLY_TO_THE_MESSAGE' => 'Em resposta à mensagem enviada por', +'LBL_CLICK_HERE' => 'Clique Aqui', +'LBL_GOTO_EMAILS_MODULE' => ' e vá para o Módulo Emails.', +'LBL_NO_EMAILS'=>'Nenhum Email nesta Pasta', +'LBL_MOVE_TO'=>'Mover para...', +'LBL_DEL'=>'Apagar ', +'LABEL_FROM'=>'De', +'LBL_INFO'=>'Informações', +'LABEL_DATE'=>'Data', +'LBL_NO_IFRAMES_SUPPORTED'=>'Não suporta Iframes', +'LBL_EMAIL_ATTACHMENTS'=>'Anexos Email', +'LBL_ALLMAILS'=>'Todos E-mails', +'LBL_TO_USERS'=>'Para Usuários', +'LBL_TO_GROUPS'=>'Para Grupos', +'SUBJECT' => 'Assunto', +'BODY' => 'Corpo', +'TO' => 'Para:', +'CC' => 'CC:', +'BCC' => 'BCC:', +'FROM' => 'De:', +'IN'=>'em', +'ADD_FOLDER' => 'Adicionar Pasta[X]', +//Added for 5.0.3 +'LBL_LOADING_IMAGE' => 'Carregando Imagem', +'LBL_ENABLE_IMAP_SUPPORT' => 'Por favor, habilite o suporte a IMAP no php para executar este Múdulo', + +// Added/Updated for vtiger CRM 5.0.4 +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Por favor, verifique as configurações do seu email', +'LBL_PLEASE'=>'Por favor', +'LBL_HERE'=>'aqui', + +// Added after 5.0.4 GA +'LBL_FULL_EMAIL_VIEW'=>'Visualizar Email Completo', +'LBL_MESSAGE'=>'Mensagem', +'LBL_MESSAGES'=>'Mensagens', + +'LBL_NO_ATTACHMENTS'=>'Nenhum arquivo para download', +'LBL_THERE_ARE'=>'Existem ', +'LBL_ATTACHMENTS_TO_CHOOSE'=>' anexo(s) para escolher de', +'LBL_ATTACHMENTS'=>'Anexos', + +'LBL_LIST_COUNT'=>'Mostrar', + +'LBL_INSTEAD_OF_WEBMAILS_USE' => 'Ao invés de Webmails, por favor, clique aqui para usar', +'LBL_PLEASE_CLICK_HERE_TO_GO_TO' => 'Por favor, clique aqui para ir para', +); +?> diff --git a/modules/Webmails/language/zh_cn.lang.php b/modules/Webmails/language/zh_cn.lang.php new file mode 100644 index 0000000..86a1593 --- /dev/null +++ b/modules/Webmails/language/zh_cn.lang.php @@ -0,0 +1,187 @@ +'WebMail', +'LBL_MODULE_TITLE'=>'WebMail: 首页', +'LBL_SEARCH_FORM_TITLE'=>'查找Email', +'LBL_LIST_FORM_TITLE'=>'Email列表', +'LBL_NEW_FORM_TITLE'=>'追踪Email', + +'LBL_LIST_SUBJECT'=>'主题', +'LBL_LIST_CONTACT'=>'联系人', +'LBL_LIST_RELATED_TO'=>'相关对象', +'LBL_LIST_DATE'=>'发送日期', +'LBL_LIST_TIME'=>'发送时间', +'LBL_MOVE_TO'=>'移动', +'LBL_DELETE'=>'删除', + +'ERR_DELETE_RECORD'=>'必须指定记录编号才能删除客户.', +'LBL_DATE_SENT'=>'发送日期:', +'LBL_SUBJECT'=>'主题:', +'LBL_DATE_AND_TIME'=>'发送日期与时间:', +'LBL_DATE'=>'发送日期:', +'LBL_TIME'=>'发送时间:', +'LBL_BODY'=>'内容:', +'LBL_CONTACT_NAME'=>'联系人:', +'LBL_EMAIL'=>'Email:', +'LBL_COLON'=>':', +'LBL_TO'=>'收件人:', +'LBL_CHK_MAIL'=>'检查邮件', +'LBL_COMPOSE'=>'撰写', +'LBL_SETTINGS'=>'设置', +'LBL_EMAIL_FOLDERS'=>'邮件文件夹', +'LBL_INBOX'=>'收件箱', +'LBL_SENT_MAILS'=>'发送备份', +'LBL_TRASH'=>'垃圾箱', +'LBL_JUNK_MAILS'=>'垃圾邮件', +'LBL_TO_LEADS'=>'潜在客户', +'LBL_TO_CONTACTS'=>'联系人', +'LBL_TO_ACCOUNTS'=>'客户', +'LBL_MY_MAILS'=>'我的邮件', +'LBL_QUAL_CONTACT'=>'处理过的邮件(联系人)', +'LBL_MAILS'=>'邮件', +'LBL_QUALIFY_BUTTON'=>'转换', +'LBL_REPLY_BUTTON'=>'回复', +'LBL_FORWARD_BUTTON'=>'转发', +'LBL_DOWNLOAD_ATTCH_BUTTON'=>'下载附件', +'LBL_FROM'=>'发件人:', +'LBL_CC'=>'抄送:', +'LBL_REPLY_TO_SENDER'=>'回复发送人', +'LBL_REPLY_ALL'=>'全部回复', +'LBL_SHOW_HIDDEN'=>'显示隐藏', +'LBL_EXPUNGE_MAILBOX'=>'删除信件', + +'NTC_REMOVE_INVITEE'=>'您确定要从信件中移除这个收件人?', +'LBL_INVITEE'=>'收件人', + +// Added Fields +// Contacts-SubPanelViewContactsAndUsers.php +'LBL_BULK_MAILS'=>'批量邮件', +'LBL_ATTACHMENT'=>'附件', +'LBL_UPLOAD'=>'上传', +'LBL_FILE_NAME'=>'文件名', +'LBL_SEND'=>'发送', + +'LBL_EMAIL_TEMPLATES'=>'Email模版', +'LBL_TEMPLATE_NAME'=>'模版名称', +'LBL_DESCRIPTION'=>'描述', +'LBL_EMAIL_TEMPLATES_LIST'=>'Email模版列表', +'LBL_EMAIL_INFORMATION'=>'Email信息', + + + + +//for v4 release added +'LBL_NEW_LEAD'=>'新增潜在客户', +'LBL_LEAD_TITLE'=>'潜在客户', + +'LBL_NEW_PRODUCT'=>'新增产品', +'LBL_PRODUCT_TITLE'=>'产品', +'LBL_NEW_CONTACT'=>'新增联系人', +'LBL_CONTACT_TITLE'=>'联系人', +'LBL_NEW_ACCOUNT'=>'新增客户', +'LBL_ACCOUNT_TITLE'=>'客户', + +// Added vtiger_fields after vtiger4 - Beta +'LBL_USER_TITLE'=>'用户', +'LBL_NEW_USER'=>'新增用户', + +// Added for 4 GA +'LBL_TOOL_FORM_TITLE'=>'邮件工具', +//Added for 4GA +'Date & Time Sent'=>'发送日期与时间', +'Sales Enity Module'=>'销售实体模块', +'Activtiy Type'=>'活动类型', +'Related To'=>'相关对象', +'Assigned To'=>'负责人', +'Subject'=>'主题', +'Attachment'=>'附件', +'Description'=>'描述', +'Time Start'=>'发送时间', +'Created Time'=>'创建时间', +'Modified Time'=>'修改时间', + +'MESSAGE_CHECK_MAIL_SERVER_NAME'=>'请检查邮件服务器名称', +'MESSAGE_CHECK_MAIL_ID'=>'请检查邮件编号', +'MESSAGE_MAIL_HAS_SENT_TO_USERS'=>'邮件已经发送到以下用户:', +'MESSAGE_MAIL_HAS_SENT_TO_CONTACTS'=>'邮件已经发送到以下联系人:', +'MESSAGE_MAIL_ID_IS_INCORRECT'=>'Email地址不对,请检查Email地址...', +'MESSAGE_ADD_USER_OR_CONTACT'=>'请添加用户或联系人...', +'MESSAGE_MAIL_SENT_SUCCESSFULLY'=>'邮件发送成功!', + +// Added for web mail post 4.0.1 release +'LBL_FETCH_WEBMAIL'=>'获取WebMail', +//Added for 4.2 Release -- CustomView +'LBL_ALL'=>'全部', +'MESSAGE_CONTACT_NOT_WANT_MAIL'=>'这个联系人不希望收到邮件打扰。', +'LBL_WEBMAILS_TITLE'=>'网页邮件', +'LBL_EMAILS_TITLE'=>'电子邮件', +'LBL_MAIL_CONNECT_ERROR_INFO'=>'邮件服务器联机失败!
          检查我的账号->邮件服务器列表 -> 账号列表', +// Added for 5.0.3 release +'LBL_MAIL_CONNECT_ERROR'=>'WebMail 邮件服务器连接失败,请检查接收邮件服务器的配置:', +'IN_REPLY_TO_THE_MESSAGE'=>'回复发出的信息 ', +'LBL_CLICK_HERE'=>'点击这里 ', +'LBL_GOTO_EMAILS_MODULE'=>' 转到 E-Mail 模块', +'LBL_NO_EMAILS'=>'文件夹没有邮件', +'LBL_MOVE_TO'=>'转移...', +'LBL_DEL'=>'删除 ', +'LABEL_FROM'=>'来自', +'LBL_INFO'=>'信息', +'LABEL_DATE'=>'日期', +'LBL_NO_IFRAMES_SUPPORTED'=>'没有隐藏支持', +'LBL_EMAIL_ATTACHMENTS'=>'邮件附件:', +'LBL_ALLMAILS'=>'邮件', +'LBL_TO_USERS'=>'至用户', +'LBL_TO_GROUPS'=>'至部门', +'SUBJECT'=>'提交', +'BODY'=>'正文', +'TO'=>'To:', +'CC'=>'抄送:', +'BCC'=>'密件抄送:', +'FROM'=>'来自:', +'IN'=>'in', +'ADD_FOLDER'=>'添加文件夹[X]', +//Added for 5.0.3 +'LBL_LOADING_IMAGE'=>'请稍候。。。', +'LBL_ENABLE_IMAP_SUPPORT'=>'请在PHP里开通IMAP模块', +'LBL_CONFIGURE_MAIL_SETTINGS'=>'请配置你的邮件设置', +// Added/Updated for vtiger CRM 5.0.4 +'LBL_CONFIGURE_MAIL_SETTINGS'=>'Please configure your mail settings', +'LBL_PLEASE'=>'请', +'LBL_HERE'=>'Here', + +// Added after 5.0.4 GA +'LBL_FULL_EMAIL_VIEW'=>'Full Email View', +'LBL_MESSAGE'=>'Message', +'LBL_MESSAGES'=>'Messages', + +'LBL_NO_ATTACHMENTS'=>'No files to download', +'LBL_THERE_ARE'=>'There are ', +'LBL_ATTACHMENTS_TO_CHOOSE'=>' attachment(s) to choose from', +'LBL_ATTACHMENTS'=>'Attachments', + +'LBL_LIST_COUNT'=>'Showing', + +); +?> \ No newline at end of file diff --git a/modules/Webmails/webmails.js b/modules/Webmails/webmails.js new file mode 100644 index 0000000..66d901b --- /dev/null +++ b/modules/Webmails/webmails.js @@ -0,0 +1,710 @@ +/********************************************************************************* + ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + * + ********************************************************************************/ +function load_webmail(mid,hasAttachment) { + var node = $("row_"+mid); + preview_id = mid; + if(typeof($('fnt_subject_'+mid)) != "undefined" && $('fnt_subject_'+mid).color=="green") + { + $('fnt_subject_'+mid).color=""; + $('fnt_date_'+mid).color=""; + $('fnt_from_'+mid).color=""; + + } + if(node.className == "mailSelected") { + var unread = parseInt($(mailbox+"_unread").innerHTML); + if(unread != 0) + { + var curUnread; + curUnread = unread -1; + if(curUnread == 0) + $(mailbox+"_count").style.display="none"; + else + $(mailbox+"_unread").innerHTML = curUnread; + } + + + $("unread_img_"+mid).removeChild($("unread_img_"+mid).firstChild); + $("unread_img_"+mid).appendChild(Builder.node('a', + {href: 'javascript:;', onclick: 'OpenComposer('+mid+',\'reply\')'}, + [Builder.node('img',{src: 'themes/images/openmail.gif', border: '0', width: '12', height: '12'})] + )); + } + node.className='read_email'; + //Fix for webmails body display in IE - dartagnanlaf + /* + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Webmails&action=body&mailid=' + mid + '&mailbox='+mailbox, + onComplete: function(response) { + document.getElementById("body_area").innerHTML=response.responseText; + } + } + ); + */ + + oiframe = $("email_description"); + oiframe.src = 'index.php?module=Webmails&action=body&theme='+theme+'&mailid='+mid+'&mailbox='+mailbox; + //$("body_area").appendChild(Builder.node('iframe',{src: 'index.php?module=Webmails&action=body&mailid='+mid+'&mailbox='+mailbox, width: '100%', height: '210', frameborder: '0'},'You must enable iframes')); + + tmp = document.getElementsByClassName("previewWindow"); + for(var i=0;i 0) + { + $("status").style.display="block"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Webmails&action=WebmailsAjax&mailbox='+mailbox+'&start='+start+'&command=move_msg&ajax=true&mailid='+nid.join(":")+'&mvbox='+mvmbox, + onComplete: function(t) { + sh = $("show_msg"); + var leftSide = findPosX(sh); + var topSide = findPosY(sh); + sh.style.left= leftSide + 400+'px'; + sh.style.top= topSide + 350 +'px'; + sh.innerHTML = "Moving mail(s) from "+mailbox+" folder to "+mvmbox+" folder"; + sh.style.display = "block"; + sh.classname = "delete_email"; + new Effect.Fade(sh,{queue: {position: 'end', scope: 'effect'},duration: '50'}); + for(i=0;i0;i--) { + if(els[i].type == "checkbox" && els[i].name.indexOf("_")) { + if(els[i].checked) { + var nid = els[i].name.substr((els[i].name.indexOf("_")+1),els[i].name.length); + var mvmbox = $("mailbox_select").value; + var row = $("row_"+nid); + new Effect.Fade(row,{queue: {position: 'end', scope: 'effect'},duration: '0.5'}); + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Webmails&action=WebmailsAjax&file=ListView&mailbox='+gCurrentFolder+'&command=move_msg&ajax=true&mailid='+nid+'&mvbox='+mvmbox, + onComplete: function(t) { + //alert(t.responseText); + } + } + ); + } + } + } + $('mailbox_select').selectedIndex=0; + //runEmailCommand('expunge',''); + $("status").style.display="none"; +}*/ +function search_emails() { + // TODO: find a way to search in degraded functionality mode. + var search_query = $("search_input").value; + var search_type = $("search_type").value; + window.location = "index.php?module=Webmails&action=index&search=true&search_type="+search_type+"&search_input="+search_query+'&mailbox='+mailbox; +} +function runEmailCommand(com,id) { + command=com; + id=id; + gselected_mail = ''; + if(com == 'delete_msg') + { + if(!confirm(alert_arr.DELETE+" "+alert_arr.MAIL+" ?")) + return; + } + if(com=="reload") + var file="ListViewAjax"; + else + var file=""; + + if(move_mail == 1){ + var qry_str = "&mvbox="+mvmbox; + move_mail = 0; + } + else + qry_str = ""; + + $("status").style.display="block"; + new Ajax.Request( + 'index.php', + {queue: {position: 'end', scope: 'command'}, + method: 'post', + postBody: 'module=Webmails&action=WebmailsAjax&start='+start+'&command='+command+'&mailid='+id+'&file='+file+'&mailbox='+mailbox+qry_str+'&search_type='+$("search_type").value+'&search_input='+$("search_input").value, + onComplete: function(t) { + resp = t.responseText; + id=resp; + if(resp.match(/ajax failed/)) {return;} + switch(command) { + case 'reload': + $("rssScroll").innerHTML = resp; + var unread_count = parseInt($(mailbox+"_tempcount").innerHTML); + if(unread_count > 0) { + $(mailbox+"_unread").innerHTML = unread_count; + } + else{ + $(mailbox+"_count").innerHTML = ""; + } + $("nav").innerHTML = $("navTemp").innerHTML; + $("box_list").innerHTML = $("temp_boxlist").innerHTML; + $("move_pane").innerHTML = $("temp_movepane").innerHTML; + $("temp_boxlist").innerHTML = ""; + $("temp_movepane").innerHTML = ""; + $("navTemp").innerHTML = ''; + $(mailbox+"_tempcount").innerHTML = ""; + break; + case 'expunge': + // NOTE: we either have to reload the page or count up from the messages that + // are deleted and moved or we introduce a bug from invalid mail ids + //window.location = window.location; + start = resp; + runEmailCommand("reload",0); + break; + case 'delete_multi_msg': + var ids; + eval(resp); + var rows = ids.split(":"); + for(i=0;i"; + $("ndeleted_date_"+id).innerHTML = ""+$("ndeleted_date_"+id).innerHTML+""; + $("ndeleted_from_"+id).innerHTML = ""+$("ndeleted_from_"+id).innerHTML+""; + }, + function() { + $("deleted_subject_"+id).innerHTML = ""+$("deleted_subject_"+id).innerHTML+""; + $("deleted_date_"+id).innerHTML = ""+$("deleted_date_"+id).innerHTML+""; + $("deleted_from_"+id).innerHTML = ""+$("deleted_from_"+id).innerHTML+""; + } + ); + + try { + $("del_link_"+id).innerHTML = 'del'; + + new Effect.Fade(row,{queue: {position: 'end', scope: 'effect'},duration: '0.5'}); + tmp = document.getElementsByClassName("previewWindow"); + // tmp[0].style.visibility="hidden"; + }catch(g){} + if(preview_id == id){ + // alert(preview_id + id); + $("preview1").style.visibility="hidden"; + $("preview2").style.visibility="hidden"; + } + /*for(var i=0;i"; + $("ndeleted_date_"+id).innerHTML = ""+$("ndeleted_date_"+id).innerHTML+""; + $("ndeleted_from_"+id).innerHTML = ""+$("ndeleted_from_"+id).innerHTML+""; + }, + function() { + $("deleted_subject_"+id).innerHTML = ""+$("deleted_subject_"+id).innerHTML+""; + $("deleted_date_"+id).innerHTML = ""+$("deleted_date_"+id).innerHTML+""; + $("deleted_from_"+id).innerHTML = ""+$("deleted_from_"+id).innerHTML+""; + } + ); + + $("del_link_"+id).innerHTML = 'del'; + new Effect.Fade(row,{queue: {position: 'end', scope: 'effect'},duration: '1.0'}); + } + + + if(preview_id == id){ + // alert(preview_id + id); + $("preview1").style.visibility="hidden"; + $("preview2").style.visibility="hidden"; + } + + runEmailCommand("reload",0); + break; + case 'undelete_msg': + id=resp; + var node = $("row_"+id); + node.className=''; + node.style.display = ''; + var newhtml = remove(remove(node.innerHTML,''),''); + node.innerHTML=newhtml; + $("del_link_"+id).innerHTML = 'del'; + $("status").style.display="none"; + break; + case 'clear_flag': + var nm = "clear_td_"+id; + var el = $(nm); + var tmp = el.innerHTML; + el.innerHTML =''; + el.id = "set_td_"+id; + break; + case 'set_flag': + var nm = "set_td_"+id; + var el = $(nm); + var tmp = el.innerHTML; + el.innerHTML =''; + el.id = "clear_td_"+id; + break; + + } + $("status").style.display="none"; + } + } + ); +} +function cal_navigation(box,page){ + start = page; + mailbox = box; + runEmailCommand("reload",0); +} +function remove(s, t) { + /* + ** Remove all occurrences of a token in a string + ** s string to be processed + ** t token to be removed + ** returns new string + */ + i = s.indexOf(t); + r = ""; + if (i == -1) return s; + r += s.substring(0,i) + remove(s.substring(i + t.length), t); + return r; +} +function changeMbox(box) { + mailbox=box; + start = 0; + change_box=1; + runEmailCommand("reload",0); + //location.href = "index.php?module=Webmails&action=index&mailbox="+box; +} +// TODO: these two functions should be tied into a mailbox management panel of some kind. +// could be a DHTML div with AJAX calls to execute the commands on the mailbox. +function show_addfolder() { + var fldr = $("folderOpts"); + if(fldr.style.display == 'none') + $("folderOpts").style.display=""; + else + $("folderOpts").style.display="none"; +} +function show_remfolder(mb) { + var fldr = $("remove_"+mb); + if(typeof(fldr) != "undefined") + { + if(fldr.style.display == 'none') + fldr.style.display=""; + else + fldr.style.display="none"; +} +} diff --git a/modules/Yahoo/images/ym.gif b/modules/Yahoo/images/ym.gif new file mode 100644 index 0000000..6d6e255 Binary files /dev/null and b/modules/Yahoo/images/ym.gif differ diff --git a/modules/Yahoo/language/de_de.lang.php b/modules/Yahoo/language/de_de.lang.php new file mode 100644 index 0000000..9503805 --- /dev/null +++ b/modules/Yahoo/language/de_de.lang.php @@ -0,0 +1,25 @@ +'Organisationen', + 'LBL_MODULE_TITLE'=>'Organisationen: Home', + 'LBL_SEARCH_FORM_TITLE'=>'Organisationssuche', + 'LBL_LIST_FORM_TITLE'=>'Organisationsliste', + 'LBL_NEW_FORM_TITLE'=>'Neue Organisation', + 'ERR_DELETE_RECORD'=>"Bitte einen Eintrag auswählen.", +); + +?> \ No newline at end of file diff --git a/modules/Yahoo/language/en_gb.lang.php b/modules/Yahoo/language/en_gb.lang.php new file mode 100644 index 0000000..4f5e851 --- /dev/null +++ b/modules/Yahoo/language/en_gb.lang.php @@ -0,0 +1,19 @@ + 'Organisations', + 'LBL_MODULE_TITLE' => 'Organisations: Home', + 'LBL_SEARCH_FORM_TITLE' => 'Organisation Search', + 'LBL_LIST_FORM_TITLE' => 'Organisation List', + 'LBL_NEW_FORM_TITLE' => 'New Organisation', + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the account' +); +?> \ No newline at end of file diff --git a/modules/Yahoo/language/en_us.lang.php b/modules/Yahoo/language/en_us.lang.php new file mode 100644 index 0000000..3867ea2 --- /dev/null +++ b/modules/Yahoo/language/en_us.lang.php @@ -0,0 +1,29 @@ +'Organizations', +'LBL_MODULE_TITLE'=>'Organizations: Home', +'LBL_SEARCH_FORM_TITLE'=>'Organization Search', +'LBL_LIST_FORM_TITLE'=>'Organization List', +'LBL_NEW_FORM_TITLE'=>'New Organization', +'ERR_DELETE_RECORD'=>"A record number must be specified to delete the account.", +); + +?> diff --git a/modules/Yahoo/language/es_es.lang.php b/modules/Yahoo/language/es_es.lang.php new file mode 100644 index 0000000..933889c --- /dev/null +++ b/modules/Yahoo/language/es_es.lang.php @@ -0,0 +1,30 @@ +'Cuentas', +'LBL_MODULE_TITLE'=>'Cuentas: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Cuentas', +'LBL_LIST_FORM_TITLE'=>'Lista de Cuentas', +'LBL_NEW_FORM_TITLE'=>'Nueva Cuenta', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +); + +?> diff --git a/modules/Yahoo/language/es_mx.lang.php b/modules/Yahoo/language/es_mx.lang.php new file mode 100644 index 0000000..02ead20 --- /dev/null +++ b/modules/Yahoo/language/es_mx.lang.php @@ -0,0 +1,31 @@ +'Cuentas', +'LBL_MODULE_TITLE'=>'Cuentas: Inicio', +'LBL_SEARCH_FORM_TITLE'=>'Buscar Cuentas', +'LBL_LIST_FORM_TITLE'=>'Lista de Cuentas', +'LBL_NEW_FORM_TITLE'=>'Nueva Cuenta', +'ERR_DELETE_RECORD'=>'Debe especificar un registro para eliminar la cuenta.', +); + +?> diff --git a/modules/Yahoo/language/fr_fr.lang.php b/modules/Yahoo/language/fr_fr.lang.php new file mode 100644 index 0000000..065327a --- /dev/null +++ b/modules/Yahoo/language/fr_fr.lang.php @@ -0,0 +1,19 @@ + 'Compte', + 'LBL_MODULE_TITLE' => 'Compte: Accueil', + 'LBL_SEARCH_FORM_TITLE' => 'Rechercher compte', + 'LBL_LIST_FORM_TITLE' => 'Liste comptes', + 'LBL_NEW_FORM_TITLE' => 'Nouveau compte', + 'ERR_DELETE_RECORD' => 'Une référence doit être spécifiée pour supprimer ce compte.', +); +?> \ No newline at end of file diff --git a/modules/Yahoo/language/hu_hu.lang.php b/modules/Yahoo/language/hu_hu.lang.php new file mode 100644 index 0000000..3ca5cd4 --- /dev/null +++ b/modules/Yahoo/language/hu_hu.lang.php @@ -0,0 +1,29 @@ + 'Cégek', + 'LBL_MODULE_TITLE' => 'Cégek: Kezdőlap', + 'LBL_SEARCH_FORM_TITLE' => 'Cég Keresés', + 'LBL_LIST_FORM_TITLE' => 'Cég Lista', + 'LBL_NEW_FORM_TITLE' => 'Új Cég', + 'ERR_DELETE_RECORD' => 'Adj meg egy rekord azonosítót a Cég törléséhez' +); +?> \ No newline at end of file diff --git a/modules/Yahoo/language/nl_nl.lang.php b/modules/Yahoo/language/nl_nl.lang.php new file mode 100644 index 0000000..175119f --- /dev/null +++ b/modules/Yahoo/language/nl_nl.lang.php @@ -0,0 +1,43 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.2 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/Yahoo/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( +'LBL_MODULE_NAME'=>'Accounts', +'LBL_MODULE_TITLE'=>'Accounts: Home', +'LBL_SEARCH_FORM_TITLE'=>'Zoek account ', +'LBL_LIST_FORM_TITLE'=>'Accountlijst', +'LBL_NEW_FORM_TITLE'=>'Nieuw account', +'ERR_DELETE_RECORD'=>"Een veld moet gespecificeerd zijn om een Account te verwijderen. ", +); + +?> diff --git a/modules/Yahoo/language/pt_br.lang.php b/modules/Yahoo/language/pt_br.lang.php new file mode 100644 index 0000000..c119116 --- /dev/null +++ b/modules/Yahoo/language/pt_br.lang.php @@ -0,0 +1,29 @@ +'Organizações', +'LBL_MODULE_TITLE'=>'Organizações: Principal', +'LBL_SEARCH_FORM_TITLE'=>'Pesquisa Organização', +'LBL_LIST_FORM_TITLE'=>'Lista Organização', +'LBL_NEW_FORM_TITLE'=>'Nova Organização', +'ERR_DELETE_RECORD'=>"Defina um número de registro para apagar a Organização.", +); + +?> diff --git a/modules/Yahoo/language/zh_cn.lang.php b/modules/Yahoo/language/zh_cn.lang.php new file mode 100644 index 0000000..f716f5c --- /dev/null +++ b/modules/Yahoo/language/zh_cn.lang.php @@ -0,0 +1,33 @@ +'客户', +'LBL_MODULE_TITLE' =>'客户:首页', +'LBL_SEARCH_FORM_TITLE' =>'查找客户', +'LBL_LIST_FORM_TITLE' =>'客户列表', +'LBL_NEW_FORM_TITLE' =>'新增客户', +'ERR_DELETE_RECORD' =>'必须指定记录编号才能删除客户。', +); + +?> diff --git a/modules/com_vtiger_workflow/VTConditionalExpression.inc b/modules/com_vtiger_workflow/VTConditionalExpression.inc new file mode 100644 index 0000000..9245c80 --- /dev/null +++ b/modules/com_vtiger_workflow/VTConditionalExpression.inc @@ -0,0 +1,126 @@ +expTree = $parser->parse(); + } + + public function evaluate($data){ + $this->env=$data; + return $this->evalGate($this->expTree); + } + + private function evalGate($tree){ + if(in_array($tree[0], array("and", "or"))){ + switch($tree[0]){ + case "and": + return $this->evalGate($tree[1]) and $this->evalGate($tree[2]); + case "or": + return $this->evalGate($tree[1]) or $this->evalGate($tree[2]); + } + }else{ + return $this->evalCondition($tree); + } + } + + private function evalCondition($tree){ + switch($tree[0]){ + case "=": + return (int)$this->getVal($tree[1]) == (int)$this->getVal($tree[2]); + } + } + + private function getVal($node){ + list($valueType, $value) = $node; + switch($valueType){ + case "sym": + return $this->env[$value]; + case "num": + return $value; + } + } + } + +class VTParseFailed extends Exception { } + +/** + * This is a simple parser for conditional expressions used to trigger workflow actions. + * + */ +class VTConditionalParser{ + + + public function __construct($expr){ + $this->tokens = $this->getTokens($expr); + $this->pos = 0; + } + + private function getTokens($expression){ + preg_match_all('/and|or|\\d+|=|\\w+|\\(|\\)/',$expression, $matches, PREG_SET_ORDER); + $tokens=array(); + foreach($matches as $arr){ + $tokenVal = $arr[0]; + if(in_array($tokenVal, array("and", "or", "=", "(", ")"))){ + $tokenType = "op"; + }else if(is_numeric($tokenVal)){ + $tokenType = "num"; + }else{ + $tokenType = "sym"; + } + $tokens[]=array($tokenType, $tokenVal); + } + return $tokens; + } + + + public function parse(){ + $op = array( + "and"=>array("op", "and"), + "or"=>array("op", "or"), + "="=>array("op", "="), + "("=>array("op", "("), + ")"=>array("op", ")")); + + if($this->peek()==$op['(']){ + $this->nextToken(); + $left = $this->parse(); + if($this->nextToken()!= $op[')']){ + throw new VTParseFailed(); + } + }else{ + $left = $this->cond(); + } + if(sizeof($this->tokens)>$this->pos and in_array($this->peek(), array($op["and"], $op["or"]))){ + $nt = $this->nextToken(); + return array($nt[1], $left, $this->parse()); + }else{ + return $left; + } + } + + private function cond(){ + $left = $this->nextToken(); + $operator = $this->nextToken(); + $right = $this->nextToken(); + return array($operator[1], $left, $right); + } + + private function peek(){ + return $this->tokens[$this->pos]; + } + + private function nextToken(){ + $this->pos+=1; + return $this->tokens[$this->pos - 1]; + } +} + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTEmailRecipientsTemplate.inc b/modules/com_vtiger_workflow/VTEmailRecipientsTemplate.inc new file mode 100644 index 0000000..f332217 --- /dev/null +++ b/modules/com_vtiger_workflow/VTEmailRecipientsTemplate.inc @@ -0,0 +1,29 @@ + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTEntityCache.inc b/modules/com_vtiger_workflow/VTEntityCache.inc new file mode 100644 index 0000000..311f756 --- /dev/null +++ b/modules/com_vtiger_workflow/VTEntityCache.inc @@ -0,0 +1,103 @@ +moduleName = null; + $this->id = $id; + $this->user = $user; + $data = vtws_retrieve($id, $user); + foreach($data as $key => $value){ + if(is_string($value)){ + $data[$key] = html_entity_decode($value, ENT_QUOTES, 'utf-8'); + } + } + $this->data = $data; + } + /** + * Get the data from the entity object as an array. + * + * @return An array representation of the module data. + */ + function getData(){ + return $this->data; + } + + /** + * Get the entity id. + * + * @return The entity id. + */ + function getId(){ + return $this->data['id']; + } + + /** + * Get the name of the module represented by the entity data object. + * + * @return The module name. + */ + function getModuleName(){ + if($this->moduleName==null){ + global $adb; + $wsId = $this->data['id']; + $parts = explode('x', $wsId); + $result = $adb->pquery('select name from vtiger_ws_entity where id=?', + array($parts[0])); + $rowData = $adb->raw_query_result_rowdata($result, 0); + $this->moduleName = $rowData['name']; + } + return $this->moduleName; + } + + function get($fieldName){ + return $this->data[$fieldName]; + } + + function set($fieldName, $value){ + + $this->data[$fieldName] = $value; + } + + function save(){ + vtws_update($this->data,$this->user); + } + + function isNew() { + $wsId = $this->data['id']; + $parts = explode('x', $wsId); + $recordId = $parts[1]; + $entityDelta = new VTEntityDelta(); + $oldEntity = $entityDelta->getOldEntity($this->moduleName, $recordId); + if($oldEntity == null) { + return true; + } else { + return false; + } + } + +} + +class VTEntityCache{ + function __construct($user){ + $this->user = $user; + $this->cache = array(); + } + + function forId($id){ + if($this->cache[$id]==null){ + $data = new VTWorkflowEntity($this->user, $id); + $this->cache[$id] = $data; + } + return $this->cache[$id]; + } +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTEntityMethodManager.inc b/modules/com_vtiger_workflow/VTEntityMethodManager.inc new file mode 100644 index 0000000..9f1db19 --- /dev/null +++ b/modules/com_vtiger_workflow/VTEntityMethodManager.inc @@ -0,0 +1,62 @@ +adb = $adb; + } + + + function addEntityMethod($moduleName, $methodName, $functionPath, $functionName){ + $adb = $this->adb; + $id = $adb->getUniqueId("com_vtiger_workflowtasks_entitymethod"); + $adb->pquery("insert into com_vtiger_workflowtasks_entitymethod (workflowtasks_entitymethod_id, module_name, function_path, function_name, method_name) values (?,?,?,?,?)", array($id, $moduleName, $functionPath, $functionName, $methodName)); + } + + + + function executeMethod($entityData, $methodName){ + $adb = $this->adb; + $moduleName = $entityData->getModuleName(); + $result = $adb->pquery("select function_path, function_name from com_vtiger_workflowtasks_entitymethod where module_name=? and method_name=?", array($moduleName, $methodName)); + if($adb->num_rows($result)!=0){ + $data = $adb->raw_query_result_rowdata($result, 0); + $functionPath = $data['function_path']; + $functionName = $data['function_name']; + require_once($functionPath); + $functionName($entityData); + } + } + + function methodsForModule($moduleName){ + $adb = $this->adb; + $result = $adb->pquery("select method_name from com_vtiger_workflowtasks_entitymethod where module_name=?", array($moduleName)); + $it = new SqlResultIterator($adb, $result); + $methodNames = array(); + foreach($it as $row){ + $methodNames[] = $row->method_name; + } + return $methodNames; + } + /* + private function methodExists($object, $methodName){ + $className = get_class($object); + $class = new ReflectionClass($className); + $methods = $class->getMethods(); + foreach($methods as $method){ + if($method->getName()==$methodName){ + return true; + } + } + return false; + }*/ +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTEventHandler.inc b/modules/com_vtiger_workflow/VTEventHandler.inc new file mode 100644 index 0000000..5dbf412 --- /dev/null +++ b/modules/com_vtiger_workflow/VTEventHandler.inc @@ -0,0 +1,106 @@ +adminUser(); + global $adb; + $isNew = $entityData->isNew(); + $entityCache = new VTEntityCache($user); + $wsModuleName = $util->toWSModuleName($entityData); + $wsId = vtws_getWebserviceEntityId($wsModuleName, + $entityData->getId()); + $entityData = $entityCache->forId($wsId); + + $wfs = new VTWorkflowManager($adb); + $workflows = $wfs->getWorkflowsForModule($entityData->getModuleName()); + + foreach ($workflows as $workflow) { + if (!is_a($workflow, 'Workflow')) + continue; + switch ($workflow->executionCondition) { + case VTWorkflowManager::$ON_FIRST_SAVE: { + if ($isNew) { + $doEvaluate = true; + } else { + $doEvaluate = false; + } + break; + } + case VTWorkflowManager::$ONCE: { + $entity_id = vtws_getIdComponents($entityData->getId()); + $entity_id = $entity_id[1]; + if ($workflow->isCompletedForRecord($entity_id)) { + $doEvaluate = false; + } else { + $doEvaluate = true; + } + break; + } + case VTWorkflowManager::$ON_EVERY_SAVE: { + $doEvaluate = true; + break; + } + case VTWorkflowManager::$ON_MODIFY: { + $doEvaluate = !($isNew); + break; + } + case VTWorkflowManager::$MANUAL: { + $doEvaluate = false; + break; + } + default: { + throw new Exception("Should never come here! Execution Condition:" . $workflow->executionCondition); + } + } + if ($doEvaluate && $workflow->evaluate($entityCache, $entityData->getId())) { + if (VTWorkflowManager::$ONCE == $workflow->executionCondition) { + $entity_id = vtws_getIdComponents($entityData->getId()); + $entity_id = $entity_id[1]; + $workflow->markAsCompletedForRecord($entity_id); + } + + $workflow->performTasks($entityData); + } + } + $util->revertUser(); + } + +} + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTJsonCondition.inc b/modules/com_vtiger_workflow/VTJsonCondition.inc new file mode 100644 index 0000000..77ef3bd --- /dev/null +++ b/modules/com_vtiger_workflow/VTJsonCondition.inc @@ -0,0 +1,204 @@ +forId($id); + $data = $entityData->getData(); + + $groupResults = array(); + $expressionResults = array(); + $i = 0; + foreach ($expr as $cond) { + $conditionGroup = $cond['groupid']; + if (empty($conditionGroup)) + $conditionGroup = 0; + preg_match('/(\w+) : \((\w+)\) (\w+)/', $cond['fieldname'], $matches); + if (count($matches) == 0) { + $expressionResults[$conditionGroup][$i]['result'] = $this->checkCondition($entityData, $cond); + } else { + list($full, $referenceField, $referenceModule, $fieldname) = $matches; + $referenceFieldId = $data[$referenceField]; + if ($referenceFieldId != 0) { + $entity = $entityCache->forId($data[$referenceField]); + if ($entity->getModuleName() == $referenceModule) { + $cond['fieldname'] = $fieldname; + $expressionResults[$conditionGroup][$i]['result'] = $this->checkCondition($entity, $cond, $entityData); + } else { + $expressionResults[$conditionGroup][$i]['result'] = FALSE; + } + } else { + $expressionResults[$conditionGroup][$i]['result'] = FALSE; + } + } + $expressionResults[$conditionGroup][$i + 1]['logicaloperator'] = (!empty($cond['joincondition'])) ? $cond['joincondition'] : 'and'; + $groupResults[$conditionGroup]['logicaloperator'] = (!empty($cond['groupjoin'])) ? $cond['groupjoin'] : 'and'; + $i++; + } + + foreach ($expressionResults as $groupId => $groupExprResultSet) { + $groupResult = TRUE; + foreach ($groupExprResultSet as $exprResult) { + $result = $exprResult['result']; + $logicalOperator = $exprResult['logicaloperator']; + if (isset($result)) { // Condition to skip last condition + if (!empty($logicalOperator)) { + switch ($logicalOperator) { + case 'and' : $groupResult = ($groupResult && $result); + break; + case 'or' : $groupResult = ($groupResult || $result); + break; + } + } else { // Case for the first condition + $groupResult = $result; + } + } + } + $groupResults[$groupId]['result'] = $groupResult; + } + + $finalResult = TRUE; + foreach ($groupResults as $groupId => $groupResult) { + $result = $groupResult['result']; + $logicalOperator = $groupResult['logicaloperator']; + if (isset($result)) { // Condition to skip last condition + if (!empty($logicalOperator)) { + switch ($logicalOperator) { + case 'and' : $finalResult = ($finalResult && $result); + break; + case 'or' : $finalResult = ($finalResult || $result); + break; + } + } else { // Case for the first condition + $finalResult = $result; + } + } + } + return $finalResult; + } + + function startsWith($str, $subStr) { + $sl = strlen($str); + $ssl = strlen($subStr); + if ($sl >= $ssl) { + return substr_compare($str, $subStr, 0, $ssl) == 0; + } else { + return FALSE; + } + } + + function endsWith($str, $subStr) { + $sl = strlen($str); + $ssl = strlen($subStr); + if ($sl >= $ssl) { + return substr_compare($str, $subStr, $sl - $ssl, $ssl) == 0; + } else { + return FALSE; + } + } + + function checkCondition($entityData, $cond, $referredEntityData=null) { + $data = $entityData->getData(); + + $condition = $cond['operation']; + $fieldValue = $data[$cond['fieldname']]; + $value = trim(html_entity_decode($cond['value'])); + $expressionType = $cond['valuetype']; + + if ($expressionType == 'fieldname') { + if ($referredEntityData != null) { + $referredData = $referredEntityData->getData(); + } else { + $referredData = $data; + } + $value = $referredData[$value]; + } elseif ($expressionType == 'expression') { + require_once 'modules/com_vtiger_workflow/expression_engine/include.inc'; + + $parser = new VTExpressionParser(new VTExpressionSpaceFilter(new VTExpressionTokenizer($value))); + $expression = $parser->expression(); + $exprEvaluater = new VTFieldExpressionEvaluater($expression); + if ($referredEntityData != null) { + $value = $exprEvaluater->evaluate($referredEntityData); + } else { + $value = $exprEvaluater->evaluate($entityData); + } + } + + switch ($condition) { + case "equal to": + return $fieldValue == $value; + case "less than": + return $fieldValue < $value; + case "greater than": + return $fieldValue > $value; + case "does not equal": + return $fieldValue != $value; + case "less than or equal to": + return $fieldValue <= $value; + case "greater than or equal to": + return $fieldValue >= $value; + case "is": + if (preg_match('/([^:]+):boolean$/', $value, $match)) { + $value = $match[1]; + if ($value == 'true') { + return $fieldValue === 'on' || $fieldValue === 1 || $fieldValue === '1'; + } else { + return $fieldValue === 'off' || $fieldValue === 0 || $fieldValue === '0' || $fieldValue === ''; + } + } else { + return $fieldValue == $value; + } + case "is not": + if (preg_match('/([^:]+):boolean$/', $value, $match)) { + $value = $match[1]; + if ($value == 'true') { + return $fieldValue === 'off' || $fieldValue === 0 || $fieldValue === '0' || $fieldValue === ''; + } else { + return $fieldValue === 'on' || $fieldValue === 1 || $fieldValue === '1'; + } + } else { + return $fieldValue != $value; + } + case "contains": + return strpos($fieldValue, $value) !== FALSE; + case "does not contain": + return strpos($fieldValue, $value) === FALSE; + case "starts with": + return $this->startsWith($fieldValue, $value); + case "ends with": + return $this->endsWith($fieldValue, $value); + case "matches": + return preg_match($value, $fieldValue); + case "has changed" : + $entityDelta = new VTEntityDelta(); + $idParts = vtws_getIdComponents($entityData->getId()); + $hasChanged = $entityDelta->hasChanged($entityData->getModuleName(), $idParts[1], $cond['fieldname']); + if (empty($value)) { + return $hasChanged; + } else { + return $hasChanged && $fieldValue == $value; + } + default: + //Unexpected condition + throw new Exception("Found an unexpected condition: " . $condition); + } + } + +} + +?> diff --git a/modules/com_vtiger_workflow/VTSimpleTemplate.inc b/modules/com_vtiger_workflow/VTSimpleTemplate.inc new file mode 100644 index 0000000..bd22f99 --- /dev/null +++ b/modules/com_vtiger_workflow/VTSimpleTemplate.inc @@ -0,0 +1,113 @@ +template = $templateString; + } + + function render($entityCache, $entityId){ + $this->cache = $entityCache; + $this->parent = $this->cache->forId($entityId); + return $this->parseTemplate(); + } + + private function matchHandler($match){ + preg_match('/\((\w+) : \(([_\w]+)\) (\w+)\)/', $match[1], $matches); + if(count($matches)==0){ + $fieldname = $match[1]; + $data = $this->parent->getData(); + if($this->useValue($data, $fieldname)){ + $result = $data[$fieldname]; + }else{ + $result =''; + } + }else{ + list($full, $referenceField, $referenceModule, $fieldname) = $matches; + if($referenceModule === '__VtigerMeta__'){ + $result = $this->getMetaValue($fieldname); + }else{ + $referenceId = $this->parent->get($referenceField); + if($referenceId==null){ + $result=""; + }else{ + $entity = $this->cache->forId($referenceId); + if($referenceModule==="Users" && $entity->getModuleName()=="Groups"){ + list($groupEntityId, $groupId) = vtws_getIdComponents($referenceId); + + require_once('include/utils/GetGroupUsers.php'); + $ggu = new GetGroupUsers(); + $ggu->getAllUsersInGroup($groupId); + + $users = $ggu->group_users; + $parts = Array(); + foreach($users as $userId){ + $refId = vtws_getWebserviceEntityId("Users", $userId); + $entity = $this->cache->forId($refId); + $data = $entity->getData(); + if($this->useValue($data, $fieldname)){ + $parts[] = $data[$fieldname]; + } + } + $result = implode(",", $parts); + + } elseif($entity->getModuleName()===$referenceModule){ + $data = $entity->getData(); + if($this->useValue($data, $fieldname)){ + $result = $data[$fieldname]; + }else{ + $result = ''; + } + }else{ + $result = ''; + } + } + } + } + return $result; + + } + + protected function useValue($data, $fieldname) { + return !empty($data[$fieldname]); + } + + function parseTemplate(){ + return preg_replace_callback('/\\$(\w+|\((\w+) : \(([_\w]+)\) (\w+)\)),?/', array($this,"matchHandler"), $this->template); + } + + function getMetaValue($fieldname){ + require_once 'config.inc.php'; + global $site_URL, $PORTAL_URL, $current_user; + switch($fieldname){ + case 'date' : return getNewDisplayDate(); + case 'time' : return date('h:i:s'); + case 'dbtimezone' : return DateTimeField::getDBTimeZone(); + case 'crmdetailviewurl' : $wsId = $this->parent->getId(); + $parts = explode('x', $wsId); + $recordId = $parts[1]; + $moduleName = $this->parent->getModuleName(); + return $site_URL.'/index.php?action=DetailView&module='.$moduleName.'&record='.$recordId; + case 'portaldetailviewurl' : $wsId = $this->parent->getId(); + $parts = explode('x', $wsId); + $recordId = $parts[1]; + $moduleName = $this->parent->getModuleName(); + $recorIdName='id'; + if($moduleName == 'HelpDesk') $recorIdName = 'ticketid'; + if($moduleName == 'Faq') $recorIdName = 'faqid'; + if($moduleName == 'Products') $recorIdName = 'productid'; + return $PORTAL_URL.'/index.php?module='.$moduleName.'&action=index&'.$recorIdName.'='.$recordId.'&fun=detail'; + case 'siteurl' : return $site_URL; + case 'portalurl' : return $PORTAL_URL; + default: ''; + } + } +} +?> diff --git a/modules/com_vtiger_workflow/VTTaskManager.inc b/modules/com_vtiger_workflow/VTTaskManager.inc new file mode 100644 index 0000000..659f1c7 --- /dev/null +++ b/modules/com_vtiger_workflow/VTTaskManager.inc @@ -0,0 +1,195 @@ +adb = $adb; + } + + /** + * Save the task into the database. + * + * When a new task is saved for the first time a field is added to it called + * id that stores the task id used in the database. + * + * @param $summary A summary of the task instance. + * @param $task The task instance to save. + * @return The id of the task + */ + public function saveTask($task){ + $adb = $this->adb; + if(is_numeric($task->id)){//How do I check whether a member exists in php? + $taskId = $task->id; + $adb->pquery("update com_vtiger_workflowtasks set summary=?, task=? where task_id=?", + array($task->summary, serialize($task), $taskId)); + return $taskId; + }else{ + $taskId = $adb->getUniqueID("com_vtiger_workflowtasks"); + $task->id = $taskId; + $adb->pquery("insert into com_vtiger_workflowtasks + (task_id, workflow_id, summary, task) + values (?, ?, ?, ?)", + array($taskId, $task->workflowId, $task->summary, serialize($task))); + return $taskId; + } + } + + public function deleteTask($taskId){ + $adb = $this->adb; + $adb->pquery("delete from com_vtiger_workflowtasks where task_id=?", array($taskId)); + } + + + /** + * Create a new class instance + */ + public function createTask($taskType, $workflowId){ + $taskClass = $taskType; + $this->requireTask($taskType); + $task = new $taskClass(); + $task->workflowId=$workflowId; + $task->summary = ""; + $task->active=true; + return $task; + } + + + /** + * Retrieve a task from the database + * + * @param $taskId The id of the task to retrieve. + * @return VTTask The retrieved task. + */ + public function retrieveTask($taskId){ + $adb = $this->adb; + $result = $adb->pquery("select task from com_vtiger_workflowtasks where task_id=?", array($taskId)); + $data = $adb->raw_query_result_rowdata($result, 0); + $task = $data["task"]; + $task = $this->unserializeTask($task); + $timeFieldList = $task->getTimeFieldList(); + foreach ($timeFieldList as $field) { + $task->$field = $task->formatTimeForTimePicker($task->$field); + } + return $task; + } + + + /** + * + */ + public function getTasksForWorkflow($workflowId){ + $adb = $this->adb; + $result = $adb->pquery("select task from com_vtiger_workflowtasks + where workflow_id=?", + array($workflowId)); + return $this->getTasksForResult($result); + } + + + /** + * + */ + public function unserializeTask($str){ + $this->requireTask(self::taskName($str)); + return unserialize($str); + + } + /** + * + */ + function getTasks(){ + $adb = $this->adb; + $result = $adb->query("select task from com_vtiger_workflowtasks"); + return $this->getTasksForResult($result); + } + + + function getTaskTypes($moduleName=''){ + $taskTypes = array("VTEmailTask", "VTEntityMethodTask", "VTCreateTodoTask","VTCreateEventTask","VTUpdateFieldsTask","VTCreateEntityTask"); + // Make SMSTask available if module is active + // TODO Generic way of handling this could be helpful + if(getTabid('SMSNotifier') && vtlib_isModuleActive('SMSNotifier')) { + $taskTypes [] = 'VTSMSTask'; + } + $taskTypes = $this->filterTaskTypes($moduleName, $taskTypes); + return $taskTypes; + } + + private function filterTaskTypes($moduleName, $taskTypes) { + $eliminateTaskTypes = array( + "Calendar" => array("VTCreateTodoTask","VTCreateEventTask"), + "Events" => array("VTCreateTodoTask","VTCreateEventTask"), + "Faq" => array("VTCreateTodoTask","VTCreateEventTask"), + ); + + if(!empty($moduleName) && array_key_exists($moduleName, $eliminateTaskTypes)) { + $taskTypes = array_diff($taskTypes, $eliminateTaskTypes[$moduleName]); + } + return $taskTypes; + } + + private function getTasksForResult($result){ + $adb = $this->adb; + $it = new SqlResultIterator($adb, $result); + $tasks = array(); + foreach($it as $row){ + $text = $row->task; + + $this->requireTask(self::taskName($text)); + $tasks[] = unserialize($text); + } + return $tasks; + } + + private function taskName($serializedTask){ + $matches = array(); + preg_match ('/"([^"]+)"/', $serializedTask, $matches); + return $matches[1]; + } + + private function requireTask($taskType){ + require_once("tasks/".$taskType.".inc"); + } + + } + + abstract class VTTask{ + public abstract function doTask($data); + public abstract function getFieldNames(); + + public function getTimeFieldList() { + return array(); + } + + public function formatTimeForTimePicker($time) { + list($h, $m, $s) = explode(':', $time); + $mn = str_pad($m - $m % 15, 2, 0, STR_PAD_LEFT); + $AM_PM = array('am', 'pm'); + return str_pad(($h%12), 2, 0, STR_PAD_LEFT).':'.$mn.$AM_PM[($h/12)%2]; + } + + public function getMetaVariables() { + return array( + 'Current Date' => '(general : (__VtigerMeta__) date)', + 'Current Time' => '(general : (__VtigerMeta__) time)', + 'System Timezone' => '(general : (__VtigerMeta__) dbtimezone)', + 'CRM Detail View URL' => '(general : (__VtigerMeta__) crmdetailviewurl)', + 'Portal Detail View URL' => '(general : (__VtigerMeta__) portaldetailviewurl)', + 'Site Url' => '(general : (__VtigerMeta__) siteurl)', + 'Portal Url' => '(general : (__VtigerMeta__) portalurl)' + ); + } + + } + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTTaskQueue.inc b/modules/com_vtiger_workflow/VTTaskQueue.inc new file mode 100644 index 0000000..0825c04 --- /dev/null +++ b/modules/com_vtiger_workflow/VTTaskQueue.inc @@ -0,0 +1,65 @@ +adb = $adb; + } + + /** + * Queue a task for execution. + * + * @param $taskId The id of the task to queue + * @param $entityId The id of the crm entity the task is assiciated with. + * @param $when The time after which the task should be executed. This is + * an optional value with a default value of 0. + */ + public function queueTask($taskId, $entityId, $when=0){ + $adb = $this->adb; + $result = $adb->pquery("select * from com_vtiger_workflowtask_queue + where task_id=? and entity_id=?", array($taskId, $entityId)); + if($adb->num_rows($result)==1){ + return false; + }else{ + $adb->pquery("insert into com_vtiger_workflowtask_queue (task_id, entity_id, do_after) + values (?,?,?)", array($taskId, $entityId, $when)); + return true; + } + } + + + /** + * Get a list of taskId/entityId pairs ready for execution. + * + * The method fetches task id/entity id where the when timestamp + * is less than the current time when the method was called. + * + * @return A list of pairs of the form array(taskId, entityId) + */ + public function getReadyTasks(){ + $adb = $this->adb; + $time = time(); + $result = $adb->pquery("select task_id, entity_id from com_vtiger_workflowtask_queue where do_aftertask_id, $row->entity_id); + } + $adb->pquery("delete from com_vtiger_workflowtask_queue where do_after \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTWorkflowApplication.inc b/modules/com_vtiger_workflow/VTWorkflowApplication.inc new file mode 100644 index 0000000..f254df2 --- /dev/null +++ b/modules/com_vtiger_workflow/VTWorkflowApplication.inc @@ -0,0 +1,75 @@ +request; + $this->name = "com_vtiger_workflow"; + $this->label = "Workflow"; + $this->action = $action; + $this->returnUrl = $_SERVER["REQUEST_URI"]; + } + + function currentUrl(){ + // $req = $this->request; + // $url = "index.php?module={$this->name}&action={$this->action}"; + // if($this->action=='editworkflow'){ + // if(isset($req['workflow_id'])){ + // $url.="&workflow_id=".$req['workflow_id']; + // } + // }else if($this->action=='edittask'){ + // if(isset($req['task_id'])){ + // $url.="&task_id=".$req['task_id']; + // } + // } + return $_SERVER["REQUEST_URI"]; + } + + function returnUrl(){ + return $this->returnUrl; + } + + function listViewUrl(){ + return "index.php?module={$this->name}&action=workflowlist"; + } + + function editWorkflowUrl($id=null){ + if($id!=null){ + $idPart="&workflow_id=$id"; + } + return "index.php?module={$this->name}&action=editworkflow$idPart&return_url=".urlencode($this->returnUrl()); + } + + function deleteWorkflowUrl($id){ + $idPart="&workflow_id=$id"; + return "index.php?module={$this->name}&action=deleteworkflow$idPart&return_url=".urlencode($this->returnUrl()); + } + + function editTaskUrl($id=null){ + if($id!=null){ + $idPart="&task_id=$id"; + } + return "index.php?module={$this->name}&action=edittask$idPart&return_url=".urlencode($this->returnUrl()); + } + + function deleteTaskUrl($id){ + $idPart="&task_id=$id"; + return "index.php?module={$this->name}&action=deletetask$idPart&return_url=".urlencode($this->returnUrl()); + } + + function setReturnUrl($returnUrl){ + $this->returnUrl = $returnUrl; + } + + function errorPageUrl($message){ + return "index.php?module={$this->name}&action=errormessage&message=".urlencode($message); + } +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTWorkflowManager.inc b/modules/com_vtiger_workflow/VTWorkflowManager.inc new file mode 100644 index 0000000..3c9e8f4 --- /dev/null +++ b/modules/com_vtiger_workflow/VTWorkflowManager.inc @@ -0,0 +1,293 @@ +adb = $adb; + } + + function save($workflow){ + $adb=$this->adb; + if(isset($workflow->id)){ + $wf=$workflow; + $adb->pquery("update com_vtiger_workflows set + module_name=?, summary=?, test=?, execution_condition=?, defaultworkflow=? + where workflow_id=?", + array($wf->moduleName, $wf->description, $wf->test, $wf->executionCondition, $wf->defaultworkflow, $wf->id)); + }else{ + $workflowId = $adb->getUniqueID("com_vtiger_workflows"); + $workflow->id = $workflowId; + $wf=$workflow; + + $result=$adb->getColumnNames("com_vtiger_workflows"); + if(in_array("type",$result)) { + $adb->pquery("insert into com_vtiger_workflows + (workflow_id, module_name, summary, test, execution_condition, type, defaultworkflow) + values (?,?,?,?,?,?,?)", + array($workflowId, $wf->moduleName, $wf->description, $wf->test, $wf->executionCondition, $wf->type, $wf->defaultworkflow)); + } else { + $adb->pquery("insert into com_vtiger_workflows + (workflow_id, module_name, summary, test, execution_condition, defaultworkflow) + values (?,?,?,?,?,?)", + array($workflowId, $wf->moduleName, $wf->description, $wf->test, $wf->executionCondition, $wf->defaultworkflow)); + } + } + } + + + function getWorkflows(){ + $adb=$this->adb; + + $result=$adb->getColumnNames("com_vtiger_workflows"); + if(in_array("defaultworkflow",$result)){ + $result = $adb->query("select workflow_id, module_name, summary, test, execution_condition,defaultworkflow, type + from com_vtiger_workflows "); + }else{ + + $result = $adb->query("select workflow_id, module_name, summary, test, execution_condition, type + from com_vtiger_workflows"); + } + return $this->getWorkflowsForResult($result); + + } + + function getWorkflowsForModule($moduleName){ + $adb=$this->adb; + + //my changes + $result=$adb->getColumnNames("com_vtiger_workflows"); + if(in_array(defaultworkflow,$result)){ + $result = $adb->pquery("select workflow_id, module_name, summary, test, execution_condition, defaultworkflow, type + from com_vtiger_workflows where module_name=?",array($moduleName)); + } + else{ + $result = $adb->pquery("select workflow_id, module_name, summary, test, execution_condition, type + from com_vtiger_workflows where module_name=?",array($moduleName)); + } + return $this->getWorkflowsForResult($result); + } + + protected function getWorkflowsForResult($result){ + $adb=$this->adb; + + $it = new SqlResultIterator($adb, $result); + $workflows=array(); + foreach($it as $row){ + $workflow = $this->getWorkflowInstance($row->type); + $workflow->setup($row->data); + + if(!is_a($workflow, 'Workflow')) continue; + + $workflows[$workflow->id]=$workflow; + } + return $workflows; + } + + protected function getWorkflowInstance($type='basic') { + $configReader = new ConfigReader('modules/com_vtiger_workflow/config.inc', 'workflowConfig'); + $workflowTypeConfig = $configReader->getConfig($type); + $workflowClassPath = $workflowTypeConfig['classpath']; + $workflowClass = $workflowTypeConfig['class']; + + require_once $workflowClassPath; + $workflow = new $workflowClass(); + return $workflow; + } + + /** + * Retrieve a workflow from the database + * + * Returns null if the workflow doesn't exist. + * + * @param The id of the workflow + * @return A workflow object. + */ + function retrieve($id){ + $adb=$this->adb; + $result = $adb->pquery("select workflow_id, module_name, summary, test, execution_condition, type, defaultworkflow + from com_vtiger_workflows where workflow_id=?", + array($id)); + + if($adb->num_rows($result)){ + $data = $adb->raw_query_result_rowdata($result, 0); + $workflow = $this->getWorkflowInstance($data['type']); + $workflow->setup($data); + return $workflow; + }else{ + return null; + } + } + + function delete($id){ + $adb=$this->adb; + $adb->pquery("DELETE FROM com_vtiger_workflowtasks WHERE workflow_id IN + (SELECT workflow_id FROM com_vtiger_workflows WHERE workflow_id=? AND (defaultworkflow IS NULL OR defaultworkflow != 1))", + array($id)); + $adb->pquery("DELETE FROM com_vtiger_workflows WHERE workflow_id=? AND (defaultworkflow IS NULL OR defaultworkflow != 1)", array($id)); + } + + function newWorkflow($moduleName){ + $workflow = $this->getWorkflowInstance(); + $workflow->moduleName = $moduleName; + $workflow->executionCondition = self::$ON_EVERY_SAVE; + $workflow->type = 'basic'; + return $workflow; + + } + + + /** + * Export a workflow as a json encoded string + * + * @param $workflow The workflow instance to export. + */ + public function serializeWorkflow($workflow){ + $exp = array(); + $exp['moduleName'] = $workflow->moduleName; + $exp['description'] = $workflow->description; + $exp['test'] = $workflow->test; + $exp['executionCondition'] = $workflow->executionCondition; + $exp['tasks'] = array(); + $tm = new VTTaskManager($this->adb); + $tasks = $tm->getTasksForWorkflow($workflow->id); + foreach($tasks as $task){ + unset($task->id); + unset($task->workflowId); + $exp['tasks'][] = serialize($task); + } + return Zend_Json::encode($exp); + } + + /** + * Import a json encoded string as a workflow object + * + * @return The Workflow instance representing the imported workflow. + */ + public function deserializeWorkflow($str){ + $data = Zend_Json::decode($str); + $workflow = $this->newWorkflow($data['moduleName']); + $workflow->description = $data['description']; + $workflow->test = $data['test']; + $workflow->executionCondition = $data['executionCondition']; + $this->save($workflow); + $tm = new VTTaskManager($this->adb); + $tasks = $data['tasks']; + foreach($tasks as $taskStr){ + $task = $tm->unserializeTask($taskStr); + $task->workflowId = $workflow->id; + $tm->saveTask($task); + } + return $workflow; + } + + } + + class Workflow{ + function __construct(){ + $this->conditionStrategy = new VTJsonCondition(); + } + + function setup($row) { + $this->id = $row['workflow_id']; + $this->moduleName = $row['module_name']; + $this->description = to_html($row['summary']); + $this->test = $row['test']; + $this->executionCondition = $row['execution_condition']; + + if($row['defaultworkflow']){ + $this->defaultworkflow=$row['defaultworkflow']; + } + } + + function evaluate($entityCache, $id){ + if($this->test==""){ + return true; + }else{ + $cs = $this->conditionStrategy; + return $cs->evaluate($this->test, + $entityCache, $id); + } + } + + function isCompletedForRecord($recordId) { + global $adb; + + $result = $adb->pquery("SELECT * FROM com_vtiger_workflow_activatedonce + WHERE entity_id=? and workflow_id=?", array($recordId, $this->id)); + + $result2=$adb->pquery("SELECT * FROM com_vtiger_workflowtasks + INNER JOIN com_vtiger_workflowtask_queue + ON com_vtiger_workflowtasks.task_id= com_vtiger_workflowtask_queue.task_id + WHERE workflow_id=? AND entity_id=?", + array($this->id,$recordId)); + + if($adb->num_rows($result)===0 && $adb->num_rows($result2)===0) { // Workflow not done for specified record + return false; + } else { + return true; + } + } + + function markAsCompletedForRecord($recordId) { + global $adb; + + $adb->pquery("INSERT INTO com_vtiger_workflow_activatedonce (entity_id, workflow_id) + VALUES (?,?)", array($recordId, $this->id)); + } + + function performTasks($entityData) { + global $adb; + $data = $entityData->getData(); + + require_once('modules/com_vtiger_workflow/VTTaskManager.inc'); + require_once('modules/com_vtiger_workflow/VTTaskQueue.inc'); + + $tm = new VTTaskManager($adb); + $taskQueue = new VTTaskQueue($adb); + $tasks = $tm->getTasksForWorkflow($this->id); + + foreach($tasks as $task){ + if($task->active) { + $trigger = $task->trigger; + if($trigger != null){ + $delay = strtotime($data[$trigger['field']])+$trigger['days']*86400; + }else{ + $delay = 0; + } + if($task->executeImmediately==true){ + $task->doTask($entityData); + }else{ + $taskQueue->queueTask($task->id,$entityData->getId(), $delay); + } + } + } + } + + function executionConditionAsLabel($label=null){ + if($label==null){ + $arr = array('ON_FIRST_SAVE', 'ONCE', 'ON_EVERY_SAVE', 'ON_MODIFY', '', '', 'MANUAL'); + return $arr[$this->executionCondition-1]; + }else{ + $arr = array('ON_FIRST_SAVE'=>1, 'ONCE'=>2, 'ON_EVERY_SAVE'=>3, 'ON_MODIFY'=>4, 'MANUAL'=>7); + $this->executionCondition = $arr[$label]; + } + } + } +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTWorkflowTemplateManager.inc b/modules/com_vtiger_workflow/VTWorkflowTemplateManager.inc new file mode 100644 index 0000000..8f0e1e1 --- /dev/null +++ b/modules/com_vtiger_workflow/VTWorkflowTemplateManager.inc @@ -0,0 +1,197 @@ +adb = $adb; + } + + /** + * Create anew template instance from a workflow + * + * This template instance will not be saved. The save + * will have to be done explicitly. + * + * @param $title The title of the template + * @param $workflow A workflow instance. + */ + public function newTemplate($title, $workflow){ + $adb = $this->adb; + $wms = new VTWorkflowManager($adb); + $str = $wms->serializeWorkflow($workflow); + $template = new VTWorkflowTemplate(); + $template->title = $title; + $template->moduleName = $workflow->moduleName; + $template->template = $str; + return $template; + } + + /** + * Retrieve a template given it's id + * + * @param $templateId The id of the template + * @return The template object + */ + public function retrieveTemplate($templateId){ + $adb = $this->adb; + $result = $adb->pquery('select * from com_vtiger_workflowtemplates where template_id=?', array($templateId)); + $it = new SqlResultIterator($adb, $result); + $data = $it->current(); + $template = new VTWorkflowTemplate(); + $template->id = $templateId; + $template->title = $data->title; + $template->moduleName = $data->module_name; + $template->template = $data->template; + return $template; + } + + /** + * Create a workflow from a template + * + * The new workflow will also be added to the database. + * + * @param $template The template to use + * @return A workflow object. + */ + public function createWorkflow($template){ + $adb = $this->adb; + $wfm = new VTWorkflowManager($adb); + return $wfm->deserializeWorkflow($template->template); + } + + /** + * Get template objects for a particular module. + * + * @param $moduleName The name of the module + * @return An array containing template objects + */ + public function getTemplatesForModule($moduleName){ + $adb = $this->adb; + $result = $adb->pquery("select * from com_vtiger_workflowtemplates where module_name=?", array($moduleName)); + return $this->getTemplatesForResult($result); + } + + /** + * Get all templates + * + * Get all the templates as an array + * + * @return An array containing template objects. + */ + public function getTemplates(){ + $adb = $this->adb; + $result = $adb->query("select * from com_vtiger_workflowtemplates"); + return $this->getTemplatesForResult($result); + } + + /** + * Save a template + * + * If the object is a newly created template it + * will be added to the database and a field id containing + * the new id will be added to the object. + * + * @param $template The template object to save. + */ + public function saveTemplate($template){ + $adb = $this->adb; + if(is_numeric($template->id)){//How do I check whether a member exists in php? + $templateId = $template->id; + $adb->pquery("update com_vtiger_workflowtemplates set title=?,"+ + " module_name=?, template=? where template_id=?", + array($template->title, $template->moduleName, + $template->template, $templateId)); + return $templateId; + }else{ + $templateId = $adb->getUniqueID("com_vtiger_workflowtemplates"); + $template->id = $templateId; + $adb->pquery("insert into com_vtiger_workflowtemplates + (template_id, title, module_name, template) + values (?, ?, ?, ?)", + array($templateId, $template->title, + $template->moduleName, $template->template)); + return $templateId; + } + } + + /** + * Delete a template + * + * $templateId The id of the template to delete. + */ + public function deleteTemplate($templateId){ + $adb = $this->adb; + $adb->pquery('delete from com_vtiger_workflowtemplates where template_id=?', + array($templateId)); + } + + + /** + * Dump all the templates in vtiger into a string + * + * This can be used for exporting templates from one + * machine to another + * + * @return The string dump of the templates. + */ + public function dumpAllTemplates(){ + $adb = $this->adb; + $result = $adb->query("select * from com_vtiger_workflowtemplates"); + $it = new SqlResultIterator($adb, $result); + $arr = array(); + foreach($it as $row){ + $el = array( + 'moduleName'=>$row->module_name, + 'title'=>$row->title, + 'template'=>$row->template + ); + $arr[] = $el; + } + return Zend_Json::encode($arr); + } + + /** + * Load templates form a dumped string + * + * @param $str The string dump generated from dumpAllTemplates + */ + public function loadTemplates($str){ + $arr = Zend_Json::decode($str); + foreach($arr as $el){ + $template = new VTWorkflowTemplate(); + $template->moduleName = $el['moduleName']; + $template->title = $el['title']; + $template->template = $el['template']; + $this->save($template); + $this->createWorkflow($template); + } + } + + + private function getTemplatesForResult($result){ + $adb = $this->adb; + $it = new SqlResultIterator($adb, $result); + $templates = array(); + foreach($it as $row){ + $template = new VTWorkflowTemplate(); + $template->id = $row->template_id; + $template->title = $row->title; + $tempalte->moduleName = $row->module_name; + $template->template = $row->template; + $templates[] = $template; + } + return $templates; + } +} + +class VTWorkflowTemplate{ + +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/VTWorkflowUtils.php b/modules/com_vtiger_workflow/VTWorkflowUtils.php new file mode 100644 index 0000000..671a1ba --- /dev/null +++ b/modules/com_vtiger_workflow/VTWorkflowUtils.php @@ -0,0 +1,152 @@ +getModuleName(); + if ($moduleName == 'Activity') { + $arr = array('Task' => 'Calendar', 'Emails' => 'Emails'); + $moduleName = $arr[getActivityType($entityData->getId())]; + if ($moduleName == null) { + $moduleName = 'Events'; + } + } + return $moduleName; + } + + /** + * Insert redirection script + */ + function redirectTo($to, $message) { +?> + + +is_admin) === 'on'; + } + + /* function to check if the module has workflow + * @params :: $modulename - name of the module + */ + + function checkModuleWorkflow($modulename) { + global $adb; + $tabid = getTabid($modulename); + $modules_not_supported = array('Documents', 'Calendar', 'Emails', 'Faq', 'Events', 'PBXManager', 'Users'); + $query = "SELECT name FROM vtiger_tab WHERE name not in (" . generateQuestionMarks($modules_not_supported) . ") AND isentitytype=1 AND presence = 0 AND tabid = ?"; + $result = $adb->pquery($query, array($modules_not_supported, $tabid)); + $rows = $adb->num_rows($result); + if ($rows > 0) { + return true; + } else { + return false; + } + } + + function vtGetModules($adb) { + $modules_not_supported = array('Documents', 'Emails', 'PBXManager'); + $sql = "select distinct vtiger_field.tabid, name + from vtiger_field + inner join vtiger_tab + on vtiger_field.tabid=vtiger_tab.tabid + where vtiger_tab.name not in(" . generateQuestionMarks($modules_not_supported) . ") and vtiger_tab.isentitytype=1 and vtiger_tab.presence in (0,2) "; + $it = new SqlResultIterator($adb, $adb->pquery($sql, array($modules_not_supported))); + $modules = array(); + foreach ($it as $row) { + $modules[] = $row->name; + } + return $modules; + } + +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/WorkflowComponents.php b/modules/com_vtiger_workflow/WorkflowComponents.php new file mode 100644 index 0000000..33c0474 --- /dev/null +++ b/modules/com_vtiger_workflow/WorkflowComponents.php @@ -0,0 +1,101 @@ +fields($moduleName); + echo Zend_Json::encode(array('moduleFields' => $fields)); +} + +function vtJsonFunctions($adb) { + $mem = new VTExpressionsManager($adb); + $functions = $mem->expressionFunctions(); + echo Zend_Json::encode($functions); +} + +function vtJsonDependentModules($adb, $request) { + $moduleName = $request['modulename']; + + $result = $adb->pquery("SELECT fieldname, tabid, typeofdata, vtiger_ws_referencetype.type as reference_module FROM vtiger_field + INNER JOIN vtiger_ws_fieldtype ON vtiger_field.uitype = vtiger_ws_fieldtype.uitype + INNER JOIN vtiger_ws_referencetype ON vtiger_ws_fieldtype.fieldtypeid = vtiger_ws_referencetype.fieldtypeid + UNION + SELECT fieldname, tabid, typeofdata, relmodule as reference_module FROM vtiger_field + INNER JOIN vtiger_fieldmodulerel ON vtiger_field.fieldid = vtiger_fieldmodulerel.fieldid", array()); + + $noOfFields = $adb->num_rows($result); + $dependentFields = array(); + // List of modules which will not be supported by 'Create Entity' workflow task + $filterModules = array('Invoice', 'Quotes', 'SalesOrder', 'PurchaseOrder', 'Emails', 'Calendar', 'Events', 'Accounts'); + $skipFieldsList = array(); + for ($i = 0; $i < $noOfFields; ++$i) { + $tabId = $adb->query_result($result, $i, 'tabid'); + $fieldName = $adb->query_result($result, $i, 'fieldname'); + $typeOfData = $adb->query_result($result, $i, 'typeofdata'); + $referenceModule = $adb->query_result($result, $i, 'reference_module'); + $tabModuleName = getTabModuleName($tabId); + if (in_array($tabModuleName, $filterModules)) + continue; + if ($referenceModule == $moduleName && $tabModuleName != $moduleName) { + if(!vtlib_isModuleActive($tabModuleName))continue; + $dependentFields[$tabModuleName] = array('fieldname' => $fieldName, 'modulelabel' => getTranslatedString($tabModuleName, $tabModuleName)); + } else { + $dataTypeInfo = explode('~', $typeOfData); + if ($dataTypeInfo[1] == 'M') { // If the current reference field is mandatory + $skipFieldsList[$tabModuleName] = array('fieldname' => $fieldName); + } + } + } + foreach ($skipFieldsList as $tabModuleName => $fieldInfo) { + $dependentFieldInfo = $dependentFields[$tabModuleName]; + if ($dependentFieldInfo['fieldname'] != $fieldInfo['fieldname']) { + unset($dependentFields[$tabModuleName]); + } + } + + $returnValue = array('count' => count($dependentFields), 'entities' => $dependentFields); + + echo Zend_Json::encode($returnValue); +} + +function vtJsonOwnersList($adb) { + $ownersList = array(); + $activeUsersList = get_user_array(false); + $allGroupsList = get_group_array(false); + foreach ($activeUsersList as $userId => $userName) { + $ownersList[] = array('label' => $userName, 'value' => getUserName($userId)); + } + foreach ($allGroupsList as $groupId => $groupName) { + $ownersList[] = array('label' => $groupName, 'value' => $groupName); + } + + echo Zend_Json::encode($ownersList); +} + +global $adb; +$mode = vtlib_purify($_REQUEST['mode']); + +if ($mode == 'getfieldsjson') { + vtJsonFields($adb, $_REQUEST); +} elseif ($mode == 'getfunctionsjson') { + vtJsonFunctions($adb); +} elseif ($mode == 'getdependentfields') { + vtJsonDependentModules($adb, $_REQUEST); +} elseif ($mode == 'getownerslist') { + vtJsonOwnersList($adb); +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/com_vtiger_workflowAjax.php b/modules/com_vtiger_workflow/com_vtiger_workflowAjax.php new file mode 100644 index 0000000..067b69b --- /dev/null +++ b/modules/com_vtiger_workflow/com_vtiger_workflowAjax.php @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/config.inc b/modules/com_vtiger_workflow/config.inc new file mode 100644 index 0000000..8e50c88 --- /dev/null +++ b/modules/com_vtiger_workflow/config.inc @@ -0,0 +1,15 @@ + array('classpath' => 'modules/com_vtiger_workflow/VTWorkflowManager.inc', 'class' => 'Workflow'), +); + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/deletetask.php b/modules/com_vtiger_workflow/deletetask.php new file mode 100644 index 0000000..695fdc5 --- /dev/null +++ b/modules/com_vtiger_workflow/deletetask.php @@ -0,0 +1,45 @@ +name); + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + $wm = new VTTaskManager($adb); + $wm->deleteTask($request['task_id']); + + if(isset($request["return_url"])){ + $returnUrl=$request["return_url"]; + }else{ + $returnUrl=$module->editWorkflowUrl($wf->id); + } + + ?> + + Return + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/deleteworkflow.php b/modules/com_vtiger_workflow/deleteworkflow.php new file mode 100644 index 0000000..4a60462 --- /dev/null +++ b/modules/com_vtiger_workflow/deleteworkflow.php @@ -0,0 +1,44 @@ +name); + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + $wm = new VTWorkflowManager($adb); + $wm->delete($request['workflow_id']); + + if(isset($request["return_url"])){ + $returnUrl=$request["return_url"]; + }else{ + $returnUrl=$module->listViewUrl($wf->id); + } + + ?> + + Return + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/edittask.php b/modules/com_vtiger_workflow/edittask.php new file mode 100644 index 0000000..55ece8e --- /dev/null +++ b/modules/com_vtiger_workflow/edittask.php @@ -0,0 +1,126 @@ +name); + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + $smarty = new vtigerCRM_Smarty(); + $tm = new VTTaskManager($adb); + $smarty->assign('edit',isset($request["task_id"])); + if(isset($request["task_id"])){ + $task = $tm->retrieveTask($request["task_id"]); + $workflowId=$task->workflowId; + }else{ + $workflowId = $request["workflow_id"]; + $taskClass = $request["task_type"]; + $task = $tm->createTask($taskClass, $workflowId); + } + + if($task==null){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_TASK']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_TASK']); + return; + } + + $wm = new VTWorkflowManager($adb); + $workflow = $wm->retrieve($workflowId); + if($workflow==null){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_WORKFLOW']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_WORKFLOW']); + return; + } + + + $smarty->assign("workflow", $workflow); + $smarty->assign("returnUrl", $request["return_url"]); + $smarty->assign("task", $task); + $smarty->assign("taskType", $taskClass); + $smarty->assign("saveType", $request['save_type']); + $taskClass = get_class($task); + $smarty->assign("taskTemplate", "{$module->name}/taskforms/$taskClass.tpl"); + $et = VTWSEntityType::usingGlobalCurrentUser($workflow->moduleName); + $smarty->assign("entityType", $et); + $smarty->assign('entityName', $workflow->moduleName); + $smarty->assign("fieldNames", $et->getFieldNames()); + $repeat_date = $task->calendar_repeat_limit_date; + if(!empty ($repeat_date)){ + $repeat_date = DateTimeField::convertToUserFormat($repeat_date); + } + $smarty->assign('REPEAT_DATE',$repeat_date); + $dateFields = array(); + $fieldTypes = $et->getFieldTypes(); + $fieldLabels = $et->getFieldLabels(); + foreach($fieldTypes as $name => $type){ + if($type->type=='Date' || $type->type=='DateTime'){ + $dateFields[$name] = $fieldLabels[$name]; + } + } + + $smarty->assign('dateFields', $dateFields); + + + if($task->trigger!=null){ + $trigger = $task->trigger; + $days = $trigger['days']; + if ($days < 0){ + $days*=-1; + $direction = 'before'; + }else{ + $direction = 'after'; + } + $smarty->assign('trigger', array('days'=>$days, 'direction'=>$direction, + 'field'=>$trigger['field'])); + } + $metaVariables = $task->getMetaVariables(); + + $date = new DateTimeField(null); + $time = substr($date->getDisplayTime(), 0, 5); + $smarty->assign("META_VARIABLES",$metaVariables); + $smarty->assign("SYSTEM_TIMEZONE",$db_timezone); + $smarty->assign("USER_TIME",$task->formatTimeForTimePicker($time)); + $smarty->assign("USER_DATE", $date->getDisplayDate()); + $smarty->assign("MOD", array_merge( + return_module_language($current_language,'Settings'), + return_module_language($current_language, 'Calendar'), + return_module_language($current_language, $module->name))); + $smarty->assign("APP", $app_strings); + $smarty->assign("dateFormat", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); + $smarty->assign("IMAGE_PATH",$image_path); + $smarty->assign("THEME", $theme); + $smarty->assign("MODULE_NAME", $module->label); + $smarty->assign("PAGE_NAME", $mod['LBL_EDIT_TASK']); + $smarty->assign("PAGE_TITLE", $mod['LBL_EDIT_TASK_TITLE']); + + $smarty->assign("module", $module); + $smarty->display("{$module->name}/EditTask.tpl"); + } + vtTaskEdit($adb, $_REQUEST, $current_language, $app_strings); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/editworkflow.php b/modules/com_vtiger_workflow/editworkflow.php new file mode 100644 index 0000000..b4547c1 --- /dev/null +++ b/modules/com_vtiger_workflow/editworkflow.php @@ -0,0 +1,91 @@ +name); + + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + + $smarty = new vtigerCRM_Smarty(); + if($request['source']=='from_template'){ + $tm = new VTWorkflowTemplateManager($adb); + $template = $tm->retrieveTemplate($request['template_id']); + $workflow = $tm->createWorkflow($template); + }else{ + $wfs = new VTWorkflowManager($adb); + if(isset($request["workflow_id"])){ + $workflow = $wfs->retrieve($request["workflow_id"]); + }else{ + $moduleName=$request["module_name"]; + $workflow = $wfs->newWorkflow($moduleName); + } + } + + if($workflow==null){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NO_WORKFLOW']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NO_WORKFLOW']); + return; + } + $workflow->test = addslashes($workflow->test); + $tm = new VTTaskManager($adb); + $tasks = $tm->getTasksForWorkflow($workflow->id); + $smarty->assign("tasks", $tasks); + $taskTypes = $tm->getTaskTypes($workflow->moduleName); + $smarty->assign("taskTypes", $taskTypes); + $smarty->assign("newTaskReturnUrl", vtlib_purify($requestUrl)); + + $smarty->assign("returnUrl", vtlib_purify($request["return_url"])); + $smarty->assign("APP", $app_strings); + $smarty->assign("MOD", array_merge( + return_module_language($current_language,'Settings'), + return_module_language($current_language, $module->name))); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH", $image_path); + $smarty->assign("MODULE_NAME", $module->label); + $smarty->assign("PAGE_NAME", $mod['LBL_EDIT_WORKFLOW']); + $smarty->assign("PAGE_TITLE", $mod['LBL_EDIT_WORKFLOW_TITLE']); + + $smarty->assign("workflow", $workflow); + $smarty->assign("saveType", isset($workflow->id)?"edit":"new"); + $smarty->assign("module", $module); + + $smarty->assign("WORKFLOW_TRIGGER_TYPES_HELP_LINK", $helpLinks['WORKFLOW_TRIGGER_TYPES']); + + $smarty->display("{$module->name}/EditWorkflow.tpl"); +} +vtWorkflowEdit($adb, $_REQUEST, $_SERVER["REQUEST_URI"], $current_language, $app_strings); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/entitymethodjson.php b/modules/com_vtiger_workflow/entitymethodjson.php new file mode 100644 index 0000000..37f7172 --- /dev/null +++ b/modules/com_vtiger_workflow/entitymethodjson.php @@ -0,0 +1,21 @@ +methodsForModule($moduleName); + echo Zend_Json::encode($methodNames); +} + +vtEntityMethodJson($adb, $_REQUEST); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/errormessage.php b/modules/com_vtiger_workflow/errormessage.php new file mode 100644 index 0000000..88a1539 --- /dev/null +++ b/modules/com_vtiger_workflow/errormessage.php @@ -0,0 +1,12 @@ + +

          Error

          + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/errorpage.php b/modules/com_vtiger_workflow/errorpage.php new file mode 100644 index 0000000..cf48622 --- /dev/null +++ b/modules/com_vtiger_workflow/errorpage.php @@ -0,0 +1,18 @@ + +

          Workflow engine error

          + + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/expression_engine/VTExpressionEvaluater.inc b/modules/com_vtiger_workflow/expression_engine/VTExpressionEvaluater.inc new file mode 100644 index 0000000..fe86a10 --- /dev/null +++ b/modules/com_vtiger_workflow/expression_engine/VTExpressionEvaluater.inc @@ -0,0 +1,204 @@ += $arr[1]; +} + +function __vt_lt($arr) { + return $arr[0] < $arr[1]; +} + +function __vt_gt($arr) { + return $arr[0] > $arr[1]; +} + +function __vt_concat($arr){ + return implode($arr); +} +/* Date difference between (input times) or (current time and input time) + * + * @param Array $a $a[0] - Input time1, $a[1] - Input time2 + * (if $a[1] is not available $a[0] = Current Time, $a[1] = Input time1) + * @return int difference timestamp + */ + +function __vt_time_diff($arr) { + + $time_operand1 = $time_operand2 = 0; + if(count($arr) > 1) { + $time_operand1 = $arr[0]; + $time_operand2 = $arr[1]; + } else { + $time_operand1 = date('Y-m-d H:i:s'); // Current time + $time_operand2 = $arr[0]; + } + + if(empty($time_operand1) || empty($time_operand2)) return 0; + + $time_operand1 = getValidDBInsertDateValue($time_operand1); + $time_operand2 = getValidDBInsertDateValue($time_operand2); + + return (strtotime($time_operand1) - strtotime($time_operand2)); +} +/** + * Calculate the time difference (input times) or (current time and input time) and + * convert it into number of days. + * @param Array $a $a[0] - Input time1, $a[1] - Input time2 + * (if $a[1] is not available $a[0] = Current Time, $a[1] = Input time1) + * @return int number of days + */ +function __vt_time_diffdays($arr) { + $timediff = __vt_time_diff($arr); + $days_diff = floor($timediff / (60 * 60 * 24)); + return $days_diff; +} + +function __vt_add_days($arr) { + + if (count($arr) > 1) { + $baseDate = $arr[0]; + $noOfDays = $arr[1]; + } else { + $noOfDays = $arr[0]; + } + if($baseDate==null || empty($baseDate)) { + $baseDate = date('Y-m-d'); // Current date + } + preg_match('/\d\d\d\d-\d\d-\d\d/', $baseDate, $match); + $baseDate = strtotime($match[0]); + $date = strftime('%Y-%m-%d', $baseDate + ($noOfDays * 24 * 60 * 60)); + return $date; +} + +function __vt_sub_days($arr) { + + if (count($arr) > 1) { + $baseDate = $arr[0]; + $noOfDays = $arr[1]; + } else { + $noOfDays = $arr[0]; + } + if($baseDate==null || empty($baseDate)) { + $baseDate = date('Y-m-d'); // Current date + } + preg_match('/\d\d\d\d-\d\d-\d\d/', $baseDate, $match); + $baseDate = strtotime($match[0]); + $date = strftime('%Y-%m-%d', $baseDate - ($noOfDays * 24 * 60 * 60)); + return $date; +} + +function __vt_get_date($arr) { + $type = $arr[0]; + switch ($type) { + case 'today': return date('Y-m-d'); + break; + default : return date('Y-m-d'); + break; + } +} + +/** END * */ +class VTFieldExpressionEvaluater{ + function __construct($expr){ + + $this->operators = array( + '+' => '__vt_add', + '-' => '__vt_sub', + '*' => '__vt_mul', + '/' => '__vt_div', + '==' => '__vt_equals', + '<=' => '__vt_ltequals', + '>=' => '__vt_gtequals', + '<' => '__vt_lt', + '>' => '__vt_gt', + ); + $this->functions = array( + 'concat'=>'__vt_concat', + 'time_diff' => '__vt_time_diff', + 'time_diffdays' => '__vt_time_diffdays', + 'add_days' => '__vt_add_days', + 'sub_days' => '__vt_sub_days', + 'get_date' => '__vt_get_date' + ); + + $this->operations = array_merge($this->functions, $this->operators); + $this->expr = $expr; + + } + + function evaluate($env){ + $this->env = $env; + return $this->exec($this->expr); + } + + function exec($expr){ + if($expr instanceof VTExpressionSymbol){ + return $this->env($expr); + }else if($expr instanceof VTExpressionTreeNode){ + $op = $expr->getName(); + if($op->value=='if'){ + $params = $expr->getParams(); + $cond = $this->exec($params[0]); + if($cond){ + return $this->exec($params[1]); + }else{ + return $this->exec($params[2]); + } + }else{ + $params = array_map(array($this, 'exec'), $expr->getParams()); + $func = $this->operations[$op->value]; + return $func($params); + } + }else{ + return $expr; + } + } + + function env($sym){ + return $this->env->get($sym->value); + } +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/expression_engine/VTExpressionsManager.inc b/modules/com_vtiger_workflow/expression_engine/VTExpressionsManager.inc new file mode 100644 index 0000000..0a7c4d9 --- /dev/null +++ b/modules/com_vtiger_workflow/expression_engine/VTExpressionsManager.inc @@ -0,0 +1,48 @@ +adb = $adb; + } + + /** Caching logic **/ + private static $cache = array(); + static function addToCache($key, $value) { + self::$cache[$key] = $value; + } + static function fromCache($key) { + if(isset(self::$cache[$key])) return self::$cache[$key]; + return false; + } + static function clearCache() { + self::$cache = array(); + } + /** END **/ + + function fields($moduleName){ + global $current_user; + $result = vtws_describe($moduleName, $current_user); + $fields = $result['fields']; + $arr = array(); + foreach($fields as $field){ + $arr[$field['name']] = $field['label']; + } + return $arr; + } + + function expressionFunctions() { + return array('concat' => 'concat(a,b)', 'time_diffdays' => 'time_diffdays(a,b)', 'time_diff' => 'time_diff(a,b)', + 'add_days' => 'add_days(datefield, noofdays)', 'sub_days' => 'sub_days(datefield, noofdays)', + 'get_date' => "get_date('today')"); + } +} + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/expression_engine/VTParser.inc b/modules/com_vtiger_workflow/expression_engine/VTParser.inc new file mode 100644 index 0000000..1c25c5b --- /dev/null +++ b/modules/com_vtiger_workflow/expression_engine/VTParser.inc @@ -0,0 +1,184 @@ +arr = $arr; + } + + function getParams(){ + $arr = $this->arr; + return array_slice($arr, 1, sizeof($arr)-1); + } + + function getName(){ + return $this->arr[0]; + } +} + + +class VTExpressionSymbol{ + function __construct($value){ + $this->value = $value; + } + + function __toString(){ + return "VTExpressionSymbol({$this->value})"; + } +} + +class VTExpressionParser{ + function __construct($tokens){ + $this->tokens = $tokens; + $this->tokenQueue = array(); + } + + function nextToken(){ + if(sizeof($this->tokenQueue)==0){ + return $this->tokens->nextToken(); + }else{ + return array_shift($this->tokenQueue); + } + } + + function la($n = 1){ + for($i=sizeof($this->tokenQueue); $i<$n; $i++){ + $token = $this->tokens->nextToken(); + $this->tokenQueue[] = $token; + } + return $this->tokenQueue[$n-1]; + } + + function consume($label, $value){ + $token=$this->nextToken(); + if($token->label!=$label || $token->value!=$value){ + echo "Was expecting a $label of value $value got a {$token->label} of {$token->value} instead."; + throw new Exception("Was expecting a $label of value $value got a {$token->label} of {$token->value} instead."); + } + } + + function consumeSymbol($sym){ + $this->consume('SYMBOL', new VTExpressionSymbol($sym)); + } + + + function check($token, $label, $value){ + return $token->label == $label && $token->value==$value; + } + + function checkSymbol($token, $sym){ + return $this->check($token, 'SYMBOL', new VTExpressionSymbol($sym)); + } + + function atom(){ + $token = $this->nextToken(); + switch($token->label){ + case "STRING": + return $token->value; + case "INTEGER": + return $token->value; + case "FLOAT": + return $token->value; + case "SYMBOL": + return $token->value; + case "OPEN_BRACKET": + $val = $this->expression(); + $close = $this->nextToken(); + if($close->label != 'CLOSE_BRACKET'){ + throw new Exception("Was expecting a close bracket"); + } + return $val; + default: + print_r($token); + throw new Exception(); + } + } + + function ifCondition(){ + $this->consumeSymbol('if'); + $cond = $this->expression(); + $this->consumeSymbol('then'); + $ifTrue = $this->expression(); + $this->consumeSymbol('else'); + if($this->checkSymbol($this->la(), 'if')){ + $ifFalse = $this->ifCondition(); + }else{ + $ifFalse = $this->expression(); + $this->consumeSymbol('end'); + } + return new VTExpressionTreeNode(array(new VTExpressionSymbol('if'), $cond, $ifTrue, $ifFalse)); + } + + function expression(){ + $la1 = $this->la(1); + $la2 = $this->la(2); + if($this->checkSymbol($la1, 'if')){ + return $this->ifCondition(); + }else if($la1->label=='SYMBOL' && $la2->label=='OPEN_BRACKET'){ + $arr = array($this->nextToken()->value); + $this->nextToken(); + if($this->la()->label != 'CLOSE_BRACKET'){ + $arr[] = $this->expression(); + $comma = $this->nextToken(); + while($comma->label == 'COMMA'){ + $arr[] = $this->expression(); + $comma = $this->nextToken(); + } + if($comma->label != 'CLOSE_BRACKET'){ + throw new Exception("Was expecting a closing bracket"); + } + }else{ + $this->consume('CLOSE_BRACKET', new Symbol(')')); + } + return new VTExpressionTreeNode($arr); + }else{ + return $this->binOp(); + } + } + + var $precedence = array( + array('*', '/'), + array('+', '-'), + array('and', 'or'), + array('==', '>=', '<=', '>', '<') + ); + + function binOp(){ + return $this->binOpPrec(sizeof($this->precedence)-1); + } + + private function binOpPrec($prec){ + if($prec>=0){ + $lhs = $this->binOpPrec($prec-1); + $la = $this->la(); + if($la->label == 'OPERATOR' && in_array($la->value->value, $this->precedence[$prec])){ + $operator = $this->nextToken()->value; + $rhs = $this->binOpPrec($prec); + return new VTExpressionTreeNode(array($operator, $lhs, $rhs)); + }else{ + return $lhs; + } + }else{ + return $this->unaryOp(); + } + } + + function unaryOp(){ + $la = $this->la(); + if($la->label=="OPERATOR" && in_array($la->value->value, array('+', '-'))){ + $token = $this->nextToken(); + $operator = $la->value; + $operand = $this->unaryOp(); + return new VTExpressionTreeNode(array($operator, $operand)); + }else{ + return $this->atom(); + } + } +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/expression_engine/VTTokenizer.inc b/modules/com_vtiger_workflow/expression_engine/VTTokenizer.inc new file mode 100644 index 0000000..cc11a38 --- /dev/null +++ b/modules/com_vtiger_workflow/expression_engine/VTTokenizer.inc @@ -0,0 +1,93 @@ +label = $label; + } +} + +function _vt_processtoken_id($token){ + return $token; +} + +function _vt_processtoken_symbol($token){ + return new VTEXpressionSymbol($token); +} + +class VTExpressionTokenizer{ + function __construct($expr){ + $tokenTypes = array( + "SPACE" => array('\s+', '_vt_processtoken_id'), + "SYMBOL" => array('[a-zA-Z][\w]*', '_vt_processtoken_symbol'), + "ESCAPED_SYMBOL" => array('?:`([^`]+)`', '_vt_processtoken_symbol'), + //"STRING" => array('?:(?:"((?:\\\\"|[^"])+)"|'."'((?:\\\\'|[^'])+)')", 'stripcslashes'), + //"STRING" => array('?:"((?:\\\\"|[^"])+)"', 'stripcslashes'), + "STRING" => array("?:'((?:\\\\'|[^'])+)'", 'stripcslashes'), + "FLOAT" => array('\d+[.]\d+', 'floatval'), + "INTEGER" => array('\d+', 'intval'), + 'OPERATOR' => array('[+]|[-]|[*]|>=|<=|[<]|[>]|==|\/', '_vt_processtoken_symbol'), + // NOTE: Any new Operator added should be updated in VTParser.inc::$precedence and operation at VTExpressionEvaluater + 'OPEN_BRACKET' => array('[(]', '_vt_processtoken_symbol'), + 'CLOSE_BRACKET' => array('[)]', '_vt_processtoken_symbol'), + 'COMMA' => array('[,]', '_vt_processtoken_symbol') + ); + $tokenReArr = array(); + $tokenNames = array(); + $this->tokenTypes = $tokenTypes; + + foreach($tokenTypes as $tokenName => $code){ + list($re, $processtoken) = $code; + $tokenReArr[] = '('.$re.')'; + $tokenNames[] = $tokenName; + } + $this->tokenNames = $tokenNames; + $tokenRe = '/'.implode('|', $tokenReArr).'/'; + $this->EOF = new VTExpressionToken("EOF"); + + $matches = array(); + preg_match_all($tokenRe, $expr, $matches, PREG_SET_ORDER); + $this->matches = $matches; + $this->idx = 0; + } + function nextToken(){ + $matches = $this->matches; + $idx = $this->idx; + if($idx == sizeof($matches)){ + return $this->EOF; + }else{ + $match = $matches[$idx]; + $this->idx = $idx + 1; + $i=1; + while($match[$i]==null){ + $i+=1; + } + $tokenName = $this->tokenNames[$i-1]; + $token = new VTExpressionToken($tokenName); + $token->value = $this->tokenTypes[$tokenName][1]($match[$i]); + return $token; + } + } +} + +class VTExpressionSpaceFilter{ + function __construct($tokens){ + $this->tokens = $tokens; + } + + function nextToken(){ + do{ + $token = $this->tokens->nextToken(); + }while($token->label == "SPACE"); + return $token; + } +} + + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/expression_engine/include.inc b/modules/com_vtiger_workflow/expression_engine/include.inc new file mode 100644 index 0000000..3b20d69 --- /dev/null +++ b/modules/com_vtiger_workflow/expression_engine/include.inc @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/include.inc b/modules/com_vtiger_workflow/include.inc new file mode 100644 index 0000000..a744a58 --- /dev/null +++ b/modules/com_vtiger_workflow/include.inc @@ -0,0 +1,15 @@ + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/include_webservices.php b/modules/com_vtiger_workflow/include_webservices.php new file mode 100644 index 0000000..7891335 --- /dev/null +++ b/modules/com_vtiger_workflow/include_webservices.php @@ -0,0 +1,18 @@ + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/language/de_de.lang.php b/modules/com_vtiger_workflow/language/de_de.lang.php new file mode 100644 index 0000000..1f32e39 --- /dev/null +++ b/modules/com_vtiger_workflow/language/de_de.lang.php @@ -0,0 +1,92 @@ + 'Sende E-Mail', + 'VTEntityMethodTask' => 'benutzerdefinierte Funktion aktivieren', + 'VTCreateTodoTask' => 'Aufgabe erzeugen', + 'VTCreateEventTask' => 'Ereignis erzeugen', + 'VTSMSTask' => 'SMS Aufgabe', + 'LBL_EDIT_TASK'=>'Aufgabe bearbeiten', + 'LBL_EDIT_TASK_TITLE'=>'bearbeite eine Aufgabe oder erzeuge eine neue', + 'LBL_EDIT_WORKFLOW'=>'Workflow bearbeiten', + 'LBL_EDIT_WORKFLOW_TITLE'=>'bearbeite Workflow oder erzeugen einen neuen', + 'LBL_FROM_TEMPLATE'=>'aus einer Vorlage', + 'LBL_NEW_WORKFLOW'=>'neuer Workflow', + 'LBL_NEW_TEMPLATE'=>'als Vorlage speichern', + 'LBL_CREATE_WORKFLOW_FOR'=>'Erzeuge Workflow für', + 'LBL_FOR_MODULE'=>'für Modul', + 'LBL_CHOOSE_A_TEMPLATE'=>'Vorlage auswählen', + 'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'Pflichtfelder sind leer.', + 'LBL_VALIDATION_INVALID_DATE_RANGE'=>'Die Anfangszeit liegt nach der Endezeit', + 'LBL_ERROR_NO_WORKFLOW'=>'Dieser Workflow existiert nicht', + 'LBL_ERROR_NO_TASK'=>'Diese Aufgabe existiert nicht', + 'LBL_ERROR_NOT_ADMIN'=>'Diesen CRM Modul können nur Nutzer mit Administratorrechten nutzen.', + 'LBL_CREATE_WORKFLOW'=>'Workflow erzeugen', + 'LBL_WORKFLOW_LIST'=>'Liste der Workflow', + 'LBL_AVAILABLE_WORKLIST_LIST'=>'Verfügbare Workflows', + 'LBL_LOADING'=>'Lade...', + 'LBL_VALIDATION_ERROR'=>'Überprüfungsfehler', + 'LBL_SELECT_OPTION_DOTDOTDOT'=>'Option wählen...', + 'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'Hinweis: Sie können die Ersatzfelder verwenden.', + 'LBL_NO_TEMPLATES'=>'keine Vorlagen verfügbar', + 'LBL_SELECT'=>'Wähle', + 'LBL_MESSAGE'=>'Nachricht', + 'LBL_SET_FIELD_VALUES'=>'Setze Feldwerte', + 'LBL_ADD_FIELD'=>'Feld hinzufügen', + + 'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- benutze Feldwert --', + 'LBL_USE_FUNCTION_DASHDASH'=>'-- benutze Funktion --', + + 'LBL_RAW_TEXT'=>'reiner Text', + 'LBL_FIELD'=>'Feld', + 'LBL_EXPRESSION'=>'Ausdruck', + 'LBL_SET_EXPRESSION'=>'setze Ausdruck', + + 'LBL_MANUAL'=>'System', + + 'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL'=>'neue Bedinungsgruppe', + + 'VTUpdateFieldsTask' => 'aktualisiere Felder', + + + 'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'Ein Feld wurde mehrmals gewählt.', + 'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Ungültee Feldwerte', + 'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Hinweis: Ausdrücke werden in der Reihenfolde der Feldwerte ausgewerte. + Stellen Sie sicher, dass der gesuchte Wert im Ausdruck zur Verfügung steht.', + 'LBL_SET_VALUE' => 'setze Wert', + + 'LBL_EMAIL_RECIPIENT' => 'Empfänger', + 'LBL_EMAIL_CC' => 'CC', + 'LBL_EMAIL_BCC' => 'BCC', + 'LBL_EMAIL_SUBJECT' => 'Betreff', + + 'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Hinweis: alle Datums-, Zeit- und wiederkehrende Informatione, die für Aktivitäten konfiguriert wurden + berücksichtigen die in der Konfigurationsdatei "config.inc.php" gesetzte Zeitzone', + + 'Select Meta Variables' => 'Wähle Meta Variable', + 'Current Date' => 'aktuelles Datum', + 'Current Time' => 'aktuelle Zeit', + 'System Timezone' => 'System Zeitzohne', + 'CRM Detail View URL' => 'URL zur CRM Detailansicht', + 'Portal Detail View URL' => 'URL zur Portal Detailansicht', + 'Site Url' => 'Webadresse', + 'Portal Url' => 'Portaladresse', + + 'Workflow'=>'Workflow', + + 'VTCreateEntityTask' => 'erstelle Objekt', + 'LBL_ENTITY_TYPE' => 'Objekttyp', + 'LBL_SELECT_ENTITY_TYPE' => '-- wähle Objekttyp --', + 'LBL_NO_ENTITIES_FOUND' => 'Keine Objekte zum erstellen gefunden', +); + + +?> diff --git a/modules/com_vtiger_workflow/language/en_gb.lang.php b/modules/com_vtiger_workflow/language/en_gb.lang.php new file mode 100644 index 0000000..5acf204 --- /dev/null +++ b/modules/com_vtiger_workflow/language/en_gb.lang.php @@ -0,0 +1,76 @@ + 'Send Email', + 'VTEntityMethodTask' => 'Invoke Custom Function', + 'VTCreateTodoTask' => 'Create To Do', + 'VTCreateEventTask' => 'Create Event', + 'VTSMSTask' => 'SMS Task', + 'LBL_EDIT_TASK' => 'Edit Task', + 'LBL_EDIT_TASK_TITLE' => 'Edit an existing Task or create a new one', + 'LBL_EDIT_WORKFLOW' => 'Edit Workflow', + 'LBL_EDIT_WORKFLOW_TITLE' => 'Edit an existing Workflow or create a new one', + 'LBL_FROM_TEMPLATE' => 'From Template', + 'LBL_NEW_WORKFLOW' => 'New Workflow', + 'LBL_NEW_TEMPLATE' => 'Save as Template', + 'LBL_CREATE_WORKFLOW_FOR' => 'Create a Workflow for', + 'LBL_FOR_MODULE' => 'For Module', + 'LBL_CHOOSE_A_TEMPLATE' => 'Choose a template', + 'LBL_VALIDATION_MISSING_MANDATORY_FIELDS' => 'There are empty mandatory fields.', + 'LBL_VALIDATION_INVALID_DATE_RANGE' => 'Start date/time is greater than the end date/time', + 'LBL_ERROR_NO_WORKFLOW' => 'The Workflow you requested does not exist', + 'LBL_ERROR_NO_TASK' => 'The Task you requested does not exist', + 'LBL_ERROR_NOT_ADMIN' => 'You do not have access to this module as you are not an admin user', + 'LBL_CREATE_WORKFLOW' => 'Create Workflow', + 'LBL_WORKFLOW_LIST' => 'Workflow List', + 'LBL_AVAILABLE_WORKLIST_LIST' => 'Available Workflows', + 'LBL_LOADING' => 'Loading...', + 'LBL_VALIDATION_ERROR' => 'Validation Error', + 'LBL_SELECT_OPTION_DOTDOTDOT' => 'Select Option...', + 'LBL_WORKFLOW_NOTE_CRON_CONFIG' => 'NOTE: You should have the Workflow cron script configured.', + 'LBL_NO_TEMPLATES' => 'No Templates', + 'LBL_SELECT' => 'Select', + 'LBL_MESSAGE' => 'Message', + 'LBL_SET_FIELD_VALUES' => 'Set field values', + 'LBL_ADD_FIELD' => 'Add field', + 'LBL_USE_FIELD_VALUE_DASHDASH' => '-- Use field value --', + 'LBL_USE_FUNCTION_DASHDASH' => '-- Use function --', + 'LBL_RAW_TEXT' => 'Raw text', + 'LBL_FIELD' => 'Field', + 'LBL_EXPRESSION' => 'Expression', + 'LBL_SET_EXPRESSION' => 'Set expression', + 'LBL_MANUAL' => 'System', + 'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL' => 'New Condition Group', + 'VTUpdateFieldsTask' => 'Update fields', + 'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'Same field selected more than once.', + 'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Invalid field values', + 'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Note: Expressions will be evaluated in the order of the field values provided, so be sure to provide a value for a field before using it in expressions.', + 'LBL_SET_VALUE' => 'Set value', + 'LBL_EMAIL_RECIPIENT' => 'Recipient', + 'LBL_EMAIL_CC' => 'CC', + 'LBL_EMAIL_BCC' => 'BCC', + 'LBL_EMAIL_SUBJECT' => 'Subject', + 'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Note: The date, time and recurring information configured for the event will be with respect to default time zone, configured in config.inc.php', + 'Select Meta Variables' => 'Select Meta Variables', + 'Current Date' => 'Current Date', + 'Current Time' => 'Current Time', + 'System Timezone' => 'System Timezone', + 'CRM Detail View URL' => 'CRM Detail View URL', + 'Portal Detail View URL' => 'Portal Detail View URL', + 'Site Url' => 'Site URL', + 'Portal Url' => 'Portal URL', + 'Workflow' => 'Workflow', + 'VTCreateEntityTask' => 'Create Entity', + 'LBL_ENTITY_TYPE' => 'Entity Type', + 'LBL_SELECT_ENTITY_TYPE' => '-- Select Entity Type --', + 'LBL_NO_ENTITIES_FOUND' => 'No Entities Found to Create', +); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/language/en_us.lang.php b/modules/com_vtiger_workflow/language/en_us.lang.php new file mode 100644 index 0000000..b702ee4 --- /dev/null +++ b/modules/com_vtiger_workflow/language/en_us.lang.php @@ -0,0 +1,91 @@ + 'Send Email', +'VTEntityMethodTask' => 'Invoke Custom Function', +'VTCreateTodoTask' => 'Create Todo', +'VTCreateEventTask' => 'Create Event', +'VTSMSTask' => 'SMS Task', +'LBL_EDIT_TASK'=>'Edit Task', +'LBL_EDIT_TASK_TITLE'=>'Edit an existing task or create a new one', +'LBL_EDIT_WORKFLOW'=>'Edit Workflow', +'LBL_EDIT_WORKFLOW_TITLE'=>'Edit an existing workflow or create a one', +'LBL_FROM_TEMPLATE'=>'From Template', +'LBL_NEW_WORKFLOW'=>'New Workflow', +'LBL_NEW_TEMPLATE'=>'Save as Template', +'LBL_CREATE_WORKFLOW_FOR'=>'Create a workflow for', +'LBL_FOR_MODULE'=>'For Module', +'LBL_CHOOSE_A_TEMPLATE'=>'Choose a template', +'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'There are empty mandatory fields.', +'LBL_VALIDATION_INVALID_DATE_RANGE'=>'Start date/time is greater than the end date/time', +'LBL_ERROR_NO_WORKFLOW'=>'The workflow you requested does not exist', +'LBL_ERROR_NO_TASK'=>'The task you requested does not exist', +'LBL_ERROR_NOT_ADMIN'=>'You do not have access to this module as you are not an admin user', +'LBL_CREATE_WORKFLOW'=>'Create workflow', +'LBL_WORKFLOW_LIST'=>'Workflow List', +'LBL_AVAILABLE_WORKLIST_LIST'=>'Available Workflows', +'LBL_LOADING'=>'Loading...', +'LBL_VALIDATION_ERROR'=>'Validation Error', +'LBL_SELECT_OPTION_DOTDOTDOT'=>'Select Option...', +'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'NOTE: You should have Workflow cron script configured.', +'LBL_NO_TEMPLATES'=>'No Templates', +'LBL_SELECT'=>'Select', +'LBL_MESSAGE'=>'Message', +'LBL_SET_FIELD_VALUES'=>'Set Field Values', +'LBL_ADD_FIELD'=>'Add Field', + +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Use Field Value --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Use Function --', + +'LBL_RAW_TEXT'=>'Raw Text', +'LBL_FIELD'=>'Field', +'LBL_EXPRESSION'=>'Expression', +'LBL_SET_EXPRESSION'=>'Set Expression', + +'LBL_MANUAL'=>'System', + +'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL'=>'New Condition Group', + +'VTUpdateFieldsTask' => 'Update Fields', + + +'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'Same field selected more than once.', +'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Invalid field values', +'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Note: Expressions will be evaluated in the order of the field values provided. + So make sure to provide value for a field before using it in expressions.', +'LBL_SET_VALUE' => 'Set Value', + +'LBL_EMAIL_RECIPIENT' => 'Recipient', +'LBL_EMAIL_CC' => 'CC', +'LBL_EMAIL_BCC' => 'BCC', +'LBL_EMAIL_SUBJECT' => 'Subject', + +'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Note: All the date, time and recurring information configured for the event, + will be with respect to default time zone, configured in config.inc.php', + +'Select Meta Variables' => 'Select Meta Variables', +'Current Date' => 'Current Date', +'Current Time' => 'Current Time', +'System Timezone' => 'System Timezone', +'CRM Detail View URL' => 'CRM Detail View URL', +'Portal Detail View URL' => 'Portal Detail View URL', +'Site Url' => 'Site Url', +'Portal Url' => 'Portal Url', + +'Workflow'=>'Workflow', + +'VTCreateEntityTask' => 'Create Entity', +'LBL_ENTITY_TYPE' => 'Entity Type', +'LBL_SELECT_ENTITY_TYPE' => '-- Select Entity Type --', +'LBL_NO_ENTITIES_FOUND' => 'No Entities Found to Create', +); + + +?> diff --git a/modules/com_vtiger_workflow/language/es_es.lang.php b/modules/com_vtiger_workflow/language/es_es.lang.php new file mode 100644 index 0000000..5cf9a06 --- /dev/null +++ b/modules/com_vtiger_workflow/language/es_es.lang.php @@ -0,0 +1,86 @@ + 'Enviar Correo', +'VTEntityMethodTask' => 'Ejecutar Función', +'VTCreateTodoTask' => 'Crear Tarea', +'VTCreateEventTask' => 'Crear Evento', +'VTSMSTask' => 'Enviar SMS', +'LBL_EDIT_TASK'=>'Editar Tarea', +'LBL_EDIT_TASK_TITLE'=>'Editar una tarea existente o crear una nueva', +'LBL_EDIT_WORKFLOW'=>'Editar Flujo Trabajo', +'LBL_EDIT_WORKFLOW_TITLE'=>'Editar un flujo de trabajo existente o crear uno nuevo', +'LBL_FROM_TEMPLATE'=>'Basado en plantilla', +'LBL_NEW_WORKFLOW'=>'Nuevo Flujo de Trabajo', +'LBL_NEW_TEMPLATE'=>'Guardar como Plantilla', +'LBL_CREATE_WORKFLOW_FOR'=>'Crear un flujo de trabajo para', +'LBL_FOR_MODULE'=>'Para Módulo', +'LBL_CHOOSE_A_TEMPLATE'=>'Elige plantilla', +'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'Hay campos obligatorios vacíos.', +'LBL_VALIDATION_INVALID_DATE_RANGE'=>'Fecha/Hora de inicio es superior a Fecha/Hora fin', +'LBL_ERROR_NO_WORKFLOW'=>'El flujo de trabajo al que intentas acceder no existe', +'LBL_ERROR_NO_TASK'=>'La tarea a la que intentas acceder no existe', +'LBL_ERROR_NOT_ADMIN'=>'Solo el usuario administrador tiene acceso a este módulo', +'LBL_CREATE_WORKFLOW'=>'Crear flujo trabajo', +'LBL_WORKFLOW_LIST'=>'Flujos de Trabajo', +'LBL_AVAILABLE_WORKLIST_LIST'=>'Flujos de Trabajo Disponibles', +'LBL_LOADING'=>'Cargando...', +'LBL_VALIDATION_ERROR'=>'Error de Validación', +'LBL_SELECT_OPTION_DOTDOTDOT'=>'Selecciona Opción...', +'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'NOTA: Debes configurar la tarea programada de Flujo de Trabajo.', +'LBL_NO_TEMPLATES'=>'Sin Plantillas', +'LBL_SELECT'=>'Selecciona', +'LBL_MESSAGE'=>'Mensaje', +'LBL_SET_FIELD_VALUES'=>'Establecer valor de campo', +'LBL_ADD_FIELD'=>'Añadir campo', + +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Utilizar Valor --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Utilizar Función --', + +'LBL_RAW_TEXT'=>'Texto', +'LBL_FIELD'=>'Campo', +'LBL_EXPRESSION'=>'Expresión', +'LBL_SET_EXPRESSION'=>'Expresión Asignación', + +'LBL_MANUAL'=>'Sistema', + +'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL'=>'Añadir Condición de Grupo', + +'VTUpdateFieldsTask' => 'Actualizar Campos', + +'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'El mismo campo ha sido seleccionado más de una vez.', +'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Valores de Campos Inválidos', +'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Nota: Las expresiones se evalúan en el orden de los campos. + Así que asegurate de asignar un valor al campo antes de utilizarlo.', +'LBL_SET_VALUE' => 'Establecer Valor', + +'LBL_EMAIL_RECIPIENT' => 'Destinatario', +'LBL_EMAIL_CC' => 'CC', +'LBL_EMAIL_BCC' => 'BCC', +'LBL_EMAIL_SUBJECT' => 'Asunto', + +'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Nota: Todas las fechas, horas e información recurrente configurada para el evento, + serán respecto a la zona horaria por defecto, configurada en config.inc.php', + +'Select Meta Variables' => 'Selecciona Meta Variables', +'Current Date' => 'Fecha Actual', +'Current Time' => 'Hora Actual', +'System Timezone' => 'Zona Horaria del Sistema', +'CRM Detail View URL' => 'URL Vista Detalle del CRM', +'Portal Detail View URL' => 'URL Vista Detalle del Portal', +'Site Url' => 'Url CRM', +'Portal Url' => 'Url Portal', + +'Workflow'=>'Flujo de Trabajo', + +'VTCreateEntityTask' => 'Crear Entidad', +'LBL_ENTITY_TYPE' => 'Tipo Entidad', +'LBL_SELECT_ENTITY_TYPE' => '-- Selecciona Tipo Entidad --', +'LBL_NO_ENTITIES_FOUND' => 'No se han encontrado entidades para crear', + +); +?> diff --git a/modules/com_vtiger_workflow/language/es_mx.lang.php b/modules/com_vtiger_workflow/language/es_mx.lang.php new file mode 100644 index 0000000..d86b770 --- /dev/null +++ b/modules/com_vtiger_workflow/language/es_mx.lang.php @@ -0,0 +1,91 @@ + 'Enviar Correo', +'VTEntityMethodTask' => 'Ejecutar Función', +'VTCreateTodoTask' => 'Crear Tarea', +'VTCreateEventTask' => 'Crear Evento', +'VTSMSTask' => 'Enviar SMS', +'LBL_EDIT_TASK'=>'Editar Tarea', +'LBL_EDIT_TASK_TITLE'=>'Editar una tarea existente o crear una nueva', +'LBL_EDIT_WORKFLOW'=>'Editar Flujo Trabajo', +'LBL_EDIT_WORKFLOW_TITLE'=>'Editar un flujo de trabajo existente o crear uno nuevo', +'LBL_FROM_TEMPLATE'=>'De Plantilla', +'LBL_NEW_WORKFLOW'=>'Nuevo Flujo de Trabajo', +'LBL_NEW_TEMPLATE'=>'Guardar como Plantilla', +'LBL_CREATE_WORKFLOW_FOR'=>'Crear un flujo de trabajo para', +'LBL_FOR_MODULE'=>'Para Módulo', +'LBL_CHOOSE_A_TEMPLATE'=>'Seleccione plantilla', +'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'Hay campos obligatorios vacíos.', +'LBL_VALIDATION_INVALID_DATE_RANGE'=>'Fecha/Hora de inicio es superior a Fecha/Hora fin', +'LBL_ERROR_NO_WORKFLOW'=>'El flujo de trabajo al que intentas acceder no existe', +'LBL_ERROR_NO_TASK'=>'La tarea a la que intentas acceder no existe', +'LBL_ERROR_NOT_ADMIN'=>'Solo el usuario administrador tiene acceso a este módulo', +'LBL_CREATE_WORKFLOW'=>'Crear flujo trabajo', +'LBL_WORKFLOW_LIST'=>'Flujos de Trabajo', +'LBL_AVAILABLE_WORKLIST_LIST'=>'Flujos de Trabajo Disponibles', +'LBL_LOADING'=>'Cargando...', +'LBL_VALIDATION_ERROR'=>'Error de Validación', +'LBL_SELECT_OPTION_DOTDOTDOT'=>'Selecciona Opción...', +'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'NOTA: Debes configurar la tarea programada (Cron Job) de Flujo de Trabajo.', +'LBL_NO_TEMPLATES'=>'Sin Plantillas', +'LBL_SELECT'=>'Selecciona', +'LBL_MESSAGE'=>'Mensaje', +'LBL_SELECT'=>'Selecciona', +'LBL_MESSAGE'=>'Mensaje', +'LBL_SEND_ALL_ATTACHMENT'=>'Enviar todos los adjuntos', +'VTPDFMakerTask'=>'Guardar documento de PDFMaker', // ITS4YOU-CR PDF Maker +'LBL_SEND_ALL_ATTACHMENT'=>'Enviar todos los adjuntos', +'LBL_SET_FIELD_VALUES'=>'Establecer valor de campo', +'LBL_ADD_FIELD'=>'Agregar campo', + +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Utilizar Valor --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Utilizar Función --', + +'LBL_RAW_TEXT'=>'Texto', +'LBL_FIELD'=>'Campo', +'LBL_EXPRESSION'=>'Expresión', +'LBL_SET_EXPRESSION'=>'Definir Expresión', + +'LBL_MANUAL'=>'Sistema', + +'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL'=>'Añadir Condición de Grupo', + +'VTUpdateFieldsTask' => 'Actualizar Campos', + +'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'El mismo campo ha sido seleccionado más de una vez.', +'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Valores de Campos Inválidos', +'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Nota: Las expresiones se evalúan en el orden de los campos. + Asegúrate de asignar un valor al campo antes de utilizarlo.', +'LBL_SET_VALUE' => 'Establecer Valor', + +'LBL_EMAIL_RECIPIENT' => 'Destinatario', +'LBL_EMAIL_CC' => 'CC', +'LBL_EMAIL_BCC' => 'BCC', +'LBL_EMAIL_SUBJECT' => 'Asunto', + +'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Nota: Todas las fechas, horas e información recurrente configurada para el evento, + estarán definidas conforme a la zona horaria por defecto, configurada en config.inc.php', +'Select Meta Variables' => 'Selecciona Meta Variables', +'Current Date' => 'Fecha Actual', +'Current Time' => 'Hora Actual', +'System Timezone' => 'Zona Horaria del Sistema', +'CRM Detail View URL' => 'URL Vista Detalle del CRM', +'Portal Detail View URL' => 'URL Vista Detalle del Portal', +'Site Url' => 'Url CRM', +'Portal Url' => 'Url Portal', + +'Workflow'=>'Flujo de Trabajo', + +'VTCreateEntityTask' => 'Crear Entidad', +'LBL_ENTITY_TYPE' => 'Tipo Entidad', +'LBL_SELECT_ENTITY_TYPE' => '-- Selecciona Tipo Entidad --', +'LBL_NO_ENTITIES_FOUND' => 'No se han encontrado entidades para crear', + +); +?> diff --git a/modules/com_vtiger_workflow/language/fr_fr.lang.php b/modules/com_vtiger_workflow/language/fr_fr.lang.php new file mode 100644 index 0000000..bc32a47 --- /dev/null +++ b/modules/com_vtiger_workflow/language/fr_fr.lang.php @@ -0,0 +1,85 @@ + 'Envoyer un Email', + 'VTEntityMethodTask' => 'Utiliser une fonction personnalisée', + 'VTCreateTodoTask' => 'Créer une tâche', + 'VTCreateEventTask' => 'Créer un évènement', + 'LBL_EDIT_TASK'=>'Editer la tâche', + 'LBL_EDIT_TASK_TITLE'=>'Editer une tâche existante ou en créer une nouvelle', + 'LBL_EDIT_WORKFLOW'=>'Editer le flux de travail', + 'LBL_EDIT_WORKFLOW_TITLE'=>'Editez un flux de travail ou créez en un', + 'LBL_FROM_TEMPLATE'=>'A partir du Template', + 'LBL_NEW_WORKFLOW'=>'Nouveau flux de travail', + 'LBL_NEW_TEMPLATE'=>'Enregistrer comme Template', + 'LBL_CREATE_WORKFLOW_FOR'=>'Créer un flux de travail pour', + 'LBL_FOR_MODULE'=>'Pour le module', + 'LBL_FROM_TEMPLATE'=>'A partir du Template', + 'LBL_CHOOSE_A_TEMPLATE'=>'Choisir un template', + 'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'Il y a un champs obligatoire vide.', + 'LBL_VALIDATION_INVALID_DATE_RANGE'=>'La date et heure de début sont inférieures à date et heure de fin', + 'LBL_ERROR_NO_WORKFLOW'=>'Le flux de travail que vous recherchez n\'existe pas', + 'LBL_ERROR_NO_TASK'=>'La tâche que vous recherchez n\'existe pas', + 'LBL_ERROR_NOT_ADMIN'=>'Vous n\'avez pas accès à ce module car vous n\'êtes pas administrateur', + 'LBL_CREATE_WORKFLOW'=>'Créer un flux de travail', + 'LBL_WORKFLOW_LIST'=>'Liste des flux', + 'LBL_AVAILABLE_WORKLIST_LIST'=>'Flux disponibles', + 'LBL_LOADING'=>'Chargement...', + 'LBL_VALIDATION_ERROR'=>'Erreur de validation', + 'LBL_SELECT_OPTION_DOTDOTDOT'=>'Sélectionnez une option...', + 'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'NOTE: Vous devez avoir un script d\'exécution valide et configuré.', + 'LBL_NO_TEMPLATES'=>'Aucun Template', + 'LBL_SELECT'=>'Choisir', + 'LBL_MESSAGE'=>'Message', + 'LBL_SET_FIELD_VALUES'=>'Définir la valeur du champ', + 'LBL_ADD_FIELD'=>'Ajouter un champ', + + 'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Utiliser la valeur du Champ --', + 'LBL_USE_FUNCTION_DASHDASH'=>'-- Utiliser une fonction --', + + 'LBL_RAW_TEXT'=>'Texte brut', + 'LBL_FIELD'=>'Champ', + 'LBL_EXPRESSION'=>'Expression', + 'LBL_SET_EXPRESSION'=>'Définir une expression', + 'LBL_MANUAL'=>'Système', + 'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL'=>'Nouveau groupe de condition', + 'VTUpdateFieldsTask' => 'Mise à jour d\'un champ', + + 'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'Les mêmes champs sont sélectionnées plusieurs fois.', + 'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Valeurs de champs invalides', + 'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Note: Les expressions seront évaluées dans l\'ordre des champs définis. + Prévoir de fournir des valeurs de champ avant de les utiliser dans une exxpression.', + + 'LBL_SET_VALUE' => 'Définir la valeur', + + 'LBL_EMAIL_RECIPIENT' => 'Destinataires', + 'LBL_EMAIL_CC' => 'CC', + 'LBL_EMAIL_BCC' => 'BCC', + 'LBL_EMAIL_SUBJECT' => 'Sujet', + + 'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Note: Toutes les informations de date et temps configuré pour cet évènement seront basé sur le fuseau horaire configuré dans config.inc.php', + // 5.4.0 + 'Select Meta Variables' => 'Choix des meta variables', + 'Current Date' => 'Date courante', + 'Current Time' => 'Heure courante', + 'System Timezone' => 'Fuseau horaire', + 'CRM Detail View URL' => 'URL de la vue détail du CRM', + 'Portal Detail View URL' => 'URL de la vue détail du portail CRM', + 'Site Url' => 'URL du CRM', + 'Portal Url' => 'URL du portail CRM', + + 'Workflow'=>'Flux de travail', + + 'VTCreateEntityTask' => 'Créer une entité', + 'LBL_ENTITY_TYPE' => 'Type d\'entité', + 'LBL_SELECT_ENTITY_TYPE' => '-- Choix du type d\'entité --', + 'LBL_NO_ENTITIES_FOUND' => 'Aucune entité disponible à la création', +); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/language/hu_hu.lang.php b/modules/com_vtiger_workflow/language/hu_hu.lang.php new file mode 100644 index 0000000..f9e1df4 --- /dev/null +++ b/modules/com_vtiger_workflow/language/hu_hu.lang.php @@ -0,0 +1,87 @@ + 'Email küldés', + 'VTEntityMethodTask' => 'Egyedi funkció meghívása', + 'VTCreateTodoTask' => 'Teendő létrehozása', + 'VTCreateEventTask' => 'Esemény létrehozása', + 'VTSMSTask' => 'SMS Küldés', + 'LBL_EDIT_TASK' => 'Feladat szerkesztése', + 'LBL_EDIT_TASK_TITLE' => 'Létező Feladat szerkesztése vagy egy Új Feladat létrehozása', + 'LBL_EDIT_WORKFLOW' => 'Automatikus Művelet Szerkesztése', + 'LBL_EDIT_WORKFLOW_TITLE' => 'Létező Automatikus Művelet szerkesztése vagy egy Új Automatikus Művelet létrehozása', + 'LBL_FROM_TEMPLATE' => 'Sablonnak', + 'LBL_NEW_WORKFLOW' => 'Új Automatikus Művelet', + 'LBL_NEW_TEMPLATE' => 'Mentés Sablonként', + 'LBL_CREATE_WORKFLOW_FOR' => 'Automatikus Művelet Létrehozása neki', + 'LBL_FOR_MODULE' => 'Modulnak', + 'LBL_CHOOSE_A_TEMPLATE' => 'Válassz egy Sablont', + 'LBL_VALIDATION_MISSING_MANDATORY_FIELDS' => 'Üres kötelező mezők vannak ott.', + 'LBL_VALIDATION_INVALID_DATE_RANGE' => 'A Kezdés dátum/idő nagyobb, mint a Befejezés dátum/idő', + 'LBL_ERROR_NO_WORKFLOW' => 'Az igényelt Automatikus Művelet nem létezik', + 'LBL_ERROR_NO_TASK' => 'Az igényelt Feladat nem létezik', + 'LBL_ERROR_NOT_ADMIN' => 'Nincs hozzáférésed ehhez a modulhoz, mivel nem vagy admin felhasználó', + 'LBL_CREATE_WORKFLOW' => 'Új Automatikus Művelet', + 'LBL_WORKFLOW_LIST' => 'Automatikus Műveletek Listája', + 'LBL_AVAILABLE_WORKLIST_LIST' => 'Elérhető Automatikus Műveletek', + 'LBL_LOADING' => 'Betöltés...', + 'LBL_VALIDATION_ERROR' => 'Érvényesítési hiba', + 'LBL_SELECT_OPTION_DOTDOTDOT' => 'Opció kiválasztása...', + 'LBL_WORKFLOW_NOTE_CRON_CONFIG' => 'Megjegyzés: az Automatikus Műveletek időzítőt (cron script) be kell állítani.', + 'LBL_NO_TEMPLATES' => 'Nincsenek Sablonok', + 'LBL_SELECT' => 'Kiválasztás', + 'LBL_MESSAGE' => 'Üzenet', + 'LBL_SET_FIELD_VALUES' => 'Add meg a mezők értékeit', + 'LBL_ADD_FIELD' => 'Add meg a mezőt', + 'LBL_USE_FIELD_VALUE_DASHDASH' => '-- Mező érték használata --', + 'LBL_USE_FUNCTION_DASHDASH' => '-- Függvény használata --', + 'LBL_RAW_TEXT' => 'Nyers szöveg', + 'LBL_FIELD' => 'Mező', + 'LBL_EXPRESSION' => 'Kifejezés', + 'LBL_SET_EXPRESSION' => 'Kifejezést megad', + 'LBL_MANUAL' => 'Rendszer', + 'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL' => 'Új Feltétel csoport', + 'VTUpdateFieldsTask' => 'Mezők frissítése', + 'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'Ugyanazt a mezőt egynél többször választottad.', + 'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Érvénytelen mező érték', + 'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Megjegyzés: A kifejezéseket abban a sorrendben értékeljük ki, ahogy a mezők értéket kapnak. Tehát légy biztos abban, hogy a mezők már azelőtt kaptak értéket, mielőtt egy kifejezésben használnád őket.', + 'LBL_SET_VALUE' => 'Érték megadása', + 'LBL_EMAIL_RECIPIENT' => 'Címzett', + 'LBL_EMAIL_CC' => 'CC', + 'LBL_EMAIL_BCC' => 'BCC', + 'LBL_EMAIL_SUBJECT' => 'Tárgysor', + 'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Megjegyzés: Minden dátumot, időpontot és az ismétlődéssel kapcsolatos információt beállítottuk az eseményhez, és ezt a config.inc.php-ben megadott alapértelmezett időzónához viszonyítva fogjuk használni.', + 'Select Meta Variables' => 'Válassz Meta váltózókat', + 'Current Date' => 'Aktuális dátum', + 'Current Time' => 'Aktuális idő', + 'System Timezone' => 'Rendszer időzóna', + 'CRM Detail View URL' => 'CRM Részletes adatok nézet URL', + 'Portal Detail View URL' => 'Ügyfél Portál Részletes adatok nézet URL', + 'Site Url' => 'URL (CRM)', + 'Portal Url' => 'Ügyfél Portál URL', + 'Workflow' => 'Munkafolyamat', + 'VTCreateEntityTask' => 'Entitás létrehozása', + 'LBL_ENTITY_TYPE' => 'Entitás típus', + 'LBL_SELECT_ENTITY_TYPE' => '--Válassz entitás típust--', + 'LBL_NO_ENTITIES_FOUND' => 'Nem találtunk létrehozható entitást', + 'LBL_Module' => 'Modul', + 'LBL_Description' => 'Leírás', + 'LBL_Tools' => 'Eszközök', + 'LBL_Recepient' => 'Címzett', + 'LBL_CC' => 'Másolatot kap', + 'LBL_BCC' => 'Rejtett másolatot kap', + 'LBL_Subject' => 'Tárgysor' +); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/language/nl_nl.lang.php b/modules/com_vtiger_workflow/language/nl_nl.lang.php new file mode 100644 index 0000000..8c90b99 --- /dev/null +++ b/modules/com_vtiger_workflow/language/nl_nl.lang.php @@ -0,0 +1,115 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.6 $ $Date: 2012/02/28 23:40:22 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/com_vtiger_workflow/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = array( +'VTEmailTask' => 'Verstuur e-mail', +'VTEntityMethodTask' => 'Start maatwerkfunctie', +'VTCreateTodoTask' => 'Maak Taak', +'VTCreateEventTask' => 'Maak Event', +'VTSMSTask' => 'SMS Taak', +'LBL_EDIT_TASK'=>'Bewerk taak', +'LBL_EDIT_TASK_TITLE'=>'Bewerk een bestaande taak of maak een nieuwe aan', +'LBL_EDIT_WORKFLOW'=>'Bewerk Werkstroom', +'LBL_EDIT_WORKFLOW_TITLE'=>'Bewerk een bestaande werkstroom of maak een nieuwe aan', +'LBL_FROM_TEMPLATE'=>'Van een Sjabloon', +'LBL_NEW_WORKFLOW'=>'Nieuwe Werkstroom', +'LBL_NEW_TEMPLATE'=>'Bewaar als Sjabloon', +'LBL_CREATE_WORKFLOW_FOR'=>'Maak een Werkstroom voor', +'LBL_FOR_MODULE'=>'Voor Module', +'LBL_FROM_TEMPLATE'=>'Van Sjabloon', +'LBL_CHOOSE_A_TEMPLATE'=>'Kies een Sjabloon', +'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'Er zijn lege verplichte velden.', +'LBL_VALIDATION_INVALID_DATE_RANGE'=>'Startdatum/tijd is groter dan de Einddatum/tijd', +'LBL_ERROR_NO_WORKFLOW'=>'De gevraagde werkstoom bestaat niet', +'LBL_ERROR_NO_TASK'=>'De gevraagde taak bestaat niet', +'LBL_ERROR_NOT_ADMIN'=>'U heeft geen toegang tot deze module. U bent geen Admin Gebruiker', +'LBL_CREATE_WORKFLOW'=>'Maak Werkstroom', +'LBL_WORKFLOW_LIST'=>'Werkstroom Lijst', +'LBL_AVAILABLE_WORKLIST_LIST'=>'Beschikbare Werkstromen', +'LBL_LOADING'=>'Laden...', +'LBL_VALIDATION_ERROR'=>'Validatie Fout', +'LBL_SELECT_OPTION_DOTDOTDOT'=>'Selecteer Optie...', +'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'NOTE: U moet het Werkstroom cron script geconfigureerd hebben.', +'LBL_NO_TEMPLATES'=>'Geen Sjablonen', + +// @since vtiger 5.3 / NLDutch 1.3 +'LBL_SELECT'=>'Selecteer', +'LBL_MESSAGE'=>'Bericht', +'LBL_SET_FIELD_VALUES'=>'Stel veldwaarde in', +'LBL_ADD_FIELD'=>'Voeg veld toe', + +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Gebruik veldwaarde --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Gebruik functie --', + +'LBL_RAW_TEXT'=>'Ruwe tekst', +'LBL_FIELD'=>'Veld', +'LBL_EXPRESSION'=>'Formule', +'LBL_SET_EXPRESSION'=>'Stel Formule in', + +'LBL_MANUAL'=>'Systeem', + +'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL'=>'Nieuwe Conditiegroep', + +'VTUpdateFieldsTask' => 'Bijwerken velden', + +'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'Zelfde veld is meer dan eens gekozen.', +'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Ongeldige veldwaarden', +'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Opmerking: Formules worden afgewerkt in de volgorde van de aangeboden veldwaarden. Zorg er dus voro dat elk veld een waarde heeft alvorens deze in een formule te gebruiken.', +'LBL_SET_VALUE' => 'Stel waarde in', + +'LBL_EMAIL_RECIPIENT' => 'Ontvanger', +'LBL_EMAIL_CC' => 'CC', +'LBL_EMAIL_BCC' => 'BCC', +'LBL_EMAIL_SUBJECT' => 'Onderwerp', + +'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Opmerking: Alle datum, tijd en herhaalinformatie zoals voor het event ingesteld werken conform de standaard tijdzone, zoals geconfigureerd in config.inc.php', + + +'Select Meta Variables' => 'Selecteer Meta Variabelen', +'Current Date' => 'Huidige Datum', +'Current Time' => 'Huidige Tijd', +'System Timezone' => 'Systeem Tijdzone', +'CRM Detail View URL' => 'CRM Detailscherm URL', +'Portal Detail View URL' => 'Portaal Detailscherm URL', +'Site Url' => 'Site URL', +'Portal Url' => 'Portaal URL', + +'Workflow'=>'Werkstroom', + +'VTCreateEntityTask' => 'Maak Entiteit', +'LBL_ENTITY_TYPE' => 'Entiteittype', +'LBL_SELECT_ENTITY_TYPE' => '-- Selecteer Entiteittype --', +'LBL_NO_ENTITIES_FOUND' => 'Geen entiteiten gevonden om te maken', + +); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/language/pt_br.lang.php b/modules/com_vtiger_workflow/language/pt_br.lang.php new file mode 100644 index 0000000..c18019c --- /dev/null +++ b/modules/com_vtiger_workflow/language/pt_br.lang.php @@ -0,0 +1,91 @@ + 'Enviar Email', +'VTEntityMethodTask' => 'Invocar Função Customizada', +'VTCreateTodoTask' => 'Criar Compromisso', +'VTCreateEventTask' => 'Criar Evento', +'VTSMSTask' => 'Tarefa SMS', +'LBL_EDIT_TASK'=>'Editar Tarefa', +'LBL_EDIT_TASK_TITLE'=>'Editar uma Tarefa existente ou criar nova', +'LBL_EDIT_WORKFLOW'=>'Editar Workflow', +'LBL_EDIT_WORKFLOW_TITLE'=>'Editar um Workflow existente ou criar novo', +'LBL_FROM_TEMPLATE'=>'Do Modelo', +'LBL_NEW_WORKFLOW'=>'Novo Workflow', +'LBL_NEW_TEMPLATE'=>'Salvar como Modelo', +'LBL_CREATE_WORKFLOW_FOR'=>'Criar um Workflow para', +'LBL_FOR_MODULE'=>'Para Módulo', +'LBL_CHOOSE_A_TEMPLATE'=>'Escolher um Modelo', +'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'Existe um campo obrigatório vazio.', +'LBL_VALIDATION_INVALID_DATE_RANGE'=>'A data/hora Inicial é maior do que a data/hora final', +'LBL_ERROR_NO_WORKFLOW'=>'O Workflow solicitado não existe', +'LBL_ERROR_NO_TASK'=>'A Tarefa solicitada não existe', +'LBL_ERROR_NOT_ADMIN'=>'Você não tem acesso a este Módulo visto que você não é um usuário admin', +'LBL_CREATE_WORKFLOW'=>'Criar workflow', +'LBL_WORKFLOW_LIST'=>'Lista Workflow', +'LBL_AVAILABLE_WORKLIST_LIST'=>'Workflows Disponíveis', +'LBL_LOADING'=>'Carregando...', +'LBL_VALIDATION_ERROR'=>'Erro Validação', +'LBL_SELECT_OPTION_DOTDOTDOT'=>'Selecionar Opção...', +'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'NOTA: Você deve ter um script Cron configurado para o Workflow.', +'LBL_NO_TEMPLATES'=>'Nenhum Modelo', +'LBL_SELECT'=>'Selecionar', +'LBL_MESSAGE'=>'Mensagem', +'LBL_SET_FIELD_VALUES'=>'Configurar Valor Campos', +'LBL_ADD_FIELD'=>'Adicionar Campo', + +'LBL_USE_FIELD_VALUE_DASHDASH'=>'-- Utilizar Valor Campo --', +'LBL_USE_FUNCTION_DASHDASH'=>'-- Utilizar Função --', + +'LBL_RAW_TEXT'=>'Texto Puro', +'LBL_FIELD'=>'Campo', +'LBL_EXPRESSION'=>'Expressão', +'LBL_SET_EXPRESSION'=>'Configurar Expressão', + +'LBL_MANUAL'=>'Sistema', + +'LBL_NEW_CONDITION_GROUP_BUTTON_LABEL'=>'Novo Grupo Condição', + +'VTUpdateFieldsTask' => 'Atualizar Campos', + + +'LBL_VALIDATION_DUPLICATE_FIELDNAMES' => 'Mesmo campo selecionado mais de uma vez.', +'LBL_VALIDATION_INVALID_FIELD_VALUES' => 'Valores de campo inválidos', +'LBL_CREATE_ENTITY_NOTE_ORDER_MATTERS' => 'Nota: As expressões serão avaliadas na ordem dos valores do campo fornecidos. + Portanto, certifique-se de que tenha fornecido o valor para um campo antes de utilizá-lo na expressão.', +'LBL_SET_VALUE' => 'Configurar Valor', + +'LBL_EMAIL_RECIPIENT' => 'Destinatário', +'LBL_EMAIL_CC' => 'CC', +'LBL_EMAIL_BCC' => 'BCC', +'LBL_EMAIL_SUBJECT' => 'Assunto', + +'LBL_WORKFLOW_NOTE_EVENT_TASK_TIMEZONE' => 'Nota: Toda a data, hora e informação recorrente configurada para o Evento, + estarão relacionados com o time zone padrão, configurado no config.inc.php', + +'Select Meta Variables' => 'Selecionar Variáveis Meta', +'Current Date' => 'Data Atual', +'Current Time' => 'Hora Atual', +'System Timezone' => 'Sistema Fuso Horário [Timezone]', +'CRM Detail View URL' => 'Visualizar Detalhes URL do CRM', +'Portal Detail View URL' => 'Visualizar Detalhes URL do Portal', +'Site Url' => 'Url do Site', +'Portal Url' => 'Url do Portal', + +'Workflow'=>'Workflow', + +'VTCreateEntityTask' => 'Criar Entidade', +'LBL_ENTITY_TYPE' => 'Tipo Entidade', +'LBL_SELECT_ENTITY_TYPE' => '-- Selecionar Tipo Entidade --', +'LBL_NO_ENTITIES_FOUND' => 'Nenhuma Entidade Encontrada para ser Criar', +); + + +?> diff --git a/modules/com_vtiger_workflow/language/zh_cn.lang.php b/modules/com_vtiger_workflow/language/zh_cn.lang.php new file mode 100644 index 0000000..89c9ed7 --- /dev/null +++ b/modules/com_vtiger_workflow/language/zh_cn.lang.php @@ -0,0 +1,70 @@ +'发送Email', +'VTEntityMethodTask'=>'调用自定义函数', +'VTCreateTodoTask'=>'创建待办任务', +'VTCreateEventTask'=>'创建事件', +'VTSMSTask'=>'短消息任务', +'LBL_EDIT_TASK'=>'编辑任务', +'LBL_EDIT_TASK_TITLE'=>'编辑已有任务或创建新任务', +'LBL_EDIT_WORKFLOW'=>'编辑工作流', +'LBL_EDIT_WORKFLOW_TITLE'=>'编辑已有工作流或创建新工作流', +'LBL_FROM_TEMPLATE'=>'从模版', +'LBL_NEW_WORKFLOW'=>'新工作流', +'LBL_NEW_TEMPLATE'=>'保存为模版', +'LBL_CREATE_WORKFLOW_FOR'=>'创建新的工作流', +'LBL_FOR_MODULE'=>'为模块', +'LBL_CHOOSE_A_TEMPLATE'=>'选择模版', +'LBL_VALIDATION_MISSING_MANDATORY_FIELDS'=>'选项没填完整', +'LBL_VALIDATION_INVALID_DATE_RANGE'=>'开始的日期/时间大于结束日期/时间。', +'LBL_ERROR_NO_WORKFLOW'=>'工作流不存在', +'LBL_ERROR_NO_TASK'=>'任务不存在。', +'LBL_ERROR_NOT_ADMIN'=>'因为您不是admin,所以您没有访问此模块的权限', +'LBL_CREATE_WORKFLOW'=>'创建工作流', +'LBL_WORKFLOW_LIST'=>'工作流列表', +'LBL_AVAILABLE_WORKLIST_LIST'=>'可用的工作流', +'LBL_LOADING'=>'加载中...', +'LBL_VALIDATION_ERROR'=>'验证错误', +'LBL_SELECT_OPTION_DOTDOTDOT'=>'选择项...', +'LBL_WORKFLOW_NOTE_CRON_CONFIG'=>'注意:你必须配置工作流的linux cron脚本。', +'LBL_NO_TEMPLATES'=>'没有模版', +'LBL_SELECT'=>'选择', +'LBL_MESSAGE'=>'消息', + +'Settings'=>'设置', +'Workflow'=>'工作流', +'Module'=>'模块名称', +'Description'=>'操作说明', +'Tools'=>'操作', + +'UpdateInventoryProducts On Every Save'=>'在每次保存的时候更新库存产品', +'Send Email to user when Notifyowner is True'=>'当邮件通知设置为【是】的时候,向用户发送邮件', +'Send Email to user when Portal User is True'=>'当用户为门户用户的时候,向用户发送邮件', +'Send Email to users on Potential creation'=>'当潜在用户创建的时候向用户发送邮件', + +); + + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/loadtemplates.php b/modules/com_vtiger_workflow/loadtemplates.php new file mode 100644 index 0000000..3f25857 --- /dev/null +++ b/modules/com_vtiger_workflow/loadtemplates.php @@ -0,0 +1,26 @@ +loadTemplates($str); +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/modulefieldsjson.php b/modules/com_vtiger_workflow/modulefieldsjson.php new file mode 100644 index 0000000..4fdd057 --- /dev/null +++ b/modules/com_vtiger_workflow/modulefieldsjson.php @@ -0,0 +1,19 @@ +getFieldLabels()); + } + vtModuleTypeInfoJson($adb, $_REQUEST); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/resources/add.png b/modules/com_vtiger_workflow/resources/add.png new file mode 100644 index 0000000..f13429e Binary files /dev/null and b/modules/com_vtiger_workflow/resources/add.png differ diff --git a/modules/com_vtiger_workflow/resources/createentitytaskscript.js b/modules/com_vtiger_workflow/resources/createentitytaskscript.js new file mode 100644 index 0000000..7a5fe1a --- /dev/null +++ b/modules/com_vtiger_workflow/resources/createentitytaskscript.js @@ -0,0 +1,430 @@ +/*+******************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +function VTCreateEntityTask($, fieldvaluemapping){ + var vtinst = new VtigerWebservices("webservice.php"); + var desc = null; + + var format = fn.format; + + function errorDialog(message){ + alert(message); + } + + function handleError(fn){ + return function(status, result){ + if(status){ + fn(result); + }else{ + errorDialog('Failure:'+result); + } + }; + } + + function implode(sep, arr){ + var out = ""; + $.each(arr, function(i, v){ + out+=v; + if(i'+v+''); + }); + } + + function removeFieldValueMapping(mappingno){ + $(format("#save_fieldvalues_%s", mappingno)).remove(); + } + + function map(fn, list){ + var out = []; + $.each(list, function(i, v){ + out[out.length]=fn(v); + }); + return out; + } + + function reduceR(fn, list, start){ + var acc = start; + $.each(list, function(i, v){ + acc = fn(acc, v); + }); + return acc; + } + + function dict(list){ + var out = {}; + $.each(list, function(i, v){ + out[v[0]] = v[1]; + }); + return out; + } + + function filter(pred, list){ + var out = []; + $.each(list, function(i, v){ + if(pred(v)){ + out[out.length]=v; + } + }); + return out; + } + + function contains(list, value){ + var ans = false; + $.each(list, function(i, v){ + if(v==value){ + ans = true; + return false; + } + }); + return ans; + } + + function diff(reflist, list) { + var out = []; + $.each(list, function(i, v) { + if(contains(reflist, v)) { + out.push(v); + } + }); + return out; + } + + function concat(lista,listb){ + return lista.concat(listb); + } + + //Get an array containing the the description of a module and all modules + //refered to by it. This is passed to callback. + function getDescribeObjects(accessibleModules, moduleName, callback){ + vtinst.describeObject(moduleName, handleError(function(result){ + var parent = result; + var fields = parent['fields']; + var referenceFields = filter(function(e){ + return e['type']['name']=='reference';}, + fields); + var referenceFieldModules = + map( + function(e){ + return e['type']['refersTo']; + }, + referenceFields + ); + function union(a, b){ + var newfields = filter(function(e){return !contains(a, e);}, b); + return a.concat(newfields); + } + var relatedModules = reduceR(union, referenceFieldModules, [parent['name']]); + + // Remove modules that is no longer accessible + relatedModules = diff(accessibleModules, relatedModules); + + function executer(parameters){ + var failures = filter(function(e){return e[0]==false;}, parameters); + if(failures.length!=0){ + var firstFailure = failures[0]; + callback(false, firstFailure[1]); + }else{ + var moduleDescriptions = map(function(e){ + return e[1];}, + parameters); + var modules = dict(map(function(e){ + return [e['name'], e];}, + moduleDescriptions)); + callback(true, modules); + } + } + var p = parallelExecuter(executer, relatedModules.length); + $.each(relatedModules, function(i, v){ + p(function(callback){vtinst.describeObject(v, callback);}); + }); + })); + } + + function editFieldExpression(fieldValueNode, fieldType) { + editpopupobj.edit(fieldValueNode.attr('id'), fieldValueNode.attr('value'), fieldType); + } + + function resetFields(opType, fieldName, mappingno) { + defaultValue(opType.name)(opType, mappingno); + + var fv = $("#save_fieldvalues_"+mappingno+"_value"); + fv.attr("name", fieldName); + var fieldLabel = jQuery("#save_fieldvalues_"+mappingno+"_fieldname option:selected").html(); + validator.validateFieldData[fieldName] = {type: opType.name, label: fieldLabel}; + } + + function defaultValue(fieldType){ + + function forPicklist(opType, mappingno){ + var value = $("#save_fieldvalues_"+mappingno+"_value"); + var options = implode('', + map(function (e){return '';}, + opType['picklistValues']) + ); + value.replaceWith(''); + $("#save_fieldvalues_"+mappingno+"_value_type").attr("value", "rawtext"); + + $("#save_fieldvalues_"+mappingno+"_modulename").attr("value", $('#entity_type').attr("value")); + $("#save_fieldvalues_"+mappingno+"_modulename").attr("disabled", "true"); + } + var functions = { + string:function(opType, mappingno){ + var value = $(format("#save_fieldvalues_%s_value", mappingno)); + value.replaceWith(format('', mappingno)); + + $("#save_fieldvalues_"+mappingno+"_modulename").attr("disabled", ""); + var fv = $(format("#save_fieldvalues_%s_value", mappingno)); + fv.bind("focus", function() { + editpopupobj.setModule($(format("#save_fieldvalues_%s_modulename", mappingno)).attr('value')); + editFieldExpression($(this), opType); + }); + fv.bind("click", function() { + editpopupobj.setModule($(format("#save_fieldvalues_%s_modulename", mappingno)).attr('value')); + editFieldExpression($(this), opType); + }); + fv.bind("keypress", function() { + editpopupobj.setModule($(format("#save_fieldvalues_%s_modulename", mappingno)).attr('value')); + editFieldExpression($(this), opType); + }); + }, + picklist:forPicklist, + multipicklist:forPicklist + }; + var ret = functions[fieldType]; + if(ret==null){ + ret = functions['string']; + } + return ret; + } + + var validateDuplicateFields = { + init: function(){ + }, + validator: function(){ + jQuery('#duplicate_fields_selected_message').css('display', 'none'); + var result; + var successResult = [true]; + var failureResult = [false, 'duplicate_fields_selected_message', []]; + var selectedFieldNames = $(".fieldname"); + result = successResult; + $.each(selectedFieldNames, function(i, ele) { + var fieldName = $(ele).attr("value"); + var fields = $("[name="+fieldName+"]"); + if(fields.length > 1) { + result = failureResult; + } + }); + return result; + } + }; + + function loadModuleFields(entityName, fieldvaluemapping) { + $("#save_fieldvaluemapping").html(''); + $("#save_fieldvaluemapping_add_wrapper").html(''); + validator.mandatoryFields = ['summary', 'entity_type']; + validator.validateFieldData = {}; + if(entityName == '') return; + $('#save_fieldvaluemapping_add-busyicon').show(); + + var entityLabel = $('#entity_type option:selected').html(); + + vtinst.describeObject(entityName, handleError(function(result){ + var fields = result['fields']; + + function filteredFields(fields){ + var filteredfields = filter( + function(e){return !contains(['autogenerated', 'reference', 'password'], e.type.name);}, fields + ); + // Added to filter non-editable fields for update + return filter( + function(e){return contains(['1'], e.editable);}, filteredfields + ); + }; + + function filterMandatoryFields(fields){ + var filteredfields = filter( + function(e){return !contains(['autogenerated', 'reference', 'password'], e.type.name);}, fields + ); + // Added to filter non-editable fields as well as non-mandatory fields + return filter( + function(e){return contains(['1'], e.editable) && contains(['1'], e.mandatory);}, filteredfields + ); + }; + + var entityFields = map(function(e){ + fieldname = e['name']; + fieldlabel = e['label']; + if(contains(['1'], e.mandatory)) fieldlabel = fieldlabel + ' *'; + return [fieldname,fieldlabel]; + }, filteredFields(fields)); + var entityFieldTypes = dict(map(function(e){return[e['name'],e['type']];}, filteredFields(fields))); + var mandatoryFields = map(function(e){return e['name'];}, filterMandatoryFields(fields)); + var fieldLabels = dict(entityFields); + + function addFieldValueMapping(mappingno){ + $("#save_fieldvaluemapping").append( + '
          \ + \ + \ + \ + \ + \ + \ +
          ' + ); + var fe = $("#save_fieldvalues_"+mappingno+"_fieldname"); + var i = 1; + fillOptions(fe, fieldLabels); + + var me = $("#save_fieldvalues_"+mappingno+"_modulename"); + me.html(''); + me.append(format('', moduleName, moduleLabel)); + me.append(format('', entityName, entityLabel)); + + var fullFieldName = fe.attr("value"); + resetFields(entityFieldTypes[fullFieldName], fullFieldName, mappingno); + var re = $("#save_fieldvalues_"+mappingno+"_remove"); + re.bind("click", function(){ + removeFieldValueMapping(mappingno); + }); + fe.bind("change", function(){ + var select = $(this); + var mappingno = select.attr("id").match(/save_fieldvalues_(\d+)_fieldname/)[1]; + var fullFieldName = $(this).attr('value'); + resetFields(entityFieldTypes[fullFieldName], fullFieldName, mappingno); + }); + } + + var mappingno=0; + if(fieldvaluemapping){ + $.each(fieldvaluemapping, function(i, fieldvaluemap){ + var fieldname = fieldvaluemap["fieldname"]; + addFieldValueMapping(mappingno); + $(format("#save_fieldvalues_%s_fieldname", mappingno)).attr("value", fieldname); + $(format("#save_fieldvalues_%s_modulename", mappingno)).attr("value", fieldvaluemap['modulename']); + resetFields(entityFieldTypes[fieldname], fieldname, mappingno); + $(format("#save_fieldvalues_%s_value_type", mappingno)).attr("value", fieldvaluemap['valuetype']); + $('#dump').html(fieldvaluemap["value"]); + var text = $('#dump').text(); + $(format("#save_fieldvalues_%s_value", mappingno)).attr("value", text); + mappingno+=1; + }); + } + + $.each(mandatoryFields, function(i, fieldname) { + validator.mandatoryFields.push(fieldname); + var mandatoryFieldElement = $('[name='+fieldname+']'); + if(mandatoryFieldElement.length == 0) { + addFieldValueMapping(mappingno); + $(format("#save_fieldvalues_%s_fieldname", mappingno)).attr("value", fieldname); + resetFields(entityFieldTypes[fieldname], fieldname, mappingno); + mappingno+=1; + } + }); + + $("#save_fieldvaluemapping_add_wrapper").html(createEntityHeaderTemplate); + $("#save_fieldvaluemapping_add").bind("click", function() { + addFieldValueMapping(mappingno); + mappingno+=1; + }); + + $('#save_fieldvaluemapping_add-busyicon').hide(); + + })); + } + + + $(document).ready(function(){ + Drag.init(document.getElementById('editpopup_draghandle'), document.getElementById('editpopup')); + editpopupobj = fieldExpressionPopup(moduleName, $); + editpopupobj.setModule(moduleName); + editpopupobj.close(); + + validator.addValidator('validateDuplicateFields', validateDuplicateFields); + validator.mandatoryFields = ['summary', 'entity_type']; + + vtinst.extendSession(handleError(function(result){ + + $.get('index.php', { + module:'com_vtiger_workflow', + action:'com_vtiger_workflowAjax', + file:'WorkflowComponents', ajax:'true', + modulename:moduleName, mode:'getdependentfields'}, + function(result){ + result = JSON.parse(result); + var entitytypes = $('#entity_type'); + var count = result['count']; + var entities = result['entities']; + + if(count > 0) { + $.each(entities, function(entityname, fielddetails){ + entitytypes.append(format('', entityname, fielddetails['modulelabel'])); + }); + $('#entity_type').bind('change', function(){ + if(this.value != '') { + $('#reference_field').attr('value', entities[this.value]['fieldname']); + } + loadModuleFields(this.value, null); + }); + + if(selectedEntityType != "") { + $('#entity_type').attr('value', selectedEntityType); + } + loadModuleFields($('#entity_type').attr('value'), fieldvaluemapping); + } + + $('#entity_type-busyicon').hide(); + $('#entity_type').show(); + } + ); + + $("#save").bind("click", function(){ + var validateFieldValues = new Array(); + var fieldvaluemapping = []; + $("#save_fieldvaluemapping").children().each(function(i){ + var fieldname = $(this).children(".fieldname").attr("value"); + var modulename = $(this).children(".modulename").attr("value"); + var type = $(this).children(".type").attr("value"); + var value = $(this).children(".expressionvalue").attr("value"); + var fieldvaluemap = {fieldname:fieldname, modulename:modulename, valuetype:type, value:value}; + fieldvaluemapping[i]=fieldvaluemap; + + if(type == "" || type == "rawtext") { + validateFieldValues.push(fieldname); + } + }); + if(fieldvaluemapping.length==0){ + var out = ""; + }else{ + var out = JSON.stringify(fieldvaluemapping); + } + $("#save_fieldvaluemapping_json").attr("value", out); + + for(var fieldName in validator.validateFieldData) { + if(validateFieldValues.indexOf(fieldName) < 0) { + delete validator.validateFieldData[fieldName]; + } + } + }); + })); + }); +} + +VTCreateEntityTask(jQuery, fieldvaluemapping); \ No newline at end of file diff --git a/modules/com_vtiger_workflow/resources/createeventtaskscript.js b/modules/com_vtiger_workflow/resources/createeventtaskscript.js new file mode 100644 index 0000000..a1664ad --- /dev/null +++ b/modules/com_vtiger_workflow/resources/createeventtaskscript.js @@ -0,0 +1,115 @@ +function VTCreateTodoTask($){ + + var map = fn.map; + var dict = fn.dict; + var filter = fn.filter; + var reduceR = fn.reduceR; + var parallelExecuter = fn.parallelExecuter; + var contains = fn.contains; + var concat = fn.concat; + + + function parse12HoursTime(timeStr){ + var hours; + + var match = timeStr.match(/(\d\d):(\d\d)(am|pm)/); + if(match[3]=='am'){ + hours = parseInt(match[1], 10) % 12; + }else{ + hours = parseInt(match[1], 10) % 12 + 12; + } + return hours*60+parseInt(match[2], 10); + } + + function errorDialog(message){ + alert(message); + } + + function index(arr, field){ + return dict(map(function(e){return [e[field], e];}, arr)); + } + + function handleError(fn){ + return function(status, result){ + if(status){ + fn(result); + }else{ + errorDialog('Failure:'+result); + } + }; + } + + function fillPicklist(picklistId, fieldInfo, defaultValue){ + var values = fieldInfo['type']['picklistValues']; + var select = $('#'+picklistId); + $.each(values, function(i, v){ + select.append(''); + }); + if(defaultValue!=''){ + select.attr('value', defaultValue); + } else{ + select.attr('value',values[0]['value']); + } + } + + var validateDateRange = { + init: function(){ + + }, + validator: function(){ + var result; + var successResult = [true]; + var failureResult = [false, 'invalid_date_range_message', []]; + + var startTime = this.fieldValue('startTime'); + var endTime = this.fieldValue('endTime'); + var startDays = parseInt(this.fieldValue('startDays'), 10); + var endDays = parseInt(this.fieldValue('endDays'), 10); + + if(this.fieldValue('startDatefield') == this.fieldValue('endDatefield') || isNaN(endDays)){ + var startDirection = this.fieldValue('startDirection')=="After"?1:-1; + var endDirection = this.fieldValue('endDirection')=="After"?1:-1; + var dd = endDays*endDirection - startDays*startDirection; + + if(isNaN(dd) && ((!isNaN(startDays) && (startDays*startDirection) > 0) || (!isNaN(endDays) && (endDays*endDirection) <= 0))) { + result = failureResult; + }else if(dd<0){ + result = failureResult; + }else if(dd==0 || (isNaN(startDays) && isNaN(endDays))){ + if(parse12HoursTime(startTime)>=parse12HoursTime(endTime)){ + result = failureResult; + }else{ + result = successResult; + } + }else{ + result = successResult; + } + }else{ + result = successResult; + } + return result; + } + }; + + var vtinst = new VtigerWebservices("webservice.php"); + vtinst.extendSession(handleError(function(result){ + $(document).ready(function(){ + //Setup the validator + validator.addValidator('validateDateRange', validateDateRange); + validator.mandatoryFields.push('eventName'); + + vtinst.describeObject('Events', handleError(function(result){ + var fields = result['fields']; + var fieldsMap = index(fields, 'name'); + fillPicklist('event_status', fieldsMap['eventstatus'], eventStatus); + $('#event_status_busyicon').hide(); + $('#event_status').show(); + + fillPicklist('event_type', fieldsMap['activitytype'], eventType); + $('#event_type_busyicon').hide(); + $('#event_type').show(); + })); + }); + })); +} +VTCreateTodoTask(jQuery); \ No newline at end of file diff --git a/modules/com_vtiger_workflow/resources/createtodotaskscript.js b/modules/com_vtiger_workflow/resources/createtodotaskscript.js new file mode 100644 index 0000000..8bc6d95 --- /dev/null +++ b/modules/com_vtiger_workflow/resources/createtodotaskscript.js @@ -0,0 +1,71 @@ +function VTCreateTodoTask($){ + + var map = fn.map; + var dict = fn.dict; + var filter = fn.filter; + var reduceR = fn.reduceR; + var parallelExecuter = fn.parallelExecuter; + var contains = fn.contains; + var concat = fn.concat; + + function errorDialog(message){ + alert(message); + } + + function index(arr, field){ + return dict(map(function(e){return [e[field], e];}, arr)); + } + + function handleError(fn){ + return function(status, result){ + if(status){ + fn(result); + }else{ + errorDialog('Failure:'+result); + } + } + } + + var vtinst = new VtigerWebservices("webservice.php"); + vtinst.extendSession(handleError(function(result){ + $(document).ready(function(){ + //Setup the validator + validator.mandatoryFields.push('todo'); + + vtinst.describeObject('Calendar', handleError(function(result){ + var fields = result['fields']; + var fieldsMap = index(fields, 'name'); + var eventStatusType = fieldsMap['taskstatus']; + var eventStatusValues = eventStatusType['type']['picklistValues']; + + var taskPriorityType = fieldsMap['taskpriority']; + var taskPriorityValues = taskPriorityType['type']['picklistValues']; + + var status = $('#task_status'); + $.each(eventStatusValues, function(i, v){ + status.append(''); + }); + if(taskStatus!=''){ + status.attr('value', taskStatus); + } else { + status.attr('value',eventStatusValues[0]['value']); + } + $('#task_status_busyicon').hide(); + $('#task_status').show(); + + var priority = $('#task_priority'); + $.each(taskPriorityValues, function(i, v){ + priority.append(''); + }); + if(taskPriority!=''){ + priority.attr('value', taskPriority); + } else { + priority.attr('value',taskPriorityValues[0]['value']); + } + $('#task_priority_busyicon').hide(); + $('#task_priority').show(); + })); + }); + })); +} +VTCreateTodoTask(jQuery); \ No newline at end of file diff --git a/modules/com_vtiger_workflow/resources/edittaskscript.js b/modules/com_vtiger_workflow/resources/edittaskscript.js new file mode 100644 index 0000000..4a2e701 --- /dev/null +++ b/modules/com_vtiger_workflow/resources/edittaskscript.js @@ -0,0 +1,51 @@ +function edittaskscript($){ + + function NumberBox(element){ + var elementId = element.attr("id"); + var boxId = '#'+elementId+'-number-box'; + var str = ""; + for(var i = 1; i <= 30; i++){ + str += ''+(i < 10? ("0"+i) : i)+' '; + if(!(i % 5)){ + str+="
          "; + } + } + element.after(''); + element.focus(function(){ + var pos = element.position(); + $(boxId).css('display', 'block'); + $(boxId).css({ + position: 'absolute', + top: (pos.top+25)+'px' + }); + }); + + element.blur(function(){ + setTimeout(function(){$(boxId).css('display', 'none');},500); + }); + + $('.box_cel').click(function(){ + element.attr('value', parseInt($(this).text(), 10)); + }); + } + + + + $(document).ready(function(){ + validator = new VTFieldValidator($('#new_task_form')); + validator.mandatoryFields = ['summary']; + $('.time_field').timepicker(); + NumberBox($('#select_date_days')); + //UI to set the date for executing the task. + $('#check_select_date').click(function(){ + if($(this).attr('checked')){ + $('#select_date').css('display', 'block'); + }else{ + $('#select_date').css('display', 'none'); + } + }); + $('#edittask_cancel_button').click(function(){ + window.location=returnUrl; + }); + }); +} \ No newline at end of file diff --git a/modules/com_vtiger_workflow/resources/editworkflowscript.js b/modules/com_vtiger_workflow/resources/editworkflowscript.js new file mode 100644 index 0000000..3e0dd63 --- /dev/null +++ b/modules/com_vtiger_workflow/resources/editworkflowscript.js @@ -0,0 +1,648 @@ +/*+******************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +function editworkflowscript($, conditions){ + var vtinst = new VtigerWebservices("webservice.php"); + var fieldValidator; + var desc = null; + var editpopupobj; + + function id(v){ + return v; + } + + function map(fn, list){ + var out = []; + $.each(list, function(i, v){ + out[out.length]=fn(v); + }); + return out; + } + + function field(name){ + return function(object){ + if(typeof(object) != 'undefined') { + return object[name]; + } + }; + } + + function zip(){ + var out = []; + + var lengths = map(field('length'), arguments); + var min = reduceR(function(a,b){ + return a'+v+''); + }); + } + + function resetFields(opType, condno){ + var ops = $("#save_condition_"+condno+"_operation"); + var selOperations = operations[opType.name]; + var selectedOperations = new Array(); + + // Remove 'has changed' operation for reference fields + var fe = $("#save_condition_"+condno+"_fieldname"); + var fullFieldName = fe.attr('value'); + var group = fullFieldName.match(/(\w+) : \((\w+)\) (\w+)/); + if(group != null){ + for(var i=0; i'+e.label+''; + }, + opType['picklistValues']) + ); + value.replaceWith(''); + $("#save_condition_"+condno+"_value_type").attr("value", "rawtext"); + } + var functions = { + string:function(opType, condno){ + var value = $(format("#save_condition_%s_value", condno)); + value.replaceWith(format('', condno)); + + var fv = $("#save_condition_"+condno+"_value"); + fv.bind("focus", function() { + editFieldExpression($(this), opType); + }); + fv.bind("click", function() { + editFieldExpression($(this), opType); + }); + fv.bind("keypress", function() { + editFieldExpression($(this), opType); + }); + }, + picklist:forPicklist, + multipicklist:forPicklist + }; + var ret = functions[fieldType]; + if(ret==null){ + ret = functions['string']; + } + return ret; + } + + function removeCondition(groupno, condno){ + $(format("#save_condition_%s", condno)).remove(); + resetJoinCondition(groupno, condno); + } + + function removeConditionGroup(groupno){ + $(format("#condition_group_%s", groupno)).remove(); + $(format("#condition_group_%s_joincondition", groupno)).remove(); + resetGroupJoinCondition(groupno); + } + + function resetJoinCondition(groupno, condno) { + + var lastCondition = $("#save_condition_group_"+groupno+" div:last"); + lastCondition.children(".joincondition").css("visibility", "hidden"); + + var previousLastCondition = lastCondition.prev(); + if(previousLastCondition.length > 0) { + previousLastCondition.children(".joincondition").css("visibility", "visible"); + } + + var groupConditions = $(format("#save_condition_group_%s", groupno)).children(); + if(groupConditions.length <= 0) { + removeConditionGroup(groupno); + } + resetGroupJoinCondition(groupno); + } + + function resetGroupJoinCondition(groupno) { + var firstChildNode = $("#save_conditions :first"); + if(firstChildNode.length > 0 && firstChildNode.attr('class').indexOf('condition_group_join_block') >= 0) { + firstChildNode.remove(); + } + } + + //Convert user type into reference for consistency in describe objects + //This is done inplace + function referencify(desc){ + var fields = desc['fields']; + for(var i=0; i 0) { + group_condition_html = '
          \ + \ +
          '; + } + $("#save_conditions").append( + group_condition_html + + '
          \ +
          \ + \ + \ +
          \ +
          \ +
          \ +
          \ +
          \ + \ +
          \ +
          ' + ); + var gpcond = $("#add_group_condition_"+groupid); + gpcond.bind("click", function(){ + addCondition(groupid, condno++); + }); + + var rem_group_img = $("#save_condition_group_"+groupid+"_remove"); + rem_group_img.bind("click", function(){ + removeConditionGroup(groupid); + }); + + // First set groupno to highest groupid + if(groupno < groupid) { + groupno = groupid; + } + // Once groupno is same as highest groupid, increment it for next group usage + if(groupid == groupno) { + groupno += 1; + } + } + + $("#save_condition_group_"+groupid).append( + '
          \ + \ + \ + \ + \ + \ + \ + \ + \ +
          ' + ); + resetJoinCondition(groupid, condid); + + var fe = $("#save_condition_"+condid+"_fieldname"); + var i = 1; + fillOptions(fe, fieldLabels); + + var fullFieldName = fe.attr("value"); + + resetFields(getFieldType(fullFieldName), condid); + + var re = $("#save_condition_"+condid+"_remove"); + re.bind("click", function(){ + removeCondition(groupid, condid); + }); + + fe.bind("change", function(){ + var select = $(this); + var condNo = select.attr("id").match(/save_condition_(\d+)_fieldname/)[1]; + var fullFieldName = $(this).attr('value'); + resetFields(getFieldType(fullFieldName), condNo); + }); + } + + var newTaskPopup = NewTaskPopup(); + $("#new_task").click(function(){ + newTaskPopup.show(); + }); + + var newTemplatePopup = NewTemplatePopup(); + $("#new_template").click(function(){ + newTemplatePopup.show(); + }); + + var groupno=0; + var condno=0; + if(conditions){ + $.each(conditions, function(i, condition){ + var fieldname = condition["fieldname"]; + var groupid = condition["groupid"]; + if(groupid == '') groupid = 0; + addCondition(groupid, condno); + $(format("#save_condition_%s_fieldname", condno)).attr("value", fieldname); + resetFields(getFieldType(fieldname), condno); + $(format("#save_condition_%s_operation", condno)).attr("value", condition["operation"]); + $('#dump').html(condition["value"]); + var text = $('#dump').text(); + $(format("#save_condition_%s_value", condno)).attr("value", text); + $(format("#save_condition_%s_value_type", condno)).attr("value", condition["valuetype"]); + if(condition["joincondition"] != '') { + $(format("#save_condition_%s_joincondition", condno)).attr("value", condition["joincondition"]); + } + if(condition["groupjoin"] != '') { + $(format("#save_condition_group_%s_joincondition", groupid)).attr("value", condition["groupjoin"]); + } + condno+=1; + }); + } + + $("#save_conditions_add").bind("click", function(){ + addCondition(groupno, condno++); + }); + + $("#save_submit").bind("click", function(){ + var conditions = []; + i=0; + $("#save_conditions").children(".condition_group_block").each(function(j, conditiongroupblock){ + $(conditiongroupblock).children(".save_condition_group").each(function(k, conditiongroup){ + $(conditiongroup).children().each(function(l){ + var fieldname = $(this).children(".fieldname").attr("value"); + var operation = $(this).children(".operation").attr("value"); + var value = $(this).children(".expressionvalue").attr("value"); + var valuetype = $(this).children(".expressiontype").attr("value"); + var joincondition = $(this).children(".joincondition").attr("value"); + var groupid = $(this).children(".groupid").attr("value"); + var groupjoin = ''; + if(groupid != '') groupjoin = $('#save_condition_group_'+groupid+'_joincondition').attr("value"); + var condition = { + fieldname:fieldname, + operation:operation, + value:value, + valuetype:valuetype, + joincondition:joincondition, + groupid:groupid, + groupjoin:groupjoin + }; + conditions[i++]=condition; + }); + }); + }); + if(conditions.length==0){ + var out = ""; + }else{ + var out = JSON.stringify(conditions); + } + $("#save_conditions_json").attr("value", out); + }); + pageLoadingPopup.close(); + $('#save_conditions_add').show(); + $('#new_task').show(); + $('#save_submit').show(); + })); + })); + })); + }); + +} \ No newline at end of file diff --git a/modules/com_vtiger_workflow/resources/emailtaskscript.js b/modules/com_vtiger_workflow/resources/emailtaskscript.js new file mode 100644 index 0000000..e4d8704 --- /dev/null +++ b/modules/com_vtiger_workflow/resources/emailtaskscript.js @@ -0,0 +1,290 @@ +/*+******************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +function VTEmailTask($){ + var vtinst = new VtigerWebservices("webservice.php"); + var desc = null; + var accessibleModulesInfo = null; + + var map = fn.map; + var dict = fn.dict; + var filter = fn.filter; + var reduceR = fn.reduceR; + var parallelExecuter = fn.parallelExecuter; + var contains = fn.contains; + var concat = fn.concat; + + function diff(reflist, list) { + var out = []; + $.each(list, function(i, v) { + if(contains(reflist, v)) { + out.push(v); + } + }); + return out; + } + + //Display an error message. + function errorDialog(message){ + alert(message); + } + + //This is a wrapper to handle webservice errors. + function handleError(fn){ + return function(status, result){ + if(status){ + fn(result); + }else{ + errorDialog('Failure:'+result); + } + }; + } + + //Insert text at the cursor + function insertAtCursor(element, value){ + //http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript + if (document.selection) { + element.focus(); + var sel = document.selection.createRange(); + sel.text = value; + element.focus(); + }else if (element.selectionStart || element.selectionStart == '0') { + var startPos = element.selectionStart; + var endPos = element.selectionEnd; + var scrollTop = element.scrollTop; + element.value = element.value.substring(0, startPos) + + value + + element.value.substring(endPos, + element.value.length); + element.focus(); + element.selectionStart = startPos + value.length; + element.selectionEnd = startPos + value.length; + element.scrollTop = scrollTop; + } else { + element.value += value; + element.focus(); + } + } + + //Convert user type into reference for consistency in describe objects + //This is done inplace + function referencify(desc){ + var fields = desc['fields']; + for(var i=0; i' + v + ''); + }); + + } + + $(document).ready(function(){ + vtinst.extendSession(handleError(function(result){ + vtinst.listTypes(handleError(function(accessibleModules) { + accessibleModulesInfo = accessibleModules; + + getDescribeObjects(accessibleModules, moduleName, handleError(function(modules){ + fillSelectBox('task-fieldnames', modules, moduleName); + $('#task-fieldnames-busyicon').hide(); + $('#task-fieldnames').show(); + $('#task-fieldnames').change(function(){ + var textarea = CKEDITOR.instances.save_content; + var value = '$'+jQuery(this).attr('value'); + textarea.insertHtml(value); + }); + + fillSelectBox('task-subjectfields', modules, moduleName, + function(e){return (e['type']['name']!='file' && e['type']['name']!='text' );}); + $('#task-subjectfields-busyicon').hide(); + $('#task-subjectfields').show(); + $('#task-subjectfields').change(function(){ + var input = $($('#save_subject').get()); + var value = '$'+$(this).attr('value'); + input.attr("value", input.attr("value")+' '+value); + }); + + fillSelectBox('task-emailfields', modules, moduleName, + function(e){return e['type']['name']=='email';}); + $('#task-emailfields-busyicon').hide(); + $('#task-emailfields').show(); + $('#task-emailfields').change(function(){ + var input = $($('#save_recepient').get()); + var value = '$'+$(this).attr('value'); + input.attr("value", input.attr("value")+','+value); + }); + var selptype = document.getElementById('task-emailfields'); + var selecc = document.getElementById('task-emailfieldscc'); + for (ops=0;ops/g, ""); + + var fieldElementId = $("#editpopup_field").attr('value'); + $("#"+fieldElementId).attr('value', expression); + + var expressionType = $("#editpopup_expression_type").attr('value'); + $("#"+fieldElementId+"_type").attr('value', expressionType); + + close(); + }); + + $('#editpopup_cancel').bind('click', close); + + $('#editpopup_expression_type').bind('change', function() { + handleExpressionType($(this)); + }); + + $('#editpopup_fieldnames').bind('change', function(){ + var textarea = $('#editpopup_expression').get(0); + var value = $(this).attr('value'); + if(value != '') value += ' '; + //http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript + if (document.selection) { + textarea.focus(); + var sel = document.selection.createRange(); + sel.text = value; + textarea.focus(); + }else if (textarea.selectionStart || textarea.selectionStart == '0') { + var startPos = textarea.selectionStart; + var endPos = textarea.selectionEnd; + var scrollTop = textarea.scrollTop; + textarea.value = textarea.value.substring(0, startPos) + + value + + textarea.value.substring(endPos, + textarea.value.length); + textarea.focus(); + textarea.selectionStart = startPos + value.length; + textarea.selectionEnd = startPos + value.length; + textarea.scrollTop = scrollTop; + } else { + textarea.value += value; + textarea.focus(); + } + // Reset the selected option (to enable next selection) + this.value = ''; + + }); + + function setFieldType(fieldType){ + + function forPicklist(opType){ + var value = $("#editpopup_expression"); + var options = implode('', + map(function (e){ + return ''; + }, + opType['picklistValues']) + ); + value.replaceWith(''); + } + + function forInteger(opType){ + var value = $("#editpopup_expression"); + value.replaceWith(''); + } + function forOwnerField(opType){ + var value = $("#editpopup_expression"); + var options = implode('', + map(function (e){ + return ''; + }, + ownersList) + ); + value.replaceWith(''); + } + function forDateField(opType) { + var value = $("#editpopup_expression"); + value.replaceWith(' \ + SET DATE'); + Calendar.setup ( + {inputField : "editpopup_expression", ifFormat : "%Y-%m-%d", showsTime : false, button : "jscal_trigger_editpopup_expression", singleClick : true, step : 1} + ); + } + function forTimeField(opType){ + var value = $("#editpopup_expression"); + value.replaceWith(''); + } + function forDateTimeField(opType) { + var value = $("#editpopup_expression"); + value.replaceWith(' \ + SET DATE'); + Calendar.setup ( + {inputField : "editpopup_expression", ifFormat : "%Y-%m-%d", showsTime : true, button : "jscal_trigger_editpopup_expression", singleClick : true, step : 1} + ); + } + var functions = { + string:function(opType){ + var value = $("#editpopup_expression"); + value.replaceWith(''); + }, + 'boolean': function(opType){ + var value = $("#editpopup_expression"); + value.replaceWith( + ''); + }, + integer: forInteger, + picklist: forPicklist, + multipicklist: forPicklist, + owner: forOwnerField, + date: forDateField, + datetime: forDateTimeField, + time: forTimeField + }; + + if($('#jscal_trigger_editpopup_expression')) $('#jscal_trigger_editpopup_expression').remove(); + var ret = functions[fieldType]; + if(ret==null){ + ret = functions['string']; + } + return ret; + } + + $.get('index.php', { + module:'com_vtiger_workflow', + action:'com_vtiger_workflowAjax', + file:'WorkflowComponents', + ajax:'true', + modulename:moduleName, + mode:'getownerslist' + }, + function(result){ + result = JSON.parse(result); + ownersList = result; + } + ); + + $.get('index.php', { + module:'com_vtiger_workflow', + action:'com_vtiger_workflowAjax', + file:'WorkflowComponents', + ajax:'true', + modulename:moduleName, + mode:'getfunctionsjson' + }, + function(result){ + result = JSON.parse(result); + var functions = $('#editpopup_functions'); + $.each(result, function(label, template){ + functions.append(format('', template, label)); + }); + $('#editpopup_functions').bind('change', function(){ + var textarea = $('#editpopup_expression').get(0); + var value = $(this).attr('value'); + //http://alexking.org/blog/2003/06/02/inserting-at-the-cursor-using-javascript + if (document.selection) { + textarea.focus(); + var sel = document.selection.createRange(); + sel.text = value; + textarea.focus(); + }else if (textarea.selectionStart || textarea.selectionStart == '0') { + var startPos = textarea.selectionStart; + var endPos = textarea.selectionEnd; + var scrollTop = textarea.scrollTop; + textarea.value = textarea.value.substring(0, startPos) + + value + + textarea.value.substring(endPos, + textarea.value.length); + textarea.focus(); + textarea.selectionStart = startPos + value.length; + textarea.selectionEnd = startPos + value.length; + textarea.scrollTop = scrollTop; + }else { + textarea.value += value; + textarea.focus(); + } + // Reset the selected option (to enable next selection) + this.value = ''; + + }); + + } + ); + + + return { + create: show, + edit: function(fieldelementid, expression, fieldtype){ + $("#editpopup_field").attr('value', fieldelementid); + $("#editpopup_field_type").attr('value', fieldtype.name); + + opType = fieldtype; + var expressionTypeElement = $("#"+fieldelementid+"_type"); + var expressionType = expressionTypeElement.attr('value'); + if(expressionType != '') { + $("#editpopup_expression_type").attr('value', expressionTypeElement.attr('value')); + } else { + $("#editpopup_expression_type").attr('value', 'rawtext'); + } + handleExpressionType(expressionTypeElement); + + if(expression != '') { + $("#editpopup_expression").attr('value', expression); + } + $("#editpopup_expression").focus(); + show(); + }, + close:close, + setModule: function(moduleName){ + $.get('index.php', { + module:'com_vtiger_workflow', + action:'com_vtiger_workflowAjax', + file:'WorkflowComponents', + ajax:'true', + modulename:moduleName, + mode:'getfieldsjson' + }, + function(result){ + var parsed = JSON.parse(result); + var moduleFields = parsed['moduleFields']; + + var fieldNames = $('#editpopup_fieldnames'); + var existingFieldNames = fieldNames.children(); + var firstChildNode = existingFieldNames[0]; + fieldNames.children().remove(); + fieldNames.append(firstChildNode); + $.each(moduleFields, function(fieldName, fieldLabel){ + fieldNames.append(format('', fieldName, fieldLabel)); + }); + }); + } + }; +} + + diff --git a/modules/com_vtiger_workflow/resources/fieldvalidator.js b/modules/com_vtiger_workflow/resources/fieldvalidator.js new file mode 100644 index 0000000..d9e174a --- /dev/null +++ b/modules/com_vtiger_workflow/resources/fieldvalidator.js @@ -0,0 +1,251 @@ +/*+******************************************************************************** + * The contents of this file are subject to the vtiger CRM Public License Version 1.0 + * ("License"); You may not use this file except in compliance with the License + * The Original Code is: vtiger CRM Open Source + * The Initial Developer of the Original Code is vtiger. + * Portions created by vtiger are Copyright (C) vtiger. + * All Rights Reserved. + ********************************************************************************/ + +function MessageBoxPopup(){ + function center(el){ + el.css({ + position: 'absolute' + }); + el.width("400px"); + placeAtCenter(el.get(0)); + } + + function close(){ + jQuery('#error_message_box').css('display', 'none'); + } + + function show(module){ + if(typeof('VtigerJS_DialogBox') != 'undefined') VtigerJS_DialogBox.unblock(); + jQuery('#error_message_box').css('display', 'block'); + center(jQuery('#error_message_box')); + } + + jQuery('#error_message_box_close').click(close); + jQuery('#error_message_box_cancel').click(close); + return { + close:close, + show:show + }; +} + + +var validateMandatoryFields = { + init: function(){ + this.mandatoryFields = []; + }, + validator: function (){ + var emptyFields = []; + jQuery('#empty_fields_message').css('display', 'none'); + var result; + var mandatoryFields = this.mandatoryFields; + for(var i = 0; i < mandatoryFields.length; i++){ + var fieldName = mandatoryFields[i]; + if(typeof this.fieldValue(fieldName) == 'undefined' || this.fieldValue(fieldName)==""){ + emptyFields.push(fieldName); + } + } + if(emptyFields.length!=0){ + result = [false, 'empty_fields_message', emptyFields]; + }else{ + result = [true]; + } + return result; + } +}; + +var validateFieldData = { + init: function(){ + this.validateFieldData = {}; + + this.validateDateTime= function (value){ + value = trim(value); + var dateTimeElements = value.split(' '); + var datePart = dateTimeElements[0]; + var timePart = dateTimeElements[1]; + if(this.validateDate(datePart) == false) { + return false; + } + if(this.validateTime(timePart) == false) { + return false; + } + return true; + }; + this.validateDate = function (value) { + value = trim(value); + var dateParts = value.split('-'); + var yyyy = dateParts[0]; + var mm = dateParts[1]; + var dd = dateParts[2]; + + if (dd<1 || dd>31 || mm<1 || mm>12 || yyyy<1 || yyyy<1000) { + return false + } + + if ((mm==2) && (dd>29)) { + return false + } + + if ((mm==2) && (dd>28) && ((yyyy%4)!=0)) { + return false + } + + switch (parseInt(mm)) { + case 2 : + case 4 : + case 6 : + case 9 : + case 11 : + if (dd>30) { + return false + } + } + + return true; + }; + this.validateTime = function (value) { + value = trim(value); + var re = /^\d{1,2}\:\d{2}:\d{2}$|^\d{1,2}\:\d{2}$/ + if (!re.test(value)) { + return false; + } + var timeParts = value.split(':'); + var hourval = timeParts[0]; + var minval = timeParts[1]; + + if (hourval>23 || minval>59) { + return false + } + return true; + }; + this.validateInteger= function (value) { + value = trim(value); + if (isNaN(value) || value.indexOf(".")!=-1) { + return false; + } + if(value < -2147483648 || value > 2147483647) { + return false; + } + return true; + }; + this.validateNumeric= function (value) { + value = trim(value); + if (isNaN(value)) { + return false; + } + return true; + }, + this.validateEmail= function (value) { + value = trim(value); + var re=new RegExp(/^[a-zA-Z0-9]+([\_\-\.]*[a-zA-Z0-9]+[\_\-]?)*@[a-zA-Z0-9]+([\_\-]?[a-zA-Z0-9]+)*\.+([\-\_]?[a-zA-Z0-9])+(\.?[a-zA-Z0-9]+)*$/); + if (!re.test(value)) { + return false; + } + return true; + } + }, + validator: function (){ + var invalidFieldValues = {}; + jQuery('#invalid_field_values_message').css('display', 'none'); + var result = [true]; + var validationFailed = false; + var fieldInfo = this.validateFieldData; + for(var fieldName in fieldInfo){ + var fieldDetails = fieldInfo[fieldName]; + var fieldType = fieldDetails['type']; + var fieldValue = this.fieldValue(fieldName); + + if(typeof fieldValue == 'undefined' || fieldValue == '' + || fieldValue.replace(/^\s+/g, '').replace(/\s+$/g, '').length == 0) { + // Empty value, no value validation required. + } else if(fieldType == 'email') { + if(!this.validateEmail(fieldValue)) { + invalidFieldValues[fieldName] = fieldDetails; + validationFailed = true; + } + } else if(fieldType == 'integer') { + if(!this.validateInteger(fieldValue)) { + invalidFieldValues[fieldName] = fieldDetails; + validationFailed = true; + } + } else if(fieldType == 'double' || fieldType == 'currency') { + if(!this.validateNumeric(fieldValue)) { + invalidFieldValues[fieldName] = fieldDetails; + validationFailed = true; + } + } else if(fieldType == 'datetime') { + if(!this.validateDateTime(fieldValue)) { + invalidFieldValues[fieldName] = fieldDetails; + validationFailed = true; + } + } else if(fieldType == 'date') { + if(!this.validateDate(fieldValue)) { + invalidFieldValues[fieldName] = fieldDetails; + validationFailed = true; + } + } else if(fieldType == 'time') { + if(!this.validateTime(fieldValue)) { + invalidFieldValues[fieldName] = fieldDetails; + validationFailed = true; + } + } + } + + if(validationFailed == true) { + var errorMessageDetails = ''; + for(fieldName in invalidFieldValues){ + errorMessageDetails += '
        • ' + invalidFieldValues[fieldName]['label'] + ' (' + invalidFieldValues[fieldName]['type'] + ')
        • '; + } + var errorMessageElement = jQuery('#invalid_field_values_fieldlist'); + errorMessageElement.html(errorMessageDetails); + result = [false, 'invalid_field_values_message', invalidFieldValues]; + } + return result; + } +} + +var VTFieldValidatorPrototype = { + validate: function(){ + var isValid = true; + var validators = this.validators; + for(var i = 0; i < validators.length; i++){ + var validator = validators[i]; + var result = validator.call(this); + if(result[0]==false){ + jQuery('#'+result[1]).css('display', 'block'); + isValid = false; + } + } + if(!isValid){ + this.messageBoxPopup.show(); + } + return isValid; + }, + addValidator: function(name, validator){ + validator.init.call(this); + this.validators.push(validator.validator); + }, + fieldValue: function(fieldName){ + return this.form.find('[name='+fieldName+']').val(); + } +}; + +function VTFieldValidator(form){ + var _this = this; + _this.form = form; + _this.messageBoxPopup = MessageBoxPopup(); + form.submit(function(){ + return _this.validate(); + }); + _this.validators = []; + _this.addValidator('mandatoryFields', validateMandatoryFields); + _this.addValidator('validateFieldData', validateFieldData); +} + +VTFieldValidator.prototype = VTFieldValidatorPrototype; + diff --git a/modules/com_vtiger_workflow/resources/functional.js b/modules/com_vtiger_workflow/resources/functional.js new file mode 100644 index 0000000..a5473a2 --- /dev/null +++ b/modules/com_vtiger_workflow/resources/functional.js @@ -0,0 +1,162 @@ +function functional($){ + return { + + /** + * Test: + * fn.format("Hello %s", "world") == "Hello world" + */ + format: function(){ + var i=1; + var fmtStr = arguments[0]; + var args = arguments; + return fmtStr.replace(/%s/g,function(){return args[i++];}) + }, + + addStylesheet: function(url){ + /*From: http://www.hunlock.com/blogs/Howto_Dynamically_Insert_Javascript_And_CSS*/ + var headID = document.getElementsByTagName("head")[0]; + var cssNode = document.createElement('link'); + cssNode.type = 'text/css'; + cssNode.rel = 'stylesheet'; + cssNode.href = url; + cssNode.media = 'screen'; + headID.appendChild(cssNode); + }, + + id: function(v){ + return v; + }, + + map: function(fn, list){ + var out = []; + $.each(list, function(i, v){ + out[out.length]=fn(v); + }); + return out; + }, + + field: function(name){ + return function(object){ + return object[name]; + } + }, + + zip: function(){ + var out = []; + + var lengths = map(field('length'), arguments); + var min = reduceR(function(a,b){return aarguments.length){ + nparams = arguments.length; + } + + var args = []; + for(var i=0;i)[^>]*$|^#(\w+)$/, + +// Is it a simple selector + isSimple = /^.[^:#\[\.]*$/, + +// Will speed up references to undefined, and allows munging its name. + undefined; + +jQuery.fn = jQuery.prototype = { + init: function( selector, context ) { + // Make sure that a selection was provided + selector = selector || document; + + // Handle $(DOMElement) + if ( selector.nodeType ) { + this[0] = selector; + this.length = 1; + return this; + } + // Handle HTML strings + if ( typeof selector == "string" ) { + // Are we dealing with HTML string or an ID? + var match = quickExpr.exec( selector ); + + // Verify a match, and that no context was specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) + selector = jQuery.clean( [ match[1] ], context ); + + // HANDLE: $("#id") + else { + var elem = document.getElementById( match[3] ); + + // Make sure an element was located + if ( elem ){ + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id != match[3] ) + return jQuery().find( selector ); + + // Otherwise, we inject the element directly into the jQuery object + return jQuery( elem ); + } + selector = []; + } + + // HANDLE: $(expr, [context]) + // (which is just equivalent to: $(content).find(expr) + } else + return jQuery( context ).find( selector ); + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) + return jQuery( document )[ jQuery.fn.ready ? "ready" : "load" ]( selector ); + + return this.setArray(jQuery.makeArray(selector)); + }, + + // The current version of jQuery being used + jquery: "1.2.6", + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + // The number of elements contained in the matched element set + length: 0, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == undefined ? + + // Return a 'clean' array + jQuery.makeArray( this ) : + + // Return just the object + this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + // Build a new jQuery matched element set + var ret = jQuery( elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Force the current matched set of elements to become + // the specified array of elements (destroying the stack in the process) + // You should use pushStack() in order to do this, but maintain the stack + setArray: function( elems ) { + // Resetting the length to 0, then using the native Array push + // is a super-fast way to populate an object with array-like properties + this.length = 0; + Array.prototype.push.apply( this, elems ); + + return this; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + var ret = -1; + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem && elem.jquery ? elem[0] : elem + , this ); + }, + + attr: function( name, value, type ) { + var options = name; + + // Look for the case where we're accessing a style value + if ( name.constructor == String ) + if ( value === undefined ) + return this[0] && jQuery[ type || "attr" ]( this[0], name ); + + else { + options = {}; + options[ name ] = value; + } + + // Check to see if we're setting style values + return this.each(function(i){ + // Set all the styles + for ( name in options ) + jQuery.attr( + type ? + this.style : + this, + name, jQuery.prop( this, options[ name ], type, i, name ) + ); + }); + }, + + css: function( key, value ) { + // ignore negative width and height values + if ( (key == 'width' || key == 'height') && parseFloat(value) < 0 ) + value = undefined; + return this.attr( key, value, "curCSS" ); + }, + + text: function( text ) { + if ( typeof text != "object" && text != null ) + return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); + + var ret = ""; + + jQuery.each( text || this, function(){ + jQuery.each( this.childNodes, function(){ + if ( this.nodeType != 8 ) + ret += this.nodeType != 1 ? + this.nodeValue : + jQuery.fn.text( [ this ] ); + }); + }); + + return ret; + }, + + wrapAll: function( html ) { + if ( this[0] ) + // The elements to wrap the target around + jQuery( html, this[0].ownerDocument ) + .clone() + .insertBefore( this[0] ) + .map(function(){ + var elem = this; + + while ( elem.firstChild ) + elem = elem.firstChild; + + return elem; + }) + .append(this); + + return this; + }, + + wrapInner: function( html ) { + return this.each(function(){ + jQuery( this ).contents().wrapAll( html ); + }); + }, + + wrap: function( html ) { + return this.each(function(){ + jQuery( this ).wrapAll( html ); + }); + }, + + append: function() { + return this.domManip(arguments, true, false, function(elem){ + if (this.nodeType == 1) + this.appendChild( elem ); + }); + }, + + prepend: function() { + return this.domManip(arguments, true, true, function(elem){ + if (this.nodeType == 1) + this.insertBefore( elem, this.firstChild ); + }); + }, + + before: function() { + return this.domManip(arguments, false, false, function(elem){ + this.parentNode.insertBefore( elem, this ); + }); + }, + + after: function() { + return this.domManip(arguments, false, true, function(elem){ + this.parentNode.insertBefore( elem, this.nextSibling ); + }); + }, + + end: function() { + return this.prevObject || jQuery( [] ); + }, + + find: function( selector ) { + var elems = jQuery.map(this, function(elem){ + return jQuery.find( selector, elem ); + }); + + return this.pushStack( /[^+>] [^+>]/.test( selector ) || selector.indexOf("..") > -1 ? + jQuery.unique( elems ) : + elems ); + }, + + clone: function( events ) { + // Do the clone + var ret = this.map(function(){ + if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { + // IE copies events bound via attachEvent when + // using cloneNode. Calling detachEvent on the + // clone will also remove the events from the orignal + // In order to get around this, we use innerHTML. + // Unfortunately, this means some modifications to + // attributes in IE that are actually only stored + // as properties will not be copied (such as the + // the name attribute on an input). + var clone = this.cloneNode(true), + container = document.createElement("div"); + container.appendChild(clone); + return jQuery.clean([container.innerHTML])[0]; + } else + return this.cloneNode(true); + }); + + // Need to set the expando to null on the cloned set if it exists + // removeData doesn't work here, IE removes it from the original as well + // this is primarily for IE but the data expando shouldn't be copied over in any browser + var clone = ret.find("*").andSelf().each(function(){ + if ( this[ expando ] != undefined ) + this[ expando ] = null; + }); + + // Copy the events from the original to the clone + if ( events === true ) + this.find("*").andSelf().each(function(i){ + if (this.nodeType == 3) + return; + var events = jQuery.data( this, "events" ); + + for ( var type in events ) + for ( var handler in events[ type ] ) + jQuery.event.add( clone[ i ], type, events[ type ][ handler ], events[ type ][ handler ].data ); + }); + + // Return the cloned set + return ret; + }, + + filter: function( selector ) { + return this.pushStack( + jQuery.isFunction( selector ) && + jQuery.grep(this, function(elem, i){ + return selector.call( elem, i ); + }) || + + jQuery.multiFilter( selector, this ) ); + }, + + not: function( selector ) { + if ( selector.constructor == String ) + // test special case where just one selector is passed in + if ( isSimple.test( selector ) ) + return this.pushStack( jQuery.multiFilter( selector, this, true ) ); + else + selector = jQuery.multiFilter( selector, this ); + + var isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType; + return this.filter(function() { + return isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector; + }); + }, + + add: function( selector ) { + return this.pushStack( jQuery.unique( jQuery.merge( + this.get(), + typeof selector == 'string' ? + jQuery( selector ) : + jQuery.makeArray( selector ) + ))); + }, + + is: function( selector ) { + return !!selector && jQuery.multiFilter( selector, this ).length > 0; + }, + + hasClass: function( selector ) { + return this.is( "." + selector ); + }, + + val: function( value ) { + if ( value == undefined ) { + + if ( this.length ) { + var elem = this[0]; + + // We need to handle select boxes special + if ( jQuery.nodeName( elem, "select" ) ) { + var index = elem.selectedIndex, + values = [], + options = elem.options, + one = elem.type == "select-one"; + + // Nothing was selected + if ( index < 0 ) + return null; + + // Loop through all the selected options + for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { + var option = options[ i ]; + + if ( option.selected ) { + // Get the specifc value for the option + value = jQuery.browser.msie && !option.attributes.value.specified ? option.text : option.value; + + // We don't need an array for one selects + if ( one ) + return value; + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + + // Everything else, we just grab the value + } else + return (this[0].value || "").replace(/\r/g, ""); + + } + + return undefined; + } + + if( value.constructor == Number ) + value += ''; + + return this.each(function(){ + if ( this.nodeType != 1 ) + return; + + if ( value.constructor == Array && /radio|checkbox/.test( this.type ) ) + this.checked = (jQuery.inArray(this.value, value) >= 0 || + jQuery.inArray(this.name, value) >= 0); + + else if ( jQuery.nodeName( this, "select" ) ) { + var values = jQuery.makeArray(value); + + jQuery( "option", this ).each(function(){ + this.selected = (jQuery.inArray( this.value, values ) >= 0 || + jQuery.inArray( this.text, values ) >= 0); + }); + + if ( !values.length ) + this.selectedIndex = -1; + + } else + this.value = value; + }); + }, + + html: function( value ) { + return value == undefined ? + (this[0] ? + this[0].innerHTML : + null) : + this.empty().append( value ); + }, + + replaceWith: function( value ) { + return this.after( value ).remove(); + }, + + eq: function( i ) { + return this.slice( i, i + 1 ); + }, + + slice: function() { + return this.pushStack( Array.prototype.slice.apply( this, arguments ) ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function(elem, i){ + return callback.call( elem, i, elem ); + })); + }, + + andSelf: function() { + return this.add( this.prevObject ); + }, + + data: function( key, value ){ + var parts = key.split("."); + parts[1] = parts[1] ? "." + parts[1] : ""; + + if ( value === undefined ) { + var data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); + + if ( data === undefined && this.length ) + data = jQuery.data( this[0], key ); + + return data === undefined && parts[1] ? + this.data( parts[0] ) : + data; + } else + return this.trigger("setData" + parts[1] + "!", [parts[0], value]).each(function(){ + jQuery.data( this, key, value ); + }); + }, + + removeData: function( key ){ + return this.each(function(){ + jQuery.removeData( this, key ); + }); + }, + + domManip: function( args, table, reverse, callback ) { + var clone = this.length > 1, elems; + + return this.each(function(){ + if ( !elems ) { + elems = jQuery.clean( args, this.ownerDocument ); + + if ( reverse ) + elems.reverse(); + } + + var obj = this; + + if ( table && jQuery.nodeName( this, "table" ) && jQuery.nodeName( elems[0], "tr" ) ) + obj = this.getElementsByTagName("tbody")[0] || this.appendChild( this.ownerDocument.createElement("tbody") ); + + var scripts = jQuery( [] ); + + jQuery.each(elems, function(){ + var elem = clone ? + jQuery( this ).clone( true )[0] : + this; + + // execute all scripts after the elements have been injected + if ( jQuery.nodeName( elem, "script" ) ) + scripts = scripts.add( elem ); + else { + // Remove any inner scripts for later evaluation + if ( elem.nodeType == 1 ) + scripts = scripts.add( jQuery( "script", elem ).remove() ); + + // Inject the elements into the document + callback.call( obj, elem ); + } + }); + + scripts.each( evalScript ); + }); + } +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +function evalScript( i, elem ) { + if ( elem.src ) + jQuery.ajax({ + url: elem.src, + async: false, + dataType: "script" + }); + + else + jQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || "" ); + + if ( elem.parentNode ) + elem.parentNode.removeChild( elem ); +} + +function now(){ + return +new Date; +} + +jQuery.extend = jQuery.fn.extend = function() { + // copy reference to target object + var target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options; + + // Handle a deep copy situation + if ( target.constructor == Boolean ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target != "object" && typeof target != "function" ) + target = {}; + + // extend jQuery itself if only one argument is passed + if ( length == i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) + // Extend the base object + for ( var name in options ) { + var src = target[ name ], copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) + continue; + + // Recurse if we're merging object values + if ( deep && copy && typeof copy == "object" && !copy.nodeType ) + target[ name ] = jQuery.extend( deep, + // Never move original objects, clone them + src || ( copy.length != null ? [ ] : { } ) + , copy ); + + // Don't bring in undefined values + else if ( copy !== undefined ) + target[ name ] = copy; + + } + + // Return the modified object + return target; +}; + +var expando = "jQuery" + now(), uuid = 0, windowData = {}, + // exclude the following css properties to add px + exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, + // cache defaultView + defaultView = document.defaultView || {}; + +jQuery.extend({ + noConflict: function( deep ) { + window.$ = _$; + + if ( deep ) + window.jQuery = _jQuery; + + return jQuery; + }, + + // See test/unit/core.js for details concerning this function. + isFunction: function( fn ) { + return !!fn && typeof fn != "string" && !fn.nodeName && + fn.constructor != Array && /^[\s[]?function/.test( fn + "" ); + }, + + // check if an element is in a (or is an) XML document + isXMLDoc: function( elem ) { + return elem.documentElement && !elem.body || + elem.tagName && elem.ownerDocument && !elem.ownerDocument.body; + }, + + // Evalulates a script in a global context + globalEval: function( data ) { + data = jQuery.trim( data ); + + if ( data ) { + // Inspired by code by Andrea Giammarchi + // http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html + var head = document.getElementsByTagName("head")[0] || document.documentElement, + script = document.createElement("script"); + + script.type = "text/javascript"; + if ( jQuery.browser.msie ) + script.text = data; + else + script.appendChild( document.createTextNode( data ) ); + + // Use insertBefore instead of appendChild to circumvent an IE6 bug. + // This arises when a base node is used (#2709). + head.insertBefore( script, head.firstChild ); + head.removeChild( script ); + } + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase(); + }, + + cache: {}, + + data: function( elem, name, data ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // Compute a unique ID for the element + if ( !id ) + id = elem[ expando ] = ++uuid; + + // Only generate the data cache if we're + // trying to access or manipulate it + if ( name && !jQuery.cache[ id ] ) + jQuery.cache[ id ] = {}; + + // Prevent overriding the named cache with undefined values + if ( data !== undefined ) + jQuery.cache[ id ][ name ] = data; + + // Return the named cache data, or the ID for the element + return name ? + jQuery.cache[ id ][ name ] : + id; + }, + + removeData: function( elem, name ) { + elem = elem == window ? + windowData : + elem; + + var id = elem[ expando ]; + + // If we want to remove a specific section of the element's data + if ( name ) { + if ( jQuery.cache[ id ] ) { + // Remove the section of cache data + delete jQuery.cache[ id ][ name ]; + + // If we've removed all the data, remove the element's cache + name = ""; + + for ( name in jQuery.cache[ id ] ) + break; + + if ( !name ) + jQuery.removeData( elem ); + } + + // Otherwise, we want to remove all of the element's data + } else { + // Clean up the element expando + try { + delete elem[ expando ]; + } catch(e){ + // IE has trouble directly removing the expando + // but it's ok with using removeAttribute + if ( elem.removeAttribute ) + elem.removeAttribute( expando ); + } + + // Completely remove the data cache + delete jQuery.cache[ id ]; + } + }, + + // args is for internal usage only + each: function( object, callback, args ) { + var name, i = 0, length = object.length; + + if ( args ) { + if ( length == undefined ) { + for ( name in object ) + if ( callback.apply( object[ name ], args ) === false ) + break; + } else + for ( ; i < length; ) + if ( callback.apply( object[ i++ ], args ) === false ) + break; + + // A special, fast, case for the most common use of each + } else { + if ( length == undefined ) { + for ( name in object ) + if ( callback.call( object[ name ], name, object[ name ] ) === false ) + break; + } else + for ( var value = object[0]; + i < length && callback.call( value, i, value ) !== false; value = object[++i] ){} + } + + return object; + }, + + prop: function( elem, value, type, i, name ) { + // Handle executable functions + if ( jQuery.isFunction( value ) ) + value = value.call( elem, i ); + + // Handle passing in a number to a CSS property + return value && value.constructor == Number && type == "curCSS" && !exclude.test( name ) ? + value + "px" : + value; + }, + + className: { + // internal only, use addClass("class") + add: function( elem, classNames ) { + jQuery.each((classNames || "").split(/\s+/), function(i, className){ + if ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) ) + elem.className += (elem.className ? " " : "") + className; + }); + }, + + // internal only, use removeClass("class") + remove: function( elem, classNames ) { + if (elem.nodeType == 1) + elem.className = classNames != undefined ? + jQuery.grep(elem.className.split(/\s+/), function(className){ + return !jQuery.className.has( classNames, className ); + }).join(" ") : + ""; + }, + + // internal only, use hasClass("class") + has: function( elem, className ) { + return jQuery.inArray( className, (elem.className || elem).toString().split(/\s+/) ) > -1; + } + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback ) { + var old = {}; + // Remember the old values, and insert the new ones + for ( var name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + callback.call( elem ); + + // Revert the old values + for ( var name in options ) + elem.style[ name ] = old[ name ]; + }, + + css: function( elem, name, force ) { + if ( name == "width" || name == "height" ) { + var val, props = { position: "absolute", visibility: "hidden", display:"block" }, which = name == "width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ]; + + function getWH() { + val = name == "width" ? elem.offsetWidth : elem.offsetHeight; + var padding = 0, border = 0; + jQuery.each( which, function() { + padding += parseFloat(jQuery.curCSS( elem, "padding" + this, true)) || 0; + border += parseFloat(jQuery.curCSS( elem, "border" + this + "Width", true)) || 0; + }); + val -= Math.round(padding + border); + } + + if ( jQuery(elem).is(":visible") ) + getWH(); + else + jQuery.swap( elem, props, getWH ); + + return Math.max(0, val); + } + + return jQuery.curCSS( elem, name, force ); + }, + + curCSS: function( elem, name, force ) { + var ret, style = elem.style; + + // A helper method for determining if an element's values are broken + function color( elem ) { + if ( !jQuery.browser.safari ) + return false; + + // defaultView is cached + var ret = defaultView.getComputedStyle( elem, null ); + return !ret || ret.getPropertyValue("color") == ""; + } + + // We need to handle opacity special in IE + if ( name == "opacity" && jQuery.browser.msie ) { + ret = jQuery.attr( style, "opacity" ); + + return ret == "" ? + "1" : + ret; + } + // Opera sometimes will give the wrong display answer, this fixes it, see #2037 + if ( jQuery.browser.opera && name == "display" ) { + var save = style.outline; + style.outline = "0 solid black"; + style.outline = save; + } + + // Make sure we're using the right name for getting the float value + if ( name.match( /float/i ) ) + name = styleFloat; + + if ( !force && style && style[ name ] ) + ret = style[ name ]; + + else if ( defaultView.getComputedStyle ) { + + // Only "float" is needed here + if ( name.match( /float/i ) ) + name = "float"; + + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); + + var computedStyle = defaultView.getComputedStyle( elem, null ); + + if ( computedStyle && !color( elem ) ) + ret = computedStyle.getPropertyValue( name ); + + // If the element isn't reporting its values properly in Safari + // then some display: none elements are involved + else { + var swap = [], stack = [], a = elem, i = 0; + + // Locate all of the parent display: none elements + for ( ; a && color(a); a = a.parentNode ) + stack.unshift(a); + + // Go through and make them visible, but in reverse + // (It would be better if we knew the exact display type that they had) + for ( ; i < stack.length; i++ ) + if ( color( stack[ i ] ) ) { + swap[ i ] = stack[ i ].style.display; + stack[ i ].style.display = "block"; + } + + // Since we flip the display style, we have to handle that + // one special, otherwise get the value + ret = name == "display" && swap[ stack.length - 1 ] != null ? + "none" : + ( computedStyle && computedStyle.getPropertyValue( name ) ) || ""; + + // Finally, revert the display styles back + for ( i = 0; i < swap.length; i++ ) + if ( swap[ i ] != null ) + stack[ i ].style.display = swap[ i ]; + } + + // We should always get a number back from opacity + if ( name == "opacity" && ret == "" ) + ret = "1"; + + } else if ( elem.currentStyle ) { + var camelCase = name.replace(/\-(\w)/g, function(all, letter){ + return letter.toUpperCase(); + }); + + ret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ]; + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + if ( !/^\d+(px)?$/i.test( ret ) && /^\d/.test( ret ) ) { + // Remember the original values + var left = style.left, rsLeft = elem.runtimeStyle.left; + + // Put in the new values to get a computed value out + elem.runtimeStyle.left = elem.currentStyle.left; + style.left = ret || 0; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + elem.runtimeStyle.left = rsLeft; + } + } + + return ret; + }, + + clean: function( elems, context ) { + var ret = []; + context = context || document; + // !context.createElement fails in IE with an error but returns typeof 'object' + if (typeof context.createElement == 'undefined') + context = context.ownerDocument || context[0] && context[0].ownerDocument || document; + + jQuery.each(elems, function(i, elem){ + if ( !elem ) + return; + + if ( elem.constructor == Number ) + elem += ''; + + // Convert html string into DOM nodes + if ( typeof elem == "string" ) { + // Fix "XHTML"-style tags in all browsers + elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){ + return tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ? + all : + front + ">"; + }); + + // Trim whitespace, otherwise indexOf won't work as expected + var tags = jQuery.trim( elem ).toLowerCase(), div = context.createElement("div"); + + var wrap = + // option or optgroup + !tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + tags.match(/^<(thead|tbody|tfoot|colg|cap)/) && + [ 1, "", "
          " ] || + + !tags.indexOf("", "" ] || + + // matched above + (!tags.indexOf("", "" ] || + + !tags.indexOf("", "" ] || + + // IE can't serialize and + Return + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/savetemplate.php b/modules/com_vtiger_workflow/savetemplate.php new file mode 100644 index 0000000..64eef09 --- /dev/null +++ b/modules/com_vtiger_workflow/savetemplate.php @@ -0,0 +1,46 @@ +name); + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + $title = $request['title']; + $workflowId = $request['workflow_id']; + $wfs = new VTworkflowManager($adb); + $workflow = $wfs->retrieve($workflowId); + $tm = new VTWorkflowTemplateManager($adb); + $tpl = $tm->newTemplate($title, $workflow); + $tm->saveTemplate($tpl); + $returnUrl = $request['return_url']; + ?> + + Return + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/saveworkflow.php b/modules/com_vtiger_workflow/saveworkflow.php new file mode 100644 index 0000000..206e356 --- /dev/null +++ b/modules/com_vtiger_workflow/saveworkflow.php @@ -0,0 +1,68 @@ +name); + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + $description = from_html($request["description"]); + $moduleName = $request["module_name"]; + $conditions = $request["conditions"]; + $taskId = $request["task_id"]; + $saveType=$request["save_type"]; + $executionCondition = $request['execution_condition']; + $wm = new VTWorkflowManager($adb); + if($saveType=='new'){ + $wf = $wm->newWorkflow($moduleName); + $wf->description = $description; + $wf->test = $conditions; + $wf->taskId = $taskId; + $wf->executionConditionAsLabel($executionCondition); + $wm->save($wf); + }else if($saveType=='edit'){ + $wf = $wm->retrieve($request["workflow_id"]); + $wf->description = $description; + $wf->test = $conditions; + $wf->taskId = $taskId; + $wf->executionConditionAsLabel($executionCondition); + $wm->save($wf); + }else{ + throw new Exception(); + } + if(isset($request["return_url"])){ + $returnUrl=$request["return_url"]; + }else{ + $returnUrl=$module->editWorkflowUrl($wf->id); + } + ?> + + Return + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/sortfieldsjson.php b/modules/com_vtiger_workflow/sortfieldsjson.php new file mode 100644 index 0000000..67697ac --- /dev/null +++ b/modules/com_vtiger_workflow/sortfieldsjson.php @@ -0,0 +1,18 @@ +sortby_fields); + } + vtSortFieldsJson($_REQUEST); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasklist.php b/modules/com_vtiger_workflow/tasklist.php new file mode 100644 index 0000000..de7ea0f --- /dev/null +++ b/modules/com_vtiger_workflow/tasklist.php @@ -0,0 +1,51 @@ +name); + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + $smarty = new vtigerCRM_Smarty(); + $tm = new VTTaskManager($adb); + $smarty->assign("tasks", $tm->getTasks()); + $smarty->assign("moduleNames", array("Contacts", "Applications")); + $smarty->assign("taskTypes", array("VTEmailTask", "VTDummyTask")); + $smarty->assign("returnUrl", $requestUrl); + + $smarty->assign("MOD", return_module_language($current_language,'Settings')); + $smarty->assign("APP", $app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH",$image_path); + $smarty->assign("MODULE_NAME", $module->label); + $smarty->assign("PAGE_NAME", 'Task List'); + $smarty->assign("PAGE_TITLE", 'List available tasks'); + $smarty->assign("moduleName", $moduleName); + $smarty->display("{$module->name}/ListTasks.tpl"); + } + vtDisplayTaskList($adb, $_SERVER["REQUEST_URI"], $current_language); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc b/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc new file mode 100644 index 0000000..7cd9f45 --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTCreateEntityTask.inc @@ -0,0 +1,111 @@ +adminUser(); + $moduleName = $entity->getModuleName(); + $entityId = $entity->getId(); + $recordId = vtws_getIdComponents($entityId); + $recordId = $recordId[1]; + + $entityType = $this->entity_type; + if(!vtlib_isModuleActive($entityType)) { + return; + } + + $fieldValueMapping = array(); + if (!empty($this->field_value_mapping)) { + $fieldValueMapping = Zend_Json::decode($this->field_value_mapping); + } + + if (!empty($entityType) && !empty($fieldValueMapping) && count($fieldValueMapping) > 0) { + require_once('data/CRMEntity.php'); + + $newEntity = CRMEntity::getInstance($entityType); + $newEntity->mode = ''; + $newEntityData = VTEntityData::fromCRMEntity($newEntity); + $entityModuleHandler = vtws_getModuleHandlerFromName($entityType, $current_user); + $handlerMeta = $entityModuleHandler->getMeta(); + $ownerFields = $handlerMeta->getOwnerFields(); + + $focus = CRMEntity::getInstance($moduleName); + $focus->id = $recordId; + $focus->mode = 'edit'; + $focus->retrieve_entity_info($recordId, $moduleName); + + foreach ($fieldValueMapping as $fieldInfo) { + $fieldName = $fieldInfo['fieldname']; + $referenceModule = $fieldInfo['modulename']; + $fieldType = ''; + $fieldValueType = $fieldInfo['valuetype']; + $fieldValue = trim($fieldInfo['value']); + + if ($fieldValueType == 'fieldname') { + if ($referenceModule == $entityType) { + $fieldValue = $newEntity->column_fields[$fieldValue]; + } else { + $fieldValue = $focus->column_fields[$fieldValue]; + } + } elseif ($fieldValueType == 'expression') { + require_once 'modules/com_vtiger_workflow/expression_engine/include.inc'; + + $parser = new VTExpressionParser(new VTExpressionSpaceFilter(new VTExpressionTokenizer($fieldValue))); + $expression = $parser->expression(); + $exprEvaluater = new VTFieldExpressionEvaluater($expression); + if ($referenceModule == $entityType) { + $fieldValue = $exprEvaluater->evaluate($newEntityData); + } else { + $fieldValue = $exprEvaluater->evaluate($entity); + } + } elseif (preg_match('/([^:]+):boolean$/', $fieldValue, $match)) { + $fieldValue = $match[1]; + if ($fieldValue == 'true') { + $fieldValue = '1'; + } else { + $fieldValue = '0'; + } + } + + if (in_array($fieldName, $ownerFields) && !is_numeric($fieldValue)) { + $userId = getUserId_Ol($fieldValue); + $groupId = getGrpId($fieldValue); + + if ($userId == 0 && $groupId == 0) { + $fieldValue = $focus->column_fields[$fieldName]; + } else { + $fieldValue = ($userId == 0) ? $groupId : $userId; + } + } + + $newEntity->column_fields[$fieldName] = $fieldValue; + } + $newEntity->column_fields[$this->reference_field] = $focus->id; + $newEntity->save($entityType); + } + + $util->revertUser(); + } + +} + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasks/VTCreateEventTask.inc b/modules/com_vtiger_workflow/tasks/VTCreateEventTask.inc new file mode 100644 index 0000000..3398b54 --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTCreateEventTask.inc @@ -0,0 +1,197 @@ +originalUser = $current_user; + $current_user = $user; + return $user; + } + + public function doTask($entityData){ + if(!vtlib_isModuleActive('Calendar')) { + return; + } + global $adb, $current_user; + $userId = $entityData->get('assigned_user_id'); + if($userId===null){ + $userId = vtws_getWebserviceEntityId('Users', 1); + } + + $moduleName = $entityData->getModuleName(); + $adminUser = $this->getAdmin(); + + $startDate = $this->calculateDate($entityData, $this->startDays, + $this->startDirection, $this->startDatefield); + $endDate = $this->calculateDate($entityData, $this->endDays, + $this->endDirection, $this->endDatefield); + + $fields = array( + 'activitytype'=>$this->eventType, + 'description'=>$this->description, + 'subject'=>$this->eventName, + 'taskpriority'=>$this->priority, + 'eventstatus'=>$this->status, + 'assigned_user_id'=>$userId, + 'time_start'=>self::conv12to24hour($this->startTime), + 'date_start'=> DateTimeField::convertToUserFormat($startDate), + 'time_end'=>self::conv12to24hour($this->endTime), + 'due_date'=>DateTimeField::convertToUserFormat($endDate), + 'visibility'=>'Private', + 'taskstatus'=>'', + 'duration_hours'=>'0' + ); + + $id = $entityData->getId(); + if($moduleName=='Contacts'){ + $fields['contact_id'] = $id; + }else{ + $data = vtws_describe('Calendar', $adminUser); + $fieldInfo = $data['fields']; + foreach($fieldInfo as $field){ + if($field['name']=='parent_id'){ + $parentIdField = $field; + } + } + $refersTo = $parentIdField['type']['refersTo']; + + if(in_array($moduleName, $refersTo)){ + $fields['parent_id'] = $id; + } + } + + $event = vtws_create('Events', $fields, $adminUser); + $handler = vtws_getModuleHandlerFromName('Events', $adminUser); + $meta = $handler->getMeta(); + $recordValues = DataTransform::sanitizeForInsert($event,$meta); + list($typeId, $id) = vtws_getIdComponents($event['id']); + $event = CRMEntity::getInstance('Events'); + $event->id = $id; + $event->column_fields = $recordValues; + + if($this->recurringcheck && !empty($startDate) && + ($this->calendar_repeat_limit_date)) { + + $resultRow = array(); + + $resultRow['date_start'] = $startDate; + $resultRow['time_start'] = self::conv12to24hour($this->startTime); + $resultRow['due_date'] = $this->calendar_repeat_limit_date; + $resultRow['time_end'] = self::conv12to24hour($this->endTime); + $resultRow['recurringtype'] = $this->recurringtype; + $resultRow['recurringfreq'] = $this->repeat_frequency; + + if ($this->sun_flag) { + $daysOfWeekToRepeat[] = 0; + } + if ($this->mon_flag) { + $daysOfWeekToRepeat[] = 1; + } + if ($this->tue_flag) { + $daysOfWeekToRepeat[] = 2; + } + if ($this->wed_flag) { + $daysOfWeekToRepeat[] = 3; + } + if ($this->thu_flag) { + $daysOfWeekToRepeat[] = 4; + } + if ($this->fri_flag) { + $daysOfWeekToRepeat[] = 5; + } + if ($this->sat_flag) { + $daysOfWeekToRepeat[] = 6; + } + + if ($this->recurringtype == 'Daily' || $this->recurringtype == 'Yearly') { + $recurringInfo = $this->recurringtype; + } elseif ($this->recurringtype == 'Weekly') { + if ($daysOfWeekToRepeat != null) { + $recurringInfo = $this->recurringtype . '::' . implode('::', $daysOfWeekToRepeat); + } else { + $recurringInfo = $recurringType; + } + } elseif ($this->recurringtype == 'Monthly') { + $recurringInfo = $this->recurringtype . '::' . $this->repeatMonth; + if ($this->repeatMonth == 'date') { + $recurringInfo = $recurringInfo . '::' . $this->repeatMonth_date; + } else { + $recurringInfo = $recurringInfo . '::' . $this->repeatMonth_daytype . '::' . $this->repeatMonth_day; + } + } + $resultRow['recurringinfo'] = $recurringInfo; + $recurObj = RecurringType::fromDBRequest($resultRow); + + include_once 'modules/Calendar/RepeatEvents.php'; + Calendar_RepeatEvents::repeat($event, $recurObj); + } + global $current_user; + $current_user = $this->originalUser; + } + + private function calculateDate($entityData, $days, $direction, $datefield){ + $baseDate = $entityData->get($datefield); + if($baseDate == '') { + $baseDate = date('Y-m-d'); + } + if($days == '') { + $days = 0; + } + preg_match('/\d\d\d\d-\d\d-\d\d/', $baseDate, $match); + $baseDate = strtotime($match[0]); + $date = strftime('%Y-%m-%d', $baseDate+$days*24*60*60* + ($direction=='Before'?-1:1)); + return $date; + } + + static function conv12to24hour($timeStr){ + $arr = array(); + preg_match('/(\d{1,2}):(\d{1,2})(am|pm)/', $timeStr, $arr); + if($arr[3]=='am'){ + $hours = ((int)$arr[1]) % 12; + }else{ + $hours = ((int)$arr[1]) % 12 + 12; + } + return str_pad($hours, 2, '0', STR_PAD_LEFT).':'.str_pad($arr[2], 2, '0', STR_PAD_LEFT); + } + + public function getTimeFieldList() { + return array('startTime', 'endTime'); + } + +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasks/VTCreateTodoTask.inc b/modules/com_vtiger_workflow/tasks/VTCreateTodoTask.inc new file mode 100644 index 0000000..efbb1de --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTCreateTodoTask.inc @@ -0,0 +1,116 @@ +originalUser = $current_user; + $current_user = $user; + return $user; + } + + public function doTask($entityData){ + if(!vtlib_isModuleActive('Calendar')) { + return; + } + global $adb, $current_user; + $userId = $entityData->get('assigned_user_id'); + if($userId===null){ + $userId = vtws_getWebserviceEntityId('Users', 1); + } + + $baseDate = $entityData->get($this->datefield); + if($baseDate == '') { + $baseDate = date('Y-m-d'); + } + $time = explode(' ',$baseDate); + if(count($time) < 2) { + $time[] = date('H:i'); + } + preg_match('/\d\d\d\d-\d\d-\d\d/', $baseDate, $match); + $baseDate = strtotime($match[0]); + $date = strftime('%Y-%m-%d', $baseDate+$this->days*24*60*60*($this->directions=='Before'?-1:1)); + $startDate = new DateTimeField($date.' '.$time[1]); + $date = $startDate->getDisplayDate(); + $fields = array( + 'activitytype'=>'Task', + 'description'=>$this->description, + 'subject'=>$this->todo, + 'taskpriority'=>$this->priority, + 'taskstatus'=>$this->status, + 'assigned_user_id'=>$userId, + 'time_start'=> $startDate->getDisplayTime(), + 'sendnotification'=>($this->sendNotification!='' && $this->sendNotification!='N')? + true: false, + 'date_start'=>$date, + 'due_date'=>$date, + 'visibility'=>'all', + 'eventstatus'=>'' + ); + $moduleName = $entityData->getModuleName(); + $adminUser = $this->getAdmin(); + $id = $entityData->getId(); + if($moduleName=='Contacts'){ + $fields['contact_id'] = $id; + }else{ + $data = vtws_describe('Calendar', $adminUser); + $fieldInfo = $data['fields']; + foreach($fieldInfo as $field){ + if($field['name']=='parent_id'){ + $parentIdField = $field; + } + } + $refersTo = $parentIdField['type']['refersTo']; + + if(in_array($moduleName, $refersTo)){ + $fields['parent_id'] = $id; + } + } + + vtws_create('Calendar', $fields, $adminUser); + global $current_user; + $current_user = $this->originalUser; + } + + static function conv12to24hour($timeStr){ + $arr = array(); + preg_match('/(\d{1,2}):(\d{1,2})(am|pm)/', $timeStr, $arr); + if($arr[3]=='am'){ + $hours = ((int)$arr[1]) % 12; + }else{ + $hours = ((int)$arr[1]) % 12 + 12; + } + return str_pad($hours, 2, '0', STR_PAD_LEFT).':'.str_pad($arr[2], 2, '0', STR_PAD_LEFT); + } + + public function getTimeFieldList() { + return array('time'); + } + +} +?> diff --git a/modules/com_vtiger_workflow/tasks/VTDummyTask.inc b/modules/com_vtiger_workflow/tasks/VTDummyTask.inc new file mode 100644 index 0000000..ebb709c --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTDummyTask.inc @@ -0,0 +1,19 @@ +statement; + echo "This is a dummy workflow task with $statement"; + } +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasks/VTEmailTask.inc b/modules/com_vtiger_workflow/tasks/VTEmailTask.inc new file mode 100644 index 0000000..e2ea0c7 --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTEmailTask.inc @@ -0,0 +1,54 @@ +query("select user_name, email1, email2 from vtiger_users where id=1"); + $from_email = $adb->query_result($result,0,'email1'); + $from_name = $adb->query_result($result,0,'user_name'); + + $admin = $util->adminUser(); + $module = $entity->getModuleName(); + + $entityCache = new VTEntityCache($admin); + + $et = new VTEmailRecipientsTemplate($this->recepient); + $to_email = $et->render($entityCache, $entity->getId()); + $ecct = new VTEmailRecipientsTemplate($this->emailcc); + $cc = $ecct->render($entityCache, $entity->getId()); + $ebcct = new VTEmailRecipientsTemplate($this->emailbcc); + $bcc = $ebcct->render($entityCache, $entity->getId()); + if(strlen(trim($to_email, " \t\n,")) == 0 && strlen(trim($cc, " \t\n,")) == 0 && + strlen(trim($bcc, " \t\n,")) == 0) { + return ; + } + + $st = new VTSimpleTemplate($this->subject); + $subject = $st->render($entityCache, $entity->getId()); + $ct = new VTSimpleTemplate($this->content); + $content = $ct->render($entityCache, $entity->getId()); + send_mail($module,$to_email,$from_name,$from_email,$subject,$content, $cc, $bcc); + + $util->revertUser(); + } +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasks/VTEntityMethodTask.inc b/modules/com_vtiger_workflow/tasks/VTEntityMethodTask.inc new file mode 100644 index 0000000..ad4d4fb --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTEntityMethodTask.inc @@ -0,0 +1,22 @@ +executeMethod($entityData, $this->methodName); + } +} +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasks/VTSMSTask.inc b/modules/com_vtiger_workflow/tasks/VTSMSTask.inc new file mode 100644 index 0000000..f10eb1f --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTSMSTask.inc @@ -0,0 +1,12 @@ + \ No newline at end of file diff --git a/modules/com_vtiger_workflow/tasks/VTUpdateFieldsTask.inc b/modules/com_vtiger_workflow/tasks/VTUpdateFieldsTask.inc new file mode 100644 index 0000000..57f0610 --- /dev/null +++ b/modules/com_vtiger_workflow/tasks/VTUpdateFieldsTask.inc @@ -0,0 +1,107 @@ +adminUser(); + + $moduleName = $entity->getModuleName(); + $entityId = $entity->getId(); + $recordId = vtws_getIdComponents($entityId); + $recordId = $recordId[1]; + + $moduleHandler = vtws_getModuleHandlerFromName($moduleName, $current_user); + $handlerMeta = $moduleHandler->getMeta(); + $moduleFields = $handlerMeta->getModuleFields(); + + $fieldValueMapping = array(); + if (!empty($this->field_value_mapping)) { + $fieldValueMapping = Zend_Json::decode($this->field_value_mapping); + } + + if (!empty($fieldValueMapping) && count($fieldValueMapping) > 0) { + require_once('data/CRMEntity.php'); + $focus = CRMEntity::getInstance($moduleName); + $focus->id = $recordId; + $focus->mode = 'edit'; + $focus->retrieve_entity_info($recordId, $moduleName); + $focus->clearSingletonSaveFields(); + + $util->loggedInUser(); + foreach ($fieldValueMapping as $fieldInfo) { + $fieldName = $fieldInfo['fieldname']; + $fieldType = ''; + $fieldValueType = $fieldInfo['valuetype']; + $fieldValue = trim($fieldInfo['value']); + + $fieldInstance = $moduleFields[$fieldName]; + + if ($fieldValueType == 'fieldname') { + $fieldValue = $focus->column_fields[$fieldValue]; + } elseif ($fieldValueType == 'expression') { + require_once 'modules/com_vtiger_workflow/expression_engine/include.inc'; + + $parser = new VTExpressionParser(new VTExpressionSpaceFilter(new VTExpressionTokenizer($fieldValue))); + $expression = $parser->expression(); + $exprEvaluater = new VTFieldExpressionEvaluater($expression); + $fieldValue = $exprEvaluater->evaluate($entity); + } else { + if (preg_match('/([^:]+):boolean$/', $fieldValue, $match)) { + $fieldValue = $match[1]; + if ($fieldValue == 'true') { + $fieldValue = '1'; + } else { + $fieldValue = '0'; + } + } + if ($fieldInstance->getFieldDataType() === 'date') { + $date = new DateTimeField($fieldValue); + $fieldValue = $date->getDisplayDate(); + } + } + + if ($fieldInstance->getFieldDataType() === 'owner') { + $userId = getUserId_Ol($fieldValue); + $groupId = getGrpId($fieldValue); + + if ($userId == 0 && $groupId == 0) { + $fieldValue = $focus->column_fields[$fieldName]; + } else { + $fieldValue = ($userId == 0) ? $groupId : $userId; + } + } + + $focus->column_fields[$fieldName] = $fieldValue; + } + + foreach ($focus->column_fields as $fieldName => $fieldValue) { + $focus->column_fields[$fieldName] = html_entity_decode($fieldValue, ENT_QUOTES, $default_charset); + } + $focus->saveentity($moduleName); + $util->revertUser(); + } + $util->revertUser(); + } + +} + +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/templatesformodulejson.php b/modules/com_vtiger_workflow/templatesformodulejson.php new file mode 100644 index 0000000..4bcbbf7 --- /dev/null +++ b/modules/com_vtiger_workflow/templatesformodulejson.php @@ -0,0 +1,23 @@ +getTemplatesForModule($moduleName); + $arr = array(); + foreach($templates as $template){ + $arr[] = array("title"=>$template->title, 'id'=>$template->id); + } + echo Zend_Json::encode($arr); +} +vtTemplatesForModuleJson($adb, $_REQUEST); +?> \ No newline at end of file diff --git a/modules/com_vtiger_workflow/workflowlist.php b/modules/com_vtiger_workflow/workflowlist.php new file mode 100644 index 0000000..32ad02b --- /dev/null +++ b/modules/com_vtiger_workflow/workflowlist.php @@ -0,0 +1,60 @@ +name); + + if(!$util->checkAdminAccess()){ + $errorUrl = $module->errorPageUrl($mod['LBL_ERROR_NOT_ADMIN']); + $util->redirectTo($errorUrl, $mod['LBL_ERROR_NOT_ADMIN']); + return; + } + + $smarty = new vtigerCRM_Smarty(); + $wfs = new VTWorkflowManager($adb); + $smarty->assign("moduleNames", $util->vtGetModules($adb)); + $smarty->assign("returnUrl", $requestUrl); + + $listModule =$request['list_module']; + $smarty->assign("listModule", $listModule); + if($listModule==null || strtolower($listModule)=="all"){ + $smarty->assign("workflows", $wfs->getWorkflows()); + }else{ + $smarty->assign("workflows", $wfs->getWorkflowsForModule($listModule)); + } + + $smarty->assign("MOD",array_merge( + return_module_language($current_language,'Settings'), + return_module_language($current_language, $module->name))); + $smarty->assign("APP", $app_strings); + $smarty->assign("THEME", $theme); + $smarty->assign("IMAGE_PATH",$image_path); + $smarty->assign("MODULE_NAME", $module->label); + $smarty->assign("PAGE_NAME", $mod['LBL_WORKFLOW_LIST']); + $smarty->assign("PAGE_TITLE", $mod['LBL_AVAILABLE_WORKLIST_LIST']); + $smarty->assign("module", $module); + $smarty->assign("CRON_TASK", Vtiger_Cron::getInstance('Workflow')); + $smarty->display("{$module->name}/ListWorkflows.tpl"); +} +vtDisplayWorkflowList($adb, $_REQUEST, $_SERVER["REQUEST_URI"], $app_strings, $current_language); +?> diff --git a/modules/uploads/add2db.php b/modules/uploads/add2db.php new file mode 100644 index 0000000..686938e --- /dev/null +++ b/modules/uploads/add2db.php @@ -0,0 +1,149 @@ +debug("DEBUG In add2db.php"); + + if(isset($_REQUEST['filename_hidden'])) { + $file = $_REQUEST['filename_hidden']; + } else { + $file = $_FILES['filename']['name']; + } + $binFile = sanitizeUploadFileName($file, $upload_badext); + $_FILES["filename"]["name"] = $binFile; + + //decide the file path where we should upload the file in the server + $upload_filepath = decideFilePath(); + + $current_id = $adb->getUniqueID("vtiger_crmentity"); + + if(move_uploaded_file($_FILES["filename"]["tmp_name"],$upload_filepath.$current_id."_".$_FILES["filename"]["name"])) + { + $filename = ltrim(basename(" ".$binFile)); //allowed filename like UTF-8 characters + $filetype= $_FILES['filename']['type']; + $filesize = $_FILES['filename']['size']; + + if($filesize != 0) + { + $desc = $_REQUEST['txtDescription']; + $subject = $_REQUEST['uploadsubject']; + $date_var = $adb->formatDate(date('Y-m-d H:i:s'), true); + $current_date = getdate(); + $current_date = $adb->formatDate(date('Y-m-d H:i:s'), true); + $query = "insert into vtiger_crmentity (crmid,smcreatorid,smownerid,setype,description,createdtime,modifiedtime) values(?,?,?,?,?,?,?)"; + $params = array($current_id, $current_user->id, $current_user->id, $_REQUEST['return_module'].' Attachment', $desc, $date_var, $current_date); + $result = $adb->pquery($query, $params); + + # Added by DG 26 Oct 2005 + # Attachments added to contacts are also added to their accounts + $log->debug("DEBUG return_module: ".$_REQUEST['return_module']); + if ($_REQUEST['return_module'] == 'Contacts') + { + $crmid = $_REQUEST['return_id']; + $query = 'select accountid from vtiger_contactdetails where contactid=?'; + $result = $adb->pquery($query, array($crmid)); + if($adb->num_rows($result) != 0) + { + $log->debug("DEBUG Returned a row"); + $associated_account = $adb->query_result($result,0,"accountid"); + # Now make sure that we haven't already got this attachment associated to this account + # Hmmm... if this works, should we NOT upload the attachment again, and just set the relation for the contact too? + $log->debug("DEBUG Associated Account: ".$associated_account); + $query = "select attachmentsid, name, path from vtiger_attachments where name=?"; + $result = $adb->pquery($query, array($filename)); + if($adb->num_rows($result) != 0) + { + $log->debug("DEBUG Matched a row"); + # Whoops! We matched the name. Is it the same size? + $fname = $adb->query_result($result,0,"name"); + $fpath = $adb->query_result($result,0,"path"); + $fid = $adb->query_result($result,0,"attachmentsid"); + $dg_size = filesize($fpath . "/".$fid."_". $fname); + //$dg_size = $adb->query_result($result,0,"attachmentsize"); + $log->debug("DEBUG: These should be the same size: ".$dg_size." ".$filesize); + if ($dg_size == $filesize) + { + # Yup, it is probably the same file + $associated_account = ''; + } + } + } + else + { + $associated_account = ''; + } + } + + $sql = "insert into vtiger_attachments(attachmentsid, name, description, type,path,subject) values(?,?,?,?,?,?)"; + $params = array($current_id, $filename, $desc, $filetype, $upload_filepath, $subject); + $result = $adb->pquery($sql, $params); + + + $sql1 = "insert into vtiger_seattachmentsrel values(?,?)"; + $params1 = array($crmid, $current_id); + $result = $adb->pquery($sql1, $params1); + + # Attachments added to contacts are also added to their accounts + if ($associated_account) + { + $log->debug("DEBUG: inserting into vtiger_seattachmentsrel from add2db 2"); + $sql1 = "insert into vtiger_seattachmentsrel values(?,?)"; + $params1 = array($associated_account, $current_id); + $result = $adb->pquery($sql1, $params1); + } + + echo ''; + } + else + { + $errormessage = "Error Message
            +
          • Invalid file OR +
          • File has no data +

          " ; + header("Location: index.php?module=uploads&action=uploadsAjax&msg=true&file=upload&errormessage=".$errormessage); + } + } + else + { + $errorCode = $_FILES['binFile']['error']; + $errormessage = ""; + + if($errorCode == 4) + { + $errormessage = "Kindly give a valid file for upload!
          " ; + } + else if($errorCode == 2) + { + $errormessage = "Sorry, the uploaded file exceeds the maximum filesize limit. Please try a file smaller than $upload_maxsize bytes
          "; + } + else if($errorCode == 6) + { + $errormessage = "Please configure upload_tmp_dir variable in php.ini file.
          " ; + } + else if($errorCode == 3 || $errorcode == '') + { + $errormessage = "Problems in file upload. Please try again!
          "; + } + + if($errormessage != '') + { + echo $errormessage; + include("upload.php"); + } + } + +?> \ No newline at end of file diff --git a/modules/uploads/deleteattachments.php b/modules/uploads/deleteattachments.php new file mode 100644 index 0000000..df85404 --- /dev/null +++ b/modules/uploads/deleteattachments.php @@ -0,0 +1,23 @@ +pquery($sql, array($id)); + +$sql = "delete from vtiger_attachments where attachmentsid =?"; +$adb->pquery($sql, array($id)); + +header("Location:index.php?module=".vtlib_purify($_REQUEST['return_module'])."&action=".vtlib_purify($_REQUEST['return_action'])."&record=".vtlib_purify($_REQUEST['return_id'])."&parenttab=".getParentTab()); + + +?> \ No newline at end of file diff --git a/modules/uploads/downloadfile.php b/modules/uploads/downloadfile.php new file mode 100644 index 0000000..dca60af --- /dev/null +++ b/modules/uploads/downloadfile.php @@ -0,0 +1,57 @@ +pquery("SELECT deleted FROM vtiger_crmentity WHERE crmid=?", array($entityid)); +if(!empty($deletecheck) && $adb->query_result($deletecheck, 0, 'deleted') == 1) { + + echo $app_strings['LBL_RECORD_DELETE']; + +} else { + + $dbQuery = "SELECT * FROM vtiger_attachments WHERE attachmentsid = ?" ; + + $result = $adb->pquery($dbQuery, array($attachmentsid)) or die("Couldn't get file list"); + if($adb->num_rows($result) == 1) + { + $fileType = @$adb->query_result($result, 0, "type"); + $name = @$adb->query_result($result, 0, "name"); + $filepath = @$adb->query_result($result, 0, "path"); + $name = html_entity_decode($name, ENT_QUOTES, $default_charset); + $saved_filename = $attachmentsid."_".$name; + $disk_file_size = filesize($filepath.$saved_filename); + $filesize = $disk_file_size + ($disk_file_size % 1024); + $fileContent = fread(fopen($filepath.$saved_filename, "r"), $filesize); + + header("Content-type: $fileType"); + header("Pragma: public"); + header("Cache-Control: private"); + header("Content-Disposition: attachment; filename=$name"); + header("Content-Description: PHP Generated Data"); + echo $fileContent; + } + else + { + echo $app_strings['LBL_RECORD_NOT_FOUND']; + } +} +?> diff --git a/modules/uploads/language/de_de.lang.php b/modules/uploads/language/de_de.lang.php new file mode 100644 index 0000000..b42bcf8 --- /dev/null +++ b/modules/uploads/language/de_de.lang.php @@ -0,0 +1,27 @@ +'Datei anhängen', + 'LBL_ATTACH'=>'Hinzufügen', + 'LBL_CANCEL'=>'Abbrechen', + 'LBL_STEP_SELECT_FILE'=>'1. Schritt : Datei auswählen', + 'LBL_BROWSE_FILES'=>'Klicken Sie auf den Durchsuchen Button und wählen Sie die Datei für den Anhang aus.', + 'LBL_DESCRIPTION'=>'2. Schritt : Beschreiben Sie diese Datei.', + 'LBL_OPTIONAL'=>'(optional)', +); + +?> \ No newline at end of file diff --git a/modules/uploads/language/en_gb.lang.php b/modules/uploads/language/en_gb.lang.php new file mode 100644 index 0000000..6524e6a --- /dev/null +++ b/modules/uploads/language/en_gb.lang.php @@ -0,0 +1,20 @@ + 'Attach File', + 'LBL_ATTACH' => 'Attach', + 'LBL_CANCEL' => 'Cancel', + 'LBL_STEP_SELECT_FILE' => 'Step 1: Select File', + 'LBL_BROWSE_FILES' => 'Click the browse button and select the file to be attached', + 'LBL_DESCRIPTION' => 'Step 2: Write a description', + 'LBL_OPTIONAL' => '(optional)' +); +?> \ No newline at end of file diff --git a/modules/uploads/language/en_us.lang.php b/modules/uploads/language/en_us.lang.php new file mode 100644 index 0000000..1e98a1a --- /dev/null +++ b/modules/uploads/language/en_us.lang.php @@ -0,0 +1,35 @@ +'Attach File', +'LBL_ATTACH'=>'Attach', +'LBL_CANCEL'=>'Cancel', +'LBL_STEP_SELECT_FILE'=>'Step 1 : Select File', +'LBL_BROWSE_FILES'=>'Click the browse button and select the file to be attached', +'LBL_DESCRIPTION'=>'Step 2 : Write some description', +'LBL_OPTIONAL'=>'(optional)', +); + +?> diff --git a/modules/uploads/language/es_es.lang.php b/modules/uploads/language/es_es.lang.php new file mode 100644 index 0000000..7f4a4d3 --- /dev/null +++ b/modules/uploads/language/es_es.lang.php @@ -0,0 +1,33 @@ +'Archivo Adjunto', +'LBL_ATTACH'=>'Adjuntar', +'LBL_CANCEL'=>'Cancelar', +'LBL_STEP_SELECT_FILE'=>'Paso 1 : Seleccionar Archivo', +'LBL_BROWSE_FILES'=>'Pulsar el botón Examinar y seleccionar el fichero para ser adjuntado', +'LBL_DESCRIPTION'=>'Paso 2 : Escribir una descripción', +'LBL_OPTIONAL'=>'(opcional)', +); + +?> diff --git a/modules/uploads/language/es_mx.lang.php b/modules/uploads/language/es_mx.lang.php new file mode 100644 index 0000000..10a50a1 --- /dev/null +++ b/modules/uploads/language/es_mx.lang.php @@ -0,0 +1,34 @@ +'Archivo Adjunto', +'LBL_ATTACH'=>'Adjuntar', +'LBL_CANCEL'=>'Cancelar', +'LBL_STEP_SELECT_FILE'=>'Paso 1 : Seleccionar Archivo', +'LBL_BROWSE_FILES'=>'Pulsar el botón Examinar y seleccionar el archivo para ser adjuntado', +'LBL_DESCRIPTION'=>'Paso 2 : Escribir una descripción', +'LBL_OPTIONAL'=>'(opcional)', +); + +?> diff --git a/modules/uploads/language/fr_fr.lang.php b/modules/uploads/language/fr_fr.lang.php new file mode 100644 index 0000000..9f49e3e --- /dev/null +++ b/modules/uploads/language/fr_fr.lang.php @@ -0,0 +1,23 @@ + 'Pièces jointes', + 'LBL_ATTACH' => 'Ajouter', + 'LBL_CANCEL' => 'Annuler', + 'LBL_STEP_SELECT_FILE' => 'Etape 1 : sélectionnez un fichier', + 'LBL_BROWSE_FILES' => 'Cliquez sur le bouton \"Parcourir\" pour sélectionner un fichier', + 'LBL_DESCRIPTION' => 'Etape 2 : saisissez une description', + 'LBL_OPTIONAL' => '(optionnel)', +); + +?> diff --git a/modules/uploads/language/hu_hu.lang.php b/modules/uploads/language/hu_hu.lang.php new file mode 100644 index 0000000..f4ec954 --- /dev/null +++ b/modules/uploads/language/hu_hu.lang.php @@ -0,0 +1,30 @@ + 'Fájl Csatolmány', + 'LBL_ATTACH' => 'Csatol', + 'LBL_CANCEL' => 'Visszavon', + 'LBL_STEP_SELECT_FILE' => '1. Lépés : Fájl kiválasztása', + 'LBL_BROWSE_FILES' => 'Kattints a Tallózás/Fájl kiválasztás... gombra és válaszd ki a csatolandó fájlt.', + 'LBL_DESCRIPTION' => '2. Lépés : Írj egy megjegyzést', + 'LBL_OPTIONAL' => '(opcionális)' +); +?> \ No newline at end of file diff --git a/modules/uploads/language/nl_nl.lang.php b/modules/uploads/language/nl_nl.lang.php new file mode 100644 index 0000000..d9b3f8f --- /dev/null +++ b/modules/uploads/language/nl_nl.lang.php @@ -0,0 +1,47 @@ + + * - Weltevree.org + ********************************************************************************/ + +/******************************************************************************* + * Vicus eBusiness Solutions Version Control + * @package NL-Dutch + * Description Dutch language pack for vtiger CRM version 5.3.x + * @author $Author: luuk $ + * @version $Revision: 1.2 $ $Date: 2011/11/14 17:07:26 $ + * @source $Source: /var/lib/cvs/vtiger530/Dutch/modules/uploads/language/nl_nl.lang.php,v $ + * @copyright Copyright (c)2005-2011 Vicus eBusiness Solutions bv + * @license vtiger CRM Public License Version 1.0 (by definition) + ********************************************************************************/ + +$mod_strings = Array( + +//Added fields for uploads (attach files) +'LBL_ATTACH_FILE'=>'Bestand toevoegen', +'LBL_ATTACH'=>'Toevoegen', +'LBL_CANCEL'=>'Annuleren', +'LBL_STEP_SELECT_FILE'=>'Stap 1 : Selecteer een bestand', +'LBL_BROWSE_FILES'=>'Klik op de browse-knop en selecteer een bestand om toe te voegen', +'LBL_DESCRIPTION'=>'Stap 2 : Geef een omschrijving', +'LBL_OPTIONAL'=>'(optioneel)', + +); + +?> diff --git a/modules/uploads/language/pt_br.lang.php b/modules/uploads/language/pt_br.lang.php new file mode 100644 index 0000000..ff0c962 --- /dev/null +++ b/modules/uploads/language/pt_br.lang.php @@ -0,0 +1,35 @@ +'Anexar Arquivo', +'LBL_ATTACH'=>'Anexo', +'LBL_CANCEL'=>'Cancelar', +'LBL_STEP_SELECT_FILE'=>'Passo 1 : Selecionar Arquivo', +'LBL_BROWSE_FILES'=>'Clique no botão e selecione o arquivo a ser anexado', +'LBL_DESCRIPTION'=>'Passo 2 : Escreva alguma descrição', +'LBL_OPTIONAL'=>'(opcional)', +); + +?> diff --git a/modules/uploads/language/zh_cn.lang.php b/modules/uploads/language/zh_cn.lang.php new file mode 100644 index 0000000..d06623c --- /dev/null +++ b/modules/uploads/language/zh_cn.lang.php @@ -0,0 +1,36 @@ +'附件', +'LBL_ATTACH'=>'文件', +'LBL_CANCEL'=>'取消', +'LBL_STEP_SELECT_FILE'=>'步骤一:选择文件', +'LBL_BROWSE_FILES'=>'点选浏览器按钮并且选择要附加的文件', +'LBL_DESCRIPTION'=>'步骤二:填入一些描述', +'LBL_OPTIONAL'=>'(选择性输入)', +); + +?> diff --git a/modules/uploads/upload.php b/modules/uploads/upload.php new file mode 100644 index 0000000..a43de41 --- /dev/null +++ b/modules/uploads/upload.php @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + +
          + + + + + +
           
          + + + + +
          + + + + + + + + + + + + + +
          +
          + +
          * 
          +   +
           
          + +
          +
          + + + + + +
          +  " class="crmbutton small save" onclick = "return titleValidation();" />   + " class="crmbutton small cancel" onclick="self.close();" /> +
          +
          + + + diff --git a/modules/uploads/uploadsAjax.php b/modules/uploads/uploadsAjax.php new file mode 100644 index 0000000..907b765 --- /dev/null +++ b/modules/uploads/uploadsAjax.php @@ -0,0 +1,14 @@ +