Esempio n. 1
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		conf = models.getConfig()
		sys_overview = models.getSysOverView()
		status_overview = models.getStatusOverView()
		
		return render.index(conf,sys_overview,status_overview)
Esempio n. 2
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		conf = models.getConfig()
		sys_overview = models.getSysOverView()
		status_overview = models.getStatusOverView()
		
		return render.index(conf,sys_overview,status_overview)
Esempio n. 3
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		else:
			input = web.input(project=None,idc=None,hc=None,page=None)
			if not input.project.isdigit() or not input.hc.isdigit():
				return base.code("<script language='javascript'>alert('参数错误 !');window.history.back(-1);</script>")
			project = int(input.project)
			 	
			# Paging
			sysconf = models.getConfig()
			pagesize = sysconf['page']  # page_per_rows
			hostcount = int(input.hc)
			pages = int(hostcount / pagesize)	# page_count

			if (hostcount % pagesize):
				pages += 1				#page_count

			if input.page:
				if not input.project.isdigit():
					return base.code("<script language='javascript'>alert('参数错误 !');window.history.back(-1);</script>")
				page = int(input.page)
			else:
				page = 1

			offset = pagesize * (page - 1)  # offset
			pagerows = models.getPageByProject(project, offset, pagesize)

			newhosts=[]
			for h in pagerows:
				h['project'] = base.getProject(h['project'])
				h['city'] = base.getCity(h['city'])
				h['idc'] = base.getIDC(h['idc'])
				h['statusid'] = h['status']
				h['status'] = base.getStatus(h['status'])
				newhosts.append(h)

			#page Nav
			if hostcount <= pagesize:
				page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
			elif page == 1:
				page_nav = u"<a href='/projectlisthost?project=%d&hc=%d&page=%d'>下一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (project,hostcount,page+1,project,hostcount,pages,page,pages,hostcount)
			elif page == pages:
				page_nav = u"<a href='/projectlisthost?project=%d&hc=%d&page=%d'>上一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (project,hostcount,page-1,project,hostcount,page,pages,hostcount)
			else:
				page_nav = u"<a href='/projectlisthost?project=%d&hc=%d&page=%d'>下一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=%d'>上一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=1'>首页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (project,hostcount,page+1,project,hostcount,page-1,project,hostcount,project,hostcount,pages,page,pages,hostcount)
				
			if web.ctx.session.privilege == 0:
				return render.project_host_list(newhosts,pages,page,page_nav)
			else:
				return render.project_host_list_admin(newhosts,pages,page,page_nav)
Esempio n. 4
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		else:
			input = web.input(project=None,idc=None,hc=None,page=None)
			if not input.project.isdigit() or not input.hc.isdigit():
				return base.code("<script language='javascript'>alert('参数错误 !');window.history.back(-1);</script>")
			project = int(input.project)
			 	
			# Paging
			sysconf = models.getConfig()
			pagesize = sysconf['page']  # page_per_rows
			hostcount = int(input.hc)
			pages = int(hostcount / pagesize)	# page_count

			if (hostcount % pagesize):
				pages += 1				#page_count

			if input.page:
				if not input.project.isdigit():
					return base.code("<script language='javascript'>alert('参数错误 !');window.history.back(-1);</script>")
				page = int(input.page)
			else:
				page = 1

			offset = pagesize * (page - 1)  # offset
			pagerows = models.getPageByProject(project, offset, pagesize)

			newhosts=[]
			for h in pagerows:
				h['project'] = base.getProject(h['project'])
				h['city'] = base.getCity(h['city'])
				h['idc'] = base.getIDC(h['idc'])
				h['status'] = base.getStatus(h['status'])
				newhosts.append(h)

			#page Nav
			if hostcount <= pagesize:
				page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
			elif page == 1:
				page_nav = u"<a href='/projectlisthost?project=%d&hc=%d&page=%d'>下一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (project,hostcount,page+1,project,hostcount,pages,page,pages,hostcount)
			elif page == pages:
				page_nav = u"<a href='/projectlisthost?project=%d&hc=%d&page=%d'>上一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (project,hostcount,page-1,project,hostcount,page,pages,hostcount)
			else:
				page_nav = u"<a href='/projectlisthost?project=%d&hc=%d&page=%d'>下一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=%d'>上一页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=1'>首页</a> | <a href='/projectlisthost?project=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (project,hostcount,page+1,project,hostcount,page-1,project,hostcount,project,hostcount,pages,page,pages,hostcount)
				
			if web.ctx.session.privilege == 0:
				return render.project_host_list(newhosts,pages,page,page_nav)
			else:
				return render.project_host_list_admin(newhosts,pages,page,page_nav)
Esempio n. 5
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		else:
			# Paging
			sysconf = models.getConfig()
			pagesize = sysconf['page']  # page_per_rows
			hostcount = models.allHosts()  # host_count
			para = web.input(page=None,action=None)	
			pages = int(hostcount / pagesize)	# page_count

			if (hostcount % pagesize):
				pages += 1				#page_count

			if para.page:
				if not para.page.isdigit():
					return base.code("<script language='javascript'>alert('参数错误');window.history.back(-1);</script>")
				page = int(para.page)
			else:
				page = 1

			offset = pagesize * (page - 1)  # offset
			
			if para.action:
				pagerows = models.getPageByLastModify(offset, pagesize)
			else:
				pagerows = models.getPage(offset, pagesize)

			newhosts=[]
			for h in pagerows:
				h['project'] = base.getProject(h['project'])
				h['city'] = base.getCity(h['city'])
				h['idc'] = base.getIDC(h['idc'])
				h['statusid'] = h['status']
				h['status'] = base.getStatus(h['status'])
				newhosts.append(h)
			#page Nav
			if hostcount <= pagesize:
				page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
			elif page == 1:
				page_nav = u"<a href='/main?page=%d'>下一页</a> | <a href='/main?page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (page+1,pages,page,pages,hostcount)
			elif page == pages:
				page_nav = u"<a href='/main?page=%d'>上一页</a> | <a href='/main?page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (page-1, page, pages,hostcount)
			else:
				page_nav = u"<a href='/main?page=%d'>下一页</a> | <a href='/main?page=%d'>上一页</a> | <a href='/main?page=1'>首页</a> | <a href='/main?page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (page+1,page-1,pages,page,pages,hostcount)
				
			if web.ctx.session.privilege == 0:
				return render.main(newhosts,pages,page,page_nav)
			else:
				return render.main_admin(newhosts,pages,page,page_nav)
Esempio n. 6
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		else:
			# Paging
			sysconf = models.getConfig()
			pagesize = sysconf['page']  # page_per_rows
			hostcount = models.allHosts()  # host_count
			para = web.input(page=None,action=None)	
			pages = int(hostcount / pagesize)	# page_count

			if (hostcount % pagesize):
				pages += 1				#page_count

			if para.page:
				if not para.page.isdigit():
					return base.code("<script language='javascript'>alert('参数错误');window.history.back(-1);</script>")
				page = int(para.page)
			else:
				page = 1

			offset = pagesize * (page - 1)  # offset
			
			if para.action:
				pagerows = models.getPageByLastModify(offset, pagesize)
			else:
				pagerows = models.getPage(offset, pagesize)

			newhosts=[]
			for h in pagerows:
				h['project'] = base.getProject(h['project'])
				h['city'] = base.getCity(h['city'])
				h['idc'] = base.getIDC(h['idc'])
				h['status'] = base.getStatus(h['status'])
				newhosts.append(h)

			#page Nav
			if hostcount <= pagesize:
				page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
			elif page == 1:
				page_nav = u"<a href='/main?page=%d'>下一页</a> | <a href='/main?page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (page+1,pages,page,pages,hostcount)
			elif page == pages:
				page_nav = u"<a href='/main?page=%d'>上一页</a> | <a href='/main?page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (page-1, page, pages,hostcount)
			else:
				page_nav = u"<a href='/main?page=%d'>下一页</a> | <a href='/main?page=%d'>上一页</a> | <a href='/main?page=1'>首页</a> | <a href='/main?page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (page+1,page-1,pages,page,pages,hostcount)
				
			if web.ctx.session.privilege == 0:
				return render.main(newhosts,pages,page,page_nav)
			else:
				return render.main_admin(newhosts,pages,page,page_nav)
Esempio n. 7
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		else:
			input = web.input(cid=None,iid=None,hc=None,page=None)
			cid = int(input.cid)
			iid = int(input.iid)
			 	
			# Paging
			sysconf = models.getConfig()
			pagesize = sysconf['page']  # page_per_rows
			hostcount = int(input.hc)
			pages = int(hostcount / pagesize)	# page_count

			if (hostcount % pagesize):
				pages += 1				#page_count

			if input.page:
				page = int(input.page)
			else:
				page = 1

			offset = pagesize * (page - 1)  # offset
			pagerows = models.getPageByIDC(iid,offset,pagesize)

			newhosts=[]
			for h in pagerows:
				h['project'] = base.getProject(h['project'])
				h['city'] = base.getCity(h['city'])
				h['idc'] = base.getIDC(h['idc'])
				h['statusid'] = h['status']
				h['status'] = base.getStatus(h['status'])
				newhosts.append(h)

			#page Nav
			if hostcount <= pagesize:
				page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
			elif page == 1:
				page_nav = u"<a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>下一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (cid,iid,hostcount,page+1,cid,iid,hostcount,pages,page,pages,hostcount)
			elif page == pages:
				page_nav = u"<a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>上一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (cid,iid,hostcount,page-1,cid,iid,hostcount,page,pages,hostcount)
			else:
				page_nav = u"<a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>下一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>上一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=1'>首页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (cid,iid,hostcount,page+1,cid,iid,hostcount,page-1,cid,iid,hostcount,cid,iid,hostcount,pages,page,pages,hostcount)
				
			if web.ctx.session.privilege == 0:
				return render.city_idc_host_list(newhosts,pages,page,page_nav)
			else:
				return render.city_idc_host_list_admin(newhosts,pages,page,page_nav)
Esempio n. 8
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		else:
			input = web.input(cid=None,iid=None,hc=None,page=None)
			cid = int(input.cid)
			iid = int(input.iid)
			 	
			# Paging
			sysconf = models.getConfig()
			pagesize = sysconf['page']  # page_per_rows
			hostcount = int(input.hc)
			pages = int(hostcount / pagesize)	# page_count

			if (hostcount % pagesize):
				pages += 1				#page_count

			if input.page:
				page = int(input.page)
			else:
				page = 1

			offset = pagesize * (page - 1)  # offset
			pagerows = models.getPageByIDC(iid,offset,pagesize)

			newhosts=[]
			for h in pagerows:
				h['project'] = base.getProject(h['project'])
				h['city'] = base.getCity(h['city'])
				h['idc'] = base.getIDC(h['idc'])
				h['status'] = base.getStatus(h['status'])
				newhosts.append(h)

			#page Nav
			if hostcount <= pagesize:
				page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
			elif page == 1:
				page_nav = u"<a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>下一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (cid,iid,hostcount,page+1,cid,iid,hostcount,pages,page,pages,hostcount)
			elif page == pages:
				page_nav = u"<a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>上一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (cid,iid,hostcount,page-1,cid,iid,hostcount,page,pages,hostcount)
			else:
				page_nav = u"<a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>下一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>上一页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=1'>首页</a> | <a href='/cihl?cid=%d&iid=%d&hc=%d&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (cid,iid,hostcount,page+1,cid,iid,hostcount,page-1,cid,iid,hostcount,cid,iid,hostcount,pages,page,pages,hostcount)
				
			if web.ctx.session.privilege == 0:
				return render.city_idc_host_list(newhosts,pages,page,page_nav)
			else:
				return render.city_idc_host_list_admin(newhosts,pages,page,page_nav)
Esempio n. 9
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		
		input = web.input(page=None)	
		# Paging
		sysconf = models.getConfig()
		pagesize = sysconf['page']  # page_per_rows
		input.word = input.word.replace("'","\\'")
		
		if input.ops == '1':
			hostcount = models.getHostCountBySearch('hostname',input.word)
		elif input.ops == '2':
			hostcount = models.getHostCountBySearchIp(input.word)
		elif input.ops == '5':
			hostcount = models.getHostCountBySearch('port',input.word)
		elif input.ops == '6':
			hostcount = models.getHostCountBySearch('status',input.word)
		elif input.ops == '7':
			hostcount = models.getHostCountBySearch('bandwidth',input.word)
		elif input.ops == '8':
			hostcount = models.getHostCountBySearch('uses',input.word)
		elif input.ops == '9':
			hostcount = models.getHostCountBySearch('os',input.word)
		elif input.ops == '10':
			hostcount = models.getHostCountBySearch('company',input.word)
		elif input.ops == '11':
			hostcount = models.getHostCountBySearch('hardwareinfo',input.word)
		elif input.ops == '12':
			hostcount = models.getHostCountBySearch('other',input.word)
		elif input.ops == '13':
			hostcount = models.getHostCountBySearch('modifyman',input.word)
		
		pages = int(hostcount / pagesize)	# page_count

		if (hostcount % pagesize):
			pages += 1				#page_count

		if input.page:
			page = int(input.page)
		else:
			page = 1

		offset = pagesize * (page - 1)  # offset

		if input.ops == '1':
			pagerows = models.getPageBySearch('hostname',input.word,str(offset),str(pagesize))
		elif input.ops == '2':
			pagerows = models.getPageBySearchIp(input.word,str(offset),str(pagesize))
		elif input.ops == '5':
			pagerows = models.getPageBySearch('port',input.word,str(offset),str(pagesize))
		elif input.ops == '6':
			pagerows = models.getPageBySearch('status',input.word,str(offset),str(pagesize))
		elif input.ops == '7':
			pagerows = models.getPageBySearch('bandwidth',input.word,str(offset),str(pagesize))
		elif input.ops == '8':
			pagerows = models.getPageBySearch('uses',input.word,str(offset),str(pagesize))
		elif input.ops == '9':
			pagerows = models.getPageBySearch('os',input.word,str(offset),str(pagesize))
		elif input.ops == '10':
			pagerows = models.getPageBySearch('company',input.word,str(offset),str(pagesize))
		elif input.ops == '11':
			pagerows = models.getPageBySearch('hardwareinfo',input.word,str(offset),str(pagesize))
		elif input.ops == '12':
			pagerows = models.getPageBySearch('other',input.word,str(offset),str(pagesize))
		elif input.ops == '13':
			pagerows = models.getPageBySearch('modifyman',input.word,str(offset),str(pagesize))

		newhosts=[]
		for h in pagerows:
			h['project'] = base.getProject(h['project'])
			h['city'] = base.getCity(h['city'])
			h['idc'] = base.getIDC(h['idc'])
			h['status'] = base.getStatus(h['status'])
			newhosts.append(h)
		
		ops = int(input.ops)

		#page Nav
		if hostcount <= pagesize:
			page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
		elif page == 1:
			page_nav = u"<a href='/search?ops=%d&word=%s&page=%d'>下一页</a> | <a href='/search?ops=%d&word=%s&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (ops,input.word,page+1,ops,input.word,pages,page,pages,hostcount)
		elif page == pages:
			page_nav = u"<a href='/search?ops=%d&word=%s&page=%d'>上一页</a> | <a href='/search?ops=%d&word=%s&page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (ops,input.word,page-1,ops,input.word,page,pages,hostcount)
		else:
			page_nav = u"<a href='/search?ops=%d&word=%s&page=%d'>下一页</a> | <a href='/search?ops=%d&word=%s&page=%d'>上一页</a> | <a href='/search?ops=%d&word=%s&page=1'>首页</a> | <a href='/search?ops=%d&word=%s&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (ops,input.word,page+1,ops,input.word,page-1,ops,input.word,ops,input.word,pages,page,pages,hostcount)

		if web.ctx.session.privilege == 0:
			return render.main(newhosts,pages,page,page_nav)
		else:
			return render.main_admin(newhosts,pages,page,page_nav)
	
		if input.ops == '1':
			result = models.searchHostName(input.content)
			return result
Esempio n. 10
0
	def GET(self):
		if not base.logged():
			raise web.seeother('/')
		
		input = web.input(page=None)	
		# Paging
		sysconf = models.getConfig()
		pagesize = sysconf['page']  # page_per_rows
		input.word = input.word.replace("'","\\'")
		
		if input.ops == '1':
			hostcount = models.getHostCountBySearch('hostname',input.word)
		elif input.ops == '2':
			hostcount = models.getHostCountBySearchIp(input.word)
		elif input.ops == '5':
			hostcount = models.getHostCountBySearch('port',input.word)
		elif input.ops == '6':
			hostcount = models.getHostCountBySearch('status',input.word)
		elif input.ops == '7':
			hostcount = models.getHostCountBySearch('bandwidth',input.word)
		elif input.ops == '8':
			hostcount = models.getHostCountBySearch('uses',input.word)
		elif input.ops == '9':
			hostcount = models.getHostCountBySearch('os',input.word)
		elif input.ops == '10':
			hostcount = models.getHostCountBySearch('company',input.word)
		elif input.ops == '11':
			hostcount = models.getHostCountBySearch('hardwareinfo',input.word)
		elif input.ops == '12':
			hostcount = models.getHostCountBySearch('other',input.word)
		elif input.ops == '13':
			hostcount = models.getHostCountBySearch('modifyman',input.word)
		
		pages = int(hostcount / pagesize)	# page_count

		if (hostcount % pagesize):
			pages += 1				#page_count

		if input.page:
			page = int(input.page)
		else:
			page = 1

		offset = pagesize * (page - 1)  # offset

		if input.ops == '1':
			pagerows = models.getPageBySearch('hostname',input.word,str(offset),str(pagesize))
		elif input.ops == '2':
			pagerows = models.getPageBySearchIp(input.word,str(offset),str(pagesize))
		elif input.ops == '5':
			pagerows = models.getPageBySearch('port',input.word,str(offset),str(pagesize))
		elif input.ops == '6':
			pagerows = models.getPageBySearch('status',input.word,str(offset),str(pagesize))
		elif input.ops == '7':
			pagerows = models.getPageBySearch('bandwidth',input.word,str(offset),str(pagesize))
		elif input.ops == '8':
			pagerows = models.getPageBySearch('uses',input.word,str(offset),str(pagesize))
		elif input.ops == '9':
			pagerows = models.getPageBySearch('os',input.word,str(offset),str(pagesize))
		elif input.ops == '10':
			pagerows = models.getPageBySearch('company',input.word,str(offset),str(pagesize))
		elif input.ops == '11':
			pagerows = models.getPageBySearch('hardwareinfo',input.word,str(offset),str(pagesize))
		elif input.ops == '12':
			pagerows = models.getPageBySearch('other',input.word,str(offset),str(pagesize))
		elif input.ops == '13':
			pagerows = models.getPageBySearch('modifyman',input.word,str(offset),str(pagesize))

		newhosts=[]
		for h in pagerows:
			h['project'] = base.getProject(h['project'])
			h['city'] = base.getCity(h['city'])
			h['idc'] = base.getIDC(h['idc'])
			h['statusid'] = h['status']
			h['status'] = base.getStatus(h['status'])
			newhosts.append(h)
		
		ops = int(input.ops)

		#page Nav
		if hostcount <= pagesize:
			page_nav = u"共 <b>%s</b> 条记录" % (hostcount)
		elif page == 1:
			page_nav = u"<a href='/search?ops=%d&word=%s&page=%d'>下一页</a> | <a href='/search?ops=%d&word=%s&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (ops,input.word,page+1,ops,input.word,pages,page,pages,hostcount)
		elif page == pages:
			page_nav = u"<a href='/search?ops=%d&word=%s&page=%d'>上一页</a> | <a href='/search?ops=%d&word=%s&page=1'>首页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (ops,input.word,page-1,ops,input.word,page,pages,hostcount)
		else:
			page_nav = u"<a href='/search?ops=%d&word=%s&page=%d'>下一页</a> | <a href='/search?ops=%d&word=%s&page=%d'>上一页</a> | <a href='/search?ops=%d&word=%s&page=1'>首页</a> | <a href='/search?ops=%d&word=%s&page=%d'>尾页</a> | (%d / %d) , 共 <b>%d</b> 条记录" % (ops,input.word,page+1,ops,input.word,page-1,ops,input.word,ops,input.word,pages,page,pages,hostcount)

		if web.ctx.session.privilege == 0:
			return render.main(newhosts,pages,page,page_nav)
		else:
			return render.main_admin(newhosts,pages,page,page_nav)
	
		if input.ops == '1':
			result = models.searchHostName(input.content)
			return result