|
1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
-
- require_once(dirname(__FILE__).'/config.php');
- require_once(DEDEINC.'/libraries/oxwindow.class.php');
- CheckPurview('sys_StringMix');
- if (empty($dopost)) $dopost = '';
- if (empty($allsource)) $allsource = '';
- else $allsource = stripslashes($allsource);
- $m_file = DEDEDATA."/downmix.data.inc";
-
- if ($dopost == "save") {
- CheckCSRF();
- $fp = fopen($m_file, 'w');
- flock($fp, 3);
- fwrite($fp, $allsource);
- fclose($fp);
- echo "<script>alert('Save OK!');</script>";
- }
-
- if (empty($allsource) && filesize($m_file) > 0) {
- $fp = fopen($m_file, 'r');
- $allsource = fread($fp, filesize($m_file));
- fclose($fp);
- }
- make_hash();
- $wintitle = "防采集小工具";
- $wecome_info = "防采集小工具";
- $win = new OxWindow();
- $win->Init('article_string_mix.php', 'js/blank.js', 'POST');
- $win->AddHidden('dopost', 'save');
- $win->AddHidden('token', $_SESSION['token']);
- $win->AddTitle("<div class='alert alert-info mb-0'>启用字符串混淆来防采集功能,请在文档模板需要的字段加上function='RndString(@me)'属性,如:{dede:field name='body' function='RndString(@me)'/}</div>");
- $win->AddMsgItem("<textarea name='allsource' id='allsource' class='admin-textarea-xl'>$allsource</textarea>");
- $winform = $win->GetWindow('ok');
- $win->Display();
- ?>
|