The blog you are looking for cannot be found.
phpFox Developers Debug Toggle JavaScript Console
Version:
3.4.0
Product Code Name:
Nebula

Total Time:
0.1120670
PHP General Time:
0.1087142
GZIP:
enabled

Driver Version:
MySQL 5.1.73-cll
SQL Time:
0.0033528
SQL Queries:
7
SQL Memory Usage:
10.06 kb
SQL Slave Enabled:
No
SQL Total Slaves:
N/A
SQL Slave Server:
N/A

Total Memory Usage:
5.87 Mb
Total Memory Usage (Including Debug):
5.9 Mb
Memory Limit:
32 Mb (64M)

Load Balancing Enabled:
No
Requests From:
46.32.233.9


Server Time Stamp:
April 20, 2014, 2:13 pm
PHP Version:
5.4.24
PHP Sapi:
cgi-fcgi
PHP safe_mode:
false
PHP open_basedir:
false
Operating System:
Linux

Cache:
file
Debug History

			
Log File
$profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } sVideoPath1: /home/shotpage/public_html/file/video/2013/12/b55ad79bbd31d67359ab939e1c049dc4.flv
sVideoPath2: /home/shotpage/public_html/file/video/2013/12/b55ad79bbd31d67359ab939e1c049dc4_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2013/12/b55ad79bbd31d67359ab939e1c049dc4_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2013/12/178672256213884102411766947178_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2013/12/97718806913884102411043437777_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/6450386761388410241255675650.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6450386761388410241255675650_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/14714831131388410241446488605.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/14714831131388410241446488605_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/1694840651388410241202673036.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/1694840651388410241202673036_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/19899688213884102412138649133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/19899688213884102412138649133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/7252417501388410241913677904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/7252417501388410241913677904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/146980013213884102411009293395.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/146980013213884102411009293395_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/214043031013884102412057129822.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/214043031013884102412057129822_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/6450386761388410241255675650.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6450386761388410241255675650_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/14714831131388410241446488605.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/14714831131388410241446488605_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/1694840651388410241202673036.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/1694840651388410241202673036_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/19899688213884102412138649133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/19899688213884102412138649133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/7252417501388410241913677904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/7252417501388410241913677904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/146980013213884102411009293395.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/146980013213884102411009293395_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/214043031013884102412057129822.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/214043031013884102412057129822_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/421171d925aa1ca82877e1dc96a44f73.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/421171d925aa1ca82877e1dc96a44f73_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/421171d925aa1ca82877e1dc96a44f73_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/11954750213886654871522118647_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/157908246413886654861758914741_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/15026121501388665485468965393.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15026121501388665485468965393_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2122676871388665485575675548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2122676871388665485575675548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/50606068013886654851613262078.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/50606068013886654851613262078_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/108874401013886654851014352149.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/108874401013886654851014352149_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3183260011388665485368440075.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3183260011388665485368440075_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/44500209313886654851687755785.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/44500209313886654851687755785_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/67472382013886654851052897979.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/67472382013886654851052897979_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/15026121501388665485468965393.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15026121501388665485468965393_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2122676871388665485575675548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2122676871388665485575675548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/50606068013886654851613262078.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/50606068013886654851613262078_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/108874401013886654851014352149.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/108874401013886654851014352149_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3183260011388665485368440075.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3183260011388665485368440075_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/44500209313886654851687755785.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/44500209313886654851687755785_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/67472382013886654851052897979.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/67472382013886654851052897979_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2013/12/3e784ee982859a23e640c1f44e1f8701.flv
sVideoPath2: /home/shotpage/public_html/file/video/2013/12/3e784ee982859a23e640c1f44e1f8701_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2013/12/3e784ee982859a23e640c1f44e1f8701_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2013/12/58165216413884768981009115659_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2013/12/17990889081388476898369354567_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/16460523751388476898394248546.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/16460523751388476898394248546_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/14459138501388476898664420705.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/14459138501388476898664420705_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/6181995713884768981697301104.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6181995713884768981697301104_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/16547482131388476898531462839.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/16547482131388476898531462839_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/19020707261388476898720936423.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/19020707261388476898720936423_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/21377203331388476898274829327.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/21377203331388476898274829327_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/6717169391388476898283636322.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6717169391388476898283636322_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/16460523751388476898394248546.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/16460523751388476898394248546_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/14459138501388476898664420705.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/14459138501388476898664420705_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/6181995713884768981697301104.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6181995713884768981697301104_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/16547482131388476898531462839.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/16547482131388476898531462839_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/19020707261388476898720936423.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/19020707261388476898720936423_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/21377203331388476898274829327.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/21377203331388476898274829327_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/6717169391388476898283636322.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6717169391388476898283636322_flip.jpg +delete \) null: out: Array code:0
$profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } sVideoPath1: /home/shotpage/public_html/file/video/2014/01/994a60fbe03efc84c2e8cd9f0fed9d57.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/994a60fbe03efc84c2e8cd9f0fed9d57_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/994a60fbe03efc84c2e8cd9f0fed9d57_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/667687581138935414083283097_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/55148916013893541391436897643_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/4650125081389354139298705895.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4650125081389354139298705895_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/145281159213893541392064501494.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/145281159213893541392064501494_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3193129921389354139835640916.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3193129921389354139835640916_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12896822631389354139268768986.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12896822631389354139268768986_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14561806951389354139512730297.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14561806951389354139512730297_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/36210136213893541391623120855.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/36210136213893541391623120855_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19700043161389354139569993857.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19700043161389354139569993857_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/4650125081389354139298705895.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4650125081389354139298705895_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/145281159213893541392064501494.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/145281159213893541392064501494_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3193129921389354139835640916.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3193129921389354139835640916_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12896822631389354139268768986.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12896822631389354139268768986_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14561806951389354139512730297.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14561806951389354139512730297_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/36210136213893541391623120855.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/36210136213893541391623120855_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19700043161389354139569993857.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19700043161389354139569993857_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/0ca96d48822abbdbb832c146d82487a9.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/0ca96d48822abbdbb832c146d82487a9_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/0ca96d48822abbdbb832c146d82487a9_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/2904933081389353924297785631_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/16843593071389353924194361898_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/749856911389353924447575849.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/749856911389353924447575849_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17093876361389353924373001926.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17093876361389353924373001926_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12199329321389353924898267576.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12199329321389353924898267576_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11679195451389353924510922463.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11679195451389353924510922463_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/194580091213893539241000633130.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/194580091213893539241000633130_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/101385186313893539241680368580.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/101385186313893539241680368580_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/202259778713893539241829936293.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/202259778713893539241829936293_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/749856911389353924447575849.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/749856911389353924447575849_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17093876361389353924373001926.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17093876361389353924373001926_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12199329321389353924898267576.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12199329321389353924898267576_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11679195451389353924510922463.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11679195451389353924510922463_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/194580091213893539241000633130.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/194580091213893539241000633130_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/101385186313893539241680368580.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/101385186313893539241680368580_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/202259778713893539241829936293.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/202259778713893539241829936293_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/70e5deb03d84571961b26e7da7c15140.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/70e5deb03d84571961b26e7da7c15140_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/70e5deb03d84571961b26e7da7c15140_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/1209531611389353254768637862_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/199965893413893532532138145345_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/154442097313893532531324486778.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/154442097313893532531324486778_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/55933597313893532531424212408.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/55933597313893532531424212408_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/198202366113893532531320472500.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/198202366113893532531320472500_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20853261951389353253510088580.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20853261951389353253510088580_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/124423522713893532531647287168.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/124423522713893532531647287168_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15824180041389353253795359389.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15824180041389353253795359389_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3402207431389353253445112146.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3402207431389353253445112146_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/154442097313893532531324486778.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/154442097313893532531324486778_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/55933597313893532531424212408.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/55933597313893532531424212408_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/198202366113893532531320472500.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/198202366113893532531320472500_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20853261951389353253510088580.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20853261951389353253510088580_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/124423522713893532531647287168.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/124423522713893532531647287168_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15824180041389353253795359389.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15824180041389353253795359389_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3402207431389353253445112146.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3402207431389353253445112146_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/3933012221389365438114143369_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/102001023013893654371964755562_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2013/12/3f606d84536b4e501ee569ab3520ac11.flv
sVideoPath2: /home/shotpage/public_html/file/video/2013/12/3f606d84536b4e501ee569ab3520ac11_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2013/12/3f606d84536b4e501ee569ab3520ac11_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2013/12/2461637651388410645821623158_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2013/12/81175842513884106451012317373_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/189137906913884106451134444362.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/189137906913884106451134444362_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/20122597981388410645437371305.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/20122597981388410645437371305_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/189435821613884106451338096969.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/189435821613884106451338096969_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/169325846513884106451463388424.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/169325846513884106451463388424_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/35213960013884106452130554616.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/35213960013884106452130554616_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/206392598913884106451512368754.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/206392598913884106451512368754_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/17321820211388410645538956640.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/17321820211388410645538956640_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/189137906913884106451134444362.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/189137906913884106451134444362_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/20122597981388410645437371305.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/20122597981388410645437371305_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/189435821613884106451338096969.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/189435821613884106451338096969_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/169325846513884106451463388424.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/169325846513884106451463388424_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/35213960013884106452130554616.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/35213960013884106452130554616_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/206392598913884106451512368754.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/206392598913884106451512368754_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/17321820211388410645538956640.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/17321820211388410645538956640_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2013/12/20c87300ae9e00e39b10f7bbd4597a4e.flv
sVideoPath2: /home/shotpage/public_html/file/video/2013/12/20c87300ae9e00e39b10f7bbd4597a4e_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2013/12/20c87300ae9e00e39b10f7bbd4597a4e_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2013/12/14931773661388414309550068002_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2013/12/16973409091388414309361535887_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/6135481813884143092015864429.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6135481813884143092015864429_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/71425438313884143091300628498.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/71425438313884143091300628498_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/14580511613884143091514591399.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/14580511613884143091514591399_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/4866911741388414309184418903.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/4866911741388414309184418903_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/97352085513884143091213128554.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/97352085513884143091213128554_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/158487917213884143091554572911.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/158487917213884143091554572911_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/33882455813884143091847385733.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/33882455813884143091847385733_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2013/12/6135481813884143092015864429.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/6135481813884143092015864429_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/71425438313884143091300628498.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/71425438313884143091300628498_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/14580511613884143091514591399.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/14580511613884143091514591399_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/4866911741388414309184418903.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/4866911741388414309184418903_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/97352085513884143091213128554.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/97352085513884143091213128554_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/158487917213884143091554572911.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/158487917213884143091554572911_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2013/12/33882455813884143091847385733.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2013/12/33882455813884143091847385733_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/b9f8d37b87d3de09258927959154d6d4.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/b9f8d37b87d3de09258927959154d6d4_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/b9f8d37b87d3de09258927959154d6d4_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/5416837841389363933697051742_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/38211610413893639331262129965_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/b5a0faf674cc8a673c1ecc2a64fc4ad0.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/b5a0faf674cc8a673c1ecc2a64fc4ad0_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/b5a0faf674cc8a673c1ecc2a64fc4ad0_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/188523381713893652781233905500_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/377365083138936527833960207_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/3933012221389365438114143369_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/102001023013893654371964755562_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/b9f8d37b87d3de09258927959154d6d4.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/b9f8d37b87d3de09258927959154d6d4_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/b9f8d37b87d3de09258927959154d6d4_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/5416837841389363933697051742_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/38211610413893639331262129965_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71583539113893639331827124791_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/82362511813893639332064900797_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/189251887213893639331927215342_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/93058452813893639331138295476_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/710180061389363933627828604_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13162202271389363933286029877_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31493563813893639331524080371_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5905454621389363933273410957_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10985038341389363933813930613_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/176453809313893639331739289519_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138426106213893639331763077475_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/73487589313893639332056851876_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8408563813893639331233335034_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/112773377813893639331679337403_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/33793407913893639331530421541_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172876273613893639331053769470_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12100626851389363933404904206_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9711866191389363933955097909_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18463590013893639331901771148_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/b5a0faf674cc8a673c1ecc2a64fc4ad0.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/b5a0faf674cc8a673c1ecc2a64fc4ad0_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/b5a0faf674cc8a673c1ecc2a64fc4ad0_forward4.flv
out: Array code: 0
out: Array code: 0
out: Array code: 0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/188523381713893652781233905500_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/377365083138936527833960207_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/71601994813893652771199953860_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1122484833138936527751034820_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19058884101389365277942929881_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/113055937313893652771479921952_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9795458481389365277226433698_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/172219130813893652772079295221_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/856540416138936527728929197_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1897585800138936527713740195_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/36838178113893652771187738777_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/199384792813893652771125990477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12488365641389365277499734703_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105515363013893652771060879798_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/160921669013893652771893303706_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79610292213893652771075199570_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4008008921389365277168455620_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/105594533013893652771116820840_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1368409480138936527730946515_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/116785566013893652771126814242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9738763961389365277150931385_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/9206e82c26581bb576711b93b6d66488_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/3933012221389365438114143369_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/102001023013893654371964755562_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17891055071389365437501722933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2531312481389365437888373397_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14189592941389365437731626621_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79747846138936543769797815_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2127455941389365437884680922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6201552341389365437783219250_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12416167871389365437199610474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11882644613893654372056421011_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31955140813893654371941704961_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14602664731389365437394019930_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14781539921389365437260069630_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/158337478913893654371079131566_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1160293548138936543778283880_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138625650713893654371067661488_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/167306985313893654371501603933_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/56006215713893654371314691712_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20033268661389365437813193405_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5558146113893654371274802512_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15448200261389365437135329308_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/15e8f6b121981190d059ad57af7e3e6e.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/15e8f6b121981190d059ad57af7e3e6e_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/15e8f6b121981190d059ad57af7e3e6e_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/20508006471389363521891809782_thumb_flip.jpg
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/65ec67216c24fb99d6e78ec6543a28e4.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/65ec67216c24fb99d6e78ec6543a28e4_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/65ec67216c24fb99d6e78ec6543a28e4_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/49747976413893633142032994030_thumb_flip.jpg
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/f717498d044f2ed9acd01132594a2fe8.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/f717498d044f2ed9acd01132594a2fe8_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/f717498d044f2ed9acd01132594a2fe8_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/209805279713893628621251411097_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/15792557011389362862416998557_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/2112205131389362862779141260.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2112205131389362862779141260_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/106029545513893628621816439645.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/106029545513893628621816439645_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17236577881389362862120171235.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17236577881389362862120171235_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/195419147913893628621342292922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/195419147913893628621342292922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/102378604413893628621001837390.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/102378604413893628621001837390_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1491021706138936286213505889.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1491021706138936286213505889_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1819639043138936286226699851.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1819639043138936286226699851_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17226950741389362862237237481.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17226950741389362862237237481_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1993933601138936286284624813.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1993933601138936286284624813_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/189377053613893628622119202956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/189377053613893628622119202956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/84131330313893628621574334922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/84131330313893628621574334922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/95684722813893628621747722902.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/95684722813893628621747722902_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180676760913893628621747297928.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180676760913893628621747297928_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1445894428138936286262269018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1445894428138936286262269018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/89053397013893628621523335824.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/89053397013893628621523335824_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/202777782113893628621101754483.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/202777782113893628621101754483_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1549934361389362862940589628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1549934361389362862940589628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/77071048013893628621878651225.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/77071048013893628621878651225_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10607608631389362862577418311.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10607608631389362862577418311_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/2112205131389362862779141260.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2112205131389362862779141260_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/106029545513893628621816439645.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/106029545513893628621816439645_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17236577881389362862120171235.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17236577881389362862120171235_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/195419147913893628621342292922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/195419147913893628621342292922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/102378604413893628621001837390.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/102378604413893628621001837390_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1491021706138936286213505889.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1491021706138936286213505889_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1819639043138936286226699851.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1819639043138936286226699851_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17226950741389362862237237481.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17226950741389362862237237481_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1993933601138936286284624813.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1993933601138936286284624813_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/189377053613893628622119202956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/189377053613893628622119202956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/84131330313893628621574334922.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/84131330313893628621574334922_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/95684722813893628621747722902.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/95684722813893628621747722902_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180676760913893628621747297928.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180676760913893628621747297928_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1445894428138936286262269018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1445894428138936286262269018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/89053397013893628621523335824.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/89053397013893628621523335824_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/202777782113893628621101754483.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/202777782113893628621101754483_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1549934361389362862940589628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1549934361389362862940589628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/77071048013893628621878651225.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/77071048013893628621878651225_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10607608631389362862577418311.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10607608631389362862577418311_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/b4d83851465e64b5e24fb37f86176955.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/b4d83851465e64b5e24fb37f86176955_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/b4d83851465e64b5e24fb37f86176955_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/150592558113893622731994186700_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/5833354511389362273590324036_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/122337117413893622731666519148.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/122337117413893622731666519148_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12196047481389362273878028477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12196047481389362273878028477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13269923361389362273659819444.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13269923361389362273659819444_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/116666150313893622731177165249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/116666150313893622731177165249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/213134027513893622731741699802.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/213134027513893622731741699802_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/123414631813893622731776043347.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/123414631813893622731776043347_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/141085124913893622731137405255.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/141085124913893622731137405255_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3974867913893622731251115528.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3974867913893622731251115528_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14820710311389362273608295120.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14820710311389362273608295120_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5525881421389362273402855266.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5525881421389362273402855266_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/210318611713893622731896315781.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/210318611713893622731896315781_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17045611021389362273906328211.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17045611021389362273906328211_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2424242713893622731949271082.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2424242713893622731949271082_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/148873186913893622731847405651.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/148873186913893622731847405651_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/201602543713893622731627951928.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/201602543713893622731627951928_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1408506213893622731091912964.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1408506213893622731091912964_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/114698742813893622731233689810.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/114698742813893622731233689810_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19699414411389362273326496117.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19699414411389362273326496117_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18935092551389362273989119297.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18935092551389362273989119297_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/122337117413893622731666519148.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/122337117413893622731666519148_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12196047481389362273878028477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12196047481389362273878028477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13269923361389362273659819444.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13269923361389362273659819444_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/116666150313893622731177165249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/116666150313893622731177165249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/213134027513893622731741699802.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/213134027513893622731741699802_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/123414631813893622731776043347.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/123414631813893622731776043347_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/141085124913893622731137405255.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/141085124913893622731137405255_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3974867913893622731251115528.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3974867913893622731251115528_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14820710311389362273608295120.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14820710311389362273608295120_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5525881421389362273402855266.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5525881421389362273402855266_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/210318611713893622731896315781.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/210318611713893622731896315781_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17045611021389362273906328211.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17045611021389362273906328211_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/2424242713893622731949271082.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/2424242713893622731949271082_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/148873186913893622731847405651.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/148873186913893622731847405651_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/201602543713893622731627951928.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/201602543713893622731627951928_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1408506213893622731091912964.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1408506213893622731091912964_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/114698742813893622731233689810.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/114698742813893622731233689810_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19699414411389362273326496117.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19699414411389362273326496117_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18935092551389362273989119297.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18935092551389362273989119297_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/373f6ec205dd90db7739ffe3d5c441a8.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/373f6ec205dd90db7739ffe3d5c441a8_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/373f6ec205dd90db7739ffe3d5c441a8_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/125615253113893620342008421197_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/111830780813893620341497750442_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/5634689411389362034543418529.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5634689411389362034543418529_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15410265711389362034686302207.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15410265711389362034686302207_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13296941481389362034525735150.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13296941481389362034525735150_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13533494831389362034178621476.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13533494831389362034178621476_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/72941336313893620341568292657.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/72941336313893620341568292657_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/111557965613893620341229947009.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/111557965613893620341229947009_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/89011338913893620341814575971.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/89011338913893620341814575971_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20684337511389362034488322281.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20684337511389362034488322281_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/509817061389362034353351582.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/509817061389362034353351582_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/72928544913893620341375144490.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/72928544913893620341375144490_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11275304081389362034839347624.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11275304081389362034839347624_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79958985313893620342131483734.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79958985313893620342131483734_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/112740546138936203476536929.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/112740546138936203476536929_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/188756338913893620342088730104.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/188756338913893620342088730104_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12418618161389362034477920279.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12418618161389362034477920279_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/152499773213893620341805330757.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/152499773213893620341805330757_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10213388091389362034918540655.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10213388091389362034918540655_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3441493161389362034203549309.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3441493161389362034203549309_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144427580613893620341697498799.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144427580613893620341697498799_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/5634689411389362034543418529.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5634689411389362034543418529_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15410265711389362034686302207.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15410265711389362034686302207_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13296941481389362034525735150.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13296941481389362034525735150_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13533494831389362034178621476.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13533494831389362034178621476_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/72941336313893620341568292657.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/72941336313893620341568292657_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/111557965613893620341229947009.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/111557965613893620341229947009_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/89011338913893620341814575971.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/89011338913893620341814575971_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20684337511389362034488322281.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20684337511389362034488322281_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/509817061389362034353351582.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/509817061389362034353351582_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/72928544913893620341375144490.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/72928544913893620341375144490_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11275304081389362034839347624.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11275304081389362034839347624_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/79958985313893620342131483734.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/79958985313893620342131483734_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/112740546138936203476536929.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/112740546138936203476536929_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/188756338913893620342088730104.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/188756338913893620342088730104_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12418618161389362034477920279.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12418618161389362034477920279_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/152499773213893620341805330757.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/152499773213893620341805330757_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10213388091389362034918540655.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10213388091389362034918540655_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3441493161389362034203549309.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3441493161389362034203549309_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144427580613893620341697498799.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144427580613893620341697498799_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/f6e7196328c5ff8482225ce067489a79.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/f6e7196328c5ff8482225ce067489a79_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/f6e7196328c5ff8482225ce067489a79_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/43627704813893564751627807431_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/24356251413893564751282351408_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/209758075413893564731972000010.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209758075413893564731972000010_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1107540313893564731606819391.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1107540313893564731606819391_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/93573999513893564731250924481.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/93573999513893564731250924481_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8628998121389356473151192859.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8628998121389356473151192859_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/390312548138935647323118872.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/390312548138935647323118872_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/142665625013893564731334500964.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/142665625013893564731334500964_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138424491713893564731842776189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138424491713893564731842776189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6964024841389356473411783691.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6964024841389356473411783691_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18004709921389356473846808115.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18004709921389356473846808115_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/214555972113893564731315582923.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/214555972113893564731315582923_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13245559151389356473508352241.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13245559151389356473508352241_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12948719081389356473246080182.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12948719081389356473246080182_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/91471475913893564731743949505.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/91471475913893564731743949505_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161724583713893564732009359287.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161724583713893564732009359287_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/209559462813893564731091729589.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209559462813893564731091729589_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/174443094613893564732045691734.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/174443094613893564732045691734_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/91624595113893564731755506349.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/91624595113893564731755506349_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/150502747813893564731851985946.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/150502747813893564731851985946_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8589471831389356473220443642.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8589471831389356473220443642_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/209758075413893564731972000010.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209758075413893564731972000010_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1107540313893564731606819391.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1107540313893564731606819391_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/93573999513893564731250924481.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/93573999513893564731250924481_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8628998121389356473151192859.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8628998121389356473151192859_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/390312548138935647323118872.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/390312548138935647323118872_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/142665625013893564731334500964.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/142665625013893564731334500964_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/138424491713893564731842776189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/138424491713893564731842776189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6964024841389356473411783691.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6964024841389356473411783691_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18004709921389356473846808115.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18004709921389356473846808115_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/214555972113893564731315582923.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/214555972113893564731315582923_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13245559151389356473508352241.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13245559151389356473508352241_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12948719081389356473246080182.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12948719081389356473246080182_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/91471475913893564731743949505.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/91471475913893564731743949505_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161724583713893564732009359287.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161724583713893564732009359287_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/209559462813893564731091729589.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209559462813893564731091729589_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/174443094613893564732045691734.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/174443094613893564732045691734_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/91624595113893564731755506349.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/91624595113893564731755506349_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/150502747813893564731851985946.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/150502747813893564731851985946_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8589471831389356473220443642.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8589471831389356473220443642_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/8f28ca86858dd7f64ebe4ba131c8b54b.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/8f28ca86858dd7f64ebe4ba131c8b54b_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/8f28ca86858dd7f64ebe4ba131c8b54b_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/15487024711389704304135795131_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/30781164913897043031368448374_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/4169b5f87c94b71fe423d2d87734855c_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/206224808313893652291912229549_thumb_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/20579355651389365229526845490_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16556631361389365229684461527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9367321931389365229728593334_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21320620291389365229979380904_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/88340038813893652292021068116_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14406790151389365229459102773_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197495253713893652291376108770_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/20017776321389365229183718696_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/17387656751389365229455113404_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/62686368513893652291854345242_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18524048011389365229914910956_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/146882469513893652291940391548_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58272532413893652292106534628_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13720712713893652291909016477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/3316709881389365229412281809_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/4786595801389365229156752224_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162431449613893652292134322717_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8412137521389365229413563041_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7154324031389365229825792133_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/139294394513893652291598832792_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/8f28ca86858dd7f64ebe4ba131c8b54b.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/8f28ca86858dd7f64ebe4ba131c8b54b_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/8f28ca86858dd7f64ebe4ba131c8b54b_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/15487024711389704304135795131_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/30781164913897043031368448374_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/7394045813897043031765620653_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/18233472861389704303598213352_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11251627781389704303888220433_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/182934231413897043031120743665_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/92008418413897043031561920177_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/145598204613897043031619205668_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/197546713013897043031717009226_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/209250186713897043031535803822_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81248504713897043031115982814_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/10598032131389704303238518520_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8897067521389704303652844785_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13041648151389704303962977826_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9637118313897043031615941495_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/6888377571389704303277077379_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5393626431389704303195906527_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5928121941389704303613303102_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/19615271801389704303268675833_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/12115164541389704303939206311_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11568962661389704303893375120_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
$profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/da03636b6d449896e23fa7dc3cfcf9dd_forward4.flv
sVideoPath1: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d.flv
sVideoPath2: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward2.flv
sVideoPath4: /home/shotpage/public_html/file/video/2014/01/79a488dc80154deabaeb4b493448d51d_forward4.flv
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/91536368813897089401941662046_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/140561619013897089401024033708_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/27329773613897089401053246290_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/22183512613897089401953857035_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/170390188913897089401332318672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/161593493313897089401298558141_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/37085845913897089401877209268_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9818543513897089401063507015_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/53604585613897089401535457663_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9097044721389708940289351107_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/81578240713897089401223893018_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/31963160013897089401442238165_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/9917231291389708940583504474_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/129266874713897089401522215625_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/16094884121389708940677753477_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179340654213897089401055039793_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/212776816013897089401165109248_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/743280631389708940253582249_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/708718901389708940296163189_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/5995563613897089401774773779_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/162848186113897089401675890569_flip.jpg +delete \) null: out: Array code:0
before clip horizontal
flip horizontal begin
after clip horizontal
flipped image:  thumb output: /home/shotpage/public_html/file/pic/clip/2014/01/28321900513897065061028104411_flip.jpg
flip image start
flip horizontal begin
$flippedVerImage, $flippedVerImageOutput,/home/shotpage/public_html/file/pic/clip/2014/01/152045594713897065051369090910_flip.jpg
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:1
cmd: /usr/local/bin/convert \( /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/741490001138970650456657285_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/24931012113897065041365007129_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/15534498291389706504179537428_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/21327814481389706504445161654_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1815153227138970650479077346_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/763321171389706504943253127_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/165513211213897065041865816460_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/58688635413897065041467638454_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/11066901881389706504953110478_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/180534814313897065042116053314_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/179846854813897065041779601987_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/13880319631389706505676448817_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/603988308138970650511434196_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/8085938661389706505238110796_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/149706731813897065051384973672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/1390932397138970650591073672_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/144163095813897065051640242518_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/14560808011389706505847597139_flip.jpg +delete \) \( /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601.jpg -flop -write /home/shotpage/public_html/file/pic/clip/2014/01/181977994613897065051441378601_flip.jpg +delete \) null: out: Array code:0
$profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } flip horizontal begin
flip horizontal begin
flip horizontal begin
flip horizontal begin
$profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } flip horizontal begin
flip horizontal begin
flip horizontal begin
flip horizontal begin
flip horizontal begin
flip horizontal begin
$profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = phpfox::getLib('database')->select('max(user_id) as user_id')
                ->from(phpfox::getT('user'))
                ->where(1)
                ->execute('getSlaveField');

        $email_signup = phpfox::getLib('database')->select('email')
                ->from(phpfox::getT('user'))
                ->where('user_id = '.$users)
                ->execute('getSlaveField');

        $contactimporter_user_id = phpfox::getLib('database')->select('DISTINCT inv.email')
                ->from(phpfox::getT('invite'),'inv')
                ->where(1)
                ->execute('getRows');       
        $emails = array();
        foreach ($contactimporter_user_id as $key=>$email_contacts)
        {
            $emails[$key] = $email_contacts['email'];
        }  
        if(in_array($email_signup,$emails))
        {
            $_SESSION['signup_plugin'] = 1;
        } $profilesToInstall = $this->database()->select('profile_id')->from(Phpfox::getT('shotprofile'))->where('is_open=1')->execute('getRows');

$values = array();
foreach($profilesToInstall as $profile) {
$values[] = array('profile_id' => $profile['profile_id'], 'user_id' => $iId); 
}

if (count($values))
{
$this->database()->multiInsert(Phpfox::getT('shotprofile_my'), array('profile_id', 'user_id'), $values);
} // Check if user entered a code value
$code = $aCustom[9];

if ($code != '') {
	
	// get user by code
	$codeOwner = Phpfox::getService('affiliatecodes')->codeOwner($code);
	
	if ($codeOwner)
	{
		// get a discount from settings and make this discount for user that is registering now
		$discount = Phpfox::getParam('affiliatecodes.affiliate_discount_percents') / 100.0;
		
		Phpfox::getService('affiliatecodes')->addDiscount($iId, $aVals['package_id'], $discount, $code);
	
		// add credits to afiiliate code owner
		$creditsToAdd = Phpfox::getParam('affiliatecodes.affiliate_credits');
		Phpfox::getService('credits')->addCredits($creditsToAdd, $codeOwner['user_id'], 'affiliate', 0);
		
		// notificate code owner about new credits
		Phpfox::getService('notification.process')->add('affiliatecodes_earn', 0, $codeOwner['user_id'], $iId );
		
		// notificate user that he has a discount
		Phpfox::getService('notification.process')->add('affiliatecodes_discount', 0, $iId, $iId);

		// make them friends	
		$message = Phpfox::getPhrase('affiliatecodes.friend_request_by_affiliate_code');
		Phpfox::getService('friend.request.process')->add($iId, $codeOwner['user_id'], 0, $message);
	} 
} /* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    $users = ph