<?php

/**
 *      【橙创家校通v4.0】 (C)2010-2012 Tuntron Inc.
 *      
 *    	 http://www.tuntron.com   QQ：1121251729
 *
 *      &系统日志-系统管理模块&
 */
$c=_get('c','logsms');
$M = G_class('user');
$M_sysnote = G_class('sysnote');
 
$Modname = '系统日志 - 系统设置';
 
   //左侧菜单开始 --后面考虑转到模块入口文件
  $left_menu_html = G_class('menu') ->get_left_menu_html($arrgroup['menuid'],$do,$c);

//获取该部门所有下属部门
$bidSub = $M->B->findbid_by_sub($_CO['userbid']);
$sub_bid = !empty($bidSub)?implode(',', $bidSub) . ',' . $_CO['userbid']:$_CO['userbid'];

//每页显示数据量
$listnum = '20';
//当前页
$pid=$_GET['p'];
if(is_numeric($pid)&&$pid>0){
	$pid=(int)$pid;
}else{
	$pid='1';
}
//链接地址
$url = SITEURL . '?mod=system&do=log&c=' . $c;

switch($c){
	
	 case "logsms":
	 $Modname = '短信发送记录 - '.$Modname;
	 $sysnote=G_class('sendsms')->read_all(explode(',',$sub_bid));//短信发送
	 $no_temp = 1;
	 require_once Template('log_sms');
		
	break;
	
	case 'logoper':
		$type = '1,2,3,4,8';
		
		$sum = $M_sysnote->get_sum($sub_bid, $type);
		$pageinfo = grtpageno($url, $sum, $listnum, $pid);
		$logArr = $M_sysnote->get_sysnote($sub_bid, $type, $pid, $listnum);
		
		$no_temp = 1;
		require_once Template('log_oper');
		break;
		
	case 'loglogin':
		$type = '5';
		
		$sum = $M_sysnote->get_sum($sub_bid, $type);
		$pageinfo = grtpageno($url, $sum, $listnum, $pid);
		$logArr = $M_sysnote->get_sysnote($sub_bid, $type, $pid, $listnum);
		
		$no_temp = 1;
		require_once Template('log_login');
		break;
	
	case 'logdown':
		$type = '6';
		
		$sum = $M_sysnote->get_sum($sub_bid, $type);
		$pageinfo = grtpageno($url, $sum, $listnum, $pid);
		$logArr = $M_sysnote->get_sysnote($sub_bid, $type, $pid, $listnum);
		
		$no_temp = 1;
		require_once Template('log_down');
		break;
		
	case 'logbatch':
		$type = '7';
		
		$sum = $M_sysnote->get_sum($sub_bid, $type);
		$pageinfo = grtpageno($url, $sum, $listnum, $pid);
		$logArr = $M_sysnote->get_sysnote($sub_bid, $type, $pid, $listnum);
		
		$no_temp = 1;
		require_once Template('log_batch');
		break;
}

if($no_temp<0) require_once Template($do);

?>