Esempio n. 1
0
function buildViewOptions()
{
    /*
    Build the advanced view options.
    If MODE == 'buildViewOptions' advanced view options will be returned, otherwise the basic view options.	
    Database columns and what are acceptable values:
    orderBy = char(86) tcIn reel scene character completed deleted createdDate modifiedDate deletedDate tcOut
    orderDirection = char(4) ASC
    viewReels = varchar(255) viewAll. An empty value '' indicates no reel. 0 is a valid reel. If the user wanted to view three reels the format would be 1 3 4, identifying three reels.
    viewCharacters = text. There is no default allowed for text columns. If the user wanted to view three characters the format would be 23 45 35, identifying three characters. An empty value '' implies view all characters.
    	
    $userOrderByArray = a numeric array of the user's order by options.
    $orderByArray = an associative array of the user's order by options associated with their visible title equivalents.
    
    $viewCharacters = a nested array of the characters in the list with the charId as the key:
    array (
    	'David' => 
    	array (
    		'charId' => '188',
    		'charColor' => 'BFE1FF',
    		'activeLinesCount' => '2',
    		'totalLinesCount' => '2',
    		'deletedLinesCount' => 0,
    		'completedLinesCount' => 0
    	),...
    
    $userViewCharactersArray = the characters selected for the current list:
    array (
      0 => '188',
      1 => '190',
    )
    
    $userReelsArray = the reels selected for the current list:
    array (
      0 => '1',
      1 => '2',
    )
    
    $viewReelsArray = nested arrays showing the line count for each reel.
    array (
      0 => 
      array (
    	'reel' => '',
    	'count' => '2',
      ),
      1 => 
      array (
    	'reel' => '1',
    	'count' => '10',
      ),...
    */
    global $debug, $message, $success, $Dbc, $returnThis;
    //Build the view options.
    try {
        if (!isset($_SESSION['userId'])) {
            throw new Adrlist_CustomException('', '$_SESSION[\'userId\'] is not set.');
        } elseif (!is_numeric($_SESSION['userId'])) {
            throw new Adrlist_CustomException('', '$_SESSION[\'userId\'] is not numeric.');
        }
        //Order by options.
        $userOrderByArray = explode(' ', $_SESSION['orderBy']);
        //An array of order by options.
        //$debug->printArray($userOrderByArray,'$userOrderByArray in build view options.');
        $tempOrderByArray = array('tcIn' => 'TC In', 'character' => 'Character', 'deleted' => 'Deleted', 'completed' => 'Completed', 'reel' => 'Reel', 'scene' => 'Scene', 'tcOut' => 'TC Out', 'createdDate' => 'Created Date', 'modifiedDate' => 'Modified Date', 'deletedDate' => 'Deleted Date');
        $orderByArray = array();
        foreach ($userOrderByArray as $key => $value) {
            $orderByArray[$tempOrderByArray[$value]] = $value;
        }
        //$debug->printArray($orderByArray,'$orderByArray in build view options.');
        $orderByOptions = '	<div class="textLeft ui-field-contain" style="margin-bottom:.5em;margin-top:.5em">
		<div class="textLeft">Order By</div>
';
        $orderByOptionsCount = count($orderByArray);
        $orderByLoopCount = 1;
        $class = 'FFFFFF';
        $super = 0;
        foreach ($orderByArray as $key => $value) {
            $super++;
            if ($class == 'rowWhite') {
                $class = 'rowAlt';
            } else {
                $class = 'rowWhite';
            }
            $orderByOptionFirst = $orderByLoopCount == 1 ? true : false;
            $orderByOptionLast = $orderByLoopCount == $orderByOptionsCount ? true : false;
            if ($orderByOptionFirst) {
                $orderByOptions .= '		<div id="orderByOptionsFirstRow" class="' . $class . '">
			<div class="inline-block viewOptionsItem" id="orderByOptionsFirstUpArrows" style="width:38px"></div>
			<div class="inline-block orderByOption textCenter" id="orderByOptionsFirstValue" style="width:10em;vertical-align:middle" value="' . $value . '">
				' . $key . '
			</div>
			<div class="inline-block viewOptionsItem" id="orderByOptionsFirstDownArrows">
				<img class="arrowDownOne" src="' . LINKIMAGES . '/arrowDown.png" onClick=""><img class="arrowBottom" src="' . LINKIMAGES . '/arrowBottom.png" onClick="">
			</div>';
            } elseif ($orderByOptionLast) {
                $orderByOptions .= '		<div id="orderByOptionsLastRow" class="' . $class . '">
			<div class="inline-block viewOptionsItem" id="orderByOptionsLastUpArrows">
				<img class="arrowTop" src="' . LINKIMAGES . '/arrowTop.png" onClick=""><img class="arrowUpOne" src="' . LINKIMAGES . '/arrowUp.png" onClick="">
			</div>
			<div class="inline-block orderByOption textCenter" id="orderByOptionsLastValue" style="width:10em;vertical-align:middle" value="' . $value . '">
				' . $key . '
			</div>
			<div class="inline-block viewOptionsItem" id="orderByOptionsLastDownArrows" style="width:38px">
			</div>';
            } else {
                $orderByOptions .= '		<div class="' . $class . '">
			<div class="inline-block viewOptionsItem">
				<img class="arrowTop" src="' . LINKIMAGES . '/arrowTop.png" onClick=""><img class="arrowUpOne" src="' . LINKIMAGES . '/arrowUp.png" onClick="">
			</div>
			<div class="inline-block orderByOption textCenter" style="width:10em" value="' . $value . '">
				' . $key . '
			</div>
			<div class="inline-block viewOptionsItem">
				<img class="arrowDownOne" src="' . LINKIMAGES . '/arrowDown.png" onClick=""><img class="arrowBottom" src="' . LINKIMAGES . '/arrowBottom.png" onClick="">
			</div>';
            }
            $orderByOptions .= '</div>';
            $orderByLoopCount++;
        }
        //$debug->add('$orderByLoopCount: ' . "$orderByLoopCount in build view options.");
        $orderByOptions .= '		<div><div></div></div>
	</div>
';
        //The order direction.
        $orderDirectionOptions = '<fieldset class="viewOptionsItem" data-role="controlgroup" data-type="horizontal" data-mini="true">
    <legend>Direction</legend>
        <input id="orderDirectionAscending" name="orderDirection" value="list" ';
        $orderDirectionOptions .= $_SESSION['orderDirection'] == 'ASC' ? 'checked="checked" ' : '';
        $orderDirectionOptions .= 'type="radio">
        <label for="orderDirectionAscending">Ascending</label>
        <input id="orderDirectionDescending" name="orderDirection" value="list" ';
        $orderDirectionOptions .= $_SESSION['orderDirection'] == 'DESC' ? 'checked="checked" ' : '';
        $orderDirectionOptions .= 'type="radio">
        <label for="orderDirectionDescending">Descending</label>
</fieldset>';
        //Build the characters options. We will get three sets: active, deleted, completed.
        $viewCharacters = array();
        //The characters with active lines.
        $viewCharactersActiveStmt = $Dbc->prepare("SELECT\n\tcharacters.charId AS 'charId',\n\tcharacters.charName AS 'charName',\n\tcharacters.charColor AS 'charColor',\n\tCOUNT(characters.charId) AS 'count'\nFROM\n\tcharacters\nJOIN\n\tlinesTable ON linesTable.charId = characters.charId AND\n\tlinesTable.listId = characters.listId AND\n\tcharacters.listId = ? AND\n\tlinesTable.completed IS NULL AND\n\tlinesTable.deleted IS NULL\nGROUP BY\n\tcharacters.charName");
        $viewCharactersActiveStmt->execute(array($_SESSION['listId']));
        $totalActiveLines = 0;
        while ($viewCharactersActiveRow = $viewCharactersActiveStmt->fetch(PDO::FETCH_ASSOC)) {
            $viewCharacters[$viewCharactersActiveRow['charName']]['charId'] = $viewCharactersActiveRow['charId'];
            $viewCharacters[$viewCharactersActiveRow['charName']]['charColor'] = $viewCharactersActiveRow['charColor'];
            $viewCharacters[$viewCharactersActiveRow['charName']]['activeLinesCount'] = $viewCharactersActiveRow['count'];
            $viewCharacters[$viewCharactersActiveRow['charName']]['totalLinesCount'] = $viewCharactersActiveRow['count'];
            $totalActiveLines = $totalActiveLines + $viewCharactersActiveRow['count'];
        }
        //The characters with deleted lines. When a line is deleted it is irrelevant if it is marked as completed.
        $viewCharactersDeletedStmt = $Dbc->prepare("SELECT\n\tcharacters.charId AS 'charId',\n\tcharacters.charName AS 'charName',\n\tcharacters.charColor AS 'charColor',\n\tCOUNT(characters.charId) AS 'count'\nFROM\n\tcharacters\nJOIN\n\tlinesTable ON linesTable.charId = characters.charId AND\n\tlinesTable.listId = characters.listId AND\n\tcharacters.listId = ? AND\n\tlinesTable.deleted IS NOT NULL\nGROUP BY\n\tcharacters.charName");
        $viewCharactersDeletedStmt->execute(array($_SESSION['listId']));
        $totalDeletedLines = 0;
        while ($viewCharactersDeletedRow = $viewCharactersDeletedStmt->fetch(PDO::FETCH_ASSOC)) {
            $viewCharacters[$viewCharactersDeletedRow['charName']]['charId'] = $viewCharactersDeletedRow['charId'];
            $viewCharacters[$viewCharactersDeletedRow['charName']]['charColor'] = $viewCharactersDeletedRow['charColor'];
            $viewCharacters[$viewCharactersDeletedRow['charName']]['deletedLinesCount'] = $viewCharactersDeletedRow['count'];
            $viewCharacters[$viewCharactersDeletedRow['charName']]['totalLinesCount'] = isset($viewCharacters[$viewCharactersDeletedRow['charName']]['totalLinesCount']) ? $viewCharacters[$viewCharactersDeletedRow['charName']]['totalLinesCount'] : '';
            $totalDeletedLines = $totalDeletedLines + $viewCharactersDeletedRow['count'];
        }
        //The characters with completed lines. Completed lines marked as deleted are ignored.
        $viewCharactersCompletedStmt = $Dbc->prepare("SELECT\n\tcharacters.charId AS 'charId',\n\tcharacters.charName AS 'charName',\n\tcharacters.charColor AS 'charColor',\n\tCOUNT(characters.charId) AS 'count'\nFROM\n\tcharacters\nJOIN\n\tlinesTable ON linesTable.charId = characters.charId AND\n\tlinesTable.listId = characters.listId AND\n\tcharacters.listId = ? AND\n\tlinesTable.deleted IS NULL AND\n\tlinesTable.completed IS NOT NULL\nGROUP BY\n\tcharacters.charName");
        $viewCharactersCompletedStmt->execute(array($_SESSION['listId']));
        $totalCompletedLines = 0;
        while ($viewCharactersCompletedRow = $viewCharactersCompletedStmt->fetch(PDO::FETCH_ASSOC)) {
            $viewCharacters[$viewCharactersCompletedRow['charName']]['charId'] = $viewCharactersCompletedRow['charId'];
            $viewCharacters[$viewCharactersCompletedRow['charName']]['charColor'] = $viewCharactersCompletedRow['charColor'];
            $viewCharacters[$viewCharactersCompletedRow['charName']]['completed'] = true;
            $viewCharacters[$viewCharactersCompletedRow['charName']]['completedLinesCount'] = $viewCharactersCompletedRow['count'];
            $totalCompletedLines = $totalCompletedLines + $viewCharactersCompletedRow['count'];
        }
        ksort($viewCharacters, SORT_STRING);
        //$debug->printArray($viewCharacters,'$viewCharacters');
        $userViewCharactersArray = explode(' ', $_SESSION['viewCharacters']);
        //An array of character Ids.
        //$debug->printArray($userViewCharactersArray,'$userViewCharactersArray');
        //View reels options.
        $viewReelsStmt = $Dbc->prepare("SELECT\n\tlinesTable.reel AS 'reel',\n\tCOUNT(linesTable.reel) AS 'count'\nFROM\n\tlinesTable\nWHERE\n\tlinesTable.listId = ?\nGROUP BY\n\tLENGTH(linesTable.reel), linesTable.reel");
        $viewReelsStmt->execute(array($_SESSION['listId']));
        $reelsOptions = '<fieldset class="viewOptionsItem" data-mini="true" data-role="controlgroup">
    <legend>View Reels</legend>
    <input callback="checkAll"';
        $reelsOptions .= $_SESSION['viewReels'] == 'viewAll' ? ' checked="checked"' : '';
        $reelsOptions .= '" id="viewReelsMaster" name="viewReelsMaster" type="checkbox" viewReelsValue="viewAll">
    <label for="viewReelsMaster">All Reels</label>
';
        $userReelsArray = explode(' ', $_SESSION['viewReels']);
        //An array of reel ids.
        //$debug->printArray($userReelsArray,'$userReelsArray in build view options.');
        $viewReelsArray = array();
        $reelId = 0;
        while ($viewReelsRow = $viewReelsStmt->fetch(PDO::FETCH_ASSOC)) {
            $reelCount = lineCount($viewReelsRow['count']);
            if (empty($viewReelsRow['reel'])) {
                if (in_array('', $userReelsArray) || $_SESSION['viewReels'] == 'viewAll') {
                    $checked = 'checked="checked"';
                    $reelsValue = 'no reel ' . $reelCount;
                } else {
                    $checked = '';
                    $reelsValue = 'no reel ' . $reelCount;
                }
            } else {
                if (in_array($viewReelsRow['reel'], $userReelsArray) || $_SESSION['viewReels'] == 'viewAll') {
                    $checked = 'checked="checked"';
                    $reelsValue = 'Reel ' . $viewReelsRow['reel'] . ' ' . $reelCount;
                } else {
                    $checked = '';
                    $reelsValue = 'Reel ' . $viewReelsRow['reel'] . ' ' . $reelCount;
                }
            }
            $reelsOptions .= '    <input callback="masterState" master="viewReelsMaster" name="viewReel' . $reelId . '" id="viewReel' . $reelId . '" type="checkbox" ' . $checked . ' viewReelsValue="' . $viewReelsRow['reel'] . '">
    <label for="viewReel' . $reelId . '">' . $reelsValue . '</label>';
            $viewReelsArray[] = $viewReelsRow;
            $reelId++;
        }
        $reelsOptions .= '</fieldset>';
        //$debug->printArray($viewReelsArray,'$viewReelsArray');
        //Build the character view options
        $characterOptions = '<fieldset class="viewOptionsItem" data-mini="true" data-role="controlgroup">
    <legend class="ui-controlgroup-vertical"><span class="mobile">View Characters</span><table class="desktop tablet ui-controlgroup-controls textCenter" style="padding:0 1em"><tr><td style="min-width:10em">View Characters</td><td style="padding:.5em 0;width:33%">active</td><td style="background-color:#B1FF99;padding:.5em 0;width:33%">completed</td><td style="background-color:#FF7070;padding:.5em 0;width:33%">deleted</td></tr></table></legend>
    <input callback="checkAll"';
        $characterOptions .= empty($_SESSION['viewCharacters']) ? ' checked="checked"' : '';
        $characterOptions .= '" id="viewCharactersMaster" name="viewCharactersMaster" viewCharactersValue="viewAll" type="checkbox">
    <label for="viewCharactersMaster"><span class="mobile">All Characters</span><table class="desktop tablet textCenter" style="width:100%"><tr><td style="min-width:10em">All Characters</td><td style="width:33%">' . $totalActiveLines . '</td><td style="width:33%">' . $totalDeletedLines . '</td><td style="width:33%">' . $totalCompletedLines . '</td></tr></table></label>';
        $characterCount = count($userViewCharactersArray);
        foreach ($viewCharacters as $key => $value) {
            //Determine the line count.
            $lineCount = 0;
            if ($_SESSION['showCompletedLines'] == true) {
                $lineCount = empty($value['completedLinesCount']) ? 0 : $value['completedLinesCount'];
                //$debug->add('$lineCount first if for ' . $key . ': ' . "$lineCount.");
            }
            if ($_SESSION['showDeletedLines'] == true) {
                $lineCount += empty($value['deletedLinesCount']) ? 0 : $value['deletedLinesCount'];
                //$debug->add('$lineCount second if for ' . $key . ': ' . "$lineCount.");
            }
            $lineCount = empty($value['activeLinesCount']) ? lineCount($lineCount) : lineCount($lineCount + $value['activeLinesCount']);
            //Determine what character color to show.
            if ($_SESSION['showCharacterColors'] == false || empty($value['charColor'])) {
                $characterColor = 'FFF';
            } else {
                $characterColor = $value['charColor'];
            }
            if (in_array($value['charId'], $userViewCharactersArray) || empty($_SESSION['viewCharacters'])) {
                $checked = ' checked="checked"';
                $checkedOld = 'checked';
            } else {
                $checked = '';
                $checkedOld = 'unchecked';
            }
            $characterOptions .= '<input callback="masterState" master="viewCharactersMaster" name="viewCharacter' . $value['charId'] . '" id="viewCharacter' . $value['charId'] . '" type="checkbox" ' . $checked . ' viewCharactersValue="' . $value['charId'] . '">
    <label for="viewCharacter' . $value['charId'] . '" style="background-color:#' . $characterColor . '"><span class="mobile">' . $key . '</span><table class="desktop tablet textCenter" style="width:100%"><tr>
			<td style="min-width:10em">' . $key . '</td><td style="width:33%">';
            $characterOptions .= empty($value['activeLinesCount']) ? '0' : $value['activeLinesCount'];
            $characterOptions .= '</td><td style="width:33%">';
            $characterOptions .= empty($value['completedLinesCount']) ? '0' : $value['completedLinesCount'];
            $characterOptions .= '</td><td style="width:33%">';
            $characterOptions .= empty($value['deletedLinesCount']) ? '0' : $value['deletedLinesCount'];
            $characterOptions .= '</td>
		</tr>
	</table>
</label>';
        }
        $characterOptions .= '</fieldset>';
        //The show options.
        $showOptions = '	
			<fieldset class="textLeft" data-role="controlgroup" data-type="vertical" data-mini="true">
		<legend>Show</legend>
		<input callback="advancedViewColorWheel" id="advancedShowCharacterColors" name="advancedShowCharacterColors" type="checkbox"';
        $showOptions .= $_SESSION['showCharacterColors'] == true ? ' checked="checked"' : '';
        $showOptions .= '">
		<label for="advancedShowCharacterColors">Character Colors <img class="middle" id="advancedSaveColorWheel" src="' . LINKIMAGES . '/colorWheel.png" style="height:1.3em;width:1.3em;"></label>
		
		<input id="advancedShowCompletedLines" name="advancedShowCompletedLines" style="background-color:#FF7070" type="checkbox"';
        $showOptions .= $_SESSION['showCompletedLines'] == true ? ' checked="checked"' : '';
        $showOptions .= '">
		<label for="advancedShowCompletedLines" style="background-color:#B1FF99">Completed Lines</label>
		
		<input data-wrapper-class="textLeft" id="advancedShowDeletedLines" name="advancedShowDeletedLines" type="checkbox"';
        $showOptions .= $_SESSION['showDeletedLines'] == true ? ' checked="checked"' : '';
        $showOptions .= '">
		<label for="advancedShowDeletedLines" style="background-color:#FF7070">Deleted Lines</label>
	</fieldset>';
        $advancedViewOptionsBlueButtons = '<div class="break" id="advancedViewOptions">
		<button class="ui-btn ui-btn-inline ui-shadow ui-corner-all" id="resetViewOptionsToDefault" onClick="">Reset To Default</button>';
        $advancedViewOptionsBlueButtons .= isset($_SESSION['listRoleId']) && $_SESSION['listRoleId'] > 1 ? '<button class="ui-btn ui-btn-inline ui-shadow ui-corner-all" id="tcValidateAll" onClick="">Validate TC</button>' : '';
        $advancedViewOptionsBlueButtons .= '
	<button class="ui-btn ui-icon-refresh ui-btn-icon-left ui-btn-inline ui-shadow ui-corner-all" id="refreshAdvancedViewOptions" onClick="">Refresh</button><button class="ui-btn ui-icon-heart ui-btn-icon-left ui-btn-inline ui-shadow ui-corner-all" id="saveAdvancedViewOptions" onClick="">Save</span>' . cancelButton() . '</div>
';
        //Print options.
        $printOptions = '<div class="break center textCenter" style="margin:1em">
	<button class="export ui-btn ui-btn-inline ui-corner-all ui-mini" exportFor="engineer">PDF for Engineer</button>
	<button class="export ui-btn ui-btn-inline ui-corner-all ui-mini" exportFor="talent">PDF for Talent</button>
	<div class="textCenter" style="margin-top:1em">Options</div>
	<div class="ui-field-contain">
		<input name="viewListOnLogin" id="exportShowComments" type="checkbox" data-wrapper-class="true">
		<label for="exportShowComments">Show Comments</label>
	</div>
</div>';
        $tabs = '<div style="height:2em"></div><div data-role="tabs" id="tabs">
	<div data-role="navbar">
		<ul>
			<li><a class="ui-btn-active" data-theme="c" data-ajax="false" href="#viewOptions"><i class="fa fa-cogs desktopInline tabletInline"></i>View<span class="desktopInline tabletInline">&nbsp;Options</span></a></li>
			<li><a data-theme="c" data-ajax="false" href="#export"><i class="fa fa-share desktopInline tabletInline"></i>Export</a></li>
			<li><a data-theme="c" data-ajax="false" href="#reports"><i class="fa fa-bar-chart-o desktopInline tabletInline"></i>Reports</a></li>
		</ul>
	</div>
	<div id="viewOptions" class="ui-body-c ui-content">
		' . $orderByOptions . $orderDirectionOptions . $reelsOptions . $characterOptions . $showOptions . $advancedViewOptionsBlueButtons . '
	</div>
	<div id="export">
		' . $printOptions . '
	</div>
	<div id="reports">
		nothing here yet
	</div>
</div>';
        $advancedViewOptions = $tabs;
        if (MODE == 'buildViewOptions') {
            $success = true;
            $returnThis['buildViewOptions'] = $advancedViewOptions;
        }
    } catch (Adrlist_CustomException $e) {
    } catch (PDOException $e) {
        error(__LINE__, '', '<pre>' . $e . '</pre>');
    }
    if (MODE == 'buildViewOptions') {
        returnData();
    }
}
Esempio n. 2
0
function buildBillingOffers($selectedPlanId = false)
{
    //Build the plans and payment buttons.
    global $debug, $message, $success, $Dbc, $returnThis;
    $output = Adrlist_Billing::buildPlans(true) . '<div class="textCenter">
	<img src="' . AUTOLINK . '/images/amazonFPS.gif" style="height:65px;width:230px;margin:1em"><br>
	<button class="purchasePlanAmazon ui-btn ui-btn-icon-left ui-btn-inline ui-corner-all ui-icon-credit-card ui-shadow">Pay via Amazon Payments</button>' . cancelButton() . '
</div>
<div>&nbsp;</div>
';
    if (MODE == 'buildBillingOffers') {
        $returnThis['buildBillingOffers'] = $output;
        $success = true;
        returnData();
    } else {
        return $output;
    }
}
Esempio n. 3
0
function transferListStep1()
{
    /*
    Builds the transfer list form.
    */
    global $debug, $message, $success, $Dbc, $returnThis;
    $output = '';
    try {
        if (empty($_POST['listId'])) {
            throw new Adrlist_CustomException('', '$_POST[\'listId\'] is empty.');
        }
        $Dbc->beginTransaction();
        //Get the list info.
        $listInfo = getListInfo($_SESSION['userId'], $_POST['listId']);
        //Verify the user has a sufficient role to transfer the list.
        if ($listInfo === false || $listInfo['listRoleId'] < 4) {
            throw new Adrlist_CustomException('Your role does not allow you to transfer this list.', '');
        }
        //Check for a pending transfer.
        $pendingTransferStmt = $Dbc->prepare("SELECT\n\ttlId AS 'tlId',\n\tfirstName AS 'firstName',\n\tlastName AS 'lastName',\n\tintendedEmail AS 'intendedEmail',\n\ttransferListCode AS 'transferListCode',\n\tlistId AS 'listId',\n\tlistRoleId AS 'listRoleId',\n\tsenderId AS 'senderId',\n\tsentDate AS 'sentDate',\n\trespondDate AS 'respondDate'\nFROM\n\ttransferList\nWHERE\n\tlistId = ?");
        $pendingTransferStmt->execute(array($_POST['listId']));
        $pendingTransfer = $pendingTransferStmt->fetch(PDO::FETCH_ASSOC);
        $debug->printArray($pendingTransfer, '$pendingTransfer');
        if (empty($pendingTransfer)) {
            //Prepare to insert a record.
            $output .= '<div class="myAccountTitle">
	Transfer "' . $listInfo['listName'] . '"
</div>
Enter the email address of the person you want to transfer this list to.
<div class="ui-field-contain">
	<label for="intendedEmail" unused="ui-hidden-accessible">Email</label>
	<input autocapitalize="off" autocorrect="off" autoreset="true" data-wrapper-class="true" id="intendedEmail" goswitch="transferListStep2" name="intendedEmail" placeholder="" value="" type="email">
</div>
<div class="ui-field-contain">
	<label for="intendedEmailRetype" unused="ui-hidden-accessible">Re-enter Email</label>
	<input autocapitalize="off" autocorrect="off" autoreset="true" data-wrapper-class="true" id="intendedEmailRetype" goswitch="transferListStep2" name="intendedEmailRetype" placeholder="" value="" type="email">
</div>
<button class="ui-btn ui-btn-inline ui-shadow ui-corner-all ui-btn-icon-left ui-icon-action" id="transferListStep2" listId="' . $_POST['listId'] . '">Transfer</button>' . cancelButton();
            $success = true;
            $returnThis['transferListStep1'] = $output;
        } else {
            //Show the pending transfer info.
            $output .= '<div class="myAccountTitle">
	Pending Transfer for "' . $listInfo['listName'] . '"
</div>
<div class="columnParent">
	<div class="break">
		<div style="font-weight:none" class="columnLeft">
			Recipient\'s Email Address:
		</div>
		<div class="columnRight">
			' . $pendingTransfer['intendedEmail'] . '
		</div>
	</div>
	<div class="break">
		<div class="columnLeft">
			Transfer Started:
		</div>
		<div class="columnRight">
			' . Adrlist_Time::utcToLocal($pendingTransfer['sentDate']) . '
		</div>
	</div>
</div>
<button class="ui-btn ui-btn-inline ui-shadow ui-corner-all ui-btn-icon-left ui-icon-delete" id="transferListStop" listId="' . $_POST['listId'] . '">Stop Transfer</button>' . cancelButton();
            if (MODE == 'transferListStep1') {
                $success = true;
                $returnThis['transferListStep1'] = $output;
            }
        }
    } catch (Adrlist_CustomException $e) {
    } catch (PDOException $e) {
        error(__LINE__, '', '<pre>' . $e . '</pre>');
    }
    if (MODE == 'transferListStep1') {
        returnData();
    }
}