function __construct($settings) { parent::__construct(); $this->name = "<name>{$settings['name']}</name>"; $this->icon = "<icon>{$settings['icon']}</icon>"; $this->head = $settings['head'] != '' ? "<head>{$settings['head']}</head>" : ''; $this->foot = $settings['foot'] != '' ? "<foot>{$settings['foot']}</foot>" : ''; //non xml-vars $this->feeds = $settings['feeds'] != '' ? $settings['feeds'] : ''; // var_dump($this->feeds); // Omnomnomnom if (isset($_REQUEST['feedcookie'])) { $this->cookies = ''; foreach ($_REQUEST as $feed => $val) { if ($val == 'on') { $this->cookies .= str_replace('_', ' ', $feed) . ','; } // echo($feed . ' => ' . $val .' ' ); } setcookie('feeds', $this->cookies, time() + 60 * 60 * 24 * 7 * 4 * 6); } else { if (isset($_COOKIE['feeds'])) { $this->cookies = $_COOKIE['feeds']; } setcookie('feeds', $this->cookies, time() + 60 * 60 * 24 * 7 * 4 * 6); // Six months expiry time } $this->getFeeds(); }
function __construct($settings) { parent::__construct(); $this->configPath = '../mapdata/uumap.xml'; $this->name = "<name>{$settings['name']}</name>"; $this->icon = isset($settings['icon']) ? "<icon>{$settings['icon']}</icon>" : ''; $this->head = isset($settings['head']) ? "<head>{$settings['head']}</head>" : ''; }
function __construct($settings) { parent::__construct(); $this->name = isset($settings['name']) ? "<name>{$settings['name']}</name>" : ''; $this->icon = isset($settings['icon']) ? "<icon>{$settings['icon']}</icon>" : ''; $this->head = isset($settings['head']) ? "<head>{$settings['head']}</head>" : ''; $this->body = isset($settings['body']) ? "<body>{$settings['body']}</body>" : ''; $this->foot = isset($settings['foot']) ? "<foot>{$settings['foot']}</foot>" : ''; $this->body = str_replace('-bpar-', '<p>', $this->body); $this->body = str_replace('-epar-', '</p>', $this->body); }
function __construct($settings) { parent::__construct(); $this->name = isset($settings['name']) ? "<name>{$settings['name']}</name>" : ''; $this->icon = isset($settings['icon']) ? "<icon>{$settings['icon']}</icon>" : ''; $this->head = isset($settings['head']) ? "<head>{$settings['head']}</head>" : ''; $this->names = isset($settings['body']) ? $settings['body']['person'] : ''; $this->foot = isset($settings['foot']) ? "<foot>{$settings['foot']}</foot>" : ''; $this->body = "<body>"; foreach ($this->names as $name) { $this->body .= "<item>" . $name . "</item>"; } $this->body .= "</body>"; }
function __construct($settings) { parent::__construct(); $this->name = "<name>{$settings['name']}</name>"; $this->icon = "<icon>{$settings['icon']}</icon>"; $this->head = $settings['head'] != '' ? "<head>{$settings['head']}</head>" : ''; $this->foot = $settings['foot'] != '' ? "<foot>{$settings['foot']}</foot>" : ''; // $this->body = ($settings['feed'] != '')? // "<body>$settings[feed]</body>": ''; //non xml-vars $this->feed = $settings['feed'] != '' ? "{$settings['feed']}" : ''; $this->type = $settings['type'] != '' ? "{$settings['type']}" : ''; @$this->getFeed(); }
function __construct($settings) { parent::__construct(); $this->settings = $settings; // FIXME: failout when a setting is not set $this->name = isset($settings['name']) && $settings['name'] != '' ? "<name>{$settings['name']}</name>" : ''; $this->icon = isset($settings['icon']) && $settings['icon'] != '' ? "<icon>{$settings['icon']}</icon>" : ''; $this->head = isset($settings['head']) && $settings['head'] != '' ? "<head>{$settings['head']}</head>" : ''; $this->contentXML = <<<XML <section> <timeedit> <view> {$this->name} {$this->icon} {$this->head} </view> </timeedit> </section> XML; }
public function __construct($settings) { parent::__construct(); $this->name = "<name>{$settings['name']}</name>"; $this->icon = "<icon>{$settings['icon']}</icon>"; $this->head = "<head>{$settings['head']}</head>"; $this->settings = $settings; $this->ldap = new LDAP($settings['hosturl'], $settings['hostport'], $settings['basedn'], $settings['ldapattribs'], $settings['maxetoget']); //FIXME only for testing with many replies? $this->numToShow = (int) $settings['numtoshow']; if (isset($_REQUEST['numtoshow'])) { $this->numToShow = strip_tags($_REQUEST['numtoshow']); } if (isset($_REQUEST['page'])) { $this->page = '<page><value>' . strip_tags($_REQUEST['page']) . '</value></page>'; } // Used by javascript JS knows instance name for separation if (isset($_REQUEST['empsearchstring'])) { $this->searchString = strip_tags($_REQUEST['empsearchstring']); $this->searchString = trim($this->searchString); $this->searchString = preg_replace('/\\s+/', ' ', $this->searchString); mb_internal_encoding("UTF-8"); mb_regex_encoding("UTF-8"); $this->searchString = mb_strtolower($this->searchString); $this->searchString = mb_ereg_replace('[^' . $this->alwdChars . ']', '', $this->searchString); } //Uses instance name('name') for instance separation when not using js. if (isset($_REQUEST[$settings['name']])) { $this->searchString = strip_tags($_REQUEST[$settings['name']]); $this->searchString = trim($this->searchString); $this->searchString = preg_replace('/\\s+/', ' ', $this->searchString); mb_internal_encoding("UTF-8"); mb_regex_encoding("UTF-8"); $this->searchString = mb_strtolower($this->searchString); $this->searchString = mb_ereg_replace('[^' . $this->alwdChars . ']', '', $this->searchString); } $this->nonEmptySearchStr = $this->searchString != ''; //Default form. if ($this->nonEmptySearchStr) { $formValue = '<value>' . $this->searchString . '</value>'; } else { $formValue = ''; } $this->form = <<<FORM <form> <name>{$settings['name']}</name> <action></action> <method>get</method> {$formValue} {$this->page} <empbutton> <type>submit</type> <value>Sök</value> </empbutton> </form> FORM; $this->ajaxForm = <<<FORM <ajaxform> <name>{$settings['name']}</name> <action></action> <method>get</method> {$formValue} {$this->page} <ajaxempbutton> <type>submit</type> <value>Sök</value> </ajaxempbutton> </ajaxform> FORM; }