Add php files
This commit is contained in:
2
modules/EcmSysInfos/DetailView.php
Executable file
2
modules/EcmSysInfos/DetailView.php
Executable file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
require_once('modules/EcmSysInfos/firmInfo.php');
|
||||
869
modules/EcmSysInfos/EcmSysInfo.php
Normal file
869
modules/EcmSysInfos/EcmSysInfo.php
Normal file
@@ -0,0 +1,869 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
/**
|
||||
* THIS CLASS IS FOR DEVELOPERS TO MAKE CUSTOMIZATIONS IN
|
||||
*/
|
||||
class EcmSysInfo extends SugarBean {
|
||||
|
||||
var $new_schema = true;
|
||||
var $module_dir = 'EcmSysInfos';
|
||||
var $object_name = 'EcmSysInfo';
|
||||
var $table_name = 'ecmsysinfos';
|
||||
var $importable = false;
|
||||
var $disable_row_level_security = true; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $modified_by_name;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $description;
|
||||
var $deleted;
|
||||
var $created_by_link;
|
||||
var $modified_user_link;
|
||||
var $assigned_user_id;
|
||||
var $assigned_user_name;
|
||||
var $assigned_user_link;
|
||||
var $phone_home;
|
||||
var $phone_mobile;
|
||||
var $phone_work;
|
||||
var $email1;
|
||||
var $email2;
|
||||
var $adress;
|
||||
var $banks;
|
||||
var $primary_mail;
|
||||
var $phone_fax;
|
||||
var $name_bank;
|
||||
var $invoice_number_format;
|
||||
var $invoice_number_format_id;
|
||||
var $short_name;
|
||||
var $short_name_id;
|
||||
var $smsApi_id;
|
||||
var $name;
|
||||
var $name_id;
|
||||
var $nip;
|
||||
var $nip_id;
|
||||
var $regon;
|
||||
var $regon_id;
|
||||
var $www;
|
||||
var $www_id;
|
||||
var $register_adress;
|
||||
var $correspondence_adress;
|
||||
var $krs;
|
||||
var $krs_id;
|
||||
var $contact_info;
|
||||
|
||||
function EcmSysInfo() {
|
||||
parent::SugarBean();
|
||||
|
||||
$this->fill_operating_values();
|
||||
$query = 'SELECT * FROM operating_values WHERE name = "firmInfo" AND module_name="EcmSysInfos"';
|
||||
$return = $this->db->query($query);
|
||||
$this->setBanks();
|
||||
$this->setAdress();
|
||||
$this->setContactInfo();
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
switch ($row['value0']) {
|
||||
case 'short_name':
|
||||
$this->short_name = $row['value9'];
|
||||
$this->short_name_id = $row['id'];
|
||||
break;
|
||||
case 'smsApi':
|
||||
$this->smsApi_id = $row['id'];
|
||||
break;
|
||||
case 'name':
|
||||
$this->name = $row['value9'];
|
||||
$this->name_id = $row['id'];
|
||||
break;
|
||||
case 'InvoiceNumberFormat':
|
||||
$this->invoice_number_format = $row['value9'];
|
||||
$this->invoice_number_format_id = $row['id'];
|
||||
break;
|
||||
case 'Regon':
|
||||
$this->regon = $row['value9'];
|
||||
$this->regon_id = $row['id'];
|
||||
break;
|
||||
case 'Nip':
|
||||
$this->nip = $row['value9'];
|
||||
$this->nip_id = $row['id'];
|
||||
break;
|
||||
case 'WWW':
|
||||
$this->www = $row['value9'];
|
||||
$this->www_id = $row['id'];
|
||||
break;
|
||||
case 'Krs':
|
||||
$this->krs = $row['value9'];
|
||||
$this->krs_id = $row['id'];
|
||||
break;
|
||||
case 'RegisterAdress':
|
||||
$this->register_adress = array();
|
||||
$this->register_adress['ID'] = $row['id'];
|
||||
$this->register_adress['STREET'] = $row['value1'];
|
||||
$this->register_adress['LOCAL'] = $row['value2'];
|
||||
$this->register_adress['HOME'] = $row['value3'];
|
||||
$this->register_adress['CITY'] = $row['value4'];
|
||||
$this->register_adress['POSTALCODE'] = $row['value5'];
|
||||
$this->register_adress['MAIL'] = $row['value6'];
|
||||
$this->register_adress['COMMUNITY'] = $row['value7'];
|
||||
$this->register_adress['DISTRICT'] = $row['value8'];
|
||||
$this->register_adress['STATE'] = $row['value9'];
|
||||
$this->register_adress['COUNTRY'] = $row['text0'];
|
||||
break;
|
||||
case 'CorrespondenceAdress':
|
||||
$this->correspondence_adress = array();
|
||||
$this->correspondence_adress['ID'] = $row['id'];
|
||||
$this->correspondence_adress['STREET'] = $row['value1'];
|
||||
$this->correspondence_adress['LOCAL'] = $row['value2'];
|
||||
$this->correspondence_adress['HOME'] = $row['value3'];
|
||||
$this->correspondence_adress['CITY'] = $row['value4'];
|
||||
$this->correspondence_adress['POSTALCODE'] = $row['value5'];
|
||||
$this->correspondence_adress['MAIL'] = $row['value6'];
|
||||
$this->correspondence_adress['COMMUNITY'] = $row['value7'];
|
||||
$this->correspondence_adress['DISTRICT'] = $row['value8'];
|
||||
$this->correspondence_adress['STATE'] = $row['value9'];
|
||||
$this->correspondence_adress['COUNTRY'] = $row['text0'];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getDatabaseName(){
|
||||
global $sugar_config,$current_user;
|
||||
$link = mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
|
||||
mysql_select_db($sugar_config['dbconfig']['db_name'],$link);
|
||||
$d=mysql_query("select dbasename from users where id='".$current_user->id."'",$link);
|
||||
$dbase=mysql_fetch_array($d);
|
||||
return $dbase['dbasename'];
|
||||
}
|
||||
|
||||
function fill_operating_values(){
|
||||
//Sprawdzamy numeracje
|
||||
$query = "SELECT value0 FROM operating_values WHERE name ='InvoiceNumberFormat'";
|
||||
$return = $this->db->query($query);
|
||||
$insertData = [
|
||||
['name' => 'InvoiceNumberFormat','value0' =>''],
|
||||
['name' => 'InvoiceNumberFormat','value0' =>'{n}/{Y}'],
|
||||
['name' => 'InvoiceNumberFormat','value0' =>'{n}/{y}'],
|
||||
['name' => 'InvoiceNumberFormat','value0' =>'{n}/{U}/{Y}'],
|
||||
['name' => 'InvoiceNumberFormat','value0' =>'{n}/{m}/{y}'],
|
||||
['name' => 'InvoiceNumberFormat','value0' =>'Nistandardowe'],
|
||||
];
|
||||
$returnData = array();
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
$returnData[$row['value0']] = true;
|
||||
}
|
||||
foreach($insertData as $key => $value){
|
||||
if($returnData[$value['value0']] != true){
|
||||
$keys = array_keys($value);
|
||||
$values = array_values($value);
|
||||
$insertQuery = "INSERT INTO operating_values (" . implode(",",$keys) . ") VALUES ('" . implode("','",$values) . "');";
|
||||
$this->db->query($insertQuery);
|
||||
}
|
||||
}
|
||||
|
||||
//Nagłówki
|
||||
//Pobieram podstawową numerację
|
||||
$query = "SELECT id FROM operating_values WHERE name ='InvoiceNumberFormat' AND value0='{n}/{Y}'";
|
||||
$return = $this->db->query($query);
|
||||
$row = $this->db->fetchByAssoc($return);
|
||||
$numerId = $row['id'];
|
||||
//Sprawdzamy dla jezyka polskiego
|
||||
$query = "SELECT value0 FROM operating_values WHERE name ='headersDocuments' AND value4='pl_pl'";
|
||||
$return = $this->db->query($query);
|
||||
$insertData = [
|
||||
['name' => 'headersDocuments', 'value0' => 'Faktura', 'value1' =>$numerId, 'value2' => 'EcmInvoiceOuts', 'value3' => '01', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Paragon', 'value1' =>$numerId, 'value2' => 'EcmReceipts', 'value3' => '02', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Faktura z paragonu', 'value1' =>$numerId, 'value2' => 'EcmReceiptsToInvoiceOuts', 'value3' => '03', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Oferta', 'value1' =>$numerId, 'value2' => 'EcmQuotes', 'value3' => '04', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Zamówienie sprzedaży', 'value1' =>$numerId, 'value2' => 'EcmSales', 'value3' => '05', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Zamówienie zakupu', 'value1' =>$numerId, 'value2' => 'EcmPurchaseOrders', 'value3' => '06', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'KS', 'value1' =>$numerId, 'value2' => 'EcmStockDocCorrects', 'value3' => '07', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'PZ', 'value1' =>$numerId, 'value2' => 'EcmStockDocIns', 'value3' => '08', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'WZ', 'value1' =>$numerId, 'value2' => 'EcmStockDocOuts', 'value3' => '09', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'PW', 'value1' =>$numerId, 'value2' => 'EcmStockDocInsideIns', 'value3' => '10', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'MM', 'value1' =>$numerId, 'value2' => 'EcmStockDocMoves', 'value3' => '11', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'RW', 'value1' =>$numerId, 'value2' => 'EcmStockDocInsideOuts', 'value3' => '12', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'KP', 'value1' =>$numerId, 'value2' => 'EcmNewKpkwsReceived', 'value3' => '13', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'KW', 'value1' =>$numerId, 'value2' => 'EcmNewKpkwsGave', 'value3' => '14', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Faktury zaliczkowe', 'value1' =>$numerId, 'value2' => 'EcmPrepaymentInvoices', 'value3' => '15', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Umowy', 'value1' =>$numerId, 'value2' => 'EcmAgreements', 'value3' => '16', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Zlecenie serwisowe', 'value1' =>$numerId, 'value2' => 'EcmServiceNews', 'value3' => '17', 'value4' => 'pl_pl', 'module_name' => 'EcmSysInfos'],
|
||||
];
|
||||
$returnData = array();
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
$returnData[$row['value0']] = true;
|
||||
}
|
||||
foreach($insertData as $key => $value){
|
||||
if($returnData[$value['value0']] != true){
|
||||
$keys = array_keys($value);
|
||||
$values = array_values($value);
|
||||
$insertQuery = "INSERT INTO operating_values (" . implode(",",$keys) . ") VALUES ('" . implode("','",$values) . "');";
|
||||
$this->db->query($insertQuery);
|
||||
}
|
||||
}
|
||||
//Sprawdzamy dla jezyka angielskiego
|
||||
$query = "SELECT value0 FROM operating_values WHERE name ='headersDocuments' AND value4='en_us'";
|
||||
$return = $this->db->query($query);
|
||||
$insertData = [
|
||||
['name' => 'headersDocuments', 'value0' => 'Faktura', 'value1' =>$numerId, 'value2' => 'EcmInvoiceOuts', 'value3' => '01', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Paragon', 'value1' =>$numerId, 'value2' => 'EcmReceipts', 'value3' => '02', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Faktura z paragonu', 'value1' =>$numerId, 'value2' => 'EcmReceiptsToInvoiceOuts', 'value3' => '03', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Oferta', 'value1' =>$numerId, 'value2' => 'EcmQuotes', 'value3' => '04', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Zamówienie sprzedaży', 'value1' =>$numerId, 'value2' => 'EcmSales', 'value3' => '05', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Zamówienie zakupu', 'value1' =>$numerId, 'value2' => 'EcmPurchaseOrders', 'value3' => '06', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'KS', 'value1' =>$numerId, 'value2' => 'EcmStockDocCorrects', 'value3' => '07', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'PZ', 'value1' =>$numerId, 'value2' => 'EcmStockDocIns', 'value3' => '08', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'WZ', 'value1' =>$numerId, 'value2' => 'EcmStockDocOuts', 'value3' => '09', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'PW', 'value1' =>$numerId, 'value2' => 'EcmStockDocInsideIns', 'value3' => '10', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'MM', 'value1' =>$numerId, 'value2' => 'EcmStockDocMoves', 'value3' => '11', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'RW', 'value1' =>$numerId, 'value2' => 'EcmStockDocInsideOuts', 'value3' => '12', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'KP', 'value1' =>$numerId, 'value2' => 'EcmNewKpkwsReceived', 'value3' => '13', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'KW', 'value1' =>$numerId, 'value2' => 'EcmNewKpkwsGave', 'value3' => '14', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Faktury zaliczkowe', 'value1' =>$numerId, 'value2' => 'EcmPrepaymentInvoices', 'value3' => '15', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Umowy', 'value1' =>$numerId, 'value2' => 'EcmAgreements', 'value3' => '16', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
['name' => 'headersDocuments', 'value0' => 'Zlecenie serwisowe', 'value1' =>$numerId, 'value2' => 'EcmServiceNews', 'value3' => '17', 'value4' => 'en_us', 'module_name' => 'EcmSysInfos'],
|
||||
];
|
||||
$returnData = array();
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
$returnData[$row['value0']] = true;
|
||||
}
|
||||
foreach($insertData as $key => $value){
|
||||
if($returnData[$value['value0']] != true){
|
||||
$keys = array_keys($value);
|
||||
$values = array_values($value);
|
||||
$insertQuery = "INSERT INTO operating_values (" . implode(",",$keys) . ") VALUES ('" . implode("','",$values) . "');";
|
||||
$this->db->query($insertQuery);
|
||||
}
|
||||
}
|
||||
|
||||
//Autonumeracja
|
||||
$query = "SELECT name FROM operating_values WHERE value2 ='Auto_increment'";
|
||||
$return = $this->db->query($query);
|
||||
$insertData = [
|
||||
['name' => 'ecmproductsCodeIncrement', 'value0' => '0','value2'=>'Auto_increment', 'module_name' => 'EcmProducts'],
|
||||
['name' => 'PartNumber', 'value0' => '0', 'value2' => 'Auto_increment', 'module_name' => 'EcmProducts'],
|
||||
];
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
$returnData[$row['name']] = true;
|
||||
}
|
||||
foreach($insertData as $key => $value){
|
||||
if($returnData[$value['name']] != true){
|
||||
$keys = array_keys($value);
|
||||
$values = array_values($value);
|
||||
$insertQuery = "INSERT INTO operating_values (" . implode(",",$keys) . ") VALUES ('" . implode("','",$values) . "');";
|
||||
$this->db->query($insertQuery);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function bean_implements($interface) {
|
||||
switch ($interface) {
|
||||
case 'ACL': return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getNotificationSettings(){
|
||||
$db=$GLOBALS['db'];
|
||||
$query="select * from operating_values where value0='smsApi'";
|
||||
$res=$db->query($query);
|
||||
return $db->fetchByAssoc($res);
|
||||
}
|
||||
|
||||
function saveNotificationSettings(){
|
||||
|
||||
$query = '';
|
||||
if ($this->smsApi_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value1,value2,value3,value4,value5,value6,value7,value8,value9,module_name) VALUES ("firmInfo","smsApi","' . $_POST['api_login'] . '","' . $_POST['api_password'] . '","' . $_POST['api_from'] . '","' . $_POST['prevent_first'] . '","' . $_POST['prevent_second'] . '","' . $_POST['debt_first'] . '","' . $_POST['debt_other'] . '","' . $_POST['send_sms'] . '","' . $_POST['send_email'] . '","EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value1="' . $_POST['api_login'] . '",value2="' . $_POST['api_password'] . '",value3="' . $_POST['api_from'] . '",value4="' . $_POST['prevent_first'] . '",value5="' . $_POST['prevent_second'] . '",value6="' . $_POST['debt_first'] . '",value7="' . $_POST['debt_other'] . '",value8="' . $_POST['send_sms'] . '",value9="' . $_POST['send_email'] . '" where id="' . $this->smsApi_id . '"';
|
||||
}
|
||||
|
||||
$this->db->query($query);
|
||||
|
||||
|
||||
}
|
||||
function saveShortName($short_name) {
|
||||
$this->short_name = trim($short_name);
|
||||
$query = '';
|
||||
if ($this->short_name_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value9,module_name) VALUES ("firmInfo","short_name","' . $this->short_name . '", "EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value9="' . $this->short_name . '" where id="' . $this->short_name_id . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveKrs($krs) {
|
||||
$this->krs = trim($krs);
|
||||
$query = '';
|
||||
if ($this->krs_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value9,module_name) VALUES ("firmInfo","Krs","' . $this->krs . '", "EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value9="' . $this->krs . '" where id="' . $this->krs_id . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveName($name) {
|
||||
$this->name = trim($name);
|
||||
$query = '';
|
||||
if ($this->name_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value9,module_name) VALUES ("firmInfo","name","' . $this->name . '", "EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value9="' . $this->name . '" where id="' . $this->name_id . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveInvoiceNumberFormat($invoice_number_format) {
|
||||
$this->invoice_number_format = trim($invoice_number_format);
|
||||
$query = '';
|
||||
if ($this->invoice_number_format_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value9,module_name) VALUES ("firmInfo","InvoiceNumberFormat","' . $this->invoice_number_format . '", "EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value9="' . $this->invoice_number_format . '" where id="' . $this->invoice_number_format_id . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveNip($nip) {
|
||||
$this->nip = trim($nip);
|
||||
$query = '';
|
||||
if ($this->nip_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value9,module_name) VALUES ("firmInfo","Nip","' . $this->nip . '", "EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value9="' . $this->nip . '" where id="' . $this->nip_id . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveFile(){
|
||||
try {
|
||||
|
||||
// Undefined | Multiple Files | $_FILES Corruption Attack
|
||||
// If this request falls under any of them, treat it invalid.
|
||||
if (
|
||||
!isset($_FILES['upfile']['error']) ||
|
||||
is_array($_FILES['upfile']['error'])
|
||||
) {
|
||||
throw new RuntimeException('Invalid parameters.');
|
||||
}
|
||||
|
||||
// Check $_FILES['upfile']['error'] value.
|
||||
switch ($_FILES['upfile']['error']) {
|
||||
case UPLOAD_ERR_OK:
|
||||
break;
|
||||
case UPLOAD_ERR_NO_FILE:
|
||||
throw new RuntimeException('');
|
||||
case UPLOAD_ERR_INI_SIZE:
|
||||
case UPLOAD_ERR_FORM_SIZE:
|
||||
throw new RuntimeException('Exceeded filesize limit.');
|
||||
default:
|
||||
throw new RuntimeException('Unknown errors.');
|
||||
}
|
||||
|
||||
// You should also check filesize here.
|
||||
if ($_FILES['upfile']['size'] > 1000000) {
|
||||
throw new RuntimeException('Exceeded filesize limit.');
|
||||
}
|
||||
|
||||
// DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!
|
||||
// Check MIME Type by yourself.
|
||||
$finfo = new finfo(FILEINFO_MIME_TYPE);
|
||||
if (false === $ext = array_search(
|
||||
$finfo->file($_FILES['upfile']['tmp_name']),
|
||||
array(
|
||||
'jpg' => 'image/jpeg',
|
||||
'png' => 'image/png',
|
||||
'gif' => 'image/gif',
|
||||
),
|
||||
true
|
||||
)) {
|
||||
throw new RuntimeException('Invalid file format.');
|
||||
}
|
||||
|
||||
// You should name it uniquely.
|
||||
// DO NOT USE $_FILES['upfile']['name'] WITHOUT ANY VALIDATION !!
|
||||
// On this example, obtain safe unique name from its binary data.
|
||||
$name= create_guid();
|
||||
|
||||
if (!move_uploaded_file(
|
||||
$_FILES['upfile']['tmp_name'],
|
||||
sprintf('upload/%s.%s',
|
||||
$name,
|
||||
$ext
|
||||
)
|
||||
)) {
|
||||
throw new RuntimeException('Failed to move uploaded file.');
|
||||
} else {
|
||||
$query="update operating_values set value7='".$name.'.'.$ext."' where id=19";
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
|
||||
} catch (RuntimeException $e) {
|
||||
|
||||
echo $e->getMessage();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function getLogo(){
|
||||
$z=$this->db->query('select value7 from operating_values where id=19');
|
||||
$bb=$this->db->fetchByAssoc($z);
|
||||
return $bb['value7'];
|
||||
}
|
||||
|
||||
function saveBanks($banks) {
|
||||
$arrayin = array();
|
||||
foreach ($banks as $key => $value) {
|
||||
if (!isset($value['ID']) || $value['ID'] == '') {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value3,value2,value4,value5,
|
||||
value7,value8,value9,module_name) VALUES ("firmInfo","bankAccount","' . $value['CURRENCY'] . '","' . $value['NAMESHORT'] . '","' . $value['SWIFT'] . '","' . trim($value['IBAN']) . '","' . trim($value['POSITION']) . '","' . trim($value['NAME']) . '","' . trim($value['NUMBER']) . '", "EcmSysInfos")';
|
||||
$this->db->query($query);
|
||||
$query = 'SELECT id FROM operating_values WHERE name="firmInfo" AND value0="bankAccount" AND module_name = "EcmSysInfos" AND ';
|
||||
$query .= '" AND value9 = "' . trim($value['NUMBER']);
|
||||
$query .= '" AND value8 = "' . trim($value['NAME']);
|
||||
$query .= '" AND value3 = "' . trim($value['CURRENCY']);
|
||||
$query .= '" AND value4 = "' . trim($value['SWIFT']);
|
||||
$query .= '" AND value5 = "' . trim($value['IBAN']);
|
||||
$query .= '" AND value2 = "' . trim($value['NAMESHORT']);
|
||||
$query .= '" AND value7 = "' . $value['POSITION'] . '"';
|
||||
|
||||
$return = $this->db->query($query);
|
||||
$row = $this->db->fetchByAssoc($return);
|
||||
$arrayin[] = $row['id'];
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value7 = "' . $value['POSITION'] . '",value2 = "' . $value['NAMESHORT'] . '", value8 = "' . trim($value['NAME']) . '", value9 = "' . trim($value['NUMBER']) . '"
|
||||
, value3 = "' . trim($value['CURRENCY']) . '"
|
||||
, value4 = "' . trim($value['SWIFT']) . '"
|
||||
, value5 = "' . trim($value['IBAN']) . '" where id="' . $value['ID'] . '"';
|
||||
$this->db->query($query);
|
||||
$arrayin[] = $value['ID'];
|
||||
}
|
||||
}
|
||||
$stringIn = '(';
|
||||
//delete old adress
|
||||
if (count($arrayin) > 0) {
|
||||
foreach ($arrayin as $key => $value) {
|
||||
if ($key == 0) {
|
||||
$stringIn .=$value;
|
||||
} else {
|
||||
$stringIn .= ',' . $value;
|
||||
}
|
||||
}
|
||||
$stringIn .= ')';
|
||||
$query = 'DELETE FROM operating_values WHERE id NOT IN ' . $stringIn . ' AND name="firmInfo" AND value0="bankAccount" AND module_name = "EcmSysInfos"';
|
||||
$this->db->query($query);
|
||||
}
|
||||
$this->setBanks();
|
||||
}
|
||||
|
||||
function saveRegon($regon) {
|
||||
$this->regon = trim($regon);
|
||||
$query = '';
|
||||
if ($this->regon_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value9,module_name) VALUES ("firmInfo","Regon","' . $this->regon . '", "EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value9="' . $this->regon . '" where id="' . $this->regon_id . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveAdress($adress) {
|
||||
$arrayin = array();
|
||||
foreach ($adress as $key => $value) {
|
||||
if (!isset($value['ID']) || $value['ID'] == '') {
|
||||
$query = 'INSERT INTO operating_values (name,value0,module_name,value2,value3,value4,value5,value6,value7) ';
|
||||
$query .= 'VALUES ("firmInfo","Adress", "EcmSysInfos","';
|
||||
$query .= $value['POSITION'] . '","'; // value2
|
||||
$query .= trim($value['NAME']) . '","';
|
||||
$query .= trim($value['STREET']) . '","';
|
||||
$query .= trim($value['CITY']) . '","';
|
||||
$query .= trim($value['POSTALCODE']) . '","';
|
||||
$query .= trim($value['COUNTRY']) . '"';
|
||||
$query .= ')';
|
||||
$this->db->query($query);
|
||||
$query = 'SELECT id FROM operating_values WHERE name="firmInfo" AND value0="Adress" AND module_name = "EcmSysInfos" AND ';
|
||||
$query .= ' value2 = "' . $value['POSITION'];
|
||||
$query .= '" AND value3 = "' . trim($value['NAME']);
|
||||
$query .= '" AND value4 = "' . trim($value['STREET']);
|
||||
$query .= '" AND value5 = "' . trim($value['CITY']);
|
||||
$query .= '" AND value6 = "' . trim($value['POSTALCODE']);
|
||||
$query .= '" AND value7 = "' . trim($value['COUNTRY']) . '"';
|
||||
$return = $this->db->query($query);
|
||||
$row = $this->db->fetchByAssoc($return);
|
||||
$arrayin[] = $row['id'];
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET ';
|
||||
$query .= ' value2 = "' . $value['POSITION'];
|
||||
$query .= '", value3 = "' . trim($value['NAME']);
|
||||
$query .= '", value4 = "' . trim($value['STREET']);
|
||||
$query .= '", value5 = "' . trim($value['CITY']);
|
||||
$query .= '", value6 = "' . trim($value['POSTALCODE']);
|
||||
$query .= '", value7 = "' . trim($value['COUNTRY']);
|
||||
$query .= '" WHERE id="' . $value['ID'] . '"';
|
||||
$this->db->query($query);
|
||||
$arrayin[] = $value['ID'];
|
||||
}
|
||||
}
|
||||
$stringIn = '(';
|
||||
//delete old adress
|
||||
if (count($arrayin) > 0) {
|
||||
foreach ($arrayin as $key => $value) {
|
||||
if ($key == 0) {
|
||||
$stringIn .=$value;
|
||||
} else {
|
||||
$stringIn .= ',' . $value;
|
||||
}
|
||||
}
|
||||
$stringIn .= ')';
|
||||
$query = 'DELETE FROM operating_values WHERE id NOT IN ' . $stringIn . ' AND name="firmInfo" AND value0="Adress" AND module_name = "EcmSysInfos"';
|
||||
$this->db->query($query);
|
||||
}
|
||||
$this->setAdress();
|
||||
}
|
||||
|
||||
function saveWWW($www) {
|
||||
$this->www = trim($www);
|
||||
$query = '';
|
||||
if ($this->www_id == null) {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value9,module_name) VALUES ("firmInfo","WWW","' . $this->www . '", "EcmSysInfos")';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value9="' . $this->www . '" where id="' . $this->www_id . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveRegisterAdress($register_adress) {
|
||||
$this->register_adress = $register_adress;
|
||||
$query = '';
|
||||
if ($this->register_adress['ID'] == null || $this->register_adress['ID'] == '') {
|
||||
$query = 'INSERT INTO operating_values (name,module_name,value0,value1,value2,value3,value4,value5,value6,value7,value8,value9,text0) '
|
||||
. ' VALUES ("firmInfo","EcmSysInfos","RegisterAdress",'
|
||||
. '"' . trim($this->register_adress['STREET']) . '",'
|
||||
. '"' . trim($this->register_adress['LOCAL']) . '",'
|
||||
. '"' . trim($this->register_adress['HOME']) . '",'
|
||||
. '"' . trim($this->register_adress['CITY']) . '",'
|
||||
. '"' . trim($this->register_adress['POSTALCODE']) . '",'
|
||||
. '"' . trim($this->register_adress['MAIL']) . '",'
|
||||
. '"' . trim($this->register_adress['COMMUNITY']) . '",'
|
||||
. '"' . trim($this->register_adress['DISTRICT']) . '",'
|
||||
. '"' . trim($this->register_adress['STATE']) . '",'
|
||||
. '"' . trim($this->register_adress['COUNTRY']) . '"'
|
||||
. ')';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET '
|
||||
. 'value1="' . trim($this->register_adress['STREET']) . '"'
|
||||
. ',value2="' . trim($this->register_adress['LOCAL']) . '"'
|
||||
. ',value3="' . trim($this->register_adress['HOME']) . '"'
|
||||
. ',value4="' . trim($this->register_adress['CITY']) . '"'
|
||||
. ',value5="' . trim($this->register_adress['POSTALCODE']) . '"'
|
||||
. ',value6="' . trim($this->register_adress['MAIL']) . '"'
|
||||
. ',value7="' . trim($this->register_adress['COMMUNITY']) . '"'
|
||||
. ',value8="' . trim($this->register_adress['DISTRICT']) . '"'
|
||||
. ',value9="' . trim($this->register_adress['STATE']) . '"'
|
||||
. ',text0="' . trim($this->register_adress['COUNTRY']) . '"'
|
||||
. ' WHERE id="' . $this->register_adress['ID'] . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveCorrespondenceAdress($correspondence_adress) {
|
||||
$this->correspondence_adress = $correspondence_adress;
|
||||
$query = '';
|
||||
if ($this->correspondence_adress['ID'] == null || $this->correspondence_adress['ID'] == '') {
|
||||
$query = 'INSERT INTO operating_values (name,module_name,value0,value1,value2,value3,value4,value5,value6,value7,value8,value9,text0) '
|
||||
. ' VALUES ("firmInfo","EcmSysInfos","CorrespondenceAdress",'
|
||||
. '"' . trim($this->correspondence_adress['STREET']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['LOCAL']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['HOME']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['CITY']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['POSTALCODE']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['MAIL']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['COMMUNITY']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['DISTRICT']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['STATE']) . '",'
|
||||
. '"' . trim($this->correspondence_adress['COUNTRY']) . '"'
|
||||
. ')';
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET '
|
||||
. 'value1="' . trim($this->correspondence_adress['STREET']) . '"'
|
||||
. ',value2="' . trim($this->correspondence_adress['LOCAL']) . '"'
|
||||
. ',value3="' . trim($this->correspondence_adress['HOME']) . '"'
|
||||
. ',value4="' . trim($this->correspondence_adress['CITY']) . '"'
|
||||
. ',value5="' . trim($this->correspondence_adress['POSTALCODE']) . '"'
|
||||
. ',value6="' . trim($this->correspondence_adress['MAIL']) . '"'
|
||||
. ',value7="' . trim($this->correspondence_adress['COMMUNITY']) . '"'
|
||||
. ',value8="' . trim($this->correspondence_adress['DISTRICT']) . '"'
|
||||
. ',value9="' . trim($this->correspondence_adress['STATE']) . '"'
|
||||
. ',text0="' . trim($this->correspondence_adress['COUNTRY']) . '"'
|
||||
. ' WHERE id="' . $this->correspondence_adress['ID'] . '"';
|
||||
}
|
||||
$this->db->query($query);
|
||||
}
|
||||
|
||||
function saveEmailSettings() {
|
||||
|
||||
$query = 'UPDATE operating_values SET value1 = "' . $_POST['email_hostPort'] . '", value2 = "' .$_POST['email_login'] . '",
|
||||
value3 = "' . $this->encrypt($_POST['email_password'],$_POST['email_login']) . '", value4 = "' .$_POST['email_address'] . '", value5 = "' .$_POST['autentication_type'] . '", value6="'.$_POST['email_address_replay'].'" where id="18"';
|
||||
$this->db->query($query);
|
||||
require_once 'include/ECM/EcmSendPdfButton/EcmSendPdfButton.inc';
|
||||
$t = new EcmSendPdfButton('Users', '','','');
|
||||
$t->setAdress('outtervision@gmail.com');
|
||||
// $t->setAdress('slawomir.chojnicki@gmail.com');
|
||||
$t->setSubject('test');
|
||||
$t->setBody('asdasd');
|
||||
$success = false;
|
||||
$success= $t->sendEmail();
|
||||
if($success==1){
|
||||
return 1;
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value1 = "", value2 = "", value3 = "" where id="18"';
|
||||
// $this->db->query($query);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
function getEmailSettings(){
|
||||
$query="select value1,value2,value3,value4,value5,value6 from operating_values where id=18";
|
||||
$zap=$this->db->query($query);
|
||||
$b=$this->db->fetchByAssoc($zap);
|
||||
$b['value3']=$this->decrypt( $b['value3'], $b['value2']);
|
||||
return $b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function encrypt($data, $secret)
|
||||
{
|
||||
//Generate a key from a hash
|
||||
$key = md5(utf8_encode($secret), true);
|
||||
|
||||
//Take first 8 bytes of $key and append them to the end of $key.
|
||||
$key .= substr($key, 0, 8);
|
||||
|
||||
//Pad for PKCS7
|
||||
$blockSize = mcrypt_get_block_size('tripledes', 'ecb');
|
||||
$len = strlen($data);
|
||||
$pad = $blockSize - ($len % $blockSize);
|
||||
$data .= str_repeat(chr($pad), $pad);
|
||||
|
||||
//Encrypt data
|
||||
$encData = mcrypt_encrypt('tripledes', $key, $data, 'ecb');
|
||||
|
||||
return base64_encode($encData);
|
||||
}
|
||||
|
||||
public function decrypt($data, $secret)
|
||||
{
|
||||
//Generate a key from a hash
|
||||
$key = md5(utf8_encode($secret), true);
|
||||
|
||||
//Take first 8 bytes of $key and append them to the end of $key.
|
||||
$key .= substr($key, 0, 8);
|
||||
|
||||
$data = base64_decode($data);
|
||||
|
||||
$data = mcrypt_decrypt('tripledes', $key, $data, 'ecb');
|
||||
|
||||
$block = mcrypt_get_block_size('tripledes', 'ecb');
|
||||
$len = strlen($data);
|
||||
$pad = ord($data[$len-1]);
|
||||
|
||||
return substr($data, 0, strlen($data) - $pad);
|
||||
}
|
||||
|
||||
function saveContactInfo($contact) {
|
||||
$arrayin = array();
|
||||
foreach ($contact as $key => $value) {
|
||||
if (!isset($value['ID']) || $value['ID'] == '') {
|
||||
$query = 'INSERT INTO operating_values (name,value0,value7,value8,value9,module_name) VALUES ("firmInfo","ContactInfo","' . $value['POSITION'] . '","' . trim($value['NAME']) . '","' . trim($value['VALUE']) . '", "EcmSysInfos")';
|
||||
$this->db->query($query);
|
||||
$query = 'SELECT id FROM operating_values WHERE name="firmInfo" AND value0="ContactInfo" AND module_name = "EcmSysInfos" AND ';
|
||||
$query .= '" AND value9 = "' . trim($value['VALUE']);
|
||||
$query .= '" AND value8 = "' . trim($value['NAME']);
|
||||
$query .= '" AND value7 = "' . $value['POSITION'] . '"';
|
||||
$return = $this->db->query($query);
|
||||
$row = $this->db->fetchByAssoc($return);
|
||||
$arrayin[] = $row['id'];
|
||||
} else {
|
||||
$query = 'UPDATE operating_values SET value7 = "' . $value['POSITION'] . '", value8 = "' . trim($value['NAME']) . '", value9 = "' . trim($value['VALUE']) . '" where id="' . $value['ID'] . '"';
|
||||
$this->db->query($query);
|
||||
$arrayin[] = $value['ID'];
|
||||
}
|
||||
}
|
||||
$stringIn = '(';
|
||||
//delete old adress
|
||||
if (count($arrayin) > 0) {
|
||||
foreach ($arrayin as $key => $value) {
|
||||
if ($key == 0) {
|
||||
$stringIn .=$value;
|
||||
} else {
|
||||
$stringIn .= ',' . $value;
|
||||
}
|
||||
}
|
||||
$stringIn .= ')';
|
||||
$query = 'DELETE FROM operating_values WHERE id NOT IN ' . $stringIn . ' AND name="firmInfo" AND value0="ContactInfo" AND module_name = "EcmSysInfos"';
|
||||
$this->db->query($query);
|
||||
}
|
||||
$this->setContactInfo();
|
||||
}
|
||||
|
||||
function getKRS() {
|
||||
return $this->krs;
|
||||
}
|
||||
|
||||
function getFormatNumberForModule($modulename){
|
||||
$return = $this->db->query("SELECT value0 FROM operating_values WHERE id = (SELECT value1 from operating_values WHERE value2='". $modulename ."' AND name='headersDocuments' AND module_name='EcmSysInfos' and value4='pl_pl')");
|
||||
$row = $this->db->fetchByAssoc($return);
|
||||
return $row['value0'];
|
||||
}
|
||||
|
||||
function getHeaderForModule($modulename, $language='pl_pl'){
|
||||
$return = $this->db->query("SELECT text0 from operating_values WHERE value2='". $modulename ."' AND value4='". $language ."'AND name='headersDocuments' AND module_name='EcmSysInfos'");
|
||||
$row = $this->db->fetchByAssoc($return);
|
||||
return html_entity_decode($row['text0']);
|
||||
}
|
||||
|
||||
function getFooterForModule($modulename, $language='pl_pl'){
|
||||
$return = $this->db->query("SELECT text1 from operating_values WHERE value2='". $modulename ."' AND value4='". $language ."' AND name='headersDocuments' AND module_name='EcmSysInfos'");
|
||||
$row = $this->db->fetchByAssoc($return);
|
||||
return html_entity_decode($row['text1']);
|
||||
}
|
||||
|
||||
function getCorrespondenceAdress() {
|
||||
return $this->correspondence_adress;
|
||||
}
|
||||
|
||||
function getRegisterAdress() {
|
||||
return $this->register_adress;
|
||||
}
|
||||
|
||||
function getContactInfo() {
|
||||
return $this->contact_info;
|
||||
}
|
||||
|
||||
function getWWW() {
|
||||
return $this->www;
|
||||
}
|
||||
|
||||
function getRegon() {
|
||||
return $this->regon;
|
||||
}
|
||||
|
||||
function getNip() {
|
||||
return $this->nip;
|
||||
}
|
||||
|
||||
function getBanks() {
|
||||
return $this->banks;
|
||||
}
|
||||
|
||||
function getBankAccoutnsList() {
|
||||
$tmp = array();
|
||||
foreach ($this->banks as $key => $value) {
|
||||
$tmp[] = $value['NUMBER'];
|
||||
}
|
||||
return $tmp;
|
||||
}
|
||||
|
||||
function getShortName() {
|
||||
return $this->short_name;
|
||||
}
|
||||
|
||||
function getName() {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function getInvoiceNumberFormat() {
|
||||
return $this->invoice_number_format;
|
||||
}
|
||||
|
||||
function getAdress() {
|
||||
return $this->adress;
|
||||
}
|
||||
|
||||
function setBanks() {
|
||||
$query = 'SELECT id ID, value7 POSITION, value2 NAMESHORT, value8 NAME, value9 NUMBER, value3 CURRENCY, value4 SWIFT, value5 IBAN FROM operating_values WHERE name = "firmInfo" AND value0 = "bankAccount" AND module_name="EcmSysInfos" ORDER BY value7';
|
||||
$return = $this->db->query($query);
|
||||
$this->banks = array();
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
$this->banks[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
function getCurrencies(){
|
||||
$zap=$this->db->query("select id,name from currencies where deleted=0");
|
||||
$list=array();
|
||||
$tmp['id']='PLN';
|
||||
$tmp['name']='PLN';
|
||||
$list[]=$tmp;
|
||||
while($dane=$this->db->fetchByAssoc($zap)){
|
||||
$list[]=$dane;
|
||||
}
|
||||
return $list;
|
||||
}
|
||||
|
||||
function setAdress() {
|
||||
$query = 'SELECT id ID, value2 POSITION, value3 NAME, value4 STREET, value5 CITY, value6 POSTALCODE, value7 COUNTRY, value8 PHONE, value9 FAX FROM operating_values WHERE name = "firmInfo" AND value0 = "Adress" AND module_name="EcmSysInfos" ORDER BY value2';
|
||||
$return = $this->db->query($query);
|
||||
$this->adress = array();
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
$this->adress[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
function setContactInfo() {
|
||||
$query = 'SELECT id ID, value7 POSITION, value8 NAME, value9 VALUE FROM operating_values WHERE name = "firmInfo" AND value0 = "ContactInfo" AND module_name="EcmSysInfos" ORDER BY value7';
|
||||
$return = $this->db->query($query);
|
||||
$this->contact_info = array();
|
||||
while ($row = $this->db->fetchByAssoc($return)) {
|
||||
$this->contact_info[] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields() {
|
||||
parent::fill_in_additional_detail_fields();
|
||||
}
|
||||
|
||||
}
|
||||
2
modules/EcmSysInfos/EditView.php
Executable file
2
modules/EcmSysInfos/EditView.php
Executable file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
require_once('modules/EcmSysInfos/firmInfo.php');
|
||||
2
modules/EcmSysInfos/ListView.php
Executable file
2
modules/EcmSysInfos/ListView.php
Executable file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
require_once('modules/EcmSysInfos/firmInfo.php');
|
||||
95
modules/EcmSysInfos/Menu.php
Executable file
95
modules/EcmSysInfos/Menu.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
/* Ustawianie module_menu
|
||||
* domyslnie pobiera tablice z elementami od 0 do 3 gdzie:
|
||||
* 0 - link - gotowy link do wklejenia, tak jak bylo
|
||||
* 1 - nazwa - nazwa do wyswietlenia, tak jak bylo
|
||||
* 2 - ikona - nazwa ikony ktora ma byc dolaczona, tak jak bylo
|
||||
* jest tu ino dwa problemy:
|
||||
* - po pierwsze poniewaz musi byc podana sama nazwa obrazka
|
||||
* bez rozszerzenia poniewaz kod michala sam dopisuje
|
||||
* '.gif' do nazwy
|
||||
* - po drugie plik musi sie znajdowac w 'themes/default/images/'
|
||||
* 3 - parentTab - angielska nazwa modulu, tak jak bylo
|
||||
* dodalem taki feature ze jesli nie podasz tego parametru, lub
|
||||
* bedzie on bledny to bedzie sie staral dac parentTab z nazwy
|
||||
* folderu w ktorym aktualnie sie plik Menu.php znajduje
|
||||
* -----------------------------------------------------------------------------
|
||||
* A teraz nowości:
|
||||
* można ustawiać przez tabele klucz => wartosc i nastepujace klucze sa obslugiwane
|
||||
* 'showName' => 'tekst do wyswietlenia', - nazwa wyswietlana na liscie
|
||||
* 'icon' => 'ikona.png' - ikona pobierana z aktualnie ustawionej skroki
|
||||
* aktualnie uzywana w systemie jest Sugar5 wiec
|
||||
* jesli chcesz dodac nowa to wrzuc to do jej folderu
|
||||
* rozmiar ustawiony jest na 16px x 16 px wiec moze
|
||||
* byc ustawiona nawet wieksza
|
||||
* 'link' => "index.php?module=EcmSysInfos&action=firmInfo" - link tak jak bylo poprzednio
|
||||
*
|
||||
* 'module' => 'modul' - modul w ktorym jest akcja
|
||||
* 'action' => 'akcja' - akcja jaka ma byc wykonana
|
||||
* Powyzsze dwie akcje zostana wykonane TYLKO I WYLACZNIE wtedy gdy
|
||||
* NIE ZOSTANA PODANE klucze link albo 0 - z przykladu powyzej to nie zadziala
|
||||
* wiec jesli powyzsze warunki sa spelnione to zostanie stworzony taki link:
|
||||
* index.php?module=modul&action=akcja
|
||||
*
|
||||
* 'parentTab' => 'EcmSysInfos' - angielska nazwa zakladki
|
||||
*
|
||||
* przyklad dziala ponizej
|
||||
* reasumujac - stare wpisy dziala jak dzialaly, a fajnie jak by kozystac z nowych
|
||||
* bo sa czytelniejsze i troche lepiej dzialaja; p
|
||||
*/
|
||||
/*
|
||||
$module_menu[]=Array(
|
||||
'action' => 'firmInfo',
|
||||
'module' => 'EcmSysInfos',
|
||||
'showName' => $mod_strings['LNK_FIRM_INFO'],
|
||||
'icon' => 'MoreDetail2.png',
|
||||
'parentTab' => 'EcmSysInfos'
|
||||
);
|
||||
$module_menu[]=Array(
|
||||
'action' => 'headersDocuments',
|
||||
'module' => 'EcmSysInfos',
|
||||
'showName' => $mod_strings['LNK_HEADERS_DOCUMENTS'],
|
||||
'icon' => 'header_footer.png',
|
||||
'parentTab' => 'EcmSysInfos'
|
||||
);*/
|
||||
$module_menu [] = Array("index.php?module=EcmSysInfos&action=firmInfo", $mod_strings['LNK_FIRM_INFO'],"EcmSysInfos","EcmSysInfos");
|
||||
$module_menu [] = Array("index.php?module=EcmSysInfos&action=headersDocuments", $mod_strings['LNK_HEADERS_DOCUMENTS'],"EcmSysInfos","EcmSysInfos");
|
||||
?>
|
||||
59
modules/EcmSysInfos/dbpost.php
Executable file
59
modules/EcmSysInfos/dbpost.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('-1');
|
||||
|
||||
if (!$_POST ['job'] || $_POST ['job'] == '')
|
||||
die('-1');
|
||||
|
||||
switch ($_POST ['job']) {
|
||||
case 'getCodeHeader':
|
||||
getCodeHeader($_POST['id'], $_POST['language']);
|
||||
break;
|
||||
case 'getCodeFooter':
|
||||
getCodeFooter($_POST['id'], $_POST['language']);
|
||||
break;
|
||||
case 'getInvoiceNumberFormat':
|
||||
getInvoiceNumberFormat($_POST['id']);
|
||||
break;
|
||||
case 'getDocListForLanguage':
|
||||
getDocListForLanguage($_POST['language']);
|
||||
break;
|
||||
}
|
||||
|
||||
function getCodeHeader($id, $language = 'pl_pl') {
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = 'SELECT text0 FROM operating_values WHERE operating_values.name="headersDocuments" AND module_name="EcmSysInfos" AND id="' . $id . '"';
|
||||
$rs = $db->query($q);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
print html_entity_decode($row ['text0']);
|
||||
}
|
||||
|
||||
function getCodeFooter($id, $language = 'pl_pl') {
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = 'SELECT text1 FROM operating_values WHERE operating_values.name="headersDocuments" AND module_name="EcmSysInfos" AND id="' . $id . '"';
|
||||
$rs = $db->query($q);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
print html_entity_decode($row ['text1']);
|
||||
}
|
||||
|
||||
function getInvoiceNumberFormat($id) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = 'SELECT value1 FROM operating_values WHERE operating_values.name="headersDocuments" AND module_name="EcmSysInfos" AND id="' . $id . '"';
|
||||
$rs = $db->query($q);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
print json_encode($row ['value1']);
|
||||
}
|
||||
|
||||
function getDocListForLanguage($language) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$querySelect = 'SELECT id id,value0 name FROM operating_values WHERE operating_values.name="headersDocuments" AND module_name="EcmSysInfos" AND value4="' . $language . '" ORDER BY value3';
|
||||
$rows = $db->query($querySelect);
|
||||
$data = array();
|
||||
while ($rr = $db->fetchByAssoc($rows)) {
|
||||
$data[$rr['id']] = $rr['name'];
|
||||
}
|
||||
print json_encode($data);
|
||||
}
|
||||
|
||||
?>
|
||||
342
modules/EcmSysInfos/firmInfo.php
Normal file
342
modules/EcmSysInfos/firmInfo.php
Normal file
@@ -0,0 +1,342 @@
|
||||
<?php
|
||||
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('Not A Valid Entry Point');
|
||||
}
|
||||
global $app_strings;
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
$error='';
|
||||
require_once('modules/EcmSysInfos/EcmSysInfo.php');
|
||||
$EcmSysInfo = new EcmSysInfo();
|
||||
|
||||
if (!$current_user->is_admin) {
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_die();
|
||||
}
|
||||
$db = $GLOBALS ['db'];
|
||||
|
||||
if (isset($_POST['short_name'])) {
|
||||
$EcmSysInfo->saveShortName($_POST['short_name']);
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['name'])) {
|
||||
$EcmSysInfo->saveName($_POST['name']);
|
||||
}
|
||||
|
||||
if (isset($_POST['email_hostPort'])){
|
||||
$error=$EcmSysInfo->saveEmailSettings();
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['banks'])) {
|
||||
$EcmSysInfo->saveBanks($_POST['banks']);
|
||||
}
|
||||
if (isset($_POST['adress'])) {
|
||||
$EcmSysInfo->saveAdress($_POST['adress']);
|
||||
}
|
||||
if (isset($_POST['invoice_number_format'])) {
|
||||
$EcmSysInfo->saveInvoiceNumberFormat($_POST['invoice_number_format']);
|
||||
}
|
||||
if (isset($_POST['nip'])) {
|
||||
$EcmSysInfo->saveNip($_POST['nip']);
|
||||
}
|
||||
if (isset($_POST['regon'])) {
|
||||
$EcmSysInfo->saveRegon($_POST['regon']);
|
||||
}
|
||||
if (isset($_POST['www'])) {
|
||||
$EcmSysInfo->saveWWW($_POST['www']);
|
||||
}
|
||||
if (isset($_POST['krs'])) {
|
||||
$EcmSysInfo->saveKrs($_POST['krs']);
|
||||
}
|
||||
if (isset($_POST['register_adress'])) {
|
||||
$EcmSysInfo->saveRegisterAdress($_POST['register_adress']);
|
||||
}
|
||||
if (isset($_POST['correspondence_adress'])) {
|
||||
$EcmSysInfo->saveCorrespondenceAdress($_POST['correspondence_adress']);
|
||||
}
|
||||
if (isset($_POST['contact'])) {
|
||||
$EcmSysInfo->saveContactInfo($_POST['contact']);
|
||||
}
|
||||
if (isset($_FILES['upfile'])) {
|
||||
$EcmSysInfo->saveFile();
|
||||
}
|
||||
if (isset($_POST['api_version'])) {
|
||||
$EcmSysInfo->saveNotificationSettings();
|
||||
}
|
||||
if (isset($_POST['update_headers'])) {
|
||||
$db = $GLOBALS['db'];
|
||||
$tmpmodstrings = $mod_strings;
|
||||
foreach ($sugar_config['languages'] as $key => $value) {
|
||||
$mod_strings = return_module_language($key, 'EcmSysInfos');
|
||||
$return = $db->query("SELECT id, value2 FROM operating_values WHERE name='headersDocuments' AND module_name='EcmSysInfos' AND value4='" . $key . "'");
|
||||
while ($row = $db->fetchByAssoc($return)) {
|
||||
$www = $EcmSysInfo->getWWW();
|
||||
$logo= $EcmSysInfo-> getLogo();
|
||||
|
||||
if($logo!=''){
|
||||
$ww = '<img style="height:70px;" src="upload/'.$logo.'">';
|
||||
} else {
|
||||
$ww='';
|
||||
}
|
||||
|
||||
$adres = $EcmSysInfo->getRegisterAdress();
|
||||
$ul = $adres['STREET'] . ' ' . $adres['LOCAL'];
|
||||
if(strlen(trim($adres['HOME']))>0){
|
||||
$ul .= '/'.$adres['HOME'];
|
||||
}
|
||||
$bank = $EcmSysInfo->getBanks();
|
||||
|
||||
$stronk = '';
|
||||
$footer = '
|
||||
<hr>
|
||||
<table style="width: 100%; vertical-align:top;">
|
||||
<tr>
|
||||
<td style="width:50%">
|
||||
<span style="font-size:8px">
|
||||
' . $EcmSysInfo->getName() . '<br/>
|
||||
ul. ' . $ul . '<br/>
|
||||
' . $adres['POSTALCODE'] . ' ' . $adres['CITY'] . '<br />
|
||||
NIP: ' . $EcmSysInfo->getNip() . '</td>
|
||||
</span>
|
||||
<td style="width:20%">
|
||||
<span style="font-size:8px">
|
||||
' . $mod_strings['LBL_BANK'] . ':<br>
|
||||
' . $mod_strings['LBL_BANK_ACCOUNT_NUMBER'] . ':
|
||||
</span>
|
||||
</td>
|
||||
<td style="width:30%">
|
||||
<span style="font-size:8px">
|
||||
' . $bank[0]['NAME'] . '<br>
|
||||
' . $bank[0]['NUMBER'] . '
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
$extra='';
|
||||
switch ($row['value2']) {
|
||||
case 'EcmStockDocIns' :
|
||||
$footer = '';
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmInvoiceOuts' :
|
||||
$stronk = $mod_strings['LBL_SELLER'];
|
||||
break;
|
||||
case 'EcmStockDocCorrects' :
|
||||
$footer = '';
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmPurchaseOrders' :
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmStockDocOuts' :
|
||||
$stronk = $mod_strings['LBL_PROVIDER'];
|
||||
break;
|
||||
case 'EcmStockDocInsideIns' :
|
||||
$footer = '';
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmStockDocInsideOuts' :
|
||||
$footer = '';
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmStockDocMoves' :
|
||||
$footer = '';
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmQuotes' :
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmSales' :
|
||||
$stronk = $mod_strings['LBL_PURCHASER'];
|
||||
break;
|
||||
case 'EcmReceipts' :
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmReceiptsToInvoiceOuts' :
|
||||
$stronk = $mod_strings['LBL_EXHIBITOR'];
|
||||
break;
|
||||
case 'EcmNewKpkwsReceived' :
|
||||
$footer = '';
|
||||
$stronk = $mod_strings['LBL_RECEIVED'];
|
||||
break;
|
||||
case 'EcmNewKpkwsGave' :
|
||||
$footer = '';
|
||||
$stronk = $mod_strings['LBL_GAVE'];
|
||||
break;
|
||||
case 'EcmPaymentStates' :
|
||||
$extra='<p style="text-align: center;"><span style="font-size:22px"><strong>Wezwanie do zapłaty</strong></span></p>';
|
||||
$footer = '';
|
||||
$stronk = 'Wystawca';
|
||||
break;
|
||||
case 'EcmPaymentStates2' :
|
||||
$footer = '';
|
||||
$stronk = 'Wystawca';
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$table = '
|
||||
<table border="0" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align:middle; width:30%">
|
||||
' . $ww . '
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:70%">
|
||||
<span style="font-size:12px">
|
||||
<strong>' . $stronk . '</strong><br>
|
||||
' . $EcmSysInfo->getName() . '<br>
|
||||
ul. ' . $ul . '<br>
|
||||
' . $adres['POSTALCODE'] . ' ' . $adres['CITY'] . '<br>
|
||||
' . $mod_strings['LBL_NIP'] . ': ' . $EcmSysInfo->getNip() . '
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>'.$extra.'
|
||||
';
|
||||
$queryUpdate = "UPDATE operating_values SET "
|
||||
. "text0 = '" . htmlspecialchars(str_replace("'", '"', $table)) . "', "
|
||||
. "text1 = '" . htmlspecialchars(str_replace("'", '"', $footer)) . "' "
|
||||
. " WHERE id= '" . $row['id'] . "'";
|
||||
$tmp = $db->query($queryUpdate);
|
||||
}
|
||||
$extraTemplates=array('EcmPaymentStates'=>'Monit');
|
||||
foreach ($extraTemplates as $key=>$val){
|
||||
switch ($key) {
|
||||
case 'EcmPaymentStates' :
|
||||
$footer = '';
|
||||
$stronk = 'Wystawca';
|
||||
break;
|
||||
case 'EcmPaymentStates2' :
|
||||
$footer = '';
|
||||
$stronk = 'Wystawca';
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
$www = $EcmSysInfo->getWWW();
|
||||
$logo= $EcmSysInfo-> getLogo();
|
||||
|
||||
if($logo!=''){
|
||||
$ww = '<img style="height:70px;" src="upload/'.$logo.'">';
|
||||
} else {
|
||||
$ww='';
|
||||
}
|
||||
|
||||
$adres = $EcmSysInfo->getRegisterAdress();
|
||||
$ul = $adres['STREET'] . ' ' . $adres['LOCAL'];
|
||||
if(strlen(trim($adres['HOME']))>0){
|
||||
$ul .= '/'.$adres['HOME'];
|
||||
}
|
||||
$bank = $EcmSysInfo->getBanks();
|
||||
|
||||
|
||||
$footer = '
|
||||
<hr>
|
||||
<table style="width: 100%; vertical-align:top;">
|
||||
<tr>
|
||||
<td style="width:50%">
|
||||
<span style="font-size:8px">
|
||||
' . $EcmSysInfo->getName() . '<br/>
|
||||
ul. ' . $ul . '<br/>
|
||||
' . $adres['POSTALCODE'] . ' ' . $adres['CITY'] . '<br />
|
||||
NIP: ' . $EcmSysInfo->getNip() . '</td>
|
||||
</span>
|
||||
<td style="width:20%">
|
||||
<span style="font-size:8px">
|
||||
' . $mod_strings['LBL_BANK'] . ':<br>
|
||||
' . $mod_strings['LBL_BANK_ACCOUNT_NUMBER'] . ':
|
||||
</span>
|
||||
</td>
|
||||
<td style="width:30%">
|
||||
<span style="font-size:8px">
|
||||
' . $bank[0]['NAME'] . '<br>
|
||||
' . $bank[0]['NUMBER'] . '
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>';
|
||||
$table = '
|
||||
<table border="0" style="width:100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="vertical-align:middle; width:30%">
|
||||
' . $ww . '
|
||||
</td>
|
||||
<td style="vertical-align:middle; width:70%">
|
||||
<span style="font-size:12px">
|
||||
<strong>' . $stronk . '</strong><br>
|
||||
' . $EcmSysInfo->getName() . '<br>
|
||||
ul. ' . $ul . '<br>
|
||||
' . $adres['POSTALCODE'] . ' ' . $adres['CITY'] . '<br>
|
||||
' . $mod_strings['LBL_NIP'] . ': ' . $EcmSysInfo->getNip() . '
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table><p style="text-align: center;"><span style="font-size:22px"><strong>Wezwanie do zapłaty</strong></span></p>
|
||||
';
|
||||
$return = $db->query("SELECT id, value2 FROM operating_values WHERE name='headersDocuments' AND module_name='EcmSysInfos' AND value2='" . $key . "'");
|
||||
if($return->num_rows==0){
|
||||
$queryUpdate = "INSERT INTO operating_values SET "
|
||||
. "text0 = '" . htmlspecialchars(str_replace("'", '"', $table)) . "', "
|
||||
. "text1 = '" . htmlspecialchars(str_replace("'", '"', $footer)) . "', "
|
||||
. " name='headersDocuments', module_name='EcmSysInfos',value2='" . $key . "',value4='pl_pl',value0='" . $val . "'";
|
||||
$tmp = $db->query($queryUpdate);
|
||||
$queryUpdate = "INSERT INTO operating_values SET "
|
||||
. "text0 = '" . htmlspecialchars(str_replace("'", '"', $table)) . "', "
|
||||
. "text1 = '" . htmlspecialchars(str_replace("'", '"', $footer)) . "', "
|
||||
. " name='headersDocuments', module_name='EcmSysInfos',value2='" . $key . "',value4='en_us',value0='" . $val . "'";
|
||||
$tmp = $db->query($queryUpdate);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$mod_strings = $tmpmodstrings;
|
||||
}
|
||||
$email=$EcmSysInfo->getEmailSettings();
|
||||
$smsset=$EcmSysInfo->getNotificationSettings();
|
||||
$smarty = new Sugar_Smarty ();
|
||||
|
||||
$smarty->assign('api_login',$smsset['value1']);
|
||||
$smarty->assign('prevent_first',$smsset['value4']);
|
||||
$smarty->assign('prevent_second',$smsset['value5']);
|
||||
$smarty->assign('api_password',$smsset['value2']);
|
||||
$smarty->assign('debt_first',$smsset['value6']);
|
||||
$smarty->assign('api_from',$smsset['value3']);
|
||||
$smarty->assign('debt_other',$smsset['value7']);
|
||||
$smarty->assign('send_sms',$smsset['value8']);
|
||||
$smarty->assign('send_email',$smsset['value9']);
|
||||
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('APP', $app_strings);
|
||||
$smarty->assign('ADRESS', $EcmSysInfo->getAdress());
|
||||
$smarty->assign('BANKS', $EcmSysInfo->getBanks());
|
||||
$smarty->assign('SHORT_NAME', $EcmSysInfo->getShortName());
|
||||
$smarty->assign('CURRENCIES', $EcmSysInfo->getCurrencies());
|
||||
$smarty->assign('NAME', $EcmSysInfo->getName());
|
||||
$smarty->assign('NIP', $EcmSysInfo->getNip());
|
||||
$smarty->assign('KRS', $EcmSysInfo->getKrs());
|
||||
$smarty->assign('REGON', $EcmSysInfo->getRegon());
|
||||
$smarty->assign('WWW', $EcmSysInfo->getWWW());
|
||||
$smarty->assign('email_hostPort', $email['value1']);
|
||||
$smarty->assign('email_login', $email['value2']);
|
||||
$smarty->assign('error',$error);
|
||||
$smarty->assign('email_address_replay', $email['value6']);
|
||||
|
||||
$smarty->assign('email_password', $email['value3']);
|
||||
$smarty->assign('email_address',$email['value4']);
|
||||
$smarty->assign('autentication_type',$email['value5']);
|
||||
|
||||
$smarty->assign('CONTACTS', $EcmSysInfo->getContactInfo());
|
||||
$smarty->assign('REGISTER_ADRESS', $EcmSysInfo->getRegisterAdress());
|
||||
$smarty->assign('CORRESPONDENCE_ADRESS', $EcmSysInfo->getCorrespondenceAdress());
|
||||
$smarty->assign('INVOICE_NUMBER_FORMAT', $EcmSysInfo->getInvoiceNumberFormat());
|
||||
echo $smarty->display('modules/EcmSysInfos/tpl/firmInfo.tpl');
|
||||
79
modules/EcmSysInfos/headersDocuments.php
Executable file
79
modules/EcmSysInfos/headersDocuments.php
Executable file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
if (!$current_user->is_admin) {
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_die();
|
||||
}
|
||||
global $sugar_config, $current_user, $mod_strings;
|
||||
|
||||
$db = $GLOBALS ['db'];
|
||||
$rows = $db->query('SELECT id FROM operating_values WHERE name = "InvoiceNumberFormat" AND value0="Nistandardowe"');
|
||||
$rr = $db->fetchByAssoc($rows);
|
||||
$tmpid = $rr['id'];
|
||||
|
||||
|
||||
|
||||
if (isset($_POST['header1']) || isset($_POST['footer1'])) {
|
||||
$inf = null;
|
||||
if ($_POST['invoice_number_format'] == $tmpid) {
|
||||
$q = "insert into operating_values (name,value0) VALUES ('InvoiceNumberFormat', '" . trim($_POST['custom_number_format']) . "')";
|
||||
$db->query($q);
|
||||
$q = 'SELECT id FROM operating_values WHERE name = "InvoiceNumberFormat" AND value0= "' . trim($_POST['custom_number_format']) . '"';
|
||||
$tmp = $db->query($q);
|
||||
$rr = $db->fetchByAssoc($tmp);
|
||||
$inf = $rr['id'];
|
||||
} else {
|
||||
$inf = $_POST['invoice_number_format'];
|
||||
}
|
||||
$queryUpdate = "UPDATE operating_values SET "
|
||||
. "value1 = '" . $inf . "',"
|
||||
. "text0 = '" . $_POST['header1'] . "',"
|
||||
. "text1 = '" . $_POST['footer1'] . "' "
|
||||
. " WHERE id= '" . $_POST['docselect'] . "' AND"
|
||||
. " value4= '" . $_POST['languageselect'] . "'";
|
||||
$error = $db->query($queryUpdate);
|
||||
}
|
||||
// insert into operating_values (name,value0) VALUES ('InvoiceNumberFormat', '')
|
||||
// insert into operating_values (name,value0) VALUES ('InvoiceNumberFormat', '{n}/{Y}')
|
||||
// insert into operating_values (name,value0) VALUES ('InvoiceNumberFormat', '{n}/{U}/{Y}')
|
||||
// insert into operating_values (name,value0) VALUES ('InvoiceNumberFormat', '{n}/{m}/{y}')
|
||||
// insert into operating_values (name,value0) VALUES ('InvoiceNumberFormat', 'Nistandardowe')
|
||||
|
||||
$query = 'SELECT id, value0 FROM operating_values WHERE name = "InvoiceNumberFormat" ORDER BY value0';
|
||||
$rows = $db->query($query);
|
||||
$numberFormatList = array();
|
||||
while ($rr = $db->fetchByAssoc($rows)) {
|
||||
$numberFormatList[$rr['id']] = $rr['value0'];
|
||||
}
|
||||
$data = null;
|
||||
if (!isset($_POST['languageselect'])) {
|
||||
$querySelect = 'SELECT id id,value0 name FROM operating_values WHERE operating_values.name="headersDocuments" AND module_name="EcmSysInfos" AND value4="pl_pl" ORDER BY value3';
|
||||
$rows = $db->query($querySelect);
|
||||
$data = array();
|
||||
while ($rr = $db->fetchByAssoc($rows)) {
|
||||
$data[$rr['id']] = $rr['name'];
|
||||
}
|
||||
} else {
|
||||
$querySelect = 'SELECT id id,value0 name FROM operating_values WHERE operating_values.name="headersDocuments" AND module_name="EcmSysInfos" AND value4="' . $_POST['languageselect'] . '" ORDER BY value3';
|
||||
$rows = $db->query($querySelect);
|
||||
$data = array();
|
||||
while ($rr = $db->fetchByAssoc($rows)) {
|
||||
$data[$rr['id']] = $rr['name'];
|
||||
}
|
||||
}
|
||||
$format = array();
|
||||
$smarty = new Sugar_Smarty();
|
||||
|
||||
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('dataLanguage', $sugar_config['languages']);
|
||||
$smarty->assign('data', $data);
|
||||
$smarty->assign('InvoiceNumberFormat', $numberFormatList);
|
||||
if (isset($_POST['docselect'])) {
|
||||
$smarty->assign('selected', $_POST['docselect']);
|
||||
}
|
||||
if (isset($_POST['docselect'])) {
|
||||
$smarty->assign('selectedLanguage', $_POST['languageselect']);
|
||||
}
|
||||
echo $smarty->display('modules/EcmSysInfos/tpl/headersDocuments.tpl');
|
||||
2
modules/EcmSysInfos/index.php
Executable file
2
modules/EcmSysInfos/index.php
Executable file
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
require_once('modules/EcmSysInfos/firmInfo.php');
|
||||
127
modules/EcmSysInfos/language/en_us.lang.php
Executable file
127
modules/EcmSysInfos/language/en_us.lang.php
Executable file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
$mod_strings = array(
|
||||
'LBL_CANCEL' => 'Cancel',
|
||||
'LBL_GAVE' => 'Gave',
|
||||
'LBL_RECEIVED' => 'Received',
|
||||
'LBL_EXHIBITOR' => 'Seller',
|
||||
'LBL_PURCHASER' => 'Buyer',
|
||||
'LBL_PROVIDER' => 'Provider',
|
||||
'LBL_BANK' => 'Bank',
|
||||
'LBL_BANK_ACCOUNT_NUMBER' => 'Account number',
|
||||
'LBL_UPDATE_HEADERS' => 'Update headers?',
|
||||
'LBL_VALUE' => 'Value',
|
||||
'LBL_REGISTER_ADDRESS_STREET' => 'Street / Home / Place',
|
||||
'LBL_KRS' => 'KRS',
|
||||
'LBL_INVOICE_NUMBER_FORMAT' => 'Format number',
|
||||
'LBL_ID' => 'Id',
|
||||
'ERR_HEADERS_ALERT_DUPLIACATE' => 'Nazwy nagłówków nie mogą się powtarzać, sprawdź:',
|
||||
'ERR_HEADERS_ALERT_EMPTY' => 'Nazwy nagłówków nie mogą być puste!',
|
||||
'LBL_SHOW' => 'Podgląd',
|
||||
'LBL_EDIT' => 'Edytuj',
|
||||
'LBL_BUTTON_SHOW_CHANGES' => 'Pokaż zmiany',
|
||||
'LBL_SAVE' => 'Zapisz',
|
||||
'LBL_HEADER_NAME' => 'Nazwa nagłówka:',
|
||||
'LBL_HEADER' => 'Nagłówek',
|
||||
'LBL_FOOTER' => 'Stopka',
|
||||
'LNK_FIRM_INFO' => 'Podstawowe informacje',
|
||||
'LBL_FIRM_INFO' => 'Podstawowe informacje o firmie',
|
||||
'LBL_COPY_FROM_REGISTRATION' => 'Skopiuj dane z adresu zarejestrowania',
|
||||
'LBL_COPY' => 'Kopiuj',
|
||||
'LBL_SHORT_NAME' => 'Krótka nazwa',
|
||||
'LNK_HEADERS_DOCUMENTS' => 'Nagłówki i stopki dokumentów',
|
||||
'LBL_NIP' => 'Nip',
|
||||
'LBL_WWW' => 'WWW',
|
||||
'LBL_REGON' => 'Regon',
|
||||
'LBL_ADDRESS_REGISTRATION' => 'Zarejestrowaia',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Adresy',
|
||||
'LBL_ADDRESS_CORRESPONDENCE' => 'Korespondencyjny',
|
||||
'LBL_ADDRESS_CITY' => 'Miasto',
|
||||
'LBL_ADDRESS_COMMUNITY' => 'Gmina',
|
||||
'LBL_ADDRESS_COUNTRY' => 'Kraj',
|
||||
'LBL_ADDRESS_DISTRICT' => 'Powiat',
|
||||
'LBL_ADDRESS_HOME' => 'Numer domu',
|
||||
'LBL_ADDRESS_HOME_NUMBER' => 'Numer mieszkania',
|
||||
'LBL_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
'LBL_ADDRESS_STATE' => 'Województwo',
|
||||
'LBL_ADDRESS_STREET' => 'Ulica',
|
||||
'LBL_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
'LBL_ADDRESS_MAIL' => 'Poczta',
|
||||
'LBL_ADDRESS_PHONE' => 'Telefon',
|
||||
'LBL_ADDRESS_FAX' => 'Fax',
|
||||
'LBL_ASSIGNED_TO_ID' => 'ID przydzielonego użytkownika',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do',
|
||||
'LBL_BANK_ACCOUNTS' => 'Konta Bankowe',
|
||||
'LBL_BANK_ACCOUNT' => 'Numer konta',
|
||||
'LBL_BANK_ACCOUNT_NUMBER' => 'Account number',
|
||||
'LBL_CITY' => 'City',
|
||||
'LBL_CONTACT_INFO' => 'Dane kontaktowe',
|
||||
'LBL_COUNTRY' => 'Kraj',
|
||||
'LBL_CREATED' => 'Utworzone przez',
|
||||
'LBL_CREATED_ID' => 'ID tworzącego',
|
||||
'LBL_CREATED_USER' => 'Stworzone przez użytkownika',
|
||||
'LBL_DATE_ENTERED' => 'Data utworzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_DELETED' => 'Usunięto',
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
'LBL_EMAIL_ADDRESS' => 'Adres email',
|
||||
'LBL_EMAIL_ADDRESSES' => 'email',
|
||||
'LBL_FAX_PHONE' => 'Fax',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Zobacz historię',
|
||||
'LBL_HOME_PHONE' => 'Telefon domowy',
|
||||
'LBL_LIST_FORM_TITLE' => 'Informacje o firmie',
|
||||
'LBL_LIST_NAME' => 'Nazwa',
|
||||
'LBL_MOBILE_PHONE' => 'Telefon komórkowy',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowane przez',
|
||||
'LBL_MODIFIED_ID' => 'ID modyfikującego',
|
||||
'LBL_MODIFIED_NAME' => 'Nazwa modyfikującego',
|
||||
'LBL_MODIFIED_USER' => 'Zmodyfikowane przez użytkownika',
|
||||
'LBL_MODULE_NAME' => 'Ustawienia',
|
||||
'LBL_MODULE_TITLE' => 'Ustawienia',
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
'LBL_NAME_BANK' => 'Nazwa banku',
|
||||
'LBL_OFFICE_PHONE' => 'Telefon służbowy',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Inny email',
|
||||
'LBL_OTHER_PHONE' => 'Inny tel.',
|
||||
'LBL_PERSONAL_INFO' => 'Dane o firmie',
|
||||
'LBL_PHONE_FAX' => 'Fax',
|
||||
'LBL_WORK_PHONE' => 'Telefon do pracy',
|
||||
'LNK_LIST' => ' Lista Pracowników',
|
||||
'LNK_NEW_RECORD' => 'Nowy Pracownik',
|
||||
'LBL_MODULE' => 'EcmSysInfos'
|
||||
);
|
||||
?>
|
||||
137
modules/EcmSysInfos/language/pl_pl.lang.php
Executable file
137
modules/EcmSysInfos/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
$mod_strings = array(
|
||||
'LBL_CANCEL' => 'Anuluj',
|
||||
'LBL_GAVE' => 'WYDAŁ',
|
||||
'LBL_RECEIVED' => 'PRZYJĄŁ',
|
||||
'LBL_EXHIBITOR' => 'Wystawca',
|
||||
'LBL_SELLER' => 'Sprzedawca',
|
||||
'LBL_PURCHASER' => 'Nabywca',
|
||||
'LBL_PROVIDER' => 'Dostawca',
|
||||
'LBL_BANK' => 'Bank',
|
||||
'LBL_BANK_CURRENCY'=>'Waluta',
|
||||
'LBL_BANK_SWIFT'=>'SWIFT',
|
||||
'LBL_BANK_IBAN'=>'IBAN',
|
||||
'LBL_BANK_ACCOUNT_NUMBER' => 'Numer konta',
|
||||
'LBL_UPDATE_HEADERS' => 'Zaktualizować nagłówki?',
|
||||
'LBL_VALUE' => 'Wartość',
|
||||
'LBL_REGISTER_ADDRESS_STREET' => 'Ulica / Dom / Lokal',
|
||||
'LBL_KRS' => 'KRS',
|
||||
'LBL_INVOICE_NUMBER_FORMAT' => 'Format numeracji',
|
||||
'LBL_ID' => 'Id',
|
||||
'ERR_HEADERS_ALERT_DUPLIACATE' => 'Nazwy nagłówków nie mogą się powtarzać, sprawdź:',
|
||||
'ERR_HEADERS_ALERT_EMPTY' => 'Nazwy nagłówków nie mogą być puste!',
|
||||
'LBL_SHOW' => 'Podgląd',
|
||||
'LBL_EDIT' => 'Edytuj',
|
||||
'LBL_BUTTON_SHOW_CHANGES' => 'Pokaż zmiany',
|
||||
'LBL_SAVE' => 'Zapisz',
|
||||
'LBL_HEADER_NAME' => 'Nazwa nagłówka:',
|
||||
'LBL_HEADER' => 'Nagłówek',
|
||||
'LBL_FOOTER' => 'Stopka',
|
||||
'LNK_FIRM_INFO' => 'Podstawowe informacje',
|
||||
'LBL_FIRM_INFO' => 'Podstawowe informacje o firmie',
|
||||
'LBL_COPY_FROM_REGISTRATION' => 'Skopiuj dane z adresu zarejestrowania',
|
||||
'LBL_COPY' => 'Kopiuj',
|
||||
'LBL_SHORT_NAME' => 'Krótka nazwa',
|
||||
'LNK_HEADERS_DOCUMENTS' => 'Nagłówki i stopki dokumentów',
|
||||
'LBL_NIP' => 'Nip',
|
||||
'LBL_WWW' => 'WWW',
|
||||
'LBL_REGON' => 'Regon',
|
||||
'LBL_ADDRESS_REGISTRATION' => 'Zarejestrowaia',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Adresy',
|
||||
'LBL_ADDRESS_CORRESPONDENCE' => 'Korespondencyjny',
|
||||
'LBL_ADDRESS_CITY' => 'Miasto',
|
||||
'LBL_ADDRESS_COMMUNITY' => 'Gmina',
|
||||
'LBL_ADDRESS_COUNTRY' => 'Kraj',
|
||||
'LBL_ADDRESS_DISTRICT' => 'Powiat',
|
||||
'LBL_ADDRESS_HOME' => 'Numer domu',
|
||||
'LBL_ADDRESS_HOME_NUMBER' => 'Numer mieszkania',
|
||||
'LBL_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
'LBL_ADDRESS_STATE' => 'Województwo',
|
||||
'LBL_ADDRESS_STREET' => 'Ulica',
|
||||
'LBL_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
'LBL_ADDRESS_MAIL' => 'Poczta',
|
||||
'LBL_ADDRESS_PHONE' => 'Telefon',
|
||||
'LBL_ADDRESS_FAX' => 'Fax',
|
||||
'LBL_ASSIGNED_TO_ID' => 'ID przydzielonego użytkownika',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do',
|
||||
'LBL_BANK_ACCOUNTS' => 'Konta Bankowe',
|
||||
'LBL_BANK_ACCOUNT' => 'Numer konta',
|
||||
'LBL_BANK_ACCOUNT_NUMBER' => 'Numer rachunku',
|
||||
'LBL_CITY' => 'Miasto',
|
||||
'LBL_CONTACT_INFO' => 'Dane kontaktowe',
|
||||
'LBL_COUNTRY' => 'Kraj',
|
||||
'LBL_CREATED' => 'Utworzone przez',
|
||||
'LBL_CREATED_ID' => 'ID tworzącego',
|
||||
'LBL_CREATED_USER' => 'Stworzone przez użytkownika',
|
||||
'LBL_DATE_ENTERED' => 'Data utworzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_DELETED' => 'Usunięto',
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
'LBL_EMAIL_ADDRESS' => 'Adres email',
|
||||
'LBL_EMAIL_ADDRESSES' => 'email',
|
||||
'LBL_FAX_PHONE' => 'Fax',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Zobacz historię',
|
||||
'LBL_HOME_PHONE' => 'Telefon domowy',
|
||||
'LBL_LIST_FORM_TITLE' => 'Informacje o firmie',
|
||||
'LBL_LIST_NAME' => 'Nazwa',
|
||||
'LBL_MOBILE_PHONE' => 'Telefon komórkowy',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowane przez',
|
||||
'LBL_MODIFIED_ID' => 'ID modyfikującego',
|
||||
'LBL_MODIFIED_NAME' => 'Nazwa modyfikującego',
|
||||
'LBL_MODIFIED_USER' => 'Zmodyfikowane przez użytkownika',
|
||||
'LBL_MODULE_NAME' => 'Ustawienia',
|
||||
'LBL_MODULE_TITLE' => 'Ustawienia',
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
'LBL_NAME_BANK' => 'Nazwa banku',
|
||||
'LBL_OFFICE_PHONE' => 'Telefon służbowy',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Inny email',
|
||||
'LBL_OTHER_PHONE' => 'Inny tel.',
|
||||
'LBL_PERSONAL_INFO' => 'Dane o firmie',
|
||||
'LBL_PHONE_FAX' => 'Fax',
|
||||
'LBL_WORK_PHONE' => 'Telefon do pracy',
|
||||
'LNK_LIST' => ' Lista Pracowników',
|
||||
'LNK_NEW_RECORD' => 'Nowy Pracownik',
|
||||
'LBL_MODULE' => 'EcmSysInfos',
|
||||
// USTAWIENIA EMAIL
|
||||
'LBL_EMAIL_SETTINGS'=>'Konto pocztowe do wysyłki dokumentów',
|
||||
'LBL_EMAIL_HOSTPORT'=>'Host:port',
|
||||
'LBL_EMAIL_LOGIN'=>'Login',
|
||||
'LBL_EMAIL_PASSWORD'=>'Hasło',
|
||||
|
||||
);
|
||||
?>
|
||||
51
modules/EcmSysInfos/metadata/SearchFields.php
Executable file
51
modules/EcmSysInfos/metadata/SearchFields.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$module_name = 'EcmSysInfos';
|
||||
$searchFields[$module_name] =
|
||||
array (
|
||||
'first_name' => array( 'query_type'=>'default'),
|
||||
'last_name'=> array('query_type'=>'default'),
|
||||
'search_name'=> array('query_type'=>'default','db_field'=>array('first_name','last_name'),'force_unifiedsearch'=>true),
|
||||
'phone'=> array('query_type'=>'default','db_field'=>array('phone_mobile','phone_work',)),
|
||||
'address_street'=> array('query_type'=>'default','db_field'=>array('primary_address_street','alt_address_street')),
|
||||
'address_city'=> array('query_type'=>'default','db_field'=>array('primary_address_city','alt_address_city')),
|
||||
'address_state'=> array('query_type'=>'default','db_field'=>array('primary_address_state','alt_address_state')),
|
||||
'address_postalcode'=> array('query_type'=>'default','db_field'=>array('primary_address_postalcode','alt_address_postalcode')),
|
||||
'address_country'=> array('query_type'=>'default','db_field'=>array('primary_address_country','alt_address_country')),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
|
||||
);
|
||||
?>
|
||||
60
modules/EcmSysInfos/metadata/dashletviewdefs.php
Executable file
60
modules/EcmSysInfos/metadata/dashletviewdefs.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
$dashletData['EcmSysInfosDashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
'date_modified' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['EcmSysInfosDashlet']['columns'] = array('name' => array('width' => '40',
|
||||
'label' => 'LBL_LIST_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'created_by' => array('width' => '8',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'assigned_user_name' => array('width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER'),
|
||||
);
|
||||
215
modules/EcmSysInfos/metadata/detailviewdefs.php
Executable file
215
modules/EcmSysInfos/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,215 @@
|
||||
<?php
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
$module_name = 'EcmSysInfos';
|
||||
$viewdefs[$module_name]['DetailView'] = array(
|
||||
'templateMeta' => array(
|
||||
'form' => array(
|
||||
'buttons' => array(
|
||||
'EDIT',
|
||||
'DELETE',
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'includes' => array(
|
||||
0 => array(
|
||||
'file' => 'modules/EcmSysInfos/js/detailView.js'
|
||||
),
|
||||
),
|
||||
),
|
||||
'panels' => array(
|
||||
'LBL_PERSONAL_INFO' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'short_name',
|
||||
'label' => 'LBL_SHORT_NAME',
|
||||
),
|
||||
array(
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_NAME',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'nip',
|
||||
'label' => 'LBL_NIP',
|
||||
),
|
||||
array(
|
||||
'name' => 'regon',
|
||||
'label' => 'LBL_REGON',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'www',
|
||||
'label' => 'LBL_WWW',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'name_bank',
|
||||
'label' => 'LBL_NAME_BANK',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'bank_account_number',
|
||||
'label' => 'LBL_BANK_ACCOUNT_NUMBER',
|
||||
'displayParams' => array('size' => 40),
|
||||
),
|
||||
array(
|
||||
'name' => 'description',
|
||||
'label' => 'LBL_DESCRIPTION',
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_ADDRESS_INFORMATION' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_country',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_COUNTRY',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_country',
|
||||
'label' => 'LBL_ALT_ADDRESS_COUNTRY',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_state',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STATE',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_state',
|
||||
'label' => 'LBL_ALT_ADDRESS_STATE',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_city',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_CITY',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_city',
|
||||
'label' => 'LBL_ALT_ADDRESS_CITY',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_postalcode',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_postalcode',
|
||||
'label' => 'LBL_ALT_ADDRESS_POSTALCODE',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_street',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STREET',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_street',
|
||||
'label' => 'LBL_ALT_ADDRESS_STREET',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_community',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_COMMUNITY',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_community',
|
||||
'label' => 'LBL_ALT_ADDRESS_COMMUNITY',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_district',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_DISTRICT',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_district',
|
||||
'label' => 'LBL_ALT_ADDRESS_DISTRICT',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_mail',
|
||||
'label' => 'LBL_PRIMARY_MAIL',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_mail',
|
||||
'label' => 'LBL_ALT_MAIL',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'email1',
|
||||
'label' => 'LBL_EMAIL_ADDRESS',
|
||||
),
|
||||
array(
|
||||
'name' => 'email2',
|
||||
'label' => 'LBL_OTHER_EMAIL_ADDRESS',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'phone_mobile',
|
||||
'label' => 'LBL_MOBILE_PHONE',
|
||||
),
|
||||
array(
|
||||
'name' => 'phone_work',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'phone_home',
|
||||
'label' => 'LBL_HOME_PHONE',
|
||||
),
|
||||
array(
|
||||
'name' => 'phone_fax',
|
||||
'label' => 'LBL_HOME_PHONE',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
219
modules/EcmSysInfos/metadata/editviewdefs.php
Executable file
219
modules/EcmSysInfos/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
$module_name = 'EcmSysInfos';
|
||||
$viewdefs[$module_name]['EditView'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '20', 'field' => '60'),
|
||||
array('label' => '20', 'field' => '60'),
|
||||
),
|
||||
'javascript' => '
|
||||
<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/init.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/lib/urllib.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_base.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_async.js"></script>
|
||||
<script type="text/javascript" src="include/JSON.js?s={$SUGAR_VERSION}"></script>
|
||||
',
|
||||
'includes' => array(
|
||||
0 => array(
|
||||
'file' => 'modules/EcmSysInfos/js/editView.js'
|
||||
),
|
||||
),
|
||||
),
|
||||
'panels' => array(
|
||||
'LBL_PERSONAL_INFO' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'short_name',
|
||||
'label' => 'LBL_SHORT_NAME',
|
||||
),
|
||||
array(
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_NAME',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'nip',
|
||||
'label' => 'LBL_NIP',
|
||||
),
|
||||
array(
|
||||
'name' => 'regon',
|
||||
'label' => 'LBL_REGON',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'www',
|
||||
'label' => 'LBL_WWW',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'name_bank',
|
||||
'label' => 'LBL_NAME_BANK',
|
||||
),
|
||||
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'bank_account_number',
|
||||
'label' => 'LBL_BANK_ACCOUNT_NUMBER',
|
||||
'displayParams' => array('size' => 40),
|
||||
),
|
||||
array(
|
||||
'name' => 'description',
|
||||
'label' => 'LBL_DESCRIPTION',
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_ADDRESS_INFORMATION' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_country',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_COUNTRY',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_country',
|
||||
'label' => 'LBL_ALT_ADDRESS_COUNTRY',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_state',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STATE',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_state',
|
||||
'label' => 'LBL_ALT_ADDRESS_STATE',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_city',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_CITY',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_city',
|
||||
'label' => 'LBL_ALT_ADDRESS_CITY',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_postalcode',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_postalcode',
|
||||
'label' => 'LBL_ALT_ADDRESS_POSTALCODE',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_street',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STREET',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_street',
|
||||
'label' => 'LBL_ALT_ADDRESS_STREET',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_community',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_COMMUNITY',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_community',
|
||||
'label' => 'LBL_ALT_ADDRESS_COMMUNITY',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_address_district',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_DISTRICT',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_address_district',
|
||||
'label' => 'LBL_ALT_ADDRESS_DISTRICT',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'primary_mail',
|
||||
'label' => 'LBL_PRIMARY_MAIL',
|
||||
),
|
||||
array(
|
||||
'name' => 'alt_mail',
|
||||
'label' => 'LBL_ALT_MAIL',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'email1',
|
||||
'label' => 'LBL_EMAIL_ADDRESS',
|
||||
),
|
||||
array(
|
||||
'name' => 'email2',
|
||||
'label' => 'LBL_OTHER_EMAIL_ADDRESS',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'phone_mobile',
|
||||
'label' => 'LBL_MOBILE_PHONE',
|
||||
),
|
||||
array(
|
||||
'name' => 'phone_work',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'phone_home',
|
||||
'label' => 'LBL_HOME_PHONE',
|
||||
),
|
||||
array(
|
||||
'name' => 'phone_fax',
|
||||
'label' => 'LBL_HOME_PHONE',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
94
modules/EcmSysInfos/metadata/listviewdefs.php
Executable file
94
modules/EcmSysInfos/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
$module_name = 'EcmSysInfos';
|
||||
$listViewDefs [$module_name] = array (
|
||||
'FIRST_NAME' => array (
|
||||
'type' => 'varchar',
|
||||
'label' => 'LBL_FIRST_NAME',
|
||||
'link' => true,
|
||||
'width' => '10%',
|
||||
'default' => true,
|
||||
),
|
||||
'SECOND_NAME' => array(
|
||||
'type' => 'varchar',
|
||||
'label' => 'LBL_SECOND_NAME',
|
||||
'link' => false,
|
||||
'width' => '10%',
|
||||
'default' => false,
|
||||
),
|
||||
'LAST_NAME' => array (
|
||||
'type' => 'varchar',
|
||||
'label' => 'LBL_LAST_NAME',
|
||||
'link' => true,
|
||||
'width' => '10%',
|
||||
'default' => true,
|
||||
),
|
||||
'PHONE_WORK' => array (
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_OFFICE_PHONE',
|
||||
'default' => true,
|
||||
),
|
||||
'EMAIL1' => array (
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'link' => true,
|
||||
'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',
|
||||
'default' => true,
|
||||
),
|
||||
'PHONE_HOME' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_HOME_PHONE',
|
||||
'default' => false,
|
||||
),
|
||||
'PHONE_MOBILE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_MOBILE_PHONE',
|
||||
'default' => false,
|
||||
),
|
||||
'ADDRESS_STREET' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STREET',
|
||||
'default' => false,
|
||||
),
|
||||
'ADDRESS_CITY' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_CITY',
|
||||
'default' => false,
|
||||
),
|
||||
'ADDRESS_STATE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_STATE',
|
||||
'default' => false,
|
||||
),
|
||||
'ADDRESS_POSTALCODE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_PRIMARY_ADDRESS_POSTALCODE',
|
||||
'default' => false,
|
||||
),
|
||||
'DATE_ENTERED' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => false,
|
||||
),
|
||||
'CREATED_BY_NAME' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_CREATED',
|
||||
'default' => false,
|
||||
),
|
||||
'position_office' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_POSITION_OFFICE',
|
||||
'default' => false,
|
||||
),
|
||||
'COST' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_COST',
|
||||
'default' => false,
|
||||
),
|
||||
'DEPARTMENT' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_DEPARTMENT',
|
||||
'default' => false,
|
||||
),
|
||||
);
|
||||
?>
|
||||
51
modules/EcmSysInfos/metadata/metafiles.php
Executable file
51
modules/EcmSysInfos/metadata/metafiles.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on July 12, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$module_name = 'EcmSysInfos';
|
||||
$metafiles[$module_name] = array(
|
||||
'detailviewdefs' => 'modules/'.$module_name.'/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/'. $module_name. '/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/'. $module_name. '/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/'. $module_name. '/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/'. $module_name. '/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/'. $module_name. '/metadata/SearchFields.php',
|
||||
);
|
||||
?>
|
||||
59
modules/EcmSysInfos/metadata/popupdefs.php
Executable file
59
modules/EcmSysInfos/metadata/popupdefs.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
$module_name = 'EcmSysInfos';
|
||||
$object_name = 'EcmSysInfo';
|
||||
$_module_name = 'ecmsysinfos';
|
||||
$popupMeta = array('moduleMain' => $module_name,
|
||||
'varName' => $object_name,
|
||||
'orderBy' => $_module_name . '.first_name, ' . $_module_name . '.last_name',
|
||||
'whereClauses' =>
|
||||
array('first_name' => $_module_name . '.first_name',
|
||||
'last_name' => $_module_name . '.last_name',
|
||||
),
|
||||
'searchInputs' =>
|
||||
array('first_name', 'last_name'),
|
||||
'listviewdefs' => array(
|
||||
'NAME' => array(
|
||||
'width' => '40',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
),),
|
||||
);
|
||||
?>
|
||||
70
modules/EcmSysInfos/metadata/quickcreatedefs.php
Executable file
70
modules/EcmSysInfos/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
$module_name = 'EcmSysInfos';
|
||||
$viewdefs[$module_name]['QuickCreate'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
),
|
||||
'panels' => array(
|
||||
'lbl_contact_information' =>
|
||||
array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'first_name',
|
||||
'customCode' => '<input name="first_name" size="25" maxlength="25" type="text" value="{$fields.first_name.value}">',
|
||||
),
|
||||
'assigned_user_name',
|
||||
),
|
||||
array(
|
||||
array('name' => 'last_name', 'displayParams' => array('required' => true)),
|
||||
),
|
||||
array(
|
||||
'phone_work',
|
||||
),
|
||||
array(
|
||||
'department',
|
||||
'phone_mobile',
|
||||
),
|
||||
),
|
||||
'lbl_email_addresses' => array(
|
||||
array('email1')
|
||||
),
|
||||
)
|
||||
);
|
||||
68
modules/EcmSysInfos/metadata/searchdefs.php
Executable file
68
modules/EcmSysInfos/metadata/searchdefs.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
/*
|
||||
* Created on May 29, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$module_name = 'EcmSysInfos';
|
||||
$searchdefs[$module_name] = array(
|
||||
'templateMeta' => array('maxColumns' => '3',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
array('name' => 'search_name', 'label' => 'LBL_NAME', 'type' => 'name'),
|
||||
array('name' => 'current_user_only', 'label' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
|
||||
),
|
||||
'advanced_search' => array(
|
||||
'first_name',
|
||||
'last_name',
|
||||
'primary_address_city',
|
||||
'gender',
|
||||
'form_employment',
|
||||
'position_office',
|
||||
'department',
|
||||
'cost',
|
||||
|
||||
'date_employment',
|
||||
'employment',
|
||||
// 'created_by_name',
|
||||
),
|
||||
),
|
||||
);
|
||||
38
modules/EcmSysInfos/metadata/studio.php
Executable file
38
modules/EcmSysInfos/metadata/studio.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/**
|
||||
* This file adds support for studio
|
||||
*/
|
||||
58
modules/EcmSysInfos/metadata/subpaneldefs.php
Executable file
58
modules/EcmSysInfos/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
|
||||
|
||||
$layout_defs['EcmSysInfos']['subpanel_setup'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'ecmprivatedocuments' => array(
|
||||
'order' => 10,
|
||||
'module' => 'EcmPrivateDocuments',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'date_entered',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'ecmprivatedocuments',
|
||||
'add_subpanel_data' => 'ecmprivatedocument_id',
|
||||
'title_key' => 'LBL_ECMPRIVATEDOCUMENTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
86
modules/EcmSysInfos/metadata/subpanels/default.php
Executable file
86
modules/EcmSysInfos/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'People'),
|
||||
),
|
||||
'where' => '',
|
||||
'list_fields' => array(
|
||||
'first_name' => array(
|
||||
'name' => 'first_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'last_name'=> array(
|
||||
'name'=>'last_name',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
'name'=>array(
|
||||
'name'=>'name',
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'sort_by' => 'last_name',
|
||||
'sort_order' => 'asc',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Contacts',
|
||||
'width' => '40%',
|
||||
),
|
||||
'email1'=>array(
|
||||
'name'=>'email1',
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '35%',
|
||||
),
|
||||
'phone_work'=>array (
|
||||
'name'=>'phone_work',
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Contacts',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
23
modules/EcmSysInfos/test.php
Executable file
23
modules/EcmSysInfos/test.php
Executable file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
/*
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('-1');
|
||||
$db = $GLOBALS ['db'];
|
||||
$querySelect = 'SELECT name, value0, value1, value2, value3, text0, text1, module_name FROM operating_values WHERE operating_values.name="headersDocuments" AND module_name="EcmSysInfos" ORDER BY value3';
|
||||
$tmp = $db->query($querySelect);
|
||||
while($row = $db->fetchByAssoc($tmp)){
|
||||
$queryinsert = "INSERT INTO operating_values (name, value0, value1, value2, value3, value4, text0, text1, module_name) VALUES (";
|
||||
$queryinsert .= ' "' . $row['name'] . '", ';
|
||||
$queryinsert .= ' "' . $row['value0'] . '", ';
|
||||
$queryinsert .= ' "' . $row['value1'] . '", ';
|
||||
$queryinsert .= ' "' . $row['value2'] . '", ';
|
||||
$queryinsert .= ' "' . $row['value3'] . '", ';
|
||||
$queryinsert .= ' "en_en", ';
|
||||
$queryinsert .= ' "' . $row['text0'] . '", ';
|
||||
$queryinsert .= ' "' . $row['text1'] . '", ';
|
||||
$queryinsert .= ' "' . $row['module_name'] . '");';
|
||||
var_dump($queryinsert);
|
||||
echo '<br><br>';
|
||||
//$db->query($queryinsert);
|
||||
}
|
||||
?>
|
||||
47
modules/EcmSysInfos/vardefs.php
Executable file
47
modules/EcmSysInfos/vardefs.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* 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 Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
$dictionary['EcmSysInfo'] = array(
|
||||
'table' => 'ecmsysinfos',
|
||||
'audited' => true,
|
||||
'fields' => array(
|
||||
),
|
||||
'optimistic_locking' => true,
|
||||
);
|
||||
if (!class_exists('VardefManager')) {
|
||||
require_once('include/SugarObjects/VardefManager.php');
|
||||
}
|
||||
VardefManager::createVardef('EcmSysInfos', 'EcmSysInfo', array('default'));
|
||||
Reference in New Issue
Block a user