@@ -1,6 +1,7 @@ discard block |
||
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. |
@@ -237,9 +238,13 @@ discard block |
||
237 | 238 | $this->name = $this->document_name; |
238 | 239 | } |
239 | 240 | |
240 | - if(isset($row['filename']))$this->filename = $row['filename']; |
|
241 | + if(isset($row['filename'])) { |
|
242 | + $this->filename = $row['filename']; |
|
243 | + } |
|
241 | 244 | //$this->latest_revision = $row['revision']; |
242 | - if(isset($row['revision']))$this->revision = $row['revision']; |
|
245 | + if(isset($row['revision'])) { |
|
246 | + $this->revision = $row['revision']; |
|
247 | + } |
|
243 | 248 | |
244 | 249 | //image is selected based on the extension name <ext>_icon_inline, extension is stored in document_revisions. |
245 | 250 | //if file is not found then default image file will be used. |
@@ -266,7 +271,7 @@ discard block |
||
266 | 271 | |
267 | 272 | $this->file_url = $file_url; |
268 | 273 | $this->file_url_noimage = "index.php?entryPoint=download&type=Documents&id={$this->document_revision_id}"; |
269 | - }else{ |
|
274 | + } else{ |
|
270 | 275 | $this->file_url = ""; |
271 | 276 | $this->file_url_noimage = ""; |
272 | 277 | } |
@@ -306,15 +311,17 @@ discard block |
||
306 | 311 | |
307 | 312 | $where_auto = " documents.deleted = 0"; |
308 | 313 | |
309 | - if ($where != "") |
|
310 | - $query .= " WHERE $where AND ".$where_auto; |
|
311 | - else |
|
312 | - $query .= " WHERE ".$where_auto; |
|
314 | + if ($where != "") { |
|
315 | + $query .= " WHERE $where AND ".$where_auto; |
|
316 | + } else { |
|
317 | + $query .= " WHERE ".$where_auto; |
|
318 | + } |
|
313 | 319 | |
314 | - if ($order_by != "") |
|
315 | - $query .= " ORDER BY $order_by"; |
|
316 | - else |
|
317 | - $query .= " ORDER BY documents.document_name"; |
|
320 | + if ($order_by != "") { |
|
321 | + $query .= " ORDER BY $order_by"; |
|
322 | + } else { |
|
323 | + $query .= " ORDER BY documents.document_name"; |
|
324 | + } |
|
318 | 325 | |
319 | 326 | return $query; |
320 | 327 | } |
@@ -374,7 +381,9 @@ discard block |
||
374 | 381 | |
375 | 382 | //static function. |
376 | 383 | function get_document_name($doc_id){ |
377 | - if (empty($doc_id)) return null; |
|
384 | + if (empty($doc_id)) { |
|
385 | + return null; |
|
386 | + } |
|
378 | 387 | |
379 | 388 | $db = DBManagerFactory::getInstance(); |
380 | 389 | $query="select document_name from documents where id='$doc_id' and deleted=0"; |
@@ -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. |
@@ -80,7 +82,7 @@ discard block |
||
80 | 82 | |
81 | 83 | if( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==1) || ($focus->campaign_type=='NewsLetter')){ |
82 | 84 | echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_NEWSLETTER WIZARD_TITLE'].$focus->name), true, false); |
83 | -}else{ |
|
85 | +} else{ |
|
84 | 86 | echo getClassicModuleTitle($mod_strings['LBL_MODULE_NAME'], array($mod_strings['LBL_CAMPAIGN'].$focus->name), true, false); |
85 | 87 | } |
86 | 88 | |
@@ -89,9 +91,15 @@ discard block |
||
89 | 91 | $ss->assign("MOD", $mod_strings); |
90 | 92 | $ss->assign("APP", $app_strings); |
91 | 93 | |
92 | -if (isset($_REQUEST['return_module'])) $ss->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
93 | -if (isset($_REQUEST['return_action'])) $ss->assign("RETURN_ACTION", $_REQUEST['return_action']); |
|
94 | -if (isset($_REQUEST['return_id'])) $ss->assign("RETURN_ID", $_REQUEST['return_id']); |
|
94 | +if (isset($_REQUEST['return_module'])) { |
|
95 | + $ss->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
96 | +} |
|
97 | +if (isset($_REQUEST['return_action'])) { |
|
98 | + $ss->assign("RETURN_ACTION", $_REQUEST['return_action']); |
|
99 | +} |
|
100 | +if (isset($_REQUEST['return_id'])) { |
|
101 | + $ss->assign("RETURN_ID", $_REQUEST['return_id']); |
|
102 | +} |
|
95 | 103 | // handle Create $module then Cancel |
96 | 104 | if (empty($_REQUEST['return_id'])) { |
97 | 105 | $ss->assign("RETURN_ACTION", 'index'); |
@@ -120,10 +128,10 @@ discard block |
||
120 | 128 | if( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==1) || ($focus->campaign_type=='NewsLetter')){ |
121 | 129 | $campaign_type = 'newsletter'; |
122 | 130 | $ss->assign("CAMPAIGN_DIAGNOSTIC_LINK", diagnose()); |
123 | -}elseif( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==2) || ($focus->campaign_type=='Email') ){ |
|
131 | +} elseif( (isset($_REQUEST['wizardtype']) && $_REQUEST['wizardtype']==2) || ($focus->campaign_type=='Email') ){ |
|
124 | 132 | $campaign_type = 'email'; |
125 | 133 | $ss->assign("CAMPAIGN_DIAGNOSTIC_LINK", diagnose()); |
126 | -}else{ |
|
134 | +} else{ |
|
127 | 135 | $campaign_type = 'general'; |
128 | 136 | } |
129 | 137 | |
@@ -162,16 +170,21 @@ discard block |
||
162 | 170 | $ss->assign("CAMP_NAME", $focus->name); |
163 | 171 | $ss->assign("CAMP_RECORD", $focus->id); |
164 | 172 | $ss->assign("CAMP_IMPRESSIONS", $focus->impressions); |
165 | -if (empty($focus->assigned_user_id) && empty($focus->id)) $focus->assigned_user_id = $current_user->id; |
|
166 | -if (empty($focus->assigned_name) && empty($focus->id)) $focus->assigned_user_name = $current_user->user_name; |
|
173 | +if (empty($focus->assigned_user_id) && empty($focus->id)) { |
|
174 | + $focus->assigned_user_id = $current_user->id; |
|
175 | +} |
|
176 | +if (empty($focus->assigned_name) && empty($focus->id)) { |
|
177 | + $focus->assigned_user_name = $current_user->user_name; |
|
178 | +} |
|
167 | 179 | $ss->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id)); |
168 | 180 | $ss->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); |
169 | 181 | $ss->assign("ASSIGNED_USER_ID", $focus->assigned_user_id ); |
170 | 182 | |
171 | -if((!isset($focus->status)) && (!isset($focus->id))) |
|
183 | +if((!isset($focus->status)) && (!isset($focus->id))) { |
|
172 | 184 | $ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], 'Planning')); |
173 | -else |
|
185 | +} else { |
|
174 | 186 | $ss->assign("STATUS_OPTIONS", get_select_options_with_id($app_list_strings['campaign_status_dom'], $focus->status)); |
187 | +} |
|
175 | 188 | |
176 | 189 | //hide frequency options if this is not a newsletter |
177 | 190 | if($campaign_type == 'newsletter'){ |
@@ -179,10 +192,10 @@ discard block |
||
179 | 192 | $ss->assign("FREQUENCY_LABEL", $mod_strings['LBL_CAMPAIGN_FREQUENCY']); |
180 | 193 | if((!isset($focus->frequency)) && (!isset($focus->id))){ |
181 | 194 | $ss->assign("FREQ_OPTIONS", get_select_options_with_id($app_list_strings['newsletter_frequency_dom'], 'Monthly')); |
182 | - }else{ |
|
195 | + } else{ |
|
183 | 196 | $ss->assign("FREQ_OPTIONS", get_select_options_with_id($app_list_strings['newsletter_frequency_dom'], $focus->frequency)); |
184 | 197 | } |
185 | -}else{ |
|
198 | +} else{ |
|
186 | 199 | $ss->assign("HIDE_FREQUENCY_IF_NEWSLETTER", "input type='hidden'"); |
187 | 200 | $ss->assign("FREQUENCY_LABEL", ' '); |
188 | 201 | } |
@@ -192,12 +205,11 @@ discard block |
||
192 | 205 | if(isset($focus->currency_id) && !empty($focus->currency_id)){ |
193 | 206 | $selectCurrency = $currency->getSelectOptions($focus->currency_id); |
194 | 207 | $ss->assign("CURRENCY", $selectCurrency); |
195 | -} |
|
196 | -else if($current_user->getPreference('currency') && !isset($focus->id)) |
|
208 | +} else if($current_user->getPreference('currency') && !isset($focus->id)) |
|
197 | 209 | { |
198 | 210 | $selectCurrency = $currency->getSelectOptions($current_user->getPreference('currency')); |
199 | 211 | $ss->assign("CURRENCY", $selectCurrency); |
200 | -}else{ |
|
212 | +} else{ |
|
201 | 213 | |
202 | 214 | $selectCurrency = $currency->getSelectOptions(); |
203 | 215 | $ss->assign("CURRENCY", $selectCurrency); |
@@ -228,7 +240,7 @@ discard block |
||
228 | 240 | foreach($OptionsArr as $key=>$val){ |
229 | 241 | if($val =='Newsletter' || $val =='Email' || $val =='' ){ |
230 | 242 | //do not add |
231 | - }else{ |
|
243 | + } else{ |
|
232 | 244 | $myTypeOptionsArr[$key] = $val; |
233 | 245 | } |
234 | 246 | } |
@@ -240,7 +252,7 @@ discard block |
||
240 | 252 | //if the selected flag is set to true, then just populate |
241 | 253 | if($selected){ |
242 | 254 | $type_option_html .="<option value='$optionKey' >$optionName</option>"; |
243 | - }else{//if not selected yet, check to see if this option should be selected |
|
255 | + } else{//if not selected yet, check to see if this option should be selected |
|
244 | 256 | //if the campaign type is not empty, then select the retrieved type |
245 | 257 | if(!empty($focus->campaign_type)){ |
246 | 258 | //check to see if key matches campaign type |
@@ -249,11 +261,11 @@ discard block |
||
249 | 261 | $type_option_html .="<option value='$optionKey' selected>$optionName</option>"; |
250 | 262 | //mark as selected for next time |
251 | 263 | $selected=true; |
252 | - }else{ |
|
264 | + } else{ |
|
253 | 265 | //key does not match, just populate |
254 | 266 | $type_option_html .="<option value='$optionKey' >$optionName</option>"; |
255 | 267 | } |
256 | - }else{ |
|
268 | + } else{ |
|
257 | 269 | //since the campaign type is empty, then select first one |
258 | 270 | $type_option_html .="<option value='$optionKey' selected>$optionName</option>"; |
259 | 271 | //mark as selected for next time |
@@ -264,11 +276,11 @@ discard block |
||
264 | 276 | //assign the modified dropdown for general campaign creation |
265 | 277 | $ss->assign("CAMPAIGN_TYPE_OPTIONS", $type_option_html); |
266 | 278 | $ss->assign("SHOULD_TYPE_BE_DISABLED", "select"); |
267 | -}elseif($campaign_type == 'email'){ |
|
279 | +} elseif($campaign_type == 'email'){ |
|
268 | 280 | //Assign Email as type of campaign being created an disable the select widget |
269 | 281 | $ss->assign("CAMPAIGN_TYPE_OPTIONS", $mod_strings['LBL_EMAIL']); |
270 | 282 | $ss->assign("SHOULD_TYPE_BE_DISABLED", "input type='hidden' value='Email'"); |
271 | -}else{ |
|
283 | +} else{ |
|
272 | 284 | //Assign NewsLetter as type of campaign being created an disable the select widget |
273 | 285 | $ss->assign("CAMPAIGN_TYPE_OPTIONS", $mod_strings['LBL_NEWSLETTER']); |
274 | 286 | $ss->assign("SHOULD_TYPE_BE_DISABLED", "input type='hidden' value='NewsLetter'"); |
@@ -295,7 +307,7 @@ discard block |
||
295 | 307 | $ct_focus = new CampaignTracker(); |
296 | 308 | $ct_focus->retrieve($trkr_id); |
297 | 309 | if(isset($ct_focus->tracker_name) && !empty($ct_focus->tracker_name)){ |
298 | - if($ct_focus->is_optout){$opt = 'checked';}else{$opt = '';} |
|
310 | + if($ct_focus->is_optout){$opt = 'checked';} else{$opt = '';} |
|
299 | 311 | $trkr_html .= "<div id='existing_trkr".$trkr_count."'> <table width='100%' border='0' cellspacing='0' cellpadding='0'>" ; |
300 | 312 | $trkr_html .= "<tr class='evenListRowS1'><td width='15%'><input name='wiz_step3_is_optout".$trkr_count."' title='".$mod_strings['LBL_EDIT_OPT_OUT'] . $trkr_count ."' id='existing_is_optout". $trkr_count ."' class='checkbox' type='checkbox' $opt /><input name='wiz_step3_id".$trkr_count."' value='".$ct_focus->id."' id='existing_tracker_id". $trkr_count ."'type='hidden''/></td>"; |
301 | 313 | $trkr_html .= "<td width='40%'> <input id='existing_tracker_name". $trkr_count ."' type='text' size='20' maxlength='255' name='wiz_step3_tracker_name". $trkr_count ."' title='".$mod_strings['LBL_EDIT_TRACKER_NAME']. $trkr_count ."' value='".$ct_focus->tracker_name."' ></td>"; |
@@ -310,7 +322,7 @@ discard block |
||
310 | 322 | } |
311 | 323 | |
312 | 324 | $trkr_html .= "<div id='no_trackers'></div>"; |
313 | - }else{ |
|
325 | + } else{ |
|
314 | 326 | $trkr_html .= "<div id='no_trackers'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr class='evenListRowS1'><td>".$mod_strings['LBL_NONE']."</td></tr></table></div>"; |
315 | 327 | } |
316 | 328 | $ss->assign('EXISTING_TRACKERS', $trkr_html); |
@@ -424,7 +436,7 @@ discard block |
||
424 | 436 | |
425 | 437 | |
426 | 438 | |
427 | -}else{ |
|
439 | +} else{ |
|
428 | 440 | //this is not a newlsetter campaign, so fill in target list table |
429 | 441 | //create array for javascript, this will help to display the option text, not the value |
430 | 442 | $dom_txt =' '; |
@@ -454,7 +466,7 @@ discard block |
||
454 | 466 | } |
455 | 467 | |
456 | 468 | $trgt_html .= "<div id='no_targets'></div>"; |
457 | - }else{ |
|
469 | + } else{ |
|
458 | 470 | $trgt_html .= "<div id='no_targets'><table width='100%' border='0' cellspacing='0' cellpadding='0'><tr class='evenListRowS1'><td>".$mod_strings['LBL_NONE']."</td></tr></table></div>"; |
459 | 471 | |
460 | 472 | } |
@@ -529,11 +541,11 @@ discard block |
||
529 | 541 | $ss->assign('NAV_ITEMS',create_wiz_menu_items($steps,'campaign',$mrkt_string,$summ_url)); |
530 | 542 | $ss->assign('HIDE_CONTINUE','hidden'); |
531 | 543 | |
532 | -}elseif($campaign_type == 'email'){ |
|
544 | +} elseif($campaign_type == 'email'){ |
|
533 | 545 | $steps = create_email_steps(); |
534 | 546 | $ss->assign('NAV_ITEMS',create_wiz_menu_items($steps,'email',$mrkt_string,$summ_url)); |
535 | 547 | $ss->assign('HIDE_CONTINUE','submit'); |
536 | -}else{ |
|
548 | +} else{ |
|
537 | 549 | $steps = create_newsletter_steps(); |
538 | 550 | $ss->assign('NAV_ITEMS',create_wiz_menu_items($steps,'newsletter',$mrkt_string,$summ_url)); |
539 | 551 | $ss->assign('HIDE_CONTINUE','submit'); |
@@ -604,7 +616,7 @@ discard block |
||
604 | 616 | $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+1).">$mrkt_string</div></td></tr>"; |
605 | 617 | $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+2).">".$mod_strings['LBL_NAVIGATION_MENU_SEND_EMAIL']."</div></li>"; |
606 | 618 | $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+3).">".$summ_url."</div></td></tr>"; |
607 | - }else{ |
|
619 | + } else{ |
|
608 | 620 | $nav_html .= "<tr><td scope='row' nowrap><div id='nav_step'".($i+1).">".$summ_url."</div></td></tr>"; |
609 | 621 | } |
610 | 622 |
@@ -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. |
@@ -135,11 +137,9 @@ discard block |
||
135 | 137 | if(count($_REQUEST['colsFirst']) > count($_REQUEST['colsSecond']) || count($_REQUEST['colsFirst']) == count($_REQUEST['colsSecond'])){ |
136 | 138 | $columns= count($_REQUEST['colsFirst']); |
137 | 139 | } |
138 | -} |
|
139 | -else if(!empty($_REQUEST['colsFirst'])){ |
|
140 | +} else if(!empty($_REQUEST['colsFirst'])){ |
|
140 | 141 | $columns= count($_REQUEST['colsFirst']); |
141 | -} |
|
142 | -else if(!empty($_REQUEST['colsSecond'])){ |
|
142 | +} else if(!empty($_REQUEST['colsSecond'])){ |
|
143 | 143 | $columns= count($_REQUEST['colsSecond']); |
144 | 144 | } |
145 | 145 | |
@@ -166,8 +166,7 @@ discard block |
||
166 | 166 | $field_label = $field_vname .": "; |
167 | 167 | if(isset($lead->field_defs[$colsFirstField]['custom_type']) && $lead->field_defs[$colsFirstField]['custom_type'] != null){ |
168 | 168 | $field_type= $lead->field_defs[$colsFirstField]['custom_type']; |
169 | - } |
|
170 | - else{ |
|
169 | + } else{ |
|
171 | 170 | $field_type= $lead->field_defs[$colsFirstField]['type']; |
172 | 171 | } |
173 | 172 | |
@@ -190,7 +189,9 @@ discard block |
||
190 | 189 | array_push($required_fields,$lead->field_defs[$colsFirstField]['name']); |
191 | 190 | } |
192 | 191 | } |
193 | - if($field_type=='multienum' || $field_type=='enum' || $field_type=='radioenum') $field_options= $lead->field_defs[$colsFirstField]['options']; |
|
192 | + if($field_type=='multienum' || $field_type=='enum' || $field_type=='radioenum') { |
|
193 | + $field_options= $lead->field_defs[$colsFirstField]['options']; |
|
194 | + } |
|
194 | 195 | } |
195 | 196 | //preg_replace('/:$/','',translate($field_def['vname'],'Leads') |
196 | 197 | if(isset($lead->field_defs[$colsSecondField]) && $lead->field_defs[$colsSecondField] != null) |
@@ -200,8 +201,7 @@ discard block |
||
200 | 201 | $field1_label = $field1_vname .": "; |
201 | 202 | if(isset($lead->field_defs[$colsSecondField]['custom_type']) && $lead->field_defs[$colsSecondField]['custom_type'] != null){ |
202 | 203 | $field1_type= $lead->field_defs[$colsSecondField]['custom_type']; |
203 | - } |
|
204 | - else{ |
|
204 | + } else{ |
|
205 | 205 | $field1_type= $lead->field_defs[$colsSecondField]['type']; |
206 | 206 | } |
207 | 207 | |
@@ -223,7 +223,9 @@ discard block |
||
223 | 223 | array_push($required_fields,$lead->field_defs[$colsSecondField]['name']); |
224 | 224 | } |
225 | 225 | } |
226 | - if($field1_type=='multienum' || $field1_type=='enum' || $field1_type=='radioenum') $field1_options= $lead->field_defs[$colsSecondField]['options']; |
|
226 | + if($field1_type=='multienum' || $field1_type=='enum' || $field1_type=='radioenum') { |
|
227 | + $field1_options= $lead->field_defs[$colsSecondField]['options']; |
|
228 | + } |
|
227 | 229 | } |
228 | 230 | |
229 | 231 | $Web_To_Lead_Form_html .= "<tr>"; |
@@ -233,19 +235,17 @@ discard block |
||
233 | 235 | $lead_options = ''; |
234 | 236 | if(!empty($lead->$field_name)){ |
235 | 237 | $lead_options= get_select_options_with_id($app_list_strings[$field_options], unencodeMultienum($lead->$field_name)); |
236 | - } |
|
237 | - else{ |
|
238 | + } else{ |
|
238 | 239 | $lead_options= get_select_options_with_id($app_list_strings[$field_options], ''); |
239 | 240 | } |
240 | 241 | if($field_required){ |
241 | 242 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
242 | - } |
|
243 | - else{ |
|
243 | + } else{ |
|
244 | 244 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'></td>"; |
245 | 245 | } |
246 | 246 | if(isset($lead->field_defs[$colsFirstField]['isMultiSelect']) && $lead->field_defs[$colsFirstField]['isMultiSelect'] ==1){ |
247 | 247 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><select id='{$field_name}' multiple='true' name='{$field_name}[]' tabindex='1'>$lead_options</select></span sugar='slot'></td>"; |
248 | - }elseif(ifRadioButton($lead->field_defs[$colsFirstField]['name'])){ |
|
248 | + } elseif(ifRadioButton($lead->field_defs[$colsFirstField]['name'])){ |
|
249 | 249 | $Web_To_Lead_Form_html .="<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'>"; |
250 | 250 | foreach($app_list_strings[$field_options] as $field_option_key => $field_option){ |
251 | 251 | if($field_option != null){ |
@@ -258,15 +258,14 @@ discard block |
||
258 | 258 | } |
259 | 259 | } |
260 | 260 | $Web_To_Lead_Form_html .="</span sugar='slot'></td>"; |
261 | - }else{ |
|
261 | + } else{ |
|
262 | 262 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><select id=$field_name name=$field_name tabindex='1'>$lead_options</select></span sugar='slot'></td>"; |
263 | 263 | } |
264 | 264 | } |
265 | 265 | if($field_type=='bool'){ |
266 | 266 | if($field_required){ |
267 | 267 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
268 | - } |
|
269 | - else{ |
|
268 | + } else{ |
|
270 | 269 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'></td>"; |
271 | 270 | } |
272 | 271 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><input type='checkbox' id=$field_name name=$field_name></span sugar='slot'></td>"; |
@@ -281,8 +280,7 @@ discard block |
||
281 | 280 | $LBL_ENTER_DATE = translate('LBL_ENTER_DATE', 'Charts'); |
282 | 281 | if($field_required){ |
283 | 282 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
284 | - } |
|
285 | - else{ |
|
283 | + } else{ |
|
286 | 284 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'></td>"; |
287 | 285 | } |
288 | 286 | |
@@ -304,20 +302,22 @@ discard block |
||
304 | 302 | $order = explode("%", $cal_dateformat); |
305 | 303 | foreach($order as $part) |
306 | 304 | { |
307 | - if (!isset($part[0])) |
|
308 | - continue; |
|
309 | - if (strToUpper($part[0]) == "M" ) |
|
310 | - $Web_To_Lead_Form_html .= translate("LBL_MONTH") . ":<input class=\"text\" |
|
305 | + if (!isset($part[0])) { |
|
306 | + continue; |
|
307 | + } |
|
308 | + if (strToUpper($part[0]) == "M" ) { |
|
309 | + $Web_To_Lead_Form_html .= translate("LBL_MONTH") . ":<input class=\"text\" |
|
311 | 310 | name=\"{$field_name}_month\" size='2' maxlength='2' id='{$field_name}_month' value='' |
312 | 311 | onblur=\"update{$field_name}Value()\">"; |
313 | - else if (strToUpper($part[0]) == "D" ) |
|
314 | - $Web_To_Lead_Form_html .= translate("LBL_DAY") . ":<input class=\"text\" |
|
312 | + } else if (strToUpper($part[0]) == "D" ) { |
|
313 | + $Web_To_Lead_Form_html .= translate("LBL_DAY") . ":<input class=\"text\" |
|
315 | 314 | name=\"{$field_name}_day\" size='2' maxlength='2' id='{$field_name}_day' value='' |
316 | 315 | onblur=\"update{$field_name}Value()\">"; |
317 | - else if (strToUpper($part[0]) == "Y" ) |
|
318 | - $Web_To_Lead_Form_html .= translate("LBL_YEAR") . ":<input class=\"text\" |
|
316 | + } else if (strToUpper($part[0]) == "Y" ) { |
|
317 | + $Web_To_Lead_Form_html .= translate("LBL_YEAR") . ":<input class=\"text\" |
|
319 | 318 | name=\"{$field_name}_year\" size='4' maxlength='4' id='{$field_name}_year' value='' |
320 | 319 | onblur=\"update{$field_name}Value()\">"; |
320 | + } |
|
321 | 321 | } |
322 | 322 | $Web_To_Lead_Form_html .= "</span></td>"; |
323 | 323 | } // if |
@@ -326,8 +326,7 @@ discard block |
||
326 | 326 | || $field_type=='phone' || $field_type=='currency' || $field_type=='url' || $field_type=='int'){ |
327 | 327 | if($field_name=='last_name' || $field_required){ |
328 | 328 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
329 | - } |
|
330 | - else{ |
|
329 | + } else{ |
|
331 | 330 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'></td>"; |
332 | 331 | } |
333 | 332 | if ( $field_name=='email1'||$field_name=='email2' ){ |
@@ -347,14 +346,12 @@ discard block |
||
347 | 346 | if($field_type=='email'){ |
348 | 347 | if($field_required){ |
349 | 348 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
350 | - } |
|
351 | - else{ |
|
349 | + } else{ |
|
352 | 350 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field_label</span sugar='slot'></td>"; |
353 | 351 | } |
354 | 352 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><input id=$field_name name=$field_name type='text' onchange='validateEmailAdd();'></span sugar='slot'></td>"; |
355 | 353 | } |
356 | - } |
|
357 | - else{ |
|
354 | + } else{ |
|
358 | 355 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'> </span sugar='slot'></td>"; |
359 | 356 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'> </span sugar='slot'></td>"; |
360 | 357 | } |
@@ -364,40 +361,37 @@ discard block |
||
364 | 361 | $lead1_options = ''; |
365 | 362 | if(!empty($lead->$field1_name)){ |
366 | 363 | $lead1_options= get_select_options_with_id($app_list_strings[$field1_options], unencodeMultienum($lead->$field1_name)); |
367 | - } |
|
368 | - else{ |
|
364 | + } else{ |
|
369 | 365 | $lead1_options= get_select_options_with_id($app_list_strings[$field1_options], ''); |
370 | 366 | } |
371 | 367 | if($field1_required){ |
372 | 368 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
373 | - } |
|
374 | - else{ |
|
369 | + } else{ |
|
375 | 370 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'></td>"; |
376 | 371 | } |
377 | 372 | if(isset($lead->field_defs[$colsSecondField]['isMultiSelect']) && $lead->field_defs[$colsSecondField]['isMultiSelect'] ==1){ |
378 | 373 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><select id='{$field1_name}' name='{$field1_name}[]' multiple='true' tabindex='1'>$lead1_options</select></span sugar='slot'></td>"; |
379 | - }elseif(ifRadioButton($lead->field_defs[$colsSecondField]['name'])){ |
|
374 | + } elseif(ifRadioButton($lead->field_defs[$colsSecondField]['name'])){ |
|
380 | 375 | $Web_To_Lead_Form_html .="<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'>"; |
381 | 376 | foreach($app_list_strings[$field1_options] as $field_option_key => $field_option){ |
382 | 377 | if($field_option != null){ |
383 | 378 | if(!empty($lead->$field1_name) && in_array($field_option_key,unencodeMultienum($lead->$field1_name))){ |
384 | 379 | $Web_To_Lead_Form_html .="<input id='$colsSecondField"."_$field_option_key' checked name='$colsSecondField' value='$field_option_key' type='radio'>"; |
385 | - }else{ |
|
380 | + } else{ |
|
386 | 381 | $Web_To_Lead_Form_html .="<input id='$colsSecondField"."_$field_option_key' name='$colsSecondField' value='$field_option_key' type='radio'>"; |
387 | 382 | } |
388 | 383 | $Web_To_Lead_Form_html .="<span ='document.getElementById('".$lead->field_defs[$colsSecondField]."_$field_option_key').checked =true style='cursor:default'; onmousedown='return false;'>$field_option</span><br>"; |
389 | 384 | } |
390 | 385 | } |
391 | 386 | $Web_To_Lead_Form_html .="</span sugar='slot'></td>"; |
392 | - }else{ |
|
387 | + } else{ |
|
393 | 388 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><select id=$field1_name name=$field1_name tabindex='1'>$lead1_options</select></span sugar='slot'></td>"; |
394 | 389 | } |
395 | 390 | } |
396 | 391 | if($field1_type=='bool'){ |
397 | 392 | if($field1_required){ |
398 | 393 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
399 | - } |
|
400 | - else{ |
|
394 | + } else{ |
|
401 | 395 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'></td>"; |
402 | 396 | } |
403 | 397 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><input id=$field1_name name=$field1_name type='checkbox'></span sugar='slot'></td>"; |
@@ -411,8 +405,7 @@ discard block |
||
411 | 405 | $LBL_ENTER_DATE = translate('LBL_ENTER_DATE', 'Charts'); |
412 | 406 | if($field1_required){ |
413 | 407 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
414 | - } |
|
415 | - else{ |
|
408 | + } else{ |
|
416 | 409 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'></td>"; |
417 | 410 | } |
418 | 411 | $Web_To_Lead_Form_html .= " |
@@ -433,20 +426,22 @@ discard block |
||
433 | 426 | $order = explode("%", $cal_dateformat); |
434 | 427 | foreach($order as $part) |
435 | 428 | { |
436 | - if (!isset($part[0])) |
|
437 | - continue; |
|
438 | - if (strToUpper($part[0]) == "M" ) |
|
439 | - $Web_To_Lead_Form_html .= translate("LBL_MONTH") . ":<input class=\"text\" |
|
429 | + if (!isset($part[0])) { |
|
430 | + continue; |
|
431 | + } |
|
432 | + if (strToUpper($part[0]) == "M" ) { |
|
433 | + $Web_To_Lead_Form_html .= translate("LBL_MONTH") . ":<input class=\"text\" |
|
440 | 434 | name=\"{$field1_name}_month\" size='2' maxlength='2' id='{$field1_name}_month' value='' |
441 | 435 | onblur=\"update{$field1_name}Value()\">"; |
442 | - else if (strToUpper($part[0]) == "D" ) |
|
443 | - $Web_To_Lead_Form_html .= translate("LBL_DAY") . ":<input class=\"text\" |
|
436 | + } else if (strToUpper($part[0]) == "D" ) { |
|
437 | + $Web_To_Lead_Form_html .= translate("LBL_DAY") . ":<input class=\"text\" |
|
444 | 438 | name=\"{$field1_name}_day\" size='2' maxlength='2' id='{$field1_name}_day' value='' |
445 | 439 | onblur=\"update{$field1_name}Value()\">"; |
446 | - else if (strToUpper($part[0]) == "Y" ) |
|
447 | - $Web_To_Lead_Form_html .= translate("LBL_YEAR") . ":<input class=\"text\" |
|
440 | + } else if (strToUpper($part[0]) == "Y" ) { |
|
441 | + $Web_To_Lead_Form_html .= translate("LBL_YEAR") . ":<input class=\"text\" |
|
448 | 442 | name=\"{$field1_name}_year\" size='4' maxlength='4' id='{$field1_name}_year' value='' |
449 | 443 | onblur=\"update{$field1_name}Value()\">"; |
444 | + } |
|
450 | 445 | } |
451 | 446 | $Web_To_Lead_Form_html .= "</span></td>"; |
452 | 447 | } // if |
@@ -454,8 +449,7 @@ discard block |
||
454 | 449 | || $field1_type=='phone' || $field1_type=='currency' || $field1_type=='url' || $field1_type=='int'){ |
455 | 450 | if($field1_name=='last_name' || $field1_required){ |
456 | 451 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
457 | - } |
|
458 | - else{ |
|
452 | + } else{ |
|
459 | 453 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'></td>"; |
460 | 454 | } |
461 | 455 | if ( $field1_name=='email1'||$field1_name=='email2' ){ |
@@ -476,14 +470,12 @@ discard block |
||
476 | 470 | if($field1_type=='email'){ |
477 | 471 | if($field1_required){ |
478 | 472 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'><span class='required' style='color: rgb(255, 0, 0);'>$web_required_symbol</span></td>"; |
479 | - } |
|
480 | - else{ |
|
473 | + } else{ |
|
481 | 474 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'>$field1_label</span sugar='slot'></td>"; |
482 | 475 | } |
483 | 476 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'><input id=$field1_name name=$field1_name type='text' onchange='validateEmailAdd();'></span sugar='slot'></td>"; |
484 | 477 | } |
485 | - } |
|
486 | - else{ |
|
478 | + } else{ |
|
487 | 479 | $Web_To_Lead_Form_html .= "<td width='15%' style='text-align: left; font-size: 12px; font-weight: normal;'><span sugar='slot'> </span sugar='slot'></td>"; |
488 | 480 | $Web_To_Lead_Form_html .= "<td width='35%' style='font-size: 12px; font-weight: normal;'><span sugar='slot'> </span sugar='slot'></td>"; |
489 | 481 | } |
@@ -596,8 +588,16 @@ discard block |
||
596 | 588 | } |
597 | 589 | </script>"; |
598 | 590 | |
599 | -if(isset($Web_To_Lead_Form_html)) $xtpl->assign("BODY", $Web_To_Lead_Form_html); else $xtpl->assign("BODY", ""); |
|
600 | -if(isset($Web_To_Lead_Form_html)) $xtpl->assign("BODY_HTML", $Web_To_Lead_Form_html); else $xtpl->assign("BODY_HTML", ""); |
|
591 | +if(isset($Web_To_Lead_Form_html)) { |
|
592 | + $xtpl->assign("BODY", $Web_To_Lead_Form_html); |
|
593 | +} else { |
|
594 | + $xtpl->assign("BODY", ""); |
|
595 | +} |
|
596 | +if(isset($Web_To_Lead_Form_html)) { |
|
597 | + $xtpl->assign("BODY_HTML", $Web_To_Lead_Form_html); |
|
598 | +} else { |
|
599 | + $xtpl->assign("BODY_HTML", ""); |
|
600 | +} |
|
601 | 601 | |
602 | 602 | |
603 | 603 | require_once('include/SugarTinyMCE.php'); |
@@ -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. |
@@ -92,7 +94,7 @@ discard block |
||
92 | 94 | $campaign_focus->prospectlists->delete($campaign_focus->id, $pl_del); |
93 | 95 | } |
94 | 96 | } |
95 | - }else{ |
|
97 | + } else{ |
|
96 | 98 | //process target lists if this is not a newsletter |
97 | 99 | //remove Target Lists if defined |
98 | 100 | |
@@ -124,7 +126,7 @@ discard block |
||
124 | 126 | //load relationship and add to the list |
125 | 127 | $campaign_focus->load_relationship('prospectlists'); |
126 | 128 | $campaign_focus->prospectlists->add($trgt_focus ->id); |
127 | - }else{ |
|
129 | + } else{ |
|
128 | 130 | |
129 | 131 | //this is a new target, as the id is not populated, need to create and link |
130 | 132 | $trgt_focus = new ProspectList(); |
@@ -214,7 +216,7 @@ discard block |
||
214 | 216 | $action = ''; |
215 | 217 | if(isset($_REQUEST['wiz_direction']) && $_REQUEST['wiz_direction']== 'continue'){ |
216 | 218 | $action = 'WizardMarketing'; |
217 | -}else{ |
|
219 | +} else{ |
|
218 | 220 | $action = 'WizardHome&record='.$campaign_focus->id; |
219 | 221 | } |
220 | 222 | //require_once('modules/Campaigns/WizardMarketing.php'); |
@@ -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 | } |
@@ -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. |
@@ -181,8 +183,7 @@ discard block |
||
181 | 183 | $col_arr[0]=$cols_name; |
182 | 184 | $col_arr[1]=$field_def['name']; |
183 | 185 | $col_arr[2]=true; |
184 | - } |
|
185 | - else{ |
|
186 | + } else{ |
|
186 | 187 | $cols_name=$field_def['vname']; |
187 | 188 | $col_arr[0]=$cols_name; |
188 | 189 | $col_arr[1]=$field_def['name']; |
@@ -209,8 +210,12 @@ discard block |
||
209 | 210 | |
210 | 211 | |
211 | 212 | |
212 | -if (empty($focus->assigned_user_id) && empty($focus->id)) $focus->assigned_user_id = $current_user->id; |
|
213 | -if (empty($focus->assigned_name) && empty($focus->id)) $focus->assigned_user_name = $current_user->user_name; |
|
213 | +if (empty($focus->assigned_user_id) && empty($focus->id)) { |
|
214 | + $focus->assigned_user_id = $current_user->id; |
|
215 | +} |
|
216 | +if (empty($focus->assigned_name) && empty($focus->id)) { |
|
217 | + $focus->assigned_user_name = $current_user->user_name; |
|
218 | +} |
|
214 | 219 | $xtpl->assign("ASSIGNED_USER_OPTIONS", get_select_options_with_id(get_user_array(TRUE, "Active", $focus->assigned_user_id), $focus->assigned_user_id)); |
215 | 220 | $xtpl->assign("ASSIGNED_USER_NAME", $focus->assigned_user_name); |
216 | 221 | $xtpl->assign("ASSIGNED_USER_ID", $focus->assigned_user_id ); |
@@ -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. |
@@ -55,7 +57,9 @@ discard block |
||
55 | 57 | global $mod_strings,$app_list_strings,$app_strings,$current_user; |
56 | 58 | |
57 | 59 | |
58 | -if (!is_admin($current_user)&& !is_admin_for_module($GLOBALS['current_user'],'Campaigns')) sugar_die("Unauthorized access to administration."); |
|
60 | +if (!is_admin($current_user)&& !is_admin_for_module($GLOBALS['current_user'],'Campaigns')) { |
|
61 | + sugar_die("Unauthorized access to administration."); |
|
62 | +} |
|
59 | 63 | |
60 | 64 | $params = array(); |
61 | 65 | $params[] = "<a href='index.php?module=Campaigns&action=index'>{$mod_strings['LBL_MODULE_NAME']}</a>"; |
@@ -78,9 +82,15 @@ discard block |
||
78 | 82 | $ss = new Sugar_Smarty(); |
79 | 83 | $ss->assign("MOD", $mod_strings); |
80 | 84 | $ss->assign("APP", $app_strings); |
81 | -if (isset($_REQUEST['return_module'])) $ss->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
82 | -if (isset($_REQUEST['return_action'])) $ss->assign("RETURN_ACTION", $_REQUEST['return_action']); |
|
83 | -if (isset($_REQUEST['return_id'])) $ss->assign("RETURN_ID", $_REQUEST['return_id']); |
|
85 | +if (isset($_REQUEST['return_module'])) { |
|
86 | + $ss->assign("RETURN_MODULE", $_REQUEST['return_module']); |
|
87 | +} |
|
88 | +if (isset($_REQUEST['return_action'])) { |
|
89 | + $ss->assign("RETURN_ACTION", $_REQUEST['return_action']); |
|
90 | +} |
|
91 | +if (isset($_REQUEST['return_id'])) { |
|
92 | + $ss->assign("RETURN_ID", $_REQUEST['return_id']); |
|
93 | +} |
|
84 | 94 | |
85 | 95 | |
86 | 96 | |
@@ -146,7 +156,7 @@ discard block |
||
146 | 156 | |
147 | 157 | if( $colorclass == "class='evenListRowS1'"){ |
148 | 158 | $colorclass= "class='oddListRowS1'"; |
149 | - }else{ |
|
159 | + } else{ |
|
150 | 160 | $colorclass= "class='evenListRowS1'"; |
151 | 161 | } |
152 | 162 | |
@@ -159,7 +169,7 @@ discard block |
||
159 | 169 | } |
160 | 170 | |
161 | 171 | |
162 | -}else{ |
|
172 | +} else{ |
|
163 | 173 | $need_mbox = 'checked'; |
164 | 174 | $mboxTable .= "<tr><td colspan='5'><b>".$mod_strings['LBL_MAILBOX_CHECK_WIZ_BAD']." </b>.</td></tr>"; |
165 | 175 | } |