index.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. {// 引入标签库 }
  2. <tagLib name="html" />
  3. <include file="Public:header" />
  4. <php>
  5. function podcast($id){
  6. return '<a src="/{$url_name}?m=UserGeneral&a=edit&id='.$id.'">'.$id.'</a>';
  7. }
  8. function getStatus($id){
  9. switch($id){
  10. case 1: return '进行中';
  11. case 2: return '已结束';
  12. default: return '结束';
  13. }
  14. }
  15. function getGameName($id)
  16. {
  17. return M("Games")->where("id=".$id)->getField("name");
  18. }
  19. </php>
  20. <script>
  21. //编辑跳转
  22. function games_item(id)
  23. {
  24. location.href = ROOT+"?"+VAR_MODULE+"="+MODULE_NAME+"&"+VAR_ACTION+"=games_item&id="+id;
  25. }
  26. </script>
  27. <div class="main">
  28. <div class="main_title_list"><div class="list-line-ico"></div>游戏列表</div>
  29. <div class="search_row">
  30. <form name="search" action="__APP__" method="get">
  31. 主播id:<input type="text" class="textbox" name="podcast_id" value="{:trim($_REQUEST['podcast_id'])}" />
  32. 游戏类型:<select name="game_id">
  33. <option value="0">所有</option>
  34. <foreach name="games" item="item">
  35. <option value="{$item.id}" <if condition="$_REQUEST['game_id'] eq $item['id']">selected="selected"</if>>{$item.name}</option>
  36. </foreach>
  37. </select>
  38. <input type="hidden" value="GameLog" name="m" />
  39. <input type="hidden" value="index" name="a" />
  40. <input type="submit" class="button" value="{%SEARCH}" />
  41. </form>
  42. </div>
  43. <html:list
  44. id="dataTable"
  45. style="dataTable"
  46. name="game_log"
  47. action="true"
  48. datasource="list"
  49. show="id:{%ID}
  50. ,podcast_id|podcast:主播id
  51. ,game_id|getGameName:游戏类型
  52. ,income:平台收入
  53. ,create_date:游戏创建时间
  54. ,status|getStatus:游戏状态"
  55. actionlist="edit:{%EDIT}" />
  56. <div class="blank5"></div>
  57. <div class="page">{$page}</div>
  58. </div>
  59. <include file="Public:footer" />