зеркало из https://github.com/mozilla/pjs.git
Even more work from Ryan Flint <rflint@dslr.net>.
This commit is contained in:
Родитель
0cb7e93406
Коммит
9e333bb536
|
@ -1,12 +0,0 @@
|
|||
<?php
|
||||
|
||||
class DATABASE_CONFIG {
|
||||
var $default = array('driver' => 'mysql',
|
||||
'connect' => 'mysql_connect',
|
||||
'host' => 'localhost',
|
||||
'login' => '',
|
||||
'password' => '',
|
||||
'database' => '',
|
||||
'prefix' => '');
|
||||
}
|
||||
?>
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
/* SVN FILE: $Id: routes.php,v 1.2 2006-09-20 07:22:44 reed%reedloden.com Exp $ */
|
||||
/* SVN FILE: $Id: routes.php,v 1.3 2006-09-28 03:22:08 reed%reedloden.com Exp $ */
|
||||
/**
|
||||
* Short description for file.
|
||||
*
|
||||
|
@ -23,9 +23,9 @@
|
|||
* @package cake
|
||||
* @subpackage cake.app.config
|
||||
* @since CakePHP v 0.2.9
|
||||
* @version $Revision: 1.2 $
|
||||
* @version $Revision: 1.3 $
|
||||
* @modifiedby $LastChangedBy: phpnut $
|
||||
* @lastmodified $Date: 2006-09-20 07:22:44 $
|
||||
* @lastmodified $Date: 2006-09-28 03:22:08 $
|
||||
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
|
||||
*/
|
||||
/**
|
||||
|
@ -43,4 +43,6 @@
|
|||
* developement.
|
||||
*/
|
||||
$Route->connect('/tests', array('controller' => 'tests', 'action' => 'index'));
|
||||
|
||||
$Route->connect('/privacy-policy', array('controller' => 'pages', 'action' => 'privacy'));
|
||||
?>
|
|
@ -14,19 +14,23 @@ CREATE TABLE IF NOT EXISTS `parties` (
|
|||
`vname` tinytext,
|
||||
`address` tinytext NOT NULL,
|
||||
`tz` int(2) NOT NULL default '0',
|
||||
`website` tinytext,
|
||||
`website` text,
|
||||
`notes` text,
|
||||
`date` int(10) default NULL,
|
||||
`duration` int(11) default NULL,
|
||||
`guests` tinytext NOT NULL,
|
||||
`duration` tinyint(2) NOT NULL default '2',
|
||||
`guests` text NOT NULL,
|
||||
`confirmed` tinyint(1) NOT NULL default '0',
|
||||
`canceled` tinyint(1) NOT NULL default '0',
|
||||
`guestcomments` tinyint(1) NOT NULL default '0',
|
||||
`inviteonly` tinyint(1) NOT NULL default '0',
|
||||
`invitecode` tinytext NOT NULL,
|
||||
`lat` float default NULL,
|
||||
`long` float default NULL,
|
||||
`zoom` tinyint(2) NOT NULL default '8',
|
||||
`useflickr` tinyint(1) NOT NULL default '0',
|
||||
`flickrperms` tinyint(1) default '0',
|
||||
`flickrid` tinytext NOT NULL,
|
||||
`flickrusr` tinytext NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<?php
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Firefox Party Tool
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Ryan Flint <rflint@dslr.net>
|
||||
* Portions created by the Initial Developer are Copyright (C) 2006
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
uses('sanitize');
|
||||
|
||||
class CommentController extends AppController {
|
||||
var $name = 'Comment';
|
||||
var $components = array('Security');
|
||||
|
||||
function beforeFilter() {
|
||||
$this->Security->requirePost('add');
|
||||
}
|
||||
|
||||
function add($pid, $uid) {
|
||||
if (!$this->Session->check('User'))
|
||||
$this->redirect('/');
|
||||
|
||||
if (!empty($this->data)) {
|
||||
// Explictly destroy the last model to avoid an edit instead of an insert
|
||||
$this->Comment->create();
|
||||
|
||||
$clean = new Sanitize();
|
||||
$text = $clean->html($this->data['Comment']['text']);
|
||||
$this->data['Comment']['text'] = preg_replace('/\n/', '<br/>', $text);
|
||||
$this->data['Comment']['owner'] = $uid;
|
||||
$this->data['Comment']['assoc'] = $pid;
|
||||
$this->data['Comment']['time'] = gmmktime();
|
||||
|
||||
if ($this->Comment->save($this->data)) {
|
||||
$this->redirect('/party/view/'.$pid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -12,7 +12,7 @@
|
|||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Firefox Party Tool
|
||||
* The Original Code is Mozilla Party Tool
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Ryan Flint <rflint@dslr.net>
|
||||
|
@ -48,6 +48,12 @@ class FeedsController extends AppController {
|
|||
$this->layout = 'ajax';
|
||||
$this->set('latest', $this->Feed->findAll('', '', 'id DESC', 10, 1));
|
||||
}
|
||||
|
||||
function users() {
|
||||
header('Content-type: text/xml');
|
||||
$this->layout = 'ajax';
|
||||
$this->set('count', $this->Feed->getUserCount());
|
||||
}
|
||||
|
||||
function comments($id = null) {
|
||||
$this->layout = 'ajax';
|
||||
|
@ -67,7 +73,7 @@ class FeedsController extends AppController {
|
|||
|
||||
function ical() {
|
||||
$this->layout = 'ajax';
|
||||
header('Content-type: text/plain');
|
||||
header('Content-type: text/calendar');
|
||||
$weekago = time() - 604800;
|
||||
$this->set('events', $this->Feed->findAll('WHERE date > '. $weekago, '', 'date ASC', 50, 1));
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Firefox Party Tool
|
||||
* The Original Code is Mozilla Party Tool
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Ryan Flint <rflint@dslr.net>
|
||||
|
@ -40,7 +40,12 @@ class PagesController extends AppController {
|
|||
|
||||
function display() {
|
||||
$this->pageTitle = APP_NAME." - Home";
|
||||
$this->set('current', "home");
|
||||
$this->set('pcount', $this->Page->findCount());
|
||||
$this->set('ucount', $this->Page->getUsers());
|
||||
}
|
||||
|
||||
function privacy() {
|
||||
$this->pageTitle = APP_NAME." - Privacy Policy";
|
||||
}
|
||||
}
|
|
@ -40,7 +40,6 @@ uses('sanitize');
|
|||
class PartyController extends AppController {
|
||||
var $name = 'Party';
|
||||
var $pageTitle;
|
||||
var $components = array('RequestHandler');
|
||||
var $components = array('Security');
|
||||
|
||||
function beforeFilter() {
|
||||
|
@ -51,14 +50,16 @@ class PartyController extends AppController {
|
|||
if (GMAP_API_KEY != null)
|
||||
$this->set('body_args', ' onload="initMashUp()" onunload="GUnload()"');
|
||||
$this->pageTitle = APP_NAME." - Party Map";
|
||||
$this->set('current', "map");
|
||||
}
|
||||
|
||||
function register() {
|
||||
if (!$this->Session->check('User')) {
|
||||
$this->redirect('/user');
|
||||
$this->redirect('/user/login');
|
||||
}
|
||||
|
||||
$this->pageTitle = APP_NAME." - Register";
|
||||
$this->set('current', "create");
|
||||
|
||||
$this->set('error', false);
|
||||
if (GMAP_API_KEY != null)
|
||||
|
@ -87,6 +88,7 @@ class PartyController extends AppController {
|
|||
|
||||
$this->data['Party']['date'] = ($offsetdate + $secoffset);
|
||||
$this->data['Party']['owner'] = $_SESSION['User']['id'];
|
||||
$this->data['Party']['duration'] = intval($this->data['Party']['duration']);
|
||||
|
||||
$key = null;
|
||||
$chars = "1234567890abcdefghijklmnopqrstuvwxyz";
|
||||
|
@ -129,6 +131,7 @@ class PartyController extends AppController {
|
|||
$party = $this->Party->read();
|
||||
$this->set('party', $party);
|
||||
$this->pageTitle = APP_NAME." - Edit Party";
|
||||
$this->set('current', "create");
|
||||
|
||||
if (empty($_SESSION['User']['id']))
|
||||
$this->redirect('/user/login/');
|
||||
|
@ -139,12 +142,15 @@ class PartyController extends AppController {
|
|||
else {
|
||||
if (empty($this->data)) {
|
||||
$this->data = $party;
|
||||
|
||||
$this->data['Party']['hour_hour'] = intval(date('h', $party['Party']['date']));
|
||||
$this->data['Party']['minute_min'] = intval(date('i', $party['Party']['date']));
|
||||
$this->data['Party']['month_hour'] = intval(date('m', $party['Party']['date']));
|
||||
$this->data['Party']['day_day'] = intval(date('d', $party['Party']['date']));
|
||||
$this->data['Party']['year_year'] = intval(date('Y', $party['Party']['date']));
|
||||
|
||||
$date = array('hour' => intval(date('h', $party['Party']['date'])),
|
||||
'min' => intval(date('i', $party['Party']['date'])),
|
||||
'mon' => intval(date('m', $party['Party']['date'])),
|
||||
'day' => intval(date('d', $party['Party']['date'])),
|
||||
'year' => intval(date('Y', $party['Party']['date'])),
|
||||
'tz' => $party['Party']['tz']);
|
||||
|
||||
$this->set('date', $date);
|
||||
|
||||
if (GMAP_API_KEY != null) {
|
||||
if ($this->data['Party']['lat'])
|
||||
|
@ -178,10 +184,11 @@ class PartyController extends AppController {
|
|||
$this->data['Party']['year_year']);
|
||||
|
||||
$this->data['Party']['date'] = ($offsetdate - $secoffset);
|
||||
$this->data['Party']['owner'] = $_SESSION['User']['id'];
|
||||
|
||||
if (!empty($this->data['Party']['flickrusr'])) {
|
||||
$params = array('type' => 'flickr', 'userid' => $this->data['Party']['flickrusr']);
|
||||
$this->data['Party']['owner'] = $party['Party']['owner'];
|
||||
$this->data['Party']['duration'] = intval($this->data['Party']['duration']);
|
||||
|
||||
if ($this->data['Party']['flickrusr'] != $party['Party']['flickrusr']) {
|
||||
$params = array('type' => 'flickr', 'username' => $this->data['Party']['flickrusr']);
|
||||
$flick = new webServices($params);
|
||||
$this->data['Party']['flickrid'] = $flick->getFlickrId();
|
||||
}
|
||||
|
@ -195,6 +202,7 @@ class PartyController extends AppController {
|
|||
function view($id = null, $page = null) {
|
||||
if ($id == "all") {
|
||||
$this->pageTitle = APP_NAME." - All Parties";
|
||||
$this->set('current', "parties");
|
||||
$count = $this->Party->findCount();
|
||||
$pages = ceil($count/10);
|
||||
if ($page == null)
|
||||
|
@ -213,12 +221,17 @@ class PartyController extends AppController {
|
|||
$this->set('party', $party);
|
||||
|
||||
$this->pageTitle = APP_NAME." - ".$party['Party']['name'];
|
||||
|
||||
if ($party['Party']['useflickr'] == 1) {
|
||||
$data = array('type' => 'flickr', 'userid' => $party['Party']['flickrid']);
|
||||
$flickr = new webServices($data);
|
||||
$this->set('flickr', ($flickr->fetchPhotos(FLICKR_TAG_PREFIX.$party['Party']['id'], 8)));
|
||||
$this->set('current', "parties");
|
||||
|
||||
if (FLICKR_API_KEY != null) {
|
||||
if ($party['Party']['useflickr'] == 1) {
|
||||
$data = array('type' => 'flickr', 'userid' => $party['Party']['flickrid']);
|
||||
$flickr = new webServices($data);
|
||||
$photoset = $flickr->fetchPhotos(FLICKR_TAG_PREFIX.$party['Party']['id'], 15, (($party['Party']['flickrperms']) ? false : true));
|
||||
$this->set('flickr', array_slice($photoset, 0, 9));
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($party['Party']['guests'])) {
|
||||
$guests = explode(',', $party['Party']['guests']);
|
||||
$names = array();
|
||||
|
|
|
@ -38,7 +38,6 @@ vendor('mail');
|
|||
uses('sanitize');
|
||||
class UserController extends AppController {
|
||||
var $name = 'User';
|
||||
var $helpers = array('Html');
|
||||
var $pageTitle;
|
||||
|
||||
function index() {
|
||||
|
@ -63,6 +62,7 @@ class UserController extends AppController {
|
|||
$this->User->id = $_SESSION['User']['id'];
|
||||
$this->data = $this->User->read();
|
||||
$this->data['User']['password'] = "";
|
||||
$this->set('utz', $this->data['User']['tz']);
|
||||
|
||||
if (GMAP_API_KEY != null && !empty($this->data['User']['lat']))
|
||||
$this->set('body_args',
|
||||
|
@ -72,7 +72,23 @@ class UserController extends AppController {
|
|||
else {
|
||||
$user = $this->User->findById($_SESSION['User']['id']);
|
||||
$this->User->id = $user['User']['id'];
|
||||
|
||||
$clean = new Sanitize();
|
||||
$temp = array('password' => $this->data['User']['password'],
|
||||
'confpassword' => $this->data['User']['confpassword'],
|
||||
'lat' => $clean->sql($this->data['User']['lat']),
|
||||
'long' => $clean->sql($this->data['User']['long']),
|
||||
'tz' => $clean->sql($this->data['User']['tz']));
|
||||
//Nuke everything else
|
||||
$clean->cleanArray($this->data);
|
||||
|
||||
$this->data['User']['email'] = $user['User']['email'];
|
||||
$this->data['User']['password'] = $temp['password'];
|
||||
$this->data['User']['confpassword'] = $temp['confpassword'];
|
||||
$this->data['User']['lat'] = floatval($temp['lat']);
|
||||
$this->data['User']['long'] = floatval($temp['long']);
|
||||
$this->data['User']['tz'] = intval($temp['tz']);
|
||||
$this->data['User']['role'] = $user['User']['role'];
|
||||
|
||||
if (!empty($this->data['User']['password'])) {
|
||||
if ($this->data['User']['password'] === $this->data['User']['confpassword']) {
|
||||
|
@ -87,18 +103,21 @@ class UserController extends AppController {
|
|||
}
|
||||
else
|
||||
$this->data['User']['password'] = $user['User']['password'];
|
||||
|
||||
|
||||
|
||||
if ($this->User->save($this->data)) {
|
||||
$sess = $this->User->findById($user['User']['id']);
|
||||
$this->Session->destroy();
|
||||
$this->Session->delete('User');
|
||||
$this->Session->write('User', $sess['User']);
|
||||
$this->redirect('/user/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function view($aUid = null) {
|
||||
if ($aUid === null || !is_numeric($aUid))
|
||||
if (!is_numeric($aUid))
|
||||
$this->redirect('/');
|
||||
|
||||
|
||||
else {
|
||||
$user = $this->User->findById($aUid);
|
||||
$this->pageTitle = APP_NAME." - ".$user['User']['name'];
|
||||
|
@ -106,8 +125,8 @@ class UserController extends AppController {
|
|||
if (GMAP_API_KEY != null && !empty($user['User']['lat']))
|
||||
$this->set('body_args',
|
||||
' onload="mapInit('.$user["User"]["lat"].', '.$user["User"]["long"].', '.$user["User"]["zoom"].', \'stationary\');" onunload="GUnload()"');
|
||||
$parties = $this->User->memberOf($user['User']['id']);
|
||||
$this->set('parties', $parties);
|
||||
|
||||
$this->set('parties', $this->User->memberOf($user['User']['id']));
|
||||
$this->set('hparties', $this->User->hostOf($user['User']['id']));
|
||||
}
|
||||
}
|
||||
|
@ -132,6 +151,7 @@ class UserController extends AppController {
|
|||
if (!empty($this->data)) {
|
||||
$clean = new Sanitize();
|
||||
$temp = array('email' => $this->data['User']['email'],
|
||||
'cemail' => $this->data['User']['confemail'],
|
||||
'password' => $this->data['User']['password'],
|
||||
'confpassword' => $this->data['User']['confpassword'],
|
||||
'lat' => $clean->sql($this->data['User']['lat']),
|
||||
|
@ -141,6 +161,7 @@ class UserController extends AppController {
|
|||
$clean->cleanArray($this->data);
|
||||
|
||||
$this->data['User']['email'] = $temp['email'];
|
||||
$this->data['User']['confemail'] = $temp['cemail'];
|
||||
$this->data['User']['password'] = $temp['password'];
|
||||
$this->data['User']['confpassword'] = $temp['confpassword'];
|
||||
$this->data['User']['lat'] = floatval($temp['lat']);
|
||||
|
@ -148,55 +169,68 @@ class UserController extends AppController {
|
|||
$this->data['User']['role'] = 0;
|
||||
$this->data['User']['tz'] = intval($temp['tz']);
|
||||
|
||||
if (!$this->User->findByEmail($this->data['User']['email'])) {
|
||||
if ($this->data['User']['password'] === $this->data['User']['confpassword']) {
|
||||
if ($this->User->validates($this->data)) {
|
||||
$string = $this->data['User']['email'].uniqid(rand(), true).$this->data['User']['password'];
|
||||
$this->data['User']['salt'] = substr(md5($string), 0, 9);
|
||||
$this->data['User']['password'] = sha1($this->data['User']['password'] . $this->data['User']['salt']);
|
||||
if ($this->data['User']['email'] === $temp['cemail']) {
|
||||
if (!$this->User->findByEmail($this->data['User']['email'])) {
|
||||
if ($this->data['User']['password'] === $this->data['User']['confpassword']) {
|
||||
if ($this->User->validates($this->data)) {
|
||||
$string = $this->data['User']['email'].uniqid(rand(), true).$this->data['User']['password'];
|
||||
$this->data['User']['salt'] = substr(md5($string), 0, 9);
|
||||
$this->data['User']['password'] = sha1($this->data['User']['password'] . $this->data['User']['salt']);
|
||||
|
||||
$key = null;
|
||||
$chars = "1234567890abcdefghijklmnopqrstuvwxyz";
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$key .= $chars{rand(0,35)};
|
||||
$key = null;
|
||||
$chars = "1234567890abcdefghijklmnopqrstuvwxyz";
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
$key .= $chars{rand(0,35)};
|
||||
}
|
||||
|
||||
$this->data['User']['active'] = $key;
|
||||
|
||||
if ($this->User->save($this->data)) {
|
||||
$message = array('from' => APP_NAME.' <'.APP_EMAIL.'>',
|
||||
'envelope' => APP_EMAIL,
|
||||
'to' => $this->data['User']['email'],
|
||||
'subject' => 'Your '.APP_NAME.' Registration',
|
||||
'link' => APP_BASE.'/user/activate/'.$key,
|
||||
'type' => 'act');
|
||||
|
||||
$mail = new mail($message);
|
||||
$mail->send();
|
||||
|
||||
if (!empty($this->data['User']['icode']))
|
||||
$this->User->addToParty($this->data['User']['icode'], $this->User->getLastInsertID());
|
||||
|
||||
$this->redirect('/user/login/new');
|
||||
}
|
||||
}
|
||||
|
||||
$this->data['User']['active'] = $key;
|
||||
|
||||
if ($this->User->save($this->data)) {
|
||||
$message = array(
|
||||
'from' => APP_NAME.' <'.APP_EMAIL.'>',
|
||||
'envelope' => APP_EMAIL,
|
||||
'to' => $this->data['User']['email'],
|
||||
'subject' => 'Your '.APP_NAME.' Registration',
|
||||
'link' => APP_BASE.'/user/activate/'.$key,
|
||||
'type' => 'act');
|
||||
|
||||
$mail = new mail($message);
|
||||
$mail->send();
|
||||
|
||||
if (!empty($this->data['User']['icode']))
|
||||
$this->User->addToParty($this->data['User']['icode'], $this->User->getLastInsertID());
|
||||
|
||||
$this->redirect('/user/login/new');
|
||||
else {
|
||||
$this->validateErrors($this->User);
|
||||
$this->data['User']['password'] = null;
|
||||
$this->data['User']['confpassword'] = null;
|
||||
$this->render();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
$this->validateErrors($this->User);
|
||||
$this->User->invalidate('confpassword');
|
||||
$this->data['User']['password'] = null;
|
||||
$this->data['User']['confpassword'] = null;
|
||||
$this->render();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
$this->User->invalidate('password');
|
||||
$this->User->invalidate('confpassword');
|
||||
$this->User->invalidate('email');
|
||||
$this->data['User']['password'] = null;
|
||||
$this->data['User']['confpassword'] = null;
|
||||
$this->render();
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
$this->User->invalidate('email');
|
||||
$this->User->invalidate('confemail');
|
||||
$this->data['User']['password'] = null;
|
||||
$this->data['User']['confpassword'] = null;
|
||||
$this->render();
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +290,7 @@ class UserController extends AppController {
|
|||
$this->render();
|
||||
}
|
||||
|
||||
if ($user['User']['active'] == 1 && $user['User']['password'] == sha1($this->data['User']['password'] . $user['User']['salt'])) {
|
||||
if ($user['User']['active'] == 1 && $user['User']['password'] == sha1($this->data['User']['password'].$user['User']['salt'])) {
|
||||
$this->Session->write('User', $user['User']);
|
||||
$this->redirect('/user/');
|
||||
}
|
||||
|
@ -268,6 +302,7 @@ class UserController extends AppController {
|
|||
}
|
||||
|
||||
function logout() {
|
||||
$this->Session->destroy();
|
||||
$this->Session->delete('User');
|
||||
$this->redirect('/');
|
||||
}
|
||||
|
@ -276,8 +311,10 @@ class UserController extends AppController {
|
|||
switch ($aType) {
|
||||
case "password":
|
||||
$this->pageTitle = APP_NAME." - Password Recovery";
|
||||
$this->set('atitle', 'Password Recovery');
|
||||
$this->set('hideInput', false);
|
||||
$this->set('url', 'password');
|
||||
|
||||
if (!empty($this->data)) {
|
||||
$user = $this->User->findByEmail($this->data['User']['email']);
|
||||
|
||||
|
@ -324,6 +361,7 @@ class UserController extends AppController {
|
|||
break;
|
||||
case "activate":
|
||||
$this->pageTitle = APP_NAME." - Resend Activation Code";
|
||||
$this->set('atitle', 'Resend Activation Code');
|
||||
$this->set('hideInput', false);
|
||||
$this->set('url', 'activate');
|
||||
|
||||
|
@ -373,6 +411,7 @@ class UserController extends AppController {
|
|||
break;
|
||||
default:
|
||||
$this->redirect('/');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Firefox Party Tool
|
||||
* The Original Code is Mozilla Party Tool
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Ryan Flint <rflint@dslr.net>
|
||||
|
@ -40,5 +40,19 @@ class Comment extends AppModel {
|
|||
var $validate = array(
|
||||
'text' => VALID_NOT_EMPTY
|
||||
);
|
||||
|
||||
function canComment($pid, $uid) {
|
||||
$status = $this->query("SELECT guests, guestcomments FROM parties WHERE id = ".$pid);
|
||||
|
||||
if ($status[0]['parties']['guestcomments'] == 1) {
|
||||
if (in_array($uid, explode(',', $status[0]['parties']['guests'])))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
return true;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -12,7 +12,7 @@
|
|||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Firefox Party Tool
|
||||
* The Original Code is Mozilla Party Tool
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Ryan Flint <rflint@dslr.net>
|
||||
|
@ -42,5 +42,10 @@ class Feed extends AppModel {
|
|||
$rv = $this->query("SELECT * FROM comments WHERE assoc = ".$aParty." LIMIT 10");
|
||||
return $rv;
|
||||
}
|
||||
|
||||
function getUserCount() {
|
||||
$rv = $this->query("SELECT COUNT(*) FROM users");
|
||||
return $rv[0][0]['COUNT(*)'];
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -1,4 +1,39 @@
|
|||
<?php
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Mozilla Party Tool
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Ryan Flint <rflint@dslr.net>
|
||||
* Portions created by the Initial Developer are Copyright (C) 2006
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
class Page extends AppModel {
|
||||
var $name = 'Page';
|
||||
var $useTable = 'parties';
|
||||
|
|
|
@ -38,8 +38,10 @@ class User extends AppModel {
|
|||
var $name = 'User';
|
||||
|
||||
var $validate = array(
|
||||
'email' => VALID_EMAIL,
|
||||
'password' => VALID_NOT_EMPTY
|
||||
'email' => VALID_EMAIL,
|
||||
'confemail' => VALID_EMAIL,
|
||||
'name' => VALID_NOT_EMPTY,
|
||||
'password' => VALID_NOT_EMPTY
|
||||
);
|
||||
|
||||
function memberOf($uid) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is Firefox Party Tool
|
||||
* The Original Code is Mozilla Party Tool
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Ryan Flint <rflint@dslr.net>
|
||||
|
@ -78,8 +78,8 @@ class webServices {
|
|||
return $this->userid;
|
||||
}
|
||||
|
||||
function fetchPhotos($tags, $num_results) {
|
||||
$head = "GET /services/rest/?method=flickr.photos.search&api_key=".FLICKR_API_KEY."&user_id=".$this->userid."&tags=".$tags."&per_page=".$num_results." HTTP/1.1\r\n";
|
||||
function fetchPhotos($tags, $num_results, $single_user) {
|
||||
$head = "GET /services/rest/?method=flickr.photos.search&api_key=".FLICKR_API_KEY.(($single_user) ? "&user_id=" : '').$this->userid."&tags=".$tags."&per_page=".$num_results." HTTP/1.1\r\n";
|
||||
$head .= "Host: ".$this->host."\r\n";
|
||||
$head .= "Connection: Close\r\n\r\n";
|
||||
|
||||
|
@ -99,6 +99,9 @@ class webServices {
|
|||
'title' => $titles[$i][1]);
|
||||
}
|
||||
|
||||
// Randomize the results
|
||||
shuffle($arr);
|
||||
|
||||
return $arr;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<?php if(!isset($_SESSION['User'])): ?>
|
||||
<strong>Welcome guest!</strong>
|
||||
<strong>Welcome Guest!</strong>
|
||||
<a href="<?php echo $html->url('/user/login'); ?>">Login</a>
|
||||
<a href="<?php echo $html->url('/user/register'); ?>">Register</a>
|
||||
<?php else: ?>
|
||||
<strong>Welcome <?php echo (!empty($_SESSION['User']['name'])) ? $_SESSION['User']['name'] : $_SESSION['User']['email']; ?>!</strong>
|
||||
<a href="<?php echo $html->url('/user'); ?>">My Account</a>
|
||||
<a href="<?php echo $html->url('/user/logout'); ?>">Logout</a>
|
||||
<?php endif; ?>
|
||||
<br/>
|
||||
<?php endif; ?>
|
|
@ -13,7 +13,7 @@ DTSTAMP:<?php echo date('Ymd\This\Z', $event['Feeds']['date'])."\n"; ?>
|
|||
LOCATION:<?php echo str_replace(",", "\,", $event['Feeds']['address'])."\n"; ?>
|
||||
SUMMARY:<?php echo $event['Feeds']['name']."\n"; ?>
|
||||
DTSTART:<?php echo date('Ymd\This', $event['Feeds']['date'])."\n"; ?>
|
||||
DURATION:PT2H
|
||||
DURATION:PT<?php echo $event['Feeds']['duration']; ?>H
|
||||
URL:<?php echo "http://".$_SERVER["SERVER_NAME"].$html->url('/party/view/'.$event['Feeds']['id'])."\n"; ?>
|
||||
STATUS:<?php echo (($event['Feeds']['confirmed'] == 1) ? "CONFIRMED" : "TENTATIVE")."\n"; ?>
|
||||
DESCRIPTION:
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"; ?>
|
||||
<rss version="0.91">
|
||||
<channel>
|
||||
<pubDate><?php echo date('r'); ?></pubDate>
|
||||
<description><?php echo APP_NAME." - Total Users"; ?></description>
|
||||
<link><?php echo "http://".$_SERVER["SERVER_NAME"].$html->url('/'); ?></link>
|
||||
<title><?php echo APP_NAME." - Total Users"; ?></title>
|
||||
<item>
|
||||
<title><?php echo $count; ?></title>
|
||||
<description>Total Users</description>
|
||||
<link><?php echo "http://".$_SERVER["SERVER_NAME"].$html->url('/'); ?></link>
|
||||
</item>
|
||||
</channel>
|
||||
</rss>
|
|
@ -10,14 +10,29 @@
|
|||
</head>
|
||||
<body<?php echo @$body_args ?>>
|
||||
<div id="container">
|
||||
<div id="mozilla-com">
|
||||
<a href="http://www.mozilla.com">Visit Mozilla.com</a>
|
||||
<p class="skipLink"><a href="#content" accesskey="2">Skip to main content</a></p>
|
||||
<div id="mozilla-com"><a href="http://www.mozilla.com/">Visit Mozilla.com</a></div>
|
||||
<div id="header">
|
||||
<div id="key-title">
|
||||
<h1><a href="<?php echo $html->url('/'); ?>" title="Return to home page" accesskey="1"><img src="<?php echo $html->url('/img/firefox-title.png'); ?>" width="276" height="54" alt="Firefox Add-ons Beta"/></a></h1>
|
||||
<div id="user"><?php echo $this->renderElement('user_options'); ?></div>
|
||||
</div>
|
||||
<div id="key-menu">
|
||||
<ul id="menu-firefox">
|
||||
<li<?php echo (@$current == "home") ? ' class="current"' : ''?>><a href="<?php echo $html->url('/'); ?>">Home</a></li>
|
||||
<li<?php echo (@$current == "map") ? ' class="current"' : ''?>><a href="<?php echo $html->url('/party/'); ?>">View Map</a></li>
|
||||
<li<?php echo (@$current == "parties") ? ' class="current"' : ''?>><a href="<?php echo $html->url('/party/view/all/'); ?>">View Parties</a></li>
|
||||
<li<?php echo (@$current == "create") ? ' class="current"' : ''?>><a href="<?php echo $html->url('/party/register/'); ?>">Create Party</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="user">
|
||||
<?php echo $this->renderElement('user_options'); ?>
|
||||
<div id="content">
|
||||
<?php echo$content_for_layout ?>
|
||||
</div>
|
||||
<div id="footer">
|
||||
Copyright © 2006 Mozilla Corporation<br/>
|
||||
<a href="<?php echo $html->url('/privacy-policy'); ?>">Privacy Policy</a> | <a href="http://www.mozilla.org/foundation/donate.html">Donate to Mozilla</a>
|
||||
</div>
|
||||
<div id="header"><br/><a href="/cake/">Firefox Party!</a></div>
|
||||
<?php echo $content_for_layout ?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,24 +1,28 @@
|
|||
<div style="font-size: x-large; font-weight: bold; text-align: center">
|
||||
<?php
|
||||
echo $pcount.(($pcount == 1) ? ' Party, ' : ' Parties, ').$ucount.(($ucount == 1) ? ' Partygoer, ' : ' Partygoers, ');
|
||||
$difference = 1161975280 - time();
|
||||
$days_left = floor($difference/60/60/24);
|
||||
echo "and ".$days_left." days until Firefox 2!"; ?><br/></div>
|
||||
|
||||
<div>
|
||||
<div style="float: left; width: 75%">
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla porta tellus ac leo suscipit euismod. Aenean id ante. Vestibulum consectetuer. Integer diam neque, iaculis eget, ultricies ac, elementum sit amet, risus. Proin blandit. Cras quam. Aenean sollicitudin, lorem vel lobortis bibendum, lorem nibh gravida elit, et aliquam dolor libero bibendum sem. Cras pharetra. Vivamus ligula nisl, mattis sed, molestie nec, interdum ac, massa. In eros pede, dictum at, mollis eu, adipiscing eget, ante. Nunc elit nunc, tincidunt sit amet, tincidunt eu, euismod id, massa. Vivamus molestie. Sed non dui non velit semper egestas. Maecenas vulputate. Quisque sapien. Pellentesque interdum, libero rutrum tincidunt molestie, dui pede eleifend quam, quis tempor sapien ligula et turpis.
|
||||
Maecenas ut sem. Nam adipiscing sem sit amet magna. Curabitur a risus non ipsum mattis tempor. Fusce in arcu. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed eu diam nec nisi ultrices laoreet. Pellentesque tincidunt, enim nec malesuada tristique, est neque luctus dui, sit amet posuere nunc nulla vel diam. Phasellus pharetra tortor ut massa lacinia adipiscing. Morbi in nulla. Proin ut diam et tortor hendrerit congue. Mauris porttitor fringilla augue. Etiam faucibus rutrum enim.
|
||||
Maecenas varius massa sit amet nulla. Nunc sit amet mauris. Nunc eu purus a sapien aliquam aliquam. Donec sodales commodo dolor. Fusce volutpat. Sed quis ipsum nec dolor facilisis facilisis. Fusce leo massa, tincidunt in, sodales eu, sodales nec, libero. Etiam vehicula. Ut egestas. Ut consectetuer dolor ac est. Phasellus viverra euismod nisl. Nunc ut felis nec erat vulputate ullamcorper. Praesent rhoncus cursus nunc. Quisque elementum. Etiam euismod erat sit amet lorem.
|
||||
</p>
|
||||
</div>
|
||||
<div style="float:right; width: 25%; font-size: large;">
|
||||
<ul>
|
||||
<li><a href="<?php echo $html->url('/party'); ?>">View map</a></li>
|
||||
<li><a href="<?php echo $html->url('/party/view/all'); ?>">View all parties</a></li>
|
||||
<li><a href="<?php echo $html->url('/user/register'); ?>">Register</a></li>
|
||||
<li><a href="<?php echo $html->url('/party/register'); ?>">Create a party</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
//Tuesday, October 24th 2006, 23:59:59
|
||||
$difference = 1161734399 - time();
|
||||
$days_left = floor($difference/60/60/24);
|
||||
?>
|
||||
<div id="f-left">
|
||||
<p>
|
||||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nulla porta tellus ac leo suscipit euismod. Aenean id ante. Vestibulum consectetuer. Integer diam neque, iaculis eget, ultricies ac, elementum sit amet, risus. Proin blandit. Cras quam. Aenean sollicitudin, lorem vel lobortis bibendum, lorem nibh gravida elit, et aliquam dolor libero bibendum sem. Cras pharetra. Vivamus ligula nisl, mattis sed, molestie nec, interdum ac, massa. In eros pede, dictum at, mollis eu, adipiscing eget, ante. Nunc elit nunc, tincidunt sit amet, tincidunt eu, euismod id, massa. Vivamus molestie. Sed non dui non velit semper egestas. Maecenas vulputate. Quisque sapien. Pellentesque interdum, libero rutrum tincidunt molestie, dui pede eleifend quam, quis tempor sapien ligula et turpis.
|
||||
Maecenas ut sem. Nam adipiscing sem sit amet magna. Curabitur a risus non ipsum mattis tempor. Fusce in arcu. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed eu diam nec nisi ultrices laoreet. Pellentesque tincidunt, enim nec malesuada tristique, est neque luctus dui, sit amet posuere nunc nulla vel diam. Phasellus pharetra tortor ut massa lacinia adipiscing. Morbi in nulla. Proin ut diam et tortor hendrerit congue. Mauris porttitor fringilla augue. Etiam faucibus rutrum enim.
|
||||
Maecenas varius massa sit amet nulla. Nunc sit amet mauris. Nunc eu purus a sapien aliquam aliquam. Donec sodales commodo dolor. Fusce volutpat. Sed quis ipsum nec dolor facilisis facilisis. Fusce leo massa, tincidunt in, sodales eu, sodales nec, libero. Etiam vehicula. Ut egestas. Ut consectetuer dolor ac est. Phasellus viverra euismod nisl. Nunc ut felis nec erat vulputate ullamcorper. Praesent rhoncus cursus nunc. Quisque elementum. Etiam euismod erat sit amet lorem.
|
||||
</p>
|
||||
</div>
|
||||
<div id="f-right">
|
||||
<div class="cbox">
|
||||
<span class="ctxt"><?php echo $pcount."</span><br/>".(($pcount == 1) ? ' Party' : ' Parties'); ?>
|
||||
<div class="ifeed">
|
||||
<a style="padding-right: 2px;" title="ICAL Feed" href="<?php echo $html->url('/feeds/ical'); ?>"><img src="<?php echo $html->url('/img/ical.png'); ?>" alt="iCAL"/></a><a title="Party Count Feed" href="<?php echo $html->url('/feeds/'); ?>"><img src="<?php echo $html->url('/img/feed16.png'); ?>" alt="RSS"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbox">
|
||||
<span class="ctxt"><?php echo $ucount."</span><br/>".(($ucount == 1) ? ' Partygoer' : ' Partygoers'); ?>
|
||||
<div class="cfeed">
|
||||
<a title="User Count Feed" href="<?php echo $html->url('/feeds/users/'); ?>"><img src="<?php echo $html->url('/img/feed16.png'); ?>" alt="RSS"/></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cbox"><span class="ctxt"><?php echo $days_left."</span><br/>".(($days_left == 1) ? ' Day' : ' Days'); ?> left until Firefox 2!</div>
|
||||
</div>
|
||||
<div style="clear: both"></div>
|
0
webtools/partytool/webroot/img/header.gif → webtools/partytool/views/pages/privacy.thtml
Executable file → Normal file
0
webtools/partytool/webroot/img/header.gif → webtools/partytool/views/pages/privacy.thtml
Executable file → Normal file
|
@ -1,124 +0,0 @@
|
|||
<form action="<?php echo $html->url('/party/edit/'.$party['Party']['id']); ?>" method="post">
|
||||
<?php echo $html->hidden('Party/id'); ?>
|
||||
<div>
|
||||
<h2>Details</h2>
|
||||
<hr/>
|
||||
<label for="name">Party Name:</label>
|
||||
<?php echo $html->input('Party/name', array('size' => 35)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="">Venue Name:</label>
|
||||
<?php echo $html->input('Party/vname', array('size' => 35)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="website">Web site:</label>
|
||||
<?php echo $html->input('Party/website', array('size' => 35)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="address">Address:</label>
|
||||
<?php echo $html->input('Party/address', array('size' => 35, 'id' => 'location', 'onkeypress' => 'capture(event)', 'onblur' => 'update()')); ?>
|
||||
<div id="suggest" style="display: none">Did you mean <span style="font-style: italic"><a id="suggest2" href="#" onclick=""></a></span>?</div>
|
||||
</div>
|
||||
<?php if(GMAP_API_KEY != null): ?>
|
||||
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo GMAP_API_KEY; ?>"
|
||||
type="text/javascript"></script>
|
||||
<script src="<?php echo $html->url('/js/maps.js'); ?>" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
//<![CDATA[
|
||||
function update(aSuggest) {
|
||||
var loc;
|
||||
if (!aSuggest)
|
||||
loc = document.getElementById("location").value;
|
||||
else
|
||||
loc = aSuggest;
|
||||
|
||||
if (loc != "")
|
||||
geocode(loc);
|
||||
}
|
||||
|
||||
function capture(event) {
|
||||
if (event.keyCode == 13) {
|
||||
event.preventDefault();
|
||||
update();
|
||||
}
|
||||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div style="width: 350px; height: 200px;">
|
||||
<div id="maperror" style="display: none" class="error"></div>
|
||||
<div id="map" style="height: 100%; width: 100%;"></div>
|
||||
</div>
|
||||
<div>
|
||||
Additional notes:<br/>
|
||||
<?php echo $html->textarea('Party/notes'); ?>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Date</h2>
|
||||
<hr/>
|
||||
<label for="date">Date:</label>
|
||||
<?php echo $html->yearOptionTag('Party/year', null, date('Y'), MAX_YEAR, date('Y'), null, null, false); ?>-<?php echo $html->hourOptionTag('Party/month', null, false, date('m')); ?>-<?php echo $html->dayOptionTag('Party/day', null, date('d'), null, false); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="time">Time:</label>
|
||||
<?php echo $html->hourOptionTag('Party/hour', null, true);?>:<?php echo $html->minuteOptionTag('Party/minute');?>
|
||||
<?php echo $html->radio('Party/confirmed', array(0 => 'Tentative', 1 => 'Confirmed')); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="UserTz">Timezone (current time is <?php echo gmdate("Y-m-d H:i:s"); ?>GMT):</label>
|
||||
<select name="data[Party][tz]" id="UserTz">
|
||||
<option value="-12">GMT-12</option>
|
||||
<option value="-11">GMT-11</option>
|
||||
<option value="-10">GMT-10</option>
|
||||
<option value="-9">GMT-9</option>
|
||||
<option value="-8">GMT-8</option>
|
||||
<option value="-7">GMT-7</option>
|
||||
<option value="-6">GMT-6</option>
|
||||
<option value="-5">GMT-5</option>
|
||||
<option value="-4">GMT-4</option>
|
||||
<option value="-3">GMT-3</option>
|
||||
<option value="-2">GMT-2</option>
|
||||
<option value="-1">GMT-1</option>
|
||||
<option value="0" selected="selected">GMT+0</option>
|
||||
<option value="1">GMT+1</option>
|
||||
<option value="2">GMT+2</option>
|
||||
<option value="3">GMT+3</option>
|
||||
<option value="4">GMT+4</option>
|
||||
<option value="5">GMT+5</option>
|
||||
<option value="6">GMT+6</option>
|
||||
<option value="7">GMT+7</option>
|
||||
<option value="8">GMT+8</option>
|
||||
<option value="9">GMT+9</option>
|
||||
<option value="10">GMT+10</option>
|
||||
<option value="11">GMT+11</option>
|
||||
<option value="12">GMT+12</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<h2><span style="color: #0063dc">flick</span><span style="color: #ff0084">r</span> integration</h2>
|
||||
<hr/>
|
||||
<p>To show photos of your party, simply tag them with <strong><?php echo FLICKR_TAG_PREFIX.$party['Party']['id'] ?></strong> and fill out the information below.</p>
|
||||
<label for="PartyUseflickr">Show photostream:</label>
|
||||
<?php echo $html->checkbox('Party/useflickr'); ?><br/>
|
||||
<label for="PartyFlickruse">Show:</label>
|
||||
<?php echo $html->radio('Party/flickruse', array(0 => 'Only my photos', 1 => 'Anyone\'s photos')); ?><br/>
|
||||
<label for="website">Flickr username:</label>
|
||||
<?php echo $html->input('Party/flickrusr', array('size' => 35)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Privacy</h2>
|
||||
<hr/>
|
||||
<label for="PartyInviteonly">Invite only:</label>
|
||||
<?php echo $html->checkbox('Party/inviteonly'); ?><br/>
|
||||
<label for="PartyGuestsonly">Show full address to party guests only:</label>
|
||||
<?php echo $html->checkbox('Party/guestsonly'); ?><br/>
|
||||
<label for="PartyGuestcomments">Limit comments to party guests only:</label>
|
||||
<?php echo $html->checkbox('Party/guestcomments'); ?><br/>
|
||||
</div>
|
||||
<?php echo $html->hidden('Party/lat', array('id' => 'lat'));
|
||||
echo $html->hidden('Party/long', array('id' => 'long'));
|
||||
echo $html->hidden('Party/zoom', array('id' => 'zoom'));
|
||||
echo $html->hidden('Party/geocoded', array('id' => 'geocoded', 'value' => 0)); ?>
|
||||
<?php endif; ?>
|
||||
<?php echo $html->submit('Update'); ?>
|
||||
</form>
|
|
@ -1,7 +0,0 @@
|
|||
<?php if(GMAP_API_KEY != null): ?>
|
||||
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo GMAP_API_KEY; ?>"
|
||||
type="text/javascript"></script>
|
||||
<script src="<?php echo $html->url('/js/maps.js'); ?>" type="text/javascript"></script>
|
||||
<script src="<?php echo $html->url('/party/js'); ?>" type="text/javascript"></script>
|
||||
<div id="map" style="width: 750px; height: 500px"/>
|
||||
<?php endif; ?>
|
|
@ -0,0 +1,15 @@
|
|||
<?php if(!empty($preamble)): ?>
|
||||
<div class="info">
|
||||
<p>An email has been sent to <strong><?php echo $preamble[0]; ?></strong>. You can invite another
|
||||
guest below or <a href="<?php echo $html->url('/party/view/'.$preamble[1]); ?>">go back</a> to your party.
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<p>Since your party is invite only, you'll need to invite your guests. You can do this by
|
||||
entering their email address into the field below, or by handing them a link to
|
||||
<strong><?php echo $inviteurl; ?></strong></p>
|
||||
<form action="<?php echo $html->url('/party/invite/'.$partyid) ?>" method="post">
|
||||
<label for="PartyEinvite">Guest's email address:</label>
|
||||
<?php echo $html->input('Party/einvite')."\n".$html->submit('Submit')."\n"; ?>
|
||||
<?php echo $html->tagErrorMsg('Party/einvite', 'Invalid email address')?>
|
||||
</form>
|
|
@ -1,30 +1,39 @@
|
|||
<h1>Create a Party</h1>
|
||||
<?php if ($error): ?>
|
||||
<p>There was an error in your submission, please try again.</p>
|
||||
<div class="error">
|
||||
There was an error in your submission, please try again.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo $html->url('/party/register'); ?>" method="post">
|
||||
<form class="fxform" action="<?php echo $html->url('/party/register'); ?>" method="post">
|
||||
<div>
|
||||
<label for="name"><strong>Party Name</strong>:</label>
|
||||
<?php echo $html->input('Party/name', array('size' => 35)); ?>
|
||||
<label for="PartyName" class="label-large">Party Name<span class="required">*</span>:</label>
|
||||
<?php echo $html->input('Party/name', array('size' => 40)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="">Venue Name:</label>
|
||||
<?php echo $html->input('Party/vname', array('size' => 35)); ?>
|
||||
<label for="PartyVname" class="label-large">Venue Name:</label>
|
||||
<?php echo $html->input('Party/vname', array('size' => 40)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="address">Address:</label>
|
||||
<?php echo $html->input('Party/address', array('size' => 35, 'id' => 'location', 'onkeypress' => 'capture(event)', 'onblur' => 'update()')); ?>
|
||||
<label for="PartyAddress" class="label-large">Address:</label>
|
||||
<?php echo $html->input('Party/address', array('size' => 40, 'id' => 'location', 'onkeypress' => 'capture(event)', 'onblur' => 'update()')); ?>
|
||||
<div id="suggest" style="display: none">Did you mean <span style="font-style: italic"><a id="suggest2" href="#" onclick=""></a></span>?</div>
|
||||
</div>
|
||||
<p>Enter your party's time and date (in your local time) here. If you're not ready to commit to a specific time or date, select the 'Tentative'
|
||||
radio button. Otherwise select 'Confirmed'.</p>
|
||||
<div>
|
||||
<label for="date">Date:</label>
|
||||
<label for="PartyYear" class="label-large">Date:</label>
|
||||
<?php echo $html->yearOptionTag('Party/year', null, date('Y'), MAX_YEAR, date('Y'), null, null, false); ?>-<?php echo $html->hourOptionTag('Party/month', null, false, date('m')); ?>-<?php echo $html->dayOptionTag('Party/day', null, date('d'), null, false); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="time">Time:</label>
|
||||
<label for="PartyHour" class="label-large">Time:</label>
|
||||
<?php echo $html->hourOptionTag('Party/hour', null, true);?>:<?php echo $html->minuteOptionTag('Party/minute');?>
|
||||
<?php echo $html->radio('Party/confirmed', array(0 => 'Tentative', 1 => 'Confirmed')); ?><br/>
|
||||
<label for="UserTz">Timezone (current time is <?php echo gmdate("Y-m-d H:i:s"); ?>GMT):</label>
|
||||
<select name="data[Party][tz]" id="UserTz">
|
||||
</div>
|
||||
<p>The timezone is used to calculate the appropriate GMT time from the local time specified above. This is done to show
|
||||
the party in the local time of the person viewing it.</p>
|
||||
<div>
|
||||
<label for="PartyTz" class="label-large">Timezone<span class="required">*</span>:</label>
|
||||
<select name="data[Party][tz]" id="PartyTz">
|
||||
<option value="-12">GMT-12</option>
|
||||
<option value="-11">GMT-11</option>
|
||||
<option value="-10">GMT-10</option>
|
||||
|
@ -51,24 +60,27 @@
|
|||
<option value="11">GMT+11</option>
|
||||
<option value="12">GMT+12</option>
|
||||
</select>
|
||||
(this page was loaded at <?php echo gmdate("Y-m-d H:i:s"); ?>GMT)
|
||||
</div>
|
||||
<div>
|
||||
<label for="website">Web site:</label>
|
||||
<?php echo $html->input('Party/website', array('size' => 35)); ?>
|
||||
<label for="PartyDuration" class="label-large">Duration (in hours):</label>
|
||||
<?php echo $html->input('Party/duration', array('size' => 5)); ?>
|
||||
</div>
|
||||
<p>Enter a website (complete with http://) that guests can visit to learn more about your party. If you don't have one, simply leave it blank.</p>
|
||||
<div>
|
||||
<label for="PartyNeedinvite">Invite only</label>
|
||||
<label for="PartyWebsite" class="label-large">Web site:</label>
|
||||
<?php echo $html->input('Party/website', array('size' => 40)); ?>
|
||||
</div>
|
||||
<p>If you choose to make your party invite only, you will have to send guests an invite containing a random invite code to allow them to join your party.</p>
|
||||
<div>
|
||||
<label for="PartyInviteonly" class="label-large">Invite only</label>
|
||||
<?php echo $html->checkbox('Party/inviteonly'); ?>
|
||||
</div>
|
||||
<div>
|
||||
Additional notes:<br/>
|
||||
<?php echo $html->textarea('Party/notes'); ?>
|
||||
</div>
|
||||
<?php if(GMAP_API_KEY != null): ?>
|
||||
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo GMAP_API_KEY; ?>"
|
||||
type="text/javascript"></script>
|
||||
<script src="<?php echo $html->url('/js/maps.js'); ?>" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
|
||||
//<![CDATA[
|
||||
function update(aSuggest) {
|
||||
|
@ -90,14 +102,16 @@
|
|||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div style="width: 500px; height: 300px; margin: 0 auto;">
|
||||
<div id="maperror" style="display: none" class="error"></div>
|
||||
<div id="map" style="height: 100%; width: 100%;"></div>
|
||||
</div>
|
||||
<p>Drag the map or the marker to specify a location. Set the zoom by using the '+' or '-' buttons on the left.</p>
|
||||
<p id="map" class="med-map-r"></p>
|
||||
<?php echo $html->hidden('Party/lat', array('id' => 'lat'));
|
||||
echo $html->hidden('Party/long', array('id' => 'long'));
|
||||
echo $html->hidden('Party/zoom', array('id' => 'zoom'));
|
||||
echo $html->hidden('Party/geocoded', array('id' => 'geocoded', 'value' => 0)); ?>
|
||||
<?php endif; ?>
|
||||
<div>
|
||||
<label for="PartyNotes" class="label-large">Additional Notes</label>
|
||||
<?php echo $html->textarea('Party/notes', array('rows' => 10, 'cols' => 50)); ?>
|
||||
</div>
|
||||
<?php echo $html->submit('Register'); ?>
|
||||
</form>
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
if (isset($party)): ?>
|
||||
<?php
|
||||
if (isset($party)):
|
||||
@$isguest = (isset($guests)) ? in_array($_SESSION['User']['id'], $guests) : 0;?>
|
||||
<h1><?php echo $party['Party']['name']; ?></h1>
|
||||
<br/>
|
||||
Host: <a href="<?php echo $html->url('/user/view/'.$party['Party']['owner']).'">'.$host; ?></a><br/>
|
||||
<?php
|
||||
if (!empty($party['Party']['address']))
|
||||
|
@ -10,6 +12,7 @@
|
|||
echo 'Venue: '.$party['Party']['vname']."<br/>\n";
|
||||
|
||||
echo 'Date: '.(($party['Party']['confirmed'] == 1) ? gmdate('Y-m-d h:ia', $party['Party']['date'] + (@$_SESSION['User']['tz'] * 60 * 60))." GMT".@$_SESSION['User']['tz'] : "TBA")."<br/>\n";
|
||||
echo 'Duration: '.$party['Party']['duration']." hours\n<br/>";
|
||||
|
||||
if (!empty($party['Party']['website']))
|
||||
echo 'Website: <a href="'.$party['Party']['website'].'" rel="nofollow">'.$party['Party']['website']."</a><br/>\n";
|
||||
|
@ -21,8 +24,8 @@
|
|||
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo GMAP_API_KEY; ?>"
|
||||
type="text/javascript"></script>
|
||||
<script src="<?php echo $html->url('/js/maps.js'); ?>" type="text/javascript"></script>
|
||||
<div id="map" style="height: 200px; width: 400px;"></div>
|
||||
<h2>Who's coming</h2>
|
||||
<div id="map" class="small-map"></div>
|
||||
<h1>Who's coming</h1>
|
||||
<div>
|
||||
<?php if (isset($guests)):
|
||||
$i = 0;
|
||||
|
@ -34,9 +37,7 @@
|
|||
else:
|
||||
echo "No guests yet, be the first!";
|
||||
endif;
|
||||
|
||||
@$isguest = (isset($guests)) ? in_array($_SESSION['User']['id'], $guests) : 0;
|
||||
|
||||
|
||||
if (isset($_SESSION['User']['id']) && @$_SESSION['User']['id'] != $party['Party']['owner'] && ($party['Party']['inviteonly'] != 1 || $isguest)):?>
|
||||
<br/><br/>
|
||||
<form action="<?php
|
||||
|
@ -50,42 +51,51 @@
|
|||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if (@$_SESSION['User']['id'] == $party['Party']['owner']):?>
|
||||
<h2>Party options</h2>
|
||||
<h1>Party options</h1>
|
||||
<a href="<?php echo $html->url('/party/edit/'.$party['Party']['id']);?>">Edit party</a>
|
||||
<a href="<?php echo $html->url('/party/invite/'.$party['Party']['id']);?>">Invite a guest</a>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($flickr)): ?>
|
||||
<a id="photos"></a>
|
||||
<h2>Photos</h2>
|
||||
<?php foreach ($flickr as $pic): ?>
|
||||
<a href="http://www.flickr.com/photos/<?php echo $pic['owner']."/".$pic['id']."/" ?>"><img src="http://static.flickr.com/<?php echo $pic['server']."/".$pic['id']."_".$pic['secret']."_s.jpg" ?>"/></a>
|
||||
<?php endforeach; ?>
|
||||
<br/>
|
||||
<h1 id="photos">Photos</h1>
|
||||
<div style="text-align: center">
|
||||
<?php if (empty($flickr)): ?>
|
||||
<p>No photos yet, tag your flickr pictures with <?php echo FLICKR_TAG_PREFIX.$party['Party']['id']; ?> to display them here.</p>
|
||||
<?php else:
|
||||
foreach ($flickr as $pic): ?>
|
||||
<a href="http://www.flickr.com/photos/<?php echo $pic['owner']."/".$pic['id']."/" ?>"><img src="http://static.flickr.com/<?php echo $pic['server']."/".$pic['id']."_".$pic['secret']."_s.jpg" ?>" title="<?php echo $pic['title']; ?>"/></a>
|
||||
<?php endforeach;
|
||||
endif; ?>
|
||||
<br/>
|
||||
</div>
|
||||
<?php endif;
|
||||
if (!empty($comments)): ?>
|
||||
<h2>Comments</h2>
|
||||
<h1 id="comments">Comments</h1>
|
||||
<?php $i = 0;
|
||||
foreach ($comments as $comment):
|
||||
if ($i % 2 == 0)
|
||||
$color = "white";
|
||||
$class = "";
|
||||
else
|
||||
$color = "#DDD";
|
||||
$class = "comment-mod";
|
||||
$i++;?>
|
||||
<div style="border-top: 1px solid #555; background: <?php echo $color;?>"><?php echo $comment['comments']['text']; ?>
|
||||
<br/>Posted by <a href="<?php echo $html->url('/user/view/'.$comment['users']['uid']); ?>">
|
||||
<?php echo $comment['users']['name']; ?></a> on <?php echo date('Y-m-d h:ia', $comment['comments']['time'] - (@$_SESSION['User']['tz'] * 60 * 60))." GMT".@$_SESSION['User']['tz']; ?></span>
|
||||
<div id="c<?php echo $comment['comments']['cid'];?>" class="comment <?php echo $class;?>">
|
||||
<span class="comment-content"><?php echo $comment['comments']['text']; ?></span>
|
||||
<span class="comment-tag"><br/><br/>Posted by <a href="<?php echo $html->url('/user/view/'.$comment['users']['uid']); ?>">
|
||||
<?php echo $comment['users']['name']; ?></a> on <?php echo date('Y-m-d h:ia', $comment['comments']['time'] - (@$_SESSION['User']['tz'] * 60 * 60)); ?></span>
|
||||
</span>
|
||||
</div>
|
||||
<?php endforeach;
|
||||
endif;
|
||||
if (isset($_SESSION['User'])): ?>
|
||||
<h2>Add a comment</h2>
|
||||
if (isset($_SESSION['User'])):
|
||||
if ($party['Party']['guestcomments'] && $isguest): ?>
|
||||
<h1>Add a comment</h1>
|
||||
<form action="<?php echo $html->url('/comment/add/'.$party['Party']['id'].'/'.$_SESSION['User']['id']); ?>" method="post">
|
||||
<div>
|
||||
<?php echo $html->textarea('Comment/text', array('rows' => 10, 'cols' => 50))."<br/>".$html->submit('Submit'); ?>
|
||||
</div>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif;
|
||||
endif;
|
||||
endif; ?>
|
||||
|
||||
<?php if (isset($parties)):
|
||||
if (isset($prev))
|
||||
|
@ -93,29 +103,25 @@
|
|||
if (isset($next))
|
||||
echo '<a href="'.$html->url('/party/view/all/'.$next).'">Next Page</a>';
|
||||
$i = 0;
|
||||
foreach ($parties as $party):
|
||||
if ($i % 2 == 0)
|
||||
$color = "white";
|
||||
else
|
||||
$color = "#DDD";
|
||||
$i++; ?>
|
||||
<div style="background: <?php echo $color; ?>">
|
||||
<h1><?php echo $party['Party']['name']; ?></h1>
|
||||
<?php
|
||||
if (!empty($party['Party']['address']))
|
||||
echo 'Location: '.$party['Party']['address']."<br/>\n";
|
||||
|
||||
if (!empty($party['Party']['vname']))
|
||||
echo 'Venue: '.$party['Party']['vname']."<br/>\n";
|
||||
foreach ($parties as $party): ?>
|
||||
<div>
|
||||
<h1><?php echo $party['Party']['name']; ?></h1>
|
||||
<p>
|
||||
<?php
|
||||
if (!empty($party['Party']['address']))
|
||||
echo 'Location: '.$party['Party']['address']."<br/>\n";
|
||||
|
||||
if (!empty($party['Party']['vname']))
|
||||
echo 'Venue: '.$party['Party']['vname']."<br/>\n";
|
||||
|
||||
echo 'Date: '.(($party['Party']['confirmed'] == 1) ? gmdate('Y-m-d h:ia', $party['Party']['date'] + (@$_SESSION['User']['tz'] * 60 * 60))." GMT".@$_SESSION['User']['tz'] : "TBA")."<br/>\n";
|
||||
|
||||
if (!empty($party['Party']['website']))
|
||||
echo 'Website: <a href="'.$party['Party']['website'].'" rel="nofollow">'.$party['Party']['website']."</a><br/>\n";
|
||||
|
||||
echo '<a href="'.$html->url('/party/view/'.$party['Party']['id']).'">View Party</a>';
|
||||
|
||||
?>
|
||||
echo 'Date: '.(($party['Party']['confirmed'] == 1) ? gmdate('Y-m-d h:ia', $party['Party']['date'] + (@$_SESSION['User']['tz'] * 60 * 60))." GMT".@$_SESSION['User']['tz'] : "TBA")."<br/>\n";
|
||||
|
||||
if (!empty($party['Party']['website']))
|
||||
echo 'Website: <a href="'.$party['Party']['website'].'" rel="nofollow">'.$party['Party']['website']."</a><br/>\n";
|
||||
|
||||
echo '<a href="'.$html->url('/party/view/'.$party['Party']['id']).'">View Party</a>';
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php endforeach;
|
||||
if (isset($prev))
|
||||
|
|
|
@ -1,24 +1,56 @@
|
|||
<?php if ($error): ?>
|
||||
<p>There was an error in your submission, please try again.</p>
|
||||
<div class="error">
|
||||
There was an error in your submission, please try again.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo $html->url('/user/edit'); ?>" method="post">
|
||||
<form class="fxform" action="<?php echo $html->url('/user/edit'); ?>" method="post">
|
||||
<?php echo $html->hidden('User/id'); ?>
|
||||
<h1>Profile</h1>
|
||||
<div>
|
||||
<h2>Profile</h2>
|
||||
<hr/>
|
||||
<label for="name">Name:</label>
|
||||
<?php echo $html->input('User/name', array('size' => 20)); ?>
|
||||
<label for="UserName" class="label-large">Name:</label>
|
||||
<?php echo $html->input('User/name', array('size' => 40)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="name">Website:</label>
|
||||
<?php echo $html->input('User/website', array('size' => 20)); ?>
|
||||
<label for="name" class="label-large">Website:</label>
|
||||
<?php echo $html->input('User/website', array('size' => 40)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="location">Location:</label>
|
||||
<?php echo $html->input('User/location', array('id' => 'location', 'size' => 20, 'onkeypress' => 'capture(event)')); ?>
|
||||
<label for="location" class="label-large">Location:</label>
|
||||
<?php echo $html->input('User/location', array('id' => 'location', 'size' => 40, 'onkeypress' => 'capture(event)')); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="UserTz" class="label-large">Timezone:</label>
|
||||
<?php
|
||||
$tzs = array('-12' => 'GMT-12',
|
||||
'-11' => 'GMT-11',
|
||||
'-10' => 'GMT-10',
|
||||
'-9' => 'GMT-9',
|
||||
'-8' => 'GMT-8',
|
||||
'-7' => 'GMT-7',
|
||||
'-6' => 'GMT-6',
|
||||
'-5' => 'GMT-5',
|
||||
'-4' => 'GMT-4',
|
||||
'-3' => 'GMT-3',
|
||||
'-2' => 'GMT-2',
|
||||
'-1' => 'GMT-1',
|
||||
'0' => 'GMT+0',
|
||||
'1' => 'GMT+1',
|
||||
'2' => 'GMT+2',
|
||||
'3' => 'GMT+3',
|
||||
'4' => 'GMT+4',
|
||||
'5' => 'GMT+5',
|
||||
'6' => 'GMT+6',
|
||||
'7' => 'GMT+7',
|
||||
'8' => 'GMT+8',
|
||||
'9' => 'GMT+9',
|
||||
'10' => 'GMT+10',
|
||||
'11' => 'GMT+11',
|
||||
'12' => 'GMT+12');
|
||||
echo $html->selectTag('User/tz', $tzs, $utz, null, null, false);
|
||||
?>
|
||||
(current time is <?php echo gmdate("Y-m-d H:i:s"); ?>GMT)
|
||||
</div>
|
||||
<?php if(GMAP_API_KEY != null): ?>
|
||||
<a onclick="update()">Update map</a>
|
||||
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo GMAP_API_KEY; ?>"
|
||||
type="text/javascript"></script>
|
||||
<script src="<?php echo $html->url('/js/maps.js'); ?>" type="text/javascript"></script>
|
||||
|
@ -38,34 +70,29 @@
|
|||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div style="width: 400px; height: 250px">
|
||||
<div id="maperror" style="display: none" class="error"></div>
|
||||
<div id="map" style="height: 100%; width: 100%;"></div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Privacy</h2>
|
||||
<hr/>
|
||||
<label for="UserShowemail">Show email:</label>
|
||||
<?php echo $html->checkbox('User/showemail'); ?><br/>
|
||||
<label for="UserShowloc">Show location:</label>
|
||||
<?php echo $html->checkbox('User/showloc'); ?><br/>
|
||||
<label for="UserShowmap">Show map:</label>
|
||||
<?php echo $html->checkbox('User/showmap'); ?><br/>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Password</h2>
|
||||
<hr/>
|
||||
<label for="password">New password:</label>
|
||||
<?php echo $html->password('User/password', array('size' => 20)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/password', 'Passwords don\'t match!')?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="confpassword">Confirm new password:</label>
|
||||
<?php echo $html->password('User/confpassword', array('size' => 20)); ?>
|
||||
</div>
|
||||
<p id="map" class="small-map"></p>
|
||||
<?php echo $html->hidden('User/lat', array('id' => 'lat'));
|
||||
echo $html->hidden('User/long', array('id' => 'long'));
|
||||
echo $html->hidden('User/zoom', array('id' => 'zoom')); ?>
|
||||
<?php endif; ?>
|
||||
<h1>Privacy</h1>
|
||||
<div>
|
||||
<label for="UserShowemail" class="label-large">Show email:</label>
|
||||
<?php echo $html->checkbox('User/showemail'); ?><br/>
|
||||
<label for="UserShowloc" class="label-large">Show location:</label>
|
||||
<?php echo $html->checkbox('User/showloc'); ?><br/>
|
||||
<label for="UserShowmap" class="label-large">Show map:</label>
|
||||
<?php echo $html->checkbox('User/showmap'); ?><br/>
|
||||
</div>
|
||||
<h1>Password</h1>
|
||||
<div>
|
||||
<label for="UserPassword" class="label-large">New password:</label>
|
||||
<?php echo $html->password('User/password', array('size' => 20)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/password', 'Passwords don\'t match!')?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="UserConfpassword" class="label-large">Confirm new password:</label>
|
||||
<?php echo $html->password('User/confpassword', array('size' => 20)); ?>
|
||||
</div>
|
||||
<?php echo $html->submit('Update'); ?>
|
||||
</form>
|
|
@ -1,25 +0,0 @@
|
|||
Parties I'm attending:
|
||||
<?php
|
||||
$c = count($parties) - 1;
|
||||
$i = 0;
|
||||
foreach ($parties as $party) {
|
||||
echo '<a href="'.$html->url('/party/view/'.$party['parties']['id']).'">'.$party['parties']['name'].'</a>';
|
||||
echo ($i < $c) ? ', ' : '';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<br/>
|
||||
Parties I'm hosting:
|
||||
<?php
|
||||
$c = count($hparties) - 1;
|
||||
$i = 0;
|
||||
foreach ($hparties as $party) {
|
||||
echo '<a href="'.$html->url('/party/view/'.$party['parties']['id']).'">'.$party['parties']['name'].'</a>';
|
||||
echo ($i < $c) ? ', ' : '';
|
||||
$i++;
|
||||
}
|
||||
?>
|
||||
<ul>
|
||||
<li><a href="<?php echo $html->url('/party/register'); ?>">Create a new party</a></li>
|
||||
<li><a href="<?php echo $html->url('/user/edit'); ?>">Edit my account</a></li>
|
||||
</ul>
|
|
@ -1,22 +1,27 @@
|
|||
<h1>Login</h1>
|
||||
<?if ($error): ?>
|
||||
<p>The email address and password you supplied do not match. Please try again.</p>
|
||||
<div class="error">
|
||||
The email address and password you supplied do not match. Please try again.
|
||||
</div>
|
||||
<? endif;
|
||||
if (isset($preamble)): ?>
|
||||
<div class="info">
|
||||
<?php echo $preamble; ?>
|
||||
</div>
|
||||
<div class="info">
|
||||
<?php echo $preamble; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo $html->url('/user/login'); ?>" method="post">
|
||||
<div>
|
||||
<label for="email">Email:</label>
|
||||
<?php echo $html->input('User/email', array('size' => 20)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="password">Password:</label>
|
||||
<?php echo $html->password('User/password', array('size' => 20)); ?>
|
||||
<a href="<?php echo $html->url('/user/recover/password'); ?>">Forgot your password?</a>
|
||||
</div>
|
||||
<div>
|
||||
<form class="fxform" action="<?php echo $html->url('/user/login'); ?>" method="post">
|
||||
<div>
|
||||
<label class="label-large" for="email">Email Address:</label>
|
||||
<?php echo $html->input('User/email', array('size' => 40)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label-large" for="password">Password:</label>
|
||||
<?php echo $html->password('User/password', array('size' => 40)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<?php echo $html->submit('Login'); ?>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
<a href="">Create an account</a> | <a href="<?php echo $html->url('/user/recover/password'); ?>">Forgot your password?</a>
|
||||
</p>
|
||||
</form>
|
|
@ -1,25 +0,0 @@
|
|||
<form action="<?php
|
||||
if (isset($reset))
|
||||
echo $html->url('/user/recover/reset/'.$code);
|
||||
else
|
||||
echo $html->url('/user/recover/'.$url); ?>" method="post">
|
||||
<?php if (isset($error)): ?>
|
||||
<div class="error">
|
||||
<?php echo $error; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div>
|
||||
<?php if (!$hideInput): ?>
|
||||
<label for="UserEmail">Email address:</label>
|
||||
<?php echo $html->input('User/email'); ?>
|
||||
<?php endif;
|
||||
if (isset($reset)): ?>
|
||||
<label for="UserPassword">New password:</label>
|
||||
<?php echo $html->password('User/password'); ?>
|
||||
<br/>
|
||||
<label for="UserConfirm">Confirm password:</label>
|
||||
<?php echo $html->password('User/confirm'); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php echo $html->submit('Submit'); ?>
|
||||
</form>
|
|
@ -1,32 +1,44 @@
|
|||
<h1>Register</h1>
|
||||
<?php if ($error): ?>
|
||||
<p>There was an error in your submission, please try again.</p>
|
||||
<div class="error">
|
||||
There was an error in your submission, please try again.
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<form action="<?php echo $html->url('/user/register'); ?>" method="post">
|
||||
<form class="fxform" action="<?php echo $html->url('/user/register'); ?>" method="post">
|
||||
<p>Your e-mail address is used as your username to login. You'll also receive a confirmation e-mail to
|
||||
this address. In order for your account to be activated successfully, you must specify a valid e-mail address.</p>
|
||||
<div>
|
||||
<label for="email"><strong>Email address</strong>:</label>
|
||||
<?php echo $html->input('User/email', array('size' => 20)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/email', 'Email invalid or already registered.')?>
|
||||
<label class="label-large" for="UserEmail">Email address<span class="required">*</span>:</label>
|
||||
<?php echo $html->input('User/email', array('size' => 40)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/email', 'The email address you entered is invalid or has already been registered.')?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="name">Name:</label>
|
||||
<?php echo $html->input('User/name', array('size' => 20)); ?>
|
||||
</div>
|
||||
<label class="label-large" for="UserConfemail">Confirm Email address<span class="required">*</span>:</label>
|
||||
<?php echo $html->input('User/confemail', array('size' => 40)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/confemail', 'The email addresses you entered do not match.')?>
|
||||
</div>
|
||||
<p>How do you want to be known to visitors of <?php echo APP_NAME; ?>?</p>
|
||||
<div>
|
||||
<label for="password"><strong>Password</strong>:</label>
|
||||
<?php echo $html->password('User/password', array('size' => 20)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/password', 'Passwords don\'t match!')?>
|
||||
<label class="label-large" for="UserName">Name<span class="required">*</span>:</label>
|
||||
<?php echo $html->input('User/name', array('size' => 40)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/name', 'You must enter a name.')?>
|
||||
</div>
|
||||
<p>If you choose to enter it, your location will be shown on your profile. This
|
||||
field is optional.
|
||||
<div>
|
||||
<label class="label-large" for="UserLocation">Location:</label>
|
||||
<?php echo $html->input('User/location', array('id' => 'location', 'size' => 40, 'onkeypress' => 'capture(event)')); ?>
|
||||
</div>
|
||||
<p>If you have a website, enter the URL here. (including the http:// ) Your website will be
|
||||
shown to site visitors on your author profile page. This field is optional; if you don't
|
||||
have a website or don't want it linked to from <?php echo APP_NAME; ?>, leave this box blank.</p>
|
||||
<div>
|
||||
<label class="label-large" for="UserWebsite">Website:</label>
|
||||
<?php echo $html->input('User/website', array('size' => 40)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="confpassword"><strong>Confirm password</strong>:</label>
|
||||
<?php echo $html->password('User/confpassword', array('size' => 20)); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="location">Location:</label>
|
||||
<?php echo $html->input('User/location', array('id' => 'location', 'size' => 20, 'onkeypress' => 'capture(event)')); ?>
|
||||
</div>
|
||||
<div>
|
||||
<label for="UserTz">Timezone (current time is <?php echo gmdate("Y-m-d H:i:s"); ?>GMT):</label>
|
||||
<select name="data[User][tz]" id="UserTz">
|
||||
<label class="label-large" for="UserTz">Timezone<span class="required">*</span>:</label>
|
||||
<select name="data[User][tz]" id="UserTz">
|
||||
<option value="-12">GMT-12</option>
|
||||
<option value="-11">GMT-11</option>
|
||||
<option value="-10">GMT-10</option>
|
||||
|
@ -53,13 +65,19 @@
|
|||
<option value="11">GMT+11</option>
|
||||
<option value="12">GMT+12</option>
|
||||
</select>
|
||||
(this page was loaded at <?php echo gmdate("Y-m-d H:i:s"); ?>GMT)
|
||||
</div>
|
||||
<div>
|
||||
<label for="website">Website:</label>
|
||||
<?php echo $html->input('User/website', array('size' => 20)); ?>
|
||||
<label class="label-large" for="password">Password<span class="required">*</span>:</label>
|
||||
<?php echo $html->password('User/password', array('size' => 40)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/password', 'You must enter a password.')?>
|
||||
</div>
|
||||
<div>
|
||||
<label class="label-large" for="confpassword">Confirm password<span class="required">*</span>:</label>
|
||||
<?php echo $html->password('User/confpassword', array('size' => 40)); ?>
|
||||
<?php echo $html->tagErrorMsg('User/confpassword', 'The passwords you supplied do not match.')?>
|
||||
</div>
|
||||
<?php if(GMAP_API_KEY != null): ?>
|
||||
<a onclick="update()">Update map</a>
|
||||
<script src="http://maps.google.com/maps?file=api&v=2&key=<?php echo GMAP_API_KEY; ?>"
|
||||
type="text/javascript"></script>
|
||||
<script src="<?php echo $html->url('/js/maps.js'); ?>" type="text/javascript"></script>
|
||||
|
@ -79,15 +97,13 @@
|
|||
}
|
||||
//]]>
|
||||
</script>
|
||||
<div style="width: 500px; height: 300px">
|
||||
<div id="maperror" style="display: none" class="error"></div>
|
||||
<div id="map" style="height: 100%; width: 100%;"></div>
|
||||
</div>
|
||||
<p>Drag the map or the marker to specify a location. Set the zoom by using the '+' or '-' buttons on the left.</p>
|
||||
<p id="map" class="med-map-r"></p>
|
||||
<div>
|
||||
<?php echo $html->hidden('User/lat', array('id' => 'lat'));
|
||||
echo $html->hidden('User/long', array('id' => 'long'));
|
||||
echo $html->hidden('User/zoom', array('id' => 'zoom'));
|
||||
echo $html->hidden('User/icode', array('value' => $icode)); ?>
|
||||
echo $html->hidden('User/icode', array('value' => @$icode)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php echo $html->submit('Register'); ?>
|
||||
|
|
|
@ -21,17 +21,82 @@
|
|||
margin: 5px 0 5px 0;
|
||||
}
|
||||
|
||||
#user {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
#f-left {
|
||||
width: 75%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
img { border: 1px solid #555 }
|
||||
#f-right {
|
||||
width: 25%;
|
||||
float: right;
|
||||
}
|
||||
|
||||
h2 + hr { padding: 0; margin: 0;}
|
||||
.cbox {
|
||||
text-align: center;
|
||||
border: 1px solid #808080;
|
||||
background: #eee;
|
||||
padding: 5px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.ctxt{
|
||||
font-size: 200%;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cfeed {
|
||||
position: relative;
|
||||
bottom: 15px;
|
||||
float: right;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.ifeed {
|
||||
position: relative;
|
||||
bottom: 15px;
|
||||
float: right;
|
||||
height: 16px;
|
||||
width: 34px;
|
||||
}
|
||||
|
||||
.required { color: red; font-weight: bold;}
|
||||
|
||||
.fxform div { margin: 1em 0; }
|
||||
|
||||
.label-large, .label-medium, .label-small {
|
||||
border-bottom: 1px dashed #eee;
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.label-large { width: 14em; }
|
||||
|
||||
.large-map { width: 700px; height: 500px; margin: 0 auto; }
|
||||
.med-map-r { width: 500px; height: 300px; margin: 0 auto; }
|
||||
.med-map-r div { margin: 0; }
|
||||
.small-map { width: 400px; height: 200px;}
|
||||
.small-map div { margin: 0; }
|
||||
|
||||
.comment {
|
||||
border: 1px solid #ccc;
|
||||
border-top: 0;
|
||||
padding: 10px 5px 0 5px;
|
||||
}
|
||||
.comment-mod { background: #ecedf3; }
|
||||
|
||||
.comment-content { font-size: 125%; padding-bottom: 50px; }
|
||||
.comment-tag { font-size: 75%; }
|
||||
|
||||
h1 { border-bottom: 1px solid #ccc;
|
||||
margin-bottom: 0;}
|
||||
|
||||
#footer { padding: 30px 0 20px 0; }
|
||||
|
||||
img { border: none }
|
||||
|
||||
body {
|
||||
background: #fff url("/cake/img/body_back.png") top repeat-x;
|
||||
background: #fff url("../img/body_back.png") top repeat-x;
|
||||
color: #555;
|
||||
font-family: arial, sans-serif;
|
||||
margin: 0 10px;
|
||||
|
@ -46,35 +111,112 @@ a { color: #34518c; text-decoration: none; }
|
|||
a:hover { text-decoration: underline; }
|
||||
|
||||
#container {
|
||||
width: 742px;
|
||||
position: relative;
|
||||
width: 740px;
|
||||
margin: 0 auto;
|
||||
padding: 22px 0;
|
||||
}
|
||||
|
||||
#mozilla-com a {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
float: right;
|
||||
display: block;
|
||||
text-indent: -5000em;
|
||||
width: 110px;
|
||||
height: 25px;
|
||||
text-decoration: none;
|
||||
background: url("/cake/img/mozilla-org.png") no-repeat;
|
||||
background: url("../img/mozilla-org.png") no-repeat;
|
||||
}
|
||||
|
||||
#key-menu {
|
||||
background: #B2C1C8 url("../img/header-bottom.gif") 0 100% no-repeat;
|
||||
padding: 0 0 10px 0;
|
||||
overflow: auto;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
* html #key-menu {
|
||||
overflow: visible;
|
||||
height: 1px;
|
||||
}
|
||||
|
||||
#key-menu ul, #key-menu li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#key-menu ul {
|
||||
padding: 14px 12px 0 12px;
|
||||
background: url("../img/header-top.gif") 0 0 no-repeat;
|
||||
}
|
||||
|
||||
#key-menu li {
|
||||
float: left;
|
||||
background: url("../img/tabs.gif") 100% -50px;
|
||||
padding-right: 5px;
|
||||
margin-right: 2px;
|
||||
border-bottom: 1px solid #849CA4;
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
|
||||
#key-menu li a, #key-menu li span {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 3px 15px 2px 20px;
|
||||
background: url("../img/tabs.gif") 0 -50px;
|
||||
color: #5A7CBA;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#key-menu li:hover a {
|
||||
background-position: 0 -100px;
|
||||
}
|
||||
|
||||
#key-menu li:hover {
|
||||
background-position: 100% -100px;
|
||||
}
|
||||
|
||||
#key-menu li.current {
|
||||
background: url("../img/tabs.gif") 100% 0;
|
||||
border-bottom-color: white;
|
||||
}
|
||||
|
||||
#key-menu li.current a, #key-menu li.current span {
|
||||
background: url("../img/tabs.gif") 0 0;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
#key-menu a:focus { outline: none; }
|
||||
|
||||
#header {
|
||||
background: url("/cake/img/header.gif") no-repeat;
|
||||
color: white;
|
||||
font-family: Arial;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
height: 127px;
|
||||
clear: both;
|
||||
padding-top: 40px;
|
||||
position: relative;
|
||||
} * html #header { padding-top: 20px; }
|
||||
|
||||
#header h1 {
|
||||
height: 46px;
|
||||
margin: 0;
|
||||
font-size: 2px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -4px;
|
||||
border: none;
|
||||
z-index: 5000;
|
||||
}
|
||||
|
||||
#header a { color: white; text-decoration: none; }
|
||||
#user {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 9px;
|
||||
margin-left: 200px;
|
||||
font-family: tahoma, arial, sans-serif;
|
||||
font-size: 95%;
|
||||
}
|
||||
|
||||
.skipLink {
|
||||
position: absolute;
|
||||
left: -1200px;
|
||||
width: 990px;
|
||||
}
|
||||
|
||||
#map {
|
||||
border: 1px solid #555;
|
||||
|
|
Двоичные данные
webtools/partytool/webroot/favicon.ico
Двоичные данные
webtools/partytool/webroot/favicon.ico
Двоичный файл не отображается.
До Ширина: | Высота: | Размер: 4.2 KiB После Ширина: | Высота: | Размер: 0 B |
Загрузка…
Ссылка в новой задаче