function getLocation($status, $data)
{
    $DB = new conn();
    $DB->connect();
    $location = "";
    if ($status == 1) {
        // Get Office Location
        $sql = "select storagelocation_name from storagelocations where storagelocation_id = " . $data;
        $location = $DB->query_scalar($sql) . "<br /><br />";
    }
    if ($status == 2) {
        // Get Employee Address
        $sql = "select Username from users where user_id = " . $data;
        $location = $DB->query_scalar($sql) . "<br /><br />";
    }
    if ($status == 3) {
        $location = "Transferred<br/>";
    }
    if ($status == 4 || $status == 5) {
        // Get customer address
        $sql = "select contacts.* from orders join contacts on orders.contact_id = contacts.contact_id where orders.order_id = " . $data;
        $result = $DB->query($sql);
        if ($result) {
            $row = mysql_fetch_assoc($result);
            $location = $row["contact_address"] . "<br />" . $row["contact_city"] . " " . $row["contact_state"] . ", " . $row["contact_zipcode"];
        }
    }
    return $location;
}
Exemple #2
0
 public function LoadData()
 {
     $DB = new conn();
     $DB->connect();
     $sql = "SELECT * FROM finance_options";
     $result = $DB->query($sql);
     while ($row = mysql_fetch_assoc($result)) {
         $financeDetails[] = $row;
     }
     $DB->close();
     return $financeDetails;
 }
Exemple #3
0
<?php

include "./findconfig.php";
include $_SERVER['DOCUMENT_ROOT'] . "/" . $ROOTPATH . "/Includes/Top.php";
$DB = new conn();
$DB->connect();
$sql = "Select * from StorageLocations";
$result = $DB->query($sql);
if ($result) {
    ?>
 <TABLE class="data">
		<th>id</th>
		<th>Location Name</th>
		<th>Commands</th>
		 <?php 
    while ($row = mysql_fetch_assoc($result)) {
        ?>
		<TR><TD><?php 
        echo $row["storagelocation_id"];
        ?>
</TD>
	    <TD><?php 
        echo $row["storagelocation_name"];
        ?>
 </TD>
		<TD><a href="#">Edit</a></TD>
		</TR>
		<?php 
    }
    ?>
 </TABLE> <?php 
Exemple #4
0
<?php

include "./findconfig.php";
include $_SERVER['DOCUMENT_ROOT'] . "/" . $ROOTPATH . "/Includes/Top.php";
$F = new FormElements();
$db = new conn();
$firephp->log($_REQUEST);
if ($_REQUEST["report"]) {
    // Inventory Report
    if ($_REQUEST["report"] == "inventory") {
        if ($_REQUEST["StartDate"] && $_REQUEST["EndDate"]) {
            $db->connect();
            $startDate = $db->Sanitize($_REQUEST["StartDate"]);
            $endDate = $db->Sanitize($_REQUEST["EndDate"]);
            $productType = $db->Sanitize($_REQUEST["ProductType"]);
            $db->close();
            header("Location: NexusReport_Inventory.php?startDate=" . $startDate . "&endDate=" . $endDate . "&productType=" . $productType);
        }
    }
    $firephp->log($_REQUEST["report"]);
    $firephp->log($_REQUEST["generalSalesStartDate"]);
    $firephp->log($_REQUEST["generalSalesEndDate"]);
    // Individual Sale
    if ($_REQUEST["report"] == "IndividualOrder") {
        if ($_REQUEST["OrderID"]) {
            $db->connect();
            $order_id = $DB->sanitize($_REQUEST["OrderID"]);
            $db->close();
            header("Location: NexusReport_IndividualOrder.php?OrderID=" . $order_id);
        }
    }
Exemple #5
0
 public function delete($where, $tabela)
 {
     /**
      *@param deleta registro no banco de dados
      *@return retorna 1 caso não ocorra erro
      *@throws $e
      */
     try {
         $con = new conn();
         $con->connect();
         return $con->mysqli->query("DELETE FROM " . $tabela . " WHERE " . $where . "");
     } catch (mysqli_sql_exception $e) {
         return $this->errors($e, "delete");
     }
 }
Exemple #6
0
    function ddlTeams($selected = "", $css = "")
    {
        ?>
	 <li class="validated" style="<?php 
        echo $css;
        ?>
" id="tbTeams_li">
                  <label for="r_tbTeams">Team:</label>
                  <div id="tbTeams_img"></div>
					<select class="validated" name="Teams" id="ddlTeams" >
						<?php 
        $DB = new conn();
        $DB->connect();
        $perms = $DB->getTeams();
        $DB->close();
        foreach ($perms as $perm) {
            ?>
<OPTION value="<?php 
            echo $perm["team_id"];
            ?>
"><?php 
            echo $perm["team_name"];
            ?>
 (<?php 
            echo $perm["LastName"];
            ?>
)</OPTION><?php 
        }
        ?>
					</SELECT>
                  <div id="tbTeams_msg"></div>
          </li>
			<?php 
        if ($selected) {
            ?>
		  <SCRIPT type="text/javascript">
			$('#ddl<?php 
            echo $id;
            ?>
').val("<?php 
            echo $selected;
            ?>
");
		  </SCRIPT>
			<?php 
        }
        ?>
		<?php 
    }