*
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 *
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @package
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
if (!PHPWS_Settings::get('properties', 'roommate_only')) {
    if (PHPWS_Core::atHome()) {
        PHPWS_Core::initModClass('properties', 'User.php');
        $user = new Properties\User();
        $user->searchPanel();
        $user->propertyListing();
    }
    if (isset($_SESSION['Contact_User'])) {
        $_SESSION['Contact_User']->loginMenu();
    } else {
        require_once PHPWS_SOURCE_DIR . 'mod/properties/class/Contact_User.php';
        $form = \Properties\Contact_User::contactForm();
        $tpl = $form->getTemplate();
        $content = PHPWS_Template::process($tpl, 'properties', 'clogin.tpl');
        Layout::add($content, 'properties', 'contact_login');
    }
}
purgeProperties();
function purgeProperties()
Exemple #2
0
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
if (isset($_REQUEST['aop'])) {
    if (!Current_User::allow('properties')) {
        Current_User::disallow('Action not allowed');
    }
    PHPWS_Core::initModClass('properties', 'Admin.php');
    $admin = new Properties\Admin();
    if (isset($_GET['aop'])) {
        $admin->get();
    } elseif (isset($_POST['aop'])) {
        $admin->post();
    }
} elseif (isset($_REQUEST['uop'])) {
    PHPWS_Core::initModClass('properties', 'User.php');
    $user = new Properties\User();
    if (isset($_GET['uop'])) {
        $user->get();
    } elseif (isset($_POST['uop'])) {
        $user->post();
    }
} elseif (isset($_REQUEST['rop'])) {
    if (!Current_User::isLogged()) {
        PHPWS_Core::reroute(propertiesloginLink());
    }
    PHPWS_Core::initModClass('properties', 'Roommate_User.php');
    $roommate = new Properties\Roommate_User();
    if ($_SESSION['properties_user_checked']) {
        $roommate->denyAccess();
    } else {
        if (isset($_GET['rop'])) {