public function __construct($ini_file = null) { $ini_array = fgHelper::loadIniFile('MAIN.ini', false); foreach ($ini_array as $k => $v) { $this->{$k} = new fgObject($v); } }
public function loadFile($file_path) { //echo "\n############################file_path=$file_path\n"; $new_idx = count($this->Doc); $string = fgHelper::loadFile($file_path); $this->Doc[$new_idx] = simplexml_load_string($string); $include = $this->hasInclude($new_idx); if ($include) { $this->loadFile($this->path . $include); } }
public function __construct() { $ini = fgHelper::loadIniFile(self::ini); foreach ($ini as $feed => $v) { $this->_feeds[$feed] = array('feed' => $feed, 'title' => $v['title'], 'description' => $v['description']); if (array_key_exists('title', $v)) { $this->_handlers[$feed] = $v['handler']; } } ksort($this->_feeds); }
public function import() { $arr = fgHelper::loadIniFile(self::ini, false); $server_type_id = fgServerType::idFromKey($this->server_type); foreach ($arr as $location => $v) { $s = new fgServer(0); $s->nick = null; $s->server_type_id = $server_type_id; $s->host = $v['server']; $s->location = $location; $s->ip = isset($v['ip']) ? $v['ip'] : null; $s->save(); } }
public function import() { global $Site; $ini = fgHelper::loadIniFile(self::ini, false); $server_type_id = fgServerType::idFromKey($this->server_type); foreach ($ini as $channel => $v) { $s = new fgServer(0); $s->nick = $v['title']; $s->server_type_id = $server_type_id; $s->host = $this->server; $s->location = $channel; $s->irc = null; $s->save(); } }
public function import() { $arr = fgHelper::loadIniFile(self::ini, false); $server_type_id = fgServerType::idFromKey($this->server_type); foreach ($arr as $host => $v) { $parts = explode(".", $host); $s = new fgServer(0); $s->nick = $parts[0]; $s->server_type_id = $server_type_id; $s->host = $host; $s->ip = isset($v['ip']) ? $v['ip'] : null; $s->contact = isset($v['contact']) ? $v['contact'] : null; $s->location = isset($v['location']) ? $v['location'] : null; $s->irc = isset($v['irc']) ? $v['irc'] : null; $s->tracked = $v['tracked'] == 1 ? true : null; $s->save(); } }
function __construct() { global $smarty, $smtp; $this->smarty = $smarty; $this->ini = new fgObject(fgHelper::loadIniFile('mail.ini')); print_r($this->ini->smtp); $this->M = new phpmailer(true); if ($this->ini->smtp->enabled) { //** Set some Inherited Vars $this->M->Mailer = 'smtp'; # $this->M->SMTPDebug = true; $this->M->SMTPAuth = true; $this->M->SMTPKeepAlive = true; $this->M->Host = $this->ini->smtp->host; $this->M->Username = $this->ini->smtp->user; $this->M->Password = $this->ini->smtp->pass; } else { $this->M->Mailer = 'sendmail'; } //** Set from and add system recipients $this->M->Sender = $this->ini->from->email; $this->M->From = $this->ini->from->email; $this->M->FromName = $this->ini->from->name; $this->M->IsHTML(true); //* Add system addresses $addresses = $this->to_array($this->ini->email->admin); foreach ($addresses as $em) { $this->M->AddBCC($em); } //** Add the logo //$mail->AddEmbeddedImage('my-photo.jpg', 'my-photo', 'my-photo.jpg '); // echo SITE_ROOT.$this->W['logo']; //echo SITE_ROOT.'/'.$this->W->logo; # $this->M->AddEmbeddedImage(SITE_ROOT.'/'.$Config->root->ticker, $Config->root->ticker.'-logo', $Config->root->ticker, 'base64', 'image/gif'); # $this->smarty->assign('MAIN', 'emails/'.$this->template.'.html'); # $this->smarty->assign('title', $this->title); }
public static function index() { return fgHelper::listFiles(SITE_ROOT . '/style_sheets/', '.css'); }
<?php require_once 'config/config.inc.php'; $Site = new fgSite('webdev', 'DEV'); //$foo = new fgMpServer(); //::index(); //fgMpServer::index(); //print_r($foo->index()); //$foo->url; $aero_id = $_GET['aero_id']; //$db->debug=1; fgHelper::plain(); $Aero = new fgAero($aero_id); //print_r($a); echo $Aero->xmlPath() . "\n"; //$aeroXml = new fgXmlAeroSet($a->xmlFile()); $info = $Aero->info(); print_r($info); die; //echo $aeroXml->help(); $keys = $aeroXml->keyboard(); //print_r($keys); $tanks = $aeroXml->tanks(); //print_r($tanks); $model_file = $aeroXml->modelPath(); echo $model_file . "\n"; $modelXml = new fgXmlAeroModel($model_file); //print_r($modelXml->Doc); ##print_r($aeroXml->Doc); echo "\n----------------------\n"; //echo $aeroXml->Raw; //print_r($aeroXml->Doc);