This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point'); |
||
3 | /********************************************************************************* |
||
4 | * SugarCRM Community Edition is a customer relationship management program developed by |
||
5 | * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc. |
||
6 | |||
7 | * SuiteCRM is an extension to SugarCRM Community Edition developed by Salesagility Ltd. |
||
8 | * Copyright (C) 2011 - 2014 Salesagility Ltd. |
||
9 | * |
||
10 | * This program is free software; you can redistribute it and/or modify it under |
||
11 | * the terms of the GNU Affero General Public License version 3 as published by the |
||
12 | * Free Software Foundation with the addition of the following permission added |
||
13 | * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK |
||
14 | * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY |
||
15 | * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. |
||
16 | * |
||
17 | * This program is distributed in the hope that it will be useful, but WITHOUT |
||
18 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
||
19 | * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more |
||
20 | * details. |
||
21 | * |
||
22 | * You should have received a copy of the GNU Affero General Public License along with |
||
23 | * this program; if not, see http://www.gnu.org/licenses or write to the Free |
||
24 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
||
25 | * 02110-1301 USA. |
||
26 | * |
||
27 | * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road, |
||
28 | * SW2-130, Cupertino, CA 95014, USA. or at email address [email protected]. |
||
29 | * |
||
30 | * The interactive user interfaces in modified source and object code versions |
||
31 | * of this program must display Appropriate Legal Notices, as required under |
||
32 | * Section 5 of the GNU Affero General Public License version 3. |
||
33 | * |
||
34 | * In accordance with Section 7(b) of the GNU Affero General Public License version 3, |
||
35 | * these Appropriate Legal Notices must retain the display of the "Powered by |
||
36 | * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not |
||
37 | * reasonably feasible for technical reasons, the Appropriate Legal Notices must |
||
38 | * display the words "Powered by SugarCRM" and "Supercharged by SuiteCRM". |
||
39 | ********************************************************************************/ |
||
40 | |||
41 | |||
42 | |||
43 | |||
44 | global $theme; |
||
45 | |||
46 | |||
47 | |||
48 | |||
49 | |||
50 | |||
51 | |||
52 | |||
53 | |||
54 | class Popup_Picker |
||
0 ignored issues
–
show
|
|||
55 | { |
||
56 | |||
57 | |||
58 | /* |
||
59 | * |
||
60 | */ |
||
61 | function __construct() |
||
62 | { |
||
63 | } |
||
64 | |||
65 | /** |
||
66 | * @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead |
||
67 | */ |
||
68 | function Popup_Picker(){ |
||
69 | $deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code'; |
||
70 | if(isset($GLOBALS['log'])) { |
||
71 | $GLOBALS['log']->deprecated($deprecatedMessage); |
||
72 | } |
||
73 | else { |
||
74 | trigger_error($deprecatedMessage, E_USER_DEPRECATED); |
||
75 | } |
||
76 | self::__construct(); |
||
77 | } |
||
78 | |||
79 | |||
80 | /* |
||
81 | * |
||
82 | */ |
||
83 | function _get_where_clause() |
||
84 | { |
||
85 | $where = ''; |
||
86 | if(isset($_REQUEST['query'])) |
||
87 | { |
||
88 | $where_clauses = array(); |
||
89 | append_where_clause($where_clauses, "target_id", "campaign_log.target_id"); |
||
90 | //append_where_clause($where_clauses, "last_name", "prospects.last_name"); |
||
91 | |||
92 | $where = generate_where_statement($where_clauses); |
||
93 | if (!empty($where)) |
||
94 | $where.=" AND "; |
||
95 | $where .=" activity_type='targeted'"; |
||
96 | |||
97 | } |
||
98 | |||
99 | return $where; |
||
100 | } |
||
101 | |||
102 | /** |
||
103 | * |
||
104 | */ |
||
105 | function process_page() |
||
106 | { |
||
107 | global $theme; |
||
108 | global $mod_strings; |
||
109 | global $app_strings; |
||
110 | global $app_list_strings; |
||
111 | global $currentModule; |
||
112 | global $sugar_version, $sugar_config; |
||
113 | |||
114 | $output_html = ''; |
||
115 | $where = ''; |
||
116 | |||
117 | $where = $this->_get_where_clause(); |
||
118 | |||
119 | |||
120 | |||
121 | $first_name = empty($_REQUEST['first_name']) ? '' : $_REQUEST['first_name']; |
||
122 | $last_name = empty($_REQUEST['last_name']) ? '' : $_REQUEST['last_name']; |
||
123 | |||
124 | $request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data']; |
||
125 | $hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true; |
||
126 | |||
127 | $button = "<form action='index.php' method='post' name='form' id='form'>\n"; |
||
128 | //START:FOR MULTI-SELECT |
||
129 | $multi_select=false; |
||
130 | if (!empty($_REQUEST['mode']) && strtoupper($_REQUEST['mode']) == 'MULTISELECT') { |
||
131 | $multi_select=true; |
||
132 | $button .= "<input type='button' name='button' class='button' onclick=\"send_back_selected('Prospects',document.MassUpdate,'mass[]','" .$app_strings['ERR_NOTHING_SELECTED']."');\" title='" |
||
133 | .$app_strings['LBL_SELECT_BUTTON_TITLE']."' value=' " |
||
134 | .$app_strings['LBL_SELECT_BUTTON_LABEL']." ' />\n"; |
||
135 | } |
||
136 | //END:FOR MULTI-SELECT |
||
137 | if(!$hide_clear_button) |
||
138 | { |
||
139 | $button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='" |
||
140 | .$app_strings['LBL_CLEAR_BUTTON_TITLE']."' value=' " |
||
141 | .$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n"; |
||
142 | } |
||
143 | $button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='" |
||
144 | .$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='" |
||
145 | .$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' " |
||
146 | .$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n"; |
||
147 | $button .= "</form>\n"; |
||
148 | |||
149 | $form = new XTemplate('modules/CampaignLog/Popup_picker.html'); |
||
150 | $form->assign('MOD', $mod_strings); |
||
151 | $form->assign('APP', $app_strings); |
||
152 | $form->assign('THEME', $theme); |
||
153 | $form->assign('MODULE_NAME', $currentModule); |
||
154 | $form->assign('request_data', $request_data); |
||
155 | |||
156 | |||
157 | ob_start(); |
||
158 | insert_popup_header($theme); |
||
159 | $output_html .= ob_get_contents(); |
||
160 | ob_end_clean(); |
||
161 | |||
162 | //$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false); |
||
163 | |||
164 | $form->parse('main.SearchHeader'); |
||
165 | $output_html .= $form->text('main.SearchHeader'); |
||
166 | |||
167 | // Reset the sections that are already in the page so that they do not print again later. |
||
168 | $form->reset('main.SearchHeader'); |
||
169 | |||
170 | // create the listview |
||
171 | $seed_bean = new CampaignLog(); |
||
172 | $ListView = new ListView(); |
||
173 | $ListView->show_export_button = false; |
||
174 | $ListView->process_for_popups = true; |
||
175 | $ListView->setXTemplate($form); |
||
176 | $ListView->multi_select_popup=$multi_select; //FOR MULTI-SELECT |
||
177 | if ($multi_select) $ListView->xTemplate->assign("TAG_TYPE","SPAN"); else $ListView->xTemplate->assign("TAG_TYPE","A");//FOR MULTI-SELECT |
||
178 | //$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']); //FOR MULTI-SELECT |
||
179 | //$ListView->setHeaderText($button); //FOR MULTI-SELECT |
||
180 | $ListView->setQuery($where, '', 'campaign_name1', 'CAMPAIGNLOG'); |
||
181 | $ListView->setModStrings($mod_strings); |
||
182 | |||
183 | ob_start(); |
||
184 | $output_html .= get_form_header($mod_strings['LBL_LIST_FORM_TITLE'], $button, false); //FOR MULTI-SELECT |
||
185 | $ListView->processListView($seed_bean, 'main', 'CAMPAIGNLOG'); |
||
186 | $output_html .= ob_get_contents(); |
||
187 | ob_end_clean(); |
||
188 | |||
189 | $output_html .= insert_popup_footer(); |
||
190 | return $output_html; |
||
191 | } |
||
192 | } // end of class Popup_Picker |
||
193 | ?> |
This check looks for classes that have been defined more than once.
If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.
This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.