<?php

/**
 *      【橙创家校通v4.0】 (C)2010-2012 Tuntron Inc.
 *      
 *    	 http://www.tuntron.com   QQ：1121251729
 *
 *      &系统日志-学校管理模块&
 */
 $c=_get('c','logsms');
 $M_sysnote=G_class('sysnote');
 $Modname = '系统日志 - 学校管理';
 $M = G_class('user');
 $bidSub = $M->B->findbid_by_sub($_CO['userbid']);
 $sub_bid = !empty($bidSub)?implode(',', $bidSub) . ',' . $_CO['userbid']:$_CO['userbid'];
 //左侧菜单开始 --后面考虑转到模块入口文件
  $left_menu_html = G_class('menu') ->get_left_menu_html($arrgroup['menuid'],$do,$c);
check_access('school_log');
//每页显示数据量
$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":
		$Modname = '操作日志 - '.$Modname;
		$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_opre');
		
	break;
 
 	case 'loglogin':
		$Modname = '登录记录 - '.$Modname;
		$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':
		$Modname = '上传下载记录 - '.$Modname;
		$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':
		$Modname = '批量任务记录 - '.$Modname;
		$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);


?>