@@ -10,7 +10,9 @@ |
||
10 | 10 | require_once('../../../config_override.php'); |
11 | 11 | } |
12 | 12 | |
13 | -if(!isset($sugar_config['theme_settings']['Suite7'])) return; |
|
13 | +if(!isset($sugar_config['theme_settings']['Suite7'])) { |
|
14 | + return; |
|
15 | +} |
|
14 | 16 | |
15 | 17 | //set file type back to css from php |
16 | 18 | header("Content-type: text/css; charset: UTF-8"); |
@@ -1,6 +1,8 @@ |
||
1 | 1 | <?php |
2 | - if(!defined('sugarEntry'))define('sugarEntry', true); |
|
3 | -/********************************************************************************* |
|
2 | + if(!defined('sugarEntry')) { |
|
3 | + define('sugarEntry', true); |
|
4 | + } |
|
5 | + /********************************************************************************* |
|
4 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
5 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
6 | 8 |
@@ -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,7 @@ discard block |
||
94 | 96 | if(!empty($default_modules_sources[$module])){ |
95 | 97 | $merged = array_merge($modules_sources[$module], $default_modules_sources[$module]); |
96 | 98 | $default_modules_sources[$module] = $merged; |
97 | - } |
|
98 | - else{ |
|
99 | + } else{ |
|
99 | 100 | $default_modules_sources[$module] = $modules_sources[$module]; |
100 | 101 | } |
101 | 102 | } |
@@ -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. |
@@ -60,20 +62,20 @@ discard block |
||
60 | 62 | $baseQuery = 'select id,first_name, last_name, title, email1, email2 from prospects where deleted!=1 and ('; |
61 | 63 | if(!empty($_POST[$prefix.'first_name']) && !empty($_POST[$prefix.'last_name'])){ |
62 | 64 | $query = $baseQuery ." (first_name like '". $_POST[$prefix.'first_name'] . "%' and last_name = '". $_POST[$prefix.'last_name'] ."')"; |
63 | - }else{ |
|
65 | + } else{ |
|
64 | 66 | $query = $baseQuery ." last_name = '". $_POST[$prefix.'last_name'] ."'"; |
65 | 67 | } |
66 | 68 | if(!empty($_POST[$prefix.'email1'])){ |
67 | 69 | if(empty($query)){ |
68 | 70 | $query = $baseQuery. " email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'"; |
69 | - }else { |
|
71 | + } else { |
|
70 | 72 | $query .= "or email1='". $_POST[$prefix.'email1'] . "' or email2 = '". $_POST[$prefix.'email1'] ."'"; |
71 | 73 | } |
72 | 74 | } |
73 | 75 | if(!empty($_POST[$prefix.'email2'])){ |
74 | 76 | if(empty($query)) { |
75 | 77 | $query = $baseQuery. " email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'"; |
76 | - }else{ |
|
78 | + } else{ |
|
77 | 79 | $query .= "or email1='". $_POST[$prefix.'email2'] . "' or email2 = '". $_POST[$prefix.'email2'] ."'"; |
78 | 80 | } |
79 | 81 | |
@@ -87,7 +89,9 @@ discard block |
||
87 | 89 | while($row = $db->fetchByAssoc($result)) { |
88 | 90 | $rows[] = $row; |
89 | 91 | } |
90 | - if(count($rows) > 0) return $rows; |
|
92 | + if(count($rows) > 0) { |
|
93 | + return $rows; |
|
94 | + } |
|
91 | 95 | } |
92 | 96 | return null; |
93 | 97 | } |
@@ -98,15 +102,16 @@ discard block |
||
98 | 102 | if(!empty($mod)){ |
99 | 103 | global $current_language; |
100 | 104 | $mod_strings = return_module_language($current_language, $mod); |
101 | - }else global $mod_strings; |
|
105 | + } else { |
|
106 | + global $mod_strings; |
|
107 | + } |
|
102 | 108 | global $app_strings; |
103 | 109 | $cols = sizeof($rows[0]) * 2 + 1; |
104 | 110 | if ($action != 'ShowDuplicates') |
105 | 111 | { |
106 | 112 | $form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>'; |
107 | 113 | $form .= "<form action='index.php' method='post' name='dupProspects'><input type='hidden' name='selectedProspect' value=''>"; |
108 | - } |
|
109 | - else |
|
114 | + } else |
|
110 | 115 | { |
111 | 116 | $form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>'; |
112 | 117 | } |
@@ -132,8 +137,9 @@ discard block |
||
132 | 137 | foreach($rows as $row){ |
133 | 138 | |
134 | 139 | $form .= "<tr class='$rowColor'>"; |
135 | - if ($action != 'ShowDuplicates') |
|
136 | - $form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='${row['id']}';document.dupProspects.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n"; |
|
140 | + if ($action != 'ShowDuplicates') { |
|
141 | + $form .= "<td width='1%' nowrap='nowrap' ><a href='#' onClick=\"document.dupProspects.selectedProspect.value='${row['id']}';document.dupProspects.submit() \">[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n"; |
|
142 | + } |
|
137 | 143 | |
138 | 144 | $wasSet = false; |
139 | 145 | |
@@ -142,8 +148,7 @@ discard block |
||
142 | 148 | if(!$wasSet) { |
143 | 149 | $form .= "<td scope='row' ><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n"; |
144 | 150 | $wasSet = true; |
145 | - } |
|
146 | - else { |
|
151 | + } else { |
|
147 | 152 | $form .= "<td><a target='_blank' href='index.php?module=Prospects&action=DetailView&record=${row['id']}'>$value</a></td>\n"; |
148 | 153 | } |
149 | 154 | } |
@@ -151,7 +156,7 @@ discard block |
||
151 | 156 | |
152 | 157 | if($rowColor == 'evenListRowS1'){ |
153 | 158 | $rowColor = 'oddListRowS1'; |
154 | - }else{ |
|
159 | + } else{ |
|
155 | 160 | $rowColor = 'evenListRowS1'; |
156 | 161 | } |
157 | 162 | $form .= "</tr>"; |
@@ -374,7 +379,9 @@ discard block |
||
374 | 379 | if(!empty($mod)){ |
375 | 380 | global $current_language; |
376 | 381 | $mod_strings = return_module_language($current_language, $mod); |
377 | -}else global $mod_strings; |
|
382 | +} else { |
|
383 | + global $mod_strings; |
|
384 | +} |
|
378 | 385 | global $app_strings; |
379 | 386 | |
380 | 387 | $lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE']; |
@@ -423,10 +430,16 @@ discard block |
||
423 | 430 | if(!$focus->ACLAccess('Save')){ |
424 | 431 | return null; |
425 | 432 | } |
426 | - if (!isset($GLOBALS['check_notify'])) $GLOBALS['check_notify']=false; |
|
433 | + if (!isset($GLOBALS['check_notify'])) { |
|
434 | + $GLOBALS['check_notify']=false; |
|
435 | + } |
|
427 | 436 | |
428 | - if (!isset($_POST[$prefix.'email_opt_out'])) $focus->email_opt_out = 0; |
|
429 | - if (!isset($_POST[$prefix.'do_not_call'])) $focus->do_not_call = 0; |
|
437 | + if (!isset($_POST[$prefix.'email_opt_out'])) { |
|
438 | + $focus->email_opt_out = 0; |
|
439 | + } |
|
440 | + if (!isset($_POST[$prefix.'do_not_call'])) { |
|
441 | + $focus->do_not_call = 0; |
|
442 | + } |
|
430 | 443 | |
431 | 444 | if (empty($_POST['record']) && empty($_POST['dup_checked'])) { |
432 | 445 | /* |
@@ -482,15 +495,29 @@ discard block |
||
482 | 495 | $GLOBALS['log']->debug("Saved record with id of ".$return_id); |
483 | 496 | if(isset($_POST['popup']) && $_POST['popup'] == 'true') { |
484 | 497 | $get = '&module='; |
485 | - if(!empty($_POST['return_module'])) $get .= $_POST['return_module']; |
|
486 | - else $get .= 'Prospects'; |
|
498 | + if(!empty($_POST['return_module'])) { |
|
499 | + $get .= $_POST['return_module']; |
|
500 | + } else { |
|
501 | + $get .= 'Prospects'; |
|
502 | + } |
|
487 | 503 | $get .= '&action='; |
488 | - if(!empty($_POST['return_action'])) $get .= $_POST['return_action']; |
|
489 | - else $get .= 'Popup'; |
|
490 | - if(!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id']; |
|
491 | - if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup']; |
|
492 | - if(!empty($_POST['create'])) $get .= '&create='.$_POST['create']; |
|
493 | - if(!empty($_POST['to_pdf'])) $get .= '&to_pdf='.$_POST['to_pdf']; |
|
504 | + if(!empty($_POST['return_action'])) { |
|
505 | + $get .= $_POST['return_action']; |
|
506 | + } else { |
|
507 | + $get .= 'Popup'; |
|
508 | + } |
|
509 | + if(!empty($_POST['return_id'])) { |
|
510 | + $get .= '&return_id='.$_POST['return_id']; |
|
511 | + } |
|
512 | + if(!empty($_POST['popup'])) { |
|
513 | + $get .= '&popup='.$_POST['popup']; |
|
514 | + } |
|
515 | + if(!empty($_POST['create'])) { |
|
516 | + $get .= '&create='.$_POST['create']; |
|
517 | + } |
|
518 | + if(!empty($_POST['to_pdf'])) { |
|
519 | + $get .= '&to_pdf='.$_POST['to_pdf']; |
|
520 | + } |
|
494 | 521 | $get .= '&first_name=' . $focus->first_name; |
495 | 522 | $get .= '&last_name=' . $focus->last_name; |
496 | 523 | $get .= '&query=true'; |
@@ -500,7 +527,7 @@ discard block |
||
500 | 527 | if($redirect){ |
501 | 528 | require_once('include/formbase.php'); |
502 | 529 | handleRedirect($return_id, 'Prospects'); |
503 | - }else{ |
|
530 | + } else{ |
|
504 | 531 | return $focus; |
505 | 532 | } |
506 | 533 | } |
@@ -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. |
@@ -48,42 +50,70 @@ discard block |
||
48 | 50 | |
49 | 51 | $overlib_string = ''; |
50 | 52 | |
51 | - if(!empty($fields['ACCOUNT_NAME'])) $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>'; |
|
53 | + if(!empty($fields['ACCOUNT_NAME'])) { |
|
54 | + $overlib_string .= '<b>'. $mod_strings['LBL_EDIT_ACCOUNT_NAME'] . '</b> ' . $fields['ACCOUNT_NAME'] . '<br>'; |
|
55 | + } |
|
52 | 56 | if(!empty($fields['PRIMARY_ADDRESS_STREET']) || !empty($fields['PRIMARY_ADDRESS_CITY']) || |
53 | 57 | !empty($fields['PRIMARY_ADDRESS_STATE']) || !empty($fields['PRIMARY_ADDRESS_POSTALCODE']) || |
54 | - !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) |
|
55 | - $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
56 | - if(!empty($fields['PRIMARY_ADDRESS_STREET'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
57 | - if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>'; |
|
58 | - if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>'; |
|
59 | - if(!empty($fields['PRIMARY_ADDRESS_CITY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
60 | - if(!empty($fields['PRIMARY_ADDRESS_STATE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
61 | - if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
62 | - if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
63 | - if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) |
|
64 | - $overlib_string .= '<br>'; |
|
65 | - if(!empty($fields['PHONE_MOBILE'])) $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
66 | - if(!empty($fields['PHONE_HOME'])) $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
67 | - if(!empty($fields['PHONE_OTHER'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
58 | + !empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
59 | + $overlib_string .= '<b>' . $mod_strings['LBL_PRIMARY_ADDRESS'] . '</b><br>'; |
|
60 | + } |
|
61 | + if(!empty($fields['PRIMARY_ADDRESS_STREET'])) { |
|
62 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET'] . '<br>'; |
|
63 | + } |
|
64 | + if(!empty($fields['PRIMARY_ADDRESS_STREET_2'])) { |
|
65 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_2'] . '<br>'; |
|
66 | + } |
|
67 | + if(!empty($fields['PRIMARY_ADDRESS_STREET_3'])) { |
|
68 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STREET_3'] . '<br>'; |
|
69 | + } |
|
70 | + if(!empty($fields['PRIMARY_ADDRESS_CITY'])) { |
|
71 | + $overlib_string .= $fields['PRIMARY_ADDRESS_CITY'] . ', '; |
|
72 | + } |
|
73 | + if(!empty($fields['PRIMARY_ADDRESS_STATE'])) { |
|
74 | + $overlib_string .= $fields['PRIMARY_ADDRESS_STATE'] . ' '; |
|
75 | + } |
|
76 | + if(!empty($fields['PRIMARY_ADDRESS_POSTALCODE'])) { |
|
77 | + $overlib_string .= $fields['PRIMARY_ADDRESS_POSTALCODE'] . ' '; |
|
78 | + } |
|
79 | + if(!empty($fields['PRIMARY_ADDRESS_COUNTRY'])) { |
|
80 | + $overlib_string .= $fields['PRIMARY_ADDRESS_COUNTRY'] . '<br>'; |
|
81 | + } |
|
82 | + if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4)) { |
|
83 | + $overlib_string .= '<br>'; |
|
84 | + } |
|
85 | + if(!empty($fields['PHONE_MOBILE'])) { |
|
86 | + $overlib_string .= '<b>'. $mod_strings['LBL_MOBILE_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_MOBILE'] . '</span><br>'; |
|
87 | + } |
|
88 | + if(!empty($fields['PHONE_HOME'])) { |
|
89 | + $overlib_string .= '<b>'. $mod_strings['LBL_HOME_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_HOME'] . '</span><br>'; |
|
90 | + } |
|
91 | + if(!empty($fields['PHONE_OTHER'])) { |
|
92 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_OTHER'] . '</span><br>'; |
|
93 | + } |
|
68 | 94 | |
69 | - if(!empty($fields['EMAIL1'])) |
|
70 | - $overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' . |
|
95 | + if(!empty($fields['EMAIL1'])) { |
|
96 | + $overlib_string .= '<b>'. $mod_strings['LBL_EMAIL_ADDRESS'] . '</b> ' . |
|
71 | 97 | "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
72 | 98 | "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
73 | 99 | "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL1']}&" . |
74 | 100 | "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL1']}>") . |
75 | 101 | "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL1']}</a><br>"; |
76 | - if(!empty($fields['EMAIL2'])) |
|
77 | - $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
102 | + } |
|
103 | + if(!empty($fields['EMAIL2'])) { |
|
104 | + $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_EMAIL_ADDRESS'] . '</b> ' . |
|
78 | 105 | "<a href=index.php?module=Emails&action=Compose&contact_id={$fields['ID']}&" . |
79 | 106 | "parent_type=Contacts&parent_id={$fields['ID']}&to_addrs_ids={$fields['ID']}&to_addrs_names" . |
80 | 107 | "={$fields['FIRST_NAME']} {$fields['LAST_NAME']}&to_addrs_emails={$fields['EMAIL2']}&" . |
81 | 108 | "to_email_addrs=" . urlencode("{$fields['FIRST_NAME']} {$fields['LAST_NAME']} <{$fields['EMAIL2']}>") . |
82 | 109 | "&return_module=Contacts&return_action=ListView'>{$fields['EMAIL2']}</a><br>"; |
110 | + } |
|
83 | 111 | |
84 | 112 | if(!empty($fields['DESCRIPTION'])) { |
85 | 113 | $overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . substr($fields['DESCRIPTION'], 0, 300); |
86 | - if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...'; |
|
114 | + if(strlen($fields['DESCRIPTION']) > 300) { |
|
115 | + $overlib_string .= '...'; |
|
116 | + } |
|
87 | 117 | } |
88 | 118 | |
89 | 119 | return array('fieldToAddTo' => 'FULL_NAME', |
@@ -1,6 +1,7 @@ |
||
1 | 1 | <?php |
2 | -if(!defined('sugarEntry') || !sugarEntry) |
|
2 | +if(!defined('sugarEntry') || !sugarEntry) { |
|
3 | 3 | die('Not A Valid Entry Point'); |
4 | +} |
|
4 | 5 | /********************************************************************************* |
5 | 6 | * SugarCRM Community Edition is a customer relationship management program developed by |
6 | 7 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
@@ -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. |
@@ -108,8 +110,10 @@ discard block |
||
108 | 110 | $currency->retrieve($focus->currency_id); |
109 | 111 | if( $currency->deleted != 1){ |
110 | 112 | $xtpl->assign("CURRENCY", $currency->iso4217 .' '.$currency->symbol ); |
111 | - }else $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); |
|
112 | -}else{ |
|
113 | + } else { |
|
114 | + $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); |
|
115 | + } |
|
116 | + } else{ |
|
113 | 117 | |
114 | 118 | $xtpl->assign("CURRENCY", $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol() ); |
115 | 119 | |
@@ -185,7 +189,7 @@ discard block |
||
185 | 189 | if(!empty($selected_marketing_id)){$latest_marketing_id = $selected_marketing_id;} |
186 | 190 | if(empty($latest_marketing_id) || $latest_marketing_id === 'all'){ |
187 | 191 | $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'],$app_list_strings['roi_type_dom'],$campaign_id,sugar_cached("xml/") . $cache_file_name_roi,true)); |
188 | - }else{ |
|
192 | + } else{ |
|
189 | 193 | |
190 | 194 | $xtpl->assign("MY_CHART_ROI", $chart->campaign_response_roi_popup($app_list_strings['roi_type_dom'],$app_list_strings['roi_type_dom'],$campaign_id,sugar_cached("xml/") .$cache_file_name_roi,true)); |
191 | 195 | } |
@@ -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. |
@@ -100,7 +102,7 @@ discard block |
||
100 | 102 | //an error was found during inbound save. This means the save was allowed but the inbound box had problems, return user to wizard |
101 | 103 | //and display error message |
102 | 104 | header("Location: index.php?action=WizardEmailSetup&module=Campaigns&error=true"); |
103 | - }else{ |
|
105 | + } else{ |
|
104 | 106 | //set navigation details |
105 | 107 | header("Location: index.php?action=index&module=Campaigns"); |
106 | 108 | } |
@@ -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. |
@@ -157,8 +159,7 @@ discard block |
||
157 | 159 | $lead->campaigns->add($camplog->id); |
158 | 160 | if(!empty($GLOBALS['check_notify'])) { |
159 | 161 | $lead->save($GLOBALS['check_notify']); |
160 | - } |
|
161 | - else { |
|
162 | + } else { |
|
162 | 163 | $lead->save(FALSE); |
163 | 164 | } |
164 | 165 | } |
@@ -188,14 +189,14 @@ discard block |
||
188 | 189 | $get_and_post = array_merge($_GET, $_POST); |
189 | 190 | foreach($get_and_post as $param => $value) { |
190 | 191 | |
191 | - if($param == 'redirect_url' && $param == 'submit') |
|
192 | - continue; |
|
192 | + if($param == 'redirect_url' && $param == 'submit') { |
|
193 | + continue; |
|
194 | + } |
|
193 | 195 | |
194 | 196 | if($first_iteration){ |
195 | 197 | $first_iteration = false; |
196 | 198 | $query_string .= $first_char; |
197 | - } |
|
198 | - else{ |
|
199 | + } else{ |
|
199 | 200 | $query_string .= "&"; |
200 | 201 | } |
201 | 202 | $query_string .= "{$param}=".urlencode($value); |
@@ -203,8 +204,7 @@ discard block |
||
203 | 204 | if(empty($lead)) { |
204 | 205 | if($first_iteration){ |
205 | 206 | $query_string .= $first_char; |
206 | - } |
|
207 | - else{ |
|
207 | + } else{ |
|
208 | 208 | $query_string .= "&"; |
209 | 209 | } |
210 | 210 | $query_string .= "error=1"; |
@@ -229,20 +229,17 @@ discard block |
||
229 | 229 | } |
230 | 230 | echo '</form><script language="javascript" type="text/javascript">document.redirect.submit();</script>'; |
231 | 231 | echo '</body></html>'; |
232 | - } |
|
233 | - else{ |
|
232 | + } else{ |
|
234 | 233 | header("Location: {$redirect_url}"); |
235 | 234 | die(); |
236 | 235 | } |
237 | - } |
|
238 | - else{ |
|
236 | + } else{ |
|
239 | 237 | echo $mod_strings['LBL_THANKS_FOR_SUBMITTING_LEAD']; |
240 | 238 | } |
241 | 239 | sugar_cleanup(); |
242 | 240 | // die to keep code from running into redirect case below |
243 | 241 | die(); |
244 | - } |
|
245 | - else{ |
|
242 | + } else{ |
|
246 | 243 | echo $mod_strings['LBL_SERVER_IS_CURRENTLY_UNAVAILABLE']; |
247 | 244 | } |
248 | 245 | } |
@@ -253,8 +250,7 @@ discard block |
||
253 | 250 | echo '<form name="redirect" action="' .$_POST['redirect']. '" method="GET">'; |
254 | 251 | echo '</form><script language="javascript" type="text/javascript">document.redirect.submit();</script>'; |
255 | 252 | echo '</body></html>'; |
256 | - } |
|
257 | - else{ |
|
253 | + } else{ |
|
258 | 254 | header("Location: {$_POST['redirect']}"); |
259 | 255 | die(); |
260 | 256 | } |