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

5
modules/EcmReminders/Close.php Executable file
View File

@@ -0,0 +1,5 @@
<?
$GLOBALS['db']->query("update ".$_REQUEST['type']." set status='".$_REQUEST['status']."' where id='".$_REQUEST['record']."'");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,9 @@
<?
require_once("../../config.php");
$sql=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']);
$GLOBALS['db']->query("update ".$_REQUEST['type']." set status='".$_REQUEST['status']."' where id='".$_REQUEST['record']."'");
header("Location: ReminderWindow.php");
mysql_close($sql);
?>

View File

@@ -0,0 +1,8 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
closeSelected("meetings","Held","-1");
closeSelected("calls","Held","-1");
closeSelected("ecmreminders","Held","-1");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,79 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $current_user;
$dashletData['MyEcmRemindersDashlet']['searchFields'] = array(
'date_entered' => array('default' => ''),
'date_modified' => array('default' => ''),
'assigned_user_id' => array('type' => 'assigned_user_name',
'default' => $current_user->name)
);
$dashletData['MyEcmRemindersDashlet']['columns'] = array(
'name' => array(
'width' => '40',
'label' => 'LBL_LIST_NAME',
'link' => true,
'default' => true),
'date_entered' => array(
'width' => '15',
'label' => 'LBL_DATE_ENTERED'),
'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'),
);
?>

View File

@@ -0,0 +1,59 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $app_strings;
$dashletMeta['MyEcmRemindersDashlet'] = array(
'title' => translate('LBL_LIST_MY_ECMREMINDERS', 'EcmReminders'),
'icon' => 'modules/EcmReminders/images/EcmReminders.gif',
'description' => 'A customizable view into EcmReminders',
'category' => 'Module Views'
);
?>

View File

@@ -0,0 +1,75 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
require_once('include/Dashlets/DashletGeneric.php');
require_once('modules/EcmReminders/EcmReminder.php');
require_once('modules/EcmReminders/Dashlets/MyEcmRemindersDashlets/MyEcmRemindersDashlet.data.php');
class MyEcmRemindersDashlet extends DashletGeneric {
function MyEcmRemindersDashlet($id, $def = null) {
global $current_user, $app_strings, $dashletData;
parent::DashletGeneric($id, $def);
$this->searchFields = $dashletData['MyEcmRemindersDashlet']['searchFields'];
$this->columns = $dashletData['MyEcmRemindersDashlet']['columns'];
if(empty($def['title']))
$this->title = translate('LBL_LIST_MY_ECMREMINDERS', 'EcmReminders');
$this->seedBean = new EcmReminder();
}
function displayOptions() {
$this->processDisplayOptions();
$this->configureSS->assign('searchFields', $this->currentSearchFields);
return $this->configureSS->fetch($this->configureTpl);
}
}
?>

67
modules/EcmReminders/Delete.php Executable file
View File

@@ -0,0 +1,67 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('modules/EcmReminders/EcmReminder.php');
$focus = new EcmReminder();
// PERFORM THE DELETE IF GIVEN A RECORD TO DELETE
if(!isset($_REQUEST['record']))
sugar_die("A record number must be specified to delete the record.");
$focus->retrieve($_REQUEST['record']);
if(!$focus->ACLAccess('Delete')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
$focus->mark_deleted($_REQUEST['record']);
// NOW THAT THE DELETE HAS BEEN PERFORMED, RETURN TO GIVEN LOCATION
header("Location: index.php?module=".$_REQUEST['return_module']."&action=".$_REQUEST['return_action']."&record=".$_REQUEST['return_id']);
?>

View File

@@ -0,0 +1,145 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('XTemplate/xtpl.php');
require_once('data/Tracker.php');
require_once('modules/EcmReminders/EcmReminder.php');
require_once('modules/EcmReminders/Forms.php');
require_once('include/DetailView/DetailView.php');
global $mod_strings;
global $app_strings;
$focus = new EcmReminder();
$detailView = new DetailView();
$offset = 0;
// ONLY LOAD A RECORD IF A RECORD ID IS GIVEN;
// A RECORD ID IS NOT GIVEN WHEN VIEWING IN LAYOUT EDITOR
if (isset($_REQUEST['offset']) or isset($_REQUEST['record'])) {
$result = $detailView->processSugarBean("ECMREMINDERS", $focus, $offset);
if($result == null) {
sugar_die($app_strings['ERROR_NO_RECORD']);
}
$focus = $result;
}else{
header("Location: index.php?module={EcmReminders}&action=index");
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/".$theme."/";
$image_path = $theme_path."images/";
require_once($theme_path.'layout_utils.php');
$GLOBALS['log']->info("EcmReminders detail view");
$focus->format_all_fields();
$xtpl=new XTemplate ('modules/EcmReminders/DetailView.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("THEME", $theme);
$xtpl->assign("GRIDLINE", $gridline);
$xtpl->assign("IMAGE_PATH", $image_path);
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
$xtpl->assign("ID", $focus->id);
$xtpl->assign("ASSIGNED_TO", $focus->assigned_user_name);
$xtpl->assign("NAME", $focus->name);
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("PARENT_ID", $focus->parent_id);
$xtpl->assign("PARENT_NAME", $focus->parent_name);
$xtpl->assign("DESCRIPTION", nl2br(url2html($focus->description)));
$xtpl->assign("DATE_START", $focus->date_start);
global $current_user;
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$_REQUEST['record']. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
}
$xtpl->assign("CREATED_BY", $focus->created_by_name);
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
$detailView->processListNavigation($xtpl, "ECMREMINDERS", $offset, $focus->is_AuditEnabled());
// ADDING CUSTOM FIELDS:
require_once('modules/DynamicFields/templates/Files/DetailView.php');
if(!empty($focus->id)) {
$merge_button = <<<EOQ
<input title="{$app_strings['LBL_DUP_MERGE']}" accessKey="M" class="button" onclick="this.form.return_module.value='EcmReminders'; this.form.return_action.value='DetailView';this.form.return_id.value='{$focus->id}'; this.form.action.value='Step1'; this.form.module.value='MergeRecords';" type="submit" name="Merge" value=" {$app_strings['LBL_DUP_MERGE']} "/>
EOQ;
$xtpl->assign("FIND_DUPES_MERGE_BUTTON", $merge_button);
}
$xtpl->parse("main");
$xtpl->out("main");
$sub_xtpl = $xtpl;
$old_contents = ob_get_contents();
ob_end_clean();
ob_start();
echo $old_contents;
require_once('modules/SavedSearch/SavedSearch.php');
$savedSearch = new SavedSearch();
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmReminders')));
$str = "<script>
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
</script>";
echo $str;
?>

View File

@@ -0,0 +1,302 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
require_once('data/SugarBean.php');
require_once('include/utils.php');
// SHOULD INCLUDE SELECTIVELY
class EcmReminder extends SugarBean {
var $field_name_map = array();
// STANDARD FIELDS
var $id;
var $date_entered;
var $date_modified;
var $modified_user_id;
var $assigned_user_id;
var $name;
//TABLE COLUMNS
var $parent_id;
var $parent_name;
var $description;
var $date_start;
var $role_id;
var $status;
// RELATED FIELDS
var $created_by;
var $created_by_name;
var $modified_by_name;
var $assigned_user_name;
// SUBPANELS RELATED
// MODULE OBJECT DETAILS
var $module_dir = 'EcmReminders';
var $table_name = "ecmreminders";
var $object_name = "EcmReminder";
//RELATED TABLE NAMES
// USED TO RETRIEVE RELATED FIELDS FROM FORM POSTS.
var $additional_column_fields = Array(
'assigned_user_name',
'assigned_user_id',
'modified_user_id',
'created_by',
);
var $relationship_fields = Array(
//RELATIONSHIP FIELDS
);
function EcmReminder() {
parent::SugarBean();
$this->setupCustomFields('EcmReminders');
foreach ($this->field_defs as $field)
{
$this->field_name_map[$field['name']] = $field;
}
}
var $new_schema = true;
function get_summary_text(){
return "$this->name";
}
function create_new_list_query($order_by, $where, $show_deleted = 0){
// Fill in the assigned_user_name
if($_REQUEST['module']=="Home")
{
$custom_join = $this->custom_fields->getJOIN();
$query['select'] = "SELECT ";
$query['select'] .= "
ecmreminders.*
,users.user_name as assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query['from'] .= " FROM ecmreminders
LEFT JOIN users
ON ecmreminders.assigned_user_id=users.id";
$query['from'] .= " ";
if($custom_join){
$query['from'] .= $custom_join['join'];
}
$where_auto = '1=1';
if($show_deleted == 0){
$where_auto = " $this->table_name.deleted=0 ";
}else if($show_deleted == 1){
$where_auto = " $this->table_name.deleted=1 ";
}
if($where != "")
$query['where'] .= "where $where AND ".$where_auto;
else
$query['where'] .= "where ".$where_auto;
if(substr_count($order_by, '.') > 0){
$query['order_by'] .= " ORDER BY $order_by";
}
else if($order_by != "")
$query['order_by'] .= " ORDER BY $order_by";
else
$query['order_by'] .= " ORDER BY ecmreminders.name";
return $query;
}
else
{
$ret_array['select']="select calls.*,meetings.*,ecmreminders.* ";
$ret_array['from']="from calls,meetings,ecmreminders ";
$ret_array['where']="where calls.deleted='0' and meetings.deleted='0' and ecmreminders.deleted='0' ";
$ret_array['order_by']="";
return $ret_array;
}
}
function create_list_query($order_by, $where, $show_deleted = 0){
// Fill in the assigned_user_name
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT ";
$query .= "
ecmreminders.*
,users.user_name as assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM ecmreminders
LEFT JOIN users
ON ecmreminders.assigned_user_id=users.id";
$query .= " ";
if($custom_join){
$query .= $custom_join['join'];
}
$where_auto = '1=1';
if($show_deleted == 0){
$where_auto = " $this->table_name.deleted=0 ";
}else if($show_deleted == 1){
$where_auto = " $this->table_name.deleted=1 ";
}
if($where != "")
$query .= "where $where AND ".$where_auto;
else
$query .= "where ".$where_auto;
if(substr_count($order_by, '.') > 0){
$query .= " ORDER BY $order_by";
}
else if($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY ecmreminders.name";
return $query;
}
function create_export_query($order_by, $where){
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT
ecmreminders.*,
users.user_name assigned_user_name";
if($custom_join){
$query .= $custom_join['select'];
}
$query .= " FROM ecmreminders ";
$query .= " LEFT JOIN users
ON ecmreminders.assigned_user_id=users.id";
if($custom_join){
$query .= $custom_join['join'];
}
$query .= "";
$where_auto = " ecmreminders.deleted=0
";
if($where != "")
$query .= " where $where AND ".$where_auto;
else
$query .= " where ".$where_auto;
if($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY ecmreminders.name";
return $query;
}
function fill_in_additional_list_fields(){
}
function fill_in_additional_detail_fields(){
// FILL IN THE ASSIGNED_USER_NAME
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->created_by_name = get_assigned_user_name($this->created_by);
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
}
function get_list_view_data(){
global $current_language;
$the_array = parent::get_list_view_data();
$app_list_strings = return_app_list_strings_language($current_language);
$mod_strings = return_module_language($current_language, 'EcmReminders');
// THE NEW LISTVIEW CODE ONLY FETCHES COLUMNS THAT WE'RE DISPLAYING AND NOT ALL
// THE COLUMNS SO WE NEED THESE CHECKS.
$the_array['NAME'] = (($this->name == "") ? "<em>blank</em>" : $this->name);
$the_array['ENCODED_NAME'] = $this->name;
return $the_array;
}
/**
BUILDS A GENERIC SEARCH BASED ON THE QUERY STRING USING OR.
DO NOT INCLUDE ANY $THIS-> BECAUSE THIS IS CALLED ON WITHOUT HAVING THE CLASS INSTANTIATED.
*/
function build_generic_where_clause ($the_query_string) {
$where_clauses = Array();
$the_query_string = PearDatabase::quote(from_html($the_query_string));
array_push($where_clauses, "ecmreminders.name like '$the_query_string%'");
$the_where = "";
foreach($where_clauses as $clause){
if($the_where != "") $the_where .= " or ";
$the_where .= $clause;
}
return $the_where;
}
function set_notification_body($xtpl, $simplemodule){
global $mod_strings, $app_list_strings;
$xtpl->assign("NAME", $simplemodule->name);
$xtpl->assign("ECMREMINDERS_DESCRIPTION", $ecmreminders->description);
return $xtpl;
}
function bean_implements($interface){
switch($interface){
case 'ACL':return true;
}
return false;
}
function save($check_notify = FALSE){
return parent::save($check_notify);
}
}
?>

View File

@@ -0,0 +1,99 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
require_once('include/EditView/QuickCreate.php');
require_once('modules/EcmReminders/EcmReminder.php');
require_once('include/javascript/javascript.php');
class EcmRemindersQuickCreate extends QuickCreate {
var $javascript;
function process() {
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
$mod_strings = return_module_language($current_language, 'EcmReminders');
parent::process();
//BUILDER:START dropdowns setup
//BUILDER:END dropdowns setup
if($this->viaAJAX) { // OVERRIDE FOR AJAX CALL
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"ecmremindersQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"ecmreminders\"); else return false;'");
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_ecmreminders\")';");
}
$this->ss->assign('viaAJAX', $this->viaAJAX);
$this->javascript = new javascript();
$this->javascript->setFormName('ecmremindersQuickCreate');
$focus = new EcmReminder();
$this->javascript->setSugarBean($focus);
$this->javascript->addAllFields('');
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
$json = getJSONobj();
$popup_request_data = array(
'call_back_function' => 'set_return',
'form_name' => 'ecmremindersQuickCreate',
'field_to_name_array' => array(
'id' => 'account_id',
'name' => 'account_name',
),
);
$encoded_popup_request_data = $json->encode($popup_request_data);
$this->ss->assign('encoded_popup_request_data', $encoded_popup_request_data);
}
}
?>

285
modules/EcmReminders/EditView.php Executable file
View File

@@ -0,0 +1,285 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
// INCLUDE SUPPPORT MODULES
require_once('XTemplate/xtpl.php');
require_once('data/Tracker.php');
// INCLUDE MODULE OBJECT AND FORMS
require_once('modules/EcmReminders/EcmReminder.php');
require_once('modules/EcmReminders/Forms.php');
global $app_strings;
global $mod_strings;
global $mod_strings;
global $current_user;
global $sugar_version, $sugar_config;
// INSTANTIATES THE MODULE CLASSES
$focus = new EcmReminder();
// IF PROCESSING AN EXISTING RECORD, RETRIEVE IT
if(isset($_REQUEST['record'])) {
$focus->retrieve($_REQUEST['record']);
$focus->unformat_all_fields();
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
$focus->simplemodule_number = "";
}
$prefillArray = array(
'priority' => 'priority',
'name' => 'name',
'description' => 'description',
'status' => 'status',
'type' => 'type',
);
foreach($prefillArray as $requestKey => $focusVar) {
if (isset($_REQUEST[$requestKey]) && is_null($focus->$focusVar)) {
$focus->$focusVar = urldecode($_REQUEST[$requestKey]);
}
}
// BUILD MODULE TITLE LINE
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_NAME'].": ".$focus->name, true);
echo "\n</p>\n";
global $theme;
$theme_path = "themes/".$theme."/";
$image_path = $theme_path."images/";
require_once ($theme_path.'layout_utils.php');
$GLOBALS['log']->info("EcmReminders detail view");
// ASSIGN XTEMPLATE
$xtpl = new XTemplate ('modules/EcmReminders/EditView.html');
// FILL XTEMPLATE MODULE & APPLICATION LANGUAGE STRINGS
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
if (isset($_REQUEST['return_action'])) $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
if (empty($_REQUEST['return_id'])) {
$xtpl->assign("RETURN_ACTION", 'index');
}
///////////////////////////////////////
// SETUP POPUPS START
// Users Popup
$json = getJSONobj();
$popup_request_data = array(
'call_back_function' => 'set_return',
'form_name' => 'EditView',
'field_to_name_array' => array(
'id' => 'assigned_user_id',
'user_name' => 'assigned_user_name',
),
);
$xtpl->assign('encoded_users_popup_request_data', $json->encode($popup_request_data));
//
////////////////////////////////////////////////////////////////////////////////
// ACCOUNT_ID WILL BE SET WHEN USER CHOOSES TO CREATE A NEW SIMPLEMODULE FROM ACCOUNT DETAIL VIEW.
if (isset($_REQUEST['account_id'])) $xtpl->assign("ACCOUNT_ID", $_REQUEST['account_id']);
if (isset($_REQUEST['contact_id'])) $xtpl->assign("CONTACT_ID", $_REQUEST['contact_id']);
// SET THE CASE_ID, IF SET.
// WITH NEW CONCEPT OF SUBPANELS IT,
// WHEN THE SUBPANEL IS DISPLAYED IT PULLS FROM THE CLASS NAME WHICH IN THE SITUATION OF CASES IS ACASE SO THE FORM IS GENERATED
// WITH ACASE_ID INSTEAD OF CASE_ID, SO I HAVE DONE THE MAPPING HERE
if (isset($_REQUEST['acase_id'])) $xtpl->assign("CASE_ID",$_REQUEST['acase_id']);
else if(isset($_REQUEST['case_id'])) $xtpl->assign("CASE_ID",$_REQUEST['case_id']);
////////////////////////////////////////////////////////////////////////////////
// QUICK SEARCH SETUP
require_once('include/QuickSearchDefaults.php');
$qsd = new QuickSearchDefaults();
$sqs_objects = array(
'assigned_user_name' => $qsd->getQSUser(),
/*
//BUILDER:START Pro only
'team_name' => $qsd->getQSTeam()
//BUILDER:END Pro only
*/
);
$quicksearch_js = $qsd->getQSScripts();
$quicksearch_js .= '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
// QUICK SEARCH SETUP
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// ASSIGN GLOBAL VARIABLES
$xtpl->assign("THEME", $theme);
$xtpl->assign("IMAGE_PATH", $image_path);$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
$xtpl->assign("JAVASCRIPT", get_set_focus_js().get_validate_record_js(). $quicksearch_js);
$xtpl->assign("USER_DATEFORMAT", '('. $timedate->get_user_date_format().')');
$xtpl->assign("CALENDAR_DATEFORMAT", $timedate->get_cal_date_format());
// ASSIGN GLOBAL VARIABLES
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
// ASSIGN MODULE DEFAULT VARIABLES
$xtpl->assign("ID", $focus->id);
if (!empty($focus->name))
$xtpl->assign("NAME", $focus->name);
else $xtpl->assign("NAME", "");
$xtpl->assign("DATE_ENTERED", $focus->date_entered);
$xtpl->assign("DATE_MODIFIED", $focus->date_modified);
$xtpl->assign("CREATED_BY", $focus->created_by_name);
$xtpl->assign("MODIFIED_BY", $focus->modified_by_name);
if (empty($focus->assigned_user_id) && empty($focus->id)) $focus->assigned_user_id = $current_user->id;
if (empty($focus->assigned_name) && empty($focus->id)) $focus->assigned_user_name = $current_user->user_name;
$xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id));
$xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name);
$xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id );
// ASSIGN MODULE SPECIFIC VARIABLES
$xtpl->assign("PARENT_ID", $focus->parent_id);
$xtpl->assign("PARENT_NAME", $focus->parent_name);
$xtpl->assign("DESCRIPTION", $focus->description);
$xtpl->assign("DATE_START", $focus->date_start);
// ASSIGN MODULE DROPDOWNS WITH DEFAULT KEY
// ASSIGN MODULE VARIABLES AFFECTED BY DUPLICATE ACTION
if(!isset($_REQUEST['isDuplicate'])) {
$focus->id = "";
}
// ASSIGN MODULE DROPDOWNS WITHOUT DEFAULT KEY
//BUILDER:END of xtpl
// ADD CUSTOM FIELDS
require_once('modules/DynamicFields/templates/Files/EditView.php');
////////////////////////////////////////////////////////////////////////////////
// USER ASSIGNMENT
global $current_user;
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$record = '';
// USER ASSIGNMENT
////////////////////////////////////////////////////////////////////////////////
if(!empty($_REQUEST['record'])){
$record = $_REQUEST['record'];
}
$xtpl->assign("ADMIN_EDIT","<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action'] ."&from_module=".$_REQUEST['module'] ."&record=".$record. "'>".get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>");
}
$xtpl->parse("main");
$xtpl->out("main");
require_once('include/javascript/javascript.php');
$javascript = new javascript();
$javascript->setFormName('EditView');
$javascript->setSugarBean($focus);
$javascript->addAllFields('');
//BUILDER:START Pro only
// $javascript->addFieldGeneric( 'team_name', 'varchar', $app_strings['LBL_TEAM'] ,'true');
// $javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
//BUILDER:END Pro only
$javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
echo $javascript->getScript();
////////////////////////////////////////////////////////////////////////////////
/// SELECT CHANGES TEXT INPUT FIELD
/*
$prob_array = $json->encode($app_list_strings['sales_probability_dom']);
$prePopProb = '';
if(empty($focus->id)) $prePopProb = 'document.getElementsByName(\'sales_stage\')[0].onchange();';
echo <<<EOQ
<script>
prob_array = $prob_array;
document.getElementsByName('sales_stage')[0].onchange = function() {
if(typeof(document.getElementsByName('sales_stage')[0].value) != "undefined" && prob_array[document.getElementsByName('sales_stage')[0].value]) {
document.getElementsByName('probability')[0].value = prob_array[document.getElementsByName('sales_stage')[0].value];
}
};
$prePopProb
</script>
EOQ;
*/
//
/// SELECT CHANGES TEXT INPUT FIELD
////////////////////////////////////////////////////////////////////////////////
require_once('modules/SavedSearch/SavedSearch.php');
$savedSearch = new SavedSearch();
$json = getJSONobj();
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmReminders')));
$str = "<script>
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
</script>";
echo $str;
?>

112
modules/EcmReminders/Forms.php Executable file
View File

@@ -0,0 +1,112 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
/*******************************************************************************
* CREATE JAVASCRIPT TO VALIDATE THE DATA ENTERED INTO A RECORD.
*******************************************************************************/
function get_validate_record_js () {
}
/*******************************************************************************
* CREATE FORM FOR MENU RAPID CREATE
*******************************************************************************/
/*
function get_new_record_form () {
if(!ACLController::checkAccess('EcmReminders', 'edit', true)){
return '';
}
global $mod_strings;
global $app_strings;
global $app_list_strings;
global $mod_strings;
global $theme;
global $current_user;
$lbl_subject = $mod_strings['LBL_SUBJECT'];
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
$user_id = $current_user->id;
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
$the_form .= <<<EOQ
<form name="EcmReminderSave" onSubmit="return check_form('EcmRemindersSave')" method="POST" action="index.php">
<input type="hidden" name="module" value="EcmReminders">
<input type="hidden" name="record" value="">
<input type="hidden" name="assigned_user_id" value='${user_id}'>
<input type="hidden" name="action" value="Save">
${lbl_subject}&nbsp;<span class="required">${lbl_required_symbol}</span><br>
<p><input name='name' type="text" size='20' maxlength="255"value=""><br>
</p>
<p>
<input title="${lbl_save_button_title}" accessKey="${lbl_save_button_key}" class="button" type="submit" name="button" value=" ${lbl_save_button_label} " >
</p>
</form>
EOQ;
require_once('include/javascript/javascript.php');
require_once('modules/EcmReminders/EcmReminder.php');
$javascript = new javascript();
$javascript->setFormName('EcmRemindersSave}');
$javascript->setSugarBean(new EcmReminder());
$javascript->addRequiredFields('');
$the_form .= $javascript->getScript();
$the_form .= get_left_form_footer();
return $the_form;
}
*/
?>

188
modules/EcmReminders/ListView.php Executable file
View File

@@ -0,0 +1,188 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once ('XTemplate/xtpl.php');
require_once ("data/Tracker.php");
require_once ('modules/EcmReminders/EcmReminder.php');
require_once ('themes/'.$theme.'/layout_utils.php');
require_once ('log4php/LoggerManager.php');
require_once('include/ListView/ListViewSmarty.php');
require_once('modules/Currencies/Currency.php');
if(file_exists('custom/modules/EcmReminders/metadata/listviewdefs.php')){
require_once('custom/modules/EcmReminders/metadata/listviewdefs.php');
}else{
require_once('modules/EcmReminders/metadata/listviewdefs.php');
}
require_once('modules/SavedSearch/SavedSearch.php');
require_once('include/SearchForm/SearchForm.php');
$header_text = '';
global $app_strings;
global $mod_strings;
global $app_list_strings;
global $current_language;
$current_module_strings = return_module_language($current_language, 'EcmReminders');
global $urlPrefix;
global $currentModule;
global $theme;
global $current_user;
// FOCUS_LIST IS THE MEANS OF PASSING DATA TO A LISTVIEW.
global $focus_list;
// SETUP QUICKSEARCH
require_once('include/QuickSearchDefaults.php');
$qsd = new QuickSearchDefaults();
// CLEAR THE DISPLAY COLUMNS BACK TO DEFAULT WHEN CLEAR QUERY IS CALLED
if(!empty($_REQUEST['clear_query']) && $_REQUEST['clear_query'] == 'true')
$current_user->setPreference('ListViewDisplayColumns', array(), 0, $currentModule);
$savedDisplayColumns = $current_user->getPreference('ListViewDisplayColumns', $currentModule); // GET USER DEFINED DISPLAY COLUMNS
$json = getJSONobj();
$seedEcmReminder = new EcmReminder(); // SEED BEAN
$searchForm = new SearchForm('EcmReminders', $seedEcmReminder); // NEW SEARCHFORM INSTANCE
// SETUP LISTVIEW SMARTY
$lv = new ListViewSmarty();
$displayColumns = array();
// CHECK $_REQUEST IF NEW DISPLAY COLUMNS FROM POST
if (!empty($_REQUEST['displayColumns'])) {
foreach (explode('|', $_REQUEST['displayColumns']) as $num => $col) {
if (!empty($listViewDefs['EcmReminders'][$col]))
$displayColumns[$col] = $listViewDefs['EcmReminders'][$col];
}
}elseif(!empty($savedDisplayColumns)) { // USE USER DEFINED DISPLAY COLUMNS FROM PREFERENCES
$displayColumns = $savedDisplayColumns;
}else { // USE COLUMNS DEFINED IN LISTVIEWDEFS FOR DEFAULT DISPLAY COLUMNS
foreach($listViewDefs['EcmReminders'] as $col => $params) {
if(!empty($params['default']) && $params['default'])
$displayColumns[$col] = $params;
}
}
$params = array('massupdate' => true); // SETUP LISTVIEWSMARTY PARAMS
if(!empty($_REQUEST['orderBy'])) { // ORDER BY COMING FROM $_REQUEST
$params['orderBy'] = $_REQUEST['orderBy'];
$params['overrideOrder'] = true;
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
}
$lv->displayColumns = $displayColumns;
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only']) { // HANDLE AJAX REQUESTS FOR SEARCH FORMS ONLY
switch($_REQUEST['search_form_view']) {
case 'basic_search':
$searchForm->setup();
$searchForm->displayBasic(false);
break;
case 'advanced_search':
$searchForm->setup();
$searchForm->displayAdvanced(false);
break;
case 'saved_views':
echo $searchForm->displaySavedViews($listViewDefs, $lv, false);
break;
}
return;
}
// USE THE STORED QUERY IF THERE IS ONE
if (!isset($where)) $where = "";
require_once('modules/MySettings/StoreQuery.php');
$storeQuery = new StoreQuery();
if(!isset($_REQUEST['query'])){
$storeQuery->loadQuery($currentModule);
$storeQuery->populateRequest();
}else{
$storeQuery->saveFromGet($currentModule);
}
if(isset($_REQUEST['query'])){
// WE HAVE A QUERY
// FIRST SAVE COLUMNS
$current_user->setPreference('ListViewDisplayColumns', $displayColumns, 0, $currentModule);
$searchForm->populateFromRequest(); // GATHERS SEARCH FIELD INPUTS FROM $_REQUEST
$where_clauses = $searchForm->generateSearchWhere(true, "EcmReminder"); // BUILDS THE WHERE CLAUSE FROM SEARCH FIELD INPUTS
if (count($where_clauses) > 0 )$where = implode(' and ', $where_clauses);
$GLOBALS['log']->info("Here is the where clause for the list view: $where");
}
// START DISPLAY
// WHICH TAB OF SEARCH FORM TO DISPLAY
if(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
$searchForm->setup();
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
$searchForm->displayAdvanced();
}elseif(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'saved_views'){
$searchForm->displaySavedViews($listViewDefs, $lv);
}else {
$searchForm->displayBasic();
}
}
echo $qsd->GetQSScripts();
//echo $where;
$lv->setup($seedEcmReminder, 'include/ListView/ListViewGeneric.tpl', $where, $params);
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
echo get_form_header($current_module_strings['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
echo $lv->display();
//print mysql_error();
$savedSearch = new SavedSearch();
$json = getJSONobj();
// FILLS IN SAVED VIEWS SELECT BOX ON SHORTCUT MENU
$savedSearchSelects = $json->encode(array($GLOBALS['app_strings']['LBL_SAVED_SEARCH_SHORTCUT'] . '<br>' . $savedSearch->getSelect('EcmReminders')));
$str = "<script>
YAHOO.util.Event.addListener(window, 'load', SUGAR.util.fillShortcuts, $savedSearchSelects);
</script>";
echo $str;
?>

60
modules/EcmReminders/Menu.php Executable file
View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $mod_strings;
/*
if(ACLController::checkAccess('EcmReminders', 'edit', true))
$module_menu [] = Array("index.php?module=EcmReminders&action=EditView&return_module=EcmReminders&return_action=DetailView", $mod_strings['LNK_NEW_ECMREMINDERS'],"CreateEcmReminders", 'EcmReminders');
*/
if(ACLController::checkAccess('EcmReminders', 'list', true))
$module_menu [] = Array("index.php?module=EcmReminders&action=index&return_module=EcmReminders&return_action=DetailView", $mod_strings['LNK_ECMREMINDERS_LIST'],"EcmReminders", 'EcmReminders');
if(ACLController::checkAccess('EcmReminders','list', true)) $module_menu[] = Array('#', '<span style="display: none">wp_shortcut_fill_0</span>', '');
?>

View File

@@ -0,0 +1,116 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version
* 1.1.3 ("License"); You may not use this file except in compliance with the
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* All copies of the Covered Code must include on each user interface screen:
* (i) the "Powered by SugarCRM" logo and
* (ii) the SugarCRM copyright notice
* in the same form as they appear in the distribution. See full license for
* requirements.
*
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
********************************************************************************/
require_once('modules/EcmReminders/ReminderHelper.php');
require_once('XTemplate/xtpl.php');
$xtpl = new XTemplate ('modules/EcmReminders/ReminderWindow1.html');
global $mod_strings, $app_strings;
//$meetings=getList("meetings","showall"," and reminder_time!='-1'","date_start","date_start","Meetings",0);
//$calls=getList("calls","showall"," and reminder_time!='-1'","date_start","date_start","Calls",0);
$ecmreminders=getList("ecmreminders","showall"," and reminder_time!='-1'","date_start","date_start","EcmReminders",1);
if(count($meetings)+count($calls)+count($ecmreminders)==0)
{
$list='<script></script>';
}
else
{
for($i=0;$i<count($ecmreminders);$i++)$name[]=$ecmreminders[$i];
rsort($name);
$list=ListView($name);
}
$js='
function selectallitems()
{';
if(count($name)>0)
{
foreach($name as $value)
{
$js.='if(document.getElementById("selectall").checked==true){document.getElementById("check'.$value['id'].'").checked=true}else {document.getElementById("check'.$value['id'].'").checked=false} ;
';
}
}
$js.='
}';
$javascript='';
$javascript.='
<script>
'.$js.'
function show(id,date,hour,minute)
{
document.getElementById("date").value=date;
document.getElementById("hour").value=hour;
document.getElementById("minute").value=minute;
}
function showdiv(id)
{
document.getElementById("postponeTo").style.display="none";
document.getElementById("postponeBy").style.display="none";
document.getElementById("li_postponeTo").className="";
document.getElementById("li_postponeBy").className="";
document.getElementById("a_postponeTo").className="";
document.getElementById("a_postponeBy").className="";
document.getElementById(id).style.display="block";
document.getElementById("li_"+id).className="active";
document.getElementById("a_"+id).className="current";
}
</script>';
$hour='<select name="hour" id="hour">';
for($i=0;$i<=23;$i++)
{
if($i<=9)$value="0".$i;
else $value=$i;
$hour.='<option value="'.$i.'"';
if($i==$_SESSION['reminder']['hour'])$hour.=' selected';
$hour.='>'.$value.'</option>';
}
$hour.='</select>';
$minute='<select name="minute" id="minute">';
for($min=0;$min<60;$min++)
{
if($min==0)$value="00";
else $value=$min;
$minute.='<option value="'.$min.'"';
if($min==$_SESSION['reminder']['minute'])$minute.=' selected';
$minute.='>'.$value.'</option>';
}
$minute.='</select>';
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("DATE_START",$_SESSION['reminder']['date']);
$xtpl->assign("LIST",$list);
$xtpl->assign("HOUR",$hour);
$xtpl->assign("MINUTE",$minute);
$xtpl->assign("JAVASCRIPT",$javascript);
$xtpl->parse("main");
$xtpl->out("main");
?>

57
modules/EcmReminders/Popup.php Executable file
View File

@@ -0,0 +1,57 @@
<?php
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/Popups/Popup_picker.php');
$popup = new Popup_Picker();
echo $popup->process_page();
?>

View File

@@ -0,0 +1,147 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $theme;
require_once('modules/EcmReminders/EcmReminder.php');
require_once('themes/'.$theme.'/layout_utils.php');
require_once('log4php/LoggerManager.php');
require_once('XTemplate/xtpl.php');
require_once('include/ListView/ListView.php');
$image_path = 'themes/'.$theme.'/images/';
class Popup_Picker{
function Popup_Picker(){
;
}
function _get_where_clause(){
$where = '';
if(isset($_REQUEST['query'])){
$where_clauses = array();
append_where_clause($where_clauses, "name", "ecmreminders.name");
$where = generate_where_statement($where_clauses);
}
return $where;
}
function process_page(){
global $theme;
global $mod_strings;
global $app_strings;
global $currentModule;
$output_html = '';
$where = '';
$where = $this->_get_where_clause();
$image_path = 'themes/'.$theme.'/images/';
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
if(!$hide_clear_button){
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CLEAR_BUTTON_KEY'] ."' value=' "
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
}
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
.$app_strings['LBL_CANCEL_BUTTON_KEY'] ."' value=' "
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
$button .= "</form>\n";
$form = new XTemplate('modules/EcmReminders/Popup_picker.html');
$form->assign('MOD', $mod_strings);
$form->assign('APP', $app_strings);
$form->assign('THEME', $theme);
$form->assign('MODULE_NAME', $currentModule);
$form->assign('NAME', $name);
$form->assign('request_data', $request_data);
ob_start();
insert_popup_header($theme);
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
$form->parse('main.SearchHeader');
$output_html .= $form->text('main.SearchHeader');
$output_html .= get_form_footer();
// RESET THE SECTIONS THAT ARE ALREADY IN THE PAGE SO THAT THEY DO NOT PRINT AGAIN LATER.
$form->reset('main.SearchHeader');
// CREATE THE LISTVIEW
$seed_bean = new EcmReminder();
$ListView = new ListView();
$ListView->show_export_button = false;
$ListView->process_for_popups = true;
$ListView->setXTemplate($form);
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
$ListView->setHeaderText($button);
$ListView->setQuery($where, '', 'name', 'ECMREMINDER');
$ListView->setModStrings($mod_strings);
ob_start();
$ListView->processListView($seed_bean, 'main', 'ECMREMINDER');
$output_html .= ob_get_contents();
ob_end_clean();
$output_html .= get_form_footer();
$output_html .= insert_popup_footer();
return $output_html;
}
} // end of class Popup_Picker
?>

View File

@@ -0,0 +1,9 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
postponeBy("date_start","meetings");
postponeBy("date_start","calls");
postponeBy("date_start","ecmreminders");
postponeBy("reminder_date","ecmdocs");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,9 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
postponeTo("date_start","meetings");
postponeTo("date_start","calls");
postponeTo("date_start","ecmreminders");
postponeTo("reminder_date","ecmdocs");
if($_REQUEST['backtoindex']==1)header("Location: index.php?module=EcmReminders&action=index");
else header("Location: index.php?module=EcmReminders&action=ReminderWindow&to_pdf=1");
?>

View File

@@ -0,0 +1,204 @@
<?
//error_reporting(0);
//*****************************************************************
function calculateGMT() {
static $gmt;
if(!isset($gmt)) {
global $timedate;
$dd = gmdate("Y-m-d H:i:s");
$dd2 = $timedate->handle_offset($dd, "Y-m-d H:i:s", true);
$gmt = strtotime($dd2) - strtotime($dd);
}
return $gmt;
}
//*****************************************************************
function getList($type,$status,$reminder_time,$order_by,$date_field,$module,$role_id)
{
global $timedate;
if($status=="showall")
{
$stat=1;
$status="Held";
}
$gmt = calculateGMT();
$i=0;
$z="select * from ".$type." where deleted='0' ".$reminder_time." and status!='".$status."' order by ".$order_by." desc";
$w=$GLOBALS['db']->query($z);
while($r=$GLOBALS['db']->fetchByAssoc($w))
{
$show=0;
if($r['assigned_user_id']==$_SESSION['authenticated_user_id'])$show=1;
if($show==1)
{
$date_start=explode(" ",$r[$date_field]);
$ts=explode(":",$date_start[1]);
$ds=explode("-",$date_start[0]);
if(strtotime($r[$date_field])-$r['reminder_time'] <= strtotime(gmdate("Y-m-d H:i:s")) || $stat)
{
$name[$i]['date_start'] = $date_start[0];
$name[$i]['time_start']= $date_start[1];
$name[$i]['name']=$r['name'];
$name[$i]['id']=$r['id'];
$name[$i]['type']=$type;
$name[$i]['status']=$r['status'];
$name[$i]['reminder_time']=$r['reminder_time'];
$name[$i]['parent_id']=$r['parent_id'];
$name[$i]['parent_module']=$r['parent_module'];
$name[$i]['description']=$r['description'];
$name[$i]['status']=$r['status'];
$name[$i]['module']=$module;
if($type=="ecmreminders")$name[$i]['icon']= $r['parent_name'];//"ListEcmDocs";
else $name[$i]['icon']=$module;
$name[$i]['edit']=1;
$name[$i]['record_id']=$r['id'];
$name[$i]['record_module']=$module;
if($type=="ecmreminders")
{
$name[$i]['edit']=0;
$name[$i]['record_id']=$r['parent_id'];
$name[$i]['record_module']=$r['parent_name'];
}
$i++;
}
}
}
if (isset($name))
return $name;
else return '';
}
function postponeBy($date_field,$type)
{
global $timedate;
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
/*$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select reminder_time,".$date_field." from ".$type." where id='".$check."'"));
if($r[$date_field] && $r['reminder_time'])
{
$date_start=explode(" ",$r[$date_field]);
$ts=explode(":",$date_start[1]);
$ds=explode("-",$date_start[0]);
$new_date=gmdate("Y-m-d H:i:s",mktime($ts[0],$ts[1],$ts[2],$ds[1],$ds[2],$ds[0])+$_POST['rsec']+7200);
$ndate=explode(" ",$new_date);
$GLOBALS['db']->query("update ".$type." set ".$date_field."='".$ndate[0]." ".$ndate[1]."' where id='".$check."'");
}*/
$GLOBALS['db']->query("update ".$type." set reminder_time=reminder_time-".$_REQUEST['rsec']." where id='".$check."'");
}
}
}
}
function postponeTo($date_field,$type)
{
global $timedate;
$gmt = calculateGMT();
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select reminder_time,".$date_field." from ".$type." where id='".$check."'"));
$date=$r[$date_field];
$time=strtotime($date);
$date_time=strtotime($timedate->to_display($_REQUEST['date'],$timedate->get_date_format(), "Y-m-d")." ".$_REQUEST['hour'].":".$_REQUEST['minute'].":00");
$reminder_time=$time-$date_time+$gmt;
$GLOBALS['db']->query("update ".$type." set reminder_time='".$reminder_time."' where id='".$check."'");
/*
$time_start=date("H:i:s",strtotime($_REQUEST['date'][6].$_REQUEST['date'][7].$_REQUEST['date'][8].$_REQUEST['date'][9]."-".$_REQUEST['date'][3].$_REQUEST['date'][4]."-".$_REQUEST['date'][0].$_REQUEST['date'][1]." ".$_REQUEST['hour'].":".$_REQUEST['minute'].":00"));
$GLOBALS['db']->query("update ".$type." set ".$date_field."='".$_REQUEST['date'][6].$_REQUEST['date'][7].$_REQUEST['date'][8].$_REQUEST['date'][9]."-".$_REQUEST['date'][3].$_REQUEST['date'][4]."-".$_REQUEST['date'][0].$_REQUEST['date'][1]." ".$time_start."' where id='".$check."'");*/
}
}
}
}
function closeSelected($type,$status,$reminder_time)
{
global $timedate;
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
if($reminder_time=="-1")$rt=",reminder_time='-1'";
else $rt="";
$GLOBALS['db']->query("update ".$type." set status='".$status."'".$rt." where id='".$check."'");
}
}
}
}
function reminderTime($type)
{
global $timedate;
if(count($_POST['check']))
{
foreach($_POST['check'] as $check)
{
if($check)
{
$r=$GLOBALS['db']->FetchByAssoc($GLOBALS['db']->query("select reminder_time from ".$type." where id='".$check."'"));
$rtime=$_REQUEST['reminder_minutes']+$_REQUEST['reminder_hours'];
if($rtime<0)$rtime=60;
$GLOBALS['db']->query("update ".$type." set reminder_time='".$rtime."' where id='".$check."'");
}
}
}
}
function ListView($name)
{
global $timedate;
$html="";
for($i=0;$i<count($name);$i++)
{
$value=$name[$i];
$ts=explode(":",$value['time_start']);
if($value['reminder_time'] != -1)
{
$rem = date("Y-m-d H:i:s",strtotime($value['date_start'].' '.$value['time_start'])-$value['reminder_time']+calculateGMT());
$rexp=explode(" ",$rem);
$date_rem=$rexp[0];
$rrexp=explode(":",$rexp[1]);
}
else $rem="";
if($i==0)
{
$check="checked";
global $timedate;
$_SESSION['reminder']['date']=$timedate->to_display_date($date_rem,false);
$_SESSION['reminder']['hour']=$rrexp[0];
$_SESSION['reminder']['minute']=$rrexp[1];
}
else $check="";
$onclick='<a class="listViewTdLinkS1" style="cursor:pointer;" onclick="window.open(\'index.php?module='.$value['record_module'].'&action=DetailView&record='.$value['record_id'].'&close=1\',\'CRM\',\'height=780,width=1014,scrollbars=yes\',\'\').focus();">'.$value['name'].'</a>';
$editlink="";
if($value['edit'])$editlink='<a style="cursor:pointer;" onclick="window.open(\'index.php?module='.$value['module'].'&action=EditView&record='.$value['id'].'\',\'CRM\',\'height=780,width=1014,scrollbars=yes\',\'\').focus();"><img src="themes/Sugar/images/edit_inline.gif" border="0"></a>';
$ddd = date("Y-m-d H:i:s",strtotime($value['date_start'].' '.$value['time_start'])-$value['reminder_time']);
$ddd2 = date("Y-m-d H:i:s",strtotime($value['date_start'].' '.$value['time_start']));
$html.='<tr>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff"><input onclick="sListView.check_item(this, document.MassUpdate);show(\''.$value['id'].'\',\''.$timedate->to_display($date_rem, "Y-m-d",$timedate->get_date_format()).'\',\''.$rrexp[0].'\',\''.$rrexp[1].'\');" type="checkbox" name="check[]" id="check'.$value['id'].'" value="'.$value['id'].'" '.$check.'></td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff"><img src="themes/default/images/'.$value['icon'].'.gif" border="0"></td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$onclick.'</td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$timedate->to_display_date_time($ddd).'</td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$timedate->to_display_date_time($ddd2).'</td>
<td valign="top" class="oddListRowS1" bgcolor="#ffffff">'.$value['status'].'</td>
</tr>';
}
return $html;
}
?>

View File

@@ -0,0 +1,97 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
require_once('XTemplate/xtpl.php');
$xtpl = new XTemplate ('modules/EcmReminders/ReminderWindow.html');
global $mod_strings, $app_strings;
$meetings=getList("meetings","Held"," and reminder_time!='-1'","date_start","date_start","Meetings",0);
$calls=getList("calls","Held"," and reminder_time!='-1'","date_start","date_start","Calls",0);
//$tasks=getList("tasks","Completed","","date_start","date_start","Tasks");
$ecmreminders=getList("ecmreminders","Held"," and reminder_time!='-1'","date_start","date_start","EcmReminders",1);
if(count($meetings)+count($calls)+count($ecmreminders)==0)
{
$list='<script>window.close();</script>';
}
else
{
for($i=0;$i<count($meetings);$i++)$name[]=$meetings[$i];
for($i=0;$i<count($calls);$i++)$name[]=$calls[$i];
//for($i=0;$i<count($tasks);$i++)$name[]=$tasks[$i];
for($i=0;$i<count($ecmreminders);$i++)$name[]=$ecmreminders[$i];
rsort($name);
//print_r($name);
$list=ListView($name);
}
$js='
function selectallitems()
{';
if(count($name)>0)
{
foreach($name as $value)
{
$js.='if(document.getElementById("selectall").checked==true){document.getElementById("check'.$value['id'].'").checked=true}else {document.getElementById("check'.$value['id'].'").checked=false} ;
';
}
}
$js.='
}';
$javascript='';
$javascript.='
<script>
'.$js.'
function show(id,date,hour,minute)
{
document.getElementById("date").value=date;
document.getElementById("hour").value=hour;
document.getElementById("minute").value=minute;
}
function showdiv(id)
{
document.getElementById("postponeTo").style.display="none";
document.getElementById("postponeBy").style.display="none";
document.getElementById("li_postponeTo").className="";
document.getElementById("li_postponeBy").className="";
document.getElementById("a_postponeTo").className="";
document.getElementById("a_postponeBy").className="";
document.getElementById(id).style.display="block";
document.getElementById("li_"+id).className="active";
document.getElementById("a_"+id).className="current";
}
</script>';
$hour='<select name="hour" id="hour">';
for($i=0;$i<=23;$i++)
{
if($i<=9)$value="0".$i;
else $value=$i;
$hour.='<option value="'.$i.'"';
if($i==$_SESSION['reminder']['hour'])$hour.=' selected';
$hour.='>'.$value.'</option>';
}
$hour.='</select>';
$mins=array(0,15,30,45);
$minute='<select name="minute" id="minute">';
for($min=0;$min<60;$min++)
{
if($min==0)$value="00";
else $value=$min;
$minute.='<option value="'.$min.'"';
if($min==$_SESSION['reminder']['minute'])$minute.=' selected';
$minute.='>'.$value.'</option>';
}
$minute.='</select>';
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
$xtpl->assign("DATE_START",$_SESSION['reminder']['date']);
$xtpl->assign("LIST",$list);
$xtpl->assign("HOUR",$hour);
$xtpl->assign("MINUTE",$minute);
$xtpl->assign("JAVASCRIPT",$javascript);
$xtpl->parse("main");
$xtpl->out("main");
?>

87
modules/EcmReminders/Save.php Executable file
View File

@@ -0,0 +1,87 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
require_once('modules/EcmReminders/EcmReminder.php');
require_once('include/formbase.php');
$focus = new EcmReminder();
$focus->retrieve($_POST['record']);
if(!$focus->ACLAccess('Save')){
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
if (!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
$check_notify = TRUE;
}else{
$check_notify = FALSE;
}
foreach($focus->column_fields as $field){
if(isset($_POST[$field])){
$value = $_POST[$field];
$focus->$field = $value;
}
}
foreach($focus->additional_column_fields as $field){
if(isset($_POST[$field])){
$value = $_POST[$field];
$focus->$field = $value;
}
}
$focus->unformat_all_fields();
$focus->save($check_notify);
$return_id = $focus->id;
handleRedirect($return_id,'EcmReminders');
?>

View File

@@ -0,0 +1,40 @@
<?
require_once('modules/EcmReminders/ReminderHelper.php');
$meetings = array();
$calls = array();
$ecmreminders = array();
global $current_user;
$rem_time = $current_user->getPreference('reminder_time');
if(empty($rem_time)){
$rem_time = -1;
}
if($rem_time != -1)
{
$name = array();
$ecmreminders=getList("ecmreminders","showall"," and reminder_time!='-1'","date_start","date_start","EcmReminders",1);
if (!is_array($ecmreminders)) return;
foreach ($ecmreminders as $v) {
//echo $v['reminder_time'];
if($v['reminder_time'] != -1)
{
$rem = strtotime($v['date_start'].' '.$v['time_start'])-$v['reminder_time']+calculateGMT()-$rem_time;
$cur = mktime();
if ($rem - $cur < 0) $name[] = $v;
}
}
if(count($name)>0) {
echo "ok";
}
}
?>

View File

@@ -0,0 +1,130 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
require_once('XTemplate/xtpl.php');
require_once("data/Tracker.php");
require_once("include/ListView/ListView.php");
global $app_strings;
global $current_language;
$current_module_strings = return_module_language($current_language, 'EcmReminders');
$header_text = '';
global $currentModule;
global $theme;
global $focus;
global $action;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once($theme_path.'layout_utils.php');
///////////////////////////////////////
/// SETUP PARENT POPUP
$popup_request_data = array(
'call_back_function' => 'set_return_and_save',
'form_name' => 'DetailView',
'field_to_name_array' => array(
'id' => 'ecmreminder_id',
),
);
$json = getJSONobj();
$encoded_popup_request_data = $json->encode($popup_request_data);
///
///////////////////////////////////////
// FOCUS_LIST IS THE MEANS OF PASSING DATA TO A SUBPANELVIEW.
global $focus_list;
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
$button .= "<input type='hidden' name='module' value='EcmReminders'>\n";
if ($currentModule == 'Accounts') {
$button .= "<input type='hidden' name='account_id' value='$focus->id'>\n";
$button .= "<input type='hidden' name='account_name' value='$focus->name'>\n";
}elseif ($currentModule == 'Contacts') {
$button .= "<input type='hidden' name='account_id' value='$focus->account_id'>\n";
$button .= "<input type='hidden' name='account_name' value='$focus->account_name'>\n";
$button .= "<input type='hidden' name='contact_id' value='$focus->id'>\n";
}elseif ($currentModule == 'Cases') {
$button .= "<input type='hidden' name='case_id' value='$focus->id'>\n";
}
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
$button .= "<input type='hidden' name='action'>\n";
$button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']
."' accessKey='".$app_strings['LBL_NEW_BUTTON_KEY']
."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' "
.$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n";
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']."' accessKey='"
.$app_strings['LBL_SELECT_BUTTON_KEY']."' type='button' class='button' value=' "
.$app_strings['LBL_SELECT_BUTTON_LABEL']
." ' name='button' onclick='open_popup(\"EcmReminders\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
$button .= "</form>\n";
$ListView = new ListView();
$ListView->initNewXTemplate( 'modules/EcmReminders/SubPanelView.html',$current_module_strings);
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id={$_REQUEST['record']}");
$ListView->xTemplateAssign("EDIT_INLINE_PNG", get_image($image_path.'edit_inline', 'align="absmiddle" alt="'.$app_strings['LNK_EDIT'] .'" border="0"'));
$ListView->xTemplateAssign("DELETE_INLINE_PNG", get_image($image_path.'delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
$header_text = "&nbsp;<a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=EcmReminders&record="
.$_REQUEST['record']."'>"
.get_image($image_path."EditLayout","border='0' alt='Edit Layout' align='bottom'")
."</a>";
}
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME'] . $header_text );
$ListView->setHeaderText($button);
$ListView->processListView($focus_list, "main", "ECMREMINDER");
?>

View File

@@ -0,0 +1,29 @@
<?
function show_time_select($value)
{
$d=floor($value/3600);
$m=$value-$d*3600;
$s=$m/60;
if(!$value)$s=1;
$minutes='<select name="reminder_minutes">';
for($i=0;$i<=59;$i++)
{
$v=$i*60;
$minutes.='<option value="'.$v.'"';
if($i==$s)$minutes.=' selected';
$minutes.='>'.$i.'</option>';
}
$minutes.='</select>';
$hours='<select name="reminder_hours">';
for($i=0;$i<=23;$i++)
{
$v=$i*3600;
$hours.='<option value="'.$v.'"';
if($i==$d)$hours.=' selected';
$hours.='>'.$i.'</option>';
}
$hours.='</select>';
return 'hours: '.$hours.' minutes: '.$minutes;
}
?>

View File

@@ -0,0 +1,85 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$fields_array['EcmReminder'] = array (
'column_fields' => Array(
"id",
"name",
"date_entered",
"date_modified",
"modified_user_id",
"assigned_user_id",
"created_by",
//NEW COLUMN FIELDS
"parent_id",
"parent_name",
"description",
"date_start",
"role_id",
"status",
),
'list_fields' => Array(
'id',
'name',
'assigned_user_name',
'assigned_user_id',
//NEW LIST_FIELDS
'parent_id',
'parent_name',
'description',
'date_start',
'role_id',
'status',
),
'required_fields' => array(
'name'=>1
),
);
?>

61
modules/EcmReminders/index.php Executable file
View File

@@ -0,0 +1,61 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
require_once ($theme_path."layout_utils.php");
global $mod_strings;
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_TITLE'], true);
echo "\n</p>\n";
include ('modules/EcmReminders/OpenListView.php');
?>

View File

@@ -0,0 +1,166 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$mod_strings = array (
'appointment_filter_dom' => array(
'today' => 'today'
,'tomorrow' => 'tomorrow'
,'this Saturday' => 'this week'
,'next Saturday' => 'next week'
,'last this_month' => 'this month'
,'last next_month' => 'next month'
),
'LBL_UPCOMING' => 'Reminder',
'LBL_TODAY' => 'through ',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DATE' => 'Date',
'LBL_LIST_TIME' => 'Start Time',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_STATUS' => 'Status',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Reminders',
'LBL_MODULE_TITLE' => 'Reminders: Home',
'LBL_MODULE_ID' => 'Reminders',
'LBL_SEARCH_FORM_TITLE' => 'Reminders Search',
'LBL_LIST_FORM_TITLE' => 'Reminders List',
'LBL_NEW_FORM_TITLE' => 'New Reminders',
'LBL_ECMREMINDERS' => 'Reminders:',
'LBL_ECMREMINDERS_SUBJECT' => 'Reminders Subject:',
'LBL_SYSTEM_ID' => 'System ID',
// FOR LIST VIEW
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
'LBL_LIST_MY_ECMREMINDERS' => 'My Assigned Reminders',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_LIST_PARENT_ID' => 'Parent Id',
'LBL_LIST_PARENT_NAME' => 'Parent Name',
'LBL_LIST_DESCRIPTION' => 'Description',
'LBL_LIST_DATE_START' => 'Date Start',
// FOR NOTIFICATION POPUPS
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this Reminder?',
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Reminder?',
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this account?',
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the ecmreminder.',
// FOR DEFAULT FIELDS
'LBL_NAME' => 'Name:',
'LBL_SUBJECT' => 'Name:',
'LBL_CREATED_BY' => 'Created by:',
'LBL_CREATED' => 'Created by:',
'LBL_ASSIGNED_TO' => 'Assigned to:',
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
'LBL_DATE_ENTERED' => 'Date Created:',
'LBL_DATE_CREATED' => 'Create Date:',
'LBL_DATE_MODIFIED' => 'Last Modified',
'LBL_MODIFIED_BY' => 'Last Modified by:',
'LBL_MODIFIED' => 'Modified by:',
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
// FOR NEW FIELDS
'LBL_PARENT_ID' => 'Parent Id',
'LBL_PARENT_NAME' => 'Parent Name',
'LBL_DESCRIPTION' => 'Description',
'LBL_DATE_START' => 'Date Start',
// FOR GROUPS
'LBL_GROUP_MASTER' => 'ECMREMINDER INFORMATION',
'LBL_GROUP_PARENT_ID' => '',
'LBL_GROUP_PARENT_NAME' => '',
'LBL_GROUP_DESCRIPTION' => '',
'LBL_GROUP_DATE_START' => '',
// FOR SUBPANELS
'LBL_ECMREMINDERS_SUBPANEL_TITLE' => 'Reminders',
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
'LBL_HISTORY_SUBPANEL_TITLE' => 'History',
'LBL_ECMREMINDERS' => 'Reminders',
// FOR MENU LABELS
'LNK_NEW_ECMREMINDERS' => 'Create Reminder',
'LNK_LIST_ECMREMINDER' => 'Reminders List',
// FOR MENU LINKS
'LNK_NEW_ECMREMINDER' => 'Create Reminders',
'LNK_ECMREMINDERS_LIST' => 'Reminders',
'LNK_ECMREMINDERS_REPORTS' => 'Reminders Reports',
// FOR ADDITIONAL MENUS
// FOR DASHLETS
'LBL_LIST_ECMREMINDERS' => 'Reminders',
'LBL_REMINDER_LIST' => 'Remind List',
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_REMINDER_DATE' => 'Reminder Date',
'LBL_LIST_EVENT_DATE' => 'Event Date',
'LBL_LIST_STATUS' => 'Status',
'LBL_POSTPONE_BY' => 'Postpone By',
'LBL_POSTPONE_TO' => 'Postpone To',
'LBL_DATE' => 'Date',
'LBL_TIME' => 'Time',
'LBL_POSTPONEBY_DROPDOWN_MIN' => 'min',
'LBL_POSTPONEBY_DROPDOWN_HOUR' => 'hour.',
'LBL_POSTPONEBY_DROPDOWN_HOURS' => 'hours',
'LBL_POSTPONEBY_DROPDOWN_DAY' => 'day',
'LBL_POSTPONEBY_DROPDOWN_DAYS' => 'days',
'LBL_POSTPONEBY_DROPDOWN_WEEK' => 'week',
'LBL_POSTPONEBY_DROPDOWN_WEEKS' => 'weeks',
'LBL_UPDATE_BUTTON_LABEL' => 'Update',
'LBL_CLOSE_SELECTED_BUTTON_LABEL' => 'Close Selected',
);
?>

View File

@@ -0,0 +1,162 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$mod_strings = array (
'appointment_filter_dom' => array(
'today' => 'today'
,'tomorrow' => 'tomorrow'
,'this Saturday' => 'this week'
,'next Saturday' => 'next week'
,'last this_month' => 'this month'
,'last next_month' => 'next month'
),
'LBL_UPCOMING' => 'Reminder',
'LBL_TODAY' => 'through ',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DATE' => 'Date',
'LBL_LIST_TIME' => 'Start Time',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_STATUS' => 'Status',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Reminders',
'LBL_MODULE_TITLE' => 'Reminders: Home',
'LBL_MODULE_ID' => 'Reminders',
'LBL_SEARCH_FORM_TITLE' => 'Reminders Search',
'LBL_LIST_FORM_TITLE' => 'Reminders List',
'LBL_NEW_FORM_TITLE' => 'New Reminders',
'LBL_ECMREMINDERS' => 'Reminders:',
'LBL_ECMREMINDERS_SUBJECT' => 'Reminders Subject:',
'LBL_SYSTEM_ID' => 'System ID',
// FOR LIST VIEW
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
'LBL_LIST_MY_ECMREMINDERS' => 'My Assigned Reminders',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_LIST_PARENT_ID' => 'Parent Id',
'LBL_LIST_PARENT_NAME' => 'Parent Name',
'LBL_LIST_DESCRIPTION' => 'Description',
'LBL_LIST_DATE_START' => 'Date Start',
// FOR NOTIFICATION POPUPS
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this Reminder?',
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Reminder?',
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this account?',
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the ecmreminder.',
// FOR DEFAULT FIELDS
'LBL_NAME' => 'Name:',
'LBL_SUBJECT' => 'Name:',
'LBL_CREATED_BY' => 'Created by:',
'LBL_CREATED' => 'Created by:',
'LBL_ASSIGNED_TO' => 'Assigned to:',
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
'LBL_DATE_ENTERED' => 'Date Created:',
'LBL_DATE_CREATED' => 'Create Date:',
'LBL_DATE_MODIFIED' => 'Last Modified',
'LBL_MODIFIED_BY' => 'Last Modified by:',
'LBL_MODIFIED' => 'Modified by:',
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
// FOR NEW FIELDS
'LBL_PARENT_ID' => 'Parent Id',
'LBL_PARENT_NAME' => 'Parent Name',
'LBL_DESCRIPTION' => 'Description',
'LBL_DATE_START' => 'Date Start',
// FOR GROUPS
'LBL_GROUP_MASTER' => 'ECMREMINDER INFORMATION',
'LBL_GROUP_PARENT_ID' => '',
'LBL_GROUP_PARENT_NAME' => '',
'LBL_GROUP_DESCRIPTION' => '',
'LBL_GROUP_DATE_START' => '',
// FOR SUBPANELS
'LBL_ECMREMINDERS_SUBPANEL_TITLE' => 'Reminders',
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
'LBL_HISTORY_SUBPANEL_TITLE' => 'History',
'LBL_ECMREMINDERS' => 'Reminders',
// FOR MENU LABELS
'LNK_NEW_ECMREMINDERS' => 'Create Reminder',
'LNK_LIST_ECMREMINDER' => 'Reminders List',
// FOR MENU LINKS
'LNK_NEW_ECMREMINDER' => 'Create Reminders',
'LNK_ECMREMINDERS_LIST' => 'Reminders',
'LNK_ECMREMINDERS_REPORTS' => 'Reminders Reports',
// FOR ADDITIONAL MENUS
// FOR DASHLETS
'LBL_LIST_ECMREMINDERS' => 'Reminders',
'LBL_REMINDER_LIST' => 'Remind List',
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_REMINDER_DATE' => 'Reminder Date',
'LBL_LIST_EVENT_DATE' => 'Event Date',
'LBL_LIST_STATUS' => 'Status',
'LBL_POSTPONE_BY' => 'Postpone By',
'LBL_POSTPONE_TO' => 'Postpone To',
'LBL_DATE' => 'Date',
'LBL_TIME' => 'Time',
'LBL_POSTPONEBY_DROPDOWN_MIN' => 'min',
'LBL_POSTPONEBY_DROPDOWN_HOUR' => 'hour.',
'LBL_POSTPONEBY_DROPDOWN_HOURS' => 'hours',
'LBL_POSTPONEBY_DROPDOWN_DAY' => 'day',
'LBL_POSTPONEBY_DROPDOWN_DAYS' => 'days',
'LBL_POSTPONEBY_DROPDOWN_WEEK' => 'week',
'LBL_POSTPONEBY_DROPDOWN_WEEKS' => 'weeks',
'LBL_UPDATE_BUTTON_LABEL' => 'Update',
'LBL_CLOSE_SELECTED_BUTTON_LABEL' => 'Close Selected',
);
?>

View File

@@ -0,0 +1,162 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$mod_strings = array (
'appointment_filter_dom' => array(
'today' => 'today'
,'tomorrow' => 'tomorrow'
,'this Saturday' => 'this week'
,'next Saturday' => 'next week'
,'last this_month' => 'this month'
,'last next_month' => 'next month'
),
'LBL_UPCOMING' => 'Reminder',
'LBL_TODAY' => 'through ',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_CONTACT' => 'Contact',
'LBL_LIST_RELATED_TO' => 'Related to',
'LBL_LIST_DATE' => 'Date',
'LBL_LIST_TIME' => 'Start Time',
'LBL_LIST_CLOSE' => 'Close',
'LBL_LIST_STATUS' => 'Status',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Reminders',
'LBL_MODULE_TITLE' => 'Przypominacz: Strona Główna',
'LBL_MODULE_ID' => 'Reminders',
'LBL_SEARCH_FORM_TITLE' => 'Reminders Search',
'LBL_LIST_FORM_TITLE' => 'Reminders List',
'LBL_NEW_FORM_TITLE' => 'New Reminders',
'LBL_ECMREMINDERS' => 'Reminders:',
'LBL_ECMREMINDERS_SUBJECT' => 'Reminders Subject:',
'LBL_SYSTEM_ID' => 'System ID',
// FOR LIST VIEW
'LBL_LIST_NAME' => 'Name',
'LBL_LIST_SUBJECT' => 'Subject',
'LBL_LIST_LAST_MODIFIED' => 'Last Modified',
'LBL_LIST_MY_ECMREMINDERS' => 'My Assigned Reminders',
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
'LBL_LIST_PARENT_ID' => 'Parent Id',
'LBL_LIST_PARENT_NAME' => 'Parent Name',
'LBL_LIST_DESCRIPTION' => 'Description',
'LBL_LIST_DATE_START' => 'Date Start',
// FOR NOTIFICATION POPUPS
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this Reminder?',
'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this contact from the Reminder?',
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this ecmreminder from this account?',
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the ecmreminder.',
// FOR DEFAULT FIELDS
'LBL_NAME' => 'Name:',
'LBL_SUBJECT' => 'Name:',
'LBL_CREATED_BY' => 'Created by:',
'LBL_CREATED' => 'Created by:',
'LBL_ASSIGNED_TO' => 'Assigned to:',
'LBL_ASSIGNED_USER_ID' => 'Assigned To:',
'LBL_DATE_ENTERED' => 'Date Created:',
'LBL_DATE_CREATED' => 'Create Date:',
'LBL_DATE_MODIFIED' => 'Last Modified',
'LBL_MODIFIED_BY' => 'Last Modified by:',
'LBL_MODIFIED' => 'Modified by:',
'LBL_DATE_LAST_MODIFIED' => 'Modify Date:',
// FOR NEW FIELDS
'LBL_PARENT_ID' => 'Parent Id',
'LBL_PARENT_NAME' => 'Parent Name',
'LBL_DESCRIPTION' => 'Description',
'LBL_DATE_START' => 'Date Start',
// FOR GROUPS
'LBL_GROUP_MASTER' => 'ECMREMINDER INFORMATION',
'LBL_GROUP_PARENT_ID' => '',
'LBL_GROUP_PARENT_NAME' => '',
'LBL_GROUP_DESCRIPTION' => '',
'LBL_GROUP_DATE_START' => '',
// FOR SUBPANELS
'LBL_ECMREMINDERS_SUBPANEL_TITLE' => 'Reminders',
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
'LBL_HISTORY_SUBPANEL_TITLE' => 'History',
'LBL_ECMREMINDERS' => 'Reminders',
// FOR MENU LABELS
'LNK_NEW_ECMREMINDERS' => 'Create Reminder',
'LNK_LIST_ECMREMINDER' => 'Reminders List',
// FOR MENU LINKS
'LNK_NEW_ECMREMINDER' => 'Create Reminders',
'LNK_ECMREMINDERS_LIST' => 'Reminders',
'LNK_ECMREMINDERS_REPORTS' => 'Reminders Reports',
// FOR ADDITIONAL MENUS
// FOR DASHLETS
'LBL_LIST_ECMREMINDERS' => 'Reminders',
'LBL_REMINDER_LIST' => 'Lista Przypomnień',
'LBL_LIST_NAME' => 'Nazwa',
'LBL_LIST_REMINDER_DATE' => 'Czas Przypomnienia',
'LBL_LIST_EVENT_DATE' => 'Czas Wydarzenia',
'LBL_LIST_STATUS' => 'Status',
'LBL_POSTPONE_BY' => 'Przypomnij za',
'LBL_POSTPONE_TO' => 'Przesuń na',
'LBL_DATE' => 'Data',
'LBL_TIME' => 'Czas',
'LBL_POSTPONEBY_DROPDOWN_MIN' => 'minut',
'LBL_POSTPONEBY_DROPDOWN_HOUR' => 'godzina',
'LBL_POSTPONEBY_DROPDOWN_HOURS' => 'godzin',
'LBL_POSTPONEBY_DROPDOWN_DAY' => 'dzień',
'LBL_POSTPONEBY_DROPDOWN_DAYS' => 'dni',
'LBL_POSTPONEBY_DROPDOWN_WEEK' => 'tydzień',
'LBL_POSTPONEBY_DROPDOWN_WEEKS' => 'tygodni',
'LBL_UPDATE_BUTTON_LABEL' => 'Aktualizuj',
'LBL_CLOSE_SELECTED_BUTTON_LABEL' => 'Zamknij Zaznaczone',
);
?>

View File

@@ -0,0 +1,57 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$smarty->debugging = true;
$smarty->debugging_ctrl=($_SERVER['SERVER_NAME']=='localhost:8080')?'URL':'NONE';
$layout_defs['EcmReminders'] = array(
//LIST OF WHAT SUBPANELS TO SHOW IN THE DETAILVIEW
'subpanel_setup' => array(
),
);
?>

View File

@@ -0,0 +1,59 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$searchFields['EcmReminders'] =
array (
'name' => array('query_type' => 'default'),
'current_user_only'=> array('query_type' => 'default',
'db_field' => array('assigned_user_id'),
'my_items' => true
),
'assigned_user_id' => array('query_type' => 'default'),
);
?>

View File

@@ -0,0 +1,79 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
require_once('include/utils.php');
function additionalDetailsEcmReminder($fields) {
static $mod_strings;
global $app_strings;
if(empty($mod_strings)) {
global $current_language;
$mod_strings = return_module_language($current_language, 'EcmReminders');
}
$overlib_string = '';
//BUILDER:START overlibstring
if(!empty($fields['DESCRIPTION'])){
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> <BR>' . substr($fields['DESCRIPTION'], 0, 300);
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
$overlib_string .= '<br>';
}
//BUILDER:END overlibstring
return array(
'fieldToAddTo' => 'NAME',
'string' => $overlib_string,
'editLink' => "index.php?action=EditView&module=EcmReminders&return_module=EcmReminders&record={$fields['ID']}",
'viewLink' => "index.php?action=DetailView&module=EcmReminders&return_module=EcmReminders&record={$fields['ID']}");
}
?>

View File

@@ -0,0 +1,88 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$listViewDefs['EcmReminders'] = array(
'NAME' => array(
'width' => '20',
'label' => 'LBL_NAME',
'default' => true,
'link' => true),
'PARENT_ID' => array(
'width' => '10',
'label' => 'LBL_PARENT_ID'),
'PARENT_NAME' => array(
'width' => '10',
'label' => 'LBL_PARENT_NAME'),
'DESCRIPTION' => array(
'width' => '10',
'label' => 'LBL_DESCRIPTION'),
'DATE_START' => array(
'width' => '10',
'label' => 'LBL_DATE_START'),
'DATE_MODIFIED' => array(
'width' => '5',
'label' => 'LBL_DATE_MODIFIED'),
'DATE_ENTERED' => array(
'width' => '5',
'label' => 'LBL_DATE_ENTERED'),
'CREATED_BY_NAME' => array(
'width' => '10',
'label' => 'LBL_CREATED'),
'ASSIGNED_USER_NAME' => array(
'width' => '2',
'label' => 'LBL_LIST_ASSIGNED_USER',
'default' => true),
'MODIFIED_USER_NAME' => array(
'width' => '2',
'label' => 'LBL_MODIFIED')
);
?>

View File

@@ -0,0 +1,60 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$popupMeta = array(
'moduleMain' => 'EcmReminder',
'varName' => 'ECMREMINDER',
'orderBy' => 'ecmreminders.name',
'whereClauses' => array(
'name' => 'ecmreminders.name',
),
'searchInputs' => array('name', 'name')
);
?>

View File

@@ -0,0 +1,76 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$GLOBALS['studioDefs']['EcmReminders'] = array(
'LBL_DETAILVIEW'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmReminders/DetailView.html',
'php_file' => 'modules/EcmReminders/DetailView.php',
'type' => 'DetailView',
),
'LBL_EDITVIEW'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmReminders/EditView.html',
'php_file' => 'modules/EcmReminders/EditView.php',
'type' => 'EditView',
),
'LBL_LISTVIEW'=>array(
'template' => 'listview',
'meta_file' => 'modules/EcmReminders/listviewdefs.php',
'type' => 'ListView',
),
'LBL_SEARCHFORM'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmReminders/SearchForm.html',
'php_file' => 'modules/EcmReminders/ListView.php',
'type' => 'SearchForm',
),
);

View File

@@ -0,0 +1,82 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$subpanel_layout = array(
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmReminders'),
),
'where' => '',
'list_fields' => array(
'name'=>array(
'vname' => 'LBL_LIST_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '50%',
),
'assigned_user_name' => array (
'name' => 'assigned_user_name',
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
),
'edit_button'=>array(
'widget_class' => 'SubPanelEditButton',
'module' => 'EcmReminders',
'width' => '4%',
),
'remove_button'=>array(
'widget_class' => 'SubPanelRemoveButton',
'module' => 'EcmReminders',
'width' => '5%',
),
),
);
?>

275
modules/EcmReminders/vardefs.php Executable file
View File

@@ -0,0 +1,275 @@
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
/*****************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
********************************************************************************/
$dictionary['EcmReminder'] = array(
'table' => 'ecmreminders',
'audited' => true,
'comment' => 'EcmReminders',
'duplicate_merge' => true,
'unified_search' => true,
'fields' => array (
//STANDARD FIELDS SECTION
'id' => array (
'name' => 'id',
'vname' => 'LBL_ID',
'type' => 'id',
'required' => true,
'reportable' => false,
'comment' => 'Unique identifier'
),
'name' => array (
'name' => 'name',
'vname' => 'LBL_NAME',
'type' => 'name',
'required' => true,
'dbType' => 'varchar',
'len' => 255,
'audited' => true,
'unified_search' => true,
'comment' => 'The short description of the record contents',
'massupdate' => true,
'merge_filter' => 'selected',
),
'date_entered' => array (
'name' => 'date_entered',
'vname' => 'LBL_DATE_ENTERED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record created'
),
'date_modified' => array (
'name' => 'date_modified',
'vname' => 'LBL_DATE_MODIFIED',
'type' => 'datetime',
'required' => true,
'comment' => 'Date record last modified'
),
'modified_user_id' => array (
'name' => 'modified_user_id',
'rname' => 'user_name',
'id_name' => 'modified_user_id',
'vname' => 'LBL_MODIFIED',
'type' => 'assigned_user_name',
'table' => 'modified_user_id_users',
'isnull' => 'false',
'dbType' => 'varchar',
'len' => 36,
'required' => true,
'reportable' => true,
'comment' => 'User who last modified record'
),
'assigned_user_id' => array (
'name' => 'assigned_user_id',
'rname' => 'user_name',
'id_name' => 'assigned_user_id',
'vname' => 'LBL_ASSIGNED_TO',
'type' => 'relate',
'table' => 'users',
'isnull' => 'false',
'dbType' => 'varchar',
'reportable' => true,
'len' => 36,
'audited' => true,
'comment' => 'User assigned to record',
'module' => 'Users',
'duplicate_merge' => 'disabled'
),
'assigned_user_name' => array (
'name' => 'assigned_user_name',
'vname' => 'LBL_ASSIGNED_TO',
'type' => 'varchar',
'reportable' => false,
'source' => 'nondb',
'table' => 'users',
'massupdate' => true,
'duplicate_merge' => 'disabled'
),
'created_by' => array (
'name' => 'created_by',
'rname' => 'user_name',
'id_name' => 'created_by',
'vname' => 'LBL_CREATED',
'type' => 'assigned_user_name',
'table' => 'created_by_users',
'isnull' => 'false',
'dbType' => 'varchar',
'len' => 36,
'comment' => 'User that created the record'
),
'created_by_link' => array (
'name' => 'created_by_link',
'type' => 'link',
'relationship' => 'ecmreminders_created_by',
'vname' => 'LBL_CREATED_BY_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
),
'modified_user_link' => array (
'name' => 'modified_user_link',
'type' => 'link',
'relationship' => 'ecmreminders_modified_user',
'vname' => 'LBL_MODIFIED_BY_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
),
'assigned_user_link' => array (
'name' => 'assigned_user_link',
'type' => 'link',
'relationship' => 'ecmreminders_assigned_user',
'vname' => 'LBL_ASSIGNED_TO_USER',
'link_type' => 'one',
'module' => 'Users',
'bean_name' => 'User',
'source' => 'non-db',
'duplicate_merge' => 'enabled',
'rname' => 'user_name',
'id_name' => 'assigned_user_id',
'table' => 'users',
),
'deleted' => array (
'name' => 'deleted',
'vname' => 'LBL_CREATED_BY',
'type' => 'bool',
'required' => true,
'reportable' => false,
'comment' => 'Record deletion indicator'
),
//NEW FIELDS SECTION
'parent_id' => array(
'type' => 'varchar',
'name' => 'parent_id',
'vname' => 'LBL_PARENT_ID',
'comment' => 'Parent Id',
'max_size' => '36',
'len' => '36',
),
'parent_name' => array(
'type' => 'varchar',
'name' => 'parent_name',
'vname' => 'LBL_PARENT_NAME',
'comment' => 'Parent Name',
'max_size' => '255',
'len' => '255',
),
'description' => array(
'type' => 'text',
'name' => 'description',
'vname' => 'LBL_DESCRIPTION',
'comment' => 'Description',
),
'date_start' => array(
'type' => 'datetime',
'name' => 'date_start',
'vname' => 'LBL_DATE_START',
'comment' => 'Date Start',
),
'role_id' => array(
'name' => 'role_id',
'type' => 'id',
'vname' => 'LBL_ROLE_ID',
),
'reminder_time' => array(
'type' => 'int',
'name' => 'reminder_time',
'vname' => 'LBL_REMINDER_TIME',
'comment' => 'Reminder Time',
'max_size' => '11',
'len' => '11',
),
'status' => array(
'type' => 'varchar',
'name' => 'status',
'vname' => 'LBL_STATUS',
),
//FOR SUBPANELS
),
//INDICES SECTION
'indices' => array (
array('name' =>'ecmremindersspk', 'type' =>'primary', 'fields'=>array('id')),
array('name' =>'idx_ecmreminders_name', 'type' =>'index', 'fields'=>array('name'))
)
//RELATIONSHIPS SECTION
, 'relationships' => array (
'ecmreminders_assigned_user' => array(
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'EcmReminders', 'rhs_table'=> 'ecmreminders', 'rhs_key' => 'assigned_user_id',
'relationship_type'=>'one-to-many')
,'ecmreminders_modified_user' => array(
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'EcmReminders', 'rhs_table'=> 'ecmreminders', 'rhs_key' => 'modified_user_id',
'relationship_type'=>'one-to-many')
,'ecmreminders_created_by' => array(
'lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
'rhs_module'=> 'EcmReminders', 'rhs_table'=> 'ecmreminders', 'rhs_key' => 'created_by',
'relationship_type'=>'one-to-many')
),
//THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
'optimistic_locking'=>true,
);
?>