<?php } ?> <div class="clearfix"> <?php printNewsContent(); ?> <?php printCodeblock(1); ?> </div> <?php if (getOption('show_tag')) { ?> <div class="headline-tags"><?php printTags('links', '', 'hor-list'); ?> </div> <?php } ?> </div> <?php if (extensionEnabled('comment_form')) { ?> <?php include 'inc_print_comment.php'; ?> <?php }
?> </div> <?php if (getImageDesc() || zp_loggedin()) { ?> <div class="sidebar-section"><?php printImageDesc(true); ?> </div><?php } ?> <?php if (getTags() || zp_loggedin()) { ?> <div class="sidebar-section"><?php printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'taglist', ''); ?> </div><?php } ?> <?php if (!$zpmin_disablemeta) { ?> <?php if (getImageMetaData() || zp_loggedin()) { ?> <div class="sidebar-section"><?php printImageMetadata('', false, null, 'full-image-meta', true); ?> </div><?php }
echo getGalleryIndexURL(); ?> "><?php echo getBareGalleryTitle(); ?> </a></h2> <?php } ?> <div class="album-details"> <?php printAlbumDate('', '', null, true); ?> <div class="album-tags"><?php printTags('links', gettext('| Tags: '), 'taglist', ', ', true, '', true); ?> </div> </div> <p class="description"><?php printAlbumDesc(true, '', gettext('Edit Description...')); ?> </p> <?php if (isAlbumPage()) { ?> <div class="subalbum-wrap"> <h4 class="blockhead"><span><?php echo gettext('SubAlbums in '); echo getBareAlbumTitle();
$num = pg_numrows($rs); $linkbar = <<<EOF <div class="row well"> \t<div class="col-md-4 col-sm-4"> <a href="{$plink}" class="btn btn-default btn-lg"><i class="glyphicon glyphicon-arrow-left"></i> Previous Month</a> \t</div> \t<div class="col-md-4 col-sm-4"><h4>Features for {$mstr}</h4></div> \t<div class="col-md-4 col-sm-4"> <a href="{$nlink}" class="btn btn-default btn-lg">Next Month <i class="glyphicon glyphicon-arrow-right"></i></a> \t</div> </div> EOF; for ($i = 0; $i < $num; $i++) { $row = @pg_fetch_assoc($rs, $i); $valid = strtotime(substr($row["valid"], 0, 16)); $p = printTags(explode(",", $row["tags"])); $fmt = "gif"; if ($valid > strtotime("2010-02-19")) { $fmt = "png"; } $d = date("Y-m-d", $valid); $linktext = ""; if ($row["appurl"] != "") { $linktext = "<br /><a class=\"btn btn-sm btn-primary\" href=\"" . $row["appurl"] . "\"><i class=\"glyphicon glyphicon-signal\"></i> Generate This Chart on Website</a>"; } $table .= <<<EOF <div class="row"> <div class="col-md-12 well well-sm">{$row["calhead"]}</large></div> </div> <div class="row">
?> </h3></div> <div id="date" class="box"><?php echo '( ' . getImageDate(getOption('date_format')) . ' )'; ?> </div> </div> <?php if (getImageDesc() or zp_loggedin()) { echo '<div class="c"><div id="desc" class="box">'; echo printImageDesc(true); echo '</div></div>'; } if (getTags() or zp_loggedin()) { echo '<div class="c"><div id="tags" class="box">'; printTags('links', '', '', ', ', true, '', true); echo '</div></div>'; } if (function_exists('printRating')) { echo '<div class="c"><div id="rating">'; printRating(); echo '</div></div>'; } ?> </div> <div class="clear_left"></div> <div id="image"> <div> <?php $fullimage = getFullImageURL(); if (!empty($fullimage)) {
echo getCommentCount(); } ?> </span> <?php echo ' | '; printNewsCategories(", ", gettext("Categories: "), "newscategories"); ?> </div> <?php printNewsContent(); printCodeblock(1); if (getTags()) { echo gettext('<strong>Tags:</strong>'); } printTags('links', '', 'taglist', ', '); ?> <br style="clear:both;" /><br /> </div> <?php } printNewsPageListWithNav(gettext('next »'), gettext('« prev'), true, 'pagelist', true); } ?> </div><!-- content left--> <div id="sidebar"> <?php
?> </strong></h2> <?php // single news article if (is_NewsArticle()) { ?> <?php printNewsContent(); printCodeblock(1); ?> <br class="clearall" /><br /> <?php printNewsCategories(', ', gettext('Categories: '), 'catlist'); ?> <?php printTags('links', gettext('<strong>Tags:</strong>') . ' ', 'catlist', ', '); ?> <?php if (function_exists('printCommentForm')) { printCommentForm(); } ?> <br class="clearall" /> <?php if (getPrevNewsURL()) { $prevnews = getPrevNewsURL(); ?> <a class="imgprevious" href="<?php echo html_encode($prevnews['link']); ?> " data-role="button" data-icon="arrow-l" data-iconpos="left" data-inline="true"><?php
"><?php echo html_encode(getBareGalleryTitle()); ?> </a></h2> <?php } ?> <div class="post"> <?php printPageContent(); printCodeblock(1); ?> <div class="newsarticlecredit"> <?php printTags('links', gettext('Tags:') . ' ', 'taglist', ', '); ?> </div> <?php if (function_exists('printRating')) { printRating(); } ?> </div> <?php printCodeblock(); if (function_exists('printCommentForm')) { printCommentForm(); } ?>
<?php printImageDesc(true); ?> </div> </div> <?php if (getOption('zpB_show_tags') || extensionEnabled('rating')) { ?> <div class="row photo-description"> <?php if (getOption('zpB_show_tags')) { ?> <div class="span8 offset2"> <div class="center"><?php printTags('links', NULL, 'nav nav-pills', NULL); ?> </div> </div> <?php } ?> <?php if (zp_loggedin() && extensionEnabled('favoritesHandler')) { ?> <div class="span8 offset2 favorites"><?php printAddToFavorites($_zp_current_image); ?> </div> <?php
function genFeature() { $connection = iemdb("mesosite", TRUE, TRUE); $query1 = "SELECT oid, *, to_char(valid, 'YYYY/MM/YYMMDD') as imageref, \n to_char(valid, 'DD Mon YYYY HH:MI AM') as webdate,\n to_char(valid, 'YYYY-MM-DD') as permalink from feature\n ORDER by valid DESC LIMIT 1"; $result = pg_exec($connection, $query1); $row = @pg_fetch_array($result, 0); $foid = $row["oid"]; $good = intval($row["good"]); $bad = intval($row["bad"]); $tags = explode(",", $row["tags"]); $fbid = $row["fbid"]; $fburl = "http://www.facebook.com/pages/IEM/157789644737?v=wall&story_fbid=" . $fbid; /* Hehe, check for a IEM vote! */ $voted = 0; if (array_key_exists('foid', $_COOKIE) && $_COOKIE["foid"] == $foid) { $voted = 1; } elseif (getenv("REMOTE_ADDR") == "129.186.142.22" || getenv("REMOTE_ADDR") == "129.186.142.37") { } elseif (isset($_GET["feature_good"])) { setcookie("foid", $foid, time() + 100600); $voted = 1; $isql = "UPDATE feature SET good = good + 1 WHERE oid = {$foid}"; $good += 1; pg_exec($connection, $isql); } elseif (isset($_GET["feature_bad"])) { setcookie("foid", $foid, time() + 100600); $voted = 1; $isql = "UPDATE feature SET bad = bad + 1 WHERE oid = {$foid}"; $bad += 1; pg_exec($connection, $isql); } $fref = "/mesonet/share/features/" . $row["imageref"] . ".png"; $width = 320; $height = 240; if (is_file($fref)) { list($width, $height, $type, $attr) = @getimagesize($fref); } $s = "<span style=\"font-size: larger; font-weight: bold;\">" . $row["title"] . "</span><br />\n"; $s .= "<span style=\"font-size: smaller; float: left;\">Posted: " . $row["webdate"] . "</span>"; $s .= printTags($tags); $s .= "<div style=\"font-size: smaller; float: right; margin: 5px;\">"; $s .= "<a class=\"button left\" href=\"{$fburl}\">Facebook</a>"; $s .= "<a class=\"button middle\" href=\"/onsite/features/cat.php?day=" . $row["permalink"] . "\">Permalink</a>"; $s .= "<a class=\"button middle\" href=\"/onsite/features/past.php\">Past Features</a>"; $s .= "<a class=\"button right\" href=\"/onsite/features/tags/\">Tags</a></div>"; /* Feature Image! */ $s .= "<div style=\"margin-left: 5px; border: 1px #f3f3f3 solid; float: right; padding: 3px; width: " . ($width + 6) . "px;\"><a href=\"/onsite/features/" . $row["imageref"] . ".png\"><img src=\"/onsite/features/" . $row["imageref"] . ".png\" alt=\"Feature\" width=\"{$width}\" height=\"{$height}\"/></a><br /><span style=\"font-size: smaller;\">" . $row["caption"] . "</span></div>"; $s .= "<br /><div class='story' style=\"text-align: justify;\">" . $row["story"] . "</div>"; /* Rate Feature and Past ones too! */ $s .= "<br clear=\"all\" />"; if ($row["voting"] == "f") { } else { $s .= "<div style=\"float: left; margin-bottom: 10px; margin-left: 15px; \">"; if ($voted) { $goodurl = "index.phtml"; $badurl = "index.phtml"; $msg = "Thanks for voting!"; } else { $goodurl = "/index.phtml?feature_good"; $badurl = "/index.phtml?feature_bad"; $msg = "Rate Feature"; } $s .= "<div style=\"float: left; margin-bottom: 5px;\"><strong>{$msg}</strong> <a class=\"button add\" href=\"{$goodurl}\" rel=\"nofollow\">Good ({$good} votes)</a><a class=\"button delete\" href=\"{$badurl}\" rel=\"nofollow\">Bad ({$bad} votes)</a></div>"; $s .= "<div id=\"fb-root\"></div>"; define("FBEXTRA", True); $s .= "<fb:comments send_notification_uid=\"16922938\" title=\"" . $row["title"] . "\" \" href=\"http://mesonet.agron.iastate.edu/onsite/features/cat.php?day=" . $row["permalink"] . "\" xid=\"{$fbid}\" numposts=\"6\" width=\"520\"></fb:comments>"; $s .= "</div>"; } /* Now, lets look for older features! */ $s .= "<br clear=\"all\" /><strong>Previous Years' Features</strong><table width=\"100%\">"; $sql = "select *, extract(year from valid) as yr from feature WHERE extract(month from valid) = extract(month from now()) and extract(day from valid) = extract(day from now()) and extract(year from valid) != extract(year from now()) ORDER by yr DESC"; $result = pg_exec($connection, $sql); for ($i = 0; $row = @pg_fetch_array($result, $i); $i++) { if ($i % 2 == 0) { $s .= "<tr>"; } $s .= "<td width=\"50%\">" . $row["yr"] . ": <a href=\"onsite/features/cat.php?day=" . substr($row["valid"], 0, 10) . "\">" . $row["title"] . "</a></td>"; if ($i % 2 != 0) { $s .= "</tr>"; } } $s .= "</table>"; return $s; }
} if (getAlbumDesc()) { ?> <div class="desc<?php echo $class; ?> "> <?php echo html_encode(getAlbumDesc()); ?> </div> <?php } if (gettags()) { echo '<div class="tagsList' . $class . '">'; printTags('links', 'Tags: ', '', ', ', false, '', true); echo '</div>'; } if (function_exists('printRating')) { echo '<div class="clear ratings">'; printRating(); echo '</div>'; } ?> </div> <div class="thumbs"> <ul class="list"> <?php while (next_album()) { ?> <li>
</h2> <img src="<?php echo html_encode(pathurlencode(getPrevImageThumb())); ?> " /> </a> </div> <?php } ?> <p><?php printImageDesc(); ?> </p> <?php printTags('links', gettext('Tags: '), NULL, ''); ?> <?php if (getImageMetaData()) { printImageMetadata(NULL, 'colorbox'); ?> <br class="clearall" /> <?php } if (function_exists('printGoogleMap')) { setOption('gmap_display', 'colorbox', false); ?> <span id="map_link"> <?php printGoogleMap(NULL, NULL, NULL, NULL, 'gMapOptionsImage'); ?>
<p><i>Posted:</i> {$row["webdate"]} </p> <div class="row"> <div class="col-md-6"> <a href="{$big}"><img src="{$big}" class="img img-responsive"></a> <br /><a href="{$big}">View larger image</a> <br />{$row["caption"]} {$linktext} </div> <div class='col-md-6 well'>{$row["story"]} EOF; if ($row["voting"] == 't' && (intval($row["good"]) > 0 || intval($row["bad"]) > 0)) { $content .= "<br /><br /><b>Voting:</b>\n \t\t<br />Good = " . $row["good"] . " <br />Bad = " . $row["bad"]; if ($row["abstain"] > 0) { $content .= " <br />Abstain = " . $row["abstain"]; } } $content .= "<br />" . printTags(explode(",", $row["tags"])); $content .= <<<EOF </div> \t\t</div><!-- ./row --> \t\t<div class="clearfix"> </div> <div class="clearfix"> </div> \t\t<div id="fb-root"></div><script src="https://connect.facebook.net/en_US/all.js#appId=196492870363354&xfbml=1"></script> <fb:comments send_notification_uid="16922938" title="{$row["title"]}" href="https://mesonet.agron.iastate.edu/onsite/features/cat.php?day={$day}" xid="{$row["fbid"]}" numposts="6" width="600"></fb:comments> EOF; $t->content = $content; $t->render('single.phtml');
<li> <strong>Flash:</strong> <?php echo $exif['EXIFFlash']; ?> </li> </ul> <br /> <?php } ?> <h6>Tags</h6> <p> <?php printTags("", "", 'taglist', ''); ?> </p> <br /> <h6>Rating</h6> <div class="rating"> <?php if (function_exists('printImageRating')) { printImageRating(); } ?> </div> </div> <br clear="all" />
<div id="container" itemscope itemtype="http://schema.org/Thing"> <div id="img-sidebar"> <div itemprop="name" class="image-title"><?php printImageTitle(true); ?> </div> <div class="img-date"><?php printImageDate('', '', null, true); ?> </div> <div itemprop="description" class="img-desc"><?php printImageDesc(true, '', gettext('(Edit Description...)')); ?> </div> <div class="img-tags"><?php printTags('links', gettext('TAGS: '), 'hor-list', ', ', true, '', true); ?> </div> <?php if ($zpgal_show_meta) { printImageMetadata('', false, 'imagemetadata', '', true, '', gettext('None Available')); } ?> <?php if (function_exists('printRating')) { ?> <div id="rating-wrap"> <?php printRating(); ?>
/** * @deprecated * @since 1.2.9 */ function printNewsImageTags($option = 'links', $preText = NULL, $class = 'taglist', $separator = ', ', $editable = TRUE) { deprecated_functions::notify(gettext('Use printTags().')); printTags($option, $preText, $class, $separator); }