예제 #1
0
	if (total_count % 15) > 0:
		total_page += 1
	html_paging = """
	<p>
		<b>페이지 [%s/%s]</b> : <b style='color:red;'>%s</b> 개중 <b style='color:red;'>%s</b> 개 표시
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
		<a href='/moon/crawl/domain_list.py?%s#tableDiv'>&lt;&lt;이전</a> || <a href='/moon/crawl/domain_list.py?%s#tableDiv'>다음&gt;&gt;</a>
	</p>
	"""%( param_dic["page"], total_page, total_count, len(data_list), prev_page_get_params, next_page_get_params)

	return html_table+"</table>", html_paging


if __name__ == "__main__":
	check_params = ["domain_id", "domain_like", "name_like", "crawl_count_history_notlike", "status", "orderby", "ordering", "sc_type", "cmd", "page"]
	param_dic = html.getParamDic(form, check_params)
	param_dic["_service_type"] = "crawl"
	param_dic["_data_type"] = "domain"

	sc_type = ""
	dao_util = None
	if param_dic["sc_type"]:
		sc_type = param_dic["sc_type"]
		dao_util = DBUtil()

	if form.has_key("cmd"):
		cmd = form.getvalue("cmd")
		if cmd == "updateSeedURLCount":
			updateSeedURLCount(param_dic)

	html_search_form = getFormHtml(param_dic, dao_util)
예제 #2
0
파일: index.py 프로젝트: Shiwoo-Park/glance
import sys
import cgi
import cgitb

# MOON Framework
sys.path.insert(0,"/home/moon/web")
import html
#import dao

cgitb.enable()
form = cgi.FieldStorage()

if __name__ == "__main__":
	
	# 넘어온 PARAM을 Dic으로 받음
	param_dic = html.getParamDic(form, [])

	# 실제 컨텐츠 작성
	sc_list = ["news", "bbs", "know", "oi", "video", "blog"]
	sc_title_list = ["", "뉴스", "BBS", "지식", "오픈인터넷", "비디오", "블로그"]
	title_row = html.getTableTR(sc_title_list, "title")

	content_rows = ""

	content_row = "<td>데이터 관리</td>"
	for sc in sc_list:
		content_row += """<td><a href="/moon/crawl/data_add.py?sc_type=%s">추가/수정</a></td>"""%sc
	content_rows += "<tr>%s</tr>"%content_row

	content_row = "<td>도메인 목록</td>"
	for sc in sc_list: