ReadINI("hw3.$iniext");
//Set the use_cookies boolean to true if the ini file is set to use cookies
if ($cfg->Val($settings, "allow_cookies") == "true") $use_cookies = true;
parse_input($form, $debug);
//Get the cookies and place then in the var hash
if ($use_cookies) {
$cookies = new Cookies();
} else { $cookies = ''; }
// check for bad referer before we go too far.
if ( $cfg->val('referrer', 'referrer_check')) {
check_referer( $core_path . $cfg->val('referrer', 'referrer_file'),$cfg->val('referrer', 'referrer_url'),
$cfg->val('referrer', 'referrer_debug'));
}
//Place all input into the $form hash
process_input($form, $var, $cfg, $cookies,$debug);
if ($use_cookies) $cookie_orig = $cookies->GetCookieString();
// handle debug
$debug = $cfg->val($settings, 'debug_mode');
if ($debug == 1 ) { $debug = (isset($form['debug'])) ? $form['debug'] : 0; }
elseif ($debug == 3 && isset($form['debugpw']) && isset($form['debug'])) {
if ($cfg->val($settings, 'debug_pw') == $form['debugpw']) $debug = $form['debug'];
}
$cfg->Debug($debug);
if ($debug || isset($form['version'])) {
print "HW3 version=$HW3VERSION ";
if ($HW3BETA > 0) print " (Beta $HW3BETA)\n";
print "
hw3.php cvs revision = $HW3REVISION
\n";
}
if ($debug) {
$cfg->Debug($debug);
print "
Before loading configs
\n";
print_cfg($cfg);
print_var('Form', $form);
print_var('var', $var);
}
$var['allow_mp'] = (isset($form['allow_mp'])) ? $form['allow_mp'] : $cfg->val('Defaults', 'allow_multiple_places');
// lets load any config files requested
$arry=explode(',', $form['config']);
reset($arry);
while (list(,$name) = each ($arry)) {
if ($name != '') {
$cfg->ReadINI($name.'.'. $iniext);
}
}
// Lets load the foreacst ini file unless the nofc param true
if (!getKeyVal($form, 'nofc',0)) {
$tforecast = $form['forecast']; $tforecast = preg_replace('/\W/', '', $tforecast);
$cfg->ReadINI('fc_'.$tforecast.'.' . $iniext);
}
// Do logging
if ($cfg->val('SystemSettings', 'logging')) {
$logpath = $cfg->val('Paths', 'logs');
if (!$logpath) $logpath = 'logs';
$logmode = $cfg->val('SystemSettings', 'log_mode');
if (!$logmode) $logmode = 0;
log_hit($logpath,$logmode);
# lets clean out the logs directory if we need to:
# we will clean it once every 1440 minutes (1 day)
$lma = $cfg->val('SystemSettings', 'log_file_max_age');
if ($lma > 0) { clean_dirs(1440, $lma, array($logpath)); }
}
if ($debug) {
print "
After loading configs
\n";
print_cfg($cfg);
print_var('Form', $form);
print_var('var', $var);
}
$scripturl = trim($cfg->val('Paths', 'scripturl'));
if ($scripturl) { $var['scripturl'] = $scripturl;}
else { $var['scripturl'] = '';}
// lets clean the cahe directory if need be
$cache_path =$cfg->val('Paths', 'cache');
if (!$cache_path) { $cache_path = 'cache'; }
if (!preg_match('/^(?:\/|[A-Za-z]:)/', $cache_path) ) {
$cache_path = $core_path . $cache_path;
}
$CleanCacheDirs = explode(',', $cfg->val('CleanCacheDirs', 'clean_cache'));
array_push($CleanCacheDirs, $cache_path);
clean_cache($CleanCacheDirs);
// db dir =
$dbdir = $cfg->val('Database Access', 'flatfilepath');
if ($dbdir =='') $dbdir = $core_path . 'hw3dbs/';
if (!preg_match('/^(?:\/|[A-Za-z]:)/', $dbdir) ) {
$dbdir = $core_path . $dbdir;
}
$db_access = new_dbaccess($cfg->val('Database Access', 'type'), $cfg, $dbdir,$debug);
$place_parser= new ParsePlace($form,$var,$cfg,'', $debug);
$template_dir = $cfg->val('Paths', 'templates');
if ($template_dir == '') $template_dir = $core_path . 'templates';
$hwiext = $cfg->val('Defaults', 'template_ext');
if (!$hwiext) $hwiext = 'html';
$t = '';
$out = 1;
if (!isset($form["forecast"])) {
$form["forecast"] = '';
}
//If forecast equals pass
if ($form["forecast"] == "pass") {
$pass = "";
if (isset($var['pass']) && $var['pass'] != '') {
$pass = $var["pass"];
}
else {
$pass = $cfg->Val("Defaults", "pass");
}
$t = $cfg->val("PassTemplates", $pass);
$out = 1;
$dppset = isset($form['dpp']);
if (($dppset && $form['dpp'] != '0') || (!$dppset && $cfg->val('Defaults', 'dpp') != '0')) {
//Perform Process Place
$place_parser->process_place($db_access);
if (isset($var["dopass"]) && isset($var["mult_places_pass"])) {
$t = $cfg->Val("PassTemplates", $var["mult_places_pass"]);
}
}
if (!$t && file_exists("$template_dir/$pass.$hwiext" )) $t = "$pass.$hwiext" ;
}
// do we need to save to a file?
// if we are outputting to a file lets make sure we have valid info for file
// to write to.. other wise die with error
$savefile ='';
if (isset($form['om']) && $form['om'] > 0) {
$of = (isset ($form['of'])) ? preg_replace('/\W+/', '', $form['of']) : '';
if ($of) {
$savefile = $cfg->val('output files', $of);
if (!$savefile) {
$ofsm = $cfg->val('output files security', 'mode');
$ofsd = $cfg->val('output files security', 'default path');
if ($ofsm) {
if ($ofsm == 2) {
$ofp = (isset ($form['ofp'])) ?preg_replace('/\W+/', '', $form['ofp']) : '';
if ($ofp) $ofp .='/';
if (!is_dir($ofsd . $ofp) && !mkdir($ofsd . $ofp)) {
$savefile ='';
}
else {
$savefile = $ofsd . $ofp .$of . $cfg->val('output files security', 'default extension');
}
}
elseif ($ofsm) {
$savefile = $ofsd . $of . $cfg->val('output files security', 'default extension');
}
}
}
}
else {
$savefile = $cfg->val('Defaults', 'output file');
}
// if this is a relative path we need to add the default path to the front
if ($savefile && !preg_match('/^(\/|[A-Za-z]:)/', $savefile)) {
$savefile = $cfg->val('output files security', 'default path') . $savefile;
}
if ($form['om'] > 0 && $form['om'] < 3 && !$savefile) {
exit ("Error: of parameter : $of does not make a valid output file");
}
elseif (is_dir($savefile)) {
exit ("Error: of parameter : $of cannot be a directory");
}
elseif ($debug) {
echo "savefile = $savefile
\n";
}
}
else { $form['om']=0;}
if (!isset($var["allow_mp"])) {$var["allow_mp"] = "";}
$wx_object = "";
$pr = new PluginRunner($core_path,$form,$var,$cfg,'', $iniext, $debug, $place_parser, $db_access);
if ($form["forecast"] != "pass") {
//print "debug=$debug
\n";
//If the template is still unset, get the forecast info
if ($t == '') {
list($t, $wx_object) = $pr->RunHWPlugin($var["allow_mp"]);
}
}
//Now set the cookie
if ($use_cookies && isset($form['sc'])) {
$cookie_hashes = array(&$var, &$form,&$wx_object);
$cookies->SetCookie( $form['sc'], $cookie_hashes, $cfg->Val($settings, "cookie_name"), $cookie_orig, 0, $cfg->Val('SystemSettings', 'server_name'), $cfg->Val('SystemSettings', 'script_name'));
unset($cookie_hashes);
}
//Display the template
$extra_parse = new hw3tparser($core_path, $cfg, $var, $form, $pr, $iniext, $debug);
$template = new Template($template_dir . '/include', $hwiext, $debug);
// set up the HW include special fields..
// i.e IMAP=path here thus in template we can allow
// %%HWI=IMAP:xxxxx%%
$hwisections = $cfg->Parameters('HWI Sections');
foreach($hwisections as $hwi_sec) {
$val = $cfg->val('HWI Sections', $hwi_sec);
$template->set($hwi_sec,$val);
}
//handle alt tag. if there. we first try & get file from AltTemplate ini
// if not then if there is no 'alt template security' set in ini we try
// the alt param with 'html' extension.. if all fails we default back to
// the standard template set in $t
if (isset($var['alt'])) {
$alt = preg_replace('/\W/','',$var['alt']);
$talt = $cfg->val('AltTemplates', $alt);
if (!$talt && !$cfg->val('SystemSettings', 'alt template security')) {
if ($alt) $talt = $alt . '.' . $hwiext;
if ($debug) print "
alt=$template_dir/$talt
\n";
if ($talt && file_exists("$template_dir/$talt")) $t = $talt;
}
}
$pr->load_hwv($cfg, $var, $form);;
$template_hashes[0] =& $var;
$template_hashes[1] =& $form;
if (is_object($wx_object)) $template_hashes[2] =& $wx_object;
$template->print_template($template_dir .'/'.$t, $extra_parse, $template_hashes, $savefile, $form['om']);
?>r more exact energy pricing
in your area.
 |
|
|
|
|
! Begin Price Grid//-->
|
ELECTRIC
PROVIDER |
 |
PRODUCT |
 |
TOTAL RATES
(includes
monthly
fees)* |
|
|
|
|
|
|
|
|
 |
|
 |
 |
|
|
|
|
|
Use of
any trademark term or image on this site is used
solely in "Good Faith" under "Fair Use Provisions"
and as
held by The United States Supreme Court in :
KP Permanent Make-Up, Inc. v. Lasting
Impression, Inc.,
No. 03-409, 2004
U.S. Lexis 8170 (December 8, 2004). Use of any
registered trademarked term in the name of, or the
content of this web site is
used for SEO (search engine optimization) AND
COMPARISON PURPOSES ONLY. SUCH USE OF SAID TRADE
MARK OR
TRADE NAME SHOULD NOT BE CONSTRUED AS APPROVAL OF
SAID MARKS OWNER OF THE CONTENT OR
BUSINESS PRACTICES OF THIS SITE. |