<?php
(!defined('IN_TOA') || !defined('IN_ADMIN')) && exit('Access Denied!');
set_time_limit(360000000);
get_key("office_info_Increase");
empty($do) && $do = 'list';
if ($do == 'list') {
	$filenumber=random(6,'123456789');
	include_once('template/add.php');

} elseif ($do == 'save') {
	$savetype = getGP('savetype','P');
	$receiveuser = getGP('receiveuser','P');
	$content = getGP('content','P');
	//发送消息表
	$sms_content = array();
	$sms_content['name']='短消息';
	$sms_content['content']=$content;
	$sms_content['url']='';
	$sms_content['type']='7';
	$sendid=sms::sms_add($receiveuser,serialize($sms_content));
	//更新附件
	$db->query("update ".DB_TABLEPRE.DB_JT."fileoffice set number=".$sendid." where number = '".getGP('filenumber','P')."' and officetype=16");
	$title='发布短消息';
	get_logadd($id,$content,$title,4,$_USER->id);
	show_msg('短消息发送成功！', 'admin.php?ac=send&fileurl=sms');

}
?>