コード例 #1
0
ファイル: jobs.php プロジェクト: CoolHeatCRM/CRM
        $brow = $bresult->fetch_assoc();
        $idn = $brow["IDNKey"];
        $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') {
コード例 #2
0
ファイル: admin.php プロジェクト: TopGrd/newxb
;width:300px;" id=admindiv>
<ul>
<li>添加用户:<input type=checkbox name=adduser <?php 
                            echocheck($g["adduser"]);
                            ?>
 />
<li>删除用户:<input type=checkbox name=deluser <?php 
                            echocheck($g["deluser"]);
                            ?>
 />
<li>添加组:<input type=checkbox name=addgroup <?php 
                            echocheck($g["addgroup"]);
                            ?>
 />
<li>删除组:<input type=checkbox name=delgroup <?php 
                            echocheck($g["delgroup"]);
                            ?>
 />
</ul>
</div>
<input type=submit value=更新>&nbsp;<input type=reset value=重设>
</form>
</div>
<?php 
                        } else {
                            if ($action == "update") {
                                echo "<div>";
                                echo "<script language=javascript src='http://www.longbill.cn/update/update.php?v={$v}'></script>";
                                echo "</div>";
                            } else {
                                echo "<div>没有权限!</div>";
コード例 #3
0
ファイル: viewagents.php プロジェクト: CoolHeatCRM/CRM
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>";
}
コード例 #4
0
ファイル: viewquotes.php プロジェクト: CoolHeatCRM/CRM
$_SESSION["when"] = $when;
$sql = "SELECT bookings.Fflag,bookings.Aflag,bookings.Tflag,bookings.Bflag,bookings.Sflag,numbers.Address,numbers.Email,quotes.Price,quotes.Expiry,quotes.DateIssued,quotes.IDBKey,quotes.IDKey,quotes.IDNKey,CONCAT(numbers.Fname,' ',numbers.Lname) AS name,numbers.Pnumber,numbers.Zone FROM numbers INNER JOIN quotes ON quotes.IDNKey=numbers.IDNKey INNER JOIN bookings ON numbers.IDNKey=bookings.IDNKey WHERE quotes.SalesmanID='{$idnum}' AND quotes.Approved IS NULL\n\t\tAND (quotes.DateIssued LIKE '%{$when}%' OR quotes.IDKey LIKE '%{$what}%' OR numbers.IDNKey LIKE '%{$what}%' OR numbers.Lname LIKE '%{$what}%' OR numbers.Fname LIKE '%{$what}%' OR numbers.Zone LIKE '%{$what}%' OR numbers.Pcode LIKE '%{$what}%' OR numbers.Address LIKE '%{$what}%' OR numbers.Pnumber LIKE '%{$what}%') ORDER by quotes.DateIssued DESC";
$result = mysqli_query($conn, $sql);
echo "<table cellpadding='0' cellspacing='0' class='calendar'>";
while ($row = $result->fetch_assoc()) {
    $nID = $row["IDNKey"];
    $bID = $row["IDBKey"];
    $idQkey = $row["IDKey"];
    $address = $row["Address"];
    $address = "<a href='https://maps.google.com?saddr=Current+Location&daddr={$address}'>{$address}</a>";
    $date = $row["DateIssued"];
    $fflag = echocheck($row["Fflag"]);
    $aflag = echocheck($row["Aflag"]);
    $tflag = echocheck($row["Tflag"]);
    $bflag = echocheck($row["Bflag"]);
    $sflag = echocheck($row["Sflag"]);
    $name = $row["name"];
    $pnum = $row["Pnumber"];
    echo "<b>{$date}</b><br>";
    echo "<form action='/SalesAgents/updatebookings.php' method='post'><input type='submit' class='dayviewbutton' value='{$name}'><input type='text' name='rad' value='{$bID}'hidden></form><br>";
    echo "{$pnum}<br>";
    echo "{$address}<br>";
    echo "{$fflag}{$aflag}{$bflag}{$tflag}{$sflag}<br><br>";
}
echo "</table>";
function echorow($p)
{
    echo "<td>{$p}</td>";
}
function echocheck($p)
{
コード例 #5
0
ファイル: bookingshow.php プロジェクト: CoolHeatCRM/CRM
    $sflag = $row["Sflag"];
    $date = $row["Date"];
    $time = $row["time"];
    $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";
コード例 #6
0
ファイル: viewReminders.php プロジェクト: CoolHeatCRM/CRM
    echo $wrow["Start"] . "-" . $wrow["End"] . "<br><br>";
}
$result = mysqli_query($conn, $sql);
echo "<table cellpadding='0' cellspacing='0' class='calendar'>";
while ($row = $result->fetch_assoc()) {
    $name = $row["name"];
    $text = $row["Text"];
    $date = $row["Date"];
    $add = $row["Address"];
    $add = "<a href='https://maps.google.com?saddr=Current+Location&daddr={$add}'>{$add}</a>";
    $pnum = $row["Pnumber"];
    $email = $row["Email"];
    $fflag = echocheck($row["Fflag"]);
    $aflag = echocheck($row["Aflag"]);
    $tflag = echocheck($row["Tflag"]);
    $bflag = echocheck($row["Bflag"]);
    $idn = $row["IDNKey"];
    echo "<b>{$date}</b><br>";
    echo "<form action='/SalesAgents/updatebookings.php' method='post'><input type='submit' class='dayviewbutton' value='{$text}'><input type='text' name='rad' value='{$idn}'hidden></form><br>";
    echo "{$name}: {$pnum}<br>";
    echo "{$email}  {$add}<br>";
    echo "{$fflag}{$aflag}{$bflag}{$tflag}<br>";
    $nsql = "SELECT * FROM notes WHERE IDNKey='{$idn}'";
    $nresult = mysqli_query($conn, $nsql);
    while ($nrow = $nresult->fetch_assoc()) {
        $agent = $nrow["AgentID"];
        $n2sql = "SELECT Fname,Lname FROM agents WHERE IDKey='{$agent}'";
        $n2result = mysqli_query($conn, $n2sql);
        $n2row = $n2result->fetch_assoc();
        $nname = $n2row["Fname"] . " " . $n2row["Lname"];
        $ntext = $nrow["Text"];
コード例 #7
0
        }
        if ($b == 1) {
            $value += 30;
        }
        echorow("{$fn} {$ln}");
        echorow($bd);
        //Date booked
        echorow($sd);
        //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>";
コード例 #8
0
ファイル: ViewGeneric.php プロジェクト: CoolHeatCRM/CRM

<td><?php 
echo $row["Response"];
?>
</td>
</tr>

<?php 
$shdate = $shrow["Date"];
$dateofContact = $row["DateofContact"];
$app = echocheck($qrow["Approved"]);
$pre = echocheck($qrow["Preinspect"]);
$resp = $qrow["Response"];
$issued = $qrow["DateIssued"];
$comp = echocheck($jrow["Completed"]);
$dcomp = $jrow["DateofCompletion"];
$dest = $jrow["EstCompletion"];
$resp = $qrow["Response"];
if (mysqli_num_rows($bresult) > 0) {
    echo "<tr>\n<td>Cancelled?</td>\n<td>Flags</td>\n<td>Date of Booking</td>\n<td>Date Contacted</td>\n</tr>\n<tr>\n<td> {$Can}</td>\n<td>{$fflag}{$aflag}{$tflag}{$bflag}</td>\n<td>{$shdate}</td>\n<td>{$dateofContact}</td>\n</tr>";
}
if (mysqli_num_rows($qresult) > 0) {
    echo "\n\t\t<tr>\n<td>Date Issued</td>\n<td>Approved?</td>\n<td>Preinspect?</td>\n<td></td>\n</tr>\n<tr>\n<td>{$issued}</td>\n<td>{$app}</td>\n<td>{$pre}</td>\n<td>{$resp}</td>\n</tr>\n";
}
if (mysqli_num_rows($jresult) > 0) {
    echo "<tr>\n<td>Job completed?</td>\n<td>Completion Date:</td>\n<td>Est. Completion Date:</td>\n<td></td>\n</tr>\n<tr>\n<td>{$comp}</td>\n<td>{$dcomp}</td>\n<td>{$dest}</td>\n<td>{$resp}</td>\n</tr>\n\t\t\n\t\t\n\t\t";
}
echo "</table><form action='/Calendar/CreateNote.php' method='post'>\n<input type='text' value='' name='text'>\n<input type='submit' value='Note'>\n</form><br>\n<form action='/SalesManager/createreminder.php' method='post'>\n<input type='number' value='{$IDNKey}' name='idn' hidden><input type='submit' value='Reminder'></form><br>";
?>