<?php

/******************************************************************************
 *
 *	PROJECT: Flynax Classifieds Software
 *	VERSION: 4.X
 *	LICENSE: FL4HLD2A8696 - http://www.flynax.com/license-agreement.html
 *	PRODUCT: Real Estate Agency
 *	DOMAIN: gevimmo.com
 *	FILE: RLINSTALL.CLASS.PHP
 *
 *	The software is a commercial product delivered under single, non-exclusive,
 *	non-transferable license for one domain or IP address. Therefore distribution,
 *	sale or transfer of the file in whole or in part without permission of Flynax
 *	respective owners is considered to be illegal and breach of Flynax License End
 *	User Agreement.
 *
 *	You are not allowed to remove this information from the file without permission
 *	of Flynax respective owners.
 *
 *	Flynax Classifieds Software 2017 |  All copyrights reserved.
 *
 *	http://www.flynax.com/
 *
 ******************************************************************************/

class rlInstall extends reefless
{
    /**
    * class object
    * 
    * @var $rlActions
    */
    protected $rlActions;

    /**
    * class contructor
    * 
    */
    public function __construct()
    {
        $this->loadClass('Actions');
        $this->rlActions = &$GLOBALS['rlActions'];
    }
    
    /**
    * install plugin
    * 
    */
    public function install()
    {
        $sql = "ALTER TABLE `". RL_DBPREFIX ."accounts` ADD `smsActivation` ENUM( '0', '1' ) DEFAULT '0' NOT NULL AFTER `Status`";
        $this->query($sql);

        $sql = "ALTER TABLE `". RL_DBPREFIX ."accounts` ADD `smsActivation_code` varchar(15) NOT NULL AFTER `smsActivation`";
        $this->query($sql);
    }
    
    /**
    * uninstall plugin
    * 
    */
    public function uninstall()
    {
        $sql = "ALTER TABLE `". RL_DBPREFIX ."accounts` DROP `smsActivation`";
        $this->query($sql);

        $sql = "ALTER TABLE `". RL_DBPREFIX ."accounts` DROP `smsActivation_code`";
        $this->query($sql);
    }
}