$render .= '</ol>' . "\n";
        if ($attendees) {
            $render2 .= '<hr>' . "\n";
            $render2 .= '<h2>Attendees:</h2>
<p>';
            foreach ($attendees as $attendee) {
                $render2 .= $attendee . ', ';
            }
            $render .= remove_lastchar($render2, ",") . '</p>' . "\n";
        }
        $render .= '<hr />';
        // add map if there is only one property
        if ($numRows == 1 && strlen($x) == 6 && strlen($y) == 6) {
            $map = new Map();
            $map->drawMap($x, $y);
            $map->addLocator($x, $y);
            $render .= $map->renderMap();
        }
        break;
    case "Inspection":
        $app["type"] = $app["subtype"] . ' ' . $app["type"];
        $sql = "SELECT\ndea_id,\nCONCAT(pro_addr1,' ',pro_addr2,' ',pro_addr3,' ',pro_postcode) AS pro_addr,\nd2a_id,d2a_ord,d2a_cv,d2a_feedback,\ncon_id,CONCAT(con_fname,' ',con_sname) AS con_name,com_title,\nGROUP_CONCAT(DISTINCT CONCAT(vendor.cli_salutation,' ',vendor.cli_fname,' ',vendor.cli_sname,' (',vendor_tel.tel_number,' - ',vendor_tel.tel_type,')')  SEPARATOR '<br />') AS vendor_name\nFROM appointment\nLEFT JOIN link_deal_to_appointment ON appointment.app_id = link_deal_to_appointment.d2a_app\nLEFT JOIN deal ON link_deal_to_appointment.d2a_dea = deal.dea_id\nLEFT JOIN property ON deal.dea_prop = property.pro_id\n\nLEFT JOIN link_client_to_instruction ON link_client_to_instruction.dealId = deal.dea_id\nLEFT JOIN client AS vendor ON link_client_to_instruction.clientId = vendor.cli_id\n\nLEFT JOIN con2app ON appointment.app_id = con2app.c2a_app\nLEFT JOIN contact ON con2app.c2a_con = contact.con_id\nLEFT JOIN company ON contact.con_company = company.com_id\n\nLEFT JOIN tel AS vendor_tel ON vendor.cli_id = vendor_tel.tel_cli\nWHERE\nappointment.app_id = {$app_id}\nGROUP BY deal.dea_id\nORDER BY link_deal_to_appointment.d2a_ord ASC\n";
        //echo $sql;
        $q = $db->query($sql);
        if (DB::isError($q)) {
            die("db error: " . $q->getMessage());
        }
        $numRows = $q->numRows();
        $count = 1;
        while ($row = $q->fetchRow()) {
            // array of properties (deals)
예제 #2
0
   </tr>
   <!--<tr>
     <td>Town</td>
     <td><input type="text" name="pro_addr5" value="' . $row["pro_addr5"] . '"></td>
   </tr>-->
   <tr>
     <td>Postcode</td>
     <td><input type="text" name="pro_postcode" value="' . $row["pro_postcode"] . '"></td>
   </tr>
 </table>


';
        $map = new Map();
        $map->drawMap($row["pro_east"], $row["pro_north"]);
        $map->addLocator($row["pro_east"], $row["pro_north"]);
        $render .= $map->renderMap();
    }
}
$page = new HTML_Page2($page_defaults);
$page->setTitle("Postcode Tools");
$page->addStyleSheet(getDefaultCss());
$page->addStyleDeclaration('pre { color:#000000; }');
$page->addScript('js/global.js');
$page->addScript('js/scriptaculous/prototype.js');
$page->addBodyContent($header_and_menu);
$page->addBodyContent('<div id="home">');
$page->addBodyContent('<h4>Address Tools</h4>');
/*
$page->addBodyContent('<p>This page is for editing and correcting manually added addresses, and for replacing incorrectoly chosen
addresses for property we are marketing, client addresses, and contact addresses.</p>