/** * retrieves value(s) for one setting * * may be called statically * * @param int $userId * @param string $setting * @return stdClass */ public static function getSetting($userId, $setting) { $c = self::get(); if (self::loggedIn() && $userId == $c->getId() && isset($c->_settings)) { if (isset($c->_settings[$setting])) { return $c->_settings[$setting]; } } $query = ' SELECT `value`, `valueint`, `valuedate` FROM `user_settings` WHERE `user_id` = ' . (int) $userId . ' AND `setting` = \'' . $c->dao->escape($setting) . '\' '; $s = $c->dao->query($query); if ($s->numRows() == 0) { return false; } $d = $s->fetch(PDB::FETCH_OBJ); if (self::loggedIn() && $userId == self::$_instance->getId()) { $c->_settings->{$setting} = $d; } return $d; }
$vars = PPostHandler::getVars($callbackId); ?> <form method="post" action="gallery/create/finished" class="def-form" id="gallery-create-form"> <input type="hidden" name="<?php echo $callbackId; ?> " value="1"/> <p class="small"> <img src="images/icons/add.png" class="float_left"> <?php echo $words->get('GalleryCreateNewPhotoset'); ?> <input type="hidden" name="new" id="newGallery" value="1"> <input name="g-user" type="hidden" value="<?php echo $User->getId(); ?> "> <input name="g-title" type="text" size="20" maxlength="30"> <input type="submit" name="button" value="<?php echo $words->getBuffered('Create'); ?> " id="button" /> </p> </form> <?php } elseif ($type == 'gallery') { /* /* If the controls handle images within a gallery