Projekt

Allgemein

Profil

GX-Bug #49976 » OrdersStatusAdminBoxFix.patch

Till Tepelmann, 20.01.2017 16:23

Unterschiede anzeigen:

src/system/classes/accounts/AdminBoxContentView.inc.php (revision )
142 142
	{
143 143
		$t_result = xtc_db_query("SELECT
144 144
										orders_status_name,
145
										orders_status_id
146
									FROM " . TABLE_ORDERS_STATUS . "
147
									WHERE language_id = '" . (int)$_SESSION['languages_id'] . "'");
145
										orders_status_id,
146
										count(orders_id) as count
147
									FROM " . TABLE_ORDERS_STATUS . ", " .TABLE_ORDERS."
148
									WHERE language_id = '" . (int)$_SESSION['languages_id'] . "'
149
									AND orders.orders_status = orders_status_id group by orders_status_id
150
									");
148 151
		while($t_orders_status_array = xtc_db_fetch_array($t_result))
149 152
		{
150
			$t_result2 = xtc_db_query("SELECT count(*) AS count
151
													FROM " . TABLE_ORDERS . "
152
													WHERE orders_status = '" . $t_orders_status_array['orders_status_id'] . "'");
153
			$t_orders_pending_array = xtc_db_fetch_array($t_result2);
154 153
			$t_url = "'".xtc_href_link_admin(FILENAME_ORDERS, 'selected_box=customers&status=' . $t_orders_status_array['orders_status_id'], 'NONSSL')."'";
155 154
			if($_SESSION['style_edit_mode'] == 'edit')
156 155
			{
157
				$this->contentsArray[] = '<a href="#" onclick="if(confirm(\'' . ADMIN_LINK_INFO_TEXT . '\')){window.location.href='.$t_url.'; return false;} return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_pending_array['count'];
156
				$this->contentsArray[] = '<a href="#" onclick="if(confirm(\'' . ADMIN_LINK_INFO_TEXT . '\')){window.location.href='.$t_url.'; return false;} return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_status_array['count'];
158 157
			}
159 158
			else
160 159
			{
161
				$this->contentsArray[] = '<a href="#" onclick="window.location.href='.$t_url.'; return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_pending_array['count'];
160
				$this->contentsArray[] = '<a href="#" onclick="window.location.href='.$t_url.'; return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_status_array['count'];
162 161
			}
163 162
		}
164 163
	}
......
167 166
	{
168 167
		$t_result = xtc_db_query("SELECT
169 168
										orders_status_name,
170
										orders_status_id
171
									FROM " . TABLE_ORDERS_STATUS . "
172
									WHERE language_id = '" . (int)$_SESSION['languages_id'] . "'");
169
										orders_status_id,
170
										count(orders_id) as count
171
									FROM " . TABLE_ORDERS_STATUS . ", " .TABLE_ORDERS."
172
									WHERE language_id = '" . (int)$_SESSION['languages_id'] . "'
173
									AND orders.orders_status = orders_status_id group by orders_status_id"
174
		);
173 175
		while($t_orders_status_array = xtc_db_fetch_array($t_result))
174 176
		{
175
			$t_result2 = xtc_db_query("SELECT count(*) AS count
176
													FROM " . TABLE_ORDERS . "
177
													WHERE orders_status = '" . $t_orders_status_array['orders_status_id'] . "'");
178
			$t_orders_pending_array = xtc_db_fetch_array($t_result2);
177

  
179 178
			$t_url = "'".xtc_href_link_admin(FILENAME_ORDERS, 'selected_box=customers&status=' . $t_orders_status_array['orders_status_id'], 'NONSSL')."'";
180 179
			if($_SESSION['style_edit_mode'] == 'edit')
181 180
			{
182
				$this->contents .= '<a href="#" onclick="if(confirm(\'' . ADMIN_LINK_INFO_TEXT . '\')){window.location.href='.$t_url.'; return false;} return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_pending_array['count'] . '<br />';
181
				$this->contents .= '<a href="#" onclick="if(confirm(\'' . ADMIN_LINK_INFO_TEXT . '\')){window.location.href='.$t_url.'; return false;} return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_status_array['count'] . '<br />';
183 182
			}
184 183
			else
185 184
			{
186
				$this->contents .= '<a href="#" onclick="window.location.href='.$t_url.'; return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_pending_array['count'] . '<br />';
185
				$this->contents .= '<a href="#" onclick="window.location.href='.$t_url.'; return false;">' . $t_orders_status_array['orders_status_name'] . '</a>: ' . $t_orders_status_array['count'] . '<br />';
187 186
			}
188 187
		}
189 188
	}
    (1-1/1)