I recently upgraded to the new stamps.com software, and you now install it in the admin folder, and it goes straight to the database. It is working flawlessly, except it sets an error in the log folder every time.
I had to edit out the admin folder name, and login credentials on this:
Lines 171-179Code:[18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:828] #2 GetCountryID() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:846] #3 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:492] #4 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #5 Action_GetOrders() called at [/home2/redsauto/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): Access denied for user 'XXXXXXXXXXXXXXXX'@'localhost' (using password: NO) in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 828 [18-Sep-2015 10:07:27 America/Denver] Request URI: XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:828] #2 GetCountryID() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:846] #3 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:492] #4 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #5 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 828 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:855] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:492] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): Access denied for user 'XXXXXXXXXXXXXXXX'@'localhost' (using password: NO) in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 855 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:855] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:492] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 855 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:856] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:492] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): Access denied for user 'XXXXXXXXXXXXXXXX'@'localhost' (using password: NO) in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 856 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:856] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:492] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 856 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:828] #2 GetCountryID() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:846] #3 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:506] #4 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #5 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): Access denied for user 'XXXXXXXXXXXXXXXX'@'localhost' (using password: NO) in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 828 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:828] #2 GetCountryID() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:846] #3 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:506] #4 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #5 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 828 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:855] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:506] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): Access denied for user 'XXXXXXXXXXXXXXXX'@'localhost' (using password: NO) in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 855 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:855] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:506] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 855 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:856] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:506] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): Access denied for user 'XXXXXXXXXXXXXXXX'@'localhost' (using password: NO) in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 856 [18-Sep-2015 10:07:27 America/Denver] Request URI: /XXXXXXXXXXXXXXXX/stamps.php?username=XXXXXXXXXXXXXXXX&password=XXXXXXXXXXXXXXXX&action=getorders&maxcount=50&start=2015-09-17T22%3A00%3A51, IP address: 216.52.211.20 #1 mysql_real_escape_string() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:856] #2 GetStateCode() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:506] #3 WriteOrder() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:384] #4 Action_GetOrders() called at [/home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php:176] [18-Sep-2015 10:07:27 America/Denver] PHP Warning: mysql_real_escape_string(): A link to the server could not be established in /home2/redsauto/public_html/XXXXXXXXXXXXXXXX/stamps.php on line 856
lines 381-387Code:switch (strtolower($action)) { case 'getmodule': Action_GetModule(); break; case 'getstore': Action_GetStore(); break; case 'getcount': Action_GetCount(); break; case 'getorders': Action_GetOrders(); break; case 'getstatuscodes': Action_GetStatusCodes(); break; case 'updatestatus': Action_UpdateStatus(); break; default: outputError(60, "'$action' not supported");
lines 485-497Code:$processedIds .= $row->fields['orders_id']; // output the order xml WriteOrder($row); // Next order $row->MoveNext();
lines 824-867Code:writeStartTag("ShippingAddress"); writeElement("FullName", $row->fields['delivery_name']); writeElement("Company", $row->fields['delivery_company']); writeElement("Street1", $row->fields['delivery_street_address']); writeElement("Street2", $row->fields['delivery_suburb']); writeElement("Street3", ""); writeElement("City", $row->fields['delivery_city']); writeElement("State", GetStateCode($row->fields['delivery_country'], $row->fields['delivery_state'])); writeElement("PostalCode", $row->fields['delivery_postcode']); writeElement("Country", $row->fields['delivery_country']); writeElement("Phone", $shipPhone); writeElement("Email", $shipEmail); writeCloseTag("ShippingAddress");
Code:function GetCountryID($country_name) { global $db; $qry = sprintf("select countries_id from ". TABLE_COUNTRIES. " where countries_name = '%s'", mysql_real_escape_string($country_name)); $countryQuery = $db->Execute($qry); if ($countryQuery->RecordCount() == 0) { return $country_name; } else { return $countryQuery->fields['countries_id']; } } // Returns the state code for a given state and country name function GetStateCode($country_name, $state_name) { global $db; $country_id = GetCountryID($country_name); if ($country_id == '') { return $state_name; } // now lookup the state code based on countryid and state name $qry = sprintf("select zone_code from ". TABLE_ZONES. " where zone_country_id = '%s' and zone_name = '%s'", mysql_real_escape_string($country_id), mysql_real_escape_string($state_name)); $stateQuery = $db->Execute($qry); if ($stateQuery->RecordCount() == 0) { return $state_name; } else { return $stateQuery->fields['zone_code']; } }


Reply With Quote

