/**
 * Given a set of contact IDs get the values
 * @param $contactIDs
 * @param $values
 * @param $allContactIDs
 * @param $addditionalContactIDs
 * @return array
 */
function getValues(&$contactIDs, &$values, &$allContactIDs, &$addditionalContactIDs)
{
    $values = array();
    getContactInfo($contactIDs, $values);
    getAddressInfo($contactIDs, $values);
    getPhoneInfo($contactIDs, $values);
    getEmailInfo($contactIDs, $values);
    getNoteInfo($contactIDs, $values);
    getRelationshipInfo($contactIDs, $values, $allContactIDs, $addditionalContactIDs);
    getActivityInfo($contactIDs, $values, $allContactIDs, $addditionalContactIDs);
    // got to do groups, tags
    // got to do meta data
    return $values;
}
/**
 * Given a set of contact IDs get the values
 * @param $contactIDs
 * @param $values
 * @return array
 */
function getValues(&$contactIDs, &$values)
{
    $values = array();
    foreach ($contactIDs as $cid) {
        $values[$cid] = array();
    }
    getContactInfo($contactIDs, $values);
    getAddressInfo($contactIDs, $values);
    getPhoneInfo($contactIDs, $values);
    getEmailInfo($contactIDs, $values);
    getNoteInfo($contactIDs, $values);
    return $values;
}
Example #3
0
     $contactID = "";
     if (isset($_POST['contactID'])) {
         $contactID = urldecode($_POST['contactID']);
     } else {
         echo json_encode(array("message" => "Error: no contactID argument"));
         return;
     }
     $site = "";
     if (isset($_POST['site'])) {
         $site = urldecode($_POST['site']);
         $sites = array($site);
     } else {
         echo json_encode(array("message" => "Error: site information is required"));
         return;
     }
     $d = getContactInfo($contactID);
     echo json_encode($d);
     return;
 } else {
     if ($action == "load") {
         $site = "";
         if (isset($_POST['site'])) {
             $site = urldecode($_POST['site']);
             $sites = array($site);
         } else {
             echo json_encode(array("message" => "Error: site information is required"));
             return;
         }
         $d = loadContacts();
         echo json_encode($d);
         return;
Example #4
0
/**
 * Given a set of contact IDs get the values
 * @param $contactIDs
 * @param $values
 * @return array
 */
function getValues(&$contactIDs, &$values)
{
    $values = array();
    foreach ($contactIDs as $cid) {
        $values[$cid] = array();
    }
    getContactInfo($contactIDs, $values);
    getLocationInfo($contactIDs, $values);
    return $values;
}
Example #5
0
		<input class="search" placeholder="Search Names" />
		<button class="sort btn btn-primary" data-sort="name">
			Sort by name
		</button>
		<div class="table-responsive">
			<table class="table table-striped">
				<thead>
					<tr>
					  <th>Contact Name</th>
					  <th>Contact Number</th>
					  <th>Tags</th>
					</tr>
				</thead>
				<tbody class="list">

				<?php 
// include the configs / constants for the database connection
require_once "classes/connection.php";
//open mysql database connection
$mysqli = openConnection();
//display contacts information for the logged in user in table rows
getContactInfo($mysqli, false);
// close connection
closeConnection($mysqli);
?>
					 
				</tbody>
			</table>
	    </div>
	</div>
</div>
Example #6
0
<?php

/**
 * Simple Contact Management App
 *
 * contact.php - show contact information
 *
 */
require_once 'functions.php';
if (!isset($_GET['cid'])) {
    // If no contact ID specified, redirect to the home page
    header("Location: index.php");
    exit(0);
}
$contact = getContactInfo($_GET['cid']);
if ($contact) {
    $pageTitle = "Contact Info: " . $contact['name'];
} else {
    $pageTitle = "Contact Not Found";
}
printHtmlHeader($pageTitle);
if ($contact) {
    ?>
    <h2><?php 
    echo $contact['name'];
    ?>
</h2>
    <ul id="contact-info">
        <li><strong>Email: </strong>
            <a href="mailto:<?php 
    echo htmlspecialchars($contact['email']);
Example #7
0
    }
    $featuredImageAlign = $rowFeatured["image_align"];
}
//Call - getSetup is used everywhere
getSetup();
//Call these functions depending on which page you are visiting
if ($_GET['ref'] > "") {
    getPage();
    $theTitle = $setupTitle . " - " . $pageTitle;
} else {
    if (basename($_SERVER['PHP_SELF']) == "about.php") {
        getAbout();
        $theTitle = $setupTitle . " - " . $aboutTitle;
    } else {
        if (basename($_SERVER['PHP_SELF']) == "contact.php") {
            getContactInfo();
            $theTitle = $setupTitle . " - " . $contactHeading;
        } else {
            if (basename($_SERVER['PHP_SELF']) == "services.php") {
                getServices();
                $theTitle = $setupTitle . " - " . $servicesHeading;
            } else {
                if (basename($_SERVER['PHP_SELF']) == "team.php") {
                    getTeam();
                    $theTitle = $setupTitle . " - " . $teamHeading;
                } else {
                    $theTitle = $setupTitle;
                }
            }
        }
    }
Example #8
0
		
		
		<div class="table-responsive">
			<table class="table table-striped">
				<thead>
					<tr>
					  <th>Select</th>
					  <th>Contact Name</th>
					  <th>Contact Number</th>
					  <th>Tags</th>
					</tr>
				</thead>
				<tbody class="list">

				<?php 
// include the configs / constants for the database connection
require_once "classes/connection.php";
//open mysql database connection
$mysqli = openConnection();
//display contacts information for the logged in user in table rows
getContactInfo($mysqli, true);
// close connection
closeConnection($mysqli);
?>
					 
				</tbody>
			</table>
	    </div>
		</form>
	</div>
</div>