<?php
require ('authentication_member.php');
?>
<?php

/* 取：我的文章 */
/* 162100源码 - 162100.com */


$row_area_check = $row_area_expires = $area_postion = $area_mode = array();
$credit_total = $funds_total = $n = $n_ = $mess = $writecount = 0;
$text = $err = '';
$list_url = $web['url_html_list'] == 1 ? '"list.".$area_mode[get_arearoot($row["area_id"])].".".$row["area_id"]."..1.html"' : '"list.php?mode=".$area_mode[get_arearoot($row["area_id"])]."&area_id=".$row["area_id"].""';
$article_url = $web['url_html_article'] == 1 ? '"article.".$area_mode[get_arearoot($row["area_id"])].".".$row["id"].".1.html"' : '"article.php?mode=".$area_mode[get_arearoot($row["area_id"])]."&id=".$row["id"].""';

if (!isset($sql['db_err'])) {
  db_conn();
}

if ($sql['db_err'] == '') {

  $result = @mysql_query('SELECT mess_num,ABS(writecount) AS wc,check_reg FROM '.$sql['pref'].''.$sql['data']['承载成员档案的表名'].' WHERE username="'.$session[0].'" LIMIT 1', $db);
  if ($row = @mysql_fetch_assoc($result)) {
    if ($row['check_reg'] == '1') {
      $err = '帐号注册审核中！';
    } elseif ($row['check_reg'] == '2') {
      $err = '帐号已被移除至<a href="list_member.php?act=punished" target="_blank">黑名单</a>！';
    } else {
      $mess = '<span class="grayword">'.preg_replace('/^\d+/', '<span>$0</span>', $row['mess_num']).'</span>';
    }
    $writecount = $row['wc'];
    unset($row);
  } else {
    $err = '帐号不存在！';
  }
  @mysql_free_result($result);

  if (empty($err)) {

    $result = @mysql_query('SELECT area_id,area_check,area_index,area_expires FROM '.$sql['pref'].''.$sql['data']['承载版区分类的表名'].' WHERE area_id REGEXP "^[0-9]+\-[0-9]+$"', $db);
    while ($row = @mysql_fetch_assoc($result)) {
      if ($row['area_check'] == '1') $row_area_check[$row['area_id']] = 1;
      if (floatval($row['area_expires']) > 0) $row_area_expires[$row['area_id']] = floatval($row['area_expires']);
      $area_mode[$row['area_id']] = get_li_mode($row['area_index']);
      unset($row);
    }
    @mysql_free_result($result);

$_GET['act'] = @$_GET['act'];
    if ($_GET['act'] == 'check') {
      $input_delk = '_check';
      $where_eval = ' AND area_check="1"';
      $list_title = '"<a href=\"?get=list\">发布中的记录</a><a class=\"list_title_in\">审核中的记录<span>（".$n."）</span></a><a href=\"?get=list&act=check_warning\">审核未通过的记录</a><a href=\"?get=list&act=warehouse\">已下架的记录</a><a href=\"?get=list&act=pass\">已过期的记录</a>"';
      $area_name = '"<span class=\"ar ar2\">[<a href=\"member.php?get=list_edit&id=".$row["id"]."\" target=\"_blank\">编辑</a>]</span>"';

    } elseif ($_GET['act'] == 'check_warning') {
      $input_delk = '_check';
      $where_eval = ' AND area_check="2"';
      $list_title = '"<a href=\"?get=list\">发布中的记录</a><a href=\"?get=list&act=check\">审核中的记录</a><a class=\"list_title_in\">审核未通过的记录<span>（".$n."）</span></a><a href=\"?get=list&act=warehouse\">已下架的记录</a><a href=\"?get=list&act=pass\">已过期的记录</a>"';
      $area_name = '"<span class=\"ar ar2\">[原因：".$row["other"]."] [<a href=\"member.php?get=list_edit&id=".$row["id"]."\" target=\"_blank\">编辑</a>]</span>"';

    } elseif ($_GET['act'] == 'warehouse') {
      $where_eval = ' AND area_check="3"';
      $list_title = '"<a href=\"?get=list\">发布中的记录</a><a href=\"?get=list&act=check\">审核中的记录</a><a href=\"?get=list&act=check_warning\">审核未通过的记录</a><a class=\"list_title_in\">已下架的记录<span>（".$n."）</span></a><a href=\"?get=list&act=pass\">已过期的记录</a>"';
      $area_name = '"<span class=\"ar ar2\">[<a href=\"?post=unity_run&dataname=listdata&limit=again&id[]=".$row["id"]."&m=1\" target=\"lastFrame\">上架</a>]</span>"';

    } elseif ($_GET['act'] == 'pass') {
      if (is_array($row_area_expires) && count($row_area_expires) > 0) {
        foreach ($row_area_expires as $k => $v) {
          $where_eval .= ' OR ((area_id="'.$k.'" OR area_id LIKE "'.$k.'\_%") AND topdate<DATE_ADD(UTC_TIMESTAMP(), INTERVAL '.(floatval($web['time_pos']) - $v * 24).' HOUR))';
        }
        $where_eval = ' AND ('.preg_replace('/^ OR /', '', $where_eval).')';
      }
      $list_title = '"<a href=\"?get=list\">发布中的记录</a><a href=\"?get=list&act=check\">审核中的记录</a><a href=\"?get=list&act=check_warning\">审核未通过的记录</a><a href=\"?get=list&act=warehouse\">已下架的记录</a><a class=\"list_title_in\">已过期的记录<span>（".$n."）</span></a>"';
      $area_name = '"<span class=\"ar ar2\">[<a href=\"?post=unity_run&dataname=listdata&limit=refresh&id[]=".$row["id"]."&m=1\" onclick=\"return confirmRefreshMoney(this, \''.$web['refreshdel'].'\');\" target=\"lastFrame\">刷新</a>]</span>"';

    } else {
      $where_eval = ' AND area_check="0"';
      $list_title = '"<a class=\"list_title_in\">发布中的记录<span>（<span title=\"实际库存\">".$n."</span>/<span title=\"总计\" class=\"gray\">".$writecount."</span>）</span></a><a href=\"?get=list&act=check\">审核中的记录</a><a href=\"?get=list&act=check_warning\">审核未通过的记录</a><a href=\"?get=list&act=warehouse\">已下架的记录</a><a href=\"?get=list&act=pass\">已过期的记录</a>"';

      $d = time() + floatval($web["time_pos"]) * 3600;
      $area_name = 'li_eval($row)';
    }

    if (isset($where_eval)) {
      $result = @mysql_query('SELECT COUNT(id) AS total FROM '.$sql['pref'].''.$sql['data']['承载主题文章的表名'].' WHERE author_ip="'.$session[0].'"'.$where_eval.'', $db);
      $row = @mysql_fetch_assoc($result);
      $n = abs($row['total']);
      unset($row);
      @mysql_free_result($result);

      require ('inc/function/get_page.php');
      require ('inc/function/get_date.php'); //时间
      if ($n > 0) {
        $p = get_page($n); //页数
        $seek = $web['pagesize'] * ($p-1);
        //$result = @mysql_query('SELECT *,(topdate-DATE_ADD(UTC_TIMESTAMP(), INTERVAL '.floatval($web['time_pos']).' HOUR)) AS t FROM '.$sql['pref'].''.$sql['data']['承载主题文章的表名'].' WHERE author_ip="'.$session[0].'"'.$where_eval.' ORDER BY topdate DESC LIMIT '.$seek.','.$web['pagesize'].'', $db);
        $result = @mysql_query('SELECT * FROM '.$sql['pref'].''.$sql['data']['承载主题文章的表名'].' WHERE author_ip="'.$session[0].'"'.$where_eval.' ORDER BY topdate DESC LIMIT '.$seek.','.$web['pagesize'].'', $db);
        while ($row = @mysql_fetch_assoc($result)) {
          $area_postion[$row['area_id']][] = $row['id'];
          //$row['title'] = preg_replace('/(\|.*)?/', '', $row['title']);
          $text .= '
<table width="100%" class="li_face" id="check_'.$row['id'].'" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20"><input name="id[]" id="id['.$row['id'].']" title="'.$row['id'].'" type="checkbox" class="checkbox" value="'.$row['id'].'" /><input name="area_id['.$row['id'].']" id="area_id['.$row['id'].']" type="hidden" value="'.$row['area_id'].'" /><input name="area_index['.$row['id'].']" id="area_index['.$row['id'].']" type="hidden" value="'.@$area_mode[get_arearoot($row['area_id'])].'" /></td>
    <td class="li_subject">
      <span id="title_mark['.$row['id'].']">'.$row['title_mark'].'</span><a href="'.eval('return '.$article_url.';').'" title="'.$row['title'].'" class="li_a" target="_blank" name="li_a[]"'.$row['title_style'].'>'.$row['title'].'</a> <span class="ar" id="area_name_'.$row['id'].'"></span> '.eval('return '.$area_name.';').'
     <div class="li_">
	    发表 '.$row['author_ip'].'（'.get_date_c($row['date']).'）
        <span class="li_update_mark" title="更新"></span> '.(!empty($row['other']) ? (strstr((string)$row['other'], '.') ? $row['other'] : '<a href="user.php?get=card&username='.urlencode($row['other']).'" target="_blank" title="'.$row['other'].'
点击查看回复人名片">'.$row['other'].'</a>') : $row['author_ip']).'（'.get_date_c($row['topdate']).'）
     </div>

   </td>
        <td class="li_views_reply">回复/阅览<br />'.$row['reply'].'/'.$row['views'].'</td>
  </tr>
</table>
';
          unset($row);

        }
        @mysql_free_result($result);
        $text .= get_page_foot($n, $web['pagesize'], $p, '?get=list&act='.$_GET['act'].'&p=');

	  } else {
        $err = '暂无记录';
      }
    } else {
      $err = '暂无记录';
    }
    $result = @mysql_query('SELECT area_id,area_name FROM '.$sql['pref'].''.$sql['data']['承载版区分类的表名'].' WHERE area_id="'.@implode('" OR area_id="', array_keys($area_postion)).'"', $db);
    if (@mysql_num_rows($result) > 0) {
      while ($row = @mysql_fetch_assoc($result)) {
        foreach ((array)$area_postion[$row['area_id']] as $v) {
          $text .= '<script>$("area_name_'.$v.'").innerHTML="[…/<a href=\"'.eval('return '.$list_url.';').'\" target=\"_blank\">'.addslashes($row['area_name']).'</a>]";</script>';
        }
        unset($row);
      }
    }
    @mysql_free_result($result);

    //已置顶数
    $result = @mysql_query('SELECT COUNT(id) AS total FROM '.$sql['pref'].''.$sql['data']['承载主题文章的表名'].' WHERE author_ip="'.$session[0].'" AND topdate>DATE_ADD(UTC_TIMESTAMP(), INTERVAL '.floatval($web['time_pos']).' HOUR)'.$where_eval.'', $db);
    $row = @mysql_fetch_assoc($result);
    $n_ = abs($row['total']);
    @mysql_free_result($result);
    unset($row);

    //已首页图文展示数
    $result = @mysql_query('SELECT COUNT(id) AS total FROM '.$sql['pref'].''.$sql['data']['承载上传数据的表名'].' WHERE title LIKE "thumb-%" AND username="'.$session[0].'" AND date>DATE_ADD(UTC_TIMESTAMP(), INTERVAL '.floatval($web['time_pos']).' HOUR)'.$where_eval.'', $db);
    $row = @mysql_fetch_assoc($result);
    $n__ = abs($row['total']);
    @mysql_free_result($result);
    unset($row);

    //求和信誉值
    $result = @mysql_query('SELECT SUM(money) AS total FROM '.$sql['pref'].''.$sql['data']['承载财务数据的表名'].' WHERE username="'.$session[0].'" AND type="1"', $db);
    if ($row = @mysql_fetch_assoc($result)) {
      $credit_total = (float)$row['total'];
      unset($row);
    }
    @mysql_free_result($result);

    //求和货币值
    $result = @mysql_query('SELECT SUM(money) AS total FROM '.$sql['pref'].''.$sql['data']['承载财务数据的表名'].' WHERE username="'.$session[0].'" AND type="0"', $db);
    if ($row = @mysql_fetch_assoc($result)) {
      $funds_total = (float)$row['total'];
      unset($row);
    }
    @mysql_free_result($result);

  }


  $sql['sql_version'] = @mysql_get_server_info();
} else {
  $err .= $sql['db_err'];
}

@ require ('inc/function/add_online.php'); //在线

@mysql_close();

function li_eval($row) {
  global $web, $row_area_expires, $d;
  if (!empty($row_area_expires[get_arearoot($row["area_id"])])) {
    $expiresdate = gmdate("Y-m-d H:i:s", $d - $row_area_expires[get_arearoot($row["area_id"])] * 24 * 60 * 60);
    if ($expiresdate > $row["topdate"]) {
      return '<span class="ar ar2">[已过期]</span>'; //-<a href="?post=unity_run&dataname=listdata&limit=refresh&id[]='.$row['id'].'&m=1" onclick="return confirmRefreshMoney(this, \''.$web['refreshdel'].'\');" target="lastFrame">刷新</a>
    }
  }
}
@ require ('inc/function/top_mx.php');
$may_top_num = top_mx($credit_total);
$now_top_num = $may_top_num - $n_;
@ require ('inc/function/ess_index_mx.php');
$may_ess_index_num = ess_index_mx($credit_total);
$now_ess_index_num = $may_ess_index_num - $n__;

?>
<div class="column"><b>提示：</b>若审核未获通过，请您仔细阅读<a href="help.php#write_1" target="_blank">发表帮助</a>。之后及时进行修改，再度提交审核。</div>
<div class="list_title"><?php echo eval('return '.$list_title.';'); ?></div>
<script language="JavaScript" type="text/javascript">
<!--
function getMyFonds(){
  return <?php echo $funds_total; ?>;
}

function confirmNum(){
  var startNum=<?php echo floatval($web['top_expires_member']); ?>;
  var point=<?php echo floatval($web['top_point']); ?>;
  var amountshow=$('amountshow');
  var topdate=   $('topdate');
  var amount=    $('amount');
  var topcount = get_checkbox('id[]');
  if (topcount == 0) {
    amountshow.innerHTML=errOut('请先点选要置顶的文章！', 'top');
	amount.value='';
    topdate.value="";
    return false;
  }
  if (topcount > <?php echo $now_top_num; ?>) {
    amountshow.innerHTML=errOut('你的信誉值所限，只能再置顶<?php echo $now_top_num; ?>条，已置顶<?php echo $n_; ?>/<?php echo $may_top_num; ?>条', 'top');
	amount.value='';
    return false;

  }
  if (!/^([1-9]|[1-9][0-9]+)$/.test(topdate.value)) {
    amountshow.innerHTML=errOut('你输入的值不对，只允许输入大于0的数字！', 'top');
    topdate.value="";
    return false;
  }

  if(topdate.value!=''){
    if(parseFloat(topdate.value)>=parseFloat(startNum)){
      var youNowPoint=getMyFonds();
	  amount.value=parseFloat(topcount)*parseFloat(topdate.value)*parseFloat(point);
      amountshow.innerHTML=errOut('总计需：'+parseFloat(amount.value).toFixed(2)+'货币值', 'top');
      if(amount.value>youNowPoint){
        amountshow.innerHTML=errOut('余额不足！你货币值剩余'+youNowPoint+'！差'+parseFloat(amount.value-youNowPoint).toFixed(2)+'元', 'top');
        topdate.style.backgroundColor='#FF6600';
	    return false;
      }
    }else{
	  amount.value='';
      amountshow.innerHTML=errOut('少于起订天数（'+startNum+'）', 'top');
      topdate.style.backgroundColor='#FF6600';
	  return false;
	}
  }else{
	amount.value='';
    amountshow.innerHTML=errOut('请填好订单！', 'top');
    topdate.style.backgroundColor='#FF6600';
	return false;
  }
  topdate.style.backgroundColor='#FFFFFF';
  return true;

}

function get_ess_img(t){

  var allCheckBox = document.getElementsByName('id[]');
  var topcount = 0;
  if (allCheckBox != null && allCheckBox.length > 0) {
    for (var i = 0; i < allCheckBox.length; i++) {
      if (allCheckBox[i].checked == true && allCheckBox[i].disabled == false) {
        var thisId=allCheckBox[i].title;
        if ($('title_mark['+thisId+']').innerHTML.indexOf('含图')>=0) {
          topcount++;
          //break;
        }else{
          allCheckBox[i].checked = false;
        }
      }
    }
  }
  if (topcount == 0) {
    $('amountshow').innerHTML=errOut('请先点选含图文章！', t);
	$('ess_index_amount').value='';
    $('ess_index_topdate').value="";
  }
  return topcount;
}

function ess_index_confirmNum(){
  var startNum=<?php echo floatval($web['ess_index_expires_member']); ?>;
  var point=<?php echo floatval($web['ess_index_point']); ?>;
  var amountshow=$('amountshow');
  var topdate=   $('ess_index_topdate');
  var amount=    $('ess_index_amount');
  var topcount = get_ess_img('ess_index');
  if (topcount == 0) {
    return false;
  }

  if (topcount > <?php echo $now_ess_index_num; ?>) {
    amountshow.innerHTML=errOut('你的信誉值所限，只能再首页图文展示<?php echo $now_ess_index_num; ?>条，已展示<?php echo $n__; ?>/<?php echo $may_ess_index_num; ?>条', 'ess_index');
	amount.value='';
    return false;

  }
  if (!/^([1-9]|[1-9][0-9]+)$/.test(topdate.value)) {
    amountshow.innerHTML=errOut('你输入的值不对，只允许输入大于0的数字！', 'ess_index');
    topdate.value="";
    return false;
  }

  if(topdate.value!=''){
    if(parseFloat(topdate.value)>=parseFloat(startNum)){
      var youNowPoint=getMyFonds();
	  amount.value=parseFloat(topcount)*parseFloat(topdate.value)*parseFloat(point);
      amountshow.innerHTML=errOut('总计需：'+parseFloat(amount.value).toFixed(2)+'货币值', 'ess_index');
      if(amount.value>youNowPoint){
        amountshow.innerHTML=errOut('余额不足！你货币值剩余'+youNowPoint+'！差'+parseFloat(amount.value-youNowPoint).toFixed(2)+'元', 'ess_index');
        topdate.style.backgroundColor='#FF6600';
	    return false;
      }
    }else{
	  amount.value='';
      amountshow.innerHTML=errOut('少于起订天数（'+startNum+'）', 'ess_index');
      topdate.style.backgroundColor='#FF6600';
	  return false;
	}
  }else{
	amount.value='';
    amountshow.innerHTML=errOut('请填好订单！', 'ess_index');
    topdate.style.backgroundColor='#FF6600';
	return false;
  }
  topdate.style.backgroundColor='#FFFFFF';
  return true;

}

function topSubmit(form, obj, manageType){
  if(confirmNum()==false){
    alert('有错！请检查黄色提示。');
	return false;
  }
  chk(form, obj, manageType);
}

function ess_index_topSubmit(form, obj, manageType){
  if(ess_index_confirmNum()==false){
    alert('有错！请检查黄色提示。');
	return false;
  }
  chk(form, obj, manageType);
}

function errOut(text, type){
  var l=type=='top'?180:(type=='ess_index'?420:250);
  
  var t='';
  for(var i=1; i<=8; i++) {
    t+='<div style="background-color:#FFFF00; height:1px; width:'+(i*2)+'px; overflow:hidden;"></div>';
  }
  return '<div style="margin-left:'+l+'px;text-align:center;height:8px; width:16px; overflow:hidden;">'+t+'</div><div class="red_err">'+text+'</div>';

}


function confirmRefreshMoney(obj, m, chkNum) {
<?php
if (POWER < 4) {
?>
  var youNowPoint=getMyFonds();
  var totalMoney=parseFloat(chkNum*parseFloat(m));
  if (totalMoney>youNowPoint) {
    alert('余额不足！您选择'+chkNum+'条记录，将扣除您'+totalMoney+'货币值。你货币值剩余'+youNowPoint+'！差'+parseFloat(totalMoney-youNowPoint).toFixed(2)+'元');
    return false;
  }
<?php
}
?>
  if (confirm('<?php
if (POWER < 4) {
?>您选择'+chkNum+'条记录，将扣除您'+totalMoney+'货币值\n<?php
}
?>确定'+obj.innerHTML.replace(/<[^>]*>/g,'')+'么？')) {
    return true;
  } else {
    return false;
  }

}

//管理
function chkO(form, obj, manageType, m) {
  var chkNum = get_checkbox('id[]');
  if (chkNum == 0) {
    alert('数据为空或尚未点选！');
    return false;
  }
  if (confirmRefreshMoney(obj, m, chkNum) == true) {
    form.limit.value=manageType;
    addSubmitSafe();
    form.submit();
    return true;
  } else {
    return false;
  }
}

function showColorMenu(type) {
  var colorText = '';
  var colorBarArr = {"Black": "黑色", "Sienna": "赭色", "DarkOliveGreen": "暗橄榄绿色", "DarkGreen": "暗绿色", "DarkSlateBlue": "暗灰蓝色", "Navy": "海军色", "Indigo": "靛青色", "DarkSlateGray": "墨绿色", "DarkRed": "暗红色", "DarkOrange": "暗桔黄色", "Olive": "橄榄色", "Green": "绿色", "Teal": "水鸭色", "Blue": "蓝色", "SlateGray": "灰石色", "DimGray": "暗灰色", "Red": "红色", "SandyBrown": "沙褐色", "YellowGreen": "黄绿色", "SeaGreen": "海绿色", "MediumTurquoise": "间绿宝石", "RoyalBlue": "皇家蓝", "Purple": "紫色", "Gray": "灰色", "Magenta": "红紫色", "Orange": "橙色", "Yellow": "黄色", "Lime": "酸橙色", "Cyan": "青色", "DeepSkyBlue": "深天蓝色", "DarkOrchid": "暗紫色", "Silver": "银色", "Pink": "粉色", "Wheat": "浅黄色", "LemonChiffon": "柠檬绸色", "PaleGreen": "苍绿色", "PaleTurquoise": "苍宝石绿", "LightBlue": "亮蓝色", "Plum": "洋李色", "White": "白色"};
  for (var i in colorBarArr) {
    colorText += '<button type="button" name="" value="'+i+'" style="background:'+i+'; display:inline-block !important; display:inline; zoom:1;" class="color_subject_font_onmouseout" onmouseover="this.className=\'color_subject_font_onmouseover\'" onmouseout="this.className=\'color_subject_font_onmouseout\'" onclick="chColor(this, \''+type+'\')" title="'+colorBarArr[i]+'"></button>';

  }
  return colorText;
}

function chColor(obj, type) {
  var thisV = obj.value;
  var nextV = type == 'color' ? $('subject_backgroundColor_color').value : $('subject_color_color').value;
  if (obj.value != '' && nextV != '') {
    if (obj.value == nextV) {
      alert('题目文字颜色和背景颜色不能相同！');
      return;
    }
  }
  var preO = $('ch_'+type+'');
  if (preO != null) {
    if (preO != obj) {
      preO.id = '';
      preO.className='color_subject_font_onmouseout';
      preO.onmouseout = function() { preO.className='color_subject_font_onmouseout'; }
      obj.id='ch_'+type+'';
      obj.onmouseout = function() { return false; }
      $('subject_'+type+'_color').value = thisV;
      addColor(type, thisV);
    } else {
      return;
    } 
  } else {
    obj.id='ch_'+type+'';
    obj.onmouseout = function() { return false; }
    $('subject_'+type+'_color').value = thisV;
    addColor(type, thisV);
  }
}

function addColor(type, v) {
  var allCheckBox = document.getElementsByName('id[]');
  var allTileHref = document.getElementsByName('li_a[]');
  if (allCheckBox != null && allCheckBox.length > 0) {
    for (var i = 0; i < allCheckBox.length; i++) {
      if (allCheckBox[i].checked == true && allCheckBox[i].disabled == false) {
        eval('allTileHref['+i+'].style.'+type+' = \''+v+'\';');
      }
    }
  }
}

function chkColor() {
  var r = true;
  var allCheckBox = document.getElementsByName('id[]');
  var allTileHref = document.getElementsByName('li_a[]');
  if (allCheckBox != null && allCheckBox.length > 0) {
    for (var i = 0; i < allCheckBox.length; i++) {
      if (allCheckBox[i].checked == true && allCheckBox[i].disabled == false) {
        eval('\
        if (allTileHref['+i+'].style.color == \'White\' && (allTileHref['+i+'].style.backgroundColor == \'White\' || allTileHref['+i+'].style.backgroundColor == \'\')) {\
          alert(\'文字颜色为白时背景颜色不能为白！此类选项已被自动取消\');\
          allCheckBox['+i+'].checked = false;\
          r = false;\
        } else if (allTileHref['+i+'].style.color == allTileHref['+i+'].style.backgroundColor) {\
          alert(\'发现文字颜色与背景颜色相同的选项！该选项已被自动取消\');\
          allCheckBox['+i+'].checked = false;\
          r = false;\
        }\
        ');
      }
    }
  }
  /*
  if ($('subject_backgroundColor_color').value == '') {
    if ($('subject_color_color').value == 'White') {
      alert('请再设一下背景色。因为系统认为：背景颜色没有设置则文字颜色不能为白！');
      return false;
    }
  }
  */
  return r;
}
-->
</script>
<style type="text/css">
<!--
.color_bar_out { width:100%; clear:both; overflow:hidden; zoom:1; }
.color_bar_out * { outline:0; zoom:1; }
.color_bar_out button::-moz-focus-inner { border-color: transparent !important; }
#ch_color, #ch_backgroundColor { height:12px; border:1px inset; }
.color_subject_font_onmouseout { width:11px; height:11px; overflow:hidden; border:1px outset; }
.color_subject_font_onmouseover { width:11px; height:11px; overflow:hidden; border:1px solid; }
#show_back_color_bar { display:none; }
.ar2, .ar2 a { color:#99CCFF; }
-->
</style>
<iframe id="lastFrame" name="lastFrame" frameborder="0" marginheight="0" marginwidth="0" style="display:none"></iframe>
<form method="post" id="manageform" action="?post=unity_run&dataname=listdata">
  <?php
    //if (!empty($text)) {
      echo '
    <div class="manager_menu">
    <table border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="120"><a href="javascript:void(0)" onclick="allChoose(true,true);return false;">全选</a> -
    <a href="javascript:void(0)" onclick="allChoose(true,false);return false;">反选</a> -
    <a href="javascript:void(0)" onclick="allChoose(false,false);return false;">不选</a></td>
          <td><button name="act" type="button" onclick="chk(this.form,this,\'edit\')"><b>编辑</b></button>
            <button name="act" type="button" onclick="chk(this.form,this,\'del'.@$input_delk.'\')"><b>删除</b></button>';
    if ($_GET['act'] != 'check' && $_GET['act'] != 'check_warning') :
      if ($_GET['act'] != 'warehouse') {
        echo '
            <button name="act" type="button" onclick="chk(this.form,this,\'warehouse\')"><b>下架</b></button>
            <button name="act" type="button" onclick="chkO(this.form,this,\'refresh\',\''.$web['refreshdel'].'\')" title="常来刷新让信息排名靠前"><b>置前</b></button>';
        if (POWER <= 3) {
          if ($may_top_num != -1 && $now_top_num <= 0) {
            echo '
            <button name="act" type="button" onclick="chk(this.form,this,\'top\')" disabled><b>置顶</b></button>置顶限量已满！你的信誉值限定你只能置顶'.$may_top_num.'条';
          } else {
            if ($funds_total < floatval($web['top_point']) * floatval($web['top_expires_member'])) {
              echo '
              <button name="act" type="button" onclick="chk(this.form,this,\'top\')" disabled><b>置顶</b></button>货币值不足！<a href="member.php?get=myfunds"><u>购买</u></a>';
            } else {
              echo '
              <button name="act" type="button" onclick="topSubmit(this.form,this,\'top\')"><b>置顶</b></button><input name="topdate" id="topdate" type="text" size="3" onpropertychange="confirmNum()" oninput="confirmNum()" />天（最低起计：'.floatval($web['top_expires_member']).'天）<input type="hidden" name="amount" id="amount" />';
	        }
          }
          if ($may_ess_index_num != -1 && $now_ess_index_num <= 0) {
            echo '
            <button name="act" type="button" onclick="chk(this.form,this,\'ess_index\')" disabled><b>首页图文展示</b></button>首页图文展示限量已满！你的信誉值限定你只能展示'.$may_ess_index_num.'条';
          } else {
            if ($funds_total < floatval($web['ess_index_point']) * floatval($web['ess_index_expires_member'])) {
              echo '
              <button name="act" type="button" onclick="chk(this.form,this,\'ess_index\')" disabled><b>首页图文展示</b></button>货币值不足！<a href="member.php?get=myfunds"><u>购买</u></a>';
            } else {
              echo '
              <button name="act" type="button" onclick="ess_index_topSubmit(this.form,this,\'ess_index\')"><b>首页图文展示</b></button><input name="ess_index_topdate" id="ess_index_topdate" type="text" size="3" onpropertychange="ess_index_confirmNum()" oninput="ess_index_confirmNum()" />天（最低起计：'.floatval($web['ess_index_expires_member']).'天）<input type="hidden" name="ess_index_amount" id="ess_index_amount" />';
	        }
          }
        } else {
          echo '
          <button name="act" type="button" onclick="chk(this.form,this,\'top\')"><b>置顶</b></button>
          <button name="act" type="button" onclick="if(get_ess_img(\'ess_index_admin\')>0){chk(this.form,this,\'ess_index\');}"><b>首页图文展示</b></button><input name="ess_index_topdate" id="ess_index_topdate" type="hidden" /><input type="hidden" name="ess_index_amount" id="ess_index_amount" />';
        }
        echo '<span id="amountshow"></span><table border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="540" style="line-height:normal;">
<div class="color_bar_out">题目文字着色：<script> document.write(showColorMenu(\'color\')); </script></div>
<div class="color_bar_out" id="show_back_color_bar">题目背景着色：<script> document.write(showColorMenu(\'backgroundColor\')); </script></div></td>
<td><button name="act" type="button" onclick="if(chkColor()==true){chkO(this.form,this,\'color\',\''.$web['addcolordel'].'\')}"><b>提交</b></button> <a href="javascript:void(0)" onclick="$(\'show_back_color_bar\').style.display=\'block\';this.style.display=\'none\';return false;"><u>背景着色？</u></a></td>
          </tr>
        </table>';
      } else {
        echo '
        <button name="act" type="button" onclick="chk(this.form,this,\'again\')"><b>上架</b></button>';
      }
    endif;
      echo '</td>
        </tr>
      </table>
    </div>';
    //}
?>
<?php
if (isset($sql['sql_version']) && $sql['sql_version'] < '5.0') {
  echo '<div class="red_err">服务器数据库版本（'.$sql['sql_version'].'）太低！数据可能显示不正常。本程序建设基于MySQL版本5.0以上</div>';
}

echo $text, $err;

?>
  <input type="hidden" name="subject_color_color" id="subject_color_color" />
  <input type="hidden" name="subject_backgroundColor_color" id="subject_backgroundColor_color" />
  <input type="hidden" name="limit" />
</form>
