|
From: <mah...@us...> - 2009-01-28 08:12:37
|
Revision: 370
http://dccss.svn.sourceforge.net/dccss/?rev=370&view=rev
Author: maher_karim
Date: 2009-01-28 08:12:25 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
2009-01-19 Maher Abdel karim <mah...@do...>
* query.php: add the possiblity to search with like option
* script/create_dccss_ddl.sql: Update sequence creation
Modified Paths:
--------------
branches/ms4w/apps/dccss/changelog
branches/ms4w/apps/dccss/include/dcmmap.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
branches/ms4w/apps/dccss/script/create_css_ddl.sql
Modified: branches/ms4w/apps/dccss/changelog
===================================================================
--- branches/ms4w/apps/dccss/changelog 2009-01-19 09:46:41 UTC (rev 369)
+++ branches/ms4w/apps/dccss/changelog 2009-01-28 08:12:25 UTC (rev 370)
@@ -1,5 +1,17 @@
2009-01-19 Maher Abdel karim <mah...@do...>
+ * query.php: add the possiblity to search with like option
+ * script/create_dccss_ddl.sql: Update sequence creation
+
+2009-01-19 Maher Abdel karim <mah...@do...>
+
+ * print_ac.php: adjust the label size when printing.
+ * map.php:adjust the print option to interact with the passed vars.
+ * include/dcmmap.php:Add the ability to track the changes in the extent
+ with keeping the marked location.
+
+2009-01-19 Maher Abdel karim <mah...@do...>
+
* query.php:adjust the query to be only for the subscriber
table.Add more search options.
* print_ac.php: adjust the label size when printing.
Modified: branches/ms4w/apps/dccss/include/dcmmap.php
===================================================================
--- branches/ms4w/apps/dccss/include/dcmmap.php 2009-01-19 09:46:41 UTC (rev 369)
+++ branches/ms4w/apps/dccss/include/dcmmap.php 2009-01-28 08:12:25 UTC (rev 370)
@@ -433,6 +433,11 @@
$pointObj->setXY($_REQUEST['zoomX'], $_REQUEST['zoomY']);
$glrLayer = $gpoMap->getLayerByName("center");
$pointObj->draw($gpoMap, $glrLayer, $img, 0, 1);
+ }elseif($_REQUEST['zoomX2']!=''){
+ $pointObj = ms_newPointObj();
+ $pointObj->setXY($_REQUEST['zoomX2'], $_REQUEST['zoomY2']);
+ $glrLayer = $gpoMap->getLayerByName("center");
+ $pointObj->draw($gpoMap, $glrLayer, $img, 0, 1);
}
$url = $img->saveWebImage($gImagesFmt, 0, 0, -1);
@@ -449,7 +454,18 @@
$gpoMap->width);
printf("<input type=\"HIDDEN\" name=\"imageheight\" value=\"%d\" />",
$gpoMap->height);
-
+ if ($_REQUEST['zoomX']!=''){
+ printf("<input type=\"HIDDEN\" name=\"zoomX2\" value=\"%d\" />",
+ $_REQUEST['zoomX']);
+ printf("<input type=\"HIDDEN\" name=\"zoomY2\" value=\"%d\" />",
+ $_REQUEST['zoomY']);
+ } else{
+ printf("<input type=\"HIDDEN\" name=\"zoomX2\" value=\"%d\" />",
+ $_REQUEST['zoomX2']);
+ printf("<input type=\"HIDDEN\" name=\"zoomY2\" value=\"%d\" />",
+ $_REQUEST['zoomY2']);
+}
+
echo("<input type=\"image\" src=\"$url\" border=\"0\" width=\"".
$gpoMap->width."\" height=\"$gpoMap->height\" name=\"mainmap\" />");
Modified: branches/ms4w/apps/dccss/locale/ar/LC_MESSAGES/dccss.po
===================================================================
--- branches/ms4w/apps/dccss/locale/ar/LC_MESSAGES/dccss.po 2009-01-19 09:46:41 UTC (rev 369)
+++ branches/ms4w/apps/dccss/locale/ar/LC_MESSAGES/dccss.po 2009-01-28 08:12:25 UTC (rev 370)
@@ -2,7 +2,7 @@
msgstr ""
"Project-Id-Version: DCCSS\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2009-01-18 13:26+0200\n"
+"PO-Revision-Date: 2009-01-20 11:50+0200\n"
"Last-Translator: Maher Karim <Mah...@do...>\n"
"Language-Team: Dorsch <mah...@do...>\n"
"MIME-Version: 1.0\n"
@@ -3286,7 +3286,7 @@
#: ../../.././include/dataobject/Public_bill.php:35
#: ../../.././include/dataobject/Public_subscriber.php:205
msgid "Meter"
-msgstr "متر"
+msgstr "رقم العداد"
# c:\program
#: ../../.././Copy of include/dataobject/Public_bill.php:53
@@ -4598,9 +4598,8 @@
# c:\program
#: ../../.././include/dcmms/include/i18n.php:192
-#, fuzzy
msgid "meter"
-msgstr "متر"
+msgstr ""
# c:\program
#: ../../.././include/dcmms/include/i18n.php:193
Modified: branches/ms4w/apps/dccss/map.php
===================================================================
--- branches/ms4w/apps/dccss/map.php 2009-01-19 09:46:41 UTC (rev 369)
+++ branches/ms4w/apps/dccss/map.php 2009-01-28 08:12:25 UTC (rev 370)
@@ -557,14 +557,18 @@
if ($_REQUEST['minx']!=''){
?>
<tr><td><img src="images/todo.png" width="24" height="24"></td><td><?= ('<a href="print_ac.php?PHPSESSID='.session_id().
- '&action=mapExtent&minx='.$_REQUEST['minx'].'&miny='.$_REQUEST['miny'].'&maxx='.$_REQUEST['maxx'].'&maxy='.$_REQUEST['maxy'].'">'.
+ '&action=mapExtent&minx='.$_REQUEST['minx'].'&miny='.$_REQUEST['miny'].
+ '&maxx='.$_REQUEST['maxx'].'&maxy='.$_REQUEST['maxy'].'&zoomX2='.
+ $_REQUEST['zoomX2'].'&zoomY2='.$_REQUEST['zoomY2'].'">'.
_('[Print]').'</a>')?></td></tr>
<?php
}else{?>
- <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'].'">'.
+ <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>
<?php }
?>
Modified: branches/ms4w/apps/dccss/print_ac.php
===================================================================
--- branches/ms4w/apps/dccss/print_ac.php 2009-01-19 09:46:41 UTC (rev 369)
+++ branches/ms4w/apps/dccss/print_ac.php 2009-01-28 08:12:25 UTC (rev 370)
@@ -123,7 +123,28 @@
<tr><td class=label><font size=\"2\"><?= _("subsequence:") ?></td></tr>
<tr><td class=label><font size=\"2\"><?= _("pnr:") ?></td></tr>
<tr><td class=label><font size=\"2\"><?= _("new customer name:") ?></td><td><input type=text></td></tr>
- <tr><td class=label><font size=\"2\"><?= _("File No.:") ?></td><td><input type=text></td></tr>
+ <?php
+ $strQueryCheck="select nextval('annual_seq')";
+ $result1=pg_query($strQueryCheck);
+ $rowseqCheck = pg_fetch_array($result1);
+
+ if ($rowseqCheck[0]>date('Y')){
+ $strQueryYear="select setval('annual_seq',".date("Y")."),currval('annual_seq'),nextval('file_seq')";
+ $result = pg_query($strQueryYear);
+ $rowseq = pg_fetch_array($result);
+ }elseif ($rowseqCheck[1]<=date('Y')){
+ $strQueryYear="select setval('file_seq',1)";
+ $result = pg_query($strQueryYear);
+ $rowseq = pg_fetch_array($result);
+ /*
+
+
+ */
+ }
+
+ ?>
+ <tr><td class=label><font size=\"2\"><?= _("File No.:") ?></td>
+ <td><input type=text readonly=true value=<?= $rowseq[1].'/'.$rowseq[2] ?>> </td></tr>
<tr><td><img width=75 height=75 alt="North arrow" src="images/northarrow.png" ></td></tr>
</table>
</td>
@@ -202,6 +223,11 @@
$pointObj->setXY($pointX, $pointY);
$glrLayer = $map->getLayerByName("center");
$pointObj->draw($map, $glrLayer,$image, 0, 1);
+ $pointObj = ms_newPointObj();
+ $pointObj->setXY($_REQUEST['zoomX2'], $_REQUEST['zoomY2']);
+ $glrLayer =$map->getLayerByName("center");
+ $pointObj->draw($map, $glrLayer,$image, 0, 1);
+
$pointObj->free();
$image2 = $map->embedLegend($image);
$image_url=$image->saveWebImage("MS_PNG", 1, 1, 0);
Modified: branches/ms4w/apps/dccss/query.php
===================================================================
--- branches/ms4w/apps/dccss/query.php 2009-01-19 09:46:41 UTC (rev 369)
+++ branches/ms4w/apps/dccss/query.php 2009-01-28 08:12:25 UTC (rev 370)
@@ -179,10 +179,16 @@
_('Back to delivery point').'</a>','','view');
$DccssPage->add($objSubscriberTable->tohtml());
}
- }elseif ($_POST['area'][1]!=''){
- $strQuery = 'select dcmmstranslation(\''.$_SESSION['language'].
- '\',Name), Administra, village,gid from landmark where village='.$_POST['area'][1].' order by gid asc';
+ }elseif (($_POST['area'][1]!='0')&&($Queryform->exportValue('searchvalue')=='')){
+
+ $strQuery = "select dcmmstranslation('".$_SESSION['language'].
+ "',landmark.Name), dcmmstranslation('".$_SESSION['language'].
+ "',administrativearea.name), dcmmstranslation('".$_SESSION['language'].
+ "',village.name),landmark.gid from landmark
+left outer join administrativearea on (landmark.administra=administrativearea.codedvalue)
+left outer join village on (landmark.village=village.codedvalue) where village='".$_POST['area'][1]."' order by gid asc";
+
$result = pg_query($strQuery);
$numrows = pg_numrows($result);
$objTable->Query($strQuery);
@@ -213,7 +219,49 @@
$DccssPage->add($objTable->toHtml());
+ }elseif (($Queryform->exportValue('query')==0)&&($Queryform->exportValue('searchvalue')!='')){
+
+ $strQuery = "select dcmmstranslation('".$_SESSION['language'].
+ "',landmark.Name), dcmmstranslation('".$_SESSION['language'].
+ "',administrativearea.name), dcmmstranslation('".$_SESSION['language'].
+ "',village.name),landmark.gid from landmark
+left outer join administrativearea on (landmark.administra=administrativearea.codedvalue)
+left outer join village on (landmark.village=village.codedvalue)
+where dcmmstranslation('".$_SESSION['language'].
+ "',landmark.Name) like '%".$Queryform->exportValue('searchvalue')."%' order by gid asc";
+//print_r($strQuery);
+
+ $result = pg_query($strQuery);
+ $numrows = pg_numrows($result);
+ $objTable->Query($strQuery);
+
+ $objTable = new DbTable($DccssPage->postgis->db, $strQuery);
+ $objTable->addRows();
+ $numRowCount = $objTable->getRowCount();
+ if(($numRowCount > 0)) {
+ $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");
+ $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());
+
+ }
}
echo $DccssPage->toHTML();
Modified: branches/ms4w/apps/dccss/script/create_css_ddl.sql
===================================================================
--- branches/ms4w/apps/dccss/script/create_css_ddl.sql 2009-01-19 09:46:41 UTC (rev 369)
+++ branches/ms4w/apps/dccss/script/create_css_ddl.sql 2009-01-28 08:12:25 UTC (rev 370)
@@ -753,7 +753,18 @@
The following command can be used select dcrmroute(0), this will
process all routes, and select dcrmroute(2333) will
process only this route.';
-
+
+CREATE SEQUENCE annual_seq
+ INCREMENT 1
+ MINVALUE 1
+ MAXVALUE 9223372036854775807
+ START 2009
+ CACHE 1;
+CREATE SEQUENCE file_seq;
+select setval('annual_seq',2009);
+select setval('file_seq',1);
+grant all on annual_seq to public;
+grant all on file_seq to public;
-- Grants and user rights.
-- TODO: More permissions to be added, still give unsufficient permission.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|