<?php
defined('ROOT_PHPLEFT') or exit('phpleft: Not page');
/*
	phpleftDms Copyright (c) 2011 phpleft.COM
	商业授权：QQ45150208
	
*/
switch($post) {
	case 'list':
	if ($tab=='') {
	msg('请先选择删除的','phpleft.php?file=plugins_set&in='.$table_name,0,1,1,'n');  
    }else{
	foreach($tab as $id=>$t) { 
	$db->query("DELETE FROM ".$PL_CFG['tb_pre'].$table_name." WHERE id='".$t."'");
}
    msg('删除成功', 'phpleft.php?file=plugins_set&in='.$table_name);
	}
	break;
	case 'set':
	$file = 'cache.inc.php';
	$path = PL_ROOT.'plugins/'.$table_name.'/';
    cache_write($file, $set, $path);
	msg('设置成功', 'phpleft.php?file=plugins_set&in='.$table_name.'&show=set');
	break;
	case 'is_or':
if ($tab=='') {
	msg('请先选择!','phpleft.php?file=plugins_set&in='.$table_name,0,1,1,'n');  
    }else{
	foreach($tab as $id=>$t) { 
	$db->query("update ".$PL_CFG['tb_pre'].$table_name." set is_or='$is_or' WHERE id='".$t."'");
}
    msg('设置成功', 'phpleft.php?file=plugins_set&in='.$table_name);
	}
	break;
}
?>