function event_command() { $options = array(); if(get("v") != null) { $options["value"] = get("v"); } if(get("e") != null) { $options["event"] = get("e"); } if(get("l") != null) { $options["limit"] = get("l"); } $list = Vuzit_Event::findAll(get("id"), $options); switch(get("o")) { case "csv": event_load_csv($list); break; default: header_load(); event_load_html($list, $options); footer_load(); break; } }
function search_command() { $options = array(); if (get("q") != null) { $options["query"] = get("q"); } if (get("l") != null) { $options["limit"] = get("l"); } if (get("o") != null) { $options["offset"] = get("o"); } if (get("O") != null) { $options["output"] = get("O"); } $docs = Vuzit_Document::findAll($options); header_load(); echo printArray($options); echo count($docs) . " documents found"; for ($i = 0; $i < count($docs); $i++) { $doc = $docs[$i]; ?> <h3> <?php echo $i + 1; ?> . Document - <?php echo $doc->getID(); ?> </h3> <?php if ($doc->getPageCount() != -1) { ?> <p>Results:</p> <ul> <li>Title: <?php echo $doc->getTitle(); ?> </li> <li>Page count: <?php echo $doc->getPageCount(); ?> </li> <li>File size: <?php echo $doc->getFileSize(); ?> </li> <li>Excerpt: <?php echo $doc->getExcerpt(); ?> ...</li> </ul> <?php } ?> <?php } footer_load(); }