|
From: <mah...@us...> - 2008-12-15 20:56:13
|
Revision: 360
http://dccss.svn.sourceforge.net/dccss/?rev=360&view=rev
Author: maher_karim
Date: 2008-12-15 20:56:03 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Added Paths:
-----------
branches/ms4w/apps/dccss/print_ac.php
Added: branches/ms4w/apps/dccss/print_ac.php
===================================================================
--- branches/ms4w/apps/dccss/print_ac.php (rev 0)
+++ branches/ms4w/apps/dccss/print_ac.php 2008-12-15 20:56:03 UTC (rev 360)
@@ -0,0 +1,272 @@
+<?php
+/* CSS -- DC Comprehensive Subscribers Survey
+ *
+ * nobillavailable_report.php - No Bill available report.
+ *
+ * Copyright (C) 2005 DORSCH Consult
+ * Copyright (C) 2006 DC Water and Environment
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+include("include/header.php");
+include_once("conf/dccssconfig.php");
+include("include/dccsspostgis.php");
+include("include/dcmmaputil.php");
+
+//for ($m=0;$m<count($_SESSION['TaskforceArray']);$m++){
+// $record=$m+1;
+
+$DcssPage = new DccssPage(basename(__FILE__));
+
+$strDirection = (0 == strncmp($_SESSION['language'],'ar', 2)) ? 'rtl' :
+ 'ltr';
+$date=date("F j, Y, g:i a");
+?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "xhtml1-strict.dtd">
+<html lang="<?= $_SESSION["language"] ?>">
+<head>
+ <title><?= _("Task force workorder"); ?></title>
+ <link rel="stylesheet" href="include/dccss.css" type="text/css" />
+ <link rel="stylesheet" href="include/<?= $strDirection ?>.css" type="text/css" />
+ <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />
+</head>
+<body style="padding: 0px; margin: 0px; border: 0px; height: 18cm;"
+ dir="<?= (0 == strncmp($_SESSION['language'],'ar', 2)) ? 'rtl' :
+ 'ltr' ?>" >
+<table border="1" summary="Header" width="98%" height="4%" cellspacing="0"
+ cellpadding="0" nowrap="nowrap">
+ <tr>
+ <?php
+ $query = "select * from css_to_billing left outer join deliverypoint on
+ (css_to_billing.customerlocation=deliverypoint.sequence)
+ where deliverypoint.geocode=".$_REQUEST['geocode'];
+ //echo ($query);
+ $result = pg_query($query);
+ $numfields = pg_numfields($result);
+ $row = pg_fetch_array($result);?>
+
+ <td align="left" ><a style="vertical-align: left;"
+ href="index.php?PHPSESSID=<?= session_id()?>"><img
+ style="vertical-align: left; height=1cm;"
+ src="images/gtz.png" width=60 height=60 border="0" align="right" />
+ </a><b style="vertical-align: middle;"><?= _("German Technical Cooperation-GTZ") ?></b><br>
+ <b style="vertical-align: middle;"><?= _("Institutional Support to Aleppo Water establishment") ?></b><br>
+
+ </td>
+ <td align="center">
+ </a><b align="middle"><?php echo(_('Address confirmation')); ?></b><br>
+ </a><b align="middle"><?= _("Date:") ?><?php echo($date); ?></b></td>
+ </td>
+ <td><img src="images/pewss-logo.gif" border="0" align="right"
+ style="height: 1cm" /></td>
+ </tr>
+</table>
+<table border="1" summary="Map" width="98%" height="70%" cellspacing="0"
+ cellpadding="0" nowrap="nowrap">
+ <tr>
+ <td width="30%" height="50%" valign="top">
+ <table cellspacing="0" cellpadding="0"> <?php
+ //Customer information
+ /*echo("<tr><td class=\"input\"><font size=\"1\"><b>".$row[0]."</b></font></td>");
+ echo("<td width=\"%95\" class=\"label\"> <font size=\"1\">"._(pg_fieldname($result, 0))."</td></tr>");
+ echo("<tr><td class=\"input\"><font size=\"1\"><b>".$row[1]."</b></font></td>");
+ echo("<td width=\"%26\" class=\"label\"> <font size=\"1\">"._(pg_fieldname($result, 1))."</td></tr>");
+ echo("<tr><td class=\"input\"><font size=\"1\"><b>".$row[2]."</b></font></td>");
+ echo("<td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 2))."</td></tr>");
+ echo("<tr><td class=\"input\"><font size=\"1\"><b>".$row[3]."</b></font></td>");
+ echo("<td width=\"%26\" class=\"label\"> <font size=\"1\">"._(pg_fieldname($result, 3))."</td></tr>");
+ echo("<tr><td class=\"input\"><font size=\"1\"><b>".$row[4]."</b></font></td>");
+ echo("<td width=\"%26\" class=\"label\"> <font size=\"1\">"._(pg_fieldname($result, 4))."</td></tr>");
+ echo("<tr><td class=\"input\"><font size=\"1\"><b>".$row[5]."</b></font></td>");
+ echo("<td width=\"%26\" class=\"label\"> <font size=\"1\">"._(pg_fieldname($result, 5))."</td></tr>");
+ */
+ echo("<tr><td width=\"%50\" class=\"label\"> <font size=\"1\">"._(pg_fieldname($result, 0)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[0]."</b></font></td></tr>");
+ echo("<tr><td width=\"%26\" class=\"label\"> <font size=\"1\">"._(pg_fieldname($result, 1)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[1]."</b></font></td></tr>");
+ echo("<tr><td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 2)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".
+ ($row[2] == '' ? ' ' : _($row[2]))."</b></font></td></tr>");
+ echo("<td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 3)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[3]."</b></font></td></tr>");
+ echo("<tr><td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 4)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[4]."</b></font></td></tr>");
+ echo("<tr><td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 5)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[5]."</b></font></td></tr>");
+echo("<tr><td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 6)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[6]."</b></font></td></tr>");
+ echo("<tr><td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 7)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[7]."</b></font></td></tr>");
+ echo("<tr><td class=\"label\"><font size=\"1\">"._(pg_fieldname($result, 9)).":</td>");
+ echo("<td class=\"input\"><font size=\"1\"><b>".$row[9]."</b></font></td></tr>");
+
+
+
+ ?>
+ </table>
+ <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
+ <table>
+ <tr><td><font size=\"2\"><?= _("Finish date:") ?></td></tr>
+ <tr><td><font size=\"2\"><?= _("Responsible name:") ?></td></tr>
+ <tr><td><font size=\"2\"><?= _("Signiture:") ?></td></tr>
+ </table>
+ </td>
+ <td width="70%" height="50%" valign="top"> <?php
+ $map_path="./";
+ $map = ms_newMapObj($map_path.sprintf($_SESSION["strMapFile"],
+ substr($_SESSION['language'], 0, 2)));
+ if(array_key_exists("PATH_TRANSLATED", $_SERVER)) {
+ $map->set("shapepath", str_replace("print_workorder.php", "data",
+ str_replace("\\", "/", $_SERVER["PATH_TRANSLATED"])));
+ }
+ $map->set("width", 1300);
+ $map->set("height", 900);
+
+ setLayerAuthentication($map);
+ adjustScalebar($map);
+
+ $objLayer = $map->getlayerbyname('DeliveryPoint');
+ /*
+ if ($objLayer->queryByAttributes("sequence","SEQUENCE=".
+ $_SESSION['TaskforceArray'][$m]['dpsequence'],MS_MULTIPLE) ==
+ MS_SUCCESS) {
+
+ //$oResult=$objLayer->getresult(1);
+ $ResultCount=$objLayer->getNumResults();
+ //
+ //print_r($objLayer->getresult(0));
+ $gbShowQueryResults = TRUE;
+ for ($i=0; $i < $ResultCount; $i++) {
+ $QueryResult=$objLayer->getResult($i);
+ $Risultato=$QueryResult->shapeindex;
+ $objLayer->open();
+ $Shape=$objLayer->getShape(0,$Risultato);
+ // print_r ($Shape->values);
+ $oExtents=$Shape->bounds;
+ //print_r($oExtents);
+ $objLayer->close();
+
+ $map->setextent($oExtents->minx-50,$oExtents->miny-50,$oExtents->maxx+50,
+ $oExtents->maxy+50);
+ }
+ }*/
+
+ $query = "select X(the_geom),Y(the_geom) from deliverypoint where geocode=".
+ $_REQUEST['geocode'];
+ $resultextent = pg_query($query);
+ $numrows = pg_numrows($resultextent);
+
+ for($i=0; $i<$numrows;$i++) {
+ $r = pg_fetch_row($resultextent, $i);
+
+ $pointX = $r[0];
+ $pointY=$r[1];
+ /*$box3d = str_replace("BOX3D(", "", $box3d);
+ $token = strtok($box3d, " ");
+ $minx = $token;
+
+ $token = strtok(" ");
+ $miny = $token;
+ $token = strtok(",");
+ $token = strtok(" ");
+ $maxx = $token+1;
+ $token = strtok(" ");
+ $maxy = $token+1;*/
+ }
+ //$map->setextent($minx-50,$miny-50,$maxx+50,$maxy+50);
+ $map->setextent($pointX-50,$pointY-50,$pointX+50,$pointY+50);
+
+
+
+ //Display the route lines
+
+
+ $objLayer = $map->getlayerbyname('route');
+ $objLayer->set("status",MS_ON);
+ $objLayer = $map->getlayerbyname('collection');
+ $objLayer->set("status", MS_ON);
+ $objLayer = $map->getlayerbyname('grid');
+ $objLayer->set("status", MS_OFF);
+
+ $image=$map->draw();
+ //$image=$map->drawquery();
+ $pointObj = ms_newPointObj();
+ //$pointObj->setXY($oExtents->minx, $oExtents->miny);
+ $pointObj->setXY($pointX, $pointY);
+ $glrLayer = $map->getLayerByName("center");
+ $pointObj->draw($map, $glrLayer,$image, 0, 1);
+ $pointObj->free();
+ $image_url=$image->saveWebImage("MS_PNG", 1, 1, 0);
+ $map->labelcache->free();
+ $image->free();
+
+ $map->freeQuery('*all*');
+
+ ?>
+ <a href="index.php?PHPSESSID=<?= session_id()?>"><img src="<?=
+ $image_url ?>" alt="Workorder Map" style="width: 20cm; height: 14cm;"/></a>
+ </td>
+
+ </tr>
+
+</table>
+<table border="1" summary="Header2" width="98%" height="4%" cellspacing="1"
+ cellpadding="1" cellborder="2" >
+
+<th><?= _("Check") ?></th>
+ <th><font size=\"1\">1.<?= _("Billing") ?></th><th><font size=\"1\">2.<?= _("Meter readings unit") ?></th>
+ <th><font size=\"1\">3.<?= _("Meter Archiving") ?></th><th><font size=\"1\">4.<?= _("Subscription Archiving") ?></th>
+ <th><font size=\"1\">5.<?= _("Field check") ?></th><th><font size=\"1\">6.<?= _("Billing data update") ?></th>
+ <th><font size=\"1\">7.<?= _("CSS data update") ?></th>
+
+ <tr><td class=label> <font size=\"1\"><?= _("Logbook")?></td><?php
+ for ($e=0;$e<7;$e++){
+ echo('<td></td>');
+ }
+ ?></tr>
+ <tr><td class=label> <font size=\"1\"><?= _("Sequence")?></td><?php
+ for ($e=0;$e<7;$e++){
+ echo('<td></td>');
+ }
+ ?></tr>
+ <tr><td class=label> <font size=\"1\"><?= _("Subsequence")?></td><?php
+ for ($e=0;$e<7;$e++){
+ echo('<td></td>');
+ }
+ ?></tr>
+ <tr><td class=label> <font size=\"1\"><?= _("Name")?></td><?php
+ for ($e=0;$e<7;$e++){
+ echo('<td></td>');
+ }
+ ?></tr>
+ <tr><td class=label> <font size=\"1\"><?= _("Serial number")?></td><?php
+ for ($e=0;$e<7;$e++){
+ echo('<td></td>');
+ }
+ ?></tr>
+ <tr><td class=label> <font size=\"1\"><?= _("Subscription number")?></td><?php
+ for ($e=0;$e<7;$e++){
+ echo('<td></td>');
+ }
+ ?></tr>
+</table>
+</body>
+</html>
+ <?php
+
+
+
+//}
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|