<?php require 'authentication_manager.php'; ?>
<style>
.note { background-color:#FFFFCC; }
</style>
<script>
function openBlock(o, id) {
  var obj = $(id);
  if (obj != null) {
    if (getStyle(obj, 'display') == 'block') {
      obj.style.display = 'none';
      o.innerHTML = o.innerHTML.replace(/︽/g, '︾');
    } else {
      obj.style.display = 'block';
      o.innerHTML = o.innerHTML.replace(/︾/g, '︽');
    }
  }
}

addEvent(window, "load", function() {
  var hash = window.location.hash;
  hash = hash.replace(/\#\s/g, '');
  if (hash != '' && ($(hash) != null && $(hash+'_') != null)) {
    openBlock($(hash), hash+'_');
  }
});

</script>
<h5 class="list_title"><a href="javascript:void(0)" id="new2" name="new2" onclick="openBlock(this, 'new2_');return false" class="list_title_in">爽洁版模式下的【新闻号外】管理 ︾</a><a href="index_new.php" target="_blank">预览</a></h5>
<code id="new2_" style="display:none">
<?php
@ require 'writable/extra/inc/set/img.php';
?>
<form action="?post=extra" method="post" target="_blank">
  <table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td width="200" align="center">边栏【<?php echo $extra['name']; ?>】<a href="writable/extra/s_news_img.php" target="_blank" style="font-size:12px">预览</a> 采集设置：<br />
<input type="radio" class="radio" name="extra_open" value="1"<?php echo $extra['open']==1?' checked="checked"':''; ?> >开启<br />
<input type="radio" class="radio" name="extra_open" value="0"<?php echo $extra['open']!=1?' checked="checked"':''; ?> >关闭</td>
      <td><div id="extra_img" class="note" style="height:120px; overflow:hidden;">
<?php
$text = '';
  $text .= '<b>采集源URL：</b><br />
$extra[\'url\']=<input type="text" name="extra_url" value="'.$extra['url'].'" size="40" /><br />';

  if ((string)$extra['time_step'] == '' || !is_numeric($extra['time_step'])) {
      $p_time = ' checked="checked"';
  } else {
      if ($extra['time_step'] > 0) {
        $p_time1 = ' checked="checked"';
        $p_time_val = abs($extra['time_step']);
        $p_time_key = '';
      } else {
        $p_time0 = ' checked="checked"';
        $p_time_val = '';
        $p_time_key = abs($extra['time_step']);
      }
  }
  $text .= '<b>采集刷新时效：</b><br />
$extra[\'time_step\']=<input type="radio" class="radio" name="p_time" id="p_time_img" value="" onclick="$(\'p_time_key_img\').value=$(\'p_time_val_img\').value=\'\';"'.$p_time.'>采集完后永不刷新<input type="radio" class="radio" name="p_time" id="p_time_img0" value="0" onclick="$(\'p_time_val_img\').value=\'\';"'.$p_time0.'>以每天<input type="text" name="p_time_key" id="p_time_key_img" size="1" value="'.$p_time_key.'" onclick="$(\'p_time_img\').checked=$(\'p_time_img1\').checked=false;$(\'p_time_img0\').checked=true;" onblur="isDigit(this,\''.$p_time_key.'\',1);">时

<input type="radio" class="radio" name="p_time" id="p_time_img1" value="1" onclick="$(\'p_time_key_img\').value=\'\';"'.$p_time1.'>以<input type="text" name="p_time_val" id="p_time_val_img" size="1" value="'.$p_time_val.'" onclick="$(\'p_time_img\').checked=$(\'p_time_img0\').checked=false;$(\'p_time_img1\').checked=true;" onblur="isDigit(this,\''.$p_time_val.'\',0);">分钟间隔

<br />';
  unset($p_time, $p_time1, $p_time_val, $p_time_key, $p_time0);
  $text .= '<b>采集图片生成宽度：</b><br />
$extra[\'w\']=<input type="text" name="extra_w" value="'.$extra['w'].'" onblur="isDigit(this,\''.$extra['w'].'\',0);" size="5" /><br />';
  $text .= '<b>采集图片储存目录：</b><br />
$extra[\'img_d\']=writable/extra/inc/'.$extra['img_d'].'<br />';
  $extra['code_php'] = file_get_contents('writable/extra/inc/code/img.php');
  $extra['code_php'] = str_replace('&', '&amp;', $extra['code_php']);
  $extra['code_php'] = str_replace('<', '&lt;', $extra['code_php']);
  $extra['code_php'] = str_replace('>', '&gt;', $extra['code_php']);
  $text .= '<b>采集运行PHP源码（必须本地测试好，否则会造成该模块崩溃）：</b><br /><div class="greenword">
变量 $news_txt 为抓取的整个网页内容，所有操作以其为基础<br />
变量 $text 为加工后，我们需要的内容，即图片列表组<br />
其中自定义函数 write_file （参见readonly/function/write_file.php）为写入文件<br />
其中自定义函数 run_img_resize （参见readonly/function/run_img_resize.php）为转变图片大小</div>
<textarea name="extra_code_php" rows="5" style="width:99%;">'.$extra['code_php'].'</textarea>';

  $extra['code_css'] = file_get_contents('writable/extra/inc/code/img.css');
  $extra['code_css'] = str_replace('&', '&amp;', $extra['code_css']);
  $extra['code_css'] = str_replace('<', '&lt;', $extra['code_css']);
  $extra['code_css'] = str_replace('>', '&gt;', $extra['code_css']);
  $text .= '<b>相关CSS代码：</b><br />
<textarea name="extra_code_css" rows="5" style="width:99%;">'.$extra['code_css'].'</textarea>';

  $extra['code_js'] = file_get_contents('writable/extra/inc/code/img.js');
  $extra['code_js'] = str_replace('&', '&amp;', $extra['code_js']);
  $extra['code_js'] = str_replace('<', '&lt;', $extra['code_js']);
  $extra['code_js'] = str_replace('>', '&gt;', $extra['code_js']);
  $text .= '<b>相关JS代码：</b><br />
<textarea name="extra_code_js" rows="5" style="width:99%;">'.$extra['code_js'].'</textarea>';


echo $text;
unset($extra);
$text = '';
?>  
  <input type="hidden" name="act" value="img" /></div>
<div id="extra_img_sub" style="display:none;"><button type="submit" class="send2">提交</button></div>
<div class="note" style=" margin-top:-11px; clear:both;"><a href="javascript:void(0)" onclick="$('extra_img').style.height='auto';$('extra_img_sub').style.display='block';this.parentNode.style.display='none';return false;">展开︾</a></div>

</td>
    </tr>
  </table>
</form>
<?php
@ require 'writable/extra/inc/set/li.php';
?>
<form action="?post=extra" method="post" target="_blank">
  <table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td width="200" align="center">边栏【<?php echo $extra['name']; ?>】<a href="writable/extra/s_news_li.php" target="_blank" style="font-size:12px">预览</a> 采集设置：<br />
<input type="radio" class="radio" name="extra_open" value="1"<?php echo $extra['open']==1?' checked="checked"':''; ?> >开启<br />
<input type="radio" class="radio" name="extra_open" value="0"<?php echo $extra['open']!=1?' checked="checked"':''; ?> >关闭</td>
      <td><div id="extra_li" class="note" style="height:120px; overflow:hidden;">
<?php
$text = '';
  $text .= '<b>采集源URL：</b><br />
$extra[\'url\']=<input type="text" name="extra_url" value="'.$extra['url'].'" size="40" /><br />';
  if ((string)$extra['time_step'] == '' || !is_numeric($extra['time_step'])) {
      $p_time = ' checked="checked"';
  } else {
      if ($extra['time_step'] > 0) {
        $p_time1 = ' checked="checked"';
        $p_time_val = abs($extra['time_step']);
        $p_time_key = '';
      } else {
        $p_time0 = ' checked="checked"';
        $p_time_val = '';
        $p_time_key = abs($extra['time_step']);
      }
  }
  $text .= '<b>采集刷新时效：</b><br />
$extra[\'time_step\']=<input type="radio" name="p_time" id="p_time_li" value="" onclick="$(\'p_time_key_li\').value=$(\'p_time_val_li\').value=\'\';"'.$p_time.'>采集完后永不刷新<input type="radio" class="radio" name="p_time" id="p_time_li0" value="0" onclick="$(\'p_time_val_li\').value=\'\';"'.$p_time0.'>以每天<input type="text" name="p_time_key" id="p_time_key_li" size="1" value="'.$p_time_key.'" onclick="$(\'p_time_li\').checked=$(\'p_time_li1\').checked=false;$(\'p_time_li0\').checked=true;" onblur="isDigit(this,\''.$p_time_key.'\',1);">时

<input type="radio" class="radio" name="p_time" id="p_time_li1" value="1" onclick="$(\'p_time_key_li\').value=\'\';"'.$p_time1.'>以<input type="text" name="p_time_val" id="p_time_val_li" size="1" value="'.$p_time_val.'" onclick="$(\'p_time_li\').checked=$(\'p_time_li0\').checked=false;$(\'p_time_li1\').checked=true;" onblur="isDigit(this,\''.$p_time_val.'\',0);">分钟间隔

<br />';
  unset($p_time, $p_time1, $p_time_val, $p_time_key, $p_time0);
  $text .= '<b>预显示内容ID：</b><br />
$extra[\'hot\']=<input type="text" name="extra_hot" value="'.$extra['hot'].'" size="5" /> 抓取的内容中，最前面的希望显示的内容设置一个标签（示例即 id="'.$extra['hot'].'"），预显示该内容，其它内容随鼠标浮到时显示出来；极其建议设置此项，否则内容多时前台加载时可能被撑破<br />';
  $text .= '<b>采集图片储存目录：</b><br />
$extra[\'img_d\']='.$extra['img_d'].'<br />';
  $extra['code_php'] = file_get_contents('writable/extra/inc/code/li.php');
  $extra['code_php'] = str_replace('&', '&amp;', $extra['code_php']);
  $extra['code_php'] = str_replace('<', '&lt;', $extra['code_php']);
  $extra['code_php'] = str_replace('>', '&gt;', $extra['code_php']);

  $text .= '<b>采集运行PHP源码（必须本地测试好，否则会造成该模块崩溃）：</b><br />
<textarea name="extra_code_php" rows="5" style="width:99%;">'.$extra['code_php'].'</textarea>';

  $extra['code_css'] = file_get_contents('writable/extra/inc/code/li.css');
  $extra['code_css'] = str_replace('&', '&amp;', $extra['code_css']);
  $extra['code_css'] = str_replace('<', '&lt;', $extra['code_css']);
  $extra['code_css'] = str_replace('>', '&gt;', $extra['code_css']);
  $text .= '<b>相关CSS代码：</b><br />
<textarea name="extra_code_css" rows="5" style="width:99%;">'.$extra['code_css'].'</textarea>';

  $extra['code_js'] = file_get_contents('writable/extra/inc/code/li.js');
  $extra['code_js'] = str_replace('&', '&amp;', $extra['code_js']);
  $extra['code_js'] = str_replace('<', '&lt;', $extra['code_js']);
  $extra['code_js'] = str_replace('>', '&gt;', $extra['code_js']);
  $text .= '<b>相关JS代码：</b><br />
<textarea name="extra_code_js" rows="5" style="width:99%;">'.$extra['code_js'].'</textarea>';

echo $text;
unset($extra);
unset($text);
?>
  <input type="hidden" name="act" value="li" /></div>
<div id="extra_li_sub" style="display:none;"><button type="submit" class="send2">提交</button></div>
<div class="note" style=" margin-top:-11px; clear:both;"><a href="javascript:void(0)" onclick="$('extra_li').style.height='auto';$('extra_li_sub').style.display='block';this.parentNode.style.display='none';return false;">展开︾</a></div>

</td>
    </tr>
  </table>
</form>
</code>

<p>&nbsp;</p>

<h5 class="list_title"><a href="javascript:void(0)" id="shouji" name="shouji" onclick="openBlock(this, 'shouji_');return false" class="list_title_in">边栏【手机充值】 ︾</a></h5>
<code id="shouji_" style="display:none">
<form action="?post=extra" method="post" target="_blank">
  <table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td width="200" align="center">边栏【手机充值】开关：</td>
      <td><div class="note note2">
<?php
if (file_exists('writable/require/chongzhi.txt')) {
  echo '<input type="radio" class="radio" name="chongzhi_open" value="1" checked="checked" />已安装（注：淘宝联盟的可能要在联盟注册的域名中才能正常显示 <a href="?get=modify&otherfile='.get_en_url('writable/require/chongzhi.txt').'">编辑手机充值代码</a>）<br />
<input type="radio" class="radio" name="chongzhi_open" value="0" />卸载';
} else {
  echo '<input type="radio" class="radio" name="chongzhi_open" value="0" checked="checked" />未安装<br />
<input type="radio" class="radio" name="chongzhi_open" value="1" />安装（注：淘宝联盟的可能要在联盟注册的域名中才能正常显示 <a href="?get=modify&otherfile='.get_en_url('readonly/require/chongzhi.txt').'">编辑手机充值代码</a>）';
}
?></div>
<div><button type="submit" class="send2">提交</button></div></td>
    </tr>
  </table>
  <input type="hidden" name="act" value="chongzhi" />
</form>
</code>
<p>&nbsp;</p>

<h5 class="list_title"><a href="javascript:void(0)" id="new_site" name="new_site" onclick="openBlock(this, 'new_site_');return false" class="list_title_in">边栏【新录网站】 ︾</a></h5>
<code id="new_site_" style="display:none">
<form action="?post=extra" method="post" target="_blank">
  <table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td width="200" align="center">边栏【新录网站】开关：</td>
      <td><?php
echo file_exists('readonly/require/newsite.php') ? '<div class="note note2">'.(file_exists('writable/require/newsite.php') ? '<input type="radio" class="radio" name="newsite" value="1" checked="checked" />已安装<br /><input type="radio" class="radio" name="newsite" value="0" />卸载' : '<input type="radio" class="radio" name="newsite" value="0" checked="checked" />未安装<br />
<input type="radio" class="radio" name="newsite" value="1" />安装').'</div>' : '<span class="redword">该版本未安装</span>[欲安装请联系作者定制]'; ?>
<div><button type="submit" class="send2">提交</button></div></td>
    </tr>
  </table>
  <input type="hidden" name="act" value="newsite" />
</form>
</code>
<p>&nbsp;</p>

<h5 class="list_title"><a href="javascript:void(0)" id="new_info" name="new_info" onclick="openBlock(this, 'new_info_');return false" class="list_title_in">边栏【<?php echo $newinfo_title = empty($web['newinfo_url'][2]) ? '信 息 窗' : $web['newinfo_url'][2]; ?>】 ︾</a></h5>
<code id="new_info_" style="display:none">
<form action="?post=extra" method="post" target="_blank">
  <table width="100%" border="0" cellspacing="5" cellpadding="0">
    <tr>
      <td width="200" align="center">边栏【<input type="text" name="newinfo_url[2]" value="<?php echo $newinfo_title; ?>" size="6" maxlength="" />】开关：</td>
      <td><?php
echo file_exists('readonly/require/newinfo.php') ? '<div class="note note2">'.(file_exists('writable/require/newinfo.php') ? '<input type="radio" class="radio" name="newinfo" value="1" checked="checked" />已安装：<br />
　　'.$newinfo_title.'列表调用文件的URL：<input type="text" name="newinfo_url[0]" value="'.$web['newinfo_url'][0].'" size="50" maxlength="" /><br />
　　'.$newinfo_title.'“我要发布”的URL：<input type="text" name="newinfo_url[1]" value="'.$web['newinfo_url'][1].'" size="50" maxlength="" /><br />

<input type="radio" class="radio" name="newinfo" value="0" />卸载' : '<input type="radio" class="radio" name="newinfo" value="0" checked="checked" />未安装<br />
<input type="radio" class="radio" name="newinfo" value="1" />安装：<br />
'.$newinfo_title.'列表调用文件的URL：<input type="text" name="newinfo_url[0]" value="'.$web['newinfo_url'][0].'" size="50" maxlength="" /><br />
'.$newinfo_title.'“我要发布”的URL：<input type="text" name="newinfo_url[1]" value="'.$web['newinfo_url'][1].'" size="50" maxlength="" />
').'<br />　　还没有自己的信息发布系统？点击<a href="http://www.162100.com/down" target="_blank">下载【162100留言吧】或者【162100论坛/信息/文章三合一系统】</a>
<div  class="redword" style="font-size:12px; line-height:normal;">注意：<br />
1.添加'.$newinfo_title.'地址最好填写绝对网址，如“http://info.162100.com/接口文件”；<br />
2.若安装了别的信息程序系统，接口文件请自己写；<br />
3.默认调用官方的。</div></div>' : '<span class="redword">该版本未安装</span>[欲安装请联系作者定制]'; ?>
<div><button type="submit" class="send2">提交</button></div></td>
    </tr>
  </table>
  <input type="hidden" name="act" value="newinfo" />
</form>
</code>


<script>
if (from = location.href.toString().match(/\#(\w+)/)) {
  if ($(from[1])!=null){
    location.href='#'+from[1];
    openBlock($(from[1]), from[1]+'_');
  }
}
</script>


