2011-03-02 23:37:22 +01:00
|
|
|
<?php
|
|
|
|
class PFAHandler {
|
2011-10-16 22:31:46 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return return value of previously called method
|
|
|
|
*/
|
|
|
|
public function result() {
|
|
|
|
return $this->return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* functions for basic input validation
|
|
|
|
*/
|
2011-03-02 23:37:22 +01:00
|
|
|
function _inp_num($val) {
|
|
|
|
return (int)($val);
|
|
|
|
}
|
|
|
|
|
|
|
|
function _inp_bool($val) {
|
|
|
|
return $val ? db_get_boolean(true): db_get_boolean(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
function _inp_password($val){
|
|
|
|
# TODO: fetchmail specific. Not suited for mailbox/admin passwords.
|
|
|
|
return base64_encode($val);
|
|
|
|
}
|
2011-10-16 22:31:46 +02:00
|
|
|
|
2011-03-02 23:37:22 +01:00
|
|
|
}
|
|
|
|
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|