コード例 #1
0
function userSearchResults()
{
    echo "<!-- User search results modal box -->\n";
    echo "<div id=\"usersearch\" style=\"display:none;\">\n";
    echo "<p>Search Results</p>\n";
    echo "<form enctype='multipart/form-data' action='friendmgmt.php' method='post'>\n";
    getSearchResults($_GET['s']);
    echo "</form>\n";
    echo "<div class=\"functioncancel\"><a href=\"friends.php\">Cancel</a></div>\n";
    echo "</div>\n";
    echo "<!-- User search results modal box end -->\n";
}
コード例 #2
0
ファイル: sem_available_users.php プロジェクト: ratbird/hope
        </td>
    </tr>

    <tr>
        <td nowrap>&nbsp;<?php 
echo _("freie Personensuche");
?>
</td>
    </tr>
    <tr>
        <td valign="top">

    <?
        $search_exp = Request::get('search_exp');
        if ($search_exp):
            $users = getSearchResults(trim($search_exp), $range_id, 'sem');
            if ($users): ?>
                <select name="searchPersons[]" size="5" multiple style="width: 90%;">
                <? if (is_array($users)) foreach ($users as $user) : ?>
                    <option value="<?php 
echo htmlReady($user['username']);
?>
">
                        <?php 
echo htmlReady(my_substr($user['fullname'], 0, 35));
?>
 (<?php 
echo $user['username'];
?>
), <?php 
echo $user['perms'];
コード例 #3
0
ファイル: page-search.php プロジェクト: altim/kallababy
Template Name: Searched Listings
*/
?>

<?php 
get_header('inner');
$mylocale = get_bloginfo('language');
?>

			<section class="listing-results browsed-listings">
				<div class="wc cf">
					<?php 
$keywords = $_REQUEST["keywords"];
$pagination = isset($_REQUEST["pagination"]) ? $_REQUEST["pagination"] : 1;
$offset = ($pagination - 1) * 12;
$searchResults = getSearchResults($keywords, $offset);
$paidOttawa = array_filter($searchResults, "filter_paid_ottawa");
$paidOutsideOttawa = array_filter($searchResults, "filter_paid_outside_ottawa");
$basicOttawa = array_filter($searchResults, "filter_basic_ottawa");
$basicOutsideOttawa = array_filter($searchResults, "filter_basic_outside_ottawa");
shuffle($paidOttawa);
shuffle($paidOutsideOttawa);
shuffle($basicOttawa);
shuffle($basicOutsideOttawa);
?>
					<h1><?php 
echo getNumberOfSearchResults($keywords);
?>
 <?php 
_e('Results Available', 'kb');
?>
コード例 #4
0
    $X = SmartyPaginate::getCurrentIndex();
    $Y = SmartyPaginate::getLimit();
    $searchSQL = "SELECT * FROM sionapros_news WHERE 1 ORDER BY news_no DESC LIMIT {$X},{$Y}";
    $result = $dbcon->execute($searchSQL);
    foreach ($result as $row) {
        // collect each record into $_data
        $data[] = $row;
    }
    // now we get the total number of records from the table
    $rowsSQL = "SELECT COUNT(*) FROM sionapros_news WHERE 1";
    $dbcon->query($rowsSQL);
    #$rowNo = $rows[0];
    SmartyPaginate::setTotal($dbcon->getValue());
    $dbcon->free();
    return $data;
}
$results = getSearchResults($db);
if (sizeof($results) == 0) {
    $searchMsg = 'NO ARTICLES WERE FOUND';
    $smarty->assign('searchMsg', $searchMsg);
} else {
    // assign your db results to the template
    $smarty->assign('news', $results);
    // assign {$paginate} var
    SmartyPaginate::assign($smarty);
}
$content = $smarty->fetch('./news/tm0.news.display_news.tpl.html');
SmartyPaginate::disconnect();
?>

コード例 #5
0
$msgh = "";
if (empty($query)) {
    $msgh = '<div class="error">No results found. Please modify your search query.</div>';
} else {
    $url = implode("&", $getUrl);
    $querysql = implode(" AND ", $query);
    $per_page = 10;
    $no_of_paginations = countSearchResults($querysql);
    $pages = ceil(mysql_result($no_of_paginations, 0) / $per_page);
    $page = isset($_GET['page']) ? (int) $_GET['page'] : 1;
    if ($page > $pages) {
        header("Location: pagenotfound.php");
        exit;
    }
    $start = ($page - 1) * $per_page;
    $results = getSearchResults($querysql, $start, $per_page);
    $msgh = '<div class="success">Showing the results of your search</div>';
}
?>
<!DOCTYPE HTML>
<head>
	<title>Out Patient Department - Emergency Room | Bacnotan District Hospital - Patient Information System</title>
	<?php 
include 'templates/meta.php';
?>
    <link rel="icon" href="favicon.ico" type="image/ico"/>
    <link href="css/styleMain.css" rel="stylesheet" type="text/css">
    <link href="css/styleOpdEr.css" rel="stylesheet" type="text/css">
    <link type="text/css" href="jquery/css/custom/jquery.custom.css" rel="Stylesheet" />
    <script type="text/javascript" src="jquery/jquery.min.js"></script>
	<script type="text/javascript" src="jquery/jquery.maskedinput.js"></script>
コード例 #6
0
    $Y = SmartyPaginate::getLimit();
    $searchSQL = "SELECT * FROM sionapros_pubs WHERE 1 {$searchSpec} ORDER BY pub_date DESC LIMIT {$X},{$Y}";
    $result = $dbcon->execute($searchSQL);
    $i = 0;
    foreach ($result as $row) {
        #$path = './admin'.substr($row['doc'], 1, strlen($row['doc']));
        $data[$i] = $row;
        #$data[$i]['path'] = $path;
        $i++;
    }
    // now we get the total number of records from the table
    $rowsSQL = "SELECT COUNT(*) FROM sionapros_pubs WHERE 1 {$searchSpec}";
    $dbcon->query($rowsSQL);
    #$rowNo = $rows[0];
    SmartyPaginate::setTotal($dbcon->getValue());
    return $data;
}
$results = getSearchResults($db, $searchSpec);
if (sizeof($results) == 0) {
    $searchMsg = 'NO PUBLICATIONS HAVE BEEN UPLOADED YET';
    $smarty->assign('searchMsg', $searchMsg);
} else {
    // assign your db results to the template
    $smarty->assign('file_title', $results);
    // assign {$paginate} var
    SmartyPaginate::assign($smarty);
}
$currentyr = date('Y');
$smarty->assign('currentyr', $currentyr);
$otpt_contentbox = $smarty->fetch("publications.cb.tpl.html");
SmartyPaginate::disconnect();
コード例 #7
0
            break;
        case $state->getTreeClose():
            $id = $state->getTreeClose()->getParam('id');
            if (!isset($_SESSION['tree'])) {
                $_SESSION['tree'] = array();
            }
            $_SESSION['tree']["{$id}"] = 'closed';
            exit;
            break;
        default:
            break;
    }
    if (isset($_GET['ajax'])) {
        exit('success');
    }
    $searchResults = getSearchResults();
    $selectedRes = $state->getSelectedResource();
    $selectedTag = $state->getSelectedTag();
    ?>
<!doctype html>
<html lang="en">
	<head>
		<title>Groph</title>
		<meta charset="utf-8">
		<link rel="stylesheet" href="styles.css">
		<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
		<script>
			$(function() {
				<?php 
    /**
     * If the user is adding a resource with
コード例 #8
0
    $searchSQL = "SELECT p.*,c.value FROM sionapros_pubs AS p INNER JOIN sionapros_categories AS c";
    $searchSQL .= " ON p.category = c.id WHERE 1 {$_SESSION['search']} ORDER BY id DESC LIMIT {$X},{$Y}";
    $result = $dbcon->execute($searchSQL);
    foreach ($result as $row) {
        // collect each record into $_data
        $data[] = $row;
    }
    // now we get the total number of records from the table
    $rowsSQL = "SELECT COUNT(*) FROM sionapros_pubs AS p WHERE 1 {$_SESSION['search']}";
    $dbcon->query($rowsSQL);
    #$rowNo = $rows[0];
    SmartyPaginate::setTotal($dbcon->getValue());
    $dbcon->free();
    return $data;
}
$results = getSearchResults($db, $proj_no);
if (sizeof($results) == 0) {
    $searchMsg = 'NO PUBLICATIONS HAVE BEEN UPLOADED';
    $smarty->assign('searchMsg', $searchMsg);
} else {
    // assign your db results to the template
    $smarty->assign('docs', $results);
    // assign {$paginate} var
    SmartyPaginate::assign($smarty);
}
$smarty->assign('proj_no', $proj_no);
$content = $smarty->fetch('./pubs/pubs.show_pubs.tpl.html');
SmartyPaginate::disconnect();
?>

コード例 #9
0
<?
# Lifter010: TODO
    use Studip\Button;
?>
<? $search_exp = trim(Request::get('search_exp')); ?>
<form action="<?php 
echo URLHelper::getLink("#{$anker}");
?>
" method="post" style="display: inline">
    <?php 
echo CSRFProtection::tokenTag();
?>
    <?
    if ($search_exp) :
        $users = getSearchResults($search_exp, Request::option('role_id'));
        if ($users) :
    ?>
    <select name="persons_to_add[]" size="10" multiple style="width: 90%">
        <? if (is_array($users)) foreach ($users as $user) : ?>
        <option value="<?php 
echo $user['username'];
?>
">
            <?php 
echo htmlReady(my_substr($user['fullname'], 0, 35));
?>
 (<?php 
echo $user['username'];
?>
), <?php 
echo $user['perms'];
コード例 #10
0
<?php

require "includes/mysql_database_connection.php";
require "includes/search_user_function.php";
include "includes/profile_management_function.php";
require "includes/util.php";
require "includes/session.php";
redirectToHTTPS();
if (isset($_POST['searchSubmit'])) {
    $searchTxt = mysql_real_escape_string($_POST['searchField']);
    $searchTerm = mysql_real_escape_string($_POST['searchOptions']);
    $allUsernamesWithNoDuplicates = getSearchResults($searchTxt, $searchTerm);
    if (isset($allUsernamesWithNoDuplicates)) {
        if (!empty($allUsernamesWithNoDuplicates)) {
            $msg = sizeof($allUsernamesWithNoDuplicates) . " results found";
        } else {
            $msg = "<font color=red>No results found</font>";
        }
    } else {
        $msg = "<font color=red>Invalid Character found.Try different keywords</font>";
    }
} else {
    $msg = "";
    $searchTxt = "";
}
?>

<script type="text/javascript" language="javascript" src="js/userSearch.js">

    
コード例 #11
0
ファイル: index.php プロジェクト: Alwnikrotikz/bf2stats
    # nothing todo -> load from cookie
    $LEADERBOARD = isset($_COOKIE['leaderboard']) ? $_COOKIE['leaderboard'] : '';
    if ($PID != 0) {
        $LEADER = getLeaderBoardEntries(urldecode($PID));
        # query from database
    } else {
        $LEADER = getLeaderBoardEntries($LEADERBOARD);
        # query from database
    }
    #if ($LEADERBOARD==0) $LEADERBOARD = '';
    include_once './template/my-leaderboard.php';
    #echo $template;
} elseif (strcasecmp($GO, 'search') == 0) {
    $SEARCHVALUE = isset($_POST["searchvalue"]) ? $_POST["searchvalue"] : "0";
    if ($SEARCHVALUE) {
        $searchresults = getSearchResults($SEARCHVALUE);
    }
    include_once './template/search.php';
    #echo $template;
} else {
    // show the top ten
    $LASTUPDATE = 0;
    $NEXTUPDATE = 0;
    if (isCached('home')) {
        $template = getCache('home');
        $LASTUPDATE = intToTime(getLastUpdate(getcwd() . '/cache/home.cache'));
        $NEXTUPDATE = intToTime(getNextUpdate(getcwd() . '/cache/home.cache', RANKING_REFRESH_TIME));
    } else {
        $topten = getTopTen();
        include_once './template/home.php';
        // write cache file