cvs: pearweb /public_html account-edit.php /public_html/map index.php
| From: | Arnaud Limbourg | Date: | Mon, 11 Dec 2006 20:59:17 +0000 |
| Subject: | cvs: pearweb /public_html account-edit.php /public_html/map index.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-5248@lists.php.net to get a copy of this message | ||
arnaud Mon Dec 11 20:59:17 2006 UTC
Modified files:
/pearweb/public_html account-edit.php
/pearweb/public_html/map index.php
Log:
PEAR developers map, end of the patch written by David Coallier and Christian Weiske
http://cvs.php.net/viewvc.cgi/pearweb/public_html/account-edit.php?r1=1.53&r2=1.54&diff_format=u
Index: pearweb/public_html/account-edit.php
diff -u pearweb/public_html/account-edit.php:1.53 pearweb/public_html/account-edit.php:1.54
--- pearweb/public_html/account-edit.php:1.53 Tue Oct 31 03:37:27 2006
+++ pearweb/public_html/account-edit.php Mon Dec 11 20:59:17 2006
@@ -15,7 +15,7 @@
+----------------------------------------------------------------------+
| Authors: |
+----------------------------------------------------------------------+
- $Id: account-edit.php,v 1.53 2006/10/31 03:37:27 cellog Exp $
+ $Id: account-edit.php,v 1.54 2006/12/11 20:59:17 arnaud Exp $
*/
auth_require();
@@ -41,7 +41,11 @@
ob_start();
-response_header('Edit Profile :: ' . $handle);
+
+$map = '
+<script language="javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjPqDvnoTwt1l2d9kE7aeSRTvq1EzFJ2An5H6gf53tkxXc1_4QRTnOsnCZUu9PPUZxp0ZM7HYMmpIew"></script>
+';
+response_header('Edit Profile :: ' . $handle, false, $map);
print '<h1>Edit Profile: ';
print '<a href="/user/'. htmlspecialchars($handle) . '">'
@@ -66,7 +70,7 @@
switch ($command) {
case 'update':
- $fields_list = array("name", "email", "homepage",
"showemail", "userinfo", "pgpkeyid", "wishlist");
+ $fields_list = array("name", "email", "homepage",
"showemail", "userinfo", "pgpkeyid", "wishlist",
"latitude", "longitude");
$user_data_post = array('handle' => $handle);
foreach ($fields_list as $k) {
@@ -80,6 +84,18 @@
continue;
}
+ if ($k == 'latitude') {
+ $user_data_post['latitude'] =
+ isset($_POST['latitude']) ?
+ strip_tags($_POST['latitude']) : '';
+ }
+
+ if ($k == 'longitude') {
+ $user_data_post['longitude'] =
+ isset($_POSt['longitude']) ?
+ strip_tags($_POST['longituded']) : '';
+ }
+
if (!isset($_POST[$k])) {
report_error('Invalid data submitted.');
response_footer();
@@ -193,6 +209,7 @@
htmlspecialchars($row['showemail']));
$form->addText('homepage', 'Homepage:',
htmlspecialchars($row['homepage']), 40, null);
+
$form->addText('wishlist', 'Wishlist URI:',
htmlspecialchars($row['wishlist']), 40, null);
$form->addText('pgpkeyid', 'PGP Key ID:'
@@ -205,6 +222,16 @@
$form->addTextarea('cvs_acl',
'CVS Access:',
htmlspecialchars($cvs_acl), 40, 5, null);
+$form->addText('latitude', 'Latitude Point:',
+ htmlspecialchars($row['latitude']), 40, null,
'id="latitude"');
+$form->addText('longitude', 'Longitude Point:',
+ htmlspecialchars($row['longitude']), 40, null,
'id="longitude"');
+$form->addPlaintext('
+<script language="javascript" src="javascript/showmap.js"></script>
+<script language="javascript" src="javascript/popmap.js"></script>
+');
+$form->addPlaintext('<a href="#" onclick="pearweb.display_map(event);
showmap();">Open map</a>');
+
$form->addSubmit('submit', 'Submit');
$form->addHidden('handle', htmlspecialchars($handle));
$form->addHidden('command', 'update');
@@ -212,6 +239,8 @@
. ' cellspacing="1"',
'Edit Your Information', 'class="form-caption"');
+print '
+<div style="position:absolute; visibility: hidden;"
id="pearweb_map"></div>';
print '<a name="password"></a>' . "\n";
print '<h2>» Manage your password</h2>' . "\n";
http://cvs.php.net/viewvc.cgi/pearweb/public_html/map/index.php?r1=1.1&r2=1.2&diff_format=u
Index: pearweb/public_html/map/index.php
diff -u pearweb/public_html/map/index.php:1.1 pearweb/public_html/map/index.php:1.2
--- pearweb/public_html/map/index.php:1.1 Sun Dec 10 19:54:32 2006
+++ pearweb/public_html/map/index.php Mon Dec 11 20:59:17 2006
@@ -16,10 +16,10 @@
* @author David Coallier <davidc@php.net>
* @copyright Copyright (c) 1997-2005 The PHP Group
* @license http://www.php.net/license/3_0.txt
PHP License
- * @version $Id: index.php,v 1.1 2006/12/10 19:54:32 arnaud Exp $
+ * @version $Id: index.php,v 1.2 2006/12/11 20:59:17 arnaud Exp $
*/
$map = '
-<script language="javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjPqDvnoTwt1l2d9kE7aeSRTvq1EzFJ2An5H6gf53tkxXc1_4QRTnOsnCZUu9PPUZxp0ZM7HYMmpIew"></script>
+<script language="javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjPqDvnoTwt1l2d9kE7aeSRSaX3uuPis-gsi6PocQln0mfq-TehSSt5OZ9q0OyzKSOAfNu8NuLlNgWA"></script>
';
response_header('PEAR Maps', false, $map);