當前位置: 首頁>>代碼示例>>PHP>>正文


PHP MyView::render方法代碼示例

本文整理匯總了PHP中MyView::render方法的典型用法代碼示例。如果您正苦於以下問題:PHP MyView::render方法的具體用法?PHP MyView::render怎麽用?PHP MyView::render使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MyView的用法示例。


在下文中一共展示了MyView::render方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

    $iemob = $iem->getSingleSite($station);
    $rs = $iemob->db;
    $vardict = array("lvalid" => "Observation Time", "tmpf" => "Air Temp [F]", "max_tmpf" => "Maximum Air Temperature [F]", "min_tmpf" => "Minimum Air Temperature [F]", "dwpf" => "Dew Point [F]", "relh" => "Relative Humidity [%]", "drct" => "Wind Direction", "sknt" => "Wind Speed [knots]", "srad" => "Solar Radiation", "alti" => "Altimeter [inches]", "pday" => "Daily Precipitation [inches]", "pmonth" => "Monthly Precipitation [inches]", "gust" => "Wind Gust [knots]", "raw" => "Raw Observation/Product");
    $table = "<table class=\"table table-striped\">";
    foreach ($vardict as $key => $value) {
        if (array_key_exists($key, $rs) && $rs[$key] != "" && $rs[$key] != -99) {
            if ($key == "lvalid") {
                $t2 = date("d M Y, g:i A", strtotime($rs[$key]));
                $table .= '<tr><td><b>' . $value . '</b></td><td>' . $t2 . '</td></tr>';
            } else {
                $table .= '<tr><td><b>' . $value . '</b></td><td>' . $rs[$key] . '</td></tr>';
            }
            // End if
        }
        // End if
    }
    $table .= "</table>";
}
$t->content = <<<EOF

<h3>Most Recent Observation</h3>

<p>This application displays the last observation received by the IEM
 from this site. The time stamp is in 
 <strong>{$metadata["tzname"]}</strong> timezone.</p>

{$table}

EOF;
$t->render('sites.phtml');
開發者ID:muthulatha,項目名稱:iem,代碼行數:30,代碼來源:current.php

示例2: networkSelect

Field 9: Type=N/Double, Title='MAX_SIZE', Maximum Hail Size inch
Field 10: Type=N/Integer, Title='VIL', Volume Integrated Liquid kg/m3
Field 11: Type=N/Integer, Title='MAX_DBZ', max dbZ
Field 12: Type=N/Double, Title='MAX_DBZ_H', Height of Max dbZ in thousands of feet
Field 13: Type=N/Double, Title='TOP', Storm Top in thousands of feet
Field 14: Type=N/Integer, Title='DRCT', Motion Direction degrees from North
Field 15: Type=N/Integer, Title='SKNT', Speed in knots
Field 16: Type=N/Double, Title='LAT', Latitude
Field 17: Type=N/Double, Title='LON', Longitude 
</pre>

<h4>Archive notes:</h4>
<ul>
 <li>Data is missing June 2007 to March 2008</li>
 <li>Data is missing November 2008 to March 2009</li>
 </ul>

<p><a name="histograms"></a><h3>Attribute Speed &amp; Direction Histograms</h3>

<p>Based on the archive built by the IEM, the following are 2-D Histograms 
comparing RADAR storm attribute speed, direction of travel, and day of the year.
A direction of "west" would represent a storm moving from west to east.

<form id='dyno' name='dyno'>

<p><strong>Select RADAR:</strong> 
EOF;
$content .= networkSelect(array("NEXRAD", "TWDR"), 'DMX') . "\n<br />\n<img id='histimage' src='/pickup/nexrad_attrs/DMX_histogram.png' alt='Histogram' />\n\n</form>";
$t->content = $content;
$t->render('single.phtml');
開發者ID:muthulatha,項目名稱:iem,代碼行數:30,代碼來源:nexrad_storm_attrs.php

示例3: header

<tr>
  <th>Select Observing Network:</th>
  <td>{$nselect}</td>
</tr>
<tr>
  <th>Select Format:</th>
<td>
{$fselect}
</td></tr>

<tr>
 <td colspan="2"><input type="checkbox" name="nohtml">Just Table, no HTML</td></tr>

<tr><td colspan="2">
<input type="submit" value="Create Table">
</form>
</td></tr>
</table>

{$table}
<p><h3>Notes</h3>
<ol>
<li>Latitude and Longitude values are in decimal degrees.</li>
<li>Elevation is expressed in meters above sea level.</li>
</ol>
EOF;
    $t->render($page);
} else {
    header("Content-type: text/plain");
    echo $table;
}
開發者ID:muthulatha,項目名稱:iem,代碼行數:31,代碼來源:networks.php

示例4:

EOF;
$t->title = "Webcams";
$t->thispage = "webcam-still";
$t->content = <<<EOF
<div id="main">
</div>
<div id="help" class="x-hidden">
<h3 style="margin: 10px;">Web Camera Interactive Viewer</h3>

<p>This application provides an interactive view of current and historical
web camera imagery. Click on the 'Real Time' button above to switch the
application into 'Archived Mode'.  You can then select the time of interest
and the application will automatically update to show you the images. The IEM has archived images every 5 minutes, but may have an image every minute during active weather.</p>
<br /><br />
<strong>Cool Archived Images:</strong><br />
<ul style="margin-left: 5px;">
 <li><a href="javascript: app.appSetTime('KCCI-200406120132')">11 Jun 2004 - 7:32 PM, Webster City Tornado</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200505270115')">26 May 2005 - 7:15 PM, Pella Double Rainbow</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200506090255')">8 Jun 2005 - 8:55 PM, All sorts of colours</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200509081730')">8 Sep 2005 - 12:30 PM, Blurry shot of Ames Tornado</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200511122238')">12 Nov 2005 - 4:38 PM, Woodward tornado from Madrid</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200511122300')">12 Nov 2005 - 5:00 PM, Ames tornado</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200607172150')">17 Jul 2006 - 4:50 PM, Tama possible brief tornado</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200710022256')">2 Oct 2007 - 5:56 PM, Twin Cedars possible tornado</a></li>
 <li><a href="javascript: app.appSetTime('KCCI-200808310120')">30 Aug 2008 - 8:20 PM, Interesting Sunset Halos</a></li>
</ul>

</div>
EOF;
$t->render('full.phtml');
開發者ID:bthoover,項目名稱:iem,代碼行數:30,代碼來源:webcam.php

示例5: updateMap

</ul>
\t\t
<form name="bah">
<div class="row">
<div class="col-md-7">
\t\t<strong>Parameter to Plot:</strong>
\t<select onChange="javascript: updateMap();" id="renderattr">
\t\t<option value='pday'>Precipitation</option>
\t\t<option value='snow'>Snowfall</option>
\t\t<option value='snowd'>Snow Depth [inch]</option>\t
\t</select>
\t<br /><strong>MRMS Legend:</strong> <img src="/images/mrms_q3_p24h.png" />
</div>
<div class="col-md-5">
\t\t<strong>View Date:</strong>
\t<input type="text" id="datepicker" size="30">
</div>
</div>
</form>

<div id="map" class="map"><div id="popup"></div></div>

<div id="popover-content" style="display: none">
  <!-- Hidden div with the popover content -->
  <p>This is the popover content</p>
</div>
\t\t

EOF;
$t->render("single.phtml");
開發者ID:raprasad,項目名稱:iem,代碼行數:30,代碼來源:7am.php

示例6:

  <th colspan="2">Precip</font></th>
<tr>
  <th>
 <a href="{$uri}tmpf">Air</a>
 (<a href="{$uri}max_tmpf">Hi</a> /
 <a href="{$uri}min_tmpf">Lo</a>)
</th>
  <th><a href="{$uri}dwpf">Dewp</a></th>
  <th><a href="{$uri}feel">Feels Like</a></th>
  <th><a href="{$uri}relh">RH %</a></th>
  <th><a href="{$uri}alti">Alti</a></th>
  <th><a href="{$uri}vsby">Vsby</a></th>
  <th><a href="{$uri}sknt">Speed</a></th>
  <th><a href="{$uri}drct">Direction</a></th>
  <th><a href="{$uri}peak">Gust</a>
    @ <a href="{$uri}peak_ts">Time</a></th>
  <th><a href="{$uri}phour">Last Hour</a></th>
  <th><a href="{$uri}pday">Today</a></th>
</tr></thead>
<tbody>  
{$table}
</tbody>
</table>

<input type="submit" value="Add to Favorites">
<input type="reset" value="Reset">

</form></div>
EOF;
$t->render("sortables.phtml");
開發者ID:raprasad,項目名稱:iem,代碼行數:30,代碼來源:obs.php

示例7:

<style>
#legend{
    position:absolute; 
    top:4em; 
    left:10px; 
    z-index:10000; 
    background-color:#FFFFFF;
}
#yearselect{
\tposition:absolute; 
    top:0.5em; 
    left:60px; 
    z-index:10000; 
    background-color:#FFFFFF;\t
}
</style>
<div style="width:100%; height:100%" id="map">
<div id="yearselect">
  <input type="radio" id="y2010" name="whichyear" value="2010" checked="checked"><label for="y2010">2010</label>
  <input type="radio" id="y2011" name="whichyear" value="2011"><label for="y2011">2011</label>
  <input type="radio" id="y2012" name="whichyear" value="2012"><label for="y2012">2012</label>
  <input type="radio" id="y2013" name="whichyear" value="2013"><label for="y2013">2013</label>
  <input type="radio" id="y2015" name="whichyear" value="2015"><label for="y2015">2015</label>
</div>
\t\t
<div id="legend"><img src="profit_legend.png" /></div>\t\t
</div>

EOF;
$t->render('app.phtml');
開發者ID:muthulatha,項目名稱:iem,代碼行數:30,代碼來源:index.php


注:本文中的MyView::render方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。