svn commit: r113 - trunk/mapbender/http/javascripts/mod_copyright.php
arnulf at osgeo.org
arnulf at osgeo.org
Wed Apr 19 12:57:02 EDT 2006
Author: arnulf
Date: 2006-04-19 16:57:02+0000
New Revision: 113
Modified:
trunk/mapbender/http/javascripts/mod_copyright.php (contents, props changed)
Log:
code cleaned, added prepared statements
Modified: trunk/mapbender/http/javascripts/mod_copyright.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/javascripts/mod_copyright.php?view=diff&rev=113&p1=trunk/mapbender/http/javascripts/mod_copyright.php&p2=trunk/mapbender/http/javascripts/mod_copyright.php&r1=112&r2=113
==============================================================================
--- trunk/mapbender/http/javascripts/mod_copyright.php (original)
+++ trunk/mapbender/http/javascripts/mod_copyright.php 2006-04-19 16:57:02+0000
@@ -1,6 +1,6 @@
<?php
-#$Id: mod_copyright.php,v 1.11 2006/01/13 13:28:49 astrid_emde Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_copyright.php,v 1.11 2006/01/13 13:28:49 astrid_emde Exp $
+# $Id$
+# http://www.mapbender.org/index.php/Copyright
# Copyright (C) 2002 CCGIS
#
# This program is free software; you can redistribute it and/or modify
@@ -24,12 +24,13 @@
$con = db_connect($DBSERVER,$OWNER,$PW);
db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'copyright' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
-$cnt = 0;
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'copyright' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);$cnt = 0;
while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
+ $e_target = $row["e_target"];
+ $cnt++;
}
if($cnt > 1){ echo "alert('copyright: ID not unique!');";}
echo "var mod_copyright_target = '".$e_target."';";
@@ -38,12 +39,11 @@
if (mod_copyright_text){}
}
catch(e){
- mod_copyright_text = "mapbender.org"
-}
+ mod_copyright_text = "mapbender.org"
+}
var mod_copyright_left = 5;
var mod_copyright_bottom = 20;
-
var mod_copyright_color1 = "white";
var mod_copyright_color2 = "black";
var mod_copyright_font = "Arial, Helvetica, sans-serif";
More information about the Mapbender_commits
mailing list