Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?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 - 2009 SugarCRM Inc.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU 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 General Public License for more
* details.
*
* You should have received a copy of the GNU 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 General Public License version 3.
*
* In accordance with Section 7(b) of the GNU 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 $app_strings;
$dashletMeta['MyChartsCallTimeDashlet'] = array(
'title' => 'Wykres: Produkty',
'description' => 'A customizable view into Tasks',
'category' => 'Charts');
?>

View File

@@ -0,0 +1,79 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/Dashlets/Dashlet.php');
require_once('include/Sugar_Smarty.php');
class MyChartsCallTimeDashlet extends Dashlet {
var $savedText; // users's saved text
var $height = '300'; // height of the pad
function MyChartsCallTimeDashlet($id, $def) {
global $current_user;
parent::Dashlet($id); // call parent constructor
$this->isConfigurable = true; // dashlet is configurable
$this->hasScript = false; // dashlet has java ipt attached to it
if($current_user->id=='2e72f487-d92b-954e-f50c-528b10ce81c9'){
}
// if no custom title, use default
if(empty($def['title'])) $this->title = 'Wykres: Produkty ';
else $this->title = $def['title'];
}
function display() {
global $current_user;
$ss = new Sugar_Smarty();
$optionsArray = $this->loadOptions();
//$ss->assign('account_id',$optionsArray['account_id']);
$ss->assign('id', $this->id);
$ss->assign('height', $this->height);
$_SESSION['EcmCharts_1_d_year']=$optionsArray['year'];
$_SESSION['EcmCharts_1_d_category']=$category;
$_SESSION['EcmCharts_1_d_show']=$optionsArray['show'];
$_SESSION['EcmCharts_1_d_account']=$optionsArray['account_id'];
if(!isset($_SESSION['EcmCharts_1_d_year']))$_SESSION['EcmCharts_1_d_year']=(int)date("Y");
if(!isset($_SESSION['EcmCharts_1_d_category']))$_SESSION['EcmCharts_1_d_category']='';
if(!isset($_SESSION['EcmCharts_1_d_account']))$_SESSION['EcmCharts_1_d_account']='';
if(!isset($_SESSION['EcmCharts_1_d_show']))$_SESSION['EcmCharts_1_d_show']=Array (0=>'sales');
//$_SESSION['EcmCharts_1_d_mmm']=$mmm;
include_once('include/ECM/open_flash_chart/ofc-library/open_flash_chart_object.php');
$str = $ss->fetch('modules/EcmCharts/Dashlets/MyChartsCallTimeDashlet/MyChartsCallTimeDashlet.tpl');
return parent::display($this->dashletStrings['LBL_DBLCLICK_HELP']) . $str . '<br />'; // return parent::display for title and such
}
function displayOptions() {
global $app_strings,$current_user;
$ss = new Sugar_Smarty();
$ss->assign('year',$_SESSION['EcmCharts_1_d_year']);
$ss->assign('id', $this->id); //The id must be assigned in all dashlet options pages
return parent::displayOptions() . $ss->fetch('modules/EcmCharts/Dashlets/MyChartsCallTimeDashlet/MyChartsCallTimeDashletOptions.tpl');
}
function saveOptions($req) {
global $sugar_config, $timedate, $current_user, $theme;
$options = array();
$options['account_name']=$_REQUEST['account_name'];
$options['account_id']=$_REQUEST['account_id'];
$options['year']=$_REQUEST['year'];
$options['show']=$_REQUEST['show'];
$options['category']=$_REQUEST['category'];
return $options;
}
}
?>