function shipworks() { // using output buffering to get around headers that magento is setting after we've started output ob_start(); header("Content-Type: text/xml;charset=utf-8"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // HTTP/1.1 header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); // HTTP/1.0 header("Pragma: no-cache"); // Open the XML output and root writeXmlDeclaration(); writeStartTag("ShipWorks", array("moduleVersion" => SHIPWORKS_MODULE_VERSION, "schemaVersion" => SHIPWORKS_SCHEMA_VERSION)); // If the admin module is installed, we make use of it if (checkAdminLogin()) { $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 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 'updateorder': Action_UpdateOrder(); break; case 'updatestatus': Action_UpdateStatus(); break; case 'updateshipment': Action_UpdateShipment(); break; default: outputError(20, "'{$action}' is not supported."); } } // Close the output writeCloseTag("ShipWorks"); // end output ob_end_flush(); }
<?php include "includes/app_top.php"; $pcat = "Website"; $pagetitle = "Report Problem"; $getid = getid('id'); checkAdminLogin(); checkState(); include "includes/styles.php"; ?> <?php include "includes/colorbox.php"; ?> </head> <body> <?php include "includes/header.php"; include "includes/side-bar.php"; ?> <div class="pageHeadingBlock "> <div class="grayBackground"> <h3 class="title">Report Problem</h3> <div class="sectionTabNav"> <?php echo $tab_website; ?> </div> </div> </div>
echo "<br>" . $mysql; $link = mysql_connect($host, $user, $password); if ($link) { $result = mysql_db_query("abckitchen", $mysql); while ($row = mysql_fetch_array($result)) { echo $row["employeeName"]; return $row["employeeName"]; } return 0; } else { echo "NO failed"; return 0; } } if ($_SERVER["REQUEST_METHOD"] == "POST") { echo checkAdminLogin($userName); if (checkLogin($userName, $password)) { $_SESSION['userName'] = $userName; $_SESSION['employeeNumber'] = getemployeeNumberByUsername($userName); $_SESSION['employeeName'] = getemployeeNameByUsername($userName); header("Location: index.php"); } else { $notificaiton = "Đăng nhập không thành công, xin hãy thử lại!"; } } ?> <!----start-header-----> <div class="header"> <div class="wrap">
writeXmlDeclaration(); writeStartTag("ShipWorks", array("moduleVersion" => $moduleVersion, "schemaVersion" => $schemaVersion)); try { // start the mage engine Mage::app($storeCode); } catch (Mage_Core_Model_Store_Exception $e) { outputError(100, "Invalid Store Code."); writeCloseTag("ShipWorks"); exit; } // Enforse SSL if (!$secure && REQUIRE_SECURE) { outputError(10, 'A secure (https://) connection is required.'); } else { // If the admin module is installed, we make use of it if (checkAdminLogin()) { $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : ''; 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':
if ($loginResult == -3) { $error = "Login and registration are currently disabled."; } else { if ($loginResult == -1) { $error = "Login information is not correct."; } else { $error = "Internal error!"; } } } } } //only continue if we haven't failed already if (isset($_SESSION['user_id'])) { $attempt_club_id = escape(intval($_REQUEST['club'])); $checkResult = checkAdminLogin($_SESSION['user_id'], $_REQUEST['password'], $attempt_club_id); if ($checkResult === TRUE) { $_SESSION['admin'] = true; $_SESSION['admin_club_id'] = $attempt_club_id; //make sure a admin_notes_settings entry exists for this user $result = mysql_query("SELECT COUNT(*) FROM admin_notes_settings WHERE user_id = '" . $_SESSION['user_id'] . "'"); $row = mysql_fetch_row($result); if ($row[0] == 0) { mysql_query("INSERT INTO admin_notes_settings (user_id, box_enabled, cat_enabled, comment_enabled) VALUES ('" . $_SESSION['user_id'] . "', '0', '0', '0')"); } } else { if ($checkResult === -1) { $error = "Login information is not correct."; } else { if ($checkResult === -2) { $error = "Please try again later (you are locked out for too many failed attempts).";