Esempio n. 1
0
include "header.php";
?>
<div class="bodyline">
	<?php 
$theform->startForm($pageTitle);
?>
	<input type="hidden" id="invoiceEdit" value="<?php 
echo getAddEditFile($db, "tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883");
?>
" />
	<input type="hidden" id="receiptEdit" value="<?php 
echo getAddEditFile($db, "tbld:43678406-be25-909b-c715-7e2afc7db601");
?>
" />
	<input type="hidden" id="clientEdit" value="<?php 
echo getAddEditFile($db, "tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083");
?>
" />
	<input type="hidden" id="clientid" value="<?php 
echo $clientInfo["id"];
?>
" />
	<div id="rightSideDiv">
		<fieldset id="fsAttributes">
			<legend>attributes</legend>

			<p><?php 
$theform->showField("theid");
?>
</p>
Esempio n. 2
0
    function displayWeek($userid, $dayInWeek = null)
    {
        // Creates a week view calendar for the widget
        if (!$dayInWeek) {
            $dayInWeek = mktime(0, 0, 0);
        }
        $firstDay = $dayInWeek;
        $dayArray = localtime($firstDay, true);
        while ($dayArray["tm_wday"] != 0) {
            $firstDay = strtotime("yesterday", $firstDay);
            $dayArray = localtime($firstDay, true);
        }
        //endwhile
        //build the initial array
        $events = array();
        $lastDay = strtotime("6 days", $firstDay);
        $tempDay = $firstDay;
        for ($i = 0; $i < 7; $i++) {
            $events["d" . $tempDay] = array();
            $tempDay = strtotime("tomorrow", $tempDay);
        }
        //endfor
        //first lets get the regular events in the timeframe;
        $querystatement = "\n            SELECT\n                notes.id,\n                notes.startdate,\n                notes.starttime,\n                notes.enddate,\n                notes.endtime,\n                notes.subject\n            FROM\n                notes\n            WHERE\n                (\n                    notes.private = 0\n                    OR notes.createdby=" . $userid . "\n                )\n                AND notes.type='EV'\n                AND notes.repeating = 0\n                AND notes.startdate >= '" . dateToString($firstDay, "SQL") . "'\n                AND notes.startdate <= '" . dateToString($lastDay, "SQL") . "'";
        $queryresult = $this->db->query($querystatement);
        while ($therecord = $this->db->fetchArray($queryresult)) {
            $events["d" . stringToDate($therecord["startdate"], "SQL")]["t" . stringToTime($therecord["starttime"], "24 Hour")][] = $therecord;
        }
        //next we do recurring events
        $querystatement = "\n            SELECT\n                notes.id,\n                notes.startdate,\n                notes.starttime,\n                notes.enddate,\n                notes.endtime,\n                notes.subject,\n                notes.repeattype,\n                notes.repeatevery,\n                notes.firstrepeat,\n                notes.lastrepeat,\n                notes.timesrepeated,\n                notes.repeatontheday,\n                notes.repeatontheweek,\n                notes.repeateachlist,\n                notes.repeatuntil,\n                notes.repeattimes\n            FROM\n                notes\n            WHERE\n                repeating =1\n                AND (\n                    notes.private = 0\n                    OR notes.createdby=" . $userid . "\n                ) AND notes.type='EV'\n                AND (\n                    notes.repeatuntil IS NULL\n                    OR notes.repeatuntil >= '" . dateToString($firstDay, "SQL") . "'\n                    )\n                AND (\n                    notes.repeattimes IS NULL\n                    OR notes.repeattimes > notes.timesrepeated\n                    )";
        $queryresult = $this->db->query($querystatement);
        $thetable = new notes($this->db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1");
        while ($therecord = $this->db->fetchArray($queryresult)) {
            $dateArray = $thetable->getValidInRange(stringToDate($therecord["startdate"], "SQL"), $lastDay, $therecord);
            foreach ($dateArray as $date) {
                if ($date >= $firstDay && $date <= $lastDay) {
                    if ($therecord["enddate"]) {
                        $therecord["enddate"] = dateToString($date + (stringToDate($therecord["enddate"], "SQL") - stringToDate($therecord["startdate"], "SQL")), "SQL");
                    }
                    $therecord["startdate"] = dateToString($date, "SQL");
                    $events["d" . $date]["t" . stringToTime($therecord["starttime"], "24 Hour")][] = $therecord;
                }
                //endif
            }
            //endforeach
        }
        //endwhile
        $querystatement = "\n            SELECT\n                DECODE(password,'" . ENCRYPTION_SEED . "') AS decpass\n            FROM\n                users\n            WHERE\n                id=" . $_SESSION["userinfo"]["id"];
        $queryresult = $this->db->query($querystatement);
        $passrec = $this->db->fetchArray($queryresult);
        $icallink = "?u=" . $_SESSION["userinfo"]["id"] . "&amp;h=" . md5("phpBMS" . $_SESSION["userinfo"]["firstname"] . $_SESSION["userinfo"]["lastname"] . $_SESSION["userinfo"]["id"] . $passrec["decpass"]);
        ?>
        <input type="hidden" id="eventDateLast" value="<?php 
        echo strtotime("-7 days", $firstDay);
        ?>
" />
        <input type="hidden" id="eventDateToday" value="<?php 
        echo mktime(0, 0, 0);
        ?>
" />
        <input type="hidden" id="eventDateNext" value="<?php 
        echo strtotime("tomorrow", $lastDay);
        ?>
" />

        <ul id="eventButtons">
            <li id="icalLi"><a href="ical.php<?php 
        echo $icallink;
        ?>
" title="ical subscription link" id="icalA"><span>ical</span></a>&nbsp;</li>
            <li><button id="eventLastWeek" type="button" title="previous week" class="smallButtons"><span>&lt;&lt;</span></button></li>
            <li><button id="eventToday" type="button" title="today" class="smallButtons"><span>today</span></button></li>
            <li><button id="eventNextWeek" type="button" title="next week" class="smallButtons"><span>&gt;&gt;</span></button></li>
        </ul>
        <table border="0" cellspacing="0" cellpadding="0" width="100%" id="eventsList"><?php 
        foreach ($events as $date => $times) {
            ?>
<tr class="eventDayName" <?php 
            if (mktime(0, 0, 0) === (int) str_replace("d", "", $date)) {
                echo 'id="today"';
            }
            ?>
>
                        <td nowrap="nowrap"><?php 
            echo @strftime("%A", (int) str_replace("d", "", $date));
            ?>
</td>
                        <td width="100%" align="right"><?php 
            echo @strftime("%b %e %Y", (int) str_replace("d", "", $date));
            ?>
</td>
                </tr><?php 
            if (count($times)) {
                ksort($times);
                foreach ($times as $time => $timeevents) {
                    foreach ($timeevents as $event) {
                        ?>
                                <tr>
                                        <td nowrap="nowrap" valign="top" align="right"><?php 
                        echo formatFromSQLTime($event["starttime"]);
                        ?>
</td>
                                        <td valign="top" ><a href="<?php 
                        echo getAddEditFile($this->db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1") . "?id=" . $event["id"];
                        ?>
&amp;backurl=snapshot.php"><?php 
                        echo htmlQuotes($event["subject"]);
                        ?>
</a></td>
                                </tr><?php 
                    }
                    //endforeach events
                }
                //endforeach time
            } else {
                ?>
                        <tr>
                                <td class="disabledtext" align="right">no events</td>
                                <td>&nbsp;</td>
                        </tr><?php 
            }
            // endif
        }
        //endforeach day
        ?>
</table><?php 
    }
Esempio n. 3
0
$theform->showField("repeatuntil");
?>
					</span>
				</p>
			</fieldset>
		</div>
		<?php 
if ($therecord["parentid"]) {
    ?>
		<fieldset>
			<legend>recurrence</legend>
			<p>This record was created from a repeated task/event.</p>
			<p>Click the <strong>Edit Repeating Options</strong> button to edit the options for the repeatable parent record.</p>
			<p class="notes">Any unsaved changes with the current record will be lost.</p>
			<p><input id="goparent" name="goparent" type="button" value="Edit Repeating Options..." onclick="goParent('<?php 
    echo getAddEditFile($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1");
    ?>
')" class="Buttons" /></p>
		</fieldset>
		<?php 
}
//endif
?>
	</div>

	<?php 
$theform->showCustomFields($db, $thetable->customFieldsQueryResult);
?>

	<?php 
$theform->showGeneralInfo($phpbms, $therecord);
Esempio n. 4
0
    function showTasks($type)
    {
        $querystatement = "\n\t\t\tSELECT\n\t\t\t\tid,\n\t\t\t\ttype,\n\t\t\t\tsubject,\n\t\t\t\tcompleted,\n\t\t\t\tif(enddate < CURDATE(),1,0) AS ispastdue,\n\t\t\t\tif(assignedtodate < CURDATE(),1,0) AS ispastassigneddate,\n\t\t\t\tstartdate,\n\t\t\t\tenddate,\n\t\t\t\tassignedtodate,\n\t\t\t\tprivate,\n\t\t\t\tassignedbyid,\n\t\t\t\tassignedtoid,\n\t\t\t\tIF(assignedtodate IS NOT NULL, assignedtodate, IF((enddate IS NOT NULL && type = 'TS'), enddate, IF((startdate IS NOT NULL && type = 'EV'), startdate, CURDATE()))) AS xdate\n\t\t\tFROM\n\t\t\t\tnotes\n\t\t\tWHERE";
        switch ($type) {
            case "ReceivedAssignments":
                $querystatement .= "\n\t\t\t\t\t((\n\t\t\t\t\t\tassignedtoid = '" . $this->useruuid . "'\n\t\t\t\t\t\tOR \t(\n\t\t\t\t\t\t\ttype = 'TS'\n\t\t\t\t\t\t\tAND (assignedtoid = '' OR assignedtoid IS NULL)\n\t\t\t\t\t\t\tAND createdby = " . $this->userid . "\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t\tAND \t(\n\t\t\t\t\t\t\tcompleted = 0\n\t\t\t\t\t\t\tOR \t(\n\t\t\t\t\t\t\t\tcompleted = 1\n\t\t\t\t\t\t\t\tAND completeddate >= CURDATE()\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t)";
                $title = "Assignments";
                $id = "AS";
                break;
            case "GivenAssignments":
                $querystatement .= "\n\t\t\t\t\t(assignedbyid = '" . $this->useruuid . "'\n\t\t\t\t\tAND (completed = 0\n\t\t\t\t\t\tOR (completed = 1 AND completeddate >= CURDATE())\n\t\t\t\t\t))";
                $title = "Delegations";
                $id = "DG";
                break;
        }
        //endswitch
        $querystatement .= "AND (\n\t\t\t\t\t(startdate IS NULL AND enddate IS NULL AND assignedtodate IS NULL)\n\t\t\t\t\tOR (startdate IS NOT NULL AND startdate <= DATE_ADD(CURDATE(),INTERVAL 30 DAY) AND enddate IS NULL AND assignedtodate IS NULL)\n\t\t\t\t\tOR (enddate IS NOT NULL AND enddate <= DATE_ADD(CURDATE(),INTERVAL 30 DAY))\n\t\t\t\t\tOR (assignedtodate IS NOT NULL AND assignedtodate <= DATE_ADD(CURDATE(),INTERVAL 30 DAY))\n\t\t\t\t   )";
        $querystatement .= " ORDER BY\n\t\t\t\timportance DESC,\n\t\t\t\txdate,\n\t\t\t\tsubject";
        $queryresult = $this->db->query($querystatement);
        $numRows = $this->db->numRows($queryresult);
        ?>
		<h3 class="tasksLinks"><?php 
        echo $title;
        if ($numRows) {
            ?>
 <span class="small">(<?php 
            echo $numRows;
            ?>
)</span><?php 
        }
        ?>
</h3>

		<div class="tasksDivs">
			<div>

			<?php 
        if ($numRows) {
            $linkStart = getAddEditFile($this->db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1");
            $section["title"] = "Today";
            $section["date"] = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
            while ($therecord = $this->db->fetchArray($queryresult)) {
                $className = "tasks";
                if ($therecord["completed"]) {
                    $className .= " complete";
                } else {
                    if ($therecord["ispastdue"] || $therecord["ispastassigneddate"]) {
                        $className .= " pastDue";
                    }
                }
                if ($therecord["private"]) {
                    $className .= " private";
                }
                $className .= " " . $therecord["type"];
                $checkBoxID = $id . $therecord["type"] . "C" . $therecord["id"];
                $link = $linkStart . "?id=" . $therecord["id"] . "&amp;backurl=" . APP_PATH . "modules/base/snapshot.php";
                $rightSide = "";
                if ($therecord["assignedtodate"]) {
                    $rightSide .= "FUP: " . formatFromSQLDate($therecord["assignedtodate"]) . "<br />";
                }
                switch ($therecord["type"]) {
                    case "TS":
                        if ($therecord["enddate"]) {
                            $rightSide .= "Due: " . formatFromSQLDate($therecord["enddate"]) . "<br />";
                        }
                        break;
                    case "EV":
                        $rightSide .= "Start: " . formatFromSQLDate($therecord["startdate"]) . "<br />";
                        $rightSide .= "End: " . formatFromSQLDate($therecord["enddate"]) . "<br />";
                        break;
                }
                //endswitch
                if (!$rightSide) {
                    $rightSide = "&nbsp;";
                }
                $bottomInfo = "";
                switch ($type) {
                    case "ReceivedAssignments":
                        if ($therecord["assignedbyid"]) {
                            $bottomInfo = "Assigned By: " . htmlQuotes($this->phpbms->getUserName($therecord["assignedbyid"], true));
                        }
                        break;
                    case "GivenAssignments":
                        $bottomInfo = "Assigned To: " . htmlQuotes($this->phpbms->getUserName($therecord["assignedtoid"], true));
                        break;
                }
                //endswitch
                // Looking for grouping changes in headers (3 days, 4-7 days, > 7 days)
                $xdate = stringToDate($therecord["xdate"], "SQL");
                if ($xdate > $section["date"]) {
                    while ($xdate > $section["date"]) {
                        switch ($section["title"]) {
                            case "Today":
                                $section["title"] = "Soon";
                                $section["date"] = mktime(0, 0, 0, date("m"), date("d") + 7, date("Y"));
                                break;
                            case "Soon":
                                $section["title"] = "Later";
                                $section["date"] = mktime(0, 0, 0, 1, 1, 2038);
                                break;
                            case "Later":
                                //should never be here
                                $section["date"] = $xdate;
                        }
                        //end switch
                    }
                    //endwhile
                    ?>
<div class="taskSection"><?php 
                    echo $section["title"];
                    ?>
</div><?php 
                }
                //end if
                ?>

					<div id="<?php 
                echo $id . $therecord["id"];
                ?>
" class="<?php 
                echo $className;
                ?>
">

						<span class="taskRight"><?php 
                echo $rightSide;
                ?>
</span>

						<input class="radiochecks taskChecks" id="<?php 
                echo $checkBoxID;
                ?>
" name="<?php 
                echo $checkBoxID;
                ?>
" type="checkbox" value="1" <?php 
                if ($therecord["completed"]) {
                    echo 'checked="checked"';
                }
                ?>
  align="middle" />

						<a href="<?php 
                echo $link;
                ?>
"><?php 
                echo htmlQuotes($therecord["subject"]);
                ?>
</a>

						<?php 
                if ($bottomInfo) {
                    ?>

							<p><?php 
                    echo $bottomInfo;
                    ?>
</p>

						<?php 
                }
                //endif
                ?>
					</div>

				<?php 
            }
            //endwhile
        } else {
            ?>
					<p class="small disabledtext">no <?php 
            echo strtolower($title);
            ?>
</p><?php 
        }
        ?>
			</div>
		</div> <?php 
    }
Esempio n. 5
0
    function display($clientInfo)
    {
        $invoiceEditFile = getAddEditFile($this->db, "tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883");
        $noteEditFile = getAddEditFile($this->db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1");
        $clientEditFile = getAddEditFile($this->db, "tbld:6d290174-8b73-e199-fe6c-bcf3d4b61083");
        ?>
<div class="bodyline" id="theDetails">

                    <div id="rightSideDiv">

                            <fieldset>
                                    <legend>sales</legend>
                                    <ul class="recordCommands">
                                        <li class="firstToolbarItem"><a href="#" class="newRecord" onclick="addEditRecord('new','invoice','<?php 
        echo getAddEditFile($this->db, "tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883", "add");
        ?>
')" title="new sales order"><span>new</span></a></li>
                                        <li><a href="#" id="invoiceedit" class="editRecordDisabled" onclick="addEditRecord('edit','invoice','<?php 
        echo $invoiceEditFile;
        ?>
')" title="edit"><span>edit</span></a></li>
                                    </ul>
                                    <div class="recordContainers">
                                    <div id="salesTable" class="smallQueryTableHolder">
                                            <?php 
        if (!count($clientInfo["invoices"])) {
            ?>
                                                    <div class="small"><em>no records</em></div>
                                            <?php 
        } else {
            ?>
                                            <table border="0" cellpadding="0" cellspacing="0" class="smallQueryTable">
                                                    <tr>
                                                            <th align="left">ID</th>
                                                            <th align="left">Type</th>
                                                            <th align="left">Date</th>
                                                            <th align="right" width="100%">Total</th>
                                                    </tr>
                                            <?php 
            foreach ($clientInfo["invoices"] as $invoicerecord) {
                if ($invoicerecord["type"] == "VOID") {
                    $invoicerecord["totalti"] = "-----";
                }
                ?>
<tr onclick="selectEdit(this,<?php 
                echo $invoicerecord["id"];
                ?>
,'invoice')" ondblclick="selectedInvoice=<?php 
                echo $invoicerecord["id"];
                ?>
;addEditRecord('edit','invoice','<?php 
                echo $invoiceEditFile;
                ?>
')">
                                                    <td><?php 
                echo $invoicerecord["id"];
                ?>
</td>
                                                    <td><?php 
                echo $invoicerecord["type"];
                ?>
</td>
                                                    <td nowrap="nowrap"><?php 
                echo formatFromSQLDate($invoicerecord["thedate"]);
                ?>
</td>
                                                    <td align="right"><?php 
                echo numberToCurrency($invoicerecord["totalti"]);
                ?>
</td>
                                            </tr>
                                            <?php 
            }
            ?>
</table><?php 
        }
        ?>
                                    </div>
                                    </div>

                            </fieldset>

                            <fieldset>
                                    <legend>notes</legend>


                                    <ul class="recordCommands">
                                        <li class="firstToolbarItem"><a href="#" title="new note" class="newRecord" onclick="addEditRecord('new','note','<?php 
        echo getAddEditFile($this->db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1", "add");
        ?>
')"><span>new</span></a></li>
                                        <li><a href="#" title="edit" id="noteedit" class="editRecordDisabled" onclick="addEditRecord('edit','note','<?php 
        echo $noteEditFile;
        ?>
')"><span>edit</span></a></li>
                                    </ul>
                                    <div class="recordContainers">

                                    <div id="notesTable"  class="smallQueryTableHolder">
                                            <?php 
        if (!count($clientInfo["notes"])) {
            ?>
                                                    <div class="small"><em>no records</em></div>
                                            <?php 
        } else {
            ?>
                                            <table border="0" cellpadding="0" cellspacing="0" class="smallQueryTable">
                                                    <tr>
                                                            <th align="left">type</th>
                                                            <th align="left">category</th>
                                                            <th align="left" width="100%">title</th>
                                                            <th align="center">done</th>
                                                    </tr>
                                            <?php 
            foreach ($clientInfo["notes"] as $noterecord) {
                if (strlen($noterecord["subject"]) > 17) {
                    $noterecord["subject"] = substr($noterecord["subject"], 0, 17) . "...";
                }
                if (strlen($noterecord["category"]) > 17) {
                    $noterecord["category"] = substr($noterecord["category"], 0, 17) . "...";
                }
                ?>
<tr onclick="selectEdit(this,<?php 
                echo $noterecord["id"];
                ?>
,'note')" ondblclick="selectedNote=<?php 
                echo $noterecord["id"];
                ?>
;addEditRecord('edit','note','<?php 
                echo $noteEditFile;
                ?>
')">
                                                    <td><?php 
                echo $noterecord["type"];
                ?>
</td>
                                                    <td><?php 
                echo $noterecord["category"];
                ?>
</td>
                                                    <td><?php 
                echo $noterecord["subject"];
                ?>
</td>
                                                    <td align="center"><?php 
                echo booleanFormat($noterecord["completed"]);
                ?>
</td>
                                            </tr>
                                            <?php 
            }
            ?>
</table><?php 
        }
        ?>
                                    </div>
                                    </div>

                            </fieldset>

                    </div>

                    <div id="leftSideDiv">

                            <fieldset id="crTile" class="fs<?php 
        echo $clientInfo["type"];
        ?>
">

                                    <h1>
                                        <input type="hidden" id="theid" value="<?php 
        echo $clientInfo["id"];
        ?>
" />
										<input type="hidden" id="theuuid" value="<?php 
        echo $clientInfo["uuid"];
        ?>
" />
                                    <?php 
        if ($clientInfo["company"]) {
            echo htmlQuotes($clientInfo["company"]);
        } else {
            echo htmlQuotes($clientInfo["firstname"] . " " . $clientInfo["lastname"]);
        }
        ?>
 <button id="viewClientButton" type="button" title="view client" class="graphicButtons buttonInfo" onclick="addEditRecord('edit','client','<?php 
        echo $clientEditFile;
        ?>
')"><span>view client</span></button></h1>

                                    <?php 
        if ($clientInfo["company"] && $clientInfo["firstname"] && $clientInfo["lastname"]) {
            ?>
<p id="crName"><?php 
            echo htmlQuotes($clientInfo["firstname"]);
            ?>
 <?php 
            echo htmlQuotes($clientInfo["lastname"]);
            ?>
</p><?php 
        }
        //endif
        ?>

                                    <?php 
        $location = "";
        $location .= htmlQuotes($clientInfo["address1"]);
        if ($clientInfo["address2"]) {
            $location .= "<br />" . htmlQuotes($clientInfo["address2"]);
        }
        if ($clientInfo["city"] || $clientInfo["state"] || $clientInfo["postalcode"]) {
            $location .= "<br/>" . htmlQuotes($clientInfo["city"]);
            if ($clientInfo["city"] && $clientInfo["state"]) {
                $location .= ", ";
            }
            $location .= htmlQuotes($clientInfo["state"]);
            $location .= " " . htmlQuotes($clientInfo["postalcode"]);
        }
        //endif
        if ($clientInfo["country"]) {
            $location .= "<br />" . htmlQuotes($clientInfo["country"]);
        }
        if ($location == "") {
            $location = "unspecified location";
        }
        ?>
<p id="crLocation"><?php 
        echo $location;
        ?>
</p>

                            </fieldset>

                            <fieldset>
                                    <legend>Contact</legend>
                                    <?php 
        if ($clientInfo["workphone"] || $clientInfo["homephone"] || $clientInfo["mobilephone"] || $clientInfo["otherphone"] || $clientInfo["fax"]) {
            ?>

                                            <p class="RDNames">phone</p>

                                            <div class="fauxP RDData">
                                                    <ul>
                                                    <?php 
            if ($clientInfo["workphone"]) {
                ?>
                                                            <li><?php 
                echo $clientInfo["workphone"];
                ?>
 (w)</li>
                                                    <?php 
            }
            ?>

                                                    <?php 
            if ($clientInfo["homephone"]) {
                ?>
                                                            <li><?php 
                echo $clientInfo["homephone"];
                ?>
 (h)</li>
                                                    <?php 
            }
            ?>

                                                    <?php 
            if ($clientInfo["mobilephone"]) {
                ?>
                                                            <li><?php 
                echo $clientInfo["mobilephone"];
                ?>
 (m)</li>
                                                    <?php 
            }
            ?>

                                                    <?php 
            if ($clientInfo["otherphone"]) {
                ?>
                                                            <li><?php 
                echo $clientInfo["otherphone"];
                ?>
 (o)</li>
                                                    <?php 
            }
            ?>

                                                    <?php 
            if ($clientInfo["fax"]) {
                ?>
                                                            <li><?php 
                echo $clientInfo["fax"];
                ?>
 (fax)</li>
                                                    <?php 
            }
            ?>
                                                    </ul>
                                            </div>

                                    <?php 
        }
        ?>

                                    <?php 
        if ($clientInfo["email"]) {
            ?>
                                            <p class="RDNames">e-mail</p>
                                            <p class="RDData">
                                                    <button type="button" class="graphicButtons buttonEmail" onclick="document.location='mailto:<?php 
            echo $clientInfo["email"];
            ?>
'"><span>send email</span></button>
                                                    &nbsp;<a href="mailto:<?php 
            echo $clientInfo["email"];
            ?>
"><?php 
            echo htmlQuotes($clientInfo["email"]);
            ?>
</a>
                                            </p>
                                    <?php 
        }
        ?>


                                    <?php 
        if ($clientInfo["webaddress"]) {
            ?>
                                            <p class="RDNames">web site</p>
                                            <p class="RDData">
                                                    <button type="button" class="graphicButtons buttonWWW" onclick="window.open('<?php 
            echo $clientInfo["webaddress"];
            ?>
')"><span>visit site</span></button>
                                                    &nbsp;<a href="<?php 
            echo $clientInfo["webaddress"];
            ?>
" target="_blank"><?php 
            echo htmlQuotes($clientInfo["webaddress"]);
            ?>
</a>
                                            </p>
                                    <?php 
        }
        ?>
                            </fieldset>

                            <fieldset>
                                    <legend>Details</legend>

                                    <?php 
        if ($clientInfo["becameclient"]) {
            ?>
                                            <p class="RDNames">became client</p>
                                            <p class="RDData">
                                                    <?php 
            echo formatVariable($clientInfo["becameclient"], "date");
            ?>
                                            </p>
                                    <?php 
        }
        ?>

                                    <?php 
        if ($clientInfo["category"]) {
            ?>
                                            <p class="RDNames">category</p>
                                            <p class="RDData">
                                                    <?php 
            echo htmlQuotes($clientInfo["category"]);
            ?>
                                            </p>
                                    <?php 
        }
        ?>

                                    <?php 
        if ($clientInfo["leadsource"]) {
            ?>
                                            <p class="RDNames">lead source</p>
                                            <p class="RDData">
                                                    <?php 
            echo htmlQuotes($clientInfo["leadsource"]);
            ?>
                                            </p>
                                    <?php 
        }
        ?>

                                    <?php 
        if ($clientInfo["salesmanagerid"]) {
            global $phpbms;
            ?>
                                            <p class="RDNames">sales person</p>
                                            <p class="RDData">
                                                    <?php 
            echo htmlQuotes($phpbms->getUserName($clientInfo["salesmanagerid"]));
            ?>
                                            </p>
                                    <?php 
        }
        ?>

                            </fieldset>


                            <?php 
        if ($clientInfo["comments"]) {
            ?>
                            <fieldset>
                                    <legend>memo</legend>
                                    <p>
                                            <?php 
            echo htmlQuotes($clientInfo["comments"]);
            ?>
                                    </p>
                            </fieldset>
                            <?php 
        }
        ?>

                    </div>
                    <p id="theclear">&nbsp;</p>
            </div>
            <?php 
    }
Esempio n. 6
0
showSaveCancel(1);
?>
	</div>

	<h1 id="h1Title"><span><?php 
echo $pageTitle;
?>
</span></h1>

	<div id="rightSideDiv">
		<?php 
if (isset($_GET["invoiceid"])) {
    ?>
		<p id="backtoorderP">
			<input name="gotoinvoice" id="gotoinvoice" type="button" value="return to order" onclick="location.href='<?php 
    echo getAddEditFile($db, "tbld:62fe599d-c18f-3674-9e54-b62c2d6b1883");
    ?>
?id=<?php 
    echo $_GET["invoiceid"];
    ?>
'" class="Buttons" />
		</p>
		<?php 
}
?>
		<fieldset>
			<legend>attributes</legend>

			<p><?php 
$theform->showField("type");
?>
Esempio n. 7
0
    //convert any checked records to an array of ids
    foreach ($HTTP_POST_VARS as $key => $value) {
        if (substr($key, 0, 5) == "check") {
            $theids[] = $value;
        }
    }
    //Search Options Command Process
    //=====================================================================================================
    switch ($command) {
        case "new":
            // relocate to new screen
            //=====================================================================================================
            $theurl = getAddEditFile($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1") . "?reftable=" . $reftable . "&refid=" . $_GET["refid"] . "&backurl=" . $backurl;
            goURL($theurl);
            break;
        case "delete":
            //a bit more complicated so we'll put it in it's own function?
            //=====================================================================================================
            include_once "modules/base/include/notes.php";
            $searchFunctions = new notesSearchFunctions($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1", $theids);
            $statusmessage = $searchFunctions->delete_record();
            break;
        case "edit/view":
            // relocate to edit screen
            //=====================================================================================================
            goURL(getAddEditFile($db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1") . "?id=" . $theids[0] . "&refid=" . $_GET["refid"] . "&backurl=" . $backurl);
            break;
    }
    //end switch
}
//end if