inalilbubble Posted June 1, 2007 Share Posted June 1, 2007 Hi I am getting the following error but I can't seem to figure out why. Parse error: parse error, unexpected T_ELSEIF in /home/woodluck/public_html/admin/orders.php on line 376 Heres the bit of code thats causing the error. Line 376 is red. <?phpif (isset($HTTP_GET_VARS['cID'])); { $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.shipdate, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; } elseif (isset($HTTP_GET_VARS['status'])) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { $status = tep_db_prepare_input($HTTP_GET_VARS['status']); $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.shipdate, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.shipdate, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } $orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows); $orders_query = tep_db_query($orders_query_raw); while ($orders = tep_db_fetch_array($orders_query)) { if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID']) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']))) && !isset($oInfo)) { $oInfo = new objectInfo($orders); } if (isset($oInfo) && is_object($oInfo) && ($orders['orders_id'] == $oInfo->orders_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n"; } ?> Link to comment Share on other sites More sharing options...
sugiartha Posted June 1, 2007 Share Posted June 1, 2007 elseif (isset($HTTP_GET_VARS['status'])) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) you have many ) elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) Sugiartha ------------------------------------------ concept of life: enjoy aja! Link to comment Share on other sites More sharing options...
inalilbubble Posted June 1, 2007 Author Share Posted June 1, 2007 you have many ) elseif (isset($HTTP_GET_VARS['status']) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) Still getting the error :/ Link to comment Share on other sites More sharing options...
sugiartha Posted June 1, 2007 Share Posted June 1, 2007 <?phpif (isset($HTTP_GET_VARS['cID'])); { should be <?php if (isset($HTTP_GET_VARS['cID'])) { Sugiartha ------------------------------------------ concept of life: enjoy aja! Link to comment Share on other sites More sharing options...
inalilbubble Posted June 1, 2007 Author Share Posted June 1, 2007 <?phpif (isset($HTTP_GET_VARS['cID'])); { should be <?php if (isset($HTTP_GET_VARS['cID'])) { O Thanks! I didnt see that. But I am still getting the error :( I dont know what it is. Link to comment Share on other sites More sharing options...
Qihun Posted June 1, 2007 Share Posted June 1, 2007 while ($orders = tep_db_fetch_array($orders_query)) { if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID']) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']))) && !isset($oInfo)) { $oInfo = new objectInfo($orders); } I might be wrong , but it seems like not enough brackets here Link to comment Share on other sites More sharing options...
inalilbubble Posted June 1, 2007 Author Share Posted June 1, 2007 Thanks for the responses but it seems as though nothing is helping I am still getting the exact same error. Below is the line that is causing the error. It looks fine to me but I just don't know. elseif (isset($HTTP_GET_VARS['status'])) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { Link to comment Share on other sites More sharing options...
♥FWR Media Posted June 1, 2007 Share Posted June 1, 2007 <?php if (isset($HTTP_GET_VARS['cID'])) { $cID = tep_db_prepare_input($HTTP_GET_VARS['cID']); $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.shipdate, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int)$cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by orders_id DESC"; } elseif (isset($HTTP_GET_VARS['status'])) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) { $status = tep_db_prepare_input($HTTP_GET_VARS['status']); $orders_query_raw = "select o.orders_id, o.customers_name, o.payment_method, o.date_purchased, o.shipdate, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and s.orders_status_id = '" . (int)$status . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_name, o.customers_id, o.payment_method, o.date_purchased, o.shipdate, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int)$languages_id . "' and ot.class = 'ot_total' order by o.orders_id DESC"; } $orders_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows); $orders_query = tep_db_query($orders_query_raw); while ($orders = tep_db_fetch_array($orders_query)) { if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID'])) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']) && !isset($oInfo)) { $oInfo = new objectInfo($orders); } if ((isset($oInfo)) && (is_object($oInfo)) && ($orders['orders_id'] == $oInfo->orders_id)) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_ORDERS, tep_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']) . '\'">' . "\n"; } ?> Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
inalilbubble Posted June 1, 2007 Author Share Posted June 1, 2007 okay that seemed to correct the elseif issue but now I get this: Parse error: parse error, unexpected T_BOOLEAN_AND in /home/woodluck/public_html/admin/orders.php on line 378 Line 387 (as you may have guessed it) elseif (isset($HTTP_GET_VARS['status'])) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) AHHHHHHHHH! This is becoming extremely frustrating! Thanks for all the help guys! Link to comment Share on other sites More sharing options...
inalilbubble Posted June 1, 2007 Author Share Posted June 1, 2007 Ok nevermind, fixed the previous issue, one to many ) anyways now I get this: Parse error: parse error, unexpected '{' in /home/woodluck/public_html/admin/orders.php on line 387 Line 387: if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID'])) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']) && !isset($oInfo)) { Link to comment Share on other sites More sharing options...
kewldude_3001 Posted June 1, 2007 Share Posted June 1, 2007 im no expert but what if u delete the '{' ??? its either that or ur missing the closing '}' Link to comment Share on other sites More sharing options...
inalilbubble Posted June 1, 2007 Author Share Posted June 1, 2007 Ok nevermind, fixed the previous issue, one to many ) anyways now I get this: Parse error: parse error, unexpected '{' in /home/woodluck/public_html/admin/orders.php on line 387 Line 387: if ((!isset($HTTP_GET_VARS['oID']) || (isset($HTTP_GET_VARS['oID'])) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']) && !isset($oInfo)) { EDIT: Figured it out. I love compare it! software I just compared my modified file to the original and found many many ) where the werent supposed to be. Again, thanks for all the help Link to comment Share on other sites More sharing options...
♥FWR Media Posted June 1, 2007 Share Posted June 1, 2007 My mistake } elseif ((isset($HTTP_GET_VARS['status'])) && is_numeric($HTTP_GET_VARS['status']) && ($HTTP_GET_VARS['status'] > 0)) Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
♥FWR Media Posted June 1, 2007 Share Posted June 1, 2007 if ( (!isset($HTTP_GET_VARS['oID'])) || (isset($HTTP_GET_VARS['oID'])) && ($HTTP_GET_VARS['oID'] == $orders['orders_id']) && (!isset($oInfo)) ) { Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.