Ejemplo n.º 1
0
function search($busqueda)
{
    $usuario = searchUsers($busqueda);
    $mercha = searchMercha($busqueda);
    $contenido = searchContenido($busqueda);
    $resultado_consulta = array();
    $resultado_consulta[0] = $usuario;
    $resultado_consulta[1] = $mercha;
    $resultado_consulta[2] = $contenido;
    return $resultado_consulta;
}
Ejemplo n.º 2
0
require '../other/config.php';
// config.php is always required.
require '../functions/generalFunctions.php';
// generalFunctions.php is required on almost every page. It contains general functions used on many pages.
require '../functions/appointmentsOverviewFunctions.php';
// appointmentsOverviewFunctions.php contains all the functions needed on appointmentsoverview.php
checkIfLoggedIn();
// Check if the user is logged in.
checkIfSetDelete($con);
// Check if the user tried to delete an appointment.
checkIfSearchRights();
// Check if the user has search rights, in case he manually tried to search in the URL field.
$appointments = searchAppointments($con);
// An array of all the found appointments.
$users = isset($_GET['search']) && !empty($_GET['search']) ? searchUsers($con) : [];
//Only make an array of users when a search is set and it isn't empty.
require '../pages/requireshtml/htmlTillEndHeader.php';
?>
	<div class="column">
			<div class="lined">
				<h1>Afsprakenoverzicht</h1>
				<span class="bold-line"></span>
			</div>
			<p>
				U bent op de pagina waar u uw afspraken kunt inzien en verwijderen.
				Druk naast de afspraak op 'Meer info' om meer informatie te zien over deze afspraak.
			</p> 
			<p> Hier kunt u ook een toekomstige afspraak wijzigen.
				Druk naast de afspraak op 'Verwijderen' om deze afspraak te verwijderen.
			</p>
Ejemplo n.º 3
0
if (!empty($_POST)) {
    // On est arrivé en postant un formulaire
    require MODELES . 'membres/searchUsers.php';
    // On traite la recherche :
    $criteres = [];
    if (isset($_POST['criteres_all']) && $_POST['criteres_all']) {
        $criteres = [];
    } else {
        if (isset($_POST['criteres_email']) && $_POST['criteres_email']) {
            $criteres[] = 'email';
        }
        if (isset($_POST['criteres_username']) && $_POST['criteres_username']) {
            $criteres[] = 'pseudo';
        }
    }
    $results = searchUsers($_POST['keywords'], $criteres);
    $contents['previousSearch'] = $_POST['keywords'];
    // echo '<pre>';
    // var_dump($results);
    // echo '</pre>';
    // On prépare pour affichage les résultats de recherche :
    if ($results) {
        // Afficher les résultats
        $contents['searchResults'] = $results;
    } else {
        $contents = [];
    }
} else {
    // On n'a pas encore posté de formulaire
    $contents = [];
}
Ejemplo n.º 4
0
    case 'fetch':
        doCartoSqlApiPush($_REQUEST);
        break;
    case 'validate':
        doAWebValidate($_REQUEST);
        break;
    case 'is_human':
        validateCaptcha($_REQUEST);
        break;
    case 'search_projects':
    case 'search_project':
        searchProject($_REQUEST);
        break;
    case 'search_users':
    case 'search_user':
        searchUsers($_REQUEST);
        break;
        // case 'advanced_project_search':
        //   advancedSearchProject($_REQUEST);
        //   break;
    // case 'advanced_project_search':
    //   advancedSearchProject($_REQUEST);
    //   break;
    default:
        returnAjax(array('status' => false, 'error' => 'Invalid action', 'human_error' => "The server recieved an instruction it didn't understand. Please try again.", 'action' => $do, 'request' => $_REQUEST, 'post' => $_POST, 'get' => $_GET));
}
function searchProject($get)
{
    /***
     *
     ***/
<?php

include_once 'db_connect.php';
include_once 'functions.php';
if ($_POST["action"] == "add") {
    addUser($_POST["fname"], $_POST["lname"], $_POST["email"], $_POST["phone"], $_POST["gender"], $_POST["street"], $_POST["city"], $_POST["state"], $_POST["zip"], $mysqli);
} else {
    if ($_POST["action"] == "edit") {
        updateUser($_POST["id"], $_POST["fname"], $_POST["lname"], $_POST["email"], $_POST["phone"], $_POST["gender"], $_POST["street"], $_POST["city"], $_POST["state"], $_POST["zip"], $mysqli);
    } else {
        if ($_POST["action"] == "remove") {
            removeUser($_POST["id"], $mysqli);
        } else {
            if ($_POST["action"] == "search") {
                searchUsers($_POST["type"], $_POST["query"], $mysqli);
            }
        }
    }
}
Ejemplo n.º 6
0
                <th width="15%">Username</th>
                <th width="15%">Enable</th>
				<th width="15%">Role</th>
				<th width="40%"></th>
              </tr>
            </thead>
		<tbody>
			<form action="" method="post">
			<center>
				<button id="new" name="new" class="btn btn-primary" type="submit" style="width:40%">New User</button>
				</center>
				<br/>
			</form>
			<br/>
			<?php 
        searchUsers();
    }
}
?>
		<tbody>
	  </table>
</div>	  

<?php 
include 'footer.php';
?>
   
        
    </body>     
</html>
Ejemplo n.º 7
0
// figure out how to strip the extensions in each picTitle OR add an unqualified picTitle field in pictures table
$debug = false;
session_start();
require "class_lib.php";
$username = $_SESSION['username'];
printToolbar($username, false);
$search = $_POST['search'];
echo "</br>";
echo "<h1>Search Results</h1>";
echo "<h3>Searched for: \"{$search}\"</h3>";
$db_server = connect();
$numResults = 0;
print "<hr />";
echo "<h3>Users</h3>";
$oldNumResults = $numResults;
$numResults = searchUsers($search, $numResults, $db_server);
if ($oldNumResults == $numResults) {
    echo "&nbsp&nbsp&nbsp&nbspNo results found.";
}
echo "</br>";
print "<hr />";
echo "<h3>Albums</h3>";
$oldNumResults = $numResults;
$numResults = searchAlbums($search, $numResults, $db_server);
if ($oldNumResults == $numResults) {
    echo "&nbsp&nbsp&nbsp&nbspNo results found.";
}
echo "</br>";
print "<hr />";
echo "<h3>Pictures</h3>";
$oldNumResults = $numResults;
Ejemplo n.º 8
0
		<title>SCWES</title>
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
		<link href="css/styles.css" rel="stylesheet">
	</head>
	<body>
  
<!-- Nav bar -->
  <?php 
include 'nav.php';
?>

<div class="container">
	<?php 
$search = $_GET['search'];
$result = searchUsers($search);
foreach ($result as $user) {
    $content = '<div class="media">';
    $content .= '	<div class="media-left media-middle">';
    $content .= '		<a href="profile.php?id=' . $user["id"] . '">';
    $content .= '			<img class="media-object search-profile-picture" src="' . $user['profile_picture'] . '" alt="Profile Picture">';
    $content .= '		</a>';
    $content .= '	</div>';
    $content .= '	<div class="media-body">';
    $content .= '		<a href="profile.php?id=' . $user["id"] . '">';
    $content .= '			<h4 class="media-heading">' . $user['username'] . '</h4>';
    $content .= '		</a>';
    $content .= '	</div>';
    $content .= '</div>';
    echo $content;
}