[ Index ] |
PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2010 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 // ---------------------------------------------------------------- 24 // obligate check for phpwcms constants 25 if (!defined('PHPWCMS_ROOT')) { 26 die("You Cannot Access This Script Directly, Have a Nice Day."); 27 } 28 // ---------------------------------------------------------------- 29 30 31 //map 32 33 if(!isset($content["map"])) { 34 $content["map"]['template'] = ''; 35 $content["map"]['image'] = ''; 36 $content["map"]["text"] = ''; 37 } 38 39 ?> 40 <tr> 41 <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template'] ?>: </td> 42 <td><select name="cmap_template" id="cmap_template" class="f11b"> 43 <?php 44 // templates for article listing 45 $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/map'); 46 if(is_array($tmpllist) && count($tmpllist)) { 47 foreach($tmpllist as $val) { 48 $vals = ''; 49 if($val == $content["map"]['template']) $vals= ' selected="selected"'; 50 $val = htmlspecialchars($val); 51 echo '<option value="'.$val.'"'.$vals.'>'.$val."</option>\n"; 52 } 53 } 54 55 ?> 56 </select></td> 57 </tr> 58 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="10"></td></tr> 59 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 60 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4"></td></tr> 61 <tr> 62 <td valign="top" align="right" class="chatlist"><img src="img/leer.gif" width="1" height="14" alt=""><?php echo $BL['be_ctype_map'] ?>: </td> 63 <td valign="top"><?php 64 65 // select the map image 66 $g = ''; 67 $map_selected = 0; 68 $map_name = ''; 69 $imglist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/map/map_img', 'jpg,gif,png,jpeg'); 70 if(is_array($imglist) && count($imglist)) { 71 foreach($imglist as $val) { 72 $vals = ''; 73 if($val == $content["map"]['image']) { 74 $vals= ' checked="checked"'; 75 $map_selected = 1; 76 $map_name = $content["map"]['image']; 77 $map_info = getimagesize(PHPWCMS_TEMPLATE.'inc_cntpart/map/map_img/'.$map_name); 78 } 79 $val = html_specialchars($val); 80 $g .= '<tr><td>'; 81 $g .= '<input type="radio" name="cmap_image" value="'.$val.'"'.$vals.' /> '; 82 $g .= '</td><td class="f11b">'.$val.' </td><td>'; 83 $g .= '<a href="javascript:void(0);" onmouseover="this.T_WIDTH=150;this.T_DELAY=100;this.T_PADDING=6;this.T_BGCOLOR=\'#ffffff\';'; 84 $gp = substr($phpwcms["templates"],1).'inc_cntpart/map/map_img/'.$val; 85 $g .= 'Tip(\'<img src=image_resized.php?imgfile='.$gp.'&format=jpg&q=80&w=250&h=250>\');">'; 86 $g .= '<img src="img/button/button_img_mouseover.gif" alt="" width="11" height="11" border="0">'; 87 $g .= "</a></td></tr>\n"; 88 } 89 } 90 if($g) { 91 echo '<table cellspacing="0" cellpadding="0" border="0">'."\n".$g.'</table>'; 92 } else { 93 echo '<img src="img/leer.gif" width="1" height="13" alt=""><span class="error">no map available. upload one first.</span>'; 94 } 95 96 ?></td> 97 </tr> 98 <?php 99 // if a map is selected show possible add/edit new point 100 if($map_selected) { 101 102 if(isset($_GET['dellocid']) && intval($_GET['dellocid'])) { 103 104 mysql_query("UPDATE ".DB_PREPEND."phpwcms_map SET map_deleted=9 WHERE ". 105 "map_cid=".intval($content["id"])." AND map_id=".intval($_GET['dellocid']), $db); 106 107 } 108 109 110 $map_current = (isset($_GET['locid'])) ? intval($_GET['locid']) : 0; 111 $map_sql = "SELECT * FROM ".DB_PREPEND."phpwcms_map WHERE map_deleted=0 "; 112 $map_sql .= "AND map_cid=".intval($content["id"])." ORDER BY map_zip ASC, map_city ASC"; 113 $map_list = ''; 114 $map_xy = array(); 115 $ck = 0; 116 if($map_result = mysql_query($map_sql, $db)) { 117 while($map_row = mysql_fetch_assoc($map_result)) { 118 if($map_row['map_id'] == $map_current) { 119 120 $content["location"]['id'] = $map_row['map_id']; 121 $content["location"]['x'] = $map_row['map_x']; 122 $content["location"]['y'] = $map_row['map_y']; 123 $content["location"]['title'] = $map_row['map_title']; 124 $content["location"]['zip'] = $map_row['map_zip']; 125 $content["location"]['city'] = $map_row['map_city']; 126 $content["location"]['entry'] = $map_row['map_entry']; 127 128 } 129 $map_row['map_x'] = html_specialchars($map_row['map_x']); 130 $map_list .= '<tr'.(($ck % 2) ? ' bgcolor="#FBFCFC"' : '').">\n"; 131 $map_list .= '<td class="v09">'.$map_row['map_x'].'x'.$map_row['map_y']."</td>\n"; 132 $map_list .= '<td class="v09" width="90%"><strong>'.$map_row['map_title']."</strong></td>\n"; 133 $map_list .= '<td align="right" class="v09"><a href="phpwcms.php?do=articles&p=2&s=1&aktion=2&'; 134 $map_list .= 'id='.$content["aid"].'&acid='.$content["id"].'&locid='.$map_row['map_id'].'">'; 135 $map_list .= '<img src="img/button/edit_11x11.gif" width="11" height="11" border="0" alt=""></a>'; 136 $map_list .= '<img src="img/leer.gif" width="1" height="1" alt="" border="0">'; 137 $map_list .= '<a href="phpwcms.php?do=articles&p=2&s=1&aktion=2&'; 138 $map_list .= 'id='.$content["aid"].'&acid='.$content["id"].'&dellocid='.$map_row['map_id']; 139 $map_list .= '" onclick="return confirm(\''.$BL['be_btn_delete'].' \n'; 140 $map_list .= $map_row['map_title'].'\');">'; 141 $map_list .= '<img src="img/button/del_11x11.gif" width="11" height="11" alt="" border="0">'; 142 $map_list .= "</a></td>\n</tr>\n"; 143 $map_xy[] = $map_row['map_x'].':::'.$map_row['map_y'].':::'.$map_row['map_title']; 144 145 $ck++; 146 } 147 mysql_free_result($map_result); 148 } 149 150 151 ?> 152 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 153 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 154 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 155 <tr> 156 <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="15"><?php echo ($map_current) ? $BL['be_cnt_map_edit'] : $BL['be_cnt_map_add']; ?>: </td> 157 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" bgcolor="#E7E8EB" summary=""> 158 <tr> 159 <td class="v10"> X: </td> 160 <td><input name="cmap_location_x" type="text" class="f10" id="cmap_location_x" style="width: 50px;" size="4" maxlength="4" value="<?php echo empty($content['location']["x"]) ? '' : intval($content['location']["x"]) ?>" onChange="doMapChange();"></td> 161 <td class="v10"> Y: </td> 162 <td><input name="cmap_location_y" type="text" class="f10" id="cmap_location_y" style="width: 50px;" size="4" maxlength="4" value="<?php echo empty($content['location']["y"]) ? '' : intval($content['location']["y"]) ?>" onChange="doMapChange();"></td> 163 <td class="v10"> px </td> 164 <td class="v10"><input name="open_map" type="button" value="open map" class="v09" 165 onclick="flevPopupLink('include/inc_tmpl/content/cnt51.open.php?cid=<?php 166 echo $content["id"] ?>&map=<?php 167 echo rawurlencode($map_name); 168 echo '&points='.rawurlencode(implode(':|:', $map_xy)); 169 ?>','map','<?php 170 echo 'scrollbars=yes,resizable=yes,width='.($map_info[0]+12).',height='.($map_info[1]+15) 171 ?>',1);return document.MM_returnValue;"></td> 172 <td><img src="img/leer.gif" alt="" width="5" height="22"></td> 173 </tr> 174 </table></td> 175 </tr> 176 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3"></td></tr> 177 <tr> 178 <td align="right" class="chatlist"><?php echo $BL['be_cnt_map_title'] ?>: </td> 179 <td><input name="cmap_location_title" type="text" class="f11" style="width: 440px" value="<?php echo empty($content['location']["title"]) ? '' : html_specialchars($content['location']["title"]) ?>" size="40" onChange="doMapChange();"></td> 180 </tr> 181 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 182 <tr> 183 <td align="right" class="chatlist"><?php echo $BL['be_profile_label_zip'] ?>: </td> 184 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 185 <tr> 186 <td style="width:55px;"><input name="cmap_location_zip" type="text" class="f11" style="width: 55px" value="<?php echo empty($content['location']["zip"]) ? '' : html_specialchars($content['location']["zip"]) ?>" size="8" onChange="doMapChange();"></td> 187 <td class="chatlist" align="right"> <?php echo $BL['be_profile_label_city'] ?>: </td> 188 <td style="width:300px;"><input name="cmap_location_city" type="text" class="f11" style="width: 300px" value="<?php echo empty($content['location']["city"]) ? '' : html_specialchars($content['location']["city"]) ?>" size="30" onChange="doMapChange();"></td> 189 </tr> 190 </table></td> 191 </tr> 192 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2"></td></tr> 193 <tr> 194 <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_cnt_map_info'] ?>: </td> 195 <td valign="top"><?php 196 197 $wysiwyg_editor = array( 198 'value' => empty($content['location']["entry"]) ? '' : $content['location']["entry"], 199 'field' => 'cmap_location_entry', 200 'height' => '250px', 201 'width' => '440px', 202 'rows' => '7', 203 'editor' => $_SESSION["WYSIWYG_EDITOR"], 204 'lang' => 'en' 205 ); 206 include (PHPWCMS_ROOT.'/include/inc_lib/wysiwyg.editor.inc.php'); 207 208 ?></td> 209 </tr> 210 <tr> 211 <td valign="bottom"><img src="img/leer.gif" alt="" width="1" height="22"><input type="hidden" name="cmap_location_id" value="<?php echo empty($content['location']["id"]) ? 0 : intval($content['location']["id"]) ?>"><input type="hidden" id="cmap_location_edited" name="cmap_location_edited" value="1"></td> 212 <td valign="bottom"><input name="Submit" type="submit" class="v09" value="<?php echo $BL['be_save_btn'] ?>"></td> 213 </tr> 214 <?php 215 216 if($map_list) { 217 $ck = ($ck > 10) ? 'height:200px;' : ''; 218 ?> 219 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 220 <tr> 221 <td valign="top" align="right" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="14"><?php echo $BL['be_cnt_map_list'] ?>: </td> 222 <td><div style="overflow:auto;border:1px solid #7F9DB9;padding:0px;width:440px;<?php echo $ck ?>margin:0;background-color:#F3F3F5;"> 223 <table width="100%" border="0" cellpadding="3" cellspacing="0" summary=""> 224 <?php echo $map_list; ?> 225 </table> 226 </div></td> 227 </tr> 228 <?php 229 } 230 231 } 232 ?> 233 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5"></td></tr> 234 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1"></td></tr> 235 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="7"></td></tr> 236 <tr> 237 <td align="right" valign="top" class="chatlist"><img src="img/leer.gif" alt="" width="1" height="13"><?php echo $BL['be_admin_page_text'] ?>: </td> 238 <td valign="top"><textarea name="cmap_text" cols="40" rows="8" class="f11" style="width:440px"><?php echo empty($content["map"]["text"]) ? '' : html_specialchars($content["map"]["text"]) ?></textarea></td> 239 </tr>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Nov 16 22:51:00 2010 | Cross-referenced by PHPXref 0.7 |