コード例 #1
0
ファイル: index.php プロジェクト: CocDamCode/fu-where-are-you
<?php

require_once '../fuway-core/db.php';
require_once '../fuway-core/api.php';
if (isset($_GET['search'])) {
    echo json_encode(search_person($_GET['search']));
}
if (isset($_GET['email']) && isset($_GET['date'])) {
    $result = array();
    try {
        $datetime = date_create($_GET['date']);
        $result = get_person_schedule($_GET['email'], $datetime);
    } catch (Exception $e) {
    }
    echo json_encode($result);
}
コード例 #2
0
ファイル: search_post.php プロジェクト: rmunro/SMS-Turks
global $title;
require_once 'db.php';
$title = msg('Search Results');
if (empty($_GET['page'])) {
    $_GET['page'] = 0;
}
if (empty($_GET['name'])) {
    $_GET['name'] = '';
}
if (empty($_GET['city'])) {
    $_GET['city'] = '';
}
if (empty($_REQUEST['name']) && empty($_REQUEST['city'])) {
    list($count, $results) = all_people();
} else {
    list($count, $results) = search_person($_REQUEST);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
include 'header.php';
?>
	<?php 
include_once "sidebar.php";
?>
	<div id="content">
		<?php 
/*
コード例 #3
0
<?php

require_once "connect.php";
function search_person($term)
{
    global $db;
    $sql = "SELECT supporter_KEY,   Concat(First_Name, ' ', Last_Name,', ', Email)as fullname FROM supporter\nWHERE CONCAT( First_Name,  ' ', Last_Name, ' ',Email ) LIKE  '%" . $term . "%'";
    $S = $db->Execute($sql) or die($db->errorMsg());
    $s = $S->GetArray();
    $out = json_encode($s);
    return $out;
}
echo search_person($_REQUEST['term']);
コード例 #4
0
<?php

require_once "_header.php";
if ($_REQUEST['term']) {
    $results = search_person($_REQUEST['term']);
}
#print_r($results);
$sql = 'Select * from supporter where point_campaign_manager_KEY = "' . $user->getCampaignManagerKey() . '" order by supporter_KEY desc';
$P = $db->Execute($sql) or die($db->errorMsg());
$p = $P->GetArray();
?>


<h1>No one likes duplicates in the database</h1>
<h3>Let's take a look</h3><br>

<form method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
">
<div class="row">
	<div class="span4">
	<label>Enter Name or Email:</label>
	<input type="text" name="term"> <input class="btn btn-primary" type="submit" value="Look em up">
	</div>
	<div class="span3">
		<br><br><a href="supporter_add.php" class="btn-large btn-success">It is a new record, I swear it</a>
	</div>
</div>
</for>
コード例 #5
0
ファイル: index.php プロジェクト: radicaldesigns/jaguar
<?php

header('Location: search.php');
require_once "boot.php";
require_once "_header.php";
$act = $_REQUEST['action'];
$people = $_REQUEST['person'];
$q = $_REQUEST['q'];
if ($_REQUEST['search']) {
    if ($_REQUEST['q']) {
        $people_results = search_person($_REQUEST['q'], $_REQUEST['order_by']);
    } else {
        if ($_REQUEST['groups_KEY']) {
            $options['groups_KEY'] = $_REQUEST['groups_KEY'];
            $people_results = search_person($_REQUEST['q'], $_REQUEST['order_by'], $options);
            #$people_results = search_list($_REQUEST['groups_KEY']);
        }
    }
    foreach ($people_results as $i) {
        $results[] = supporter_array_db($i['supporter_KEY']);
    }
}
?>

<script>

$(document).ready(function(){
//Hide the tooglebox when page load
	$("#results-filter-select").hide();
	
	$("#search-location").hide();