Example #1
1
 public function results()
 {
     if (!$this->isAdmin) {
         $this->login();
     }
     $this->check();
     $this->title("Manage " . $this->application);
     $this->CSS("results", "cpanel");
     $this->CSS("pagination");
     $this->js("checkbox");
     $trash = segment(3, isLang()) === "trash" ? TRUE : FALSE;
     $total = $this->CPanel_Model->total($trash);
     $thead = $this->CPanel_Model->thead("checkbox, " . getFields($this->application) . ", Action", FALSE);
     $pagination = $this->CPanel_Model->getPagination($trash);
     $tFoot = getTFoot($trash);
     $this->vars["message"] = !$tFoot ? "Error" : NULL;
     $this->vars["pagination"] = $pagination;
     $this->vars["trash"] = $trash;
     $this->vars["search"] = getSearch();
     $this->vars["table"] = getTable(__(_("Manage " . ucfirst($this->application))), $thead, $tFoot, $total);
     $this->vars["view"] = $this->view("results", TRUE, "cpanel");
     $this->render("content", $this->vars);
 }
Example #2
0
	<div id="loading_search">
		<p>Loading search data...</p>
		<img src="images/bigrotation2.gif" alt="loading" />
	</div>
	
	<div id="inspectionDialog">
	</div>
	
	<div id="closedDialog">
	</div>

	<?php 
		//load inspection details and search results
		//echo getAllInspectionDetails();
		echo getSearch();	
	?>


	<script type="text/javascript">
	var uservoiceOptions = {
	  /* required */
	  key: 'eatsure',
	  host: 'eatsure.uservoice.com', 
	  forum: '54156',
	  showTab: true,  
	  /* optional */
	  background_color:'#35552b', 
  	  text_color: 'white',
  	  hover_color: '#31c600',
  	  alignment: 'right',
/**
 * loads the PM Table field list from the database based in an action parameter
 * then assemble the List of fields with these data, for the configuration in cases list.
 *
 * @param String $action
 * @return Array $config
 */
function getAdditionalFields($action, $confCasesList = array())
{
    if (!empty($confCasesList) && !empty($confCasesList['second']['data'])) {
        // For the case list builder in the enterprise plugin
        $caseColumns = array();
        $caseReaderFields = array();
        foreach ($confCasesList['second']['data'] as $fieldData) {
            if ($fieldData['fieldType'] != 'key') {
                $label = $fieldData['label'];
                $caseColumns[] = array('header' => $label, 'dataIndex' => $fieldData['name'], 'width' => $fieldData['width'], 'align' => $fieldData['align']);
                $caseReaderFields[] = array('name' => $fieldData['name']);
            }
        }
        return array('caseColumns' => $caseColumns, 'caseReaderFields' => $caseReaderFields, 'rowsperpage' => $confCasesList['rowsperpage'], 'dateformat' => $confCasesList['dateformat']);
    } else {
        switch ($action) {
            case 'draft':
                $config = getDraft();
                break;
            case 'simple_search':
            case 'search':
                $config = getSearch();
                break;
            case 'participated':
            case 'sent':
                $config = getParticipated();
                break;
            case 'unassigned':
                $config = getUnassigned();
                break;
            case 'paused':
                $config = getPaused();
                break;
            case 'to_revise':
                $config = getToRevise();
                break;
            case 'to_reassign':
                $config = getToReassign();
                break;
            case 'gral':
                $config = getGeneral();
                break;
            case 'todo':
            default:
                $action = 'todo';
                $config = getToDo();
                break;
        }
        return $config;
    }
}
Example #4
0
echo "type: " . $searchType . "<br>";
if (!isset($searchText)) {
    //if searchText wasn't set
    $response['status'] = 404;
    $response['results'][] = "Error: Search text empty.";
    //$response[$searchType][] = "";
    $json = json_encode($response);
    die($json);
} elseif (!isset($searchType)) {
    $response['status'] = 404;
    $response['results'][] = "Error: Search type empty.";
    //$response[$searchType][] = "";
    $json = json_encode($response);
    die($json);
} else {
    getSearch($searchText, $searchType);
}
function getUserInfo($id)
{
    $databaseName = "jmd57";
    $serverName = 'sql.njit.edu';
    $userName = '******';
    $password = '******';
    // create connection
    $connection = mysql_connect($serverName, $userName, $password);
    if (!$connection) {
        die(' Could not connect: ' . mysql_error());
    }
    // select database
    if (!mysql_select_db($databaseName, $connection)) {
        die('Could not select database');
Example #5
0
<script src="js/search.js"></script>
<div id="statuses" class="column round-left">

	<form action="search.php" method="get" id="search_form">
		<input type="text" name="q" id="query" value="<?php 
echo $_GET['q'];
?>
" autocomplete="off" />
		<span class="suggestion_loading fa fa-spinner fa-spin"></span>
		<input type="submit" class="btn btn-white" value="Search">
		<input type="button" class="btn btn-white" value="Save" id="btn_savesearch">
	</form>
<?php 
$sinceid = false;
$maxid = false;
if (isset($_GET['since_id'])) {
    $sinceid = $_GET['since_id'];
}
if (isset($_GET['max_id'])) {
    $maxid = $_GET['max_id'];
}
if (isset($_GET['q'])) {
    $q = $_GET['q'];
    getSearch($q, $sinceid, $maxid);
}
?>
</div>

<?php 
include 'inc/sidebar.php';
include 'inc/footer.php';