ppt_main.php 939 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. require_once(dirname(__FILE__).'/config.php');
  3. require_once(DEDEINC.'/datalistcp.class.php');
  4. require_once(DEDEINC.'/common.func.php');
  5. setcookie('ENV_GOBACK_URL',$dedeNowurl,time()+3600,'/');
  6. function GetPptTypeName($id)
  7. {
  8. global $dsql;
  9. $row = $dsql->GetOne("Select * From `#@__myppttype` where id='$id'");
  10. $typename=$row['typename'];
  11. if($typename=="")
  12. {
  13. $typename="默认分类";
  14. }
  15. return $typename;
  16. }
  17. if(!empty($tid))
  18. {
  19. $sql = "Select * from `#@__myppt` where typeid='{$tid}' order by orderid asc";
  20. }
  21. else
  22. {
  23. $sql = "Select * from `#@__myppt` order by aid desc,orderid asc";
  24. }
  25. $dlist = new DataListCP();
  26. $dlist->SetTemplet(DEDEADMIN."/templets/ppt_main.htm");
  27. $dlist->SetSource($sql);
  28. $dlist->display();
  29. function TestType($tname)
  30. {
  31. if($tname=="")
  32. {
  33. return "所有栏目";
  34. }
  35. else
  36. {
  37. return $tname;
  38. }
  39. }
  40. function TimeSetValue($ts)
  41. {
  42. if($ts==0)
  43. {
  44. return "不限时间";
  45. }
  46. else
  47. {
  48. return "限时标记";
  49. }
  50. }
  51. ?>