帝國CMS二次開發回復后可見功能方法是參考修改的官方的loginjs.php文件,在需要顯示地方帳帖下方的“內容頁模板代碼”,然后新建一個php判斷文件,帳帖“index.php”內的代碼,完成。
1 2 3 4 5 | < h3 >文件下載:</ h3 > < script type = "text/javascript" > document.write('< script src="/e/extend/down/?classid=[!--classid--]&id=[!--id--]&d=<?php echo $navinfor[stb] ?>&t='+Math.random()+'"><'+'/script>'); </ script > < noscript >< div class = "reply-to-read" >< i class = "far fa-comment-dots" ></ i > 溫馨提示:你很可能禁用了Java scrip,我們無法正常為你服務,真心抱歉!</ div ></ noscript > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | <?php require ( "../../class/connect.php" ); if (!defined( 'InEmpireCMS' )) { exit (); } eCheckCloseMods( 'member' ); //關閉模塊 $myuserid =(int)getcvar( 'mluserid' ); $r = array (); $mhavelogin =0; if ( $myuserid ) { include ( "../../class/db_sql.php" ); include ( "../../member/class/user.php" ); $link =db_connect(); $empire = new mysqlquery(); $mhavelogin =1; //數據 $myusername =RepPostVar(getcvar( 'mlusername' )); $myrnd =RepPostVar(getcvar( 'mlrnd' )); $qcklgr =qCheckLoginAuthstr(); if (! $qcklgr [ 'islogin' ]) { EmptyEcmsCookie(); $mhavelogin =0; } else { $r = $empire ->fetch1( "select " .eReturnSelectMemberF( 'userid,username,checked' ). " from " .eReturnMemberTable(). " where " .egetmf( 'userid' ). "='$myuserid' and " .egetmf( 'rnd' ). "='$myrnd' limit 1" ); if ( empty ( $r [userid])|| $r [checked]==0) { EmptyEcmsCookie(); $mhavelogin =0; } } } if ( $mhavelogin ==1) { $down = '' ; $id =(int) $_GET [ 'id' ]; $classid =(int) $_GET [ 'classid' ]; $stb =(int) $_GET [ 'd' ]; $r_pl = $empire ->fetch1( "select userid,classid,id,saytime from {$dbtbpre}enewspl_1 where classid='$classid' and id='$id' and userid='$r[userid]' and saytime>UNIX_TIMESTAMP()-12*3600 order by saytime desc limit 1" ); if ( empty ( $r_pl [userid])) { $down = "<div class='reply-to-read'><p><i class='far fa-comment-dots'></i> " . $myusername . " 會員: 你輸入用戶名 " . $myusername . " 和登錄密碼<a href='#respond' title='評論本文'>「評論本文」</a>,即可獲得下載地址(資源有限,地址12小時內有效)。請不要回復無意義內容!</p></div>" ; } else { $down = "<div class='reply-to-read'><p><i class='far fa-comment-dots'></i> " . $myusername . " 會員: 你剛剛獲得下載地址 <a href='https://www.wentong.org/e/extend/down/go2dow.php?classid=" . $classid . "&id=" . $id . "&d=" . $stb . "&g=9'>/go2dow.php?g=9</a>(12小時內有效,過期請重新評論獲?。?。請不要回復無意義內容!</p></div>" ; } ?> document.writeln( "<?=$down?>" ); <?php db_close(); $empire =null; } else { ?> document.writeln( "<div class='reply-to-read'><p><i class='far fa-comment-dots'></i> 溫馨提示: 隱藏內容需要輸入「用戶名、密碼」<a href='#respond' title='評論本文'>「評論本文」</a>后查看。</p><p>未注冊的,請<a href='/e/member/register/' title='會員注冊'>「注冊」</a>。請不要回復無意義內容!</p></div>" ); <?php } ?> |
新聞熱點
疑難解答