示例#1
0
 public function __construct()
 {
     parent::__construct();
     $this->template->debug = $this->add_view('debug');
     $this->host = $this->input->get('host');
     $this->service = $this->input->get('srv');
 }
示例#2
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('popup');
     $this->host = pnp::clean($this->input->get('host'));
     $this->service = pnp::clean($this->input->get('srv'));
 }
示例#3
0
 public function __construct()
 {
     parent::__construct();
     $this->auto_render = FALSE;
     // Disable auto-rendering
     $this->auto_render = FALSE;
 }
示例#4
0
 public function __construct()
 {
     parent::__construct();
     $this->config->read_config();
     $this->host = $this->input->get('host');
     $this->service = $this->input->get('srv');
 }
示例#5
0
 public function __construct()
 {
     parent::__construct();
     // Disable auto-rendering
     $this->auto_render = FALSE;
     $this->data->getTimeRange($this->start, $this->end, $this->view);
 }
示例#6
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('zoom');
     $this->tpl = $this->input->get('tpl');
     $this->graph_width = $this->config->conf['zgraph_width'];
     $this->graph_height = $this->config->conf['zgraph_height'];
 }
示例#7
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('zoom');
     $this->host = $this->input->get('host');
     $this->service = $this->input->get('srv');
     $this->tpl = $this->input->get('tpl');
 }
示例#8
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('template');
     $this->template->color = $this->add_view('color');
     $this->template->color->color_box = $this->add_view('color_box');
     $this->template->color->logo_box = $this->add_view('logo_box');
 }
 public function __construct()
 {
     if ($this->getParamByKey('save') == 'true') {
         if (!isset($_COOKIE[session_name()])) {
             session_set_cookie_params(Model_User::LIFETIME_USER_COOKIE);
         }
     }
     parent::__construct();
 }
示例#10
0
 public function __construct()
 {
     parent::__construct();
     $this->template->docs = $this->add_view('docs');
     $this->template->docs->search_box = $this->add_view('search_box');
     $this->template->docs->docs_box = $this->add_view('docs_box');
     $this->template->docs->logo_box = $this->add_view('logo_box');
     $this->doc_language = $this->config->conf['doc_language'];
 }
示例#11
0
 public function __construct()
 {
     parent::__construct();
     $this->template->page = $this->add_view('page');
     $this->template->page->graph_content = $this->add_view('graph_content');
     $this->template->page->graph_content->graph_width = $this->config->conf['graph_width'] + 85;
     $this->template->page->graph_content->timerange_select = $this->add_view('timerange_select');
     $this->template->page->header = $this->add_view('header');
     $this->template->page->logo_box = $this->add_view('logo_box');
 }
示例#12
0
 public function __construct()
 {
     parent::__construct();
     $this->template->graph = $this->add_view('graph');
     $this->template->zoom_header = $this->add_view('zoom_header');
     $this->template->zoom_header->graph_width = $this->config->conf['graph_width'] + 140;
     $this->template->zoom_header->graph_height = $this->config->conf['graph_height'] + 230;
     $this->template->graph->icon_box = $this->add_view('icon_box');
     $this->template->graph->icon_box->position = "graph";
     $this->template->graph->icon_box->xml_icon = TRUE;
     $this->template->graph->icon_box->pdf_icon = TRUE;
 }
示例#13
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('template');
     $this->template->graph = $this->add_view('graph');
     $this->templates = $this->data->getSpecialTemplates();
     $this->data->GRAPH_TYPE = 'special';
     if ($this->tpl == '') {
         if ($this->templates) {
             $this->tpl = $this->templates[0];
         }
         url::redirect('special?tpl=' . $this->tpl, 302);
     }
 }
示例#14
0
 public function __construct()
 {
     parent::__construct();
     $this->template->page = $this->add_view('page');
     $this->template->zoom_header = $this->add_view('zoom_header');
     $this->template->zoom_header->graph_width = $this->config->conf['graph_width'] + 140;
     $this->template->zoom_header->graph_height = $this->config->conf['graph_height'] + 230;
     $this->template->page->graph_content = $this->add_view('graph_content');
     $this->template->page->graph_content->graph_width = $this->config->conf['graph_width'] + 85;
     $this->template->page->graph_content->timerange_select = $this->add_view('timerange_select');
     $this->template->page->header = $this->add_view('header');
     $this->template->page->logo_box = $this->add_view('logo_box');
     $this->is_authorized = TRUE;
 }
示例#15
0
 function printBody()
 {
     require_once dirname(__FILE__) . '/system_controller.class.php';
     $GLOBALS['system'] = $GLOBALS['system'] = System_Controller::get();
     set_error_handler(array($GLOBALS['system'], '_handleError'));
     if ($this->readyToInstall() && $this->initInitialEntities()) {
         $GLOBALS['JETHRO_INSTALLING'] = 1;
         $this->initDB();
         $this->createInitialEntities();
         unset($GLOBALS['JETHRO_INSTALLING']);
         $this->printConfirmation();
     } else {
         $this->printForm();
     }
 }
示例#16
0
 public function __construct()
 {
     parent::__construct();
     // Disable auto-rendering
     $this->auto_render = FALSE;
     $this->view = 0;
     //fake value
     $this->source = "";
     if ($this->input->get('view') != "") {
         $this->view = $this->input->get('view');
     }
     if ($this->input->get('source')) {
         $this->source = $this->input->get('source');
     }
     $this->data->getTimeRange($this->start, $this->end, $this->view);
 }
示例#17
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('template');
     if (isset($this->version) && $this->version == "tiny") {
         $this->template->graph = $this->add_view('graph_tiny');
     } else {
         $this->template->graph = $this->add_view('graph');
     }
     $this->template->zoom_header = $this->add_view('zoom_header');
     $this->template->zoom_header->graph_width = $this->config->conf['zgraph_width'] + 140;
     $this->template->zoom_header->graph_height = $this->config->conf['zgraph_height'] + 230;
     $this->template->graph->icon_box = $this->add_view('icon_box');
     $this->template->graph->icon_box->position = "graph";
     $this->template->graph->icon_box->xml_icon = TRUE;
     $this->template->graph->icon_box->pdf_icon = TRUE;
 }
示例#18
0
 public function __construct()
 {
     parent::__construct();
     $this->use_bg = 0;
     $this->bg = $this->config->conf['background_pdf'];
     // Define PDF background per url option
     if (isset($this->bg) && $this->bg != "") {
         if (is_readable(Kohana::config('core.pnp_etc_path') . "/" . $this->bg)) {
             $this->bg = Kohana::config('core.pnp_etc_path') . "/" . $this->bg;
         } else {
             $this->bg = $this->config->conf['background_pdf'];
         }
     }
     // Use PDF background if readable
     if (is_readable($this->bg)) {
         $this->use_bg = 1;
     }
 }
示例#19
0
 public function __construct()
 {
     parent::__construct();
     $this->config->read_config();
 }
示例#20
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('popup');
 }
示例#21
0
 public function __construct()
 {
     parent::__construct();
     $this->template = $this->add_view('template');
     $this->template->debug = $this->add_view('debug');
 }
示例#22
0
define('TEMPLATE_DIR', JETHRO_ROOT . '/templates/');
// Load configuration
if (!is_readable(JETHRO_ROOT . '/conf.php')) {
    trigger_error('Jethro configuration file not found.  You need to copy conf.php.sample to conf.php and edit it before Jethro can run', E_USER_ERROR);
    exit;
}
require_once JETHRO_ROOT . '/conf.php';
// Initialise system
if (!defined('DSN')) {
    define('DSN', constant('PRIVATE_DSN'));
}
require_once JETHRO_ROOT . '/include/init.php';
// Set up the user system
require_once JETHRO_ROOT . '/include/user_system.class.php';
require_once JETHRO_ROOT . '/include/system_controller.class.php';
$GLOBALS['user_system'] = new User_System();
if ($GLOBALS['user_system']->getCurrentUser() == NULL) {
    System_Controller::checkConfigHealth();
    // Nobody is logged in, so show login screen or installer
    if (!$GLOBALS['user_system']->hasUsers()) {
        require_once JETHRO_ROOT . '/include/installer.class.php';
        $installer = new Installer();
        $installer->run();
    } else {
        $GLOBALS['user_system']->printLogin();
    }
} else {
    // We have a user, so run the system
    $GLOBALS['system'] = new System_Controller();
    $GLOBALS['system']->run();
}
<?php

/** @var services **/
?>
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Jethro/Jethro//NONSGML v1.0//EN
X-WR-CALNAME:<?php 
echo SYSTEM_NAME;
?>
 Services
<?php 
foreach ($services as $service) {
    $uid = 'service_' . $service->id . '_' . $service->values['date'];
    $congregation = System_Controller::get()->getDBObject('congregation', $service->getValue('congregationid'));
    $starttime = Service::getMeetingDateTime(strtotime($service->getValue('date')), $congregation->getValue('meeting_time'));
    // Guess end date as $date + 1 hour (3600 seconds)
    $endtime = $starttime + 3600;
    ?>
BEGIN:VEVENT
UID:<?php 
    echo $uid;
    ?>
@jethro_service
<?php 
    if (defined('MEMBER_REGO_EMAIL_FROM_NAME') && strlen(MEMBER_REGO_EMAIL_FROM_NAME)) {
        $fromName = MEMBER_REGO_EMAIL_FROM_NAME;
    } else {
        $fromName = 'Jethro Admin';
    }
    if (defined('MEMBER_REGO_EMAIL_FROM_ADDRESS') && strlen(MEMBER_REGO_EMAIL_FROM_ADDRESS)) {
示例#24
0
 public function __construct()
 {
     parent::__construct();
     $this->session->set('classic-ui', 0);
     $this->template = $this->add_view('mobile');
 }
示例#25
0
 public function __construct()
 {
     parent::__construct();
 }
示例#26
0
define('TEMPLATE_DIR', JETHRO_ROOT . '/templates/');
// Load configuration
if (!is_readable(JETHRO_ROOT . '/conf.php')) {
    trigger_error('Jethro configuration file not found.  You need to copy conf.php.sample to conf.php and edit it before Jethro can run', E_USER_ERROR);
    exit;
}
require_once JETHRO_ROOT . '/conf.php';
// Initialise system
if (!defined('DSN')) {
    define('DSN', constant('PRIVATE_DSN'));
}
require_once JETHRO_ROOT . '/include/init.php';
// Set up the user system
require_once JETHRO_ROOT . '/include/user_system.class.php';
require_once JETHRO_ROOT . '/include/system_controller.class.php';
$GLOBALS['user_system'] = new User_System();
if ($GLOBALS['user_system']->getCurrentUser() == NULL) {
    System_Controller::checkConfigHealth();
    // Nobody is logged in, so show login screen or installer
    if (!$GLOBALS['user_system']->hasUsers()) {
        require_once JETHRO_ROOT . '/include/installer.class.php';
        $installer = new Installer();
        $installer->run();
    } else {
        $GLOBALS['user_system']->printLogin();
    }
} else {
    // We have a user, so run the system
    $GLOBALS['system'] = System_Controller::get();
    System_Controller::get()->run();
}
示例#27
0
 * Jethro PMM is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Jethro PMM.  If not, see <http://www.gnu.org/licenses/>.
 * 
 * index.php - first stop for every request
 *
 * @author Tom Barrett <*****@*****.**>
 * @version $Id: index.php,v 1.3 2013/03/20 11:03:53 tbar0970 Exp $
 * @package jethro-pmm
 */
define('THIS_DIR', str_replace('\\', '/', dirname(__FILE__)));
define('JETHRO_ROOT', preg_replace('#/public$#', '', THIS_DIR));
define('TEMPLATE_DIR', THIS_DIR . '/templates/');
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(THIS_DIR));
// Load configuration
require_once dirname(THIS_DIR) . '/conf.php';
define('DSN', PUBLIC_DSN);
define('IS_PUBLIC', true);
// Initialise system
require_once JETHRO_ROOT . '/include/init.php';
// Init user system but don't try to auth anyone
require_once JETHRO_ROOT . '/include/user_system.class.php';
$GLOBALS['user_system'] = new User_System();
$GLOBALS['user_system']->setPublic();
require_once 'include/system_controller.class.php';
$GLOBALS['system'] = System_Controller::get(THIS_DIR);
$GLOBALS['system']->run();
示例#28
0
 /**
  * Find all services after a particular date.
  *
  * If the congregationid is specified, then only services for this congregation are returned.
  * @param string $date
  * @param int $congregationid
  * @return mixed Returns an array of service objects.
  */
 public static function findAllAfterDate($date, $congregationid = null)
 {
     $db =& $GLOBALS['db'];
     $sql = '';
     if ($congregationid == null) {
         $sql = 'SELECT id FROM service where date >= ' . $db->quote($date);
     } else {
         $sql = 'SELECT id FROM service where date >= ' . $db->quote($date) . ' and congregationid = ' . $db->quote($congregationid);
     }
     $res = $db->queryAll($sql);
     check_db_result($res);
     $services = array();
     foreach ($res as $row) {
         $service = System_Controller::get()->getDBObject('service', $row['id']);
         $services[] = $service;
     }
     return $services;
 }
示例#29
0
define('JETHRO_ROOT', dirname(dirname(__FILE__)));
set_include_path(get_include_path() . PATH_SEPARATOR . JETHRO_ROOT);
if (!is_readable(JETHRO_ROOT . '/conf.php')) {
    trigger_error('Jethro configuration file not found.  You need to copy conf.php.sample to conf.php and edit it before Jethro can run', E_USER_ERROR);
    exit;
}
require_once JETHRO_ROOT . '/conf.php';
if (!defined('DSN')) {
    define('DSN', constant('PRIVATE_DSN'));
}
require_once JETHRO_ROOT . '/include/init.php';
require_once JETHRO_ROOT . '/include/user_system.class.php';
$GLOBALS['user_system'] = new User_System();
$GLOBALS['user_system']->setPublic();
require_once JETHRO_ROOT . '/include/system_controller.class.php';
$GLOBALS['system'] = System_Controller::get();
if (empty($api_key)) {
    trigger_error("API key not specified", E_USER_ERROR);
}
$api = new MCAPI($api_key);
// Check for / look for a list ID
if (empty($list_id)) {
    $lists = $api->lists();
    if (!empty($api->errorMessage)) {
        trigger_error("Mailchimp API Error calling lists(): " . $api->errorMessage, E_USER_ERROR);
    }
    if (count($lists['data']) == 1) {
        $list_id = $lists['data'][0]['id'];
    }
    if (empty($list_id)) {
        trigger_error("Looked for a single List ID in Mailchimp but couldn't find one", E_USER_NOTICE);