function formatContact($array)
{
    foreach ($array as $index => $value) {
        $valueArray = explode('|', $value);
        unset($array[$index]);
        $array[$index]['name'] = $valueArray[0];
        $array[$index]['number'] = formatPhone($valueArray[1]);
    }
    return $array;
}
function pmpro_formatAddress($name, $address1, $address2, $city, $state, $zip, $country, $phone, $nl2br = true)
{
    $address = "";
    if (!empty($name)) {
        $address .= $name . "\n";
    }
    if (!empty($address1)) {
        $address .= $address1 . "\n";
    }
    if (!empty($address2)) {
        $address .= $address2 . "\n";
    }
    if (!empty($city) && !empty($state)) {
        $address .= $city . ", " . $state;
        if (!empty($zip)) {
            $address .= " " . $zip;
        }
        $address .= "\n";
    }
    if (!empty($country)) {
        $address .= $country . "\n";
    }
    if (!empty($phone)) {
        $address .= formatPhone($phone);
    }
    if ($nl2br) {
        $address = nl2br($address);
    }
    return $address;
}
Example #3
0
function writeContent()
{
    global $results;
    ?>

<h2>User Management</h2>

<form action="<?php 
    echo $_SERVER['PHP_SELF'];
    ?>
" method="post">
<table class="grid">
	<thead>
		<tr>
			<th></td>
			<th>Name</th>
			<th>Email</th>
			<th>Address</th>
			<th>Phone</th>
			<th>Admin</th>
		</tr>
	</thead>
	<tbody>
	<?php 
    while ($rs = mysql_fetch_array($results, MYSQL_ASSOC)) {
        ?>
		<tr<?php 
        echo !$rs['use_active'] ? ' class="inactive"' : '';
        ?>
>
			<td><?php 
        echo makeCheckbox('', $rs['use_id']);
        ?>
</td>
			<td><a href="user-edit.php?id=<?php 
        echo $rs['use_id'];
        ?>
" alt="<?php 
        echo $rs['use_image_path'];
        ?>
" rel="tooltip"><?php 
        echo $rs['use_name'];
        ?>
</a></td>
			<td><?php 
        echo '<a href="mailto:' . $rs['use_email'] . '">' . $rs['use_email'] . '</a>';
        ?>
</td>
			<td><?php 
        echo $rs['use_address'] . ' ' . $rs['use_address2'] . '<br />' . $rs['use_city'] . ' ' . $rs['use_state'] . ' ' . $rs['use_zip'];
        ?>
</td>
			<td><?php 
        echo formatPhone($rs['use_phone']);
        ?>
</td>
			<td><?php 
        echo $rs['use_admin'] ? 'Yes' : 'No';
        ?>
</td>
		</tr>
	<?php 
    }
    ?>
	</tbody>
</table>
<?php 
    echo makeButton('Add User', 'add') . ' ' . makeSubmit('Delete User(s)', 'delete') . ' ' . makeButton('Download Data', 'csv');
    ?>
</form>

<?php 
}
Example #4
0
            $extra_html .= "<div id='ext_{$lino}' " . "style='position:absolute;width:750px;border:1px solid black;" . "padding:2px;background-color:#cccccc;visibility:hidden;" . "z-index:1000;left:-1000px;top:0px;font-size:9pt;'>\n" . "<table width='100%'>\n" . "<tr><td class='bold' align='center' colspan='2' style='padding:4pt 0 4pt 0'>" . htmlspecialchars($result_text) . "</td></tr>\n" . "<tr><td class='bold' width='1%' nowrap>" . xlt('Status') . ": </td>" . "<td>" . generate_select_list("form_result_status[{$lino}]", 'proc_res_status', $result_status, xl('Result Status'), '') . "</td></tr>\n" . "<tr><td class='bold' nowrap>" . xlt('Facility') . ": </td>" . "<td><input type='text' size='15' name='form_facility[{$lino}]'" . " value='{$result_facility}' " . " title='" . xla('Supplier facility name') . "'" . " style='width:100%' /></td></tr>\n" . "<tr><td class='bold' nowrap>" . xlt('Comments') . ": </td>" . "<td><textarea rows='3' cols='15' name='form_comments[{$lino}]'" . " title='" . xla('Comments for this result or recommendation') . "'" . " style='width:100%' />" . htmlspecialchars($result_comments) . "</textarea></td></tr>\n" . "<tr><td class='bold' nowrap>" . xlt('Notes') . ": </td>" . "<td><textarea rows='4' cols='15' name='form_notes[{$lino}]'" . " title='" . xla('Additional notes for this result or recommendation') . "'" . " style='width:100%' />" . htmlspecialchars($result_notes) . "</textarea></td></tr>\n" . "</table>\n" . "<p><center><input type='button' value='" . xla('Close') . "' " . "onclick='extShow({$lino}, false)' /></center></p>\n" . "</div>";
            $lastpoid = $order_id;
            $lastpcid = $order_seq;
            $lastprid = $report_id;
            ++$lino;
        }
    }
    if (!empty($facilities)) {
        // display facility information
        $extra_html .= "<table>";
        $extra_html .= "<tr><th>" . xl('Performing Laboratory Facility') . "</th></tr>";
        foreach ($facilities as $facilityID) {
            foreach (explode(":", $facilityID) as $lab_facility) {
                $facility_array = getFacilityInfo($lab_facility);
                if ($facility_array) {
                    $extra_html .= "<tr><td><hr></td></tr>" . "<tr><td>" . htmlspecialchars($facility_array['fname']) . " " . htmlspecialchars($facility_array['lname']) . ", " . htmlspecialchars($facility_array['title']) . "</td></tr>" . "<tr><td>" . htmlspecialchars($facility_array['organization']) . "</td></tr>" . "<tr><td>" . htmlspecialchars($facility_array['street']) . " " . htmlspecialchars($facility_array['city']) . " " . htmlspecialchars($facility_array['state']) . "</td></tr>" . "<tr><td>" . htmlspecialchars(formatPhone($facility_array['phone'])) . "</td></tr>";
                }
            }
        }
        $extra_html .= "</table>\n";
    }
    ?>

</table>

<?php 
    if ($form_review) {
        // if user authorized for pending review.
        if ($reviewauth) {
            ?>
  <center><p>
Example #5
0
            $count++;
            continue;
        }
        if ($count == 6) {
            $phone = $phone . "-" . $temp;
            $count++;
            continue;
        }
        $phone = $phone . $temp;
        $count++;
    }
    return $phone;
}
$first = ucfirst($_POST["first"]);
$last = ucfirst($_POST["last"]);
$phone = formatPhone($_POST["phone"]);
$checklist = $_POST["checklist"];
echo "Welcome {$first} {$last}.<br>";
echo "Your phone number is {$phone}.<br>";
echo "Your hobbies are (showing only first three):<br>";
$count = 0;
foreach ($_POST["checklist"] as $check) {
    if ($count == 3) {
        break;
    }
    echo "<li>{$check}</li>";
    $count++;
}
?>
	</body>
</html>
Example #6
0
, <?php 
                echo $bstate;
                ?>
 <?php 
                echo $bzipcode;
                ?>
 <?php 
                echo $bcountry;
                ?>
						<?php 
            }
            ?>
                         
						<br />
						<?php 
            echo formatPhone($bphone);
            ?>
					</p>
					<?php 
        }
        ?>
					
					<?php 
        if (!empty($AccountNumber)) {
            ?>
					<p>
						<strong><?php 
            _e("Payment Method", "pmpro");
            ?>
</strong><br />
						<?php 
    } else {
        ?>
						<input type="hidden" name="bcountry" value="US" />
					<?php 
    }
    ?>
				<div>
					<label for="bphone"><?php 
    _e('Phone', 'pmpro');
    ?>
</label>
					<input id="bphone" name="bphone" type="text" class="input <?php 
    echo pmpro_getClassForField("bphone");
    ?>
" size="30" value="<?php 
    echo esc_attr(formatPhone($bphone));
    ?>
" />
				</div>
				<?php 
    if ($skip_account_fields) {
        ?>
				<?php 
        if ($current_user->ID) {
            if (!$bemail && $current_user->user_email) {
                $bemail = $current_user->user_email;
            }
            if (!$bconfirmemail && $current_user->user_email) {
                $bconfirmemail = $current_user->user_email;
            }
        }
Example #8
0
File: Sms.php Project: Nuwira/smsgw
 protected function pretendSend($phone_number, $message)
 {
     $phone_number = formatPhone($phone_number);
     $message = trim($message);
     $message = substr($message, 0, 160);
     $inboxes = collect(Cache::get($this->pretend_cache_key, []));
     $message_id = $inboxes->count();
     $message_id++;
     $sending_at = date('Y-m-d H:i:s');
     $output = ['status' => 200, 'sms_id' => $message_id, 'destination' => $phone_number, 'message' => $message, 'is_long' => $is_long, 'sms_count' => $sms_count, 'character_count' => $message_length, 'message_status' => 'sent', 'delivery_status' => "Pesan terkirim ke " . $phone_number, 'note' => '', 'created_at' => $sending_at, 'delivered_at' => $sending_at, 'sender' => 'Pretender', 'app' => 'SMS Pretender'];
     $inboxes->push($output);
     Cache::put($this->pretend_cache_key, $inboxes->toArray(), 60 * 60);
     $message_length = strlen($message);
     $is_long = $message_length > 160 ? 1 : 0;
     $sms_count = intval($is_long == 1 ? ceil($message_length / 153) : 1);
     return collect($output)->toArray();
 }
Example #9
0
							<td>
								<?php 
									if(empty($theuser->pmpro_bfirstname))
										$theuser->pmpro_bfirstname = "";
									if(empty($theuser->pmpro_blastname))
										$theuser->pmpro_blastname = "";
									echo trim($theuser->pmpro_bfirstname . " " . $theuser->pmpro_blastname);
								?><br />
								<?php if(!empty($theuser->pmpro_baddress1)) { ?>
									<?php echo $theuser->pmpro_baddress1; ?><br />
									<?php if(!empty($theuser->pmpro_baddress2)) echo $theuser->pmpro_baddress2 . "<br />"; ?>										
									<?php if($theuser->pmpro_bcity && $theuser->pmpro_bstate) { ?>
										<?php echo $theuser->pmpro_bcity?>, <?php echo $theuser->pmpro_bstate?> <?php echo $theuser->pmpro_bzipcode?>  <?php if(!empty($theuser->pmpro_bcountry)) echo $theuser->pmpro_bcountry?><br />												
									<?php } ?>
								<?php } ?>
								<?php if(!empty($theuser->pmpro_bphone)) echo formatPhone($theuser->pmpro_bphone);?>
							</td>
							<td><?php echo $auser->membership?></td>	
							<td>										
								<?php if((float)$auser->initial_payment > 0) { ?>
									<?php echo $pmpro_currency_symbol; ?><?php echo $auser->initial_payment?>
								<?php } ?>
								<?php if((float)$auser->initial_payment > 0 && (float)$auser->billing_amount > 0) { ?>+<br /><?php } ?>
								<?php if((float)$auser->billing_amount > 0) { ?>
									<?php echo $pmpro_currency_symbol; ?><?php echo $auser->billing_amount?>/<?php echo $auser->cycle_period?>
								<?php } ?>
								<?php if((float)$auser->initial_payment <= 0 && (float)$auser->billing_amount <= 0) { ?>
									-
								<?php } ?>
							</td>						
							<td><?php echo date("m/d/Y", strtotime($theuser->user_registered))?></td>
	<div class="wrap">
		<div class="alignleft">
			<h2 class="free-estimate__title"><?php 
echo $site->free_estimate();
?>
</h2>
            <p class="free-estimate__summary hide-sm"><?php 
echo $site->free_estimate_summary();
?>
</p>
		</div>

		<a class="btn btn-dark alignright hide-sm" role="button" href="<?php 
echo page('contact')->url() . '/status:free-estimate';
?>
"><?php 
echo l::get('free_estimate_btn');
?>
</a>
		<a href="tel:<?php 
echo formatPhone($site->phone());
?>
">
			<button class="btn btn-dark aligncenter hide-md"><?php 
echo l::get('click_to_call');
?>
</button>
		</a>
	</div>
</section>
Example #11
0
function getDeliverys($weekNumber, $dDay, $d)
{
    include '../connection.php';
    $listOfAllDrivers = genDList($db);
    $rQuery = "SELECT\n\t\t\t\t  clients.cFirstName,\n\t\t\t\t  clients.cLastName,\n\t\t\t\t  drivers.dID,\n\t\t\t\t  drivers.dFirstName,\n\t\t\t\t  drivers.dLastName,\n\t\t\t\t  drivers.dPhoneNumber,\n\t\t\t\t  routes.rID,\n\t\t\t\t  routes.rDate,\n\t\t\t\t  routes.rSuccess,\n\t\t\t\t  routes.rReschedule\n\t\t\t\tFROM routes\n\t\t\t\t  INNER JOIN clients\n\t\t\t\t  INNER JOIN drivers\n\t\t\t\tWHERE clients.cID = routes.cID\n\t\t\t\tAND drivers.dID = routes.dID\n\t\t\t\tAND routes.rWeek = {$weekNumber}\n\t\t\t\tAND routes.rDay = '{$dDay}'";
    //echo $rQuery;
    $route = $db->query($rQuery);
    $delCount = $route->num_rows;
    echo '<div>' . date("F j, Y", time() + $d) . '</div>';
    echo "<table class='alignleft table table-hover'>\n            <thead class='tableHead'>\n            <tr>\n\t\t\t\t<th>Driver</th>\n\t\t\t\t<th>Driver Number</th>\n\t\t\t\t<th>Client</th>\n\t\t\t\t<th>Status</th>\n            </tr>\n            </thead>\n            <tbody>";
    if ($delCount == 0) {
        echo "<tr>\n\t\t\t\t<th>No delivery today!</th>\n\t\t\t  </tr>";
    } else {
        while ($dInfo = $route->fetch_array()) {
            if ($dInfo['rSuccess'] == 1) {
                $status = "Delivered";
                #$action = "Deactivate";
            } else {
                $status = "Enroute";
                #$action = "Activate";
            }
            $rID = $dInfo['rID'];
            $dID = $dInfo['dID'];
            $clientName = $dInfo['cLastName'] . ', ' . $dInfo['cFirstName'];
            $driverName = $dInfo['dLastName'] . ', ' . $dInfo['dFirstName'];
            $driverNumber = formatPhone($dInfo['dPhoneNumber']);
            /*if($dDay == getTodaysDay(date('w'))){
            			$selectD = "<select onchange='changeDriver($rID,this.options[this.selectedIndex].value)'>
            						<option value='$dID'>$driverName</option>				
            						$listOfAllDrivers
            						</select>";
            		} else {
            			$selectD = $driverName;
            		}*/
            $selectD = "<select onchange='changeDriver({$rID},this.options[this.selectedIndex].value)'>\n\t\t\t\t\t\t\t<option value='{$dID}'>{$driverName}</option>\t\t\t\t\n\t\t\t\t\t\t\t{$listOfAllDrivers}\n\t\t\t\t\t\t\t</select>";
            echo "<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t{$selectD}\n\t\t\t\t\t</td>\n\t\t\t\t\t<td>{$driverNumber}</td>\n\t\t\t\t\t<td>{$clientName}</td>\n\t\t\t\t\t<td>{$status}</td>\n\t\t\t\t</tr>";
        }
    }
    echo "</tbody></table>";
}
Example #12
0
 /**
  * displayAddressInCategory
  *
  * Displays all the addresses in the given category.
  *
  * @param string $category Category name
  *
  * @return void
  */
 function displayAddressInCategory($category = '')
 {
     // All addresses
     $cat = 'cat=all&amp;';
     $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                    `country`, `address`, `city`, `state`, `zip`\n                FROM `fcms_users` AS u, `fcms_address` as a\n                WHERE u.`id` = a.`user`\n                AND ((\n                        `phpass` IS NOT NULL\n                        AND (\n                            `phpass` != 'PRIVATE'\n                            OR (a.`created_id` = ? AND `phpass` = 'PRIVATE')\n                        )\n                    )\n                    OR (\n                        `phpass` IS NULL\n                        AND (\n                            `password` != 'PRIVATE'\n                            OR (a.`created_id` = ? AND `password` = 'PRIVATE')\n                        )\n                    )\n                )\n                ORDER BY `lname`";
     $params = array($this->fcmsUser->id, $this->fcmsUser->id);
     // Member addresses
     if ($category == 'members') {
         $cat = 'cat=members&amp;';
         $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                        `country`, `address`, `city`, `state`, `zip`\n                    FROM `fcms_users` AS u, `fcms_address` as a\n                    WHERE u.`id` = a.`user`\n                    AND ((\n                            `phpass` IS NOT NULL\n                            AND `phpass` != 'NONMEMBER'\n                            AND `phpass` != 'PRIVATE'\n                        )\n                        OR (\n                            `phpass` IS NULL\n                            AND `password` != 'NONMEMBER'\n                            AND `password` != 'PRIVATE'\n                        )\n                    )\n                    ORDER BY `lname`";
         $params = array();
     } else {
         if ($category == 'non') {
             $cat = 'cat=non&amp;';
             $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                        `country`, `address`, `city`, `state`, `zip`\n                    FROM `fcms_users` AS u, `fcms_address` as a \n                    WHERE u.`id` = a.`user` \n                    AND (`phpass` = 'NONMEMBER' OR `password` = 'NONMEMBER')\n                    ORDER BY `lname`";
             $params = array();
         } else {
             if ($category == 'my') {
                 $cat = 'cat=my&amp;';
                 $sql = "SELECT a.`id`, `user`, `fname`, `lname`, `updated`, `home`, `email`,\n                        `country`, `address`, `city`, `state`, `zip`\n                    FROM `fcms_users` AS u, `fcms_address` as a \n                    WHERE u.`id` = a.`user` \n                    AND a.`created_id` = ?\n                    AND (`phpass` = 'PRIVATE' OR `password` = 'PRIVATE')\n                    ORDER BY `lname`";
                 $params = array($this->fcmsUser->id);
             }
         }
     }
     if (count($params) > 0) {
         $rows = $this->fcmsDatabase->getRows($sql, $params);
     } else {
         $rows = $this->fcmsDatabase->getRows($sql);
     }
     if ($rows === false) {
         $this->fcmsError->displayError();
         return;
     }
     foreach ($rows as $r) {
         $email = '';
         if (!empty($r['email'])) {
             $email = '<input type="checkbox" name="massemail[]" value="' . cleanOutput($r['email']) . '"/>';
         }
         $address = '';
         if (!empty($r['address'])) {
             $address .= cleanOutput($r['address']) . ', ';
         }
         if (!empty($r['city'])) {
             $address .= cleanOutput($r['city']) . ', ';
         }
         if (!empty($r['state'])) {
             $address .= cleanOutput($r['state']) . ', ';
         }
         if (!empty($r['zip'])) {
             $address .= cleanOutput($r['zip']);
         }
         echo '
                     <tr>
                         <td class="chk">' . $email . '</td>
                         <td><a href="?' . $cat . 'address=' . (int) $r['id'] . '">
                             ' . cleanOutput($r['lname']) . ', ' . cleanOutput($r['fname']) . '</a></td>
                         <td>' . $address . '</td>
                         <td>' . formatPhone($r['home'], $r['country']) . '</td>
                     </tr>';
     }
 }
function billing_content_func($atts)
{
    global $wpdb, $pmpro_msg, $pmpro_msgt, $pmpro_levels, $current_user, $levels;
    //-> If a member is logged in, show them some info here (1. past invoices. 2. billing information with button to update.)
    if ($current_user->membership_level->ID) {
        if ($pmpro_msg) {
            ?>
            <div class="pmpro_message <?php 
            echo $pmpro_msgt;
            ?>
"><?php 
            echo $pmpro_msg;
            ?>
</div>
            <?php 
        }
        ?>
	
        <div class="row billing-content">
            <div class="col-md-8 col-sm-8 col-sm-offset-3 col-md-offset-3">
                <!-- BEGIN CONTENT-->
                <div id="pmpro_account">		
                    <div id="pmpro_account-membership" class="pmpro_box-first">

                        <?php 
        //wpex_logo();
        ?>
                        <!--
                        <div class="clear clearfix"></div>
                        <br/>
                        -->
                        <?php 
        $level = $current_user->membership_level->name;
        ?>
                        <p><?php 
        _e("Membership status: <strong>" . $level . "</strong>", "pmpro");
        ?>
</p>
                        <?php 
        //die(var_dump($current_user));
        ?>
                        <ul>
                            <li><strong><?php 
        _e("Level", "pmpro");
        ?>
:</strong> <?php 
        echo $current_user->membership_level->name;
        ?>
</li>
                            <?php 
        if ($current_user->membership_level->billing_amount > 0) {
            ?>
                                <li><strong><?php 
            _e("Membership Fee", "pmpro");
            ?>
:</strong>
                                    <?php 
            $level = $current_user->membership_level;
            if ($current_user->membership_level->cycle_number > 1) {
                printf(__('%s every %d %s.', 'pmpro'), pmpro_formatPrice($level->billing_amount), $level->cycle_number, pmpro_translate_billing_period($level->cycle_period, $level->cycle_number));
            } elseif ($current_user->membership_level->cycle_number == 1) {
                printf(__('%s per %s.', 'pmpro'), pmpro_formatPrice($level->billing_amount), pmpro_translate_billing_period($level->cycle_period));
            } else {
                echo pmpro_formatPrice($current_user->membership_level->billing_amount);
            }
            ?>
                                </li>
                            <?php 
        }
        ?>
						

                            <?php 
        if ($current_user->membership_level->billing_limit) {
            ?>
                                <li><strong><?php 
            _e("Duration", "pmpro");
            ?>
:</strong> <?php 
            echo $current_user->membership_level->billing_limit . ' ' . sornot($current_user->membership_level->cycle_period, $current_user->membership_level->billing_limit);
            ?>
</li>
                            <?php 
        }
        ?>

                            <?php 
        if ($current_user->membership_level->enddate) {
            ?>
                                <li><strong><?php 
            _e("Next billing date", "pmpro");
            ?>
:</strong> <?php 
            echo date_i18n(get_option('date_format'), $current_user->membership_level->enddate);
            ?>
</li>
                            <?php 
        }
        ?>

                            <?php 
        if ($current_user->membership_level->trial_limit == 1) {
            printf(__("Your first payment will cost %s.", "pmpro"), pmpro_formatPrice($current_user->membership_level->trial_amount));
        } elseif (!empty($current_user->membership_level->trial_limit)) {
            printf(__("Your first %d payments will cost %s.", "pmpro"), $current_user->membership_level->trial_limit, pmpro_formatPrice($current_user->membership_level->trial_amount));
        }
        ?>
                        </ul>

                    </div> <!-- end pmpro_account-membership -->

                    <div id="pmpro_account-profile" class="pmpro_box hide">	
                        <?php 
        get_currentuserinfo();
        ?>
 
                        <h3><?php 
        _e("My Account", "pmpro");
        ?>
</h3>
                        <?php 
        if ($current_user->user_firstname) {
            ?>
                            <p><?php 
            echo $current_user->user_firstname;
            ?>
 <?php 
            echo $current_user->user_lastname;
            ?>
</p>
                        <?php 
        }
        ?>
                        <ul>
                            <li><strong><?php 
        _e("Username", "pmpro");
        ?>
:</strong> <?php 
        echo $current_user->user_login;
        ?>
</li>
                            <li><strong><?php 
        _e("Email", "pmpro");
        ?>
:</strong> <?php 
        echo $current_user->user_email;
        ?>
</li>
                        </ul>
                        <p>
                            <a href="<?php 
        echo admin_url('profile.php');
        ?>
"><?php 
        _e("Edit Profile", "pmpro");
        ?>
</a> |
                            <a href="<?php 
        echo admin_url('profile.php');
        ?>
"><?php 
        _ex("Change Password", "As in 'change password'.", "pmpro");
        ?>
</a>
                        </p>
                    </div> <!-- end pmpro_account-profile -->

                    <?php 
        //last invoice for current info
        //$ssorder = $wpdb->get_row("SELECT *, UNIX_TIMESTAMP(timestamp) as timestamp FROM $wpdb->pmpro_membership_orders WHERE user_id = '$current_user->ID' AND membership_id = '" . $current_user->membership_level->ID . "' AND status = 'success' ORDER BY timestamp DESC LIMIT 1");
        $ssorder = new MemberOrder();
        $ssorder->getLastMemberOrder();
        $invoices = $wpdb->get_results("SELECT *, UNIX_TIMESTAMP(timestamp) as timestamp FROM {$wpdb->pmpro_membership_orders} WHERE user_id = '{$current_user->ID}' ORDER BY timestamp DESC LIMIT 6");
        if (!empty($ssorder->id) && $ssorder->gateway != "check" && $ssorder->gateway != "paypalexpress" && $ssorder->gateway != "paypalstandard" && $ssorder->gateway != "twocheckout") {
            //default values from DB (should be last order or last update)
            $bfirstname = get_user_meta($current_user->ID, "pmpro_bfirstname", true);
            $blastname = get_user_meta($current_user->ID, "pmpro_blastname", true);
            $baddress1 = get_user_meta($current_user->ID, "pmpro_baddress1", true);
            $baddress2 = get_user_meta($current_user->ID, "pmpro_baddress2", true);
            $bcity = get_user_meta($current_user->ID, "pmpro_bcity", true);
            $bstate = get_user_meta($current_user->ID, "pmpro_bstate", true);
            $bzipcode = get_user_meta($current_user->ID, "pmpro_bzipcode", true);
            $bcountry = get_user_meta($current_user->ID, "pmpro_bcountry", true);
            $bphone = get_user_meta($current_user->ID, "pmpro_bphone", true);
            $bemail = get_user_meta($current_user->ID, "pmpro_bemail", true);
            $bconfirmemail = get_user_meta($current_user->ID, "pmpro_bconfirmemail", true);
            $CardType = get_user_meta($current_user->ID, "pmpro_CardType", true);
            $AccountNumber = hideCardNumber(get_user_meta($current_user->ID, "pmpro_AccountNumber", true), false);
            $ExpirationMonth = get_user_meta($current_user->ID, "pmpro_ExpirationMonth", true);
            $ExpirationYear = get_user_meta($current_user->ID, "pmpro_ExpirationYear", true);
            ?>
	

                        <div id="pmpro_account-billing" class="pmpro_box">
                            <h3><?php 
            _e("Billing Information", "pmpro");
            ?>
</h3>
                            <?php 
            if (!empty($baddress1)) {
                ?>
                                <p>
                                    <strong><?php 
                _e("Billing Address", "pmpro");
                ?>
</strong><br />
                                    <?php 
                echo $bfirstname . " " . $blastname;
                ?>
                                    <br />		
                                    <?php 
                echo $current_user->user_email;
                ?>
<br />
                                    <?php 
                echo $baddress1;
                ?>
<br />
                                    <?php 
                if ($baddress2) {
                    echo $baddress2 . "<br />";
                }
                ?>
                                    <?php 
                if ($bcity && $bstate) {
                    ?>
                                        <?php 
                    echo $bcity;
                    ?>
, <?php 
                    echo $bstate;
                    ?>
 <?php 
                    echo $bzipcode;
                    ?>
 <?php 
                    echo $bcountry;
                    ?>
                                    <?php 
                }
                ?>
                         
                                    <br />
                                    <?php 
                echo formatPhone($bphone);
                ?>
                                </p>
                            <?php 
            }
            ?>

                            <?php 
            if (!empty($AccountNumber)) {
                ?>
                                <p>
                                    <strong><?php 
                _e("Payment Method", "pmpro");
                ?>
</strong><br />
                                    <?php 
                echo $CardType;
                ?>
: <?php 
                echo last4($AccountNumber);
                ?>
 (<?php 
                echo $ExpirationMonth;
                ?>
/<?php 
                echo $ExpirationYear;
                ?>
)
                                </p>
                            <?php 
            }
            ?>

                            <?php 
            if (isset($ssorder->status) && $ssorder->status == "success" && (isset($ssorder->gateway) && in_array($ssorder->gateway, array("authorizenet", "paypal", "stripe", "braintree", "payflow", "cybersource")))) {
                ?>
                                <p><a href="<?php 
                echo pmpro_url("billing", "");
                ?>
"><?php 
                _e("Edit Billing Information", "pmpro");
                ?>
</a></p>
                                <?php 
            }
            ?>
                        </div> <!-- end pmpro_account-billing -->				
                        <?php 
        }
        ?>

                    <?php 
        if (!empty($invoices)) {
            ?>
                        <div id="pmpro_account-invoices" class="pmpro_box">
                            <h3><?php 
            _e("Past Invoices", "pmpro");
            ?>
</h3>
                            <ul>
                                <?php 
            $count = 0;
            foreach ($invoices as $invoice) {
                if ($count++ > 5) {
                    break;
                }
                ?>
                                    <li><a href="<?php 
                echo pmpro_url("invoice", "?invoice=" . $invoice->code);
                ?>
"><?php 
                echo date_i18n(get_option("date_format"), $invoice->timestamp);
                ?>
 (<?php 
                echo pmpro_formatPrice($invoice->total);
                ?>
)</a></li>
                                    <?php 
            }
            ?>
                            </ul>
                            <?php 
            //if ($count == 6) {
            ?>
                            <p><a href="<?php 
            echo pmpro_url("invoice");
            ?>
"><?php 
            _e("View All Invoices", "pmpro");
            ?>
</a></p>
                            <?php 
            //}
            ?>
                        </div> <!-- end pmpro_account-billing -->
                    <?php 
        }
        ?>
                    <!--
                    <p class="help-block">We have the following subscriptions available for our site. To join, simply click on the <strong>Change Subscription</strong> button to Change Membership Level.</p>
                    -->                  
                    <?php 
        //getLevels();
        ?>
	
                </div> <!-- end pmpro_account -->	

                <!-- END CONTENT-->
            </div>
        </div>
        <?php 
    } else {
        $user_id = $current_user->ID;
        //make sure we only run once a day
        $today = date("Y-m-d", current_time("timestamp"));
        //look for memberships that expired
        $sqlQuery = "SELECT mu.user_id, mu.membership_id, mu.startdate, mu.enddate FROM {$wpdb->pmpro_memberships_users} mu WHERE mu.status = 'expired' AND mu.enddate IS NOT NULL AND mu.enddate <> '' AND mu.enddate <> '0000-00-00 00:00:00' AND DATE(mu.enddate) <= '" . $today . "' AND mu.user_id = '" . $user_id . "' ORDER BY mu.enddate  LIMIT 1";
        $expired = $wpdb->get_results($sqlQuery);
        if (count($expired) > 0) {
            ?>
            <div class="row billing-content">
                <div class="col-md-8 col-sm-8 col-sm-offset-3 col-md-offset-3">
                    <!-- BEGIN CONTENT-->
                    <div id="pmpro_account">		
                        <div id="pmpro_account-membership" class="pmpro_box-first">
                            <?php 
            foreach ($expired as $e) {
                $level_id = $e->membership_id;
                $level = pmpro_getLevel($level_id);
                ?>
                                <div class="pmpro_message">Your "<?php 
                echo $level->name;
                ?>
" Membership has expired, please renew now <a href="<?php 
                echo pmpro_url("levels");
                ?>
"><?php 
                _e("here", "pmpro");
                ?>
</a>.</div>
                                <div id="pmpro_account-membership" class="pmpro_box-first">
                                    <?php 
                $level = $current_user->membership_level->name;
                ?>
                                    <p><?php 
                _e("Membership status: <strong>" . $level->name . "(Expired)</strong>", "pmpro");
                ?>
</p>
                                    <ul>
                                        <?php 
                if ($e->enddate) {
                    //die(var_dump($e->enddate));
                    ?>

                                            <li><strong><?php 
                    _e("Expiration billing date", "pmpro");
                    ?>
:  </strong> <?php 
                    echo " " . date_i18n(get_option('date_format'), strtotime($e->enddate));
                    ?>
</li>
                                        <?php 
                }
                ?>
                                    </ul>

                                </div> <!-- end pmpro_account-membership -->                               
                                <?php 
            }
            ?>
                        </div>
                    </div>
                </div>
            </div>
            <?php 
        }
    }
    ?>
    <?php 
}
Example #14
0
						?>
					</select>
				</div>
				<?php
					}
					else
					{
					?>
						<input type="hidden" name="bcountry" value="US" />
					<?php
					}
				?>
				<div>
					<label for="bphone">Phone</label>
					<input id="bphone" name="bphone" type="text" class="input <?php echo pmpro_getClassForField("bphone");?>" size="30" value="<?php echo esc_attr($bphone)?>" /> 
					<?php echo formatPhone($bphone); ?>
				</div>		
				<?php if($skip_account_fields) { ?>
				<?php
					if($current_user->ID)
					{
						if(!$bemail && $current_user->user_email)									
							$bemail = $current_user->user_email;
						if(!$bconfirmemail && $current_user->user_email)									
							$bconfirmemail = $current_user->user_email;									
					}
				?>
				<div>
					<label for="bemail">E-mail Address</label>
					<input id="bemail" name="bemail" type="text" class="input <?php echo pmpro_getClassForField("bemail");?>" size="30" value="<?php echo esc_attr($bemail)?>" /> 
				</div>
Example #15
0
?>
<h1 class="cover-heading">Add New Item To Address Book</h1>

<br>


<?php 
$addressGroups = getAddressGroups();
$newAddressData = array();
if (isPostRequest()) {
    $newAddressData[0] = $_SESSION['currentUserID'];
    $newAddressData[1] = filter_input(INPUT_POST, 'selected_address_group');
    $newAddressData[2] = filter_input(INPUT_POST, 'fullname');
    $newAddressData[3] = filter_input(INPUT_POST, 'email');
    $newAddressData[4] = filter_input(INPUT_POST, 'address');
    $newAddressData[5] = formatPhone(stripPhone(filter_input(INPUT_POST, 'phone')));
    $newAddressData[6] = filter_input(INPUT_POST, 'website');
    $newAddressData[7] = filter_input(INPUT_POST, 'birthday');
    $errors = validation($newAddressData);
    if (count($errors) == 0) {
        $newAddressData[8] = uploadImage();
        if (empty($newAddressData[8])) {
            $errors[] = 'Image could not be uploaded';
            $results = 'Empty Image';
        }
        if (createContact($newAddressData)) {
            $results = 'New item added to address book';
        } else {
            $results = 'Item was not Added';
        }
    } else {
Example #16
0
        }
    }
}
//END FUNCTIONS -- END FUNCTIONS -- END FUNCTIONS -- END FUNCTIONS -- END FUNCTIONS -- END FUNCTIONS --
//START CODING --  START CODING -- START CODING -- START CODING -- START CODING -- START CODING -- START CODING
$stripChrsA = array("<", ">", "!", "\$", "%", "*", "{", "}", "|");
$stripChrsB = array("<", ">", "*", "|");
$stripiName = str_replace($stripChrsA, "", $_REQUEST['iName']);
// passed to next line
$iName = ucwords(strtolower($stripiName));
// capitalizing first letter after lowercasing string
$iEmail = str_replace($stripChrsA, "", $_REQUEST['iEmail']);
$stripiPhone = str_replace($stripChrsA, "", $_REQUEST['iPhone']);
$iPhone = formatPhone($stripiPhone);
$stripiPhone = preg_replace("[\\D]", "", $_REQUEST['iPhone']);
$iPhone = formatPhone($stripiPhone);
$stripcontact_message = str_replace($stripChrsB, "", $_REQUEST['contact_message']);
$stripcontact_message = str_replace("!", ".", $_REQUEST['contact_message']);
// passed to next line
$stripcontact_message = str_replace("{", "(", $stripcontact_message);
// passed to next line
$stripcontact_message = str_replace("}", ")", $stripcontact_message);
// passed to next line
$contact_message = ucfirst(strtolower($stripcontact_message));
// capitalizing first letter after lowercasing string
$mail_array = ["Name" => $iName, "Email" => $iEmail, "Phone" => $iPhone, "Message" => $contact_message];
// echo '<hr>' . $iName . '<br>' . $iEmail. '<br>' . $iPhone. '<br>' . $contact_message;
require_once 'auto-mail.php';
auto_mail($mail_array);
$forwardURL = 'http://www.anthonyroy.info/VWS/radice/thankyou.html';
//$forwardURL = 'http://www.radicelawstl.com/thankyou.html';
Example #17
0
	<table>
	<tr>
		<th>Name</th>
		<th>Phone</th>
		<th>Email</th>
	</tr>
	<?php 
foreach ($people as $person) {
    ?>
	<tr>
		<td><?php 
    echo htmlentities($person['name']);
    ?>
</td>
		<td><?php 
    echo formatPhone(htmlentities($person['phone']));
    ?>
</td>
		<td><?php 
    echo htmlentities($person['email']);
    ?>
</td>
	</tr>
	<?php 
}
?>
	</table>

	<form action="add.php" method="POST">
	  <table>
	    <tr>
Example #18
0
    if (!isset($cMembertype)) {
        include "Member.inc";
    }
    if (!isset($cMemberdbtype)) {
        include "MemberDb.inc";
    }
    include "DeeDubUtils.inc";
    $theDb = new cMemberDb();
    $mbrlist = array();
    $theDb->SelectByName($name, $mbrlist);
    print "<p>Members By Name:</p>";
    print "<table>";
    for ($i = 0; $i < sizeof($mbrlist); $i++) {
        $theMember = $mbrlist[$i];
        $displayPhone = formatPhone($theMember->phone, $PAREN_STYLE);
        $displayFax = formatPhone($theMember->fax, $PAREN_STYLE);
        print "<tr><td class=\"memberlabel\">Company:</td><td class=\"memberdata\">{$theMember->company}</td></tr>";
        print "<tr><td class=\"memberlabel\">Category:</td><td class=\"memberdata\">{$theMember->category}, {$theMember->subcategory}</td></tr>";
        print "<tr><td class=\"memberlabel\">Address:</td><td class=\"memberdata\">{$theMember->address}<br>{$theMember->city}, {$theMember->state} {$theMember->zip}</td></tr>";
        print "<tr><td class=\"memberlabel\">Contact:</td><td class=\"memberdata\">{$theMember->firstname} {$theMember->lastname}</td></tr>";
        print "<tr><td class=\"memberlabel\">Phone:</td><td class=\"memberdata\">{$displayPhone} Ext: {$theMember->extn}</td></tr>";
        print "<tr><td class=\"memberlabel\">Fax:</td><td class=\"memberdata\">{$displayFax}</td></tr>";
        print "<tr><td class=\"memberlabel\">Website:</td><td class=\"memberdata\"><a href=\"http://{$theMember->website}\" target=\"_blank\">{$theMember->website}</a></td></tr>";
        print "<tr><td class=\"memberlabel\">Email:</td><td class=\"memberdata\"><a href=\"mailto:{$theMember->email}\">{$theMember->email}</a></td></tr>";
        print "<tr><td class=\"memberlabel\">Description:</td><td class=\"memberdata\">{$theMember->description}</td></tr>";
        print "<tr><td colspan=\"2\">&nbsp;</td></tr>";
        print "<tr><td colspan=\"2\">&nbsp;</td></tr>";
    }
    // end for each member
    print "</table>";
} else {
Example #19
0
    } else {
        return $phone_number;
    }
}
$items = array();
$categories = array();
//Get vendor information
$query = "SELECT * FROM `dayztbns_foodbah`.`Vendors` WHERE id=" . $_GET['q'] . ";";
$result = mysqli_query($conn, $query);
$row = mysqli_fetch_array($result, MYSQLI_ASSOC);
$vendor_id = $_GET['q'];
$vendor_title = $row['vendor_name'];
$vendor_address_1 = $row['address_1'];
$vendor_address_2 = $row['address_2'];
$vendor_address = $vendor_address_1 . "<br>" . $vendor_address_2;
$vendor_phone = formatPhone($row['phone']);
//Add items into $items array['category']['food_name']['attr_1']...
$query = 'SELECT DISTINCT category FROM dayztbns_foodbah.Menus WHERE vendor_id=' . $_GET['q'] . ' ORDER BY `order` ASC;';
$result = mysqli_query($conn, $query);
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
    $category = $row['category'];
    ${$category} = array();
    $categories[] = $category;
    $query = 'SELECT * FROM dayztbns_foodbah.Menus WHERE vendor_id=' . $_GET['q'] . ' AND category = "' . $category . '" ORDER BY `order` ASC;';
    $resultB = mysqli_query($conn, $query);
    while ($rowsB = mysqli_fetch_array($resultB, MYSQLI_ASSOC)) {
        ${$category}[$rowsB['food']] = array();
        ${$category}[$rowsB['food']]['name'] = $rowsB['food'];
        ${$category}[$rowsB['food']]['price'] = number_format($rowsB['price'] / 100, 2);
        ${$category}[$rowsB['food']]['description'] = $rowsB['description'];
        ${$category}[$rowsB['food']]['id'] = $rowsB['id'];
Example #20
0
 print "</td>";
 print "<td style='width: 33%; padding-top: 15px; width: 33%; vertical-align: top'>";
 print "<span style='font-size: 115%; font-weight: bold'>" . _('Contact By SMS') . "</span><br/>";
 if ($rowMember["contactSMS"] == "N") {
     print _("Do not contact by SMS.");
 } else {
     if ($rowMember["contactSMS"] == "Y" and ($rowMember["phone1"] != "" or $rowMember["phone2"] != "" or $rowMember["phone3"] != "" or $rowMember["phone4"] != "")) {
         for ($i = 1; $i < 5; $i++) {
             if ($rowMember["phone" . $i] != "" and $rowMember["phone" . $i . "Type"] == "Mobile") {
                 if ($rowMember["phone" . $i . "Type"] != "") {
                     print $rowMember["phone" . $i . "Type"] . ":</i> ";
                 }
                 if ($rowMember["phone" . $i . "CountryCode"] != "") {
                     print "+" . $rowMember["phone" . $i . "CountryCode"] . " ";
                 }
                 print formatPhone($rowMember["phone" . $i]) . "<br/>";
             }
         }
     }
 }
 print "</td>";
 print "<td style='width: 33%; padding-top: 15px; width: 34%; vertical-align: top' colspan=2>";
 print "<span style='font-size: 115%; font-weight: bold'>" . _('Contact By Email') . "</span><br/>";
 if ($rowMember["contactEmail"] == "N") {
     print _("Do not contact by email.");
 } else {
     if ($rowMember["contactEmail"] == "Y" and ($rowMember["email"] != "" or $rowMember["emailAlternate"] != "")) {
         if ($rowMember["email"] != "") {
             print _("Email") . ": <a href='mailto:" . $rowMember["email"] . "'>" . $rowMember["email"] . "</a><br/>";
         }
         if ($rowMember["emailAlternate"] != "") {
Example #21
0
function getTransactionInfo($id, $test = false, $by = 'transactionId', $where_sql = "")
{
    global $cnn_cs;
    $trans_table_name = "cs_transactiondetails";
    if ($test) {
        $trans_table_name = "cs_test_transactiondetails";
    }
    $sql = "\n\t\t\tSELECT \n\t\t\t\tt.*, DATE_FORMAT(t.transactionDate,'%M %D %Y at %r') as transaction_date_formatted,\n\t\t\t\tsub.*,\n\t\t\t\t\tc.contact_email,\n\t\t\t\t\tc.customer_service_phone,\n\t\t\t\t\tc.cc_billingdescriptor,\n\t\t\t\t\tc.ch_billingdescriptor,\n\t\t\t\t\tc.cc_visa_billingdescriptor,\n\t\t\t\t\tc.cc_master_billingdescriptor,\n\t\t\t\t\tc.we_billingdescriptor, \n\t\t\t\t\tc.cd_recieve_order_confirmations,\n\t\t\t\t\tc.we_billingdescriptor,\n\t\t\t\t\tc.companyname, \n\t\t\t\t\tc.cd_tracking_init_response, \n\t\t\t\t\tc.cd_enable_tracking, \n\t\t\t\t\tc.gateway_id, \n\t\t\t\t\tc.bank_Creditcard,\n\t\t\t\t\ts.*, \n\t\t\t\t\t(r.note_id is not null) as hasRefundRequest,\n\t\t\t\t\t r.call_date_time, \n\t\t\t\t\t r.service_notes \n\t\t\tFROM \n\t\t\t\t{$trans_table_name} as t\n\t\t\tLEFT JOIN `cs_subscription` as sub ON sub.`ss_ID` = t.`td_ss_ID`\n\t\t\tLEFT JOIN `cs_companydetails` as c ON c.`userId` = t.`userId`\n\t\t\tLEFT JOIN `cs_company_sites` as s ON `cs_ID` = `td_site_ID`\n\t\t\tleft join cs_callnotes as r on r.`transaction_id`=t.`transactionId` AND r.cn_type = 'refundrequest'  \n\t\t\tWHERE \n\t\t\t\t`{$by}` = '{$id}' \n\t\t\t\t{$where_sql}\n\t\t\t\t";
    $result = sql_query_read($sql, $cnn_cs) or dieLog(mysql_errno() . ": " . mysql_error() . "<BR>{$sql}<BR>");
    if (mysql_num_rows($result) <= 0) {
        return -1;
    }
    $transactionInfo = mysql_fetch_assoc($result);
    $transactionInfo['CCnumber'] = etelDec($transactionInfo['CCnumber']);
    $transactionInfo['bankaccountnumber'] = etelDec($transactionInfo['bankaccountnumber']);
    $transactionInfo['bankaccountnumber'] = "XXXXXX" . substr($transactionInfo['bankaccountnumber'], -4, 4);
    $transactionInfo['CCnumber_format'] = "XXXXXXXXXXXX" . substr($transactionInfo['CCnumber'], -4, 4);
    $time = strtotime($transactionInfo['transactionDate']);
    $subAcc = getRebillInfo($transactionInfo['td_rebillingID'], $time, false);
    $transactionInfo['userActiveCode'] = UserActivity(&$transactionInfo);
    $transactionInfo['userRebillCode'] = UserRebill(&$transactionInfo);
    //Shipping
    if ($transactionInfo['cd_enable_tracking'] == 'on') {
        $transactionInfo['Tracking_Deadline'] = $time + $transactionInfo['cd_tracking_init_response'] * 24 * 60 * 60;
        $transactionInfo['Tracking_Days_Left'] = floor(($transactionInfo['Tracking_Deadline'] - time()) / (24 * 60 * 60));
    }
    if ($transactionInfo['userActiveCode'] == "ACT") {
        $transactionInfo['userActiveMsg'] = "Account is Active, ";
    } else {
        if ($transactionInfo['userActiveCode'] == "INA") {
            $transactionInfo['userActiveMsg'] = "Account is Inactive, ";
        } else {
            if ($transactionInfo['userActiveCode'] == "CAN") {
                $transactionInfo['userActiveMsg'] = "Account is Cancelled, ";
            } else {
                if ($transactionInfo['userActiveCode'] == "CHB") {
                    $transactionInfo['userActiveMsg'] = "Account has been Charged Back, ";
                }
            }
        }
    }
    if ($transactionInfo['userRebillCode'] == "ACT") {
        $transactionInfo['userActiveMsg'] .= "Rebilling is Active.";
    } else {
        if ($transactionInfo['userRebillCode'] == "INA") {
            $transactionInfo['userActiveMsg'] .= "Rebilling is Inactive.";
        }
    }
    if ($transactionInfo['checkorcard'] == 'H') {
        $transactionInfo['charge_type_info'] = "Credit Card (" . $transactionInfo['cardtype'] . ")";
        if ($transactionInfo['cardtype'] == "Visa") {
            $transactionInfo['billingdescriptor'] = $transactionInfo['cc_visa_billingdescriptor'];
        }
        if ($transactionInfo['cardtype'] == "Master") {
            $transactionInfo['billingdescriptor'] = $transactionInfo['cc_master_billingdescriptor'];
        }
    }
    if ($transactionInfo['checkorcard'] == 'C') {
        $transactionInfo['charge_type_info'] = "Check Account";
        $transactionInfo['billingdescriptor'] = $transactionInfo['ch_billingdescriptor'];
    }
    if ($transactionInfo['checkorcard'] == 'W') {
        $transactionInfo['charge_type_info'] = "Web900 ";
        $transactionInfo['billingdescriptor'] = $transactionInfo['we_billingdescriptor'];
    }
    // Next Payment
    $transactionInfo['subAccountName'] = $subAcc['rd_subName'];
    $transactionInfo['chargeAmount'] = $subAcc['chargeAmount'];
    $transactionInfo['schedule'] = $subAcc['schedule'];
    $transactionInfo['nextDateInfo'] = $subAcc['nextDateInfo'];
    $transactionInfo['nextRecurDate'] = $subAcc['nextRecurDate'];
    if ($transactionInfo['nextRecurDate'] == -1) {
        $transactionInfo['nextRecurDate'] = "N/A";
    }
    if ($transactionInfo['td_enable_rebill'] == 0) {
        $transactionInfo['nextRecurDate'] = "No/Canceled Subscription";
    }
    $transactionInfo['td_recur_next_date_next'] = $subAcc['td_recur_next_date'];
    $transactionInfo['subAcc'] = $subAcc;
    $recurDate = $subAcc['nextRecurDate'];
    $transactionInfo['expires'] = 'N/A';
    $transactionInfo['expired'] = 'N/A';
    if ($transactionInfo['ss_account_status'] == 'inactive') {
        $transactionInfo['expired'] = "Expired on " . date("F j, Y", strtotime($transactionInfo['ss_account_expire_date']));
    } else {
        if ($transactionInfo['ss_account_status'] == 'active') {
            $transactionInfo['expires'] = date("F j, Y", strtotime($transactionInfo['ss_account_expire_date']));
        }
    }
    //Formatting
    $transactionInfo['phonenumber_format'] = formatPhone($transactionInfo['phonenumber']);
    $transactionInfo['fullname'] = $transactionInfo['name'] . " " . $transactionInfo['surname'];
    return $transactionInfo;
}
Example #22
0
 $mail->AddAddress('*****@*****.**', 'Name');
 $mail->AddBCC('*****@*****.**', 'Interactive QA');
 $htmlBody = '<b>First Name</b>: ' . $sFirstName . '<br />';
 $htmlBody .= '<b>Last Name</b>: ' . $sLastName . '<br />';
 $htmlBody .= '<b>Email</b>: ' . $sEmail . '<br />';
 $htmlBody .= '<b>Phone</b>: ' . formatPhone($nPhone) . '<br />';
 $htmlBody .= '<b>Address</b>: ' . $sAddress . '<br />';
 $htmlBody .= '<b>Address 2</b>: ' . $sAddress2 . '<br />';
 $htmlBody .= '<b>City</b>: ' . $sCity . '<br />';
 $htmlBody .= '<b>State</b>: ' . $sState . '<br />';
 $htmlBody .= '<b>Zip</b>: ' . $nZip . '<br />';
 $htmlBody .= '<b>Message</b>: ' . $sComments . '</p>';
 $textBody = 'First Name: ' . $sFirstName . PHP_EOL;
 $textBody .= 'Last Name: ' . $sLastName . PHP_EOL;
 $textBody .= 'Email Address: ' . $sEmail . PHP_EOL;
 $textBody .= 'Phone: ' . formatPhone($nPhone) . PHP_EOL;
 $textBody .= 'Address: ' . $sAddress . PHP_EOL;
 $textBody .= 'Address 2: ' . $sAddress2 . PHP_EOL;
 $textBody .= 'City: ' . $sCity . PHP_EOL;
 $textBody .= 'State: ' . $sState . PHP_EOL;
 $textBody .= 'Zip: ' . $nZip . PHP_EOL;
 $textBody .= 'Message: ' . $sComments . PHP_EOL;
 $mail->Subject = 'Website Contact Form';
 $mail->Body = $htmlBody;
 $mail->AltBody = $textBody;
 $mail->AddReplyTo($sEmail, $sFirstName . ' ' . $sLastName);
 $bSent = $mail->Send();
 if (!$bSent) {
     debug('Mail Error: ' . $mail->ErrorInfo);
     error('There was a problem trying to send you message.');
 }
Example #23
0
							</td>						
							<?php do_action("pmpro_orders_extra_cols_body", $order);?>
							<td><?php echo $order->membership_id;?></td>
							<td><?php echo $pmpro_currency_symbol . $order->total;?></td>
							<td>
								<?php if(!empty($order->payment_type)) echo $order->payment_type . "<br />";?>
								<?php if(!empty($order->accountnumber)) { ?>
									<?php echo $order->cardtype;?>: x<?php echo last4($order->accountnumber);?><br />
								<?php } ?>
								<?php if(!empty($order->billing->street)) { ?>
									<?php echo $order->billing->street; ?><br />																		
									<?php if( $order->billing->city &&  $order->billing->state) { ?>
										<?php echo  $order->billing->city?>, <?php echo  $order->billing->state?> <?php echo  $order->billing->zip?>  <?php if(!empty( $order->billing->country)) echo  $order->billing->country?><br />												
									<?php } ?>
								<?php } ?>
								<?php if(!empty($order->billing->phone)) echo formatPhone($order->billing->phone);?>
							</td>
							<td><?php echo $order->gateway;?><?php if($order->gateway_environment == "test") echo "(test)";?></td>
							<td>
								Payment: <?php if(!empty($order->payment_transaction_id)) echo $order->payment_transaction_id; else echo "N/A";?>
								<br />
								Subscription: <?php if(!empty($order->subscription_transaction_id)) echo $order->subscription_transaction_id; else echo "N/A";?>	
							</td>
							<td><?php echo $order->status;?></td>
							<td><?php echo date(get_option('date_format'), $order->timestamp);?></td>
							<td align="center">
								<a href="admin.php?page=pmpro-orders&order=<?php echo $order->id;?>">edit</a>
							</td>
							<td align="center">
								<a href="admin.php?page=pmpro-orders&order=-1&copy=<?php echo $order->id;?>">copy</a>
							</td>
Example #24
0
        echo "<div class='alert alert-danger fade in msg'>There were SQL errors.<br/>" . mysqli_error($db) . "</div>";
        return;
    }
    if ($row_cnt == 0) {
        echo "<div class='alert alert-warning fade in msg'>There are currently no clients on this drivers route.</div>";
    } else {
        $table .= "<table class='alignleft table table-hover'>\n            <thead class='tableHead'>\n            <tr>\n                <th>Status</th>   \n                <th>Name</th>\n                <th>Address</th>\n                <th>Phone</th>\n                <th>Delivery Notes</th>\n            </tr>\n            </thead>\n            <tbody>";
        $temp = "";
        while ($info = $sql->fetch_array()) {
            if ($info['rSuccess'] == 1) {
                $status = 'Delivered';
            } else {
                $status = 'Waiting for delivery.';
            }
            $temp .= $status . " ";
            $table .= "<tr data-cid='" . $info['cID'] . "' class='clientMapRow' style='" . ($status == 'Delivered' ? '' : 'background-color: #FFDBDB;') . "'>\n                <td>" . $status . "</td>\n                <td>" . $info['cLastName'] . ", " . $info['cFirstName'] . "</td>\n                <td>" . $info['cAddress1'] . " " . $info['cCity'] . "</td>\n                <td>" . formatPhone($info['cPhone']) . "</td>\n                <td>" . $info['cDeliveryNotes'] . "</td>\n            </tr>";
        }
        $table .= "</tbody></table>";
        echo $table;
    }
}
if ($_POST["action"] == "getMapInfo") {
    include '../connection.php';
    $driverID = $_POST["dID"];
    if (isset($_SESSION['dataOffset'])) {
        $offset = $_SESSION['dataOffset'];
    } else {
        $offset = 0;
    }
    //Set timezone for this session.
    $query = "SET @@session.time_zone = '-05:00'";
Example #25
0
{
    if (empty($phone)) {
        return "";
    }
    if (strlen($phone) == 7) {
        sscanf($phone, "%3s%4s", $prefix, $exchange);
    } else {
        if (strlen($phone) == 10) {
            sscanf($phone, "%3s%3s%4s", $area, $prefix, $exchange);
        } else {
            if (strlen($phone) > 10) {
                if (substr($phone, 0, 1) == '1') {
                    sscanf($phone, "%1s%3s%3s%4s", $country, $area, $prefix, $exchange);
                } else {
                    sscanf($phone, "%3s%3s%4s%s", $area, $prefix, $exchange, $extension);
                }
            } else {
                return "unknown phone format: {$phone}";
            }
        }
    }
    $out = "";
    $out .= isset($country) ? $country . ' ' : '';
    $out .= isset($area) ? '(' . $area . ') ' : '';
    $out .= $prefix . '-' . $exchange;
    $out .= isset($extension) ? ' x' . $extension : '';
    return $out;
}
echo formatPhone('07834 950580');
echo "<br>";
echo formatPH('07834 950580');
Example #26
0
 /**
  * displayProfile 
  * 
  * @return void
  */
 function displayProfile()
 {
     $memberId = (int) $_GET['member'];
     $this->displayHeader($memberId);
     // handle unknown user
     if ($memberId == 0) {
         echo '
         <p class="error-alert">
             <b>' . T_('Unknown member.') . '</b><br/>
         </p>';
         $this->displayFooter();
         return;
     }
     $sql = "SELECT u.fname, u.lname, u.email, u.`bio`, u.`dob_year`, u.`dob_month`, u.`dob_day`, \n                    u.`dod_year`, u.`dod_month`, u.`dod_day`, u.avatar, u.username, u.joindate, \n                    u.`activity`, u.`sex`, a.`id` AS aid, a.`address`, a.`city`, a.`state`, a.`zip`, \n                    a.`home`, a.`cell`, a.`work`  \n                FROM fcms_users AS u, fcms_address AS a \n                WHERE u.id = ?\n                AND u.id = a.user";
     $row = $this->fcmsDatabase->getRow($sql, $memberId);
     if ($row === false) {
         $this->fcmsError->displayError();
         $this->displayFooter();
         return;
     }
     $tzOffset = getTimezone($memberId);
     $joinDate = fixDate(T_('F j, Y'), $tzOffset, $row['joindate']);
     $address = formatAddress($row);
     $contact = '';
     $activityDate = T_('Never visited');
     $points = getUserParticipationPoints($memberId);
     $level = getUserParticipationLevel($points);
     // Contacts - Email
     if (!empty($row['cell'])) {
         $contact .= '<p><span>' . T_('Email') . '</span> ' . $row['email'] . '</p>';
     }
     // Contacts - Phone
     if (!empty($row['cell'])) {
         $contact .= '<p><span>' . T_('Cell') . '</span> ' . formatPhone($row['cell']) . '</p>';
     }
     if (!empty($row['home'])) {
         $contact .= '<p><span>' . T_pgettext('The beginning or starting place.', 'Home') . '</span> ' . formatPhone($row['home']) . '</p>';
     }
     if (!empty($row['work'])) {
         $contact .= '<p><span>' . T_('Work') . '</span> ' . formatPhone($row['work']) . '</p>';
     }
     // Call
     $hasPhone = false;
     $call = '';
     $tel = '';
     if (!empty($row['cell'])) {
         $tel = $row['cell'];
         $hasPhone = true;
     } else {
         if (!empty($row['home'])) {
             $tel = $row['home'];
             $hasPhone = true;
         } else {
             if (!empty($row['work'])) {
                 $tel = $row['work'];
                 $hasPhone = true;
             }
         }
     }
     if ($hasPhone) {
         $call = '<li><a class="call" href="tel:' . $tel . '">' . sprintf(T_pgettext('%s is the name of a person. Call Bob. etc.', 'Call %s'), $row['fname']) . '</a></li>';
     }
     // Activity
     if ($row['activity'] != '0000-00-00 00:00:00') {
         $activityDate = fixDate(T_('F j, Y g:i a'), $tzOffset, $row['activity']);
     }
     $bday = formatDate('F j, Y', $row['dob_year'] . '-' . $row['dob_month'] . '-' . $row['dob_day']);
     $age = getAge($row['dob_year'], $row['dob_month'], $row['dob_day']);
     $gender = $row['sex'] == 'M' ? T_('Male') : T_('Female');
     echo '
             <div id="avatar">
                 <h1><img class="avatar" src="' . getCurrentAvatar($memberId) . '" alt="avatar"/></h1>
                 ' . $level . '
             </div>
             <div class="name-contacts">
                 <h1>' . cleanOutput($row['fname']) . ' ' . cleanOutput($row['lname']) . '</h1>
                 <h2>' . cleanOutput($row['username']) . '</h2>
                 <ul>
                     ' . $call . '
                     <li><a class="email" href="mailto:' . $row['email'] . '">' . T_('Send Email') . '</a></li>
                     <li><a class="pm" href="privatemsg.php?compose=new&amp;id=' . $memberId . '">' . T_('Send Private Message') . '</a></li>
                 </ul>
             </div>
             <ul>
                 <li>
                     <ul>
                         <li>
                             <b>' . T_('Birthday') . '</b>
                             <div>' . $bday . ' (' . sprintf(T_('%s years old'), $age) . ')</div>
                         </li>
                         <li>
                             <b>' . T_('Gender') . '</b>
                             <div>' . $gender . '</div>
                         </li>
                     </ul>
                 </li>
                 <li>
                     <ul>
                         <li>
                             <b>' . T_('Location') . '</b>
                             <div>' . $address . '</div>
                         </li>
                         <li>
                             <b>' . T_('Contact') . '</b>
                             <div>' . $contact . '</div>
                         </li>
                     </ul>
                 </li>
                 <li>
                     <b>' . T_('Bio') . '</b>
                     <div>' . cleanOutput($row['bio']) . '</div>
                 </li>
                 <li>
                     <ul>
                         <li>
                             <b>' . T_('Join Date') . '</b>
                             <div>' . $joinDate . '</div>
                         </li>
                         <li>
                             <b>' . T_('Last Visit') . '</b>
                             <div>' . $activityDate . '</div>
                         </li>
                     </ul>
                 </li>
             </ul>';
     $this->displayFooter($memberId);
 }
            ?>
, <?php 
            echo $pmpro_invoice->billing->state;
            ?>
 <?php 
            echo $pmpro_invoice->billing->zip;
            ?>
 <?php 
            echo $pmpro_invoice->billing->country;
            ?>
<br />												
					<?php 
        }
        ?>
					<?php 
        echo formatPhone($pmpro_invoice->billing->phone);
        ?>
				</td>
				<?php 
    }
    ?>
				<td>
					<?php 
    if ($pmpro_invoice->accountnumber) {
        ?>
						<?php 
        echo $pmpro_invoice->cardtype;
        ?>
 <?php 
        _e('ending in', 'pmpro');
        ?>
 function update(&$order)
 {
     //define variables to send
     $gateway_environment = $order->gateway_environment;
     if (empty($gateway_environment)) {
         $gateway_environment = pmpro_getOption("gateway_environment");
     }
     if ($gateway_environment == "live") {
         $host = "api.authorize.net";
     } else {
         $host = "apitest.authorize.net";
     }
     $path = "/xml/v1/request.api";
     $loginname = pmpro_getOption("loginname");
     $transactionkey = pmpro_getOption("transactionkey");
     //$amount = $order->PaymentAmount;
     $refId = $order->code;
     $subscriptionId = $order->subscription_transaction_id;
     $cardNumber = $order->accountnumber;
     $expirationDate = $order->ExpirationDate_YdashM;
     $cardCode = $order->CVV2;
     $firstName = $order->FirstName;
     $lastName = $order->LastName;
     //do address stuff then?
     $address = $order->Address1;
     if (!empty($order->Address2)) {
         $address .= "\n" . $order->Address2;
     }
     $city = $order->billing->city;
     $state = $order->billing->state;
     $zip = $order->billing->zip;
     $country = $order->billing->country;
     //customer stuff
     $customer_email = $order->Email;
     if (strpos($order->billing->phone, "+") === false) {
         $customer_phone = $order->billing->phone;
     }
     //build xml to post
     $this->content = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" . "<ARBUpdateSubscriptionRequest xmlns=\"AnetApi/xml/v1/schema/AnetApiSchema.xsd\">" . "<merchantAuthentication>" . "<name><![CDATA[" . $loginname . "]]></name>" . "<transactionKey>" . $transactionkey . "</transactionKey>" . "</merchantAuthentication>" . "<refId>" . substr($refId, 0, 20) . "</refId>" . "<subscriptionId>" . $subscriptionId . "</subscriptionId>" . "<subscription>" . "<payment>" . "<creditCard>" . "<cardNumber>" . $cardNumber . "</cardNumber>" . "<expirationDate>" . $expirationDate . "</expirationDate>";
     if (!empty($cardCode)) {
         $this->content .= "<cardCode>" . $cardCode . "</cardCode>";
     }
     $this->content .= "</creditCard>" . "</payment>" . "<customer>" . "<email>" . substr($customer_email, 0, 255) . "</email>" . "<phoneNumber>" . substr(str_replace("1 (", "(", formatPhone($customer_phone)), 0, 25) . "</phoneNumber>" . "</customer>" . "<billTo>" . "<firstName><![CDATA[" . substr($firstName, 0, 50) . "]]></firstName>" . "<lastName><![CDATA[" . substr($lastName, 0, 50) . "]]></lastName>" . "<address><![CDATA[" . substr($address, 0, 60) . "]]></address>" . "<city><![CDATA[" . substr($city, 0, 40) . "]]></city>" . "<state><![CDATA[" . substr($state, 0, 2) . "]]></state>" . "<zip>" . substr($zip, 0, 20) . "</zip>" . "<country>" . substr($country, 0, 60) . "</country>" . "</billTo>" . "</subscription>" . "</ARBUpdateSubscriptionRequest>";
     //send the xml via curl
     $this->response = $this->send_request_via_curl($host, $path, $this->content);
     //if curl is unavilable you can try using fsockopen
     /*
     $response = send_request_via_fsockopen($host,$path,$order->content);
     */
     if (!empty($this->response)) {
         list($resultCode, $code, $text, $subscriptionId) = $this->parse_return($this->response);
         if ($resultCode == "Ok" || $code == "Ok") {
             return true;
         } else {
             $order->status = "error";
             $order->errorcode = $code;
             $order->error = $text;
             $order->shorterror = $text;
             return false;
         }
     } else {
         $order->status = "error";
         $order->error = "Could not connect to Authorize.net";
         $order->shorterror = "Could not connect to Authorize.net";
         return false;
     }
 }
Example #29
0
                echo $order->billing->state;
                echo $order->billing->zip;
                if (!empty($order->billing->country)) {
                    echo $order->billing->country;
                }
                ?>
<br/>
							<?php 
            }
            ?>
						<?php 
        }
        ?>
						<?php 
        if (!empty($order->billing->phone)) {
            echo formatPhone($order->billing->phone);
        }
        ?>
					</td>
					<td><?php 
        echo $order->gateway;
        if ($order->gateway_environment == "test") {
            echo "(test)";
        }
        ?>
</td>
					<td>
						<?php 
        _e('Payment', 'pmpro');
        ?>
: <?php 
function pmpromd_profile_shortcode($atts, $content = null, $code = "")
{
    // $atts    ::= array of attributes
    // $content ::= text within enclosing form of shortcode element
    // $code    ::= the shortcode found, when == callback name
    // examples: [pmpro_member_profile avatar="false" email="false"]
    extract(shortcode_atts(array('avatar_size' => '128', 'fields' => NULL, 'show_avatar' => NULL, 'show_bio' => NULL, 'show_billing' => NULL, 'show_email' => NULL, 'show_level' => NULL, 'show_name' => NULL, 'show_phone' => NULL, 'show_search' => NULL, 'show_startdate' => NULL, 'user_id' => NULL), $atts));
    global $current_user, $display_name, $wpdb, $pmpro_pages, $pmprorh_registration_fields;
    //some page vars
    if (!empty($pmpro_pages['directory'])) {
        $directory_url = get_permalink($pmpro_pages['directory']);
    } else {
        $directory_url = "";
    }
    if (!empty($pmpro_pages['profile'])) {
        $profile_url = get_permalink($pmpro_pages['profile']);
    }
    //turn 0's into falses
    if ($show_avatar === "0" || $show_avatar === "false" || $show_avatar === "no") {
        $show_avatar = false;
    } else {
        $show_avatar = true;
    }
    if ($show_billing === "0" || $show_billing === "false" || $show_billing === "no") {
        $show_billing = false;
    } else {
        $show_billing = true;
    }
    if ($show_bio === "0" || $show_bio === "false" || $show_bio === "no") {
        $show_bio = false;
    } else {
        $show_bio = true;
    }
    if ($show_email === "0" || $show_email === "false" || $show_email === "no") {
        $show_email = false;
    } else {
        $show_email = true;
    }
    if ($show_level === "0" || $show_level === "false" || $show_level === "no") {
        $show_level = false;
    } else {
        $show_level = true;
    }
    if ($show_name === "0" || $show_name === "false" || $show_name === "no") {
        $show_name = false;
    } else {
        $show_name = true;
    }
    if ($show_phone === "0" || $show_phone === "false" || $show_phone === "no") {
        $show_phone = false;
    } else {
        $show_phone = true;
    }
    if ($show_search === "0" || $show_search === "false" || $show_search === "no") {
        $show_search = false;
    } else {
        $show_search = true;
    }
    if ($show_startdate === "0" || $show_startdate === "false" || $show_startdate === "no") {
        $show_startdate = false;
    } else {
        $show_startdate = true;
    }
    if (isset($_REQUEST['limit'])) {
        $limit = intval($_REQUEST['limit']);
    } elseif (empty($limit)) {
        $limit = 15;
    }
    if (empty($user_id) && !empty($_REQUEST['pu'])) {
        //Get the profile user
        if (is_numeric($_REQUEST['pu'])) {
            $pu = get_user_by('id', $_REQUEST['pu']);
        } else {
            $pu = get_user_by('slug', $_REQUEST['pu']);
        }
        $user_id = $pu->ID;
    }
    if (!empty($user_id)) {
        $pu = get_userdata($user_id);
    } elseif (empty($_REQUEST['pu'])) {
        $pu = get_userdata($current_user->ID);
    }
    if (!empty($pu)) {
        $pu->membership_level = pmpro_getMembershipLevelForUser($pu->ID);
    }
    ob_start();
    ?>
	<?php 
    if (!empty($show_search)) {
        ?>
	
	<form action="<?php 
        echo $directory_url;
        ?>
" method="post" role="search" class="pmpro_member_directory_search search-form">
		<label>
			<span class="screen-reader-text"><?php 
        _e('Search for:', 'label');
        ?>
</span>
			<input type="search" class="search-field" placeholder="Search Members" name="ps" value="<?php 
        if (!empty($_REQUEST['ps'])) {
            echo esc_attr($_REQUEST['ps']);
        }
        ?>
" title="Search Members" />
			<input type="hidden" name="limit" value="<?php 
        echo esc_attr($limit);
        ?>
" />
		</label>
		<input type="submit" class="search-submit" value="Search Members">
	</form>
	<?php 
    }
    ?>
	<?php 
    if (!empty($pu)) {
        if (!empty($fields)) {
            $fields_array = explode(";", $fields);
            if (!empty($fields_array)) {
                for ($i = 0; $i < count($fields_array); $i++) {
                    $fields_array[$i] = explode(",", $fields_array[$i]);
                }
            }
        } else {
            $fields_array = false;
        }
        // Get Register Helper field options
        $rh_fields = array();
        if (!empty($pmprorh_registration_fields)) {
            foreach ($pmprorh_registration_fields as $location) {
                foreach ($location as $field) {
                    if (!empty($field->options)) {
                        $rh_fields[$field->name] = $field->options;
                    }
                }
            }
        }
        ?>
			<div id="pmpro_member_profile-<?php 
        echo $pu->ID;
        ?>
" class="pmpro_member_profile">
				<?php 
        if (!empty($show_avatar)) {
            ?>
										
					<p class="pmpro_member_directory_avatar">
						<?php 
            echo get_avatar($pu->ID, $avatar_size, NULL, $pu->display_name, array("class" => "alignright"));
            ?>
					</p>
				<?php 
        }
        ?>
				<?php 
        if (!empty($show_name) && !empty($pu->display_name)) {
            ?>
										
					<h2 class="pmpro_member_directory_name">
						<?php 
            echo $pu->display_name;
            ?>
					</h2>
				<?php 
        }
        ?>
				<?php 
        if (!empty($show_bio) && !empty($pu->description)) {
            ?>
										
					<p class="pmpro_member_directory_bio">
						<strong><?php 
            _e('Biographical Info', 'wp');
            ?>
</strong>
						<?php 
            echo $pu->description;
            ?>
					</p>
				<?php 
        }
        ?>
				<?php 
        if (!empty($show_email)) {
            ?>
										
					<p class="pmpro_member_directory_email">
						<strong><?php 
            _e('Email Address', 'pmpro');
            ?>
</strong>
						<?php 
            echo $pu->user_email;
            ?>
					</p>
				<?php 
        }
        ?>
				<?php 
        if (!empty($show_level)) {
            ?>
										
					<p class="pmpro_member_directory_level">
						<strong><?php 
            _e('Level', 'pmpro');
            ?>
</strong>
						<?php 
            echo $pu->membership_level->name;
            ?>
					</p>
				<?php 
        }
        ?>
				<?php 
        if (!empty($show_startdate)) {
            ?>
										
					<p class="pmpro_member_directory_date">
						<strong><?php 
            _e('Start Date', 'pmpro');
            ?>
</strong>
						<?php 
            echo date(get_option("date_format"), $pu->membership_level->startdate);
            ?>
					</p>
				<?php 
        }
        ?>
				<?php 
        if (!empty($show_billing) && !empty($pu->pmpro_baddress1)) {
            ?>
										
					<p class="pmpro_member_directory_baddress">
						<strong><?php 
            _e('Address', 'pmpro');
            ?>
</strong>
						<?php 
            echo $pu->pmpro_baddress1;
            ?>
<br />
						<?php 
            if (!empty($pu->pmpro_baddress2)) {
                echo $pu->pmpro_baddress2 . "<br />";
            }
            ?>
						<?php 
            if ($pu->pmpro_bcity && $pu->pmpro_bstate) {
                ?>
							<?php 
                echo $pu->pmpro_bcity;
                ?>
, <?php 
                echo $pu->pmpro_bstate;
                ?>
 <?php 
                echo $pu->pmpro_bzipcode;
                ?>
<br />
							<?php 
                echo $pu->pmpro_bcountry;
                ?>
<br />
						<?php 
            }
            ?>
					</p>
				<?php 
        }
        ?>
				<?php 
        if (!empty($show_phone) && !empty($pu->pmpro_bphone)) {
            ?>
					<p class="pmpro_member_directory_phone">
						<strong><?php 
            _e('Phone Number', 'pmpro');
            ?>
</strong>
						<?php 
            echo formatPhone($pu->pmpro_bphone);
            ?>
					</p>
				<?php 
        }
        ?>
				<?php 
        //filter the fields
        $fields_array = apply_filters('pmpro_member_profile_fields', $fields_array, $pu);
        if (!empty($fields_array)) {
            foreach ($fields_array as $field) {
                if (empty($field[0])) {
                    break;
                }
                $meta_field = $pu->{$field}[1];
                if (!empty($meta_field)) {
                    ?>
								<p class="pmpro_member_directory_<?php 
                    echo esc_attr($field[1]);
                    ?>
">
								<?php 
                    if (is_array($meta_field) && !empty($meta_field['filename'])) {
                        //this is a file field
                        ?>
										<strong><?php 
                        echo $field[0];
                        ?>
</strong>
										<?php 
                        echo pmpromd_display_file_field($meta_field);
                        ?>
										<?php 
                    } elseif (is_array($meta_field)) {
                        //this is a general array, check for Register Helper options first
                        if (!empty($rh_fields[$field[1]])) {
                            foreach ($meta_field as $key => $value) {
                                $meta_field[$key] = $rh_fields[$field[1]][$value];
                            }
                        }
                        ?>
										<strong><?php 
                        echo $field[0];
                        ?>
</strong>
										<?php 
                        echo implode(", ", $meta_field);
                        ?>
										<?php 
                    } else {
                        if ($field[1] == 'user_url') {
                            ?>
											<a href="<?php 
                            echo esc_url($meta_field);
                            ?>
" target="_blank"><?php 
                            echo $field[0];
                            ?>
</a>
											<?php 
                        } else {
                            ?>
											<strong><?php 
                            echo $field[0];
                            ?>
</strong>
											<?php 
                            $meta_field_embed = wp_oembed_get($meta_field);
                            if (!empty($meta_field_embed)) {
                                echo $meta_field_embed;
                            } else {
                                echo make_clickable($meta_field);
                            }
                            ?>
											<?php 
                        }
                    }
                    ?>
								</p>
								<?php 
                }
            }
        }
        ?>
				<div class="pmpro_clear"></div>
			</div>
			<hr />
			<?php 
        if (!empty($directory_url)) {
            ?>
				<div align="center"><a class="more-link" href="<?php 
            echo $directory_url;
            ?>
">View All Members</a></div>
			<?php 
        }
        ?>
			<?php 
    }
    ?>
	<?php 
    $temp_content = ob_get_contents();
    ob_end_clean();
    return $temp_content;
}