浏览代码

Merge pull request #7 from lvzx123/master-1

部分问题修复
Mr-Wu 2 年之前
父节点
当前提交
74bdbe9a4b
共有 4 个文件被更改,包括 9 次插入8 次删除
  1. 3 3
      pages/admin/general.php
  2. 2 2
      pages/card.php
  3. 2 2
      pages/homepage.php
  4. 2 1
      pages/submit.php

+ 3 - 3
pages/admin/general.php

@@ -47,11 +47,11 @@ if ($templateMode) {
         </div>
         <div class="mdui-textfield">
             <label class="mdui-textfield-label">自定义页面(请使用html格式、本站右侧应用栏的第三个列表)</label>
-            <textarea id="more_content" class="mdui-textfield-input" rows="4" placeholder="<?php echo getInfo('more_content') ?>"><?php echo getInfo('more_content') ?></textarea>
+            <textarea id="more_content" class="mdui-textfield-input" rows="4" placeholder="<?php echo htmlspecialchars(getInfo('more_content')) ?>"><?php echo getInfo('more_content') ?></textarea>
         </div>
         <div class="mdui-textfield">
             <label class="mdui-textfield-label">关于本站页面(请使用html格式)</label>
-            <textarea id="about_content" class="mdui-textfield-input" rows="4" placeholder="<?php echo getInfo('about_content') ?>"><?php echo getInfo('about_content') ?></textarea>
+            <textarea id="about_content" class="mdui-textfield-input" rows="4" placeholder="<?php echo htmlspecialchars(getInfo('about_content')) ?>"><?php echo getInfo('about_content') ?></textarea>
         </div>
     </div>
 
@@ -141,4 +141,4 @@ if ($templateMode) {
         }
     </script>
 </div>
-<br /><br />
+<br /><br />

+ 2 - 2
pages/card.php

@@ -109,7 +109,7 @@ try {
             <div class="mdui-card-actions">
                 <a class="copy mdui-btn mdui-btn-icon mdui-float-right" href="javascript:void(0);" data-clipboard-text="
                             <?php
-                            echo get_http_type() . $_SERVER['SERVER_NAME'];
+                            echo get_http_type() . $_SERVER['HTTP_HOST'];
                             if ($REWRITE) {
                                 echo "/card/" . $row['id'];
                             } else {
@@ -199,4 +199,4 @@ try {
             });
         });
     });
-</script>
+</script>

+ 2 - 2
pages/homepage.php

@@ -86,7 +86,7 @@ try {
                 <div class="mdui-card-actions">
                     <a class="copy mdui-btn mdui-btn-icon mdui-float-right" style="color:#4F4F4F" href="javascript:void(0);" data-clipboard-text="
                     <?php
-                    echo get_http_type() . $_SERVER['SERVER_NAME'];
+                    echo get_http_type() . $_SERVER['HTTP_HOST'];
                     if ($REWRITE) {
                         echo "/card/" . $row['id'];
                     } else {
@@ -154,4 +154,4 @@ if ($flag) {
         }
     }
 }
-?>
+?>

+ 2 - 1
pages/submit.php

@@ -155,6 +155,7 @@ if ($templateMode) {
                 toTA: toTA,
                 vCode: vCode
             }, function(rdata) {
+                if (rdata.id === undefined) return;
                 $("#qq").val("");
                 $("#name").val("");
                 $("#taName").val("");
@@ -177,4 +178,4 @@ if ($templateMode) {
         }
     </script>
 </div>
-<br /><br />
+<br /><br />