示例#1
0
  <input type="button" value="generate nearest" id="closest" />
  <div id="map_canvas" style="width:500px; height:500px;"></div>
  <div id="loc"></div> -->
  
  <div id="wrapper" class="iphone3">
  	<div id="screen">
      
      <div id="topbuttonsblock">
      <!--Add the buttons -->
      </div>
      
      <div id="bodyblock">
      <!--Main body -->
      	<div id="preheading">Your next train will be here at <span id="stdtime"></span></div>
        <div id="timer"></div>
        <div id="smtime"><?php echo date("g:i a"); ?></div>
        
        <div id="formblock">
        <label>Start at:<?php echo getStopsDrop('startloc'); ?></label>
        <label>End at:<?php echo getStopsDrop('endloc'); ?></label>
        <input name="getsched" id="getsched" type="button" value="Get Schedule">
        </div>
        
      </div>
      
    </div>
  </div>
</body>
<!-- here is on master from the remote...again -->
</html>
示例#2
0
<?php
$debug = 0;
require_once('db.class.php/db.class.php');
$DB = new db();

// get the stops
function getStopsDrop($name){
	global $DB;
	$ret = '<select name="'.$name.'" id="'.$name.'" class="stationpickers">';
	$sql = "SELECT * FROM stops WHERE 1 ORDER BY stop_id";
	$res= $DB->query($sql);
	while($r = $DB->fetchNextObject($res)){
		$shortName = substr($r->stop_id, 0, strpos($r->stop_id, " Caltrain"));
		$ret .= '<option value="'.$r->stop_id.'">'.$shortName.'</option>';
	}
	$ret .= '</select>';
	return $ret;
}

if($debug){
	echo getStopsDrop($name);
}

?>