• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP formatPhone函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中formatPhone函数的典型用法代码示例。如果您正苦于以下问题:PHP formatPhone函数的具体用法?PHP formatPhone怎么用?PHP formatPhone使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了formatPhone函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: formatContact

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;
}
开发者ID:anthony87burns,项目名称:codeup-web-exercises,代码行数:10,代码来源:contact-parser.php


示例2: pmpro_formatAddress

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;
}
开发者ID:AmpleTech,项目名称:paid-memberships-pro,代码行数:30,代码来源:functions.php


示例3: writeContent

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 
}
开发者ID:prymribb,项目名称:starter,代码行数:73,代码来源:user.php


示例4: htmlspecialchars

            $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>
开发者ID:mindfeederllc,项目名称:openemr,代码行数:31,代码来源:orders_results.php


示例5: ucfirst

            $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>
开发者ID:evan2945,项目名称:Web-Programming,代码行数:31,代码来源:genout.php


示例6: formatPhone

, <?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 
开发者ID:kaiifalcutela,项目名称:eatdk,代码行数:31,代码来源:account.php


示例7: _e

    } 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;
            }
        }
开发者ID:mathieuhays,项目名称:paid-memberships-pro,代码行数:31,代码来源:checkout.php


示例8: pretendSend

 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();
 }
开发者ID:Nuwira,项目名称:smsgw,代码行数:17,代码来源:Sms.php


示例9: trim

							<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>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:memberslist.php


示例10: page

	<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>
开发者ID:aguynamedirvin,项目名称:Paradise-Construction,代码行数:30,代码来源:free_estimate.php


示例11: getDeliverys

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>";
}
开发者ID:Xaranta,项目名称:MOW-Delivery,代码行数:40,代码来源:functions.php


示例12: displayAddressInCategory

 /**
  * 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>';
     }
 }
开发者ID:lmcro,项目名称:fcms,代码行数:70,代码来源:addressbook_class.php


示例13: billing_content_func


//.........这里部分代码省略.........
                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 
            }
            ?>
开发者ID:TakenCdosG,项目名称:admissionsrevolution_new,代码行数:66,代码来源:shortcode.php


示例14: pmpro_getClassForField

						?>
					</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>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:checkout.php


示例15: getAddressGroups

?>
<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 {
开发者ID:NWhitaker27,项目名称:PHPClassSummer2015,代码行数:31,代码来源:add.php


示例16: array

        }
    }
}
//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';
开发者ID:amryh7,项目名称:radice,代码行数:31,代码来源:form-val.php


示例17: foreach

	<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>
开发者ID:estranged42,项目名称:csc337-website,代码行数:31,代码来源:index03.php


示例18: cMemberDb

    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 {
开发者ID:akadeedub,项目名称:MemberDatabase,代码行数:31,代码来源:SearchByName.php


示例19: array

    } 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'];
开发者ID:sc6,项目名称:FoodBah-v.1,代码行数:31,代码来源:index.php


示例20: _

 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"] != "") {
开发者ID:dpredster,项目名称:core,代码行数:31,代码来源:student_view_details.php



注:本文中的formatPhone函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP formatPrice函数代码示例发布时间:2022-05-15
下一篇:
PHP formatOutputWebLink函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap