Beispiel #1
0
<?php

/* 
 * This is an Extjs application that allows historical and current viewing of
 * webcam images.
 */
include "../../config/settings.inc.php";
define("IEM_APPID", 9);
require_once "../../include/myview.php";
$t = new MyView();
include "../../include/iemprop.php";
$camera_refresh = get_iemprop("webcam.interval");
$t->headextra = <<<EOF
<link rel="stylesheet" type="text/css" href="https://extjs.cachefly.net/ext/gpl/5.0.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css"/>
<script type="text/javascript" src="https://extjs.cachefly.net/ext/gpl/5.0.0/build/ext-all.js"></script>
<script>
Ext.namespace('cfg');
cfg.refreshint = {$camera_refresh}000;
cfg.header = 'iem-header';
cfg.headerHeight = 60;
cfg.jsonSource = '/json/webcams.php';
</script>
  <script type='text/javascript' src='webcam-static.js?v=7'></script>
<style>
.webimage {
  height: 240px;
  width : 320px;
}
.thumb-wrap{
    float: left;
    margin: 1px;
Beispiel #2
0
<?php

session_start();
require_once "../../../config/settings.inc.php";
define("IEM_APPID", 102);
include_once "../../../include/myview.php";
require_once "../../../include/twitteroauth/twitteroauth.php";
require_once "../../../include/iemprop.php";
define("TWITTER_KEY", get_iemprop('bot.twitter.consumerkey'));
define("TWITTER_SECRET", get_iemprop('bot.twitter.consumersecret'));
$pgconn = pg_connect('host=iemdb user=ldm dbname=mesosite');
$screen_name = isset($_SESSION["screen_name"]) ? $_SESSION["screen_name"] : '';
$channel = isset($_REQUEST["channel"]) ? strtoupper($_REQUEST["channel"]) : '';
$channel = trim($channel);
$rs = pg_prepare($pgconn, "SAVEAUTH", "INSERT into\n  iembot_twitter_oauth(screen_name, access_token, access_token_secret)\n  VALUES (\$1,\$2,\$3)");
$rs = pg_prepare($pgconn, "DELETEAUTH", "DELETE from\n  iembot_twitter_oauth WHERE screen_name = \$1");
$rs = pg_prepare($pgconn, "SELECTSUBS", "SELECT * from\n  iembot_twitter_subs  WHERE screen_name = \$1 ORDER by channel ASC");
$rs = pg_prepare($pgconn, "ADDSUB", "INSERT into\n  iembot_twitter_subs(screen_name, channel) VALUES (\$1, \$2)");
$rs = pg_prepare($pgconn, "DELSUB", "DELETE from\n  iembot_twitter_subs WHERE screen_name = \$1 and channel = \$2");
function reloadbot()
{
    return file_get_contents("http://iembot:9003/reload");
}
$msg = array();
//------------------------------------------------------------
if (isset($_REQUEST['add']) && $channel != '' && $screen_name != '') {
    pg_execute($pgconn, 'ADDSUB', array(strtolower($_SESSION["screen_name"]), $channel));
    reloadbot();
    $msg[] = sprintf("Added channel subscription %s for user %s, reloaded bot", $channel, $_SESSION["screen_name"]);
}
if (isset($_REQUEST['del']) && $channel != '' && $screen_name != '') {
Beispiel #3
0
<?php

include "../../../config/settings.inc.php";
define("IEM_APPID", 65);
include_once "../../../include/myview.php";
$t = new MyView();
$t->thispage = "networks-awos";
$t->title = "AWOS One Minute Data Download";
include "../../../include/iemprop.php";
$awos_archive_end = strtotime(get_iemprop("awos.1min.end"));
include "../../../include/imagemaps.php";
include "../../../include/forms.php";
$bogus = 0;
$ys1 = yearSelect2(1995, date("Y"), "year1");
$ms1 = monthSelect($bogus, "month1");
$ds1 = daySelect2($bogus, "day1");
$mi1 = minuteSelect($bogus, "minute1");
$hs1 = hour24Select($bogus, "hour1");
$ys2 = yearSelect2(1995, date("Y"), "year2");
$ms2 = monthSelect($bogus, "month2");
$ds2 = daySelect2($bogus, "day2");
$mi2 = minuteSelect($bogus, "minute2");
$hs2 = hour24Select($bogus, "hour2");
$aend = date('d M Y', $awos_archive_end);
$sselect = networkMultiSelect("AWOS", '', array(), 'station[]');
$t->content = <<<EOF
<ol class="breadcrumb">
 <li><a href="/AWOS/">AWOS Network</a></li>
 <li class="active">Download One Minute Data</li>
</ol>