@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -94,8 +96,11 @@ discard block |
||
94 | 96 | $form->assign('MODULE_NAME', $currentModule); |
95 | 97 | $form->assign('NAME', $name); |
96 | 98 | $form->assign('DOCUMENT_NAME', $document_name); |
97 | -if(isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
98 | -else $form->assign('DOCUMENT_TARGET', ''); |
|
99 | +if(isset($_REQUEST['target'])) { |
|
100 | + $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
101 | +} else { |
|
102 | + $form->assign('DOCUMENT_TARGET', ''); |
|
103 | +} |
|
99 | 104 | |
100 | 105 | $form->assign('DOCUMENT_REVISION_ID', $document_revision_id); |
101 | 106 |
@@ -49,25 +49,25 @@ discard block |
||
49 | 49 | |
50 | 50 | class DocumentPopupPicker extends Popup_Picker { |
51 | 51 | |
52 | - public function __construct() |
|
53 | - { |
|
54 | - } |
|
55 | - |
|
56 | - public function _get_where_clause() { |
|
57 | - $where = ''; |
|
58 | - if(isset($_REQUEST['query'])) |
|
59 | - { |
|
60 | - $where_clauses = array(); |
|
61 | - append_where_clause($where_clauses, "document_name", "documents.document_name"); |
|
62 | - append_where_clause($where_clauses, "category_id", "documents.category_id"); |
|
63 | - append_where_clause($where_clauses, "subcategory_id", "documents.subcategory_id"); |
|
64 | - append_where_clause($where_clauses, "template_type", "documents.template_type"); |
|
65 | - append_where_clause($where_clauses, "is_template", "documents.is_template"); |
|
66 | - |
|
67 | - $where = generate_where_statement($where_clauses); |
|
68 | - } |
|
69 | - return $where; |
|
70 | - } |
|
52 | + public function __construct() |
|
53 | + { |
|
54 | + } |
|
55 | + |
|
56 | + public function _get_where_clause() { |
|
57 | + $where = ''; |
|
58 | + if(isset($_REQUEST['query'])) |
|
59 | + { |
|
60 | + $where_clauses = array(); |
|
61 | + append_where_clause($where_clauses, "document_name", "documents.document_name"); |
|
62 | + append_where_clause($where_clauses, "category_id", "documents.category_id"); |
|
63 | + append_where_clause($where_clauses, "subcategory_id", "documents.subcategory_id"); |
|
64 | + append_where_clause($where_clauses, "template_type", "documents.template_type"); |
|
65 | + append_where_clause($where_clauses, "is_template", "documents.is_template"); |
|
66 | + |
|
67 | + $where = generate_where_statement($where_clauses); |
|
68 | + } |
|
69 | + return $where; |
|
70 | + } |
|
71 | 71 | |
72 | 72 | } |
73 | 73 | |
@@ -101,14 +101,14 @@ discard block |
||
101 | 101 | $button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
102 | 102 | if(!$hide_clear_button) |
103 | 103 | { |
104 | - $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
|
105 | - .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
|
106 | - .$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n"; |
|
104 | + $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
|
105 | + .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
|
106 | + .$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n"; |
|
107 | 107 | } |
108 | 108 | $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" |
109 | - .$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='" |
|
110 | - .$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' " |
|
111 | - .$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n"; |
|
109 | + .$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='" |
|
110 | + .$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' " |
|
111 | + .$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n"; |
|
112 | 112 | $button .= "</form>\n"; |
113 | 113 | |
114 | 114 |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | |
56 | 56 | public function _get_where_clause() { |
57 | 57 | $where = ''; |
58 | - if(isset($_REQUEST['query'])) |
|
58 | + if (isset($_REQUEST['query'])) |
|
59 | 59 | { |
60 | 60 | $where_clauses = array(); |
61 | 61 | append_where_clause($where_clauses, "document_name", "documents.document_name"); |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | |
99 | 99 | |
100 | 100 | $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true; |
101 | -$button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
|
102 | -if(!$hide_clear_button) |
|
101 | +$button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
|
102 | +if (!$hide_clear_button) |
|
103 | 103 | { |
104 | 104 | $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
105 | 105 | .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | $form->assign('MODULE_NAME', $currentModule); |
120 | 120 | $form->assign('NAME', $name); |
121 | 121 | $form->assign('DOCUMENT_NAME', $document_name); |
122 | -if(isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
122 | +if (isset($_REQUEST['target'])) $form->assign('DOCUMENT_TARGET', $_REQUEST['target']); |
|
123 | 123 | else $form->assign('DOCUMENT_TARGET', ''); |
124 | 124 | |
125 | 125 | $form->assign('DOCUMENT_REVISION_ID', $document_revision_id); |
@@ -38,10 +38,10 @@ discard block |
||
38 | 38 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
39 | 39 | ********************************************************************************/ |
40 | 40 | |
41 | - //Request object must have these property values: |
|
42 | - // Module: module name, this module should have a file called TreeData.php |
|
43 | - // Function: name of the function to be called in TreeData.php, the function will be called statically. |
|
44 | - // PARAM prefixed properties: array of these property/values will be passed to the function as parameter. |
|
41 | + //Request object must have these property values: |
|
42 | + // Module: module name, this module should have a file called TreeData.php |
|
43 | + // Function: name of the function to be called in TreeData.php, the function will be called statically. |
|
44 | + // PARAM prefixed properties: array of these property/values will be passed to the function as parameter. |
|
45 | 45 | |
46 | 46 | |
47 | 47 | require_once('include/JSON.php'); |
@@ -56,27 +56,27 @@ discard block |
||
56 | 56 | $ret = array(); |
57 | 57 | |
58 | 58 | foreach($_FILES as $k => $file) { |
59 | - if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
60 | - $upload_file = new UploadFile($k); |
|
61 | - // check the file |
|
62 | - if($upload_file->confirm_upload()) { |
|
63 | - $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name |
|
64 | - $guid = create_guid(); |
|
65 | - if($upload_file->final_move($guid)) { // move to uploads |
|
66 | - $path = $upload_file->get_upload_path($guid); |
|
67 | - // if file is OK, copy to cache |
|
68 | - if(verify_uploaded_image($path) && copy($path, $dest)) { |
|
69 | - $ret[] = $dest; |
|
70 | - } |
|
71 | - // remove temp file |
|
72 | - unlink($path); |
|
73 | - } |
|
74 | - } |
|
75 | - } |
|
59 | + if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
60 | + $upload_file = new UploadFile($k); |
|
61 | + // check the file |
|
62 | + if($upload_file->confirm_upload()) { |
|
63 | + $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name |
|
64 | + $guid = create_guid(); |
|
65 | + if($upload_file->final_move($guid)) { // move to uploads |
|
66 | + $path = $upload_file->get_upload_path($guid); |
|
67 | + // if file is OK, copy to cache |
|
68 | + if(verify_uploaded_image($path) && copy($path, $dest)) { |
|
69 | + $ret[] = $dest; |
|
70 | + } |
|
71 | + // remove temp file |
|
72 | + unlink($path); |
|
73 | + } |
|
74 | + } |
|
75 | + } |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | if (!empty($ret)) { |
79 | - $json = getJSONobj(); |
|
80 | - echo $json->encode($ret); |
|
81 | - //return the parameters |
|
79 | + $json = getJSONobj(); |
|
80 | + echo $json->encode($ret); |
|
81 | + //return the parameters |
|
82 | 82 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -55,17 +55,17 @@ discard block |
||
55 | 55 | |
56 | 56 | $ret = array(); |
57 | 57 | |
58 | -foreach($_FILES as $k => $file) { |
|
59 | - if(in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
58 | +foreach ($_FILES as $k => $file) { |
|
59 | + if (in_array(strtolower($_FILES[$k]['type']), $imgType) && $_FILES[$k]['size'] > 0) { |
|
60 | 60 | $upload_file = new UploadFile($k); |
61 | 61 | // check the file |
62 | - if($upload_file->confirm_upload()) { |
|
62 | + if ($upload_file->confirm_upload()) { |
|
63 | 63 | $dest = $cachedir.basename($upload_file->get_stored_file_name()); // target name |
64 | 64 | $guid = create_guid(); |
65 | - if($upload_file->final_move($guid)) { // move to uploads |
|
65 | + if ($upload_file->final_move($guid)) { // move to uploads |
|
66 | 66 | $path = $upload_file->get_upload_path($guid); |
67 | 67 | // if file is OK, copy to cache |
68 | - if(verify_uploaded_image($path) && copy($path, $dest)) { |
|
68 | + if (verify_uploaded_image($path) && copy($path, $dest)) { |
|
69 | 69 | $ret[] = $dest; |
70 | 70 | } |
71 | 71 | // remove temp file |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -47,8 +49,9 @@ discard block |
||
47 | 49 | require_once('include/JSON.php'); |
48 | 50 | require_once('include/upload_file.php'); |
49 | 51 | |
50 | -if (!is_dir($cachedir = sugar_cached('images/'))) |
|
52 | +if (!is_dir($cachedir = sugar_cached('images/'))) { |
|
51 | 53 | mkdir_recursive($cachedir); |
54 | +} |
|
52 | 55 | |
53 | 56 | // cn: bug 11012 - fixed some MIME types not getting picked up. Also changed array iterator. |
54 | 57 | $imgType = array('image/gif', 'image/png', 'image/x-png', 'image/bmp', 'image/jpeg', 'image/jpg', 'image/pjpeg'); |
@@ -74,9 +74,9 @@ discard block |
||
74 | 74 | $GLOBALS['log']->info("EmailTemplate detail view"); |
75 | 75 | |
76 | 76 | if ($has_campaign || $inboundEmail) { |
77 | - $xtpl = new XTemplate ('modules/EmailTemplates/EditView.html'); |
|
77 | + $xtpl = new XTemplate('modules/EmailTemplates/EditView.html'); |
|
78 | 78 | } else { |
79 | - $xtpl = new XTemplate ('modules/EmailTemplates/EditViewMain.html'); |
|
79 | + $xtpl = new XTemplate('modules/EmailTemplates/EditViewMain.html'); |
|
80 | 80 | } // else |
81 | 81 | $xtpl->assign("MOD", $mod_strings); |
82 | 82 | $xtpl->assign("APP", $app_strings); |
@@ -128,13 +128,13 @@ discard block |
||
128 | 128 | require_once('include/QuickSearchDefaults.php'); |
129 | 129 | $qsd = QuickSearchDefaults::getQuickSearchDefaults(); |
130 | 130 | $sqs_objects = array('EditView_assigned_user_name' => $qsd->getQSUser()); |
131 | -$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '; enableQS();</script>'; |
|
131 | +$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = '.$json->encode($sqs_objects).'; enableQS();</script>'; |
|
132 | 132 | |
133 | 133 | $xtpl->assign("CANCEL_SCRIPT", $cancel_script); |
134 | -$xtpl->assign("PRINT_URL", "index.php?" . $GLOBALS['request_string']); |
|
135 | -$xtpl->assign("JAVASCRIPT", get_set_focus_js() . $quicksearch_js); |
|
134 | +$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']); |
|
135 | +$xtpl->assign("JAVASCRIPT", get_set_focus_js().$quicksearch_js); |
|
136 | 136 | |
137 | -if (!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) { |
|
137 | +if (!is_file(sugar_cached('jsLanguage/').$GLOBALS['current_language'].'.js')) { |
|
138 | 138 | require_once('include/language/jsLanguage.php'); |
139 | 139 | jsLanguage::createAppStringsCache($GLOBALS['current_language']); |
140 | 140 | } |
@@ -183,18 +183,18 @@ discard block |
||
183 | 183 | $record = $_REQUEST['record']; |
184 | 184 | } |
185 | 185 | |
186 | - $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=" . $_REQUEST['action'] . "&from_module=" . $_REQUEST['module'] . "&record=" . $record . "'>" . SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT']) . "</a>"); |
|
186 | + $xtpl->assign("ADMIN_EDIT", "<a href='index.php?action=index&module=DynamicLayout&from_action=".$_REQUEST['action']."&from_module=".$_REQUEST['module']."&record=".$record."'>".SugarThemeRegistry::current()->getImage("EditLayout", "border='0' align='bottom'", null, null, '.gif', $mod_strings['LBL_EDIT_LAYOUT'])."</a>"); |
|
187 | 187 | |
188 | 188 | } |
189 | 189 | if (isset($focus->parent_type) && $focus->parent_type != "") { |
190 | - $change_parent_button = "<input title='" . $app_strings['LBL_SELECT_BUTTON_TITLE'] . "' |
|
191 | -tabindex='3' type='button' class='button' value='" . $app_strings['LBL_SELECT_BUTTON_LABEL'] . "' name='button' LANGUAGE=javascript onclick='return |
|
190 | + $change_parent_button = "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']."' |
|
191 | +tabindex='3' type='button' class='button' value='" . $app_strings['LBL_SELECT_BUTTON_LABEL']."' name='button' LANGUAGE=javascript onclick='return |
|
192 | 192 | window.open(\"index.php?module=\"+ document.EditView.parent_type.value + |
193 | 193 | \"&action=Popup&html=Popup_picker&form=TasksEditView\",\"test\",\"width=600,height=400,resizable=1,scrollbars=1\");'>"; |
194 | 194 | $xtpl->assign("CHANGE_PARENT_BUTTON", $change_parent_button); |
195 | 195 | } |
196 | 196 | if ($focus->parent_type == "Account") { |
197 | - $xtpl->assign("DEFAULT_SEARCH", "&query=true&account_id=$focus->parent_id&account_name=" . urlencode($focus->parent_name)); |
|
197 | + $xtpl->assign("DEFAULT_SEARCH", "&query=true&account_id=$focus->parent_id&account_name=".urlencode($focus->parent_name)); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | $xtpl->assign("DESCRIPTION", $focus->description); |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | // If it's campaign then hide the Account. |
252 | 252 | if ($has_campaign) { |
253 | 253 | $dropdown = "<option value='Contacts'> |
254 | - " . $lblContactAndOthers . " |
|
254 | + " . $lblContactAndOthers." |
|
255 | 255 | </option>"; |
256 | 256 | $xtpl->assign("DROPDOWN", $dropdown); |
257 | 257 | $xtpl->assign("DEFAULT_MODULE", 'Contacts'); |
@@ -285,13 +285,13 @@ discard block |
||
285 | 285 | if (empty($the_note->filename)) { |
286 | 286 | continue; |
287 | 287 | } |
288 | - $secureLink = 'index.php?entryPoint=download&id=' . $the_note->id . '&type=Notes'; |
|
289 | - $attachments .= '<input type="checkbox" name="remove_attachment[]" value="' . $the_note->id . '"> ' . $app_strings['LNK_REMOVE'] . ' '; |
|
290 | - $attachments .= '<a href="' . $secureLink . '" target="_blank">' . $the_note->filename . '</a><br>'; |
|
288 | + $secureLink = 'index.php?entryPoint=download&id='.$the_note->id.'&type=Notes'; |
|
289 | + $attachments .= '<input type="checkbox" name="remove_attachment[]" value="'.$the_note->id.'"> '.$app_strings['LNK_REMOVE'].' '; |
|
290 | + $attachments .= '<a href="'.$secureLink.'" target="_blank">'.$the_note->filename.'</a><br>'; |
|
291 | 291 | } |
292 | 292 | } |
293 | 293 | $attJs = '<script type="text/javascript">'; |
294 | - $attJs .= 'var lnk_remove = "' . $app_strings['LNK_REMOVE'] . '";'; |
|
294 | + $attJs .= 'var lnk_remove = "'.$app_strings['LNK_REMOVE'].'";'; |
|
295 | 295 | $attJs .= '</script>'; |
296 | 296 | $xtpl->assign('ATTACHMENTS', $attachments); |
297 | 297 | $xtpl->assign('ATTACHMENTS_JAVASCRIPT', $attJs); |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | |
4 | 6 | require_once('modules/Campaigns/utils.php'); |
5 | 7 | |
@@ -26,7 +28,9 @@ discard block |
||
26 | 28 | |
27 | 29 | |
28 | 30 | //setting default flag value so due date and time not required |
29 | -if (!isset($focus->id)) $focus->date_due_flag = 1; |
|
31 | +if (!isset($focus->id)) { |
|
32 | + $focus->date_due_flag = 1; |
|
33 | +} |
|
30 | 34 | |
31 | 35 | //needed when creating a new case with default values passed in |
32 | 36 | if (isset($_REQUEST['contact_name']) && is_null($focus->contact_name)) { |
@@ -85,12 +89,16 @@ discard block |
||
85 | 89 | $xtpl->parse("main.variable_option"); |
86 | 90 | |
87 | 91 | $returnAction = 'index'; |
88 | -if (isset($_REQUEST['return_module'])) $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
92 | +if (isset($_REQUEST['return_module'])) { |
|
93 | + $xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
94 | +} |
|
89 | 95 | if (isset($_REQUEST['return_action'])) { |
90 | 96 | $xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']); |
91 | 97 | $returnAction = $_REQUEST['return_action']; |
92 | 98 | } |
93 | -if (isset($_REQUEST['return_id'])) $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); |
|
99 | +if (isset($_REQUEST['return_id'])) { |
|
100 | + $xtpl->assign("RETURN_ID", $_REQUEST['return_id']); |
|
101 | +} |
|
94 | 102 | // handle Create $module then Cancel |
95 | 103 | if (empty($_REQUEST['return_id'])) { |
96 | 104 | $xtpl->assign("RETURN_ACTION", 'index'); |
@@ -119,8 +127,9 @@ discard block |
||
119 | 127 | ); |
120 | 128 | $json = getJSONobj(); |
121 | 129 | $xtpl->assign('encoded_assigned_users_popup_request_data', $json->encode($popup_request_data)); |
122 | -if (!empty($focus->assigned_user_name)) |
|
130 | +if (!empty($focus->assigned_user_name)) { |
|
123 | 131 | $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); |
132 | +} |
|
124 | 133 | |
125 | 134 | $xtpl->assign("assign_user_select", SugarThemeRegistry::current()->getImage('id-ff-select', '', null, null, '.png', $mod_strings['LBL_SELECT'])); |
126 | 135 | $xtpl->assign("assign_user_clear", SugarThemeRegistry::current()->getImage('id-ff-clear', '', null, null, '.gif', $mod_strings['LBL_ID_FF_CLEAR'])); |
@@ -142,24 +151,39 @@ discard block |
||
142 | 151 | $xtpl->assign("JSLANG", $jsLang); |
143 | 152 | |
144 | 153 | $xtpl->assign("ID", $focus->id); |
145 | -if (isset($focus->name)) $xtpl->assign("NAME", $focus->name); else $xtpl->assign("NAME", ""); |
|
154 | +if (isset($focus->name)) { |
|
155 | + $xtpl->assign("NAME", $focus->name); |
|
156 | +} else { |
|
157 | + $xtpl->assign("NAME", ""); |
|
158 | +} |
|
146 | 159 | |
147 | 160 | //Bug45632 |
148 | 161 | /* BEGIN - SECURITY GROUPS */ |
149 | 162 | /** |
150 | 163 | * if(isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); else $xtpl->assign("ASSIGNED_USER_ID", ""); |
151 | 164 | */ |
152 | -if (isset($focus->assigned_user_id)) $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); |
|
153 | -else if (empty($focus->id) && empty($focus->assigned_user_id)) { |
|
165 | +if (isset($focus->assigned_user_id)) { |
|
166 | + $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id); |
|
167 | +} else if (empty($focus->id) && empty($focus->assigned_user_id)) { |
|
154 | 168 | global $current_user; |
155 | 169 | $xtpl->assign("ASSIGNED_USER_ID", $current_user->id); |
156 | 170 | $xtpl->assign("ASSIGNED_USER_NAME", get_assigned_user_name($current_user->id)); |
157 | -} else $xtpl->assign("ASSIGNED_USER_ID", ""); |
|
171 | +} else { |
|
172 | + $xtpl->assign("ASSIGNED_USER_ID", ""); |
|
173 | +} |
|
158 | 174 | /* END - SECURITY GROUPS */ |
159 | 175 | //Bug45632 |
160 | 176 | |
161 | -if (isset($focus->description)) $xtpl->assign("DESCRIPTION", $focus->description); else $xtpl->assign("DESCRIPTION", ""); |
|
162 | -if (isset($focus->subject)) $xtpl->assign("SUBJECT", $focus->subject); else $xtpl->assign("SUBJECT", ""); |
|
177 | +if (isset($focus->description)) { |
|
178 | + $xtpl->assign("DESCRIPTION", $focus->description); |
|
179 | +} else { |
|
180 | + $xtpl->assign("DESCRIPTION", ""); |
|
181 | +} |
|
182 | +if (isset($focus->subject)) { |
|
183 | + $xtpl->assign("SUBJECT", $focus->subject); |
|
184 | +} else { |
|
185 | + $xtpl->assign("SUBJECT", ""); |
|
186 | +} |
|
163 | 187 | if ($focus->published == 'on') { |
164 | 188 | $xtpl->assign("PUBLISHED", "CHECKED"); |
165 | 189 | } |
@@ -201,8 +225,16 @@ discard block |
||
201 | 225 | $xtpl->assign("TYPE_OPTIONS", get_select_options_with_id($app_list_strings['record_type_display'], $focus->parent_type)); |
202 | 226 | //$xtpl->assign("DEFAULT_MODULE","Accounts"); |
203 | 227 | |
204 | -if (isset($focus->body)) $xtpl->assign("BODY", $focus->body); else $xtpl->assign("BODY", ""); |
|
205 | -if (isset($focus->body_html)) $xtpl->assign("BODY_HTML", $focus->body_html); else $xtpl->assign("BODY_HTML", ""); |
|
228 | +if (isset($focus->body)) { |
|
229 | + $xtpl->assign("BODY", $focus->body); |
|
230 | +} else { |
|
231 | + $xtpl->assign("BODY", ""); |
|
232 | +} |
|
233 | +if (isset($focus->body_html)) { |
|
234 | + $xtpl->assign("BODY_HTML", $focus->body_html); |
|
235 | +} else { |
|
236 | + $xtpl->assign("BODY_HTML", ""); |
|
237 | +} |
|
206 | 238 | |
207 | 239 | |
208 | 240 | if (true) { |
@@ -50,38 +50,38 @@ |
||
50 | 50 | |
51 | 51 | $focus = new EmailTemplate(); |
52 | 52 | if($_REQUEST['from'] == 'DetailView') { |
53 | - if(!isset($_REQUEST['record'])) |
|
54 | - sugar_die("A record number must be specified to delete the template."); |
|
55 | - $focus->retrieve($_REQUEST['record']); |
|
56 | - if(check_email_template_in_use($focus)) { |
|
57 | - echo 'true'; |
|
58 | - return; |
|
59 | - } |
|
60 | - echo 'false'; |
|
53 | + if(!isset($_REQUEST['record'])) |
|
54 | + sugar_die("A record number must be specified to delete the template."); |
|
55 | + $focus->retrieve($_REQUEST['record']); |
|
56 | + if(check_email_template_in_use($focus)) { |
|
57 | + echo 'true'; |
|
58 | + return; |
|
59 | + } |
|
60 | + echo 'false'; |
|
61 | 61 | } else if($_REQUEST['from'] == 'ListView') { |
62 | - $returnString = ''; |
|
63 | - $idArray = explode(',', $_REQUEST['records']); |
|
64 | - foreach($idArray as $key => $value) { |
|
65 | - if($focus->retrieve($value)) { |
|
66 | - if(check_email_template_in_use($focus)) { |
|
67 | - $returnString .= $focus->name . ','; |
|
68 | - } |
|
69 | - } |
|
70 | - } |
|
71 | - $returnString = substr($returnString, 0, -1); |
|
72 | - echo $returnString; |
|
62 | + $returnString = ''; |
|
63 | + $idArray = explode(',', $_REQUEST['records']); |
|
64 | + foreach($idArray as $key => $value) { |
|
65 | + if($focus->retrieve($value)) { |
|
66 | + if(check_email_template_in_use($focus)) { |
|
67 | + $returnString .= $focus->name . ','; |
|
68 | + } |
|
69 | + } |
|
70 | + } |
|
71 | + $returnString = substr($returnString, 0, -1); |
|
72 | + echo $returnString; |
|
73 | 73 | } else { |
74 | - echo ''; |
|
74 | + echo ''; |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | function check_email_template_in_use($focus) |
78 | 78 | { |
79 | - if($focus->is_used_by_email_marketing()) { |
|
80 | - return true; |
|
81 | - } |
|
82 | - $system = $GLOBALS['sugar_config']['passwordsetting']; |
|
83 | - if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
84 | - return true; |
|
85 | - } |
|
79 | + if($focus->is_used_by_email_marketing()) { |
|
80 | + return true; |
|
81 | + } |
|
82 | + $system = $GLOBALS['sugar_config']['passwordsetting']; |
|
83 | + if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
84 | + return true; |
|
85 | + } |
|
86 | 86 | return false; |
87 | 87 | } |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -49,22 +49,22 @@ discard block |
||
49 | 49 | require_once('modules/EmailTemplates/EmailTemplate.php'); |
50 | 50 | |
51 | 51 | $focus = new EmailTemplate(); |
52 | -if($_REQUEST['from'] == 'DetailView') { |
|
53 | - if(!isset($_REQUEST['record'])) |
|
52 | +if ($_REQUEST['from'] == 'DetailView') { |
|
53 | + if (!isset($_REQUEST['record'])) |
|
54 | 54 | sugar_die("A record number must be specified to delete the template."); |
55 | 55 | $focus->retrieve($_REQUEST['record']); |
56 | - if(check_email_template_in_use($focus)) { |
|
56 | + if (check_email_template_in_use($focus)) { |
|
57 | 57 | echo 'true'; |
58 | 58 | return; |
59 | 59 | } |
60 | 60 | echo 'false'; |
61 | -} else if($_REQUEST['from'] == 'ListView') { |
|
61 | +} else if ($_REQUEST['from'] == 'ListView') { |
|
62 | 62 | $returnString = ''; |
63 | 63 | $idArray = explode(',', $_REQUEST['records']); |
64 | - foreach($idArray as $key => $value) { |
|
65 | - if($focus->retrieve($value)) { |
|
66 | - if(check_email_template_in_use($focus)) { |
|
67 | - $returnString .= $focus->name . ','; |
|
64 | + foreach ($idArray as $key => $value) { |
|
65 | + if ($focus->retrieve($value)) { |
|
66 | + if (check_email_template_in_use($focus)) { |
|
67 | + $returnString .= $focus->name.','; |
|
68 | 68 | } |
69 | 69 | } |
70 | 70 | } |
@@ -76,11 +76,11 @@ discard block |
||
76 | 76 | |
77 | 77 | function check_email_template_in_use($focus) |
78 | 78 | { |
79 | - if($focus->is_used_by_email_marketing()) { |
|
79 | + if ($focus->is_used_by_email_marketing()) { |
|
80 | 80 | return true; |
81 | 81 | } |
82 | 82 | $system = $GLOBALS['sugar_config']['passwordsetting']; |
83 | - if($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
83 | + if ($focus->id == $system['generatepasswordtmpl'] || $focus->id == $system['lostpasswordtmpl']) { |
|
84 | 84 | return true; |
85 | 85 | } |
86 | 86 | return false; |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -50,8 +52,9 @@ discard block |
||
50 | 52 | |
51 | 53 | $focus = new EmailTemplate(); |
52 | 54 | if($_REQUEST['from'] == 'DetailView') { |
53 | - if(!isset($_REQUEST['record'])) |
|
54 | - sugar_die("A record number must be specified to delete the template."); |
|
55 | + if(!isset($_REQUEST['record'])) { |
|
56 | + sugar_die("A record number must be specified to delete the template."); |
|
57 | + } |
|
55 | 58 | $focus->retrieve($_REQUEST['record']); |
56 | 59 | if(check_email_template_in_use($focus)) { |
57 | 60 | echo 'true'; |
@@ -46,8 +46,8 @@ discard block |
||
46 | 46 | require_once($beanFiles[$beanList[$key]]); |
47 | 47 | $focus = new $beanList[$key]; |
48 | 48 | $loopControl[$key][$key] = $focus; |
49 | - $prefixes[$key] = strtolower($focus->object_name) . '_'; |
|
50 | - if ($focus->object_name == 'Case') $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
49 | + $prefixes[$key] = strtolower($focus->object_name).'_'; |
|
50 | + if ($focus->object_name == 'Case') $prefixes[$key] = 'a'.strtolower($focus->object_name).'_'; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
@@ -125,16 +125,16 @@ discard block |
||
125 | 125 | if (isset($beanList[$key]) && isset($beanFiles[$beanList[$key]]) && !str_begin($key, 'AOW_') && !str_begin($key, 'zr2_')) { |
126 | 126 | |
127 | 127 | if ($key == 'Contacts') { |
128 | - $dropdown .= "<option value='" . $key . "'> |
|
129 | - " . $lblContactAndOthers . " |
|
128 | + $dropdown .= "<option value='".$key."'> |
|
129 | + " . $lblContactAndOthers." |
|
130 | 130 | </option>"; |
131 | 131 | } else if (isset($app_list_strings['moduleListSingular'][$key])) { |
132 | - $dropdown .= "<option value='" . $key . "'> |
|
133 | - " . $app_list_strings['moduleListSingular'][$key] . " |
|
132 | + $dropdown .= "<option value='".$key."'> |
|
133 | + " . $app_list_strings['moduleListSingular'][$key]." |
|
134 | 134 | </option>"; |
135 | 135 | } else { |
136 | - $dropdown .= "<option value='" . $key . "'> |
|
137 | - " . $app_list_strings['moduleList'][$key] . " |
|
136 | + $dropdown .= "<option value='".$key."'> |
|
137 | + " . $app_list_strings['moduleList'][$key]." |
|
138 | 138 | </option>"; |
139 | 139 | } |
140 | 140 | } |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | |
4 | 6 | |
5 | 7 | function generateFieldDefsJS2() |
@@ -47,7 +49,9 @@ discard block |
||
47 | 49 | $focus = new $beanList[$key]; |
48 | 50 | $loopControl[$key][$key] = $focus; |
49 | 51 | $prefixes[$key] = strtolower($focus->object_name) . '_'; |
50 | - if ($focus->object_name == 'Case') $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
52 | + if ($focus->object_name == 'Case') { |
|
53 | + $prefixes[$key] = 'a' . strtolower($focus->object_name) . '_'; |
|
54 | + } |
|
51 | 55 | } |
52 | 56 | } |
53 | 57 | |
@@ -94,8 +98,9 @@ discard block |
||
94 | 98 | break; |
95 | 99 | } |
96 | 100 | } |
97 | - if ($dup) |
|
98 | - $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
101 | + if ($dup) { |
|
102 | + $collection[$collectionKey][] = array("name" => $optionKey, "value" => $optionLabel); |
|
103 | + } |
|
99 | 104 | } |
100 | 105 | } |
101 | 106 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | */ |
8 | 8 | |
9 | 9 | |
10 | -if( |
|
10 | +if ( |
|
11 | 11 | (isset($_SESSION['screen_height']) ? $_SESSION['screen_height'] : null) != (isset($_POST['height']) ? $_POST['height'] : null) || |
12 | 12 | (isset($_SESSION['screen_width']) ? $_SESSION['screen_width'] : null) != (isset($_POST['width']) ? $_POST['width'] : null)) { |
13 | 13 | $_SESSION['screen_height'] = $_POST['height']; |
@@ -1,29 +1,29 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
3 | 3 | |
4 | - global $db; |
|
4 | + global $db; |
|
5 | 5 | |
6 | - $even_id = $_GET['event']; |
|
7 | - $delegate_id = $_GET['delegate']; |
|
8 | - $type = $_GET['type']; |
|
9 | - $response = $_GET['response']; |
|
6 | + $even_id = $_GET['event']; |
|
7 | + $delegate_id = $_GET['delegate']; |
|
8 | + $type = $_GET['type']; |
|
9 | + $response = $_GET['response']; |
|
10 | 10 | |
11 | - //get event |
|
11 | + //get event |
|
12 | 12 | $event = new FP_events(); |
13 | 13 | $event->retrieve($even_id); |
14 | 14 | |
15 | 15 | if($type == 'c'){ |
16 | 16 | |
17 | - $event->load_relationship('fp_events_contacts'); // get related contacts |
|
17 | + $event->load_relationship('fp_events_contacts'); // get related contacts |
|
18 | 18 | |
19 | - if($response == 'accept'){ |
|
19 | + if($response == 'accept'){ |
|
20 | 20 | |
21 | 21 | //check to see if they have already responded to the email |
22 | 22 | $check_q = 'SELECT email_responded FROM fp_events_contacts_c WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'"'; |
23 | - $check = $db->getOne($check_q); |
|
24 | - //update contact to accepted |
|
25 | - $query = 'UPDATE fp_events_contacts_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
26 | - if($db->query($query) && $check != '1'){ |
|
23 | + $check = $db->getOne($check_q); |
|
24 | + //update contact to accepted |
|
25 | + $query = 'UPDATE fp_events_contacts_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
26 | + if($db->query($query) && $check != '1'){ |
|
27 | 27 | |
28 | 28 | if(!IsNullOrEmptyString($event->accept_redirect)){ |
29 | 29 | |
@@ -33,17 +33,17 @@ discard block |
||
33 | 33 | else{ |
34 | 34 | echo 'Thank you for accepting'; |
35 | 35 | } |
36 | - } |
|
37 | - else { |
|
38 | - echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
|
39 | - } |
|
40 | - } |
|
41 | - else if($response == 'decline'){ |
|
42 | - //check to see if they have already responded to the email |
|
36 | + } |
|
37 | + else { |
|
38 | + echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
|
39 | + } |
|
40 | + } |
|
41 | + else if($response == 'decline'){ |
|
42 | + //check to see if they have already responded to the email |
|
43 | 43 | $check_q = 'SELECT email_responded FROM fp_events_contacts_c WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'"'; |
44 | - $check = $db->getOne($check_q); |
|
44 | + $check = $db->getOne($check_q); |
|
45 | 45 | //update contact to accepted |
46 | - $query = 'UPDATE fp_events_contacts_c SET accept_status="Declined", email_responded="1" WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
46 | + $query = 'UPDATE fp_events_contacts_c SET accept_status="Declined", email_responded="1" WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
47 | 47 | |
48 | 48 | if($db->query($query) && $check != '1'){ |
49 | 49 | |
@@ -56,24 +56,24 @@ discard block |
||
56 | 56 | else{ |
57 | 57 | echo 'Thank you for declining'; |
58 | 58 | } |
59 | - } |
|
60 | - else { |
|
61 | - echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
|
62 | - } |
|
63 | - } |
|
59 | + } |
|
60 | + else { |
|
61 | + echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
|
62 | + } |
|
63 | + } |
|
64 | 64 | } |
65 | 65 | if($type == 't'){ |
66 | 66 | |
67 | - $event->load_relationship('fp_events_prospects_1'); //get related targets |
|
67 | + $event->load_relationship('fp_events_prospects_1'); //get related targets |
|
68 | 68 | |
69 | - if($response == 'accept'){ |
|
69 | + if($response == 'accept'){ |
|
70 | 70 | //check to see if they have already responded to the email |
71 | 71 | $check_q = 'SELECT email_responded FROM fp_events_prospects_1_c WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'"'; |
72 | - $check = $db->getOne($check_q); |
|
72 | + $check = $db->getOne($check_q); |
|
73 | 73 | |
74 | - //update contact to accepted |
|
75 | - $query = 'UPDATE fp_events_prospects_1_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
76 | - if($db->query($query) && $check != '1'){ |
|
74 | + //update contact to accepted |
|
75 | + $query = 'UPDATE fp_events_prospects_1_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
76 | + if($db->query($query) && $check != '1'){ |
|
77 | 77 | |
78 | 78 | if(!IsNullOrEmptyString($event->accept_redirect)){ |
79 | 79 | |
@@ -87,14 +87,14 @@ discard block |
||
87 | 87 | else { |
88 | 88 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
89 | 89 | } |
90 | - } |
|
91 | - else if($response == 'decline'){ |
|
90 | + } |
|
91 | + else if($response == 'decline'){ |
|
92 | 92 | //check to see if they have already responded to the email |
93 | 93 | $check_q = 'SELECT email_responded FROM fp_events_prospects_1_c WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'"'; |
94 | - $check = $db->getOne($check_q); |
|
95 | - //update contact to accepted |
|
96 | - $query = 'UPDATE fp_events_prospects_1_c SET accept_status="Declined", email_responded="1" WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
97 | - if($db->query($query) && $check != '1'){ |
|
94 | + $check = $db->getOne($check_q); |
|
95 | + //update contact to accepted |
|
96 | + $query = 'UPDATE fp_events_prospects_1_c SET accept_status="Declined", email_responded="1" WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
97 | + if($db->query($query) && $check != '1'){ |
|
98 | 98 | |
99 | 99 | if(!IsNullOrEmptyString($event->decline_redirect)){ |
100 | 100 | |
@@ -109,19 +109,19 @@ discard block |
||
109 | 109 | else { |
110 | 110 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
111 | 111 | } |
112 | - } |
|
112 | + } |
|
113 | 113 | } |
114 | 114 | if($type == 'l'){ |
115 | 115 | |
116 | - $event->load_relationship('fp_events_leads_1'); //get related leads |
|
116 | + $event->load_relationship('fp_events_leads_1'); //get related leads |
|
117 | 117 | |
118 | - if($response == 'accept'){ |
|
118 | + if($response == 'accept'){ |
|
119 | 119 | //check to see if they have already responded to the email |
120 | 120 | $check_q = 'SELECT email_responded FROM fp_events_leads_1_c WHERE ffp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'"'; |
121 | - $check = $db->getOne($check_q); |
|
122 | - //update contact to accepted |
|
123 | - $query = 'UPDATE fp_events_leads_1_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
124 | - if($db->query($query) && $check != '1'){ |
|
121 | + $check = $db->getOne($check_q); |
|
122 | + //update contact to accepted |
|
123 | + $query = 'UPDATE fp_events_leads_1_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
124 | + if($db->query($query) && $check != '1'){ |
|
125 | 125 | |
126 | 126 | if(!IsNullOrEmptyString($event->accept_redirect)){ |
127 | 127 | |
@@ -135,15 +135,15 @@ discard block |
||
135 | 135 | else { |
136 | 136 | echo 'There was a problem with the link please contact the sender of the invite'; |
137 | 137 | } |
138 | - } |
|
139 | - else if($response == 'decline'){ |
|
140 | - //check to see if they have already responded to the email |
|
138 | + } |
|
139 | + else if($response == 'decline'){ |
|
140 | + //check to see if they have already responded to the email |
|
141 | 141 | $check_q = 'SELECT email_responded FROM fp_events_leads_1_c WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'"'; |
142 | - $check = $db->getOne($check_q); |
|
142 | + $check = $db->getOne($check_q); |
|
143 | 143 | //update contact to accepted |
144 | - $query = 'UPDATE fp_events_leads_1_c SET accept_status="Declined", email_responded="1" WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
144 | + $query = 'UPDATE fp_events_leads_1_c SET accept_status="Declined", email_responded="1" WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'" AND email_responded="0"'; |
|
145 | 145 | |
146 | - if($db->query($query) && $check != '1'){ |
|
146 | + if($db->query($query) && $check != '1'){ |
|
147 | 147 | |
148 | 148 | if(!IsNullOrEmptyString($event->decline_redirect)){ |
149 | 149 | |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | else { |
159 | 159 | echo 'There was a problem with the link please contact the sender of the invite'; |
160 | 160 | } |
161 | - } |
|
161 | + } |
|
162 | 162 | } |
163 | 163 | // Function for basic field validation (present and neither empty nor only white space nor just 'http://') |
164 | 164 | function IsNullOrEmptyString($question){ |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | |
4 | 4 | global $db; |
5 | 5 | |
@@ -12,25 +12,25 @@ discard block |
||
12 | 12 | $event = new FP_events(); |
13 | 13 | $event->retrieve($even_id); |
14 | 14 | |
15 | - if($type == 'c'){ |
|
15 | + if ($type == 'c') { |
|
16 | 16 | |
17 | 17 | $event->load_relationship('fp_events_contacts'); // get related contacts |
18 | 18 | |
19 | - if($response == 'accept'){ |
|
19 | + if ($response == 'accept') { |
|
20 | 20 | |
21 | 21 | //check to see if they have already responded to the email |
22 | 22 | $check_q = 'SELECT email_responded FROM fp_events_contacts_c WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'"'; |
23 | 23 | $check = $db->getOne($check_q); |
24 | 24 | //update contact to accepted |
25 | 25 | $query = 'UPDATE fp_events_contacts_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'" AND email_responded="0"'; |
26 | - if($db->query($query) && $check != '1'){ |
|
26 | + if ($db->query($query) && $check != '1') { |
|
27 | 27 | |
28 | - if(!IsNullOrEmptyString($event->accept_redirect)){ |
|
28 | + if (!IsNullOrEmptyString($event->accept_redirect)) { |
|
29 | 29 | |
30 | 30 | $url = $event->accept_redirect; |
31 | - header('Location: ' . $url); |
|
31 | + header('Location: '.$url); |
|
32 | 32 | } |
33 | - else{ |
|
33 | + else { |
|
34 | 34 | echo 'Thank you for accepting'; |
35 | 35 | } |
36 | 36 | } |
@@ -38,22 +38,22 @@ discard block |
||
38 | 38 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
39 | 39 | } |
40 | 40 | } |
41 | - else if($response == 'decline'){ |
|
41 | + else if ($response == 'decline') { |
|
42 | 42 | //check to see if they have already responded to the email |
43 | 43 | $check_q = 'SELECT email_responded FROM fp_events_contacts_c WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'"'; |
44 | 44 | $check = $db->getOne($check_q); |
45 | 45 | //update contact to accepted |
46 | 46 | $query = 'UPDATE fp_events_contacts_c SET accept_status="Declined", email_responded="1" WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'" AND email_responded="0"'; |
47 | 47 | |
48 | - if($db->query($query) && $check != '1'){ |
|
48 | + if ($db->query($query) && $check != '1') { |
|
49 | 49 | |
50 | - if(!IsNullOrEmptyString($event->decline_redirect)){ |
|
50 | + if (!IsNullOrEmptyString($event->decline_redirect)) { |
|
51 | 51 | |
52 | 52 | $url = $event->decline_redirect; |
53 | - header('Location: ' . $url); |
|
53 | + header('Location: '.$url); |
|
54 | 54 | |
55 | 55 | } |
56 | - else{ |
|
56 | + else { |
|
57 | 57 | echo 'Thank you for declining'; |
58 | 58 | } |
59 | 59 | } |
@@ -62,25 +62,25 @@ discard block |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | } |
65 | - if($type == 't'){ |
|
65 | + if ($type == 't') { |
|
66 | 66 | |
67 | 67 | $event->load_relationship('fp_events_prospects_1'); //get related targets |
68 | 68 | |
69 | - if($response == 'accept'){ |
|
69 | + if ($response == 'accept') { |
|
70 | 70 | //check to see if they have already responded to the email |
71 | 71 | $check_q = 'SELECT email_responded FROM fp_events_prospects_1_c WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'"'; |
72 | 72 | $check = $db->getOne($check_q); |
73 | 73 | |
74 | 74 | //update contact to accepted |
75 | 75 | $query = 'UPDATE fp_events_prospects_1_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'" AND email_responded="0"'; |
76 | - if($db->query($query) && $check != '1'){ |
|
76 | + if ($db->query($query) && $check != '1') { |
|
77 | 77 | |
78 | - if(!IsNullOrEmptyString($event->accept_redirect)){ |
|
78 | + if (!IsNullOrEmptyString($event->accept_redirect)) { |
|
79 | 79 | |
80 | 80 | $url = $event->accept_redirect; |
81 | - header('Location: ' . $url); |
|
81 | + header('Location: '.$url); |
|
82 | 82 | } |
83 | - else{ |
|
83 | + else { |
|
84 | 84 | echo 'Thank you for accepting'; |
85 | 85 | } |
86 | 86 | } |
@@ -88,21 +88,21 @@ discard block |
||
88 | 88 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
89 | 89 | } |
90 | 90 | } |
91 | - else if($response == 'decline'){ |
|
91 | + else if ($response == 'decline') { |
|
92 | 92 | //check to see if they have already responded to the email |
93 | 93 | $check_q = 'SELECT email_responded FROM fp_events_prospects_1_c WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'"'; |
94 | 94 | $check = $db->getOne($check_q); |
95 | 95 | //update contact to accepted |
96 | 96 | $query = 'UPDATE fp_events_prospects_1_c SET accept_status="Declined", email_responded="1" WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'" AND email_responded="0"'; |
97 | - if($db->query($query) && $check != '1'){ |
|
97 | + if ($db->query($query) && $check != '1') { |
|
98 | 98 | |
99 | - if(!IsNullOrEmptyString($event->decline_redirect)){ |
|
99 | + if (!IsNullOrEmptyString($event->decline_redirect)) { |
|
100 | 100 | |
101 | 101 | $url = $event->decline_redirect; |
102 | - header('Location: ' . $url); |
|
102 | + header('Location: '.$url); |
|
103 | 103 | |
104 | 104 | } |
105 | - else{ |
|
105 | + else { |
|
106 | 106 | echo 'Thank you for declining'; |
107 | 107 | } |
108 | 108 | } |
@@ -111,24 +111,24 @@ discard block |
||
111 | 111 | } |
112 | 112 | } |
113 | 113 | } |
114 | - if($type == 'l'){ |
|
114 | + if ($type == 'l') { |
|
115 | 115 | |
116 | 116 | $event->load_relationship('fp_events_leads_1'); //get related leads |
117 | 117 | |
118 | - if($response == 'accept'){ |
|
118 | + if ($response == 'accept') { |
|
119 | 119 | //check to see if they have already responded to the email |
120 | 120 | $check_q = 'SELECT email_responded FROM fp_events_leads_1_c WHERE ffp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'"'; |
121 | 121 | $check = $db->getOne($check_q); |
122 | 122 | //update contact to accepted |
123 | 123 | $query = 'UPDATE fp_events_leads_1_c SET accept_status="Accepted", email_responded="1" WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'" AND email_responded="0"'; |
124 | - if($db->query($query) && $check != '1'){ |
|
124 | + if ($db->query($query) && $check != '1') { |
|
125 | 125 | |
126 | - if(!IsNullOrEmptyString($event->accept_redirect)){ |
|
126 | + if (!IsNullOrEmptyString($event->accept_redirect)) { |
|
127 | 127 | |
128 | 128 | $url = $event->accept_redirect; |
129 | - header('Location: ' . $url); |
|
129 | + header('Location: '.$url); |
|
130 | 130 | } |
131 | - else{ |
|
131 | + else { |
|
132 | 132 | echo 'Thank you for accepting'; |
133 | 133 | } |
134 | 134 | } |
@@ -136,22 +136,22 @@ discard block |
||
136 | 136 | echo 'There was a problem with the link please contact the sender of the invite'; |
137 | 137 | } |
138 | 138 | } |
139 | - else if($response == 'decline'){ |
|
139 | + else if ($response == 'decline') { |
|
140 | 140 | //check to see if they have already responded to the email |
141 | 141 | $check_q = 'SELECT email_responded FROM fp_events_leads_1_c WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'"'; |
142 | 142 | $check = $db->getOne($check_q); |
143 | 143 | //update contact to accepted |
144 | 144 | $query = 'UPDATE fp_events_leads_1_c SET accept_status="Declined", email_responded="1" WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'" AND email_responded="0"'; |
145 | 145 | |
146 | - if($db->query($query) && $check != '1'){ |
|
146 | + if ($db->query($query) && $check != '1') { |
|
147 | 147 | |
148 | - if(!IsNullOrEmptyString($event->decline_redirect)){ |
|
148 | + if (!IsNullOrEmptyString($event->decline_redirect)) { |
|
149 | 149 | |
150 | 150 | $url = $event->decline_redirect; |
151 | - header('Location: ' . $url); |
|
151 | + header('Location: '.$url); |
|
152 | 152 | |
153 | 153 | } |
154 | - else{ |
|
154 | + else { |
|
155 | 155 | echo 'Thank you for declining'; |
156 | 156 | } |
157 | 157 | } |
@@ -161,8 +161,8 @@ discard block |
||
161 | 161 | } |
162 | 162 | } |
163 | 163 | // Function for basic field validation (present and neither empty nor only white space nor just 'http://') |
164 | - function IsNullOrEmptyString($question){ |
|
165 | - return (!isset($question) || trim($question)==='' || $question =='http://'); |
|
164 | + function IsNullOrEmptyString($question) { |
|
165 | + return (!isset($question) || trim($question) === '' || $question == 'http://'); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | ?> |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | |
4 | 6 | global $db; |
5 | 7 | |
@@ -29,16 +31,13 @@ discard block |
||
29 | 31 | |
30 | 32 | $url = $event->accept_redirect; |
31 | 33 | header('Location: ' . $url); |
32 | - } |
|
33 | - else{ |
|
34 | + } else{ |
|
34 | 35 | echo 'Thank you for accepting'; |
35 | 36 | } |
36 | - } |
|
37 | - else { |
|
37 | + } else { |
|
38 | 38 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
39 | 39 | } |
40 | - } |
|
41 | - else if($response == 'decline'){ |
|
40 | + } else if($response == 'decline'){ |
|
42 | 41 | //check to see if they have already responded to the email |
43 | 42 | $check_q = 'SELECT email_responded FROM fp_events_contacts_c WHERE fp_events_contactsfp_events_ida="'.$event->id.'" AND fp_events_contactscontacts_idb="'.$delegate_id.'"'; |
44 | 43 | $check = $db->getOne($check_q); |
@@ -52,12 +51,10 @@ discard block |
||
52 | 51 | $url = $event->decline_redirect; |
53 | 52 | header('Location: ' . $url); |
54 | 53 | |
55 | - } |
|
56 | - else{ |
|
54 | + } else{ |
|
57 | 55 | echo 'Thank you for declining'; |
58 | 56 | } |
59 | - } |
|
60 | - else { |
|
57 | + } else { |
|
61 | 58 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
62 | 59 | } |
63 | 60 | } |
@@ -79,16 +76,13 @@ discard block |
||
79 | 76 | |
80 | 77 | $url = $event->accept_redirect; |
81 | 78 | header('Location: ' . $url); |
82 | - } |
|
83 | - else{ |
|
79 | + } else{ |
|
84 | 80 | echo 'Thank you for accepting'; |
85 | 81 | } |
86 | - } |
|
87 | - else { |
|
82 | + } else { |
|
88 | 83 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
89 | 84 | } |
90 | - } |
|
91 | - else if($response == 'decline'){ |
|
85 | + } else if($response == 'decline'){ |
|
92 | 86 | //check to see if they have already responded to the email |
93 | 87 | $check_q = 'SELECT email_responded FROM fp_events_prospects_1_c WHERE fp_events_prospects_1fp_events_ida="'.$event->id.'" AND fp_events_prospects_1prospects_idb="'.$delegate_id.'"'; |
94 | 88 | $check = $db->getOne($check_q); |
@@ -101,12 +95,10 @@ discard block |
||
101 | 95 | $url = $event->decline_redirect; |
102 | 96 | header('Location: ' . $url); |
103 | 97 | |
104 | - } |
|
105 | - else{ |
|
98 | + } else{ |
|
106 | 99 | echo 'Thank you for declining'; |
107 | 100 | } |
108 | - } |
|
109 | - else { |
|
101 | + } else { |
|
110 | 102 | echo 'You have already responded to the invitation or there was a problem with the link. Please contact the sender of the invite for help.'; |
111 | 103 | } |
112 | 104 | } |
@@ -127,16 +119,13 @@ discard block |
||
127 | 119 | |
128 | 120 | $url = $event->accept_redirect; |
129 | 121 | header('Location: ' . $url); |
130 | - } |
|
131 | - else{ |
|
122 | + } else{ |
|
132 | 123 | echo 'Thank you for accepting'; |
133 | 124 | } |
134 | - } |
|
135 | - else { |
|
125 | + } else { |
|
136 | 126 | echo 'There was a problem with the link please contact the sender of the invite'; |
137 | 127 | } |
138 | - } |
|
139 | - else if($response == 'decline'){ |
|
128 | + } else if($response == 'decline'){ |
|
140 | 129 | //check to see if they have already responded to the email |
141 | 130 | $check_q = 'SELECT email_responded FROM fp_events_leads_1_c WHERE fp_events_leads_1fp_events_ida="'.$event->id.'" AND fp_events_leads_1leads_idb="'.$delegate_id.'"'; |
142 | 131 | $check = $db->getOne($check_q); |
@@ -150,12 +139,10 @@ discard block |
||
150 | 139 | $url = $event->decline_redirect; |
151 | 140 | header('Location: ' . $url); |
152 | 141 | |
153 | - } |
|
154 | - else{ |
|
142 | + } else{ |
|
155 | 143 | echo 'Thank you for declining'; |
156 | 144 | } |
157 | - } |
|
158 | - else { |
|
145 | + } else { |
|
159 | 146 | echo 'There was a problem with the link please contact the sender of the invite'; |
160 | 147 | } |
161 | 148 | } |
@@ -70,7 +70,7 @@ |
||
70 | 70 | } |
71 | 71 | }else{ |
72 | 72 | if(isset($row['id']) || $meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){ |
73 | - SugarApplication::redirect($meetingBean->join_url); |
|
73 | + SugarApplication::redirect($meetingBean->join_url); |
|
74 | 74 | }else{ |
75 | 75 | //if the user is not invited or the owner of the meeting or an admin then they cannot join the meeting. |
76 | 76 | $tplFile = 'modules/Meetings/tpls/extMeetingNotInvited.tpl'; |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -47,40 +47,40 @@ discard block |
||
47 | 47 | |
48 | 48 | global $db, $current_user, $mod_strings, $app_strings, $app_list_strings; |
49 | 49 | |
50 | -$ret = $db->query("SELECT id FROM meetings_users WHERE meeting_id = '".$db->quote($_REQUEST['meeting_id'])."' AND user_id = '".$current_user->id."' AND deleted = 0",true); |
|
50 | +$ret = $db->query("SELECT id FROM meetings_users WHERE meeting_id = '".$db->quote($_REQUEST['meeting_id'])."' AND user_id = '".$current_user->id."' AND deleted = 0", true); |
|
51 | 51 | $row = $db->fetchByAssoc($ret); |
52 | 52 | |
53 | 53 | $meetingBean = loadBean('Meetings'); |
54 | 54 | $meetingBean->retrieve($_REQUEST['meeting_id']); |
55 | 55 | |
56 | -if ( $_REQUEST['host_meeting'] == '1' ) { |
|
57 | - if($meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){ |
|
56 | +if ($_REQUEST['host_meeting'] == '1') { |
|
57 | + if ($meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'], 'Meetings')) { |
|
58 | 58 | SugarApplication::redirect($meetingBean->host_url); |
59 | - }else{ |
|
59 | + } else { |
|
60 | 60 | //since they are now the owner of the meeting nor an Admin they cannot start the meeting. |
61 | 61 | $tplFile = 'modules/Meetings/tpls/extMeetingNoStart.tpl'; |
62 | - if ( file_exists('custom/'.$tplFile) ) { |
|
62 | + if (file_exists('custom/'.$tplFile)) { |
|
63 | 63 | $tplFile = 'custom/'.$tplFile; |
64 | 64 | } |
65 | 65 | |
66 | 66 | $ss = new Sugar_Smarty(); |
67 | - $ss->assign('current_user',$current_user); |
|
68 | - $ss->assign('bean',$meetingBean->toArray()); |
|
67 | + $ss->assign('current_user', $current_user); |
|
68 | + $ss->assign('bean', $meetingBean->toArray()); |
|
69 | 69 | $ss->display($tplFile); |
70 | 70 | } |
71 | -}else{ |
|
72 | - if(isset($row['id']) || $meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){ |
|
71 | +} else { |
|
72 | + if (isset($row['id']) || $meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'], 'Meetings')) { |
|
73 | 73 | SugarApplication::redirect($meetingBean->join_url); |
74 | - }else{ |
|
74 | + } else { |
|
75 | 75 | //if the user is not invited or the owner of the meeting or an admin then they cannot join the meeting. |
76 | 76 | $tplFile = 'modules/Meetings/tpls/extMeetingNotInvited.tpl'; |
77 | - if ( file_exists('custom/'.$tplFile) ) { |
|
77 | + if (file_exists('custom/'.$tplFile)) { |
|
78 | 78 | $tplFile = 'custom/'.$tplFile; |
79 | 79 | } |
80 | 80 | |
81 | 81 | $ss = new Sugar_Smarty(); |
82 | - $ss->assign('current_user',$current_user); |
|
83 | - $ss->assign('bean',$meetingBean->toArray()); |
|
82 | + $ss->assign('current_user', $current_user); |
|
83 | + $ss->assign('bean', $meetingBean->toArray()); |
|
84 | 84 | $ss->display($tplFile); |
85 | 85 | } |
86 | 86 | } |
87 | 87 | \ No newline at end of file |
@@ -1,5 +1,7 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -56,7 +58,7 @@ discard block |
||
56 | 58 | if ( $_REQUEST['host_meeting'] == '1' ) { |
57 | 59 | if($meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){ |
58 | 60 | SugarApplication::redirect($meetingBean->host_url); |
59 | - }else{ |
|
61 | + } else{ |
|
60 | 62 | //since they are now the owner of the meeting nor an Admin they cannot start the meeting. |
61 | 63 | $tplFile = 'modules/Meetings/tpls/extMeetingNoStart.tpl'; |
62 | 64 | if ( file_exists('custom/'.$tplFile) ) { |
@@ -68,10 +70,10 @@ discard block |
||
68 | 70 | $ss->assign('bean',$meetingBean->toArray()); |
69 | 71 | $ss->display($tplFile); |
70 | 72 | } |
71 | -}else{ |
|
73 | +} else{ |
|
72 | 74 | if(isset($row['id']) || $meetingBean->assigned_user_id == $GLOBALS['current_user']->id || is_admin($GLOBALS['current_user']) || is_admin_for_module($GLOBALS['current_user'],'Meetings')){ |
73 | 75 | SugarApplication::redirect($meetingBean->join_url); |
74 | - }else{ |
|
76 | + } else{ |
|
75 | 77 | //if the user is not invited or the owner of the meeting or an admin then they cannot join the meeting. |
76 | 78 | $tplFile = 'modules/Meetings/tpls/extMeetingNotInvited.tpl'; |
77 | 79 | if ( file_exists('custom/'.$tplFile) ) { |
@@ -47,75 +47,75 @@ discard block |
||
47 | 47 | ********************************************************************************/ |
48 | 48 | |
49 | 49 | $mod_strings = array ( |
50 | - 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the meeting.', |
|
50 | + 'ERR_DELETE_RECORD' => 'A record number must be specified to delete the meeting.', |
|
51 | 51 | |
52 | - 'LBL_ACCEPT_THIS'=>'Accept?', |
|
53 | - 'LBL_ADD_BUTTON'=> 'Add', |
|
54 | - 'LBL_ADD_INVITEE' => 'Add Invitees', |
|
55 | - 'LBL_COLON' => ':', |
|
56 | - 'LBL_CONTACT_NAME' => 'Contact:', |
|
57 | - 'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts', |
|
58 | - 'LBL_CREATED_BY'=>'Created by', |
|
59 | - 'LBL_DATE_END'=>'End Date', |
|
60 | - 'LBL_DATE_TIME' => 'Start Date & Time:', |
|
61 | - 'LBL_DATE' => 'Start Date:', |
|
62 | - 'LBL_DEFAULT_SUBPANEL_TITLE' => 'Meetings', |
|
63 | - 'LBL_DEL'=> 'Del', |
|
64 | - 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', |
|
65 | - 'LBL_DESCRIPTION' => 'Description:', |
|
52 | + 'LBL_ACCEPT_THIS'=>'Accept?', |
|
53 | + 'LBL_ADD_BUTTON'=> 'Add', |
|
54 | + 'LBL_ADD_INVITEE' => 'Add Invitees', |
|
55 | + 'LBL_COLON' => ':', |
|
56 | + 'LBL_CONTACT_NAME' => 'Contact:', |
|
57 | + 'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts', |
|
58 | + 'LBL_CREATED_BY'=>'Created by', |
|
59 | + 'LBL_DATE_END'=>'End Date', |
|
60 | + 'LBL_DATE_TIME' => 'Start Date & Time:', |
|
61 | + 'LBL_DATE' => 'Start Date:', |
|
62 | + 'LBL_DEFAULT_SUBPANEL_TITLE' => 'Meetings', |
|
63 | + 'LBL_DEL'=> 'Del', |
|
64 | + 'LBL_DESCRIPTION_INFORMATION' => 'Description Information', |
|
65 | + 'LBL_DESCRIPTION' => 'Description:', |
|
66 | 66 | 'LBL_DIRECTION' => 'Direction:', |
67 | - 'LBL_DURATION_HOURS' => 'Duration Hours:', |
|
68 | - 'LBL_DURATION_MINUTES' => 'Duration Minutes:', |
|
69 | - 'LBL_DURATION' => 'Duration:', |
|
70 | - 'LBL_EMAIL' => 'Email', |
|
71 | - 'LBL_FIRST_NAME' => 'First Name', |
|
72 | - 'LBL_HISTORY_SUBPANEL_TITLE' => 'Notes', |
|
73 | - 'LBL_HOURS_ABBREV' => 'h', |
|
74 | - 'LBL_HOURS_MINS' => '(hours/minutes)', |
|
75 | - 'LBL_INVITEE' => 'Invitees', |
|
76 | - 'LBL_LAST_NAME' => 'Last Name', |
|
77 | - 'LBL_ASSIGNED_TO_NAME'=>'Assigned to:', |
|
78 | - 'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User', |
|
79 | - 'LBL_LIST_CLOSE' => 'Close', |
|
80 | - 'LBL_LIST_CONTACT' => 'Contact', |
|
81 | - 'LBL_LIST_DATE_MODIFIED'=>'Date Modified', |
|
82 | - 'LBL_LIST_DATE' => 'Start Date', |
|
83 | - 'LBL_LIST_DIRECTION' => 'Direction', |
|
84 | - 'LBL_LIST_DUE_DATE'=>'Due Date', |
|
85 | - 'LBL_LIST_FORM_TITLE' => 'Meeting List', |
|
86 | - 'LBL_LIST_MY_MEETINGS' => 'My Meetings', |
|
87 | - 'LBL_LIST_RELATED_TO' => 'Related to', |
|
88 | - 'LBL_LIST_STATUS'=>'Status', |
|
89 | - 'LBL_LIST_SUBJECT' => 'Subject', |
|
90 | - 'LBL_LIST_TIME' => 'Start Time', |
|
91 | - 'LBL_LEADS_SUBPANEL_TITLE' => 'Leads', |
|
92 | - 'LBL_LOCATION' => 'Location:', |
|
93 | - 'LBL_MEETING' => 'Meeting:', |
|
94 | - 'LBL_MINSS_ABBREV' => 'm', |
|
95 | - 'LBL_MODIFIED_BY'=>'Modified by', |
|
96 | - 'LBL_MODULE_NAME' => 'Meetings', |
|
97 | - 'LBL_MODULE_TITLE' => 'Meetings: Home', |
|
98 | - 'LBL_NAME' => 'Name', |
|
99 | - 'LBL_NEW_FORM_TITLE' => 'Create Appointment', |
|
100 | - 'LBL_OUTLOOK_ID' => 'Outlook ID', |
|
101 | - 'LBL_SEQUENCE' => 'Meeting update sequence', |
|
102 | - 'LBL_PHONE' => 'Phone Office:', |
|
103 | - 'LBL_REMINDER_TIME'=>'Reminder Time', |
|
67 | + 'LBL_DURATION_HOURS' => 'Duration Hours:', |
|
68 | + 'LBL_DURATION_MINUTES' => 'Duration Minutes:', |
|
69 | + 'LBL_DURATION' => 'Duration:', |
|
70 | + 'LBL_EMAIL' => 'Email', |
|
71 | + 'LBL_FIRST_NAME' => 'First Name', |
|
72 | + 'LBL_HISTORY_SUBPANEL_TITLE' => 'Notes', |
|
73 | + 'LBL_HOURS_ABBREV' => 'h', |
|
74 | + 'LBL_HOURS_MINS' => '(hours/minutes)', |
|
75 | + 'LBL_INVITEE' => 'Invitees', |
|
76 | + 'LBL_LAST_NAME' => 'Last Name', |
|
77 | + 'LBL_ASSIGNED_TO_NAME'=>'Assigned to:', |
|
78 | + 'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User', |
|
79 | + 'LBL_LIST_CLOSE' => 'Close', |
|
80 | + 'LBL_LIST_CONTACT' => 'Contact', |
|
81 | + 'LBL_LIST_DATE_MODIFIED'=>'Date Modified', |
|
82 | + 'LBL_LIST_DATE' => 'Start Date', |
|
83 | + 'LBL_LIST_DIRECTION' => 'Direction', |
|
84 | + 'LBL_LIST_DUE_DATE'=>'Due Date', |
|
85 | + 'LBL_LIST_FORM_TITLE' => 'Meeting List', |
|
86 | + 'LBL_LIST_MY_MEETINGS' => 'My Meetings', |
|
87 | + 'LBL_LIST_RELATED_TO' => 'Related to', |
|
88 | + 'LBL_LIST_STATUS'=>'Status', |
|
89 | + 'LBL_LIST_SUBJECT' => 'Subject', |
|
90 | + 'LBL_LIST_TIME' => 'Start Time', |
|
91 | + 'LBL_LEADS_SUBPANEL_TITLE' => 'Leads', |
|
92 | + 'LBL_LOCATION' => 'Location:', |
|
93 | + 'LBL_MEETING' => 'Meeting:', |
|
94 | + 'LBL_MINSS_ABBREV' => 'm', |
|
95 | + 'LBL_MODIFIED_BY'=>'Modified by', |
|
96 | + 'LBL_MODULE_NAME' => 'Meetings', |
|
97 | + 'LBL_MODULE_TITLE' => 'Meetings: Home', |
|
98 | + 'LBL_NAME' => 'Name', |
|
99 | + 'LBL_NEW_FORM_TITLE' => 'Create Appointment', |
|
100 | + 'LBL_OUTLOOK_ID' => 'Outlook ID', |
|
101 | + 'LBL_SEQUENCE' => 'Meeting update sequence', |
|
102 | + 'LBL_PHONE' => 'Phone Office:', |
|
103 | + 'LBL_REMINDER_TIME'=>'Reminder Time', |
|
104 | 104 | 'LBL_EMAIL_REMINDER_SENT' => 'Email reminder sent', |
105 | - 'LBL_REMINDER' => 'Reminders:', |
|
106 | - 'LBL_REMINDER_POPUP' => 'Popup', |
|
107 | - 'LBL_REMINDER_EMAIL' => 'Email', |
|
105 | + 'LBL_REMINDER' => 'Reminders:', |
|
106 | + 'LBL_REMINDER_POPUP' => 'Popup', |
|
107 | + 'LBL_REMINDER_EMAIL' => 'Email', |
|
108 | 108 | 'LBL_REMINDER_EMAIL_ALL_INVITEES' => 'Email all invitees', |
109 | 109 | 'LBL_EMAIL_REMINDER' => 'Email Reminder', |
110 | 110 | 'LBL_EMAIL_REMINDER_TIME' => 'Email Reminder Time', |
111 | 111 | 'LBL_REMOVE' => 'rem', |
112 | - 'LBL_SCHEDULING_FORM_TITLE' => 'Scheduling', |
|
113 | - 'LBL_SEARCH_BUTTON'=> 'Search', |
|
114 | - 'LBL_SEARCH_FORM_TITLE' => 'Meeting Search', |
|
115 | - 'LBL_SEND_BUTTON_KEY'=>'I', |
|
116 | - 'LBL_SEND_BUTTON_LABEL'=>'Save & Send Invites', |
|
117 | - 'LBL_SEND_BUTTON_TITLE'=>'Save & Send Invites', |
|
118 | - 'LBL_STATUS' => 'Status:', |
|
112 | + 'LBL_SCHEDULING_FORM_TITLE' => 'Scheduling', |
|
113 | + 'LBL_SEARCH_BUTTON'=> 'Search', |
|
114 | + 'LBL_SEARCH_FORM_TITLE' => 'Meeting Search', |
|
115 | + 'LBL_SEND_BUTTON_KEY'=>'I', |
|
116 | + 'LBL_SEND_BUTTON_LABEL'=>'Save & Send Invites', |
|
117 | + 'LBL_SEND_BUTTON_TITLE'=>'Save & Send Invites', |
|
118 | + 'LBL_STATUS' => 'Status:', |
|
119 | 119 | 'LBL_TYPE' => 'Meeting Type', |
120 | 120 | 'LBL_PASSWORD' => 'Meeting Password', |
121 | 121 | 'LBL_URL' => 'Start/Join Meeting', |
@@ -123,25 +123,25 @@ discard block |
||
123 | 123 | 'LBL_DISPLAYED_URL' => 'Display URL', |
124 | 124 | 'LBL_CREATOR' => 'Meeting Creator', |
125 | 125 | 'LBL_EXTERNALID' => 'External App ID', |
126 | - 'LBL_SUBJECT' => 'Subject:', |
|
127 | - 'LBL_TIME' => 'Start Time:', |
|
128 | - 'LBL_USERS_SUBPANEL_TITLE' => 'Users', |
|
129 | - 'LBL_ACTIVITIES_REPORTS' => 'Activities Report', |
|
126 | + 'LBL_SUBJECT' => 'Subject:', |
|
127 | + 'LBL_TIME' => 'Start Time:', |
|
128 | + 'LBL_USERS_SUBPANEL_TITLE' => 'Users', |
|
129 | + 'LBL_ACTIVITIES_REPORTS' => 'Activities Report', |
|
130 | 130 | 'LBL_PARENT_TYPE' => 'Parent Type', |
131 | 131 | 'LBL_PARENT_ID' => 'Parent ID', |
132 | - 'LNK_MEETING_LIST'=>'View Meetings', |
|
133 | - 'LNK_NEW_APPOINTMENT' => 'Create Appointment', |
|
134 | - 'LNK_NEW_MEETING'=>'Schedule Meeting', |
|
135 | - 'LNK_IMPORT_MEETINGS' => 'Import Meetings', |
|
132 | + 'LNK_MEETING_LIST'=>'View Meetings', |
|
133 | + 'LNK_NEW_APPOINTMENT' => 'Create Appointment', |
|
134 | + 'LNK_NEW_MEETING'=>'Schedule Meeting', |
|
135 | + 'LNK_IMPORT_MEETINGS' => 'Import Meetings', |
|
136 | 136 | |
137 | - 'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this invitee from the meeting?', |
|
137 | + 'NTC_REMOVE_INVITEE' => 'Are you sure you want to remove this invitee from the meeting?', |
|
138 | 138 | 'LBL_CREATED_USER' => 'Created User', |
139 | 139 | 'LBL_MODIFIED_USER' => 'Modified User', |
140 | 140 | 'NOTICE_DURATION_TIME' => 'Duration time must be greater than 0', |
141 | 141 | 'LBL_MEETING_INFORMATION' => 'Overview', |
142 | - 'LBL_LIST_JOIN_MEETING' => 'Join Meeting', |
|
143 | - 'LBL_JOIN_EXT_MEETING' => 'Join Meeting', |
|
144 | - 'LBL_HOST_EXT_MEETING' => 'Start Meeting', |
|
142 | + 'LBL_LIST_JOIN_MEETING' => 'Join Meeting', |
|
143 | + 'LBL_JOIN_EXT_MEETING' => 'Join Meeting', |
|
144 | + 'LBL_HOST_EXT_MEETING' => 'Start Meeting', |
|
145 | 145 | 'LBL_ACCEPT_STATUS' => 'Accept Status', |
146 | 146 | 'LBL_ACCEPT_LINK' => 'Accept Link', |
147 | 147 | // You are not invited to the meeting messages |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | 'LBL_EXTNOSTART_HEADER' => 'Error: Cannot Start Meeting', |
155 | 155 | 'LBL_EXTNOSTART_MAIN' => 'You cannot start this meeting because you are not an Administrator or the owner of the meeting.', |
156 | 156 | |
157 | - //For export labels |
|
157 | + //For export labels |
|
158 | 158 | 'LBL_EXPORT_JOIN_URL' => 'Join Url', |
159 | 159 | 'LBL_EXPORT_HOST_URL' => 'Host Url', |
160 | 160 | 'LBL_EXPORT_DISPLAYED_URL' => 'Displayed Url', |
@@ -190,14 +190,14 @@ discard block |
||
190 | 190 | 'LBL_SYNCED_RECURRING_MSG' => 'This meeting originated in another system and was synced to SuiteCRM. To make changes, go to the original meeting within the other system. Changes made in the other system can be synced to this record.', |
191 | 191 | 'LBL_RELATED_TO' => 'Related to:', |
192 | 192 | |
193 | - // for reminders |
|
194 | - 'LBL_REMINDERS' => 'Reminders', |
|
195 | - 'LBL_REMINDERS_ACTIONS' => 'Actions:', |
|
196 | - 'LBL_REMINDERS_POPUP' => 'Popup', |
|
197 | - 'LBL_REMINDERS_EMAIL' => 'Email invitees', |
|
198 | - 'LBL_REMINDERS_WHEN' => 'When:', |
|
199 | - 'LBL_REMINDERS_REMOVE_REMINDER' => 'Remove reminder', |
|
200 | - 'LBL_REMINDERS_ADD_ALL_INVITEES' => 'Add All Invitees', |
|
201 | - 'LBL_REMINDERS_ADD_REMINDER' => 'Add reminder', |
|
193 | + // for reminders |
|
194 | + 'LBL_REMINDERS' => 'Reminders', |
|
195 | + 'LBL_REMINDERS_ACTIONS' => 'Actions:', |
|
196 | + 'LBL_REMINDERS_POPUP' => 'Popup', |
|
197 | + 'LBL_REMINDERS_EMAIL' => 'Email invitees', |
|
198 | + 'LBL_REMINDERS_WHEN' => 'When:', |
|
199 | + 'LBL_REMINDERS_REMOVE_REMINDER' => 'Remove reminder', |
|
200 | + 'LBL_REMINDERS_ADD_ALL_INVITEES' => 'Add All Invitees', |
|
201 | + 'LBL_REMINDERS_ADD_REMINDER' => 'Add reminder', |
|
202 | 202 | ); |
203 | 203 | ?> |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if (!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
3 | 3 | /********************************************************************************* |
4 | 4 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
39 | 39 | ********************************************************************************/ |
40 | 40 | |
41 | -$mod_strings = array ( |
|
41 | +$mod_strings = array( |
|
42 | 42 | 'LBL_MODULE_NAME' => 'Roles', |
43 | 43 | 'LBL_MODULE_TITLE' => 'Roles: Home', |
44 | 44 | 'LBL_ROLE'=>'Role', |
@@ -1,5 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | + die('Not A Valid Entry Point'); |
|
4 | +} |
|
3 | 5 | /********************************************************************************* |
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |