[ Index ]

PHP Cross Reference of phpwcms V1.4.3 _r380 (23.11.09)

title

Body

[close]

/include/inc_tmpl/content/ -> cnt51.open.php (source)

   1  <?php
   2  /*************************************************************************************
   3     Copyright notice
   4     
   5     (c) 2002-2009 Oliver Georgi (oliver@phpwcms.de) // All rights reserved.
   6   
   7     This script is part of PHPWCMS. The PHPWCMS web content management system is
   8     free software; you can redistribute it and/or modify it under the terms of
   9     the GNU General Public License as published by the Free Software Foundation;
  10     either version 2 of the License, or (at your option) any later version.
  11    
  12     The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html
  13     A copy is found in the textfile GPL.txt and important notices to the license 
  14     from the author is found in LICENSE.txt distributed with these scripts.
  15    
  16     This script is distributed in the hope that it will be useful, but WITHOUT ANY 
  17     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  18     PARTICULAR PURPOSE.  See the GNU General Public License for more details.
  19   
  20     This copyright notice MUST APPEAR in all copies of the script!
  21  *************************************************************************************/
  22  
  23  session_start();
  24  
  25  $phpwcms = array();
  26  require_once('../../../config/phpwcms/conf.inc.php');
  27  require_once ('../../../include/inc_lib/default.inc.php');
  28  require_once  (PHPWCMS_ROOT.'/include/inc_lib/dbcon.inc.php');
  29  require_once  (PHPWCMS_ROOT.'/include/inc_lib/general.inc.php');
  30  checkLogin();
  31  require_once  (PHPWCMS_ROOT.'/include/inc_lib/backend.functions.inc.php');
  32  
  33  
  34  ?>
  35  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  36  <html>
  37  <head>
  38  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  39  <title>Choose Location</title>
  40  <script type="text/javascript" language="javascript">
  41  <!--
  42  var ie4 = document.all&&navigator.userAgent.indexOf("Opera")==-1;
  43  var ns6 = document.getElementById&&!document.all;
  44  var ns4 = document.layers;
  45  
  46  function setLocationXY(kx,ky) {
  47      //alert('hier');
  48      window.opener.document.articlecontent.cmap_location_x.value=kx;
  49      window.opener.document.articlecontent.cmap_location_y.value=ky;
  50      window.opener.document.articlecontent.cmap_location_edited.value='1';
  51  }
  52  //-->
  53  </script>
  54  <style type="text/css">
  55  <!--
  56  body {
  57      font-family: Verdana, Arial, Helvetica, sans-serif;
  58      font-size: 10px;
  59      margin:0;
  60      padding:0;
  61  }
  62  -->
  63  </style>
  64  </head>
  65  
  66  <body>
  67  <?php
  68  
  69  
  70  $map_img = clean_slweg($_GET['map']);
  71  
  72  if($map_data = getimagesize(PHPWCMS_TEMPLATE.'inc_cntpart/map/map_img/'.$map_img)) {
  73  
  74      $map = '';
  75      $p = array();
  76      
  77      if(isset($_GET['points'])) {
  78          $points = explode(':|:', $_GET['points']);
  79          if(count($points)) {
  80              foreach($points as $value) {
  81                  $point = explode(':::', $value);
  82                  if(empty($point[1])) $point[1] = 0;
  83                  if(empty($point[2])) $point[2] = '';
  84                  $map .= '<area shape="rect" coords="'.($point[0]-3).','.($point[1]-3);
  85                  $map .= ','.($point[0]+4).','.($point[1]+4).'" href="#" title="';
  86                  $map .= $point[2]."\">\n";
  87                  $p[] = $point[0].'x'.$point[1];
  88              }
  89          }
  90      }
  91      
  92      echo '<a href="#" onclick="if(ie4){setLocationXY(event.offsetX,event.offsetY);}else{setLocationXY(event.clientX,event.clientY);} window.close(); return false;">';
  93      echo '<img src="cnt51.map.php?q=90&amp;i='.rawurlencode($map_img).'&amp;xy='.rawurlencode(implode(',',$p)).'" border="0" usemap="#Map">';
  94      echo '</a>';
  95      if($map) {
  96      echo '<map name="Map">
  97      '.$map.'</map>';
  98      }
  99      
 100  } else {
 101  
 102      echo 'Please check given image data!';
 103  
 104  }
 105  
 106  ?>
 107  <div align="center"><a href="#" onclick="window.close();return false;">close window</a></div>
 108  </body>
 109  </html>


Generated: Wed Dec 30 05:55:15 2009 Cross-referenced by PHPXref 0.7