parent
ffab9dc4da
commit
3edb156749
5 changed files with 24 additions and 21 deletions
|
|
@ -80,15 +80,11 @@ class ZAPDisplay implements ZAPHandler {
|
|||
*/
|
||||
private function handleWords() {
|
||||
$words = array();
|
||||
$ix = 1;
|
||||
$postix = sprintf("%02d", $ix);
|
||||
$wd = 'word' . $postix;
|
||||
|
||||
while(!empty($_POST[$wd])) {
|
||||
array_push($words, $_POST[$wd]);
|
||||
$ix++;
|
||||
$postfix = sprintf("%02d", $ix);
|
||||
$wd = 'word' . $postfix;
|
||||
for ($i = 1; $i <= MAX_WORDS; $i++) {
|
||||
$key = 'word' . sprintf("%02d", $i);
|
||||
if (!empty($_POST[$key])) {
|
||||
$words[] = $_POST[$key];
|
||||
}
|
||||
}
|
||||
return $words;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,6 @@ class ZAPHome implements ZAPHandler {
|
|||
*/
|
||||
private $template = 'index';
|
||||
|
||||
/**
|
||||
* ZAP version
|
||||
*/
|
||||
private $ver;
|
||||
|
||||
/**
|
||||
* Parsable content
|
||||
*/
|
||||
|
|
@ -22,10 +17,8 @@ class ZAPHome implements ZAPHandler {
|
|||
* Constructor
|
||||
*/
|
||||
public function __construct() {
|
||||
$this->ver = ZAP_VERSION;
|
||||
extract(get_object_vars($this));
|
||||
|
||||
ob_start();
|
||||
$ver = ZAP_VERSION;
|
||||
include getZAPTemplate($this->template);
|
||||
$this->tpl .= ob_get_clean();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue