html_about.inc.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <?php
  2. //decode by http://dezend.qiling.org QQ 2859470
  3. if (is_array($about_action)) {
  4. $submit = in_array($submit, array('一键更新HTML', '开始生成html', '更新主页html', 'makehtml', '开始生成')) ? 'makehtml' : 'delhtml';
  5. $part == 'about' && $timer->start();
  6. foreach ($about_action as $k => $val) {
  7. if ($val == 'aboutus') {
  8. $loop = $db->getAll('SELECT id,typename,dir_typename FROM `' . $db_mymps . 'about`');
  9. $i = 0;
  10. foreach ($loop as $loops) {
  11. $i++;
  12. $id = $loops[id];
  13. $submit == 'makehtml' && (include MYMPS_ASS . '/' . $val . '.php');
  14. $filepath = $seo['seo_htmldir'] . '/aboutus/' . $loops['dir_typename'] . $seo['seo_htmlext'];
  15. if ($submit == 'makehtml') {
  16. $html_c = $smarty->fetch(mymps_tpl($val, 'smarty'), $val, $id);
  17. $html_m = $smarty->MakeHtmlFile(MYMPS_ROOT . $filepath, $html_c);
  18. echo inner('关于我们 => ' . $loops[typename] . ' 文件名 ' . $filepath . ' 生成成功!');
  19. } else {
  20. if ($submit == 'delhtml' && $filepath) {
  21. @unlink(MYMPS_ROOT . $filepath);
  22. echo inner('关于我们 => ' . $loops[typename] . ' 文件名 ' . $filepath . ' 删除成功!');
  23. }
  24. }
  25. if ($i == 1) {
  26. $indexpath = $seo['seo_htmldir'] . '/' . $val . '/index' . $seo[seo_htmlext];
  27. if ($submit == 'makehtml') {
  28. echo copy(MYMPS_ROOT . $filepath, MYMPS_ROOT . $indexpath) ? inner('成功复制' . $filepath . '为' . $indexpath . '!') : inner('复制' . $filepath . '为' . $indexpath . '失败!');
  29. } else {
  30. if ($submit == 'delhtml' && $indexpath) {
  31. @unlink(MYMPS_ROOT . $indexpath);
  32. echo inner('成功删除' . $indexpath . '!');
  33. }
  34. }
  35. }
  36. ob_flush();
  37. flush();
  38. }
  39. } else {
  40. if ($val == 'faq') {
  41. $idloop = $db->getAll('SELECT id FROM `' . $db_mymps . 'faq`');
  42. $i = 0;
  43. foreach ($idloop as $loop) {
  44. $i++;
  45. $id = $loop[id];
  46. $submit == 'makehtml' && (include MYMPS_ASS . '/' . $val . '.php');
  47. $filepath = $seo['seo_htmldir'] . '/' . $val . '/' . $id . $seo[seo_htmlext];
  48. if ($submit == 'makehtml') {
  49. $html_c = $smarty->fetch(mymps_tpl($val, 'smarty'), $id);
  50. $html_m = $smarty->MakeHtmlFile(MYMPS_ROOT . $filepath, $html_c);
  51. echo inner($about_option[$val] . ' ' . $filepath . ' 生成成功!');
  52. } else {
  53. if ($submit == 'delhtml' && $filepath) {
  54. @unlink(MYMPS_ROOT . $filepath);
  55. echo inner($about_option[$val] . ' ' . $filepath . ' 删除成功!');
  56. }
  57. }
  58. if ($i == 1) {
  59. $indexpath = $seo['seo_htmldir'] . '/' . $val . '/index' . $seo[seo_htmlext];
  60. if ($submit == 'makehtml') {
  61. echo copy(MYMPS_ROOT . $filepath, MYMPS_ROOT . $indexpath) ? inner('成功复制' . $filepath . '为' . $indexpath . '!') : inner('复制' . $filepath . '为' . $indexpath . '失败!');
  62. } else {
  63. if ($submit == 'delhtml' && $indexpath) {
  64. @unlink(MYMPS_ROOT . $indexpath);
  65. echo inner('成功删除' . $indexpath . '!');
  66. }
  67. }
  68. }
  69. ob_flush();
  70. flush();
  71. }
  72. } else {
  73. if (in_array($val, array('friendlink', 'announce'))) {
  74. $submit == 'makehtml' && (include MYMPS_ASS . '/' . $val . '.php');
  75. $filepath = $seo['seo_htmldir'] . '/' . $val . '/index' . $seo[seo_htmlext];
  76. if ($submit == 'makehtml') {
  77. $html_c = $smarty->fetch(mymps_tpl($val, 'smarty'), $val);
  78. $html_m = $smarty->MakeHtmlFile(MYMPS_ROOT . $filepath, $html_c);
  79. echo inner($about_option[$val] . ' 文件名 ' . $filepath . ' 生成成功!');
  80. } else {
  81. if ($submit == 'delhtml' && $filepath) {
  82. @unlink(MYMPS_ROOT . $filepath);
  83. echo inner($about_option[$val] . ' 文件 ' . $filepath . ' 删除成功!');
  84. }
  85. }
  86. ob_flush();
  87. flush();
  88. }
  89. }
  90. }
  91. }
  92. if ($part == 'about') {
  93. $timer->stop();
  94. echo '<br /><br />共耗时:' . $timer->spent();
  95. }
  96. } else {
  97. exit('您还未指定需要生成的页面!');
  98. }