<?php
/**
 * article admin.php
 *
 * @version $Id: admin.php,v 1.1.1.1 2004/09/30 05:38:26 peter Exp $
 * @copyright 2002 Mentor Tech International
 **/
 if(ini_get("safe_mode")==false) set_time_limit(0);
include "config.inc.php";
include "class/article.class.php";
include "include/template_func.php";
include "menu/main_menu.php";
include "class/member.class.php";
include "include/menu.cache.php";
include "class/conf.class.php";
if($_GET["thisid"]){
	setcookie("thisid",$_GET["thisid"]);
	$thisid = $_GET["thisid"];
}else{
	$thisid=$_COOKIE["thisid"];
}
$art=new Article();
$conf = new Conf();
$member=new member();
$user_info = $member->member_auth();
$module = $_REQUEST["module"];
$action=$_REQUEST["action"];
$member->userLog($user_info);
$mods = getLicenseMods();
$check = $member->checkAdminRight();
?>
<HTML><HEAD><TITLE>::Cmsez Control Panel::</TITLE>
<META http-equiv=Content-Type content="text/html; charset=<?=_CHAR?>"><LINK 
href="images/style.css" type=text/css rel=stylesheet>
<META content="MSHTML 6.00.2800.1458" name=GENERATOR>
</HEAD>
<BODY leftMargin=0 topMargin=0>
<DIV id=overDiv style="Z-INDEX: 1; POSITION: absolute"></DIV>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD width=666 height=52 rowspan="2" bgColor=#485b7e valign=middle ><img src=images/cmsez_logo.gif border=0></TD>
    <TD width=120 height=26 vAlign=bottom bgColor=#485b7e>&nbsp;</TD>
  </TR>
  <TR>
    <TD vAlign=bottom bgColor=#485b7e height=26 align=right><A 
      href="http://www.cmsez.com/" target=_blank><FONT 
      color=#ffffff><?=_LANG_0881?></FONT></A>&nbsp;<A 
      href="index.php" target=_blank><FONT 
      color=#ffffff><?=_LANG_0882?></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
  </TR>
  </TBODY></TABLE>
<TABLE height=20 cellSpacing=0 cellPadding=0 width="100%" border=0 style="background-color: #666666;
	border-top-width: 2px;
	border-top-style: solid;
	border-top-color: #c0c0c0;">
  <TBODY>
  <TR vAlign=center>
    <TD width=20>&nbsp;</td><td>
    <?if($check){?>
    <img src=images/icon-settings.gif  border=0 align=absmiddle>&nbsp;&nbsp;<a href="admin.php"><font color=#ffffff><?=_LANG_0883?></font></a>&nbsp;&nbsp;
	<?
	if($member->checkAdmin2()){	
	?><a href="admin.php?action=listConf"><font color=#ffffff><?=_LANG_0884?></font></a>&nbsp;&nbsp;<a href="admin.php?action=listCategory&thisid=none"><font color=#ffffff><?=_LANG_0885?></font></a>&nbsp;&nbsp;<a href="admin.php?module=member"><font color=#ffffff><?=_LANG_0886?></font></a>&nbsp;&nbsp;<a href="admin.php?module=fetch"><font color=#ffffff><?=_LANG_0887?></font></a>
	&nbsp;&nbsp;<a href="admin.php?action=siteInfo"><font color=#ffffff><?=_LANG_0888?></font></a>
					  <?
	}	
	?>
	&nbsp;&nbsp;<a href="logout.php"><font color=#ffffff><?=_LANG_0889?></font></a>
	<?}else{?>
	<img src=images/icon-settings.gif  border=0 align=absmiddle>&nbsp;&nbsp;<a href="index.php"><font color=#ffffff><?=_LANG_0882?></font></a>&nbsp;&nbsp;<font color=#ffffff>|</font>&nbsp;&nbsp;<a href="admin.php"><font color=#ffffff><?=_LANG_0890?></font></a>
	<?}?>
			<?
	if($member->checkAdmin2()){	
	?></td>
    <td align=right><a href="admin.php?action=selectCate"><font color=#e8e8e8><?=_LANG_0891?></font></a> 
                  | <a href="admin.php?action=addCategory"><font color=#e8e8e8><?=_LANG_0892?></font></a> | <a href="admin.php?action=addTopic"><font color=#e8e8e8><?=_LANG_0893?></font></a> | <a href="admin.php?module=poll"><font color=#e8e8e8><?=_LANG_0894?></font></a> 
                  | <a href="admin.php?module=ad"><font color=#e8e8e8><?=_LANG_0895?></font></a>&nbsp;&nbsp;
				  					  <?
	}	
	?></TD>
  </TR>
  </TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD vAlign=top align=right width=180 bgColor=#eeeeee><br>
      <TABLE cellSpacing=2 cellPadding=1 width="96%" border=0>
        <TBODY>
<?
if($member->checkAdmin2()){
$newTree = $art->getArticleCategoryNoImage(0,1);
echo "<tr><form action=\"\" name=jump method=get ><input name=action type=hidden  value=''><td>&nbsp;<font color=#000000><b>"._LANG_1348."</b></font><br>";
echo "<select style=\"FONT-SIZE: 9pt; FONT-FAMILY: Arial;width:90%\" name=cid>";
foreach($newTree as $treeid=>$treename){
	//$treename=(strlen($treename)>20)?msubstr($treename,0,18)."..":$treename;
	$selected=($cid==$treeid)?"selected":"";
	echo "<option value=$treeid $selected>$treename</option>";
}
echo "</select><a href=selcate.php?form=jump&field=cid target=_Sel><img src=images/check.gif border=0></a>
<br><input name=action value='listArticle' type=radio checked class=bts>"._LANG_1383."  <input name=action value='editCategory' type=radio class=bts>"._LANG_1384."&nbsp;&nbsp;<input type=submit name='submit'  value='   OK   ' class=bts>";
echo "</td></form></tr>";
echo "<tr><td><hr size=1 color=#d6d6d6></td></tr>";
switch($module){
	case "member":
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=member>"._LANG_0896."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=member&action=addMember>"._LANG_0897."</a></td></tr>";
 	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=member&action=listGroup>"._LANG_0898."</a></td></tr>";
	break;
	case "poll":
	case "ad":
	case "link":
	case "cart":
	case "fetch":
	case "template":
	case "blocks":
	case "stats":
	case "backup":
	case "payment":
	case "shipping":
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=poll>"._LANG_0899."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=ad>"._LANG_0900."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=link>"._LANG_0901."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=cart>"._LANG_0902."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=payment>"._LANG_1363."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=shipping>"._LANG_1390."</a></td></tr>";
    echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=fetch>"._LANG_0903."</a></td></tr>";
    echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=template>"._LANG_0904."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=blocks>"._LANG_0905."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=stats>"._LANG_0906."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?module=backup>"._LANG_0907."</a></td></tr>";
	break;
	default:
	if($action=="addConf" || $action=="listConf"){
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=listConf>"._LANG_0908."</a></td></tr>";
	}else{
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=addCategory>"._LANG_0909."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=listCategory>"._LANG_0910."</a></td>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=selectCate>"._LANG_0911."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=listTopic>"._LANG_0912."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=keywordCateList>"._LANG_0913."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=listFeed>"._LANG_0914."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=listComments>"._LANG_1499."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=refreshCache>"._LANG_1500."</a></td></tr>";
	echo "<tr height=25><td onMouseOver=\"this.style.backgroundColor='#DEDEDE'; this.style.cursor='hand';\" onMouseOut=\"this.style.backgroundColor='#eeeeee';\"><img src=\"images/icon-undo.gif\" align=absmiddle>&nbsp;<a href=admin.php?action=clearDataForm>"._LANG_1412."</a></td></tr>";
	}
}
				}
?>
        </TBODY></TABLE></TD>
    <TD width=1 bgColor=#999999></TD>
    <TD vAlign=top align=middle bgcolor=#ffffff>
    <?
    if($check){
    	?>
      <TABLE cellSpacing=2 cellPadding=1 width="96%" border=0 >
        <TBODY>
        <TR>
          <TD>&nbsp;<img src="images/go_blue.gif" width="11" height="11" align="absmiddle">&nbsp; <?=_LANG_0915?><?=adminNav($_REQUEST);?></TD>
        </TR>
        <TR>
          <TD><div align="right"><B>
          <?
				$ctime=date("Y-m-d H:i:s");
				echo show_button(array(_LANG_0916,_LANG_0917,_LANG_0918,_LANG_0919,_LANG_0920),array("admin.php?action=filterArticle&cid=$cid&isactive=no&x=9&y=11","admin.php?module=member&action=filterMember&status=Uactive&etime_e=$ctime","admin.php?action=listCategory","admin.php?action=addCategory","admin.php?action=outPut"));
				?>
          </B></div></TD>
        </TR>
        <TR>
          <TD>
            <HR noShade SIZE=1>
          </TD></TR>
        <TR>
          <TD align=left> </TD></TR>
        <TR>
          <TD height=23 ><?
          		$mod_path="modules/$module/admin.php";
				if(!file_exists($mod_path)) $mod_path="modules/article/admin.php";
				include $mod_path;
          ?></TD>
        </TR></TBODY></TABLE>
        <?
				}else{
				 ?><br><br><br>
				 <form action="<?=PLUS_URL?>/login.php" method="post">
  <table border="0" cellpadding="0" cellspacing="0" height="90" width="100%">
    <tbody>
      <tr>
        <td width="33%">&nbsp;</td>
        <td width="67%" height="5"><div align="left"></div></td>
      </tr>
      <tr>
        <td rowspan="2" align="center" valign="middle"><div align="right"><img src="images/login-welcome.gif" height=60 > &nbsp;</div></td>
        <td align="center" height="20" valign="middle"><div align="left"><font color="#100063"><?=_LANG_0921?></font> <font color="#333333">
            <input name="UserName" maxlength="16" id="username" class="txtinput" style="width: 190px;" type="text">
        </font></div></td>
      </tr>
      <tr>
        <td align="center" height="20" valign="middle"><div align="left"><font color="#100063"><?=_LANG_0922?></font><font color="#6c3a07">
            <input name="PassWord" maxlength="16" id="password" class="txtinput" style="width: 190px;" type="password">
        </font></div></td>
      </tr>
      <tr>
        <td align="center" valign="middle">&nbsp;</td>
        <td align="center" height="45" valign="middle">
          <div align="left">
            <input type='submit' name="post" value="<?=_LANG_0923?>">&nbsp;&nbsp;<INPUT onclick="document.location.href = 'index.php?module=member&action=getPass';" type=button value="<?=_LANG_0924?>" name="<?=_LANG_0924?>" class="bts">&nbsp;&nbsp;<INPUT onclick="document.location.href = 'index.php?module=member&action=register';" type=button value="<?=_LANG_0925?>" name="<?=_LANG_0925?>" class="bts">
            </div></td>
      </tr>
    </tbody>
  </table>
</form>
<br><br><br>
				 <?
				}
					?>
        </TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
  <TBODY>
  <TR>
    <TD bgColor=#999999 height=1></TD></TR></TBODY></TABLE>
<CENTER>
<TABLE height=32 cellSpacing=1 cellPadding=2 width=400 align=center border=0>
  <TBODY>
  <TR>
    <TD align=middle width=477 height=50>Copyright (c) 2002-2004 Be 
      Technology Co.,Ltd.<BR>
      www.cmsez.com All Rights Reserved &nbsp; Version:<?=_VERSION?>
</TD>
  </TR></TBODY></TABLE><BR><BR></CENTER></BODY></HTML>
