INVITE A FRIEND


Hi all.

I hope som1 can help me.

I have make a dating site and when i am testing the Invite a friend i the bottem menu it say this

Warning: Cannot modify header information - headers already sent by (output started at /home/stardati/public_html/plugins/phpmailer/class.phpmailer.php:586) in/home/stardati/public_html/tellfriend.php on line 113

What do i need to do so it is working..

txn for the help

Http://stardating.org

email: stardatingdk@gmail.com

Quote · 2 Mar 2014

Can you upload the tellfriend.php script again?

Geeks, making the world a better place
Quote · 2 Mar 2014

the skript i have add is when i try to sent a invite to a friend from the link in the bottom..

 

Quote · 2 Mar 2014

Basically she is saying to upload the tellfriend.php script again. It appears to be damaged.

https://www.deanbassett.com
Quote · 2 Mar 2014

I just went to the site and clicked on the invite a friend link.  The form pops up but when you click the submit button you get the message about the headers already sent out.

I will still like for you to upload the tellfriend.php script again, make sure you use a binary transfer, so we can rule out that the file may have been corrupted when transferred to your site.

Geeks, making the world a better place
Quote · 2 Mar 2014

Her is the tellfriend.php scrip

 

 

<?php

 

/**

 * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/

 * CC-BY License - http://creativecommons.org/licenses/by/3.0/

 */

 

require_once('inc/header.inc.php');

require_once(BX_DIRECTORY_PATH_INC . 'design.inc.php');

require_once(BX_DIRECTORY_PATH_INC . 'profiles.inc.php');

require_once(BX_DIRECTORY_PATH_INC . 'utils.inc.php');

require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolEmailTemplates.php');

 

bx_import('BxTemplFormView');

 

// --------------- page variables and login

 

$_page['name_index']= 29;

$_page['css_name']= array('forms_adv.css');

 

$_page['header'] = _t("_Tell a friend");

$_page['header_text'] = _t("_Tell a friend");

 

$profileID = 0;

if( isset($_GET['ID']) ) {

    $profileID = (int) $_GET['ID'];

} else if( isset($_POST['ID']) ) {

    $profileID = (int) $_POST['ID'];

}

 

$iSenderID = getLoggedId();

$aSenderInfo = getProfileInfo($iSenderID);

 

// --------------- page components

 

$sCaption = ($profileID) ? _t('_TELLAFRIEND2', $site['title']) : _t('_TELLAFRIEND', $site['title']);

 

$aForm = array(

    'form_attrs' => array(

        'id' => 'invite_friend',

        'name' => 'invite_friend',

        'action' => BX_DOL_URL_ROOT . 'tellfriend.php',

        'method' => 'post',

        'onsubmit' => "return bx_ajax_form_check(this)",

    ),

    'params' => array (

        'db' => array(

            'submit_name' => 'do_submit', // we need alternative hidden field name here, instead of submit, becuase AJAX submit doesn't pass submit button value

        ),

    ),

    'inputs' => array (

        'header1' => array(

            'type' => 'block_header',

            'caption' => $sCaption,

        ),

        'do_submit' => array(

            'type' => 'hidden',

            'name' => 'do_submit', // hidden submit field for AJAX submit

            'value' => 1,

        ),

        'id' => array(

            'type' => 'hidden',

            'name' => 'ID',

            'value' => $profileID,

        ),

        'name' => array(

            'type' => 'text',

            'name' => 'name',

            'caption' => _t("_Your name"),

            'value' => $aSenderInfo['NickName'],

        ),

        'email' => array(

            'type' => 'text',

            'name' => 'email',

            'caption' => _t("_Your email"),

            'value' => $aSenderInfo['Email'],

            'checker' => array (

                'func' => 'email',

                'error' => _t('_Incorrect Email'),

            ),

        ),

        'friends_emails' => array(

            'type' => 'text',

            'name' => 'friends_emails',

            'caption' => _t("_Friend email"),

            'value' => '',

            'checker' => array (

                'func' => 'length',

                'params' => array(3, 256),

                'error' => _t('_sys_adm_form_err_required_field'),

            ),

        ),

        'submit_send' => array(

            'type' => 'submit',

            'name' => 'submit_send',

            'value' => _t("_Send Letter"),

        ),

    )

);

 

// generate form or form result content

$oForm = new BxTemplFormView($aForm);

$oForm->initChecker();

if ($oForm->isSubmittedAndValid()) {

    $s = SendTellFriend($iSenderID) ? "_Email was successfully sent" : "_Email sent failed";

    $sPageCode = MsgBox(_t($s));

} else {

    $sPageCode = $oForm->getCode();

}

 

// output AJAX form submission result

if (bx_get('BxAjaxSubmit')) {

    header('Content-type:text/html;charset=utf-8');

    echo $sPageCode;

    exit;

}

 

$sPageCode = $GLOBALS['oSysTemplate']->parseHtmlByName('default_margin.html', array('content' => $sPageCode));

 

// output ajax popup

if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') {

    $aVarsPopup = array (

        'title' => $_page['header'],

        'content' => $sPageCode,

    );

    header('Content-type:text/html;charset=utf-8');

    echo $GLOBALS['oFunctions']->transBox($GLOBALS['oSysTemplate']->parseHtmlByName('popup.html', $aVarsPopup), true);

    exit;

}

 

// output regular page

$_ni = $_page['name_index'];

$_page_cont[$_ni]['page_code'] = $sPageCode;

PageCode();

 

// --------------- page components functions

 

/**

 * send "tell a friend" email

 */

 

function SendTellFriend($iSenderID = 0)

{

    global $profileID;

 

    $sRecipient   = clear_xss($_POST['friends_emails']);

    $sSenderName  = clear_xss($_POST['name']);

    $sSenderEmail = clear_xss($_POST['email']);

    if ( strlen( trim($sRecipient) ) <= 0 )

        return 0;

    if ( strlen( trim($sSenderEmail) ) <= 0 )

        return 0;

 

    $sLinkAdd = $iSenderID > 0 ? 'idFriend=' . $iSenderID : '';

    $rEmailTemplate = new BxDolEmailTemplates();

    if ( $profileID ) {

        $aTemplate = $rEmailTemplate -> getTemplate( 't_TellFriendProfile', $profileID ) ;

        $Link = getProfileLink($profileID, $sLinkAdd);

    } else {

        $aTemplate = $rEmailTemplate -> getTemplate( 't_TellFriend' ) ;

        $Link = BX_DOL_URL_ROOT;

        if (strlen($sLinkAdd) > 0)

            $Link .= '?' . $sLinkAdd;

    }

    $aPlus = array(

        'Link' => $Link,

        'FromName' => $sSenderName

    );

    return sendMail($sRecipient, $aTemplate['Subject'], $aTemplate['Body'], '', $aPlus);

}

Quote · 2 Mar 2014

HELLO ! ....... Did you try re-uploading just that file tellfriend.php ( from Dolphin-v.7.1.4) to your server yet ? That's what GG is asking you to do.

Quote · 2 Mar 2014

 

I just went to the site and clicked on the invite a friend link.  The form pops up but when you click the submit button you get the message about the headers already sent out.

I will still like for you to upload the tellfriend.php script again, make sure you use a binary transfer, so we can rule out that the file may have been corrupted when transferred to your site.

 

Curious... why binary? I would have thought to use ASCII (or text) to transfer text based files?

 

Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net
Quote · 3 Mar 2014

 

 

I just went to the site and clicked on the invite a friend link.  The form pops up but when you click the submit button you get the message about the headers already sent out.

I will still like for you to upload the tellfriend.php script again, make sure you use a binary transfer, so we can rule out that the file may have been corrupted when transferred to your site.

 

Curious... why binary? I would have thought to use ASCII (or text) to transfer text based files?

 

Binary is the best way to transfer files to ensure you don't corrupt the files.

To quote:

Binary mode refers to transferring files as a binary stream of data. Where ASCII mode may use special control characters to format data, binary mode transmits the raw bytes of the file being transferred. In this way, the file is transferred in its exact original form.

Geeks, making the world a better place
Quote · 3 Mar 2014

So its better to transfer everything in binary, text and images?

Guynuked -- Dedicated server and Dolphin-friendly hosting with Zarconia.net
Quote · 3 Mar 2014

 

So its better to transfer everything in binary, text and images?

 Yes, especially code files, video files, photo files.  Transferring php scripts in ASCII can lead to corrupt files and problems and difficulty in tracking them down.

Geeks, making the world a better place
Quote · 3 Mar 2014

i just try to reupload the tellfriend.php file but it ditten help :(

Quote · 3 Mar 2014

Have you tried re-uploading     plugins/phpmailer/class.phpmailer.php

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 3 Mar 2014

i just try to reupload it. but that dont work :(

 

is there a place where i need to but a email? or will it be sent from that mail that ppl use?

 

i just tjek the contakt us.. that do not work.. so maby that is connected?

 

and again txn for ppl help :)

Quote · 3 Mar 2014

Hi all 

Txn for all your help..

I just find out the smtp setting was fuck up....

and again txn for the help :)

Quote · 3 Mar 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.