コード例 #1
0
ファイル: Resource.php プロジェクト: brandon-garcia/resources
 public static function getSearch()
 {
     if (!isset($_SESSION['resourceSearch'])) {
         Resource::resetSearch();
     }
     return $_SESSION['resourceSearch'];
 }
コード例 #2
0
ファイル: index.php プロジェクト: jsteverman/resources
** CORAL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License along with CORAL.  If not, see <http://www.gnu.org/licenses/>.
**
**************************************************************************************************************************
*/
session_start();
include_once 'directory.php';
//print header
$pageTitle = 'Home';
include 'templates/header.php';
//used for creating a "sticky form" for back buttons
//except we don't want it to retain if they press the 'index' button
//check what referring script is
if ($_SESSION['ref_script'] != "resource.php") {
    Resource::resetSearch();
}
$search = Resource::getSearch();
$_SESSION['ref_script'] = $currentPage;
?>

<div style='text-align:left;'>
<table class="headerTable" style="background-image:url('images/header.gif');background-repeat:no-repeat;">
<tr style='vertical-align:top;'>
<td style="width:155px;padding-right:10px;">
  <form method="get" action="ajax_htmldata.php?action=getSearchResources" id="resourceSearchForm">
    <?php 
foreach (array('orderBy', 'page', 'recordsPerPage', 'startWith') as $hidden) {
    echo Html::hidden_search_field_tag($hidden, $search[$hidden]);
}
?>