国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

94 satır
3.1KB

  1. <?php
  2. /**
  3. * 管理后台首页主体
  4. *
  5. * @version $Id: index_body.php 1 11:06 2010年7月13日Z tianya $
  6. * @package DedeBIZ.Administrator
  7. * @copyright Copyright (c) 2022, DedeBIZ.COM
  8. * @license https://www.dedebiz.com/license
  9. * @link https://www.dedebiz.com
  10. */
  11. require(dirname(__FILE__).'/config.php');
  12. require(DEDEINC.'/image.func.php');
  13. require(DEDEINC.'/dedetag.class.php');
  14. //默认主页
  15. if (empty($dopost)) {
  16. require(DEDEINC.'/inc/inc_fun_funAdmin.php');
  17. $verLockFile = DEDEDATA.'/admin/ver.txt';
  18. $fp = fopen($verLockFile, 'r');
  19. $upTime = trim(fread($fp, 64));
  20. fclose($fp);
  21. $oktime = substr($upTime, 0, 4).'-'.substr($upTime, 4, 2).'-'.substr($upTime, 6, 2);
  22. $offUrl = SpGetNewInfo();
  23. $dedecmsidc = DEDEDATA.'/admin/idc.txt';
  24. $fp = fopen($dedecmsidc, 'r');
  25. $dedeIDC = fread($fp, filesize($dedecmsidc));
  26. fclose($fp);
  27. include DedeInclude('templets/index_body.htm');
  28. exit();
  29. }
  30. else if ($dopost == 'setskin') {
  31. $cskin = empty($cskin) ? 1 : $cskin;
  32. $skin = !in_array($cskin, array(1, 2, 3, 4)) ? 1 : $cskin;
  33. $skinconfig = DEDEDATA.'/admin/skin.txt';
  34. PutFile($skinconfig, $skin);
  35. } elseif ($dopost == 'get_seo') {
  36. //直接采用DedeBIZ重写方法
  37. exit;
  38. } elseif ($dopost == "system_info") {
  39. if (!extension_loaded("openssl")) {
  40. echo json_encode(array(
  41. "code" => -1001,
  42. "msg" => "PHP不支持OpenSSL,无法完成商业版授权",
  43. "result" => null,
  44. ));
  45. exit;
  46. }
  47. if (empty($cfg_auth_code)) {
  48. echo json_encode(array(
  49. "code" => -1002,
  50. "msg" => "当前站点尚未购买商业版授权",
  51. "result" => null,
  52. ));
  53. exit;
  54. }
  55. openssl_public_decrypt(base64_decode($cfg_auth_code), $decotent, DEDEPUB);
  56. $core_info = new stdClass;
  57. if (!empty($cfg_bizcore_appid) && !empty($cfg_bizcore_key)) {
  58. $client = new DedeBizClient($cfg_bizcore_hostname, $cfg_bizcore_port);
  59. $client->appid = $cfg_bizcore_appid;
  60. $client->key = $cfg_bizcore_key;
  61. $core_info = $client->SystemInfo();
  62. $client->Close();
  63. }
  64. if (!empty($decotent)) {
  65. $res = json_decode($decotent);
  66. if (isset($res->sid)) {
  67. echo json_encode(array(
  68. "code" => 200,
  69. "msg" => "",
  70. "result" => array(
  71. "domain" => $res->domain,
  72. "title" => $res->title,
  73. "stype" => $res->stype == 1 ? "企业单位" : "个人",
  74. "auth_version" => $res->auth_version,
  75. "auth_at" => date("Y-m-d", $res->auth_at),
  76. "core" => $core_info,
  77. ),
  78. ));
  79. }
  80. }
  81. } elseif ($dopost == 'get_statistics') {
  82. require_once(DEDEINC."/libraries/statistics.class.php");
  83. //获取统计信息
  84. $sdate = empty($sdate) ? 0 : intval($sdate);
  85. $stat = new DedeStatistics;
  86. $rs = $stat->GetInfoByDate($sdate);
  87. echo json_encode(array(
  88. "code" => 200,
  89. "msg" => "",
  90. "result" => $rs,
  91. ));
  92. exit;
  93. }
  94. ?>