diff --git a/webtools/partytool/config/bootstrap.php b/webtools/partytool/config/bootstrap.php index 2904f22da2a7..1158542a195f 100755 --- a/webtools/partytool/config/bootstrap.php +++ b/webtools/partytool/config/bootstrap.php @@ -1,4 +1,11 @@ s and mail names/subjects. APP_BASE + * should be a FQDN with protocol minus the trailing slash e.g. http://example.tld/party + */ +define('APP_NAME', ''); +define('APP_EMAIL', ''); +define('APP_BASE', ''); + /* You should specify a Google Map API key here. Without it, all mapping features * will be disabled. To obtain a key, visit http://www.google.com/apis/maps/ */ @@ -9,9 +16,8 @@ define('GMAP_API_KEY', ''); */ define('GSEARCH_API_KEY', ''); +/* The maximum year shown for party registrations */ define('MAX_YEAR', 2007); -define('APP_NAME', 'Firefox Party'); -define('APP_EMAIL', ''); /* The Flickr API is used to show photos of each party on the individual party * pages and home page. See http://flickr.com/services/api/keys/ to obtain a key diff --git a/webtools/partytool/config/database.php b/webtools/partytool/config/database.php index 616e4e3fc42e..30d4210f7198 100755 --- a/webtools/partytool/config/database.php +++ b/webtools/partytool/config/database.php @@ -1,4 +1,5 @@ 'mysql', 'connect' => 'mysql_connect', diff --git a/webtools/partytool/config/sql/dist.sql b/webtools/partytool/config/sql/dist.sql index a70efbcab127..7533383be9c4 100755 --- a/webtools/partytool/config/sql/dist.sql +++ b/webtools/partytool/config/sql/dist.sql @@ -13,6 +13,7 @@ CREATE TABLE IF NOT EXISTS `parties` ( `name` tinytext NOT NULL, `vname` tinytext, `address` tinytext NOT NULL, + `tz` int(2) NOT NULL default '0', `website` tinytext, `notes` text, `date` int(10) default NULL, @@ -20,9 +21,10 @@ CREATE TABLE IF NOT EXISTS `parties` ( `guests` tinytext NOT NULL, `confirmed` 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` int(5) default NULL, + `zoom` tinyint(2) NOT NULL default '8', `useflickr` tinyint(1) NOT NULL default '0', `flickrid` tinytext NOT NULL, PRIMARY KEY (`id`) @@ -37,6 +39,7 @@ CREATE TABLE IF NOT EXISTS `users` ( `salt` varchar(9) NOT NULL default '', `name` tinytext NOT NULL, `location` tinytext NOT NULL, + `tz` int(2) NOT NULL default '0', `website` tinytext NOT NULL, `lat` float default NULL, `long` float default NULL, diff --git a/webtools/partytool/controllers/comment_controller.php b/webtools/partytool/controllers/comment_controller.php index 08c8b76f222f..f4511ff19397 100755 --- a/webtools/partytool/controllers/comment_controller.php +++ b/webtools/partytool/controllers/comment_controller.php @@ -57,7 +57,7 @@ class CommentController extends AppController { $this->data['Comment']['text'] = preg_replace('/\n/', '
', $text); $this->data['Comment']['owner'] = $uid; $this->data['Comment']['assoc'] = $pid; - $this->data['Comment']['time'] = time(); + $this->data['Comment']['time'] = gmmktime(); if ($this->Comment->save($this->data)) { $this->redirect('/party/view/'.$pid); diff --git a/webtools/partytool/controllers/pages_controller.php b/webtools/partytool/controllers/pages_controller.php index a68860a30626..ed9447688ad2 100755 --- a/webtools/partytool/controllers/pages_controller.php +++ b/webtools/partytool/controllers/pages_controller.php @@ -36,8 +36,10 @@ * ***** END LICENSE BLOCK ***** */ class PagesController extends AppController { var $name = 'Pages'; + var $pageTitle; function display() { + $this->pageTitle = APP_NAME." - Home"; $this->set('pcount', $this->Page->findCount()); $this->set('ucount', $this->Page->getUsers()); } diff --git a/webtools/partytool/controllers/party_controller.php b/webtools/partytool/controllers/party_controller.php index 9f6820c4a4a2..5a3b69757afb 100755 --- a/webtools/partytool/controllers/party_controller.php +++ b/webtools/partytool/controllers/party_controller.php @@ -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 @@ -35,46 +35,70 @@ * * ***** END LICENSE BLOCK ***** */ vendor('webServices'); +vendor('mail'); uses('sanitize'); class PartyController extends AppController { var $name = 'Party'; + var $pageTitle; var $components = array('RequestHandler'); var $components = array('Security'); - + function beforeFilter() { - $this->Security->requirePost('rsvp','unrsvp'); + $this->Security->requirePost('unrsvp'); } - + function index() { if (GMAP_API_KEY != null) $this->set('body_args', ' onload="initMashUp()" onunload="GUnload()"'); + $this->pageTitle = APP_NAME." - Party Map"; } - + function register() { if (!$this->Session->check('User')) { $this->redirect('/user'); } - + + $this->pageTitle = APP_NAME." - Register"; + $this->set('error', false); if (GMAP_API_KEY != null) $this->set('body_args', ' onload="mapInit(14.944785, -156.796875, 1)" onunload="GUnload()"'); - + if (!empty($this->data)) { $clean = new Sanitize(); + $temp = array('lat' => $clean->sql($this->data['Party']['lat']), + 'long' => $clean->sql($this->data['Party']['long']), + 'tz' => $clean->sql($this->data['Party']['tz'])); + $clean->cleanArray($this->data); - - $this->data['Party']['date'] = mktime($this->data['Party']['hour_hour'], - $this->data['Party']['minute_min'], - 0, - $this->data['Party']['month_hour'], - $this->data['Party']['day_day'], - $this->data['Party']['year_year']); - + + $this->data['Party']['lat'] = floatval($temp['lat']); + $this->data['Party']['long'] = floatval($temp['long']); + $this->data['Party']['tz'] = intval($temp['tz']); + + $secoffset = ($this->data['Party']['tz'] * 60 * 60); + + $offsetdate = gmmktime($this->data['Party']['hour_hour'], + $this->data['Party']['minute_min'], + 0, + $this->data['Party']['month_hour'], + $this->data['Party']['day_day'], + $this->data['Party']['year_year']); + + $this->data['Party']['date'] = ($offsetdate + $secoffset); $this->data['Party']['owner'] = $_SESSION['User']['id']; + + $key = null; + $chars = "1234567890abcdefghijklmnopqrstuvwxyz"; + for ($i = 0; $i < 10; $i++) { + $key .= $chars{rand(0,35)}; + } + + $this->data['Party']['invitecode'] = $key; if (empty($this->data['Party']['lat']) && !empty($this->data['Party']['address']) && $this->data['Party']['geocoded'] == 0) { - + // Attempt to geocode the address again $geocoder = new webServices(array('type' => 'geocode')); if ($ll = $geocoder->geocode($this->data['Party']['address']) != 0) { @@ -84,6 +108,7 @@ class PartyController extends AppController { else { // May not come back with exactly what the user was looking for, but they can always edit $suggest = new webServices(array('type' => 'gsuggest')); + $geocoder = new webServices(array('type' => 'geocode')); if ($suggestion = $suggest->GSuggest($this->data['Party']['address']) != 0) { $this->data['Party']['address'] = $suggestion; if ($ll = $geocoder->geocode($suggestion) != 0) { @@ -93,30 +118,101 @@ class PartyController extends AppController { } } } - + if ($this->Party->save($this->data)) $this->redirect('party/view/'.$this->Party->getInsertId()); } } - + + function edit($id = null) { + $this->Party->id = $id; + $party = $this->Party->read(); + $this->set('party', $party); + $this->pageTitle = APP_NAME." - Edit Party"; + + if (empty($_SESSION['User']['id'])) + $this->redirect('/user/login/'); + + if ($party['Party']['owner'] != $_SESSION['User']['id']) + $this->redirect('/party/view/'.$id); + + 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'])); + + if (GMAP_API_KEY != null) { + if ($this->data['Party']['lat']) + $this->set('body_args', + ' onload="mapInit('.$this->data["Party"]["lat"].', '.$this->data["Party"]["long"].', '.$this->data["Party"]["zoom"].');" onunload="GUnload()"'); + else + $this->set('body_args', + ' onload="mapInit(1, 1, 1);" onunload="GUnload()"'); + } + } + + else { + $clean = new Sanitize(); + $temp = array('lat' => $clean->sql($this->data['Party']['lat']), + 'long' => $clean->sql($this->data['Party']['long']), + 'tz' => $clean->sql($this->data['Party']['tz'])); + + $clean->cleanArray($this->data); + + $this->data['Party']['lat'] = floatval($temp['lat']); + $this->data['Party']['long'] = floatval($temp['long']); + $this->data['Party']['tz'] = intval($temp['tz']); + + $secoffset = ($this->data['Party']['tz'] * 60 * 60); + + $offsetdate = gmmktime($this->data['Party']['hour_hour'], + $this->data['Party']['minute_min'], + 0, + $this->data['Party']['month_hour'], + $this->data['Party']['day_day'], + $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']); + $flick = new webServices($params); + $this->data['Party']['flickrid'] = $flick->getFlickrId(); + } + + if ($this->Party->save($this->data)) + $this->redirect('party/view/'.$id); + } + } + } + function view($id = null, $page = null) { if ($id == "all") { + $this->pageTitle = APP_NAME." - All Parties"; $count = $this->Party->findCount(); $pages = ceil($count/10); if ($page == null) $page = 1; - + if ($page > 1) $this->set('prev', $page - 1); if ($page < $pages) $this->set('next', $page + 1); - + $this->set('parties', $this->Party->findAll(null, null, "name ASC", 10, $page)); } - + else if (is_numeric($id)) { $party = $this->Party->findById($id); $this->set('party', $party); + + $this->pageTitle = APP_NAME." - ".$party['Party']['name']; if ($party['Party']['useflickr'] == 1) { $data = array('type' => 'flickr', 'userid' => $party['Party']['flickrid']); @@ -126,39 +222,51 @@ class PartyController extends AppController { if (!empty($party['Party']['guests'])) { $guests = explode(',', $party['Party']['guests']); $names = array(); - + for ($i = 0; $i < count($guests); $i++) array_push($names, $this->Party->getUserName($guests[$i])); - + $this->set('guests', $guests); $this->set('names', $names); } - + $this->set('host', $this->Party->getUserName($party['Party']['owner'])); - $this->set('comments', $this->Party->getComments($party['Party']['id'])); + $this->set('comments', $this->Party->getComments($party['Party']['id'])); $this->set('body_args', ' onload="mapInit('.$party['Party']['lat'].', '.$party['Party']['long'].', '.$party['Party']['zoom'].', \'stationary\')" onunload="GUnload()"'); } - + else { $this->redirect('/party/view/all'); } } - function rsvp($aParty = null) { + function rsvp($aParty = null, $icode = null) { if (!is_numeric($aParty)) $this->redirect('/'); - $party = $this->Party->findById($aParty); + $invited = false; + + if ($icode != null) { + $party = $this->Party->findByInvitecode($icode); + if ($aParty != $party['Party']['id']) + $this->redirect('/party/view/'.$aParty); + else + $invited = true; + } + + else + $party = $this->Party->findById($aParty); + $user = $this->Session->read('User'); - if (empty($user['id'])) + if (empty($_SESSION['User']['id'])) $this->redirect('/user/login'); - else { + else if ($party['Party']['inviteonly'] != 1 || $invited === true) { if (empty($party['Party']['guests'])) { $this->data['Party']['guests'] = $user['id']; $this->data['Party']['id'] = $aParty; } - + else { $attendees = explode(',', $party['Party']['guests']); if (in_array($user['id'], $attendees)) @@ -170,10 +278,13 @@ class PartyController extends AppController { $this->data['Party']['guests'] = $csv; } } - + if ($this->Party->save($this->data)) $this->redirect('/party/view/'.$aParty.'/added'); } + + else + $this->redirect('/party/view/'.$aParty); } function unrsvp($aParty) { @@ -181,7 +292,7 @@ class PartyController extends AppController { if (empty($user)) { $this->redirect('/user/login'); } - + if (is_numeric($aParty)) { $party = $this->Party->findById($aParty); $temp = explode(',', $party['Party']['guests']); @@ -199,9 +310,39 @@ class PartyController extends AppController { else $this->redirect('/'); } - - function invite() { - //XXX TODO + + function invite($id = null) { + $this->pageTitle = APP_NAME." - Invite a guest"; + if (is_numeric($id) && isset($_SESSION['User'])) { + $party = $this->Party->findById($id); + if ($party['Party']['owner'] === $_SESSION['User']['id']) { + $this->set('partyid', $party['Party']['id']); + $this->set('inviteurl', APP_BASE.'/register/'.$party['Party']['invitecode']); + + if (!empty($this->data)) { + if ($this->Party->validates($this->data)) { + $message = array('from' => APP_NAME.' <'.APP_EMAIL.'>', + 'envelope' => APP_EMAIL, + 'to' => $this->data['Party']['einvite'], + 'subject' => 'You\'ve been invited to '.APP_NAME.'!', + 'link' => APP_BASE.'/user/register/'.$party['Party']['invitecode'], + 'type' => 'invite'); + + $mail = new mail($message); + $mail->send(); + $this->set('preamble', array($this->data['Party']['einvite'], $id)); + } + else { + $this->validateErrors($this->Party); + $this->render(); + } + } + } + else + $this->redirect('/party/view/'.$id); + } + else + $this->redirect('/user/login'); } function js() { diff --git a/webtools/partytool/controllers/user_controller.php b/webtools/partytool/controllers/user_controller.php index 27e9cb6d6a0e..6ad21ef54784 100755 --- a/webtools/partytool/controllers/user_controller.php +++ b/webtools/partytool/controllers/user_controller.php @@ -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 @@ -39,72 +39,115 @@ uses('sanitize'); class UserController extends AppController { var $name = 'User'; var $helpers = array('Html'); - + var $pageTitle; + function index() { - if (!$this->Session->check('User')) { + if (!isset($_SESSION['User'])) { $this->redirect('/user/login'); } + $this->pageTitle = APP_NAME." - My Profile"; + $user = $this->Session->read('User'); $this->set('parties', $this->User->memberOf($user['id'])); $this->set('hparties', $this->User->hostOf($user['id'])); } - + function edit() { + if (!isset($_SESSION['User'])) { + $this->redirect('/user/login'); + } $this->set('error', false); - $user = $this->User->findById($_SESSION['User']['id']); - $this->set('user', $user); - if (GMAP_API_KEY != null && !empty($user['User']['lat'])) + $this->pageTitle = APP_NAME." - Edit My Account"; + if (empty($this->data)) { + $this->User->id = $_SESSION['User']['id']; + $this->data = $this->User->read(); + $this->data['User']['password'] = ""; + + if (GMAP_API_KEY != null && !empty($this->data['User']['lat'])) $this->set('body_args', - ' onload="mapInit('.$user["User"]["lat"].', '.$user["User"]["long"].', '.$user["User"]["zoom"].');" onunload="GUnload()"'); - - if (!empty($this->data)) { - //XXX TODO - $this->redirect('/user/'); + ' onload="mapInit('.$this->data["User"]["lat"].', '.$this->data["User"]["long"].', '.$this->data["User"]["zoom"].');" onunload="GUnload()"'); + } + + else { + $user = $this->User->findById($_SESSION['User']['id']); + $this->User->id = $user['User']['id']; + + + if (!empty($this->data['User']['password'])) { + if ($this->data['User']['password'] === $this->data['User']['confpassword']) { + $string = $user['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']); + } + else { + $this->set('error', true); + $this->render(); + } + } + else + $this->data['User']['password'] = $user['User']['password']; + + + if ($this->User->save($this->data)) { + $this->redirect('/user/'); + } } } - + function view($aUid = null) { if ($aUid === null || !is_numeric($aUid)) $this->redirect('/'); - + else { $user = $this->User->findById($aUid); + $this->pageTitle = APP_NAME." - ".$user['User']['name']; $this->set('user', $user); 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('hparties', $this->User->hostOf($user['User']['id'])); } } - - function register() { + + function register($invite = null) { $this->set('error', false); - if ($this->Session->check('User')) { - $this->redirect('/user/'); + if (isset($_SESSION['User'])) { + if ($invite != null) { + $this->redirect('/party/rsvp/'.$this->User->getPartyId($invite).'/'.$invite); + } + else + $this->redirect('/user/'); } + + if (empty($this->data)) + $this->set('icode', $invite); + + $this->pageTitle = APP_NAME." - Register"; if (GMAP_API_KEY != null) $this->set('body_args', ' onload="mapInit()" onunload="GUnload()"'); if (!empty($this->data)) { - $clean = new Sanitize(); $temp = array('email' => $this->data['User']['email'], 'password' => $this->data['User']['password'], 'confpassword' => $this->data['User']['confpassword'], 'lat' => $clean->sql($this->data['User']['lat']), - 'long' => $clean->sql($this->data['User']['long'])); + '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'] = $temp['email']; $this->data['User']['password'] = $temp['password']; $this->data['User']['confpassword'] = $temp['confpassword']; - $this->data['User']['lat'] = $temp['lat']; - $this->data['User']['long'] = $temp['long']; + $this->data['User']['lat'] = floatval($temp['lat']); + $this->data['User']['long'] = floatval($temp['long']); $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)) { @@ -117,23 +160,28 @@ class UserController extends AppController { 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' => 'Firefox Party ', - 'envelope' => 'noreply@screwedbydesign.com', + 'from' => APP_NAME.' <'.APP_EMAIL.'>', + 'envelope' => APP_EMAIL, 'to' => $this->data['User']['email'], - 'subject' => 'Your Firefox Party Registration', - 'message' => "You're almost ready to party! Just go to http://screwedbydesign.com/cake/user/activate/".$key." to activate your account."); - + '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->render(); @@ -157,7 +205,7 @@ class UserController extends AppController { function activate($aKey = null) { if ($aKey == null) $this->redirect('/'); - + else { $this->data = $this->User->findByActive($aKey); $this->data['User']['active'] = 1; @@ -167,28 +215,29 @@ class UserController extends AppController { } } } - + function login($isNew = null) { - if ($this->Session->check('User')) { + if (isset($_SESSION['User'])) { $this->redirect('/user/'); } - + + $this->pageTitle = APP_NAME." - Login"; $this->set('error', false); - + if ($isNew !== null) { switch($isNew) { case "new": $this->set('preamble', 'Thank you for registering! To login, you\'ll need to activate your account. Please check your email for your activation link.'); break; - + case "rnew": $this->set('preamble', 'An email with instructions on how to reset your password has been sent.'); break; - + case "active": $this->set('preamble', 'Your account has been activated. You may now login.'); break; - + case "reset": $this->set('preamble', 'Your password has been reset.'); break; @@ -198,7 +247,7 @@ class UserController extends AppController { if (!empty($this->data)) { $user = $this->User->findByEmail($this->data['User']['email']); - + if ($user['User']['active'] != 1) { $this->set('preamble', 'Your account hasn\'t been activated yet. Please check your email (including junk/spam folders) for your @@ -206,26 +255,27 @@ class UserController extends AppController { to resend your activation details.'); $this->render(); } - + 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/'); } - + else { $this->set('error', true); } } } - + function logout() { $this->Session->delete('User'); $this->redirect('/'); } - + function recover($aType = null, $aCode = null, $aId = null) { switch ($aType) { case "password": + $this->pageTitle = APP_NAME." - Password Recovery"; $this->set('hideInput', false); $this->set('url', 'password'); if (!empty($this->data)) { @@ -237,34 +287,35 @@ class UserController extends AppController { } else { $code = md5($user['User']['salt'].$user['User']['email'].$user['User']['password']); - $message = array('from' => APP_NAME.'<'.APP_EMAIL.'>', + $message = array('from' => APP_NAME.'<'.APP_EMAIL.'>', 'envelope' => APP_EMAIL, 'to' => $user['User']['email'], 'subject' => APP_NAME.' Password Request', - 'message' => "Just go to http://screwedbydesign.com/cake/user/recover/password/".$code."/".$user['User']['id']." to reset your password."); - + 'link' => APP_BASE.'/user/recover/password/'.$code.'/'.$user['User']['id'], + 'type' => 'prec'); + $mail = new mail($message); $mail->send(); $this->redirect('user/login/rnew'); } } - + if ($aCode !== null && $aId !== null) { $this->set('hideInput', true); $this->set('reset', false); $user = $this->User->findById($aId); - + if (!$user) { $this->set('error', 'Invalid request. Please check the URL and try again.'); $this->render(); } - + if ($aCode == md5($user['User']['salt'].$user['User']['email'].$user['User']['password'])) { $this->set('reset', true); $this->set('code', $aCode."/".$aId); $this->render(); } - + else { $this->set('error', 'Invalid request. Please check the URL and try again.'); $this->render(); @@ -272,9 +323,10 @@ class UserController extends AppController { } break; case "activate": + $this->pageTitle = APP_NAME." - Resend Activation Code"; $this->set('hideInput', false); $this->set('url', 'activate'); - + if (!empty($this->data)) { $user = $this->User->findByEmail($this->data['User']['email']); @@ -282,17 +334,17 @@ class UserController extends AppController { $this->set('error', 'Could not find a user with that email address. Please check it and try again.'); $this->render(); } - + if ($user['User']['active'] == 1) $this->redirect('/user/login/active'); - + else { - $message = array('from' => 'Firefox Party ', - 'envelope' => 'noreply@screwedbydesign.com', - 'to' => $user['User']['email'], - 'subject' => 'Your Firefox Party Registration', - 'message' => "You're almost ready to party! Just go to http://screwedbydesign.com/cake/user/activate/".$user['User']['active']." to activate your account."); - + $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/'.$user['User']['active'], + 'type' => 'act'); $mail = new mail($message); $mail->send(); $this->redirect('user/login/new'); @@ -307,7 +359,7 @@ class UserController extends AppController { $this->set('error', 'Invalid request. Please check the URL and try again.'); $this->render(); } - + if ($aCode == md5($user['User']['salt'].$user['User']['email'].$user['User']['password'])) { $string = $user['User']['email'] . uniqid(rand(), true) . $this->data['User']['password']; $this->data['User']['salt'] = substr(md5($string), 0, 9); @@ -323,7 +375,7 @@ class UserController extends AppController { $this->redirect('/'); } } - + function delete($id) { $role = $this->Session->read('User'); if ($role['role'] != 2) diff --git a/webtools/partytool/models/party.php b/webtools/partytool/models/party.php index c57fc78ea888..c48f9a0cad2e 100755 --- a/webtools/partytool/models/party.php +++ b/webtools/partytool/models/party.php @@ -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 @@ -38,7 +38,8 @@ class Party extends AppModel { var $name = 'Party'; var $validate = array( - 'name' => VALID_NOT_EMPTY + 'name' => VALID_NOT_EMPTY, + 'einvite' => VALID_EMAIL ); function getComments($pid) { @@ -53,7 +54,7 @@ class Party extends AppModel { function getUserName($uid) { $rv = $this->query("SELECT name FROM users WHERE id = ".$uid); - return $rv[0]['users']['name']; + return @$rv[0]['users']['name']; } } ?> \ No newline at end of file diff --git a/webtools/partytool/models/user.php b/webtools/partytool/models/user.php index f82333cf0b3f..65f8c358e88c 100755 --- a/webtools/partytool/models/user.php +++ b/webtools/partytool/models/user.php @@ -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 @@ -51,5 +51,31 @@ class User extends AppModel { $parties = $this->query("SELECT id,name FROM parties WHERE owner = ".$uid); return $parties; } + + function getPartyId($icode) { + $party = $this->query("SELECT id FROM parties WHERE invitecode = \"".$icode."\""); + + if (!empty($party)) + return $party[0]['parties']['id']; + } + + function addToParty($icode, $uid) { + $party = $this->query("SELECT id,guests FROM parties WHERE invitecode = \"".$icode."\""); + + if (!empty($party[0]['parties']['id'])) { + $guests = $party[0]['parties']['guests']; + + if (empty($guests)) { + $guests = $uid; + } + else { + $temp = explode(',', $guests); + array_push($temp, $uid); + $guests = implode(',', $temp); + } + + $this->query("UPDATE parties SET guests = \"".$guests."\" WHERE id = ".$party[0]['parties']['id']); + } + } } ?> \ No newline at end of file diff --git a/webtools/partytool/vendors/mail.php b/webtools/partytool/vendors/mail.php index f3c1b17608f6..7542e9da128d 100755 --- a/webtools/partytool/vendors/mail.php +++ b/webtools/partytool/vendors/mail.php @@ -5,25 +5,41 @@ class mail { var $subject; var $message; var $envelope; - - /** - * Everything coming in via $params should be validated already - */ + var $head = "Firefox Party!
"; + var $foot; + + function mail($params) { - if (array_key_exists('from', $params)) { + if (array_key_exists('from', $params)) $this->from = $params['from']; - } - if (array_key_exists('to', $params)) { + + if (array_key_exists('to', $params)) $this->to = $params['to']; - } - if (array_key_exists('subject', $params)) { + + if (array_key_exists('subject', $params)) $this->subject = $params['subject']; - } - if (array_key_exists('message', $params)) { + + if (array_key_exists('message', $params)) $this->message = $params['message']; - } - if (array_key_exists('envelope', $params)) { + + if (array_key_exists('envelope', $params)) $this->envelope = $params['envelope']; + + if (array_key_exists('type', $params)) { + switch($params['type']) { + case "act": + $this->message = $this->head."
\nThank you for registering! To activate your account click here, or paste the link below into your browser
".$params['link'].$this->foot; + break; + + case "prec": + $this->message = $this->head."
\nTo reset your password click here, or paste the link below into your browser
".$params['link'].$this->foot; + break; + + case "invite": + $this->message = $this->head."
\nYou've been invited by a friend to join them in celebrating the release of Firefox 2. To join them, just click here and sign up for an account.\n + If you're unable to use the link above, simply paste the following URL into your browser: ".$params['link'].$this->foot; + break; + } } } diff --git a/webtools/partytool/vendors/webServices.php b/webtools/partytool/vendors/webServices.php index a61fe2af9e99..12e02b86af8d 100755 --- a/webtools/partytool/vendors/webServices.php +++ b/webtools/partytool/vendors/webServices.php @@ -74,6 +74,10 @@ class webServices { } } + function getFlickrId() { + 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"; $head .= "Host: ".$this->host."\r\n"; diff --git a/webtools/partytool/views/layouts/default.thtml b/webtools/partytool/views/layouts/default.thtml index 59570a79e737..457fbca19f23 100755 --- a/webtools/partytool/views/layouts/default.thtml +++ b/webtools/partytool/views/layouts/default.thtml @@ -1,3 +1,5 @@ +'; ?> + diff --git a/webtools/partytool/views/pages/display.thtml b/webtools/partytool/views/pages/display.thtml index 558ac531bbae..e2e8881edcab 100755 --- a/webtools/partytool/views/pages/display.thtml +++ b/webtools/partytool/views/pages/display.thtml @@ -1,8 +1,9 @@
-
+echo "and ".$days_left." days until Firefox 2!"; ?>
@@ -18,6 +19,6 @@ Maecenas varius massa sit amet nulla. Nunc sit amet mauris. Nunc eu purus a sapi
  • View all parties
  • Register
  • Create a party
  • -
      +
    \ No newline at end of file diff --git a/webtools/partytool/views/party/edit.thtml b/webtools/partytool/views/party/edit.thtml index e69de29bb2d1..e25666f00965 100755 --- a/webtools/partytool/views/party/edit.thtml +++ b/webtools/partytool/views/party/edit.thtml @@ -0,0 +1,124 @@ +
    + hidden('Party/id'); ?> +
    +

    Details

    +
    + + input('Party/name', array('size' => 35)); ?> +
    +
    + + input('Party/vname', array('size' => 35)); ?> +
    +
    + + input('Party/website', array('size' => 35)); ?> +
    +
    + + input('Party/address', array('size' => 35, 'id' => 'location', 'onkeypress' => 'capture(event)', 'onblur' => 'update()')); ?> + +
    + + + + +
    + +
    +
    +
    + Additional notes:
    + textarea('Party/notes'); ?> +
    +
    +

    Date

    +
    + + yearOptionTag('Party/year', null, date('Y'), MAX_YEAR, date('Y'), null, null, false); ?>-hourOptionTag('Party/month', null, false, date('m')); ?>-dayOptionTag('Party/day', null, date('d'), null, false); ?> +
    +
    + + hourOptionTag('Party/hour', null, true);?>:minuteOptionTag('Party/minute');?> + radio('Party/confirmed', array(0 => 'Tentative', 1 => 'Confirmed')); ?> +
    +
    + + +
    +
    +

    flickr integration

    +
    +

    To show photos of your party, simply tag them with and fill out the information below.

    + + checkbox('Party/useflickr'); ?>
    + + radio('Party/flickruse', array(0 => 'Only my photos', 1 => 'Anyone\'s photos')); ?>
    + + input('Party/flickrusr', array('size' => 35)); ?> +
    +
    +

    Privacy

    +
    + + checkbox('Party/inviteonly'); ?>
    + + checkbox('Party/guestsonly'); ?>
    + + checkbox('Party/guestcomments'); ?>
    +
    + 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)); ?> + + submit('Update'); ?> +
    \ No newline at end of file diff --git a/webtools/partytool/views/party/register.thtml b/webtools/partytool/views/party/register.thtml index 3706f5b1cfaf..bd1e5ccce9bb 100755 --- a/webtools/partytool/views/party/register.thtml +++ b/webtools/partytool/views/party/register.thtml @@ -22,7 +22,35 @@
    hourOptionTag('Party/hour', null, true);?>:minuteOptionTag('Party/minute');?> - radio('Party/confirmed', array(0 => 'Tentative', 1 => 'Confirmed')); ?> + radio('Party/confirmed', array(0 => 'Tentative', 1 => 'Confirmed')); ?>
    + +
    diff --git a/webtools/partytool/views/party/view.thtml b/webtools/partytool/views/party/view.thtml index 15ef4e5c1c6f..051e2b77e70b 100755 --- a/webtools/partytool/views/party/view.thtml +++ b/webtools/partytool/views/party/view.thtml @@ -9,7 +9,7 @@ if (!empty($party['Party']['vname'])) echo 'Venue: '.$party['Party']['vname']."
    \n"; - echo 'Date: '.(($party['Party']['confirmed'] == 1) ? date('Y-m-d h:m', $party['Party']['date']) : "TBA")."
    \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")."
    \n"; if (!empty($party['Party']['website'])) echo 'Website: '.$party['Party']['website']."
    \n"; @@ -22,17 +22,24 @@ type="text/javascript">
    -

    Who's coming:

    +

    Who's coming

    - +

    @@ -42,16 +49,21 @@
    + +

    Party options

    + Edit party + Invite a guest + -

    Photos:

    +

    Photos

    ">"/>
    -

    Comments:

    +

    Comments

    -

    Posted by on
    +
    +
    Posted by + on +
    -

    Add a comment:

    +

    Add a comment

    textarea('Comment/text', array('rows' => 10, 'cols' => 50))."
    ".$html->submit('Submit'); ?> @@ -93,7 +108,7 @@ if (!empty($party['Party']['vname'])) echo 'Venue: '.$party['Party']['vname']."
    \n"; - echo 'Date: '.(($party['Party']['confirmed'] == 1) ? date('Y-m-d h:m', $party['Party']['date']) : "TBA")."
    \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")."
    \n"; if (!empty($party['Party']['website'])) echo 'Website: '.$party['Party']['website']."
    \n"; @@ -102,7 +117,7 @@ ?>
    - url('/party/view/all/'.$prev).'">Previous Page '; if (isset($next)) diff --git a/webtools/partytool/views/user/edit.thtml b/webtools/partytool/views/user/edit.thtml index d4f4e8f25fba..3b4abdcbafc5 100755 --- a/webtools/partytool/views/user/edit.thtml +++ b/webtools/partytool/views/user/edit.thtml @@ -1,23 +1,21 @@

    There was an error in your submission, please try again.

    - + + hidden('User/id'); ?>
    +

    Profile

    +
    - input('User/name', array('size' => 20, 'value' => $user['User']['name'])); ?> -
    -
    - - password('User/password', array('size' => 20)); ?> - tagErrorMsg('User/password', 'Passwords don\'t match!')?> + input('User/name', array('size' => 20)); ?>
    - - password('User/confpassword', array('size' => 20)); ?> + + input('User/website', array('size' => 20)); ?>
    - input('User/location', array('id' => 'location', 'size' => 20, 'onkeypress' => 'capture(event)', 'value' => $user['User']['location'])); ?> + input('User/location', array('id' => 'location', 'size' => 20, 'onkeypress' => 'capture(event)')); ?>
    Update map @@ -40,15 +38,34 @@ } //]]> -
    +
    - hidden('User/lat', array('id' => 'lat')); - echo $html->hidden('User/long', array('id' => 'long')); - echo $html->hidden('User/zoom', array('id' => 'zoom')); ?> +

    Privacy

    +
    + + checkbox('User/showemail'); ?>
    + + checkbox('User/showloc'); ?>
    + + checkbox('User/showmap'); ?>
    +
    +

    Password

    +
    + + password('User/password', array('size' => 20)); ?> + tagErrorMsg('User/password', 'Passwords don\'t match!')?> +
    +
    + + password('User/confpassword', array('size' => 20)); ?> +
    + hidden('User/lat', array('id' => 'lat')); + echo $html->hidden('User/long', array('id' => 'long')); + echo $html->hidden('User/zoom', array('id' => 'zoom')); ?> submit('Update'); ?> \ No newline at end of file diff --git a/webtools/partytool/views/user/register.thtml b/webtools/partytool/views/user/register.thtml index 2c045cc8db19..c158cf5ebc71 100755 --- a/webtools/partytool/views/user/register.thtml +++ b/webtools/partytool/views/user/register.thtml @@ -24,6 +24,36 @@ input('User/location', array('id' => 'location', 'size' => 20, 'onkeypress' => 'capture(event)')); ?>
    +
    + + +
    input('User/website', array('size' => 20)); ?> @@ -56,7 +86,8 @@
    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/zoom', array('id' => 'zoom')); + echo $html->hidden('User/icode', array('value' => $icode)); ?>
    submit('Register'); ?> diff --git a/webtools/partytool/views/user/view.thtml b/webtools/partytool/views/user/view.thtml index 64f985f4e3e7..2126cd5f504b 100755 --- a/webtools/partytool/views/user/view.thtml +++ b/webtools/partytool/views/user/view.thtml @@ -11,13 +11,28 @@ if (!empty($user['User']['website'])) echo 'Website: '.$user['User']['website'].'
    '; - echo "Attending: "; - $c = count($parties) - 1; - $i = 0; - foreach ($parties as $party) { - echo ''.$party['parties']['name'].''; - echo ($i < $c) ? ', ' : ''; - $i++; + if (!empty($parties)) { + echo "Attending: "; + $c = count($parties) - 1; + $i = 0; + + foreach ($parties as $party) { + echo ''.$party['parties']['name'].''; + echo ($i < $c) ? ', ' : '
    '; + $i++; + } + } + + if (!empty($hparties)) { + echo "Host of: "; + $c = count($hparties) - 1; + $i = 0; + + foreach ($hparties as $party) { + echo ''.$party['parties']['name'].''; + echo ($i < $c) ? ', ' : '
    '; + $i++; + } } ?> diff --git a/webtools/partytool/webroot/.htaccess b/webtools/partytool/webroot/.htaccess index 0e0ecab7d2e9..f9d8b938bdbe 100755 --- a/webtools/partytool/webroot/.htaccess +++ b/webtools/partytool/webroot/.htaccess @@ -3,4 +3,4 @@ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] - + \ No newline at end of file diff --git a/webtools/partytool/webroot/css.php b/webtools/partytool/webroot/css.php index 0a5a7c6e92b6..711a84cb8b21 100755 --- a/webtools/partytool/webroot/css.php +++ b/webtools/partytool/webroot/css.php @@ -1,104 +1,104 @@ - - * Copyright (c) 2006, Cake Software Foundation, Inc. - * 1785 E. Sahara Avenue, Suite 490-204 - * Las Vegas, Nevada 89104 - * - * Licensed under The MIT License - * Redistributions of files must retain the above copyright notice. - * - * @filesource - * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project - * @package cake - * @subpackage cake.app.webroot - * @since CakePHP v 0.2.9 - * @version $Revision: 1.1 $ - * @modifiedby $LastChangedBy: phpnut $ - * @lastmodified $Date: 2006/09/11 05:56:11 $ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License - */ -if (!defined(CAKE_CORE_INCLUDE_PATH)) { - die('You can not access this file directly'); -} -/** - * Enter description here... - */ - require(CONFIGS . 'paths.php'); - require(CAKE . 'basics.php'); - require(LIBS . 'folder.php'); - require(LIBS . 'file.php'); - require(LIBS . 'legacy.php'); -/** - * Enter description here... - * - * @param unknown_type $path - * @param unknown_type $name - * @return unknown - */ - function make_clean_css($path, $name) { - require(VENDORS . 'csspp' . DS . 'csspp.php'); - $data =file_get_contents($path); - $csspp =new csspp(); - $output=$csspp->compress($data); - $ratio =100 - (round(strlen($output) / strlen($data), 3) * 100); - $output=" /* file: $name, ratio: $ratio% */ " . $output; - return $output; - } -/** - * Enter description here... - * - * @param unknown_type $path - * @param unknown_type $content - * @return unknown - */ - function write_css_cache($path, $content) { - if (!is_dir(dirname($path))) { - mkdir(dirname($path)); - } - $cache=new File($path); - return $cache->write($content); - } - - if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) { - die('Wrong file name.'); - } - - $filename = 'css/' . $regs[1]; - $filepath = CSS . $regs[1]; - $cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]); - - if (!file_exists($filepath)) { - die('Wrong file name.'); - } - - if (file_exists($cachepath)) { - $templateModified=filemtime($filepath); - $cacheModified =filemtime($cachepath); - - if ($templateModified > $cacheModified) { - $output=make_clean_css($filepath, $filename); - write_css_cache($cachepath, $output); - } else { - $output = file_get_contents($cachepath); - } - } else { - $output=make_clean_css($filepath, $filename); - write_css_cache($cachepath, $output); - } - - header("Date: " . date("D, j M Y G:i:s ", $templateModified) . 'GMT'); - header("Content-Type: text/css"); - header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT"); - header("Cache-Control: cache"); // HTTP/1.1 - header("Pragma: cache"); // HTTP/1.0 - print $output; + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP v 0.2.9 + * @version $Revision: 1.3 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006/09/28 03:22:10 $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +if (!defined(CAKE_CORE_INCLUDE_PATH)) { + die('You can not access this file directly'); +} +/** + * Enter description here... + */ + require(CONFIGS . 'paths.php'); + require(CAKE . 'basics.php'); + require(LIBS . 'folder.php'); + require(LIBS . 'file.php'); + require(LIBS . 'legacy.php'); +/** + * Enter description here... + * + * @param unknown_type $path + * @param unknown_type $name + * @return unknown + */ + function make_clean_css($path, $name) { + require(VENDORS . 'csspp' . DS . 'csspp.php'); + $data =file_get_contents($path); + $csspp =new csspp(); + $output=$csspp->compress($data); + $ratio =100 - (round(strlen($output) / strlen($data), 3) * 100); + $output=" /* file: $name, ratio: $ratio% */ " . $output; + return $output; + } +/** + * Enter description here... + * + * @param unknown_type $path + * @param unknown_type $content + * @return unknown + */ + function write_css_cache($path, $content) { + if (!is_dir(dirname($path))) { + mkdir(dirname($path)); + } + $cache=new File($path); + return $cache->write($content); + } + + if (preg_match('|\.\.|', $url) || !preg_match('|^ccss/(.+)$|i', $url, $regs)) { + die('Wrong file name.'); + } + + $filename = 'css/' . $regs[1]; + $filepath = CSS . $regs[1]; + $cachepath = CACHE . 'css' . DS . str_replace(array('/','\\'), '-', $regs[1]); + + if (!file_exists($filepath)) { + die('Wrong file name.'); + } + + if (file_exists($cachepath)) { + $templateModified=filemtime($filepath); + $cacheModified =filemtime($cachepath); + + if ($templateModified > $cacheModified) { + $output=make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + } else { + $output = file_get_contents($cachepath); + } + } else { + $output=make_clean_css($filepath, $filename); + write_css_cache($cachepath, $output); + } + + header("Date: " . date("D, j M Y G:i:s ", $templateModified) . 'GMT'); + header("Content-Type: text/css"); + header("Expires: " . gmdate("D, j M Y H:i:s", time() + DAY) . " GMT"); + header("Cache-Control: cache"); // HTTP/1.1 + header("Pragma: cache"); // HTTP/1.0 + print $output; ?> \ No newline at end of file diff --git a/webtools/partytool/webroot/css/main.css b/webtools/partytool/webroot/css/main.css index ef5c896a5d90..a32ed2d97f78 100755 --- a/webtools/partytool/webroot/css/main.css +++ b/webtools/partytool/webroot/css/main.css @@ -1,74 +1,81 @@ -.error { - background: #ffa5a5; - border: 1px solid red; - text-align: center; - font-weight: bold; - padding: 5px; - margin: 5px 0 5px 0; -} - -.info { - background: #fffe94; - border: 1px solid yellow; - text-align: center; - font-weight: bold; - padding: 5px; - margin: 5px 0 5px 0; -} - -#user { -position: absolute; -right: 0; -} - -img { border: 1px solid #555 } - -body { - background: #fff url("/cake/img/body_back.png") top repeat-x; - color: #555; - font-family: arial, sans-serif; - margin: 0 10px; - padding: 0; - font-size: x-small; - voice-family: "\"}\""; - voice-family: inherit; - font-size: small; -} - -a { color: #34518c; text-decoration: none; } -a:hover { text-decoration: underline; } - -#container { - width: 742px; - position: relative; - margin: 0 auto; - padding: 22px 0; -} - -#mozilla-com a { - position: absolute; - top: 0; - left: 0; - display: block; - text-indent: -5000em; - width: 110px; - height: 25px; - text-decoration: none; - background: url("/cake/img/mozilla-org.png") no-repeat; -} - -#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; -} - -#header a { color: white; text-decoration: none; } - -#map { - border: 1px solid #555; +.error, .error_message { + background: #ffa5a5; + border: 1px solid red; + text-align: center; + font-weight: bold; + padding: 5px; + margin: 5px 0 5px 0; +} + +.form_error { + background: #ffa5a5; + border: 1px solid red; +} + +.info { + background: #fffe94; + border: 1px solid yellow; + text-align: center; + font-weight: bold; + padding: 5px; + margin: 5px 0 5px 0; +} + +#user { +position: absolute; +right: 0; +} + +img { border: 1px solid #555 } + +h2 + hr { padding: 0; margin: 0;} + +body { + background: #fff url("/cake/img/body_back.png") top repeat-x; + color: #555; + font-family: arial, sans-serif; + margin: 0 10px; + padding: 0; + font-size: x-small; + voice-family: "\"}\""; + voice-family: inherit; + font-size: small; +} + +a { color: #34518c; text-decoration: none; } +a:hover { text-decoration: underline; } + +#container { + width: 742px; + position: relative; + margin: 0 auto; + padding: 22px 0; +} + +#mozilla-com a { + position: absolute; + top: 0; + left: 0; + display: block; + text-indent: -5000em; + width: 110px; + height: 25px; + text-decoration: none; + background: url("/cake/img/mozilla-org.png") no-repeat; +} + +#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; +} + +#header a { color: white; text-decoration: none; } + +#map { + border: 1px solid #555; } \ No newline at end of file diff --git a/webtools/partytool/webroot/index.php b/webtools/partytool/webroot/index.php index aed4dc325cec..9f2b7bc3dd34 100755 --- a/webtools/partytool/webroot/index.php +++ b/webtools/partytool/webroot/index.php @@ -1,87 +1,87 @@ - - * Copyright (c) 2006, Cake Software Foundation, Inc. - * 1785 E. Sahara Avenue, Suite 490-204 - * Las Vegas, Nevada 89104 - * - * Licensed under The MIT License - * Redistributions of files must retain the above copyright notice. - * - * @filesource - * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project - * @package cake - * @subpackage cake.app.webroot - * @since CakePHP v 0.2.9 - * @version $Revision: 1.1 $ - * @modifiedby $LastChangedBy: phpnut $ - * @lastmodified $Date: 2006/09/11 05:56:11 $ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License - */ -/** - * Do not change - */ - if (!defined('DS')) { - define('DS', DIRECTORY_SEPARATOR); - } -/** - * These defines should only be edited if you have cake installed in - * a directory layout other than the way it is distributed. - * Each define has a commented line of code that explains what you would change. - * - */ - if (!defined('ROOT')) { - //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; - //You should also use the DS define to seperate your directories - define('ROOT', dirname(dirname(dirname(__FILE__)))); - } - if (!defined('APP_DIR')) { - //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION'; - define('APP_DIR', basename(dirname(dirname(__FILE__)))); - } -/** - * This only needs to be changed if the cake installed libs are located - * outside of the distributed directory structure. - */ - if (!defined('CAKE_CORE_INCLUDE_PATH')) { - //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; - //You should also use the DS define to seperate your directories - define('CAKE_CORE_INCLUDE_PATH', ROOT); - } -/////////////////////////////// -//DO NOT EDIT BELOW THIS LINE// -/////////////////////////////// - if (!defined('WEBROOT_DIR')) { - define('WEBROOT_DIR', basename(dirname(__FILE__))); - } - if (!defined('WWW_ROOT')) { - define('WWW_ROOT', dirname(__FILE__) . DS); - } - if (!defined('CORE_PATH')) { - if (function_exists('ini_set')) { - ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS); - define('APP_PATH', null); - define('CORE_PATH', null); - } else { - define('APP_PATH', ROOT . DS . APP_DIR . DS); - define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); - } - } - require CORE_PATH . 'cake' . DS . 'bootstrap.php'; - if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { - } else { - $Dispatcher=new Dispatcher(); - $Dispatcher->dispatch($url); - } - if (DEBUG) { - echo ""; - } + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.webroot + * @since CakePHP v 0.2.9 + * @version $Revision: 1.4 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006/10/08 03:39:23 $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Do not change + */ + if (!defined('DS')) { + define('DS', DIRECTORY_SEPARATOR); + } +/** + * These defines should only be edited if you have cake installed in + * a directory layout other than the way it is distributed. + * Each define has a commented line of code that explains what you would change. + * + */ + if (!defined('ROOT')) { + //define('ROOT', 'FULL PATH TO DIRECTORY WHERE APP DIRECTORY IS LOCATED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; + //You should also use the DS define to seperate your directories + define('ROOT', dirname(dirname(dirname(__FILE__)))); + } + if (!defined('APP_DIR')) { + //define('APP_DIR', 'DIRECTORY NAME OF APPLICATION'; + define('APP_DIR', basename(dirname(dirname(__FILE__)))); + } +/** + * This only needs to be changed if the cake installed libs are located + * outside of the distributed directory structure. + */ + if (!defined('CAKE_CORE_INCLUDE_PATH')) { + //define ('CAKE_CORE_INCLUDE_PATH', FULL PATH TO DIRECTORY WHERE CAKE CORE IS INSTALLED DO NOT ADD A TRAILING DIRECTORY SEPARATOR'; + //You should also use the DS define to seperate your directories + define('CAKE_CORE_INCLUDE_PATH', ROOT); + } +/////////////////////////////// +//DO NOT EDIT BELOW THIS LINE// +/////////////////////////////// + if (!defined('WEBROOT_DIR')) { + define('WEBROOT_DIR', basename(dirname(__FILE__))); + } + if (!defined('WWW_ROOT')) { + define('WWW_ROOT', dirname(__FILE__) . DS); + } + if (!defined('CORE_PATH')) { + if (function_exists('ini_set')) { + ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . CAKE_CORE_INCLUDE_PATH . PATH_SEPARATOR . ROOT . DS . APP_DIR . DS); + define('APP_PATH', null); + define('CORE_PATH', null); + } else { + define('APP_PATH', ROOT . DS . APP_DIR . DS); + define('CORE_PATH', CAKE_CORE_INCLUDE_PATH . DS); + } + } + require CORE_PATH . 'cake' . DS . 'bootstrap.php'; + if (isset($_GET['url']) && $_GET['url'] === 'favicon.ico') { + } else { + $Dispatcher=new Dispatcher(); + $Dispatcher->dispatch($url); + } + if (DEBUG) { + echo ""; + } ?> \ No newline at end of file diff --git a/webtools/partytool/webroot/js/vendors.php b/webtools/partytool/webroot/js/vendors.php index 840ff7771bef..7b1c93432f13 100755 --- a/webtools/partytool/webroot/js/vendors.php +++ b/webtools/partytool/webroot/js/vendors.php @@ -1,36 +1,36 @@ - - * Copyright (c) 2006, Cake Software Foundation, Inc. - * 1785 E. Sahara Avenue, Suite 490-204 - * Las Vegas, Nevada 89104 - * - * Licensed under The MIT License - * Redistributions of files must retain the above copyright notice. - * - * @filesource - * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. - * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project - * @package cake - * @subpackage cake.app.webroot.js - * @since CakePHP v 0.2.9 - * @version $Revision: 1.1 $ - * @modifiedby $LastChangedBy: phpnut $ - * @lastmodified $Date: 2006/09/11 05:56:11 $ - * @license http://www.opensource.org/licenses/mit-license.php The MIT License - */ -/** - * Enter description here... - */ - if (is_file('../../vendors/javascript/' . $_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file']))) { - readfile('../../vendors/javascript/' . $_GET['file']); - } -?> + + * Copyright (c) 2006, Cake Software Foundation, Inc. + * 1785 E. Sahara Avenue, Suite 490-204 + * Las Vegas, Nevada 89104 + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @filesource + * @copyright Copyright (c) 2006, Cake Software Foundation, Inc. + * @link http://www.cakefoundation.org/projects/info/cakephp CakePHP Project + * @package cake + * @subpackage cake.app.webroot.js + * @since CakePHP v 0.2.9 + * @version $Revision: 1.3 $ + * @modifiedby $LastChangedBy: phpnut $ + * @lastmodified $Date: 2006/09/28 03:22:10 $ + * @license http://www.opensource.org/licenses/mit-license.php The MIT License + */ +/** + * Enter description here... + */ + if (is_file('../../vendors/javascript/' . $_GET['file']) && (preg_match('/(.+)\\.js/', $_GET['file']))) { + readfile('../../vendors/javascript/' . $_GET['file']); + } +?>