function validate_form($form_name) { js_include_once_tag('jquery-1.3.2.min'); js_include_once_tag('jquery.validate'); ?> <script> $(function(){ $("#<?php echo $form_name; ?> ").validate(); }); </script> <?php }
function js_include_once_tag($js) { global $loaded_js; if (empty($loaded_js)) { $loaded_js = array(); } if (func_num_args() > 1) { foreach (func_get_args() as $v) { js_include_once_tag($v); } return; } $js_name = _get_js_file($js); if (in_array($js_name, $loaded_js, false)) { return; } else { $loaded_js[] = $js_name; js_include_tag($js); } }
alert('找不到专题!请联系管理员!'); exit; } $subject = $subject[0]; #$moduels = ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv=Content-Type content="text/html; charset=utf-8"> <meta http-equiv=Content-Language content=zh-CN> <title>SMG -党建新闻列表</title> <?php css_include_tag('subject_templete/templet1'); use_jquery(); js_include_once_tag('dj'); ?> </head> <body> <div id=bodys> <div id=logo></div> <div id=title><div class="cl"><a target="_blank" href="djnews.php">首页</a></div><div class="cl"><a target="_blank" href="djlist.php?id=<?php echo $ldjh[0]->cid; ?> ">领导讲话</a></div><div class="cl"><a target="_blank" href="djlist.php?id=<?php echo $xxzl[0]->cid; ?> ">学习资料</a></div><div class="cl"><a target="_blank" href="djlist.php?id=<?php $bzap[0]->cid; ?> ">步骤安排</a></div><div class="cl"><a target="_blank" href="djlist.php?id=<?php