?? ex2.php
字號:
<?
if (!isset ($_SESSION)) session_start();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html dir="rtl">
<head>
<title>Rico LiveGrid-Example 2</title>
<?
session_set_cookie_params(60*60);
$sqltext="select OrderID,CustomerID,ShipName,ShipCity,ShipCountry,OrderDate,ShippedDate from orders order by OrderID";
$_SESSION['ex2']=$sqltext;
require "chklang.php";
require "settings.php";
?>
<script src="../../../src/rico.js" type="text/javascript"></script>
<link href="../../client/css/demo.css" type="text/css" rel="stylesheet" />
<script type='text/javascript'>
Rico.loadModule('LiveGridAjax');
Rico.loadModule('LiveGridMenu');
<?
setStyle();
setLang();
?>
var orderGrid,buffer;
Rico.onLoad( function() {
var opts = {
<? GridSettingsScript(); ?>,
columnSpecs : [,,,,,{type:'date'},{type:'date'}]
};
buffer=new Rico.Buffer.AjaxSQL('../ricoXMLquery.php', {TimeOut:<? print array_shift(session_get_cookie_params())/60 ?>});
orderGrid=new Rico.LiveGrid ('ex2', buffer, opts);
orderGrid.menu=new Rico.GridMenu(<? GridSettingsMenu(); ?>);
});
</script>
</head>
<body>
<?
require "menu.php";
print "<table id='explanation' border='0' cellpadding='0' cellspacing='5' style='clear:both'><tr valign='top'><td>";
GridSettingsForm();
?>
</td><td>This example uses AJAX to fetch order data as required.
It also demonstrates how the number of rows can be set automatically based
on the size of the window.
</td></tr></table>
<p class="ricoBookmark"><span id='ex2_timer' class='ricoSessionTimer'></span><span id="ex2_bookmark"> </span></p>
<table id="ex2" class="ricoLiveGrid" cellspacing="0" cellpadding="0">
<colgroup>
<col style='width:40px;' >
<col style='width:60px;' >
<col style='width:150px;'>
<col style='width:80px;' >
<col style='width:90px;' >
<col style='width:100px;'>
<col style='width:100px;'>
</colgroup>
<tr>
<th>Order#</th>
<th>Customer#</th>
<th>Ship Name</th>
<th>Ship City</th>
<th>Ship Country</th>
<th>Order Date</th>
<th>Ship Date</th>
</tr>
</table>
<!--
<textarea id='ex2_debugmsgs' rows='5' cols='80'></textarea>
-->
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -