|
From: <mah...@us...> - 2009-01-13 13:01:34
|
Revision: 367
http://dccss.svn.sourceforge.net/dccss/?rev=367&view=rev
Author: maher_karim
Date: 2009-01-13 13:01:25 +0000 (Tue, 13 Jan 2009)
Log Message:
-----------
2009-01-13 Maher Abdel karim <mah...@do...>
* query.php:Adjust the query form to have the ablility to search landmark.
* print_ac.php: Add more option to print for passed landmark information.
* deliverypointpage.php:Handling forwarded landmark information.
* LC_MESSAGES/ar/dccss.po: update translations
* conf/dccss_pewssa_%.map: extend the extent.
* map.php: Add the print option to print the current map extent.
* images/todo.png:added
Modified Paths:
--------------
branches/ms4w/apps/dccss/changelog
branches/ms4w/apps/dccss/conf/dccss_pewssa_ar.map
branches/ms4w/apps/dccss/conf/dccss_pewssa_en.map
branches/ms4w/apps/dccss/deliverypointpage.php
branches/ms4w/apps/dccss/locale/ar/LC_MESSAGES/dccss.po
branches/ms4w/apps/dccss/map.php
branches/ms4w/apps/dccss/print_ac.php
branches/ms4w/apps/dccss/query.php
Added Paths:
-----------
branches/ms4w/apps/dccss/images/todo.png
Modified: branches/ms4w/apps/dccss/changelog
===================================================================
--- branches/ms4w/apps/dccss/changelog 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/changelog 2009-01-13 13:01:25 UTC (rev 367)
@@ -1,3 +1,13 @@
+2009-01-13 Maher Abdel karim <mah...@do...>
+
+ * query.php:Adjust the query form to have the ablility to search landmark.
+ * print_ac.php: Add more option to print for passed landmark information.
+ * deliverypointpage.php:Handling forwarded landmark information.
+ * LC_MESSAGES/ar/dccss.po: update translations
+ * conf/dccss_pewssa_%.map: extend the extent.
+ * map.php: Add the print option to print the current map extent.
+ * images/todo.png:added
+
2009-01-12 Maher Abdel karim <mah...@do...>
* logon.php:Adjust page call
Modified: branches/ms4w/apps/dccss/conf/dccss_pewssa_ar.map
===================================================================
--- branches/ms4w/apps/dccss/conf/dccss_pewssa_ar.map 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/conf/dccss_pewssa_ar.map 2009-01-13 13:01:25 UTC (rev 367)
@@ -1,11 +1,11 @@
# MapFile created with Gix Export Tool - Tue Sep 13 15:39:23 2005
# http://gix.sourceforge.net
-# View Date : 10 �����, 1426 03:16:23 �
+# View Date : 10 ?????, 1426 03:16:23 ?
#
MAP
NAME 'DCCSS PEWSSA Map'
SIZE 550 400
- EXTENT -183076.82522917 225997.13100660 -178289.90618735 228999.64686146
+ EXTENT -214775 207762 -96454 241194
UNITS meters
RESOLUTION 72
@@ -27,7 +27,7 @@
REFERENCE
IMAGE '../images/dccss.jpg'
- EXTENT -183076.82522917 225997.13100660 -178289.90618735 228999.64686146
+ EXTENT -214775 207762 -96454 241194
STATUS on
COLOR -1 -1 -1
OUTLINECOLOR 255 255 0
Modified: branches/ms4w/apps/dccss/conf/dccss_pewssa_en.map
===================================================================
--- branches/ms4w/apps/dccss/conf/dccss_pewssa_en.map 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/conf/dccss_pewssa_en.map 2009-01-13 13:01:25 UTC (rev 367)
@@ -5,7 +5,7 @@
MAP
NAME 'DCCSS PEWSSA Map'
SIZE 550 400
- EXTENT 163999.044455 111964.777588 260032.211613 189437.688401
+ EXTENT -214775 207762 -96454 241194
UNITS meters
RESOLUTION 72
@@ -26,7 +26,7 @@
REFERENCE
IMAGE '../images/dccss.jpg'
- EXTENT 163999.044455 111964.777588 260032.211613 189437.688401
+ EXTENT -214775 207762 -96454 241194
STATUS on
COLOR -1 -1 -1
OUTLINECOLOR 255 255 0
Modified: branches/ms4w/apps/dccss/deliverypointpage.php
===================================================================
--- branches/ms4w/apps/dccss/deliverypointpage.php 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/deliverypointpage.php 2009-01-13 13:01:25 UTC (rev 367)
@@ -72,37 +72,36 @@
$miny = $r[1]-25;
$maxx = $r[0]+25;
$maxy = $r[1]+25;
-
- /* $gpoMap = ms_newMapObj(sprintf($_SESSION["strMapFile"],
- substr($_SESSION['language'], 0, 2)));
- $pointObj = ms_newPointObj();
- $pointObj->setXY($r[0], $r[1]);
- $glrLayer= ms_newlayerobj($gpoMap);//
- $lName = "DeliveryPoint";
- $oLayer=$gpoMap->getlayerbyname("grid") or
- die("Unable to getLayerByName($lName)");
- $a=$oLayer->set("status",0);
- $glrLayer->getLayerByName("DeliveryPoint");
- $glrLayer->set("name","GRID");
- ms_newgridobj($glrLayer);
- $glrLayer->grid->set("labelformat","DDMMSS");
+ header("location: map.php?PHPSESSID=".$_REQUEST["PHPSESSID"].
+ "&gravitymain=Y&pressurizedmain=Y&ViewRegion=Quick+".
+ "View&minx=$minx&miny=$miny&maxx=$maxx&maxy=$maxy&imagewidth=400&".
+ "imageheight=300&CMD=ZOOM_DeliveryPoint".
+ "&KEYMAPXSIZE=120&KEYMAPYSIZE=90&MapSize=400%2C300&PREVIOUS_MODE=1&zoomX=".$r[0]."&zoomY=".$r[1]);
+ exit();
+ }
+ }
+ } else {
+ $dccssPage->importantParagraph(
+ _("FATAL ERROR: No id provided in request."));
+ die();
+ }
+ break;
+case "mapLandmark":
+ if(array_key_exists("gid", $_REQUEST)) {
+ $query = "select X(the_geom), Y(the_geom) from landmark where gid='".
+ $_REQUEST["gid"]."'";
+ //echo($query);
+ $result = pg_query($query);
+ $numrows = pg_numrows($result);
+ if($numrows > 0) {
+ for($i=0; $i<$numrows; $i++) {
+ $r = pg_fetch_row($result, $i);
+ $minx = $r[0]-100;
+ $miny = $r[1]-100;
+ $maxx = $r[0]+100;
+ $maxy = $r[1]+100;
- $gpoMap->queryByPoint($pointObj, 2, 5);
- $gbShowQueryResults = TRUE;
- $oClass = ms_newClassObj($oLayer);
- $oStyle = ms_newStyleObj($oClass);
- $oStyle->set("size", $i*2 + 5 ) ;
- $oStyle->set("symbol", $i) ;
- $oStyle->color->setRGB(50*$i, 25, 0); //Very cheap way to vary the colors, You can do better!!
- $oClass->set("status", MS_ON);
-
- $img = $gpoMap->drawQuery($gpoMap);
-
- $pointObj->draw($gpoMap, $glrLayer, $img, 0, 1);
-
- */
-
header("location: map.php?PHPSESSID=".$_REQUEST["PHPSESSID"].
"&gravitymain=Y&pressurizedmain=Y&ViewRegion=Quick+".
"View&minx=$minx&miny=$miny&maxx=$maxx&maxy=$maxy&imagewidth=400&".
@@ -117,8 +116,8 @@
die();
}
break;
- }
}
+}
/**
* \todo Link to map.
Added: branches/ms4w/apps/dccss/images/todo.png
===================================================================
(Binary files differ)
Property changes on: branches/ms4w/apps/dccss/images/todo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: branches/ms4w/apps/dccss/locale/ar/LC_MESSAGES/dccss.po
===================================================================
--- branches/ms4w/apps/dccss/locale/ar/LC_MESSAGES/dccss.po 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/locale/ar/LC_MESSAGES/dccss.po 2009-01-13 13:01:25 UTC (rev 367)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: DCCSS\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2008-12-23 15:15+0200\n"
+"PO-Revision-Date: 2009-01-13 14:51+0200\n"
"Last-Translator: Maher Karim <Mah...@do...>\n"
"Language-Team: Dorsch <mah...@do...>\n"
"MIME-Version: 1.0\n"
@@ -118,32 +118,33 @@
msgstr "رمز العنوان الجغرافي"
# e:\program
-#: ../../.././deliverypointpage.php:116
+#: ../../.././deliverypointpage.php:86
+#: ../../.././deliverypointpage.php:115
msgid "FATAL ERROR: No id provided in request."
msgstr "خطأ نظام: لا يوجد رقم وصول في الطلب"
# D:\dccss\dccss/deliverypointpage.php:107
# D:\dccss\dccss/deliverypointpage.php:138
-#: ../../.././deliverypointpage.php:137
-#: ../../.././deliverypointpage.php:146
-#: ../../.././deliverypointpage.php:196
+#: ../../.././deliverypointpage.php:136
+#: ../../.././deliverypointpage.php:145
+#: ../../.././deliverypointpage.php:195
msgid "View on Map"
msgstr "اظهار على الخريطة"
# e:\program
-#: ../../.././deliverypointpage.php:143
+#: ../../.././deliverypointpage.php:142
msgid "Delivery Point #"
msgstr "رمز العنوان# :"
# e:\program
-#: ../../.././deliverypointpage.php:162
+#: ../../.././deliverypointpage.php:161
msgid ""
"FATAL ERROR: No Record found for the provided Deliverypoint in the\n"
"\t request.</p>"
msgstr "خطأ نظام: لا يوجد رقم وصول في الطلب"
# c:\program
-#: ../../.././deliverypointpage.php:169
+#: ../../.././deliverypointpage.php:168
#: ../../.././subscriberpage.php:223
#: ../../.././Copy of include/dataobject/Public_deliverypoint.php:164
#: include/dataobject/Public_subscriber.php:112
@@ -163,24 +164,24 @@
msgstr "حفظ"
# c:\program
-#: ../../.././deliverypointpage.php:181
+#: ../../.././deliverypointpage.php:180
#: ../../.././subscriberpage.php:110
msgid "Failed to save record(s)."
msgstr "لم تتم عملية حفظ السجل/السجلات بنجاح"
# c:\program
-#: ../../.././deliverypointpage.php:190
+#: ../../.././deliverypointpage.php:189
msgid "Record(s) successfully saved."
msgstr "تمت عملية حفظ السجل/السجلات بنجاح"
# e:\program
-#: ../../.././deliverypointpage.php:192
+#: ../../.././deliverypointpage.php:191
msgid "Add Subscriber"
msgstr "اضافة مشترك"
# e:\program
-#: ../../.././deliverypointpage.php:222
-#: ../../.././query.php:169
+#: ../../.././deliverypointpage.php:221
+#: ../../.././query.php:172
#: ../../.././subscriberpage.php:185
msgid "Back to delivery point"
msgstr "البحث عن نقطة المدخل باستخدام رقم التعريف"
@@ -368,7 +369,7 @@
#: ../../.././logbook_report.php:69
#: ../../.././logbook_report_subscriber.php:63
#: ../../.././meter_query_report.php:64
-#: ../../.././query.php:108
+#: ../../.././query.php:111
#: ../../.././taskforce_report.php:79
#: ../../.././admin/move_subscriber.php:76
#: ../../.././admin/processing.php:48
@@ -1197,7 +1198,6 @@
msgstr "خروج المستخدم '%s'"
# e:\program
-#: ../../.././logon.php:181
#: ../../.././logon.php:182
msgid "Logon to DCCSS"
msgstr "الدخول الى نظام DCCSS"
@@ -1374,6 +1374,13 @@
msgid "Identify"
msgstr "اداة التعريف"
+# e:\program
+#: ../../.././map.php:559
+#: ../../.././query.php:202
+#: ../../.././include/dataobject/Public_subscriber.php:227
+msgid "[Print]"
+msgstr "[طباعة]"
+
# c:\program
#: ../../.././meter_query_report.php:49
msgid "Query using Meter Serial Number"
@@ -1405,79 +1412,79 @@
msgid "Task force workorder"
msgstr "امر عمل مجموعة عمل"
-#: ../../.././print_ac.php:69
+#: ../../.././print_ac.php:56
#: ../../.././print_workorder.php:64
#: ../../.././Copy of include/i18n.php:121
#: ../../.././include/i18n.php:121
msgid "German Technical Cooperation-GTZ"
msgstr "الوكالة الالمانية للتعاون الفني- GTZ"
-#: ../../.././print_ac.php:70
+#: ../../.././print_ac.php:57
#: ../../.././print_workorder.php:65
#: ../../.././Copy of include/i18n.php:122
#: ../../.././include/i18n.php:122
msgid "Institutional Support to Aleppo Water establishment"
msgstr "مشروع تحديث قطاع المياه السوري-حلب"
-#: ../../.././print_ac.php:74
+#: ../../.././print_ac.php:61
msgid "Address confirmation"
msgstr "توثيق العنوان الجغرافي للمشترك الجديد (AC)"
-#: ../../.././print_ac.php:75
+#: ../../.././print_ac.php:62
#: ../../.././print_workorder.php:72
#: ../../.././Copy of include/i18n.php:134
#: ../../.././include/i18n.php:134
msgid "Date:"
msgstr "التاريخ:"
-#: ../../.././print_ac.php:102
+#: ../../.././print_ac.php:75
msgid "Geographic location for new customer neigboor"
msgstr "العنوان الجغرافي للمجاور"
-#: ../../.././print_ac.php:129
+#: ../../.././print_ac.php:117
msgid "Geographic location for new customer"
msgstr "العنوان الجغرافي للمشترك الجديد"
# c:\program
-#: ../../.././print_ac.php:130
+#: ../../.././print_ac.php:118
msgid "routeid:"
msgstr "رقم المسار:"
# c:\program
-#: ../../.././print_ac.php:131
+#: ../../.././print_ac.php:119
msgid "customerlocation:"
msgstr "موقع المشترك:"
# c:\program
-#: ../../.././print_ac.php:132
+#: ../../.././print_ac.php:120
msgid "meterlocation:"
msgstr "موقع العداد:"
# c:\program
-#: ../../.././print_ac.php:133
+#: ../../.././print_ac.php:121
msgid "logbook:"
msgstr "رقم المجلد:"
# c:\program
-#: ../../.././print_ac.php:134
+#: ../../.././print_ac.php:122
msgid "sequence:"
msgstr "رقم التخصيص:"
# c:\program
-#: ../../.././print_ac.php:135
+#: ../../.././print_ac.php:123
msgid "subsequence:"
msgstr "رقم التخصيص الفرعي:"
-#: ../../.././print_ac.php:136
+#: ../../.././print_ac.php:124
msgid "pnr:"
msgstr "رقم الباركود:"
-#: ../../.././print_ac.php:137
+#: ../../.././print_ac.php:125
msgid "new customer name:"
msgstr "اسم المشترك الجديد:"
# c:\program
-#: ../../.././print_ac.php:138
+#: ../../.././print_ac.php:126
msgid "File No.:"
msgstr "رقم الملف:"
@@ -1664,16 +1671,79 @@
msgstr "الاستفسار باستخدام رقم الكابينة"
# e:\program
-#: ../../.././query.php:100
+#: ../../.././query.php:57
+msgid "Query Landmark"
+msgstr "البحث باستخدام معلم"
+
+#: ../../.././query.php:61
+#: ../../.././include/dcmms/include/i18n.php:351
+#: ../../.././include/dcmms/include/i18n.php:352
+msgid "Area:"
+msgstr "المنطقة:"
+
+#: ../../.././query.php:62
+msgid "Narrow down the area in which to search for points of interest."
+msgstr ""
+
+# e:\program
+#: ../../.././query.php:66
+#: ../../.././query.php:76
+#: ../../.././query.php:82
+#: ../../.././query.php:89
+#: ../../.././query.php:95
+#: ../../.././Copy of
+#: include/header.php:306
+#: ../../.././include/header.php:306
+#: ../../.././include/dcmms/include/dcmmsreport.php:119
+msgid "[Select One]"
+msgstr "[اختر واحدة]"
+
+# e:\program
+#: ../../.././query.php:104
msgid "Search The Database"
msgstr "البحث في قاعدة البيانات"
+# e:\program
+#: ../../.././query.php:187
+msgid "Landmark Name"
+msgstr "اسم المعلم"
+
# c:\program
-#: ../../.././query.php:105
-msgid "Please enter the Query number."
-msgstr "ادخل قيمة البحث"
+#: ../../.././query.php:188
+msgid "Administrative Area"
+msgstr "المنطقة"
# c:\program
+#: ../../.././query.php:189
+#: ../../.././include/dcmms/include/i18n.php:326
+msgid "Village"
+msgstr "القرية"
+
+# e:\program
+#: ../../.././query.php:190
+#: ../../.././Copy of include/header.php:445
+#: include/i18n.php:24
+#: include/dataobject/Public_bill.php:38
+#: include/dataobject/Public_subscriber.php:208
+#: ../../.././include/header.php:445
+#: ../../.././include/i18n.php:24
+#: ../../.././include/dataobject/Public_bill.php:38
+#: ../../.././include/dataobject/Public_subscriber.php:208
+#: ../../.././include/dcmms/include/i18n.php:26
+#: ../../.././include/dcmms/include/dataobject/Translation.php:111
+msgid "Action"
+msgstr "العملية"
+
+# D:\dccss\dccss/deliverypointpage.php:107
+# D:\dccss\dccss/deliverypointpage.php:138
+#: ../../.././query.php:199
+#: ../../.././Copy of
+#: include/dataobject/Public_subscriber.php:224
+#: ../../.././include/dataobject/Public_subscriber.php:224
+msgid "[View on Map]"
+msgstr "[اظهار على الخريطة]"
+
+# c:\program
#: ../../.././reports.php:34
msgid "Create No bill available status report"
msgstr "خلق تقرير الاشتراكات الغير موجودة"
@@ -2218,11 +2288,11 @@
msgid "Please enter the processing value or enter 0 to process all data."
msgstr "الرجاء ادخال القيمة المرغوب بمعالجتها او ادخل صفر لمعالجة جميع البيانات"
-#: ../../.././admin/processing.php:65
+#: ../../.././admin/processing.php:70
msgid "Data processing is done."
msgstr "تمت معالجة البيانات."
-#: ../../.././admin/processing.php:68
+#: ../../.././admin/processing.php:73
msgid "Failed to process the data."
msgstr "لم تتم عملية المعالجة بنجاح"
@@ -2735,13 +2805,6 @@
msgid "from the list"
msgstr "من القائمة"
-# e:\program
-#: ../../.././Copy of include/header.php:306
-#: ../../.././include/header.php:306
-#: ../../.././include/dcmms/include/dcmmsreport.php:119
-msgid "[Select One]"
-msgstr "[اختر واحدة]"
-
# c:\program
#: ../../.././Copy of include/header.php:350
#: include/header.php:363
@@ -2763,20 +2826,6 @@
msgstr "الى مربع النص"
# e:\program
-#: ../../.././Copy of include/header.php:445
-#: include/i18n.php:24
-#: include/dataobject/Public_bill.php:38
-#: include/dataobject/Public_subscriber.php:208
-#: ../../.././include/header.php:445
-#: ../../.././include/i18n.php:24
-#: ../../.././include/dataobject/Public_bill.php:38
-#: ../../.././include/dataobject/Public_subscriber.php:208
-#: ../../.././include/dcmms/include/i18n.php:26
-#: ../../.././include/dcmms/include/dataobject/Translation.php:111
-msgid "Action"
-msgstr "العملية"
-
-# e:\program
#: ../../.././Copy of include/header.php:472
#: ../../.././include/header.php:472
msgid "Please click the link to go to the "
@@ -2847,9 +2896,8 @@
# c:\program
#: ../../.././Copy of include/i18n.php:35
#: ../../.././include/i18n.php:35
-#, fuzzy
msgid "Cubic Meter"
-msgstr "متر"
+msgstr "مترمكعب"
# c:\program
#: ../../.././Copy of include/i18n.php:36
@@ -2995,9 +3043,8 @@
# c:\program
#: ../../.././Copy of include/i18n.php:64
#: ../../.././include/i18n.php:64
-#, fuzzy
msgid "Flatcount"
-msgstr "عدد الطوابق:"
+msgstr "عدد الشقق"
# c:\program
#: ../../.././Copy of include/i18n.php:65
@@ -3041,9 +3088,8 @@
#: ../../.././Copy of include/i18n.php:80
#: ../../.././include/i18n.php:80
#: ../../.././include/dcmms/include/i18n.php:255
-#, fuzzy
msgid "Residential"
-msgstr "تنظيف النموذج"
+msgstr "منزلي"
# c:\program
#: ../../.././Copy of include/i18n.php:84
@@ -3074,7 +3120,7 @@
#: ../../.././Copy of include/i18n.php:92
#: ../../.././include/i18n.php:92
msgid "Reading"
-msgstr ""
+msgstr "قراءة"
# c:\program
#: ../../.././Copy of include/i18n.php:93
@@ -3125,7 +3171,7 @@
#: ../../.././include/i18n.php:101
#: ../../.././include/dcmms/include/i18n.php:77
msgid "Count"
-msgstr ""
+msgstr "العدد"
# e:\program
#: ../../.././Copy of include/i18n.php:103
@@ -3672,13 +3718,6 @@
msgid "DeliveryPoint #"
msgstr "رقم نقطة الوصول #"
-# D:\dccss\dccss/deliverypointpage.php:107
-# D:\dccss\dccss/deliverypointpage.php:138
-#: ../../.././Copy of include/dataobject/Public_subscriber.php:224
-#: ../../.././include/dataobject/Public_subscriber.php:224
-msgid "[View on Map]"
-msgstr "[اظهار على الخريطة]"
-
# e:\program
#: ../../.././Copy of include/dataobject/Public_subscriber.php:230
#: ../../.././include/dataobject/Public_subscriber.php:233
@@ -3717,11 +3756,6 @@
msgstr "رقم الغرفة الجماعية (كابينة):"
# e:\program
-#: ../../.././include/dataobject/Public_subscriber.php:227
-msgid "[Print]"
-msgstr "[طباعة]"
-
-# e:\program
#: ../../.././include/dcmms/include/dcmmaputil.php:274
#, fuzzy
msgid "Accept Location"
@@ -3750,7 +3784,7 @@
#: ../../.././include/dcmms/include/dcmmspage.php:305
msgid "Find"
-msgstr ""
+msgstr "بحث"
# c:\program
#: ../../.././include/dcmms/include/dcmmspage.php:345
@@ -4058,9 +4092,8 @@
# c:\program
#: ../../.././include/dcmms/include/i18n.php:78
-#, fuzzy
msgid "cubic meter"
-msgstr "متر"
+msgstr "مترمكعب"
#: ../../.././include/dcmms/include/i18n.php:79
msgid "Cultural Facility"
@@ -4095,13 +4128,11 @@
# c:\program
#: ../../.././include/dcmms/include/i18n.php:86
#: ../../.././include/dcmms/include/dataobject/Team.php:106
-#, fuzzy
msgid "Description:"
msgstr "وصف"
# c:\program
#: ../../.././include/dcmms/include/i18n.php:87
-#, fuzzy
msgid "description"
msgstr "وصف"
@@ -5136,12 +5167,6 @@
msgstr "[معاينة]"
# c:\program
-#: ../../.././include/dcmms/include/i18n.php:326
-#, fuzzy
-msgid "Village"
-msgstr "فيلا"
-
-# c:\program
#: ../../.././include/dcmms/include/i18n.php:327
#, fuzzy
msgid "village"
@@ -5241,11 +5266,6 @@
msgid "WorkorderID"
msgstr ""
-#: ../../.././include/dcmms/include/i18n.php:351
-#: ../../.././include/dcmms/include/i18n.php:352
-msgid "Area:"
-msgstr ""
-
# c:\program
#: ../../.././include/dcmms/include/i18n.php:353
#: ../../.././include/dcmms/include/dataobject/Maintenance.php:109
Modified: branches/ms4w/apps/dccss/map.php
===================================================================
--- branches/ms4w/apps/dccss/map.php 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/map.php 2009-01-13 13:01:25 UTC (rev 367)
@@ -553,6 +553,10 @@
<td>
<?= $toolDeliveryPoint->toHtml() ?></td>
</tr>
+
+ <tr><td><img src="images/todo.png" width="24" height="24"></td><td><?= ('<a href="print_ac.php?PHPSESSID='.session_id().
+ '&action=mapExtent&minx='.$_POST['minx'].'&miny='.$_POST['miny'].'&maxx='.$_POST['maxx'].'&maxy='.$_POST['maxy'].'">'.
+ _('[Print]').'</a>')?></td></tr>
</table>
</td>
</tr>
Modified: branches/ms4w/apps/dccss/print_ac.php
===================================================================
--- branches/ms4w/apps/dccss/print_ac.php 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/print_ac.php 2009-01-13 13:01:25 UTC (rev 367)
@@ -48,19 +48,6 @@
<table border="1" summary="Header" width="98%" height="4%" cellspacing="0"
cellpadding="0" nowrap="nowrap">
<tr>
- <?php
- $query = "select css_to_billing.customerlocation,css_to_billing.meterlocation,metercabinet.pewssaid,
- css_to_billing.paracode,
- css_to_billing.logbooknumber,css_to_billing.sequence,css_to_billing.subsequence
- ,css_to_billing.name,css_to_billing.routeid from css_to_billing
- left outer join deliverypoint on
- (css_to_billing.customerlocation=deliverypoint.sequence) left outer join metercabinet
- on (css_to_billing.meterlocation=metercabinet.id)
- 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
@@ -84,23 +71,24 @@
<td width="30%" height="80%" valign="top">
<table cellspacing="0" cellpadding="0"> <?php
- //Customer information
- /*echo("<tr><td class=\"input\"><font size=\"2\"><b>".$row[0]."</b></font></td>");
- echo("<td width=\"%95\" class=\"label\"> <font size=\"2\">"._(pg_fieldname($result, 0))."</td></tr>");
- echo("<tr><td class=\"input\"><font size=\"2\"><b>".$row[1]."</b></font></td>");
- echo("<td width=\"%26\" class=\"label\"> <font size=\"2\">"._(pg_fieldname($result, 1))."</td></tr>");
- echo("<tr><td class=\"input\"><font size=\"2\"><b>".$row[2]."</b></font></td>");
- echo("<td class=\"label\"><font size=\"2\">"._(pg_fieldname($result, 2))."</td></tr>");
- echo("<tr><td class=\"input\"><font size=\"2\"><b>".$row[3]."</b></font></td>");
- echo("<td width=\"%26\" class=\"label\"> <font size=\"2\">"._(pg_fieldname($result, 3))."</td></tr>");
- echo("<tr><td class=\"input\"><font size=\"2\"><b>".$row[4]."</b></font></td>");
- echo("<td width=\"%26\" class=\"label\"> <font size=\"2\">"._(pg_fieldname($result, 4))."</td></tr>");
- echo("<tr><td class=\"input\"><font size=\"2\"><b>".$row[5]."</b></font></td>");
- echo("<td width=\"%26\" class=\"label\"> <font size=\"2\">"._(pg_fieldname($result, 5))."</td></tr>");
- */
?>
<tr><td><font size=\"2\"><?= _("Geographic location for new customer neigboor") ?></td></tr>
- <?php
+<?php
+if ($_REQUEST['action']=='map'){
+ $query = "select css_to_billing.customerlocation,css_to_billing.meterlocation,
+ metercabinet.pewssaid,css_to_billing.paracode,css_to_billing.logbooknumber,
+ css_to_billing.sequence,css_to_billing.subsequence
+ ,css_to_billing.name,css_to_billing.routeid from css_to_billing
+ left outer join deliverypoint on
+ (css_to_billing.customerlocation=deliverypoint.sequence) left outer
+ join metercabinet
+ on (css_to_billing.meterlocation=metercabinet.id)
+ where deliverypoint.geocode=".$_REQUEST['geocode'];
+ //echo ($query);
+ $result = pg_query($query);
+ $numfields = pg_numfields($result);
+ $row = pg_fetch_array($result);
+
echo("<tr><td width=\"%50\" class=\"label\"> <font size=\"2\">"._(pg_fieldname($result, 0)).":</td>");
echo("<td class=\"input\"><font size=\"2\"><b>".$row[0]."</b></font></td></tr>");
echo("<tr><td width=\"%26\" class=\"label\"> <font size=\"2\">"._(pg_fieldname($result, 1))."</td>");
@@ -114,14 +102,14 @@
echo("<td class=\"input\"><font size=\"2\"><b>".$row[4]."</b></font></td></tr>");
echo("<tr><td class=\"label\"><font size=\"2\">"._(pg_fieldname($result, 5)).":</td>");
echo("<td class=\"input\"><font size=\"2\"><b>".$row[5]."</b></font></td></tr>");
-echo("<tr><td class=\"label\"><font size=\"2\">"._(pg_fieldname($result, 6)).":</td>");
+ echo("<tr><td class=\"label\"><font size=\"2\">"._(pg_fieldname($result, 6)).":</td>");
echo("<td class=\"input\"><font size=\"2\"><b>".$row[6]."</b></font></td></tr>");
echo("<tr><td class=\"label\"><font size=\"2\">"._(pg_fieldname($result, 7)).":</td>");
echo("<td class=\"input\"><font size=\"2\"><b>".$row[7]."</b></font></td></tr>");
-
+}
?>
</table>
<br><br><br><br><br><br><br>
@@ -152,63 +140,38 @@
setLayerAuthentication($map);
adjustScalebar($map);
-
+if ($_REQUEST['action']=='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=".
+ $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
-
-
+ $map->setextent($pointX-50,$pointY-50,$pointX+50,$pointY+50);
+} elseif ($_REQUEST['action']=='mapLandmark'){
+$query = "select X(the_geom), Y(the_geom) from landmark where gid='".
+ $_REQUEST["gid"]."'";
+ //echo($query);
+ $result = pg_query($query);
+ $numrows = pg_numrows($result);
+ if($numrows > 0) {
+ for($i=0; $i<$numrows; $i++) {
+ $r = pg_fetch_row($result, $i);
+ $minx = $r[0]-50;
+ $miny = $r[1]-50;
+ $maxx = $r[0]+50;
+ $maxy = $r[1]+50;
+ $map->setextent($minx,$miny,$maxx,$maxy);
+ }
+ }
+} elseif ($_REQUEST['action']=='mapExtent'){
+ $map->setextent($_REQUEST['minx'],$_REQUEST['miny'],$_REQUEST['maxx'],$_REQUEST['maxy']);
+}
$objLayer = $map->getlayerbyname('route');
$objLayer->set("status",MS_OFF);
$objLayer = $map->getlayerbyname('pressurizedmain');
@@ -218,10 +181,12 @@
$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);
@@ -234,7 +199,7 @@
$map->freeQuery('*all*');
?>
- <a href="index.php?PHPSESSID=<?= session_id()?>"><img src="<?=
+ <a href="query.php?PHPSESSID=<?= session_id()?>"><img src="<?=
$image_url ?>" alt="Workorder Map" style="width: 20cm; height: 16cm;"/></a>
</td>
Modified: branches/ms4w/apps/dccss/query.php
===================================================================
--- branches/ms4w/apps/dccss/query.php 2009-01-12 11:16:19 UTC (rev 366)
+++ branches/ms4w/apps/dccss/query.php 2009-01-13 13:01:25 UTC (rev 367)
@@ -54,6 +54,7 @@
$Queryform->addElement('radio', 'query',_('Query Subscriber Number'),'',2);
$Queryform->addElement('radio', 'query',_('Query Subscriber name'),'',3);
$Queryform->addElement('radio', 'query',_('Query Meter cabinet'),'',4);
+$Queryform->addElement('radio', 'query',_('Query Landmark'),'',0);
//print_r($_POST);
@@ -158,8 +159,8 @@
$Queryform->process($Queryform, false);
//$objSubscriber->orderBy('sequence,subsequence');
-
- if ($Queryform->exportValue('query')!=0){
+
+ if (($Queryform->exportValue('query')!=0)&&($Queryform->exportValue('searchvalue')!='')){
// echo($strQuery.$strWhere);
$result = pg_query($strQuery.$strWhere);
$numrows = pg_numrows($result);
@@ -171,14 +172,10 @@
_('Back to delivery point').'</a>','','view');
$DccssPage->add($objSubscriberTable->tohtml());
}
- }
- elseif ($_POST['area'][1]!=''){
+ }elseif ($_POST['area'][1]!=''){
$strQuery = 'select dcmmstranslation(\''.$_SESSION['language'].
- '\',Name), Administra, village from landmark where village='.$_POST['area'][1];
-
- $strQueryextent="select xmin(the_geom)-50,ymin(the_geom)-50,xmax(the_geom)+50,ymax(the_geom)+50,astext(buffer(the_geom,50)) from landmark where
- village=".$_POST['area'][1];
- print_r($strQuery);
+ '\',Name), Administra, village,gid from landmark where village='.$_POST['area'][1].' order by gid asc';
+
$result = pg_query($strQuery);
$numrows = pg_numrows($result);
$objTable->Query($strQuery);
@@ -187,16 +184,24 @@
$objTable->addRows();
$numRowCount = $objTable->getRowCount();
if(($numRowCount > 0)) {
- $objTable->setCellContents(0, 0, _("Name"), "TH");
+ $objTable->setCellContents(0, 0, _("Landmark Name"), "TH");
$objTable->setCellContents(0, 1, _("Administrative Area"), "TH");
$objTable->setCellContents(0, 2, _("Village"), "TH");
$objTable->setCellContents(0, 3, _("Action"), "TH");
- for ($i==0;$i<$numRowCount;$i++){
- $arrRow =& pg_fetch_row($result);
- $objTable->setCellContents($i, 3, '<a href="print_ac.php?PHPSESSID='.session_id().
- '&action=map&name='.$arrRow[0].'&village='.$arrRow[2].'">'.
+ $i=1;
+ while ($arrRow = pg_fetch_row($result)) {
+
+ // for ($i==0;$i<$numRowCount;$i++){
+ // $arrRow =& pg_fetch_row($result);
+
+ $ref='<a href="deliverypointpage.php?PHPSESSID='.session_id().
+ '&action=mapLandmark&gid='.$arrRow[3].'&name='.$arrRow[0].'&village='.$arrRow[2].'">'.
+ _('[View on Map]').'</a>';
+ $objTable->setCellContents($i, 3, $ref. '<a href="print_ac.php?PHPSESSID='.session_id().
+ '&action=mapLandmark&gid='.$arrRow[3].'&name='.$arrRow[0].'&village='.$arrRow[2].'">'.
_('[Print]').'</a>');
- }
+ $i++;
+ }
}
$DccssPage->add($objTable->toHtml());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|