Example #1
0
function DisplayTable()
{
    $username = $_SESSION["username"];
    $idnum = $_SESSION["idnum"];
    $conn = new mysqli($_SESSION["servername"], $_SESSION["Dusername"], $_SESSION["Dpassword"], $_SESSION["dbname"]);
    // Check connection
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    $sql = "SELECT * FROM numbers WHERE AssignedUser='******' AND Response='CB' ORDER BY CBDate;";
    $result = mysqli_query($conn, $sql);
    echo "<form action='updatecallback.php' method='post'>";
    echo "<input type='submit' value='Edit'>";
    echo "<table border='6' style='width:100%' class='sortable'>";
    if (mysqli_num_rows($result) > 0) {
        echo "<tr>";
        echo "<td>X</td>";
        echorow("First Name");
        echorow("Last Name");
        echorow("Phone#");
        echorow("Address");
        echorow("Zone");
        echorow("CB Date");
        echorow("CB time");
        echorow("Transfered");
        echorow("Notes1");
        echorow("Notes2");
        echo "</tr>";
        RowTicker("start");
        while ($row = $result->fetch_assoc()) {
            RowTicker("next");
            $idkey = $row["IDNKey"];
            echo "<td><input type='radio' name='rad' value='{$idkey}'></td>";
            $nsql = "SELECT * FROM notes WHERE IDNKey='{$idkey}' AND AgentID='{$idnum}'";
            $nresult = mysqli_query($conn, $nsql);
            $nrow = $nresult->fetch_assoc();
            $text = $nrow["Text"];
            $nrow = $nresult->fetch_assoc();
            $text2 = $nrow["Text"];
            echorow($row["Fname"]);
            echorow($row["Lname"]);
            echorow($row["Pnumber"]);
            echorow($row["Address"]);
            echorow($row["Zone"]);
            echorow($row["CBDate"]);
            echorow($row["CBTime"]);
            echorow($row["OriginalCaller"]);
            echorow($text);
            echorow($text2);
            echo "</tr>";
        }
        $_SESSION["IDNKey"] = $row["MIN(IDNKey)"];
    }
    echo "</table>";
    echo "<input type='submit' value='Edit'>";
    echo "</form>";
}
Example #2
0
        echo "<tr>";
        $idQkey = $row["IDKey"];
        echo "<td><input type='radio' name='rad' value='{$idQkey}'></td>";
        //echorow($idQkey);
        $address = $row2["Address"];
        $addlink = "<a href='https://maps.google.com?saddr=Current+Location&daddr={$address}'>{$address}</a>";
        echorow($row2["Fname"]);
        echorow($row2["Lname"]);
        echorow($addlink);
        echorow($row2["Pnumber"]);
        echorow($row2["Zone"]);
        echorow($row2["FAge"]);
        echorow($row2["ACAge"]);
        echorow($row["Price"]);
        echorow($row["Expiry"]);
        echorow($row["DateIssued"]);
        echo "</tr>";
    }
    echo "</table>";
    echo "<input type='submit' value='submit'>";
    echo "</form>";
}
function echorow($p)
{
    echo "<td>{$p}</td>";
}
$pass = $_SESSION["password"];
$user = $_SESSION["username"];
echo "<form action='/login.php' method='post'>\t<input type='text' name='user' value='{$user}' hidden><br> <input type='text' name='pass' value='{$pass}' hidden><br>\nBack:<input type='submit' value='Main Menu'></form><br>";
?>
</body>
Example #3
0
echorow("Description");
echorow("ModelNum");
echorow("Boone ID");
echorow("Category");
echorow("Unit");
echo "</tr>";
RowTicker("start");
while ($row = $result->fetch_assoc()) {
    RowTicker("next");
    $id = $row["IDKey"];
    echo "<td><input type='radio' name='rad' value='{$id}'></td>";
    echorow($row["Description"]);
    echorow($row["ModelNum"]);
    echorow($row["BooneKey"]);
    echorow($row["Csym"]);
    echorow($row["Usym"]);
    echo "</tr>";
}
echo "</table>";
echo "<input type='submit' value='Edit'>";
echo "</form>";
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function RowTicker($go)
{
    if ($go == "start") {
        $GLOBALS["trc"] = 0;
    } else {
        if ($GLOBALS["trc"] == 1) {
Example #4
0
        $nsql = "SELECT * FROM numbers WHERE IDNKey='{$idn}'";
        $nresult = mysqli_query($conn, $nsql);
        $nrow = $nresult->fetch_assoc();
        $id = $row["IDKey"];
        echo "<td><input type='radio' name='rad' value='{$id}'></td>";
        echorow($nrow["Fname"]);
        echorow($nrow["Lname"]);
        echorow($nrow["Address"]);
        echorow($nrow["Pnumber"]);
        echocheck($brow["Fflag"]);
        echocheck($brow["Aflag"]);
        echocheck($brow["Tflag"]);
        echocheck($brow["Bflag"]);
        echocheck($row["Completed"]);
        echorow($row["DateofCompletion"]);
        echorow($row["EstCompletion"]);
        echo "</tr>";
    }
}
echo "</table>";
echo "<input type='submit' value='View'>";
echo "</form>";
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function echocheck($p)
{
    if ($p == '1') {
        echo "<td>&#10004;</td>";
    } else {
Example #5
0
function DisplayTable($sid)
{
    $conn = new mysqli($_SESSION["servername"], $_SESSION["Dusername"], $_SESSION["Dpassword"], $_SESSION["dbname"]);
    if ($conn->connect_error) {
        die("Connection failed: " . $conn->connect_error);
    }
    $bsql = "SELECT * FROM bookings WHERE SalesmanID='{$sid}'";
    $bresult = mysqli_query($conn, $bsql);
    echo "<table border='6' style='width:100%' class='sortable'>";
    echo "<tr>";
    echo "<td>X</td>";
    echo "<td title='Phone Number'>Pnumber</td>";
    echo "<td title='Customer First Name'>First Name</td>";
    echo "<td title='Customer Last Name'>Last Name</td>";
    echo "<td title='Customer Address'>Address</td>";
    echo "<td title='Date of the appointment'>Booking Date</td>";
    echo "<td title='Time of the Appointment'>Appointment Time</td>";
    echo "<td title='Age of the current A/C'>AC Age</td>";
    echo "<td title='Age of the current Furnace'>F Age</td>";
    echo "<td title='Whether this is a Furnace call'>F</td>";
    echo "<td title='Whether this is a A/C call'>A/C</td>";
    echo "<td title='Whether this is a Hot Water Tank call'>T</td>";
    echo "<td title='Whether this is a Boiler call'>B</td>";
    echo "<td title='Customers Cellphone Number'>CellNumber</td>";
    echo "<td title='Booking Agents Name'>First Contact</td>";
    echo "</tr>";
    RowTicker("start");
    while ($brow = $bresult->fetch_assoc()) {
        RowTicker("next");
        $appID = $brow["AppointmentID"];
        $idkey = $brow["IDKey"];
        $idnkey = $brow["IDNKey"];
        $ff = $brow["Fflag"];
        $af = $brow["Aflag"];
        $bf = $brow["Bflag"];
        $tf = $brow["Tflag"];
        $sql = "SELECT Fname,Lname,Address,Pnumber,Zone,FAge,ACAge,CellNumber,AssignedUser FROM numbers WHERE IDNKey='{$idnkey}';";
        $res2 = mysqli_query($conn, $sql);
        $row2 = $res2->fetch_assoc();
        $asql = "SELECT Date,Start,End FROM shifts WHERE IDKey='{$appID}';";
        $ares = mysqli_query($conn, $asql);
        $arow = $ares->fetch_assoc();
        $appdata = $arow["Date"] . ":" . $arow["Start"] . "-" . $arow["End"];
        $address = $row2["Address"];
        echo "<td><input type='radio' name='rad' value='{$idkey}'></td>";
        $address = "<a href='https://maps.google.com?saddr=Current+Location&daddr={$address}'>{$address}</a>";
        echorow($row2["Pnumber"]);
        echorow($row2["Fname"]);
        echorow($row2["Lname"]);
        echorow($address);
        echorow($brow["DateofBooking"]);
        echorow($appdata);
        echorow($row2["ACAge"]);
        echorow($row2["FAge"]);
        echocheck($ff);
        echocheck($af);
        echocheck($tf);
        echocheck($bf);
        echorow($row2["CellNumber"]);
        $id = $row2["AssignedUser"];
        $tsql = "SELECT FName,LName FROM agents WHERE IDKey='{$id}'";
        $res = mysqli_query($conn, $tsql);
        $trow = $res->fetch_assoc();
        echorow($trow["FName"] . $trow["LName"]);
        echo "</tr>";
    }
    echo "</table>";
}
Example #6
0
    $row2 = $res2->fetch_assoc();
    echo "<tr>";
    $idQkey = $row["IDKey"];
    echo "<td><input type='radio' name='rad' value='{$idQkey}'></td>";
    echorow($row2["Fname"]);
    echorow($row2["Lname"]);
    echorow($row2["Address"]);
    echorow($row2["Pnumber"]);
    echorow($row2["Zone"]);
    echorow($row2["FAge"]);
    echorow($row2["ACAge"]);
    echorow($row["Price"]);
    echorow($row["Expiry"]);
    echorow($row["DateIssued"]);
    echorow($row2["Comments1"]);
    echorow($row2["Comments2"]);
    echo "</tr>";
}
echo "</table>";
echo "<input type='submit' value='submit'>";
echo "</form>";
function echorow($p)
{
    echo "<td>{$p}</td>";
}
$pass = $_SESSION["password"];
$user = $_SESSION["username"];
echo "<form action='/login.php' method='post'>\t<input type='text' name='user' value='{$user}' hidden><br> <input type='text' name='pass' value='{$pass}' hidden><br>\nBack:<input type='submit' value='Main Menu'></form><br>";
?>
</body>
</html>
Example #7
0
while ($row = $result->fetch_assoc()) {
    $agent = $row["AgentID"];
    $amount = $row["Amount"];
    $week = $row["WID"];
    $type = $row["Type"];
    $com = $row["Comment"];
    $method = $row["Method"];
    $idkey = $row["IDKey"];
    echo "<tr>";
    echo "<td><input type='radio' name='appid' value='{$idkey}'></td>";
    echorow($agent);
    echorow($amount);
    echorow($week);
    echorow($type);
    echorow($com);
    echorow($method);
    echo "</tr>";
}
echo "</table>";
echo "<input type='submit' value='submit'>";
echo "</form>";
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function echocheck($p)
{
    if ($p == '1') {
        echo "<td>&#10004;</td>";
    } else {
        echo "<td> &#10006; </td>";
Example #8
0
session_start();
$conn = new mysqli($_SESSION["servername"], $_SESSION["Dusername"], $_SESSION["Dpassword"], $_SESSION["dbname"]);
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "<form actions='/Inventory/savestock.php' method='post'>";
echo "<table class='sortable'>";
$zsql = "SELECT * FROM items";
$result = mysqli_query($conn, $zsql);
while ($row = $result->fetch_assoc()) {
    RowTicker("next");
    $z = $row["Description"];
    $idkey = $row["IDKey"];
    $stock = $row["Stock"];
    echorow($z);
    echorow($stock);
    echo "</tr>";
}
echo "</table>";
echo "</form>";
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function RowTicker($go)
{
    if ($go == "start") {
        $GLOBALS["trc"] = 0;
    } else {
        if ($GLOBALS["trc"] == 1) {
            $GLOBALS["trc"];
Example #9
0
    }
    echo "<td><form action='/Admin/ooCDR.php' method='post'><input type='submit' value='CDR'></form></td>";
    echo "</tr>";
    echo "</table>";
    echo "</div>";
}
if ($accountype == 0 || $accountype == "7") {
    echo "<div id='HUDsect'>";
    echo "<table class='invis'>";
    $sql = "SELECT * FROM reminders WHERE AgentID='{$idnum}' AND Note='1' ORDER BY Date DESC";
    $result = mysqli_query($conn, $sql);
    for ($i = 0; $i < 4; $i++) {
        echo "<tr>";
        $row = $result->fetch_assoc();
        $txt = $row["Text"];
        echorow($txt);
        echo "</tr>";
    }
    echo "</table>";
    echo "</div>";
}
function echorow($p)
{
    echo "<td class='HUD'>{$p}</td>";
}
function echorowB($p)
{
    echo "<td class='calendar-row'>{$p}</td>";
}
function echocheck($p)
{
Example #10
0
echo "<td title='Service Call?'>S</td>";
echo "</tr>";
RowTicker("start");
while ($row = $result->fetch_assoc()) {
    RowTicker("next");
    $idkey = $row["IDKey"];
    $appdata = $row["Date"] . ":" . $row["Start"] . "-" . $row["End"];
    $idqkey = "";
    echo "<td><input type='radio' name='rad' value='{$idkey}'></td>";
    echorow($row["Fname"]);
    echorow($row["Lname"]);
    echorow($row["Address"]);
    echorow($row["DateofBooking"]);
    echorow($appdata);
    echorow($row["ACAge"]);
    echorow($row["FAge"]);
    echocheck($row["Fflag"]);
    echocheck($row["Aflag"]);
    echocheck($row["Tflag"]);
    echocheck($row["Bflag"]);
    echocheck($row["Sflag"]);
    echo "</tr>";
}
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function echocheck($p)
{
    if ($p == '1') {
        echo "<td>&#10004;</td>";
Example #11
0
function echovalid($p)
{
    if ($p != 0) {
        echorow($p);
    } else {
        echorow("-");
    }
}
Example #12
0
    $pnum = $row["Pnumber"];
    $add = $row["Address"];
    $Aname = $row["Aname"];
    $cell = $row["CellNumber"];
    $add = "<a href='https://maps.google.com?saddr=Current+Location&daddr={$add}'>{$add}</a>";
    echorow("{$pnum}");
    echorow("{$cusn}");
    echorow("{$add}");
    echorow("{$date}");
    echorow("{$time}");
    echorow("{$fage}");
    echorow("{$acage}");
    $temp = echocheck($fflag) . echocheck($aflag) . echocheck($tflag) . echocheck($bflag) . echocheck($sflag);
    echo "<td>{$temp}</td>";
    echorow("{$cell}");
    echorow("{$Aname}");
    echo "</tr>";
}
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function echocheck($p)
{
    if ($p == '1') {
        return "&#10004";
    } else {
        return "&#10006";
    }
}
function RowTicker($go)
Example #13
0
echo "<table border='6' style='width:100%' class='sortable'>";
echo "<tr>";
echo "<td>X</td>";
echorow("Date of Shift");
echorow("Start");
echorow("End");
echorow("Date Booked");
echo "</tr>";
while ($row = $result->fetch_assoc()) {
    echo "<tr>";
    $key = $row["IDKey"];
    echo "<td><input type='radio' name='rad' value='{$key}'></td>";
    echorow($row["Date"]);
    echorow($row["Start"]);
    echorow($row["End"]);
    echorow($row["DateBooked"]);
    echo "</tr>";
}
function echorow($p)
{
    echo "<td>{$p}</td>";
}
echo "edit:<input type='submit' value='Edit'>";
echo "</table>";
echo "</form>";
$pass = $_SESSION["password"];
$user = $_SESSION["username"];
echo "<form action='/login.php' method='post'>\t<input type='text' name='user' value='{$user}' hidden><br> <input type='text' name='pass' value='{$pass}' hidden><br>\nBack:<input type='submit' value='Main Menu'></form><br>";
?>
</body>
</html>
Example #14
0
        //Date of Appointment
        echorow(echocheck($f) . echocheck($a) . echocheck($t) . echocheck($b));
        //Flags
        echorow($value);
        //Value
        echorow("");
        //Followup Update
        echorow(echocheck($cd));
        //ConverteD?
        echorow("{$cd}");
        //Date of install
        echorow("{$paydate}");
        //Front End Pay Date
        echorow("{$backpay}");
        //Back End Pay Date
        echorow("");
        //Pay Data
        echo "</tr>";
    }
}
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function echocheck($p)
{
    if ($p > '0') {
        return "&#10004";
    } else {
        return "&#10006";
    }
Example #15
0
echorow("Quantity");
echorow("Price");
echo "</tr>";
RowTicker("start");
while ($row = $result->fetch_assoc()) {
    RowTicker("next");
    $iID = $row["ItemID"];
    $bsql = "SELECT * FROM items WHERE IDKey='{$iID}'";
    $bresult = mysqli_query($conn, $bsql);
    $brow = $bresult->fetch_assoc();
    echo "<td><input type='radio' name='rad' value='{$iID}'></td>";
    echorow($brow["Category"]);
    echorow($brow["ModelNum"]);
    echorow($brow["Description"]);
    echorow($row["sum(Quantity)"]);
    echorow($brow["Price"]);
    echo "</tr>";
}
echo "</table>";
echo "<input type='submit' value='Edit'>";
echo "</form>";
function printoption($conn)
{
    echo "<option value='-1'>None</option>";
    $zsql = "SELECT * FROM items";
    $result = mysqli_query($conn, $zsql);
    while ($row = $result->fetch_assoc()) {
        $z = $row["Description"];
        $idkey = $row["IDKey"];
        echo "<option value='{$idkey}'>{$z}</option>";
    }