⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 announce.inc.php

📁 Phpcms2008 是一款基于 PHP+Mysql 架构的网站内容管理系统
💻 PHP
字号:
<?php
defined('IN_PHPCMS') or exit('Access Denied');
include MOD_ROOT.'include/announce.class.php';
$a = new announce;
$page = $page ? $page : 1;
$pagesize = $M['pagesize'] ? $M['pagesize'] : 20;
$action = $action ? $action : 'manage';
switch($action)
{	
	case 'manage':
		$condition = " where 1 and  passed=1 and (todate > '".date('Y-m-d')."' or todate='0000-00-00')";
		$annou = $a->listinfo($page,$pagesize,$condition);
		include admin_tpl('announce_manage');
	break;

	case 'delete':
		if(empty($aid))
		{
			showmessage($LANG['illegal_parameters'],$forward);
		}
		$result = $a->delete($aid);
		if($result)
		{
			showmessage($LANG['operation_success'],$forward);
		}
		else 
		{
			showmessage($LANG['operation_failure'],$forward);
		}
	break;

	case 'approval':
		if(isset($submit))
		{
			if(empty($aid))
			{
				showmessage($LANG['illegal_parameters'],$forward);
			}

			$result = $a->approval($aid,$passed);	
				
			if($result)
			{
				showmessage($LANG['operation_success'],'?mod=announce&file=announce&action=manage');
			}
			else
			{
				showmessage($LANG['operation_failure'],$forward);
			}
		}
		else
		{
			$condition = " where 1 and  passed=0 ";
			$annou = $a->listinfo($page,$pagesize,$condition);
			include admin_tpl('announce_approval');
		}
	break;

	case 'expired':
		$condition = " where 1 and todate <= '".date('Y-m-d')."' and todate != '0000-00-00' ";
		$annou = $a->listinfo($page,$pagesize,$condition);
		include admin_tpl('announce_expired');
	break;

	case 'add':
		if(isset($submit))
		{
			if(empty($announce['title']))
			{
				showmessage('鍏

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -