add.php 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  5. <meta charset="utf-8"/>
  6. <title>校本课程平台</title>
  7. <meta name="description" content=""/>
  8. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
  9. <!-- bootstrap & fontawesome -->
  10. <link rel="stylesheet" href="/css/bootstrap.min.css"/>
  11. <link rel="stylesheet" href="/css/font-awesome/4.2.0/css/font-awesome.min.css"/>
  12. <!-- page specific plugin styles -->
  13. <!-- text fonts -->
  14. <link rel="stylesheet" href="/css/fonts/fonts.googleapis.com.css"/>
  15. <!-- ace styles -->
  16. <link rel="stylesheet" href="/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style"/>
  17. <!--[if lte IE 9]>
  18. <link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
  19. <![endif]-->
  20. <link rel="stylesheet" href="/css/style.css"/>
  21. <!--[if lte IE 9]>
  22. <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
  23. <![endif]-->
  24. <!-- inline styles related to this page -->
  25. <!-- ace settings handler -->
  26. <script src="/js/ace-extra.min.js"></script>
  27. <script src="/js/jquery-2.2.2.min.js"></script>
  28. <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
  29. <script src="/js/layer/layer.js"></script>
  30. <!--[if lte IE 8]>
  31. <script src="assets/js/html5shiv.min.js"></script>
  32. <script src="assets/js/respond.min.js"></script>
  33. <![endif]-->
  34. <script type="text/javascript">
  35. var ratehtml = '';
  36. jQuery(document).ready(function () {
  37. ratehtml = $("#hidrate").html();
  38. var htmls = "";
  39. for (var i = 0; i < 3; i++) {
  40. htmls += $("#hidrate").html();
  41. }
  42. $("#rate").append(htmls);
  43. jQuery(window.parent.document).find("#iframe").ready(function () {
  44. jQuery(window.parent.document).find(".menuLi, .menuTop").click(function () {
  45. var url = jQuery(this).attr("url");
  46. window.parent.location.href = "xxx" + url;
  47. });
  48. window.parent.document.url = window.location.href;
  49. var main = jQuery(window.parent.document).find("#iframe");
  50. var thisheight = jQuery("body").height() + 30;
  51. main.height(thisheight);
  52. });
  53. jQuery(window.parent.document).find("#iframe").load(function () {
  54. var main = jQuery(window.parent.document).find("#iframe");
  55. var thisheight = jQuery("body").height() + 30;
  56. main.height(thisheight);
  57. });
  58. });
  59. jQuery(document).ready(function () {
  60. $('.step-two.steps-choose').click(function () {
  61. $('.step-one.steps-choose.show').removeClass('show');
  62. $('.step-four.steps-choose.show').removeClass('show');
  63. $('.step-three.steps-choose.show').removeClass('show');
  64. $('.step-six.steps-choose.show').removeClass('show');
  65. $(this).addClass('show');
  66. });
  67. $('.step-three.steps-choose').click(function () {
  68. $('.step-two.steps-choose.show').removeClass('show');
  69. $('.step-one.steps-choose.show').removeClass('show');
  70. $('.step-four.steps-choose.show').removeClass('show');
  71. $('.step-six.steps-choose.show').removeClass('show');
  72. $(this).addClass('show');
  73. });
  74. $('.step-four.steps-choose').click(function () {
  75. $('.step-two.steps-choose.show').removeClass('show');
  76. $('.step-one.steps-choose.show').removeClass('show');
  77. $('.step-three.steps-choose.show').removeClass('show');
  78. $('.step-six.steps-choose.show').removeClass('show');
  79. $(this).addClass('show');
  80. });
  81. $('.step-one.steps-choose').click(function () {
  82. $('.step-two.steps-choose.show').removeClass('show');
  83. $('.step-three.steps-choose.show').removeClass('show');
  84. $('.step-four.steps-choose.show').removeClass('show');
  85. $('.step-six.steps-choose.show').removeClass('show');
  86. $(this).addClass('show');
  87. });
  88. $('.step-six.steps-choose').click(function () {
  89. $('.step-two.steps-choose.show').removeClass('show');
  90. $('.step-three.steps-choose.show').removeClass('show');
  91. $('.step-one.steps-choose.show').removeClass('show');
  92. $('.step-four.steps-choose.show').removeClass('show');
  93. $(this).addClass('show');
  94. });
  95. });
  96. function addrate() {
  97. $('#rate').append(ratehtml)
  98. }
  99. function check() {
  100. $("#profileyear").val($("#year").html())
  101. return true;
  102. }
  103. function checknum(str, obj) {
  104. obj.value = obj.value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
  105. obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字而不是.
  106. obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的.
  107. obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
  108. }
  109. </script>
  110. <style type="text/css">
  111. .errorMessage {
  112. color: red;
  113. margin-left: 10px;
  114. }
  115. .breadcrumb > li {
  116. padding: 3px 5px;
  117. color: #fff;
  118. background: #6fb3e0;
  119. }
  120. .breadcrumb > li > a {
  121. color: #fff !important;
  122. }
  123. .li_backgrond_color {
  124. background-color: #00CC99 !important;
  125. }
  126. .li_backgrond_color > a {
  127. color: #fff !important;
  128. }
  129. .breadcrumb > li + li:before {
  130. display: none;
  131. }
  132. .steps-choose table th {
  133. text-align: right;
  134. width: 200px;
  135. }
  136. </style>
  137. </head>
  138. <body class="no-skin">
  139. <ul class="clearfix main-content-inner-ul">
  140. <?php if (Yii::app()->session['coachInfo']['leader'] == 1) { ?>
  141. <li class="pull-left">
  142. <button onclick='location.href="<?php echo $this->createUrl("semester/index"); ?>"'
  143. class="button button_normal button_group button_arrow" data-button="red">学期管理
  144. </button>
  145. <img src="/images/line.jpg" style="height:45px;"/>
  146. </li>
  147. <?php } ?>
  148. <li class="pull-left">
  149. <button onclick='location.href="<?php echo $this->createUrl("teacher/index"); ?>"'
  150. class="button button_normal button_group button_arrow" data-button="red">教师管理
  151. </button>
  152. <img src="/images/line.jpg" style="height:45px;"/>
  153. </li>
  154. <li class="pull-left">
  155. <button onclick='location.href="<?php echo $this->createUrl("classes/index"); ?>"'
  156. class="button button_normal button_group button_arrow" data-button="red">班级管理
  157. </button>
  158. <img src="/images/line.jpg" style="height:45px;"/>
  159. </li>
  160. <li class="pull-left">
  161. <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index"); ?>"'
  162. class="button button_normal button_group button_arrow" data-button="red">学生管理
  163. </button>
  164. <img src="/images/line.jpg" style="height:45px;"/>
  165. </li>
  166. <?php if (Yii::app()->session['coachInfo']['leader'] == 1) { ?>
  167. <li class="pull-left">
  168. <button onclick='location.href="<?php echo $this->createUrl("school/add"); ?>"'
  169. class="button button_normal button_group button_arrow button_active" data-button="red">学校管理
  170. </button>
  171. <img src="/images/line.jpg" style="height:45px;"/>
  172. </li>
  173. <?php } ?>
  174. <li class="pull-left">
  175. <button onclick='location.href="<?php echo $this->createUrl("classes/export"); ?>"'
  176. class="button button_normal button_group button_arrow " data-button="red">导出学生
  177. </button>
  178. <img src="/images/line.jpg" style="height:45px;"/>
  179. </li>
  180. </ul>
  181. <div class="shade"></div>
  182. <div class="main-container" id="main-container">
  183. <div class="main-content">
  184. <?php if ($schoocontact === null) { ?>
  185. <input type='hidden' name='actionsc' value='add'>
  186. <?php } else { ?>
  187. <input type='hidden' name='actionsc' value='edit'>
  188. <?php } ?>
  189. <?php if ($schoolentrancerate === null) { ?>
  190. <input type='hidden' name='actionse' value='add'>
  191. <?php } else { ?>
  192. <input type='hidden' name='actionse' value='edit'>
  193. <?php } ?>
  194. <?php if ($schoolprofile === null) { ?>
  195. <input type='hidden' name='actionsp' value='add'>
  196. <?php } else { ?>
  197. <input type='hidden' name='actionsp' value='edit'>
  198. <?php } ?>
  199. <div class="step-one steps-choose show">
  200. <h3 style="padding-left: 20px">基本信息</h3>
  201. <table class="table-hide" style="margin-top: 15px">
  202. <tbody>
  203. <tr style="line-height:40px">
  204. <th>学校名称:</th>
  205. <td><span><?php echo $schoolinfo['school_name'] ?></span></td>
  206. </tr>
  207. <tr style="line-height:40px">
  208. <th>学校地址:</th>
  209. <td>
  210. <span><?php echo $area[0]['region_name'] ?></span>-<span><?php echo $area[1]['region_name'] ?></span>-<span><?php echo $area[2]['region_name'] ?></span>-<span><?php echo $schoolinfo['address'] ?></span>
  211. </td>
  212. </tr>
  213. <tr style="line-height:40px">
  214. <th>邮编:</th>
  215. <td><span><?php echo $schoolinfo['postcode'] ?></span></td>
  216. </tr>
  217. <tr style="line-height:40px">
  218. <th>联系电话:</th>
  219. <td><span><?php echo $schoolinfo['phone'] ?></span></td>
  220. </tr>
  221. <tr style="line-height:40px">
  222. <th>类型:</th>
  223. <td><span><?php echo $schoolinfo['client'] == 1 ? "非客户学校" : "客户学校"; ?></span></td>
  224. </tr>
  225. <tr style="line-height:40px">
  226. <th>简介:</th>
  227. <td><span><?php echo $schoolinfo['intro'] ?></span></td>
  228. </tr>
  229. </tbody>
  230. </table>
  231. </div>
  232. <?php if (!isset(Yii::app()->session["crmUserInfo"])) {
  233. if ($grade) { ?>
  234. <div class="step-three steps-choose">
  235. <h3 style="padding-left: 20px">设置学校准考证号&nbsp;<i class="fa fa-plus"
  236. style="font-style: normal;color:#15ae68 "></i></h3>
  237. <form action="<?php echo Yii::app()->createUrl('school/grade_insert') ?>" method="post" id="orderAdd"
  238. onsubmit="return gradecheck();">
  239. <ul class="table-hide">
  240. <?php foreach ($grade as $v) { ?>
  241. <li class="row marginNo table-hide-li pt20" style="width: 760px">
  242. <div class="textRight fl " style="width:160px;line-height: 80px;height: 80px"><span
  243. class="mt15"><?php if ($v->id == 1) {
  244. echo "高一";
  245. } elseif ($v->id == 2) {
  246. echo '高二';
  247. } else {
  248. echo '高三';
  249. } ?>:</span>&nbsp;
  250. </div>
  251. <div class="col-xs-9 paddingNo fl ">
  252. <div class="col-xs-9 fl lineHeight40">
  253. 准考证号位数:&nbsp;&nbsp;<input class="students-search" type="text" placeholder=""
  254. name="card_length<?php echo $v->id ?>"
  255. value='<?php echo $v->card_length ?>'
  256. style="width:50px;">&nbsp;位
  257. </div>
  258. <div class="col-xs-8 fl lineHeight40 text-left">
  259. <span style="float: left">是否开启准考证号:</span>&nbsp;&nbsp;<div
  260. class="col-sm-4 mt6 ">
  261. <span class="inline blue">
  262. <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
  263. value="1" <?php echo $v->card_status == 1 ? "checked" : '' ?>>
  264. <span> 是</span>
  265. </span>
  266. &nbsp;&nbsp;
  267. <span class="inline blue">
  268. <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
  269. value="0" <?php echo $v->card_status == 0 ? "checked" : '' ?>>
  270. <span> 否</span>
  271. </span>
  272. </div>
  273. </div>
  274. </div>
  275. </li>
  276. <?php } ?>
  277. </ul>
  278. <div class="create-orders table-hide" style="line-height: 24px;color: red">
  279. 1、修改学校准考证号位数时,同时修改学生的学校准考证号的位数,两者位数必须一致,否则无法使用。&nbsp;<br>2、如:学校准考证号设置为5位,学生的学校准考证号为“12345”<br>3、准考证号位数最好在14位内
  280. </div>
  281. <div class="create-orders table-hide">
  282. <input type="submit" name="grade_submit" id="grade_submit" class="btn btn-success btn-sm"
  283. value="保存" style="width:100px">
  284. </div>
  285. </div><?php }
  286. } ?>
  287. </form>
  288. </div>
  289. <div class="step-two steps-choose">
  290. <h3 style="padding-left: 20px">联系人</h3>
  291. <form action="<?php echo Yii::app()->createUrl('school/contact_insert') ?>" method="post" id="orderAdd"
  292. onsubmit="return check_contact();">
  293. <table class="table-hide" style="margin-top: 15px;">
  294. <tbody>
  295. <tr style="line-height:40px">
  296. <th>校长:&nbsp;</th>
  297. <td>
  298. <input class="students-search" type="text" placeholder="" name="president"
  299. value='<?php echo $schoocontact['head'] ?>' style="width:240px">
  300. </td>
  301. </tr>
  302. <tr style="line-height:40px">
  303. <th>校长联系电话:&nbsp;</th>
  304. <td>
  305. <input class="students-search" type="text" placeholder="" name="president_tel"
  306. value='<?php echo $schoocontact['head_tel'] ?>' style="width:240px">
  307. </td>
  308. </tr>
  309. <tr style="line-height:40px">
  310. <th>关键联系人:&nbsp;</th>
  311. <td>
  312. <input class="students-search" type="text" placeholder="" name="core_name"
  313. value='<?php echo $schoocontact['core'] ?>' style="width:240px">
  314. </td>
  315. </tr>
  316. <tr style="line-height:40px">
  317. <th>关键联系人电话:&nbsp;</th>
  318. <td>
  319. <input class="students-search" type="text" placeholder="" name="core_tel"
  320. value='<?php echo $schoocontact['core_tel'] ?>' style="width:240px">
  321. </td>
  322. </tr>
  323. <tr style="line-height:40px">
  324. <th>关键联系人岗位:&nbsp;</th>
  325. <td>
  326. <input class="students-search" type="text" placeholder="" name="core_title"
  327. value='<?php echo $schoocontact['core_title'] ?>' style="width:240px">
  328. </td>
  329. </tr>
  330. </tbody>
  331. </table>
  332. <div class="create-orders table-hide">
  333. <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm" value="保存"
  334. style="width:100px">
  335. </div>
  336. </form>
  337. </div>
  338. <div class="step-four steps-choose">
  339. <h3 style="padding-left: 20px">学校概况</h3>
  340. <form action="<?php echo Yii::app()->createUrl('school/profile_insert') ?>" method="post" id="orderAdd">
  341. <ul class="table-hide">
  342. <li class="row marginNo table-hide-li pt20 ">
  343. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">建校年份:</span>&nbsp;
  344. </div>
  345. <div class="fl col-xs-9 paddingNo">
  346. <div class='diy_select' style="width:238px;float: left;">
  347. <input type='hidden' class='diy_select_input' id="profileyear" name="profile[year]"
  348. value="<?php echo $schoolprofile['year'] ?>"/>
  349. <div class='diy_select_txt' style="width:205px;"
  350. id="year"><?php if ($schoolprofile['year']) {
  351. echo $schoolprofile['year'];
  352. } else {
  353. echo '选择年份';
  354. } ?></div>
  355. <div class='diy_select_btn'></div>
  356. <ul class='diy_select_list'>
  357. <?php for ($i = 1900; $i < (int)date("Y"); $i++) { ?>
  358. <li val="<?php echo $i; ?>" class=""><?php echo $i; ?></li>
  359. <?php } ?>
  360. </ul>
  361. </div>
  362. </li>
  363. <li class="row marginNo table-hide-li pt20">
  364. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">所属行政部门:</span>&nbsp;
  365. </div>
  366. <div class="col-xs-9 paddingNo fl">
  367. <input class="students-search" type="text" placeholder="" name="profile[dept]"
  368. value="<?php echo $schoolprofile['dept'] ?>" style="width:240px">
  369. </div>
  370. </li>
  371. <li class="row marginNo table-hide-li pt20">
  372. <div class="textRight lineHeight30 fl" style="width:160px"><span class="">学校性质:</span>&nbsp;</div>
  373. <div class="col-xs-9 paddingNo fl">
  374. <div class="col-sm-12 paddingNo mt6">
  375. <span class="inline blue mr15">
  376. <input class="ace"
  377. type="radio" <?php if ($schoolprofile['nature'] == "1" || $schoolprofile['nature'] == "") {
  378. echo ' checked="checked"';
  379. } ?> checked="checked"
  380. name="profile[nature]" value="1">
  381. <span class="lbl middle">高中</span>
  382. </span>
  383. <span class="inline blue mr15">
  384. <input class="ace"
  385. type="radio" <?php if ($schoolprofile['nature'] == "2" || $schoolprofile['nature'] == "") {
  386. echo ' checked="checked"';
  387. } ?> name="profile[nature]" value="2">
  388. <span class="lbl middle">初中</span>
  389. </span>
  390. <span class="inline blue">
  391. <input class="ace"
  392. type="radio" <?php if ($schoolprofile['nature'] == "3" || $schoolprofile['nature'] == "") {
  393. echo ' checked="checked"';
  394. } ?> name="profile[nature]" value="3">
  395. <span class="lbl middle">完中</span>
  396. </span>
  397. </div>
  398. </div>
  399. </li>
  400. <li class="row marginNo table-hide-li pt20">
  401. <div class="textRight lineHeight30 fl" style="width:160px"><span class="">是否设少数民族:</span>&nbsp;
  402. </div>
  403. <div class="col-xs-9 paddingNo fl">
  404. <div class="col-sm-12 paddingNo mt6">
  405. <span class="inline blue mr15">
  406. <input class="ace"
  407. type="radio" <?php if ($schoolprofile['is_minority'] == "1") {
  408. echo ' checked="checked"';
  409. } ?> value="1"
  410. name="profile[is_minority]">
  411. <span class="lbl middle">是</span>
  412. </span>
  413. <span class="inline blue mr15">
  414. <input class="ace" type="radio" <?php if (!$schoolprofile['is_minority']) {
  415. echo ' checked="checked"';
  416. } ?> value="0" name="profile[is_minority]">
  417. <span class="lbl middle">否</span>
  418. </span>
  419. </div>
  420. </div>
  421. </li>
  422. <li class="row marginNo table-hide-li pt20">
  423. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">寄宿制形式:</span>&nbsp;
  424. </div>
  425. <div class="col-xs-9 paddingNo fl">
  426. <div class='diy_select' style="width:238px;float: left;">
  427. <input type='hidden' class='diy_select_input' id="type_id" name="profile[is_staying]"
  428. value="<?php echo $schoolprofile['is_staying'] ?>"/>
  429. <div class='diy_select_txt'
  430. style="width:205px;"><?php echo $schoolprofile['is_staying'] == 1 ? "寄宿制" : "非寄宿制" ?></div>
  431. <div class='diy_select_btn'></div>
  432. <ul class='diy_select_list'>
  433. <li val="0">非寄宿制</li>
  434. <li val="1">寄宿制</li>
  435. </ul>
  436. </div>
  437. </li>
  438. <li class="row marginNo table-hide-li pt20">
  439. <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">高考升学率:</span>&nbsp;
  440. </div>
  441. <div class="col-xs-9 paddingNo fl">
  442. <div class="mt6"><a href="javascript:void(0);" onclick="addrate()">+添加</a></div>
  443. <div class="clearfix mt15 independentPd" id="rate">
  444. <?php
  445. if (!empty($schoolentrancerate)) {
  446. foreach ($schoolentrancerate as $k => $v) { ?>
  447. <div class="customK">
  448. <span class="inline blue mr15">
  449. <select class="customSelect" name="rateyear[]">
  450. <option>年份</option>
  451. <?php for ($i = (int)date("Y"); $i >= 1900; $i--) { ?>
  452. <option value="<?php echo $i; ?>" <?php if ($i == $v['year']) {
  453. echo " selected='true'";
  454. } ?>><?php echo $i; ?></option>
  455. <?php } ?>
  456. </select>
  457. </span>
  458. <span class="inline blue mr15">
  459. <input class="customInput"
  460. name="ratenum[]" type="input"
  461. value="<?php echo $v['rate'] ?>"
  462. onkeyup="checknum(this.value,this)"> %
  463. <input name="rateid[]" type="hidden"
  464. value="<?php echo $v['id'] ?>">
  465. </span>
  466. <a href="javascript:;">删除</a>
  467. </div>
  468. <?php }
  469. } ?>
  470. </div>
  471. </div>
  472. </li>
  473. </ul>
  474. <div id="hidrate" style="display:none">
  475. <div class="customK">
  476. <span class="inline blue mr15">
  477. <select class="customSelect" name="rateyear[]">
  478. <option>年份</option>
  479. <?php for ($i = (int)date("Y"); $i >= 1900; $i--) { ?>
  480. <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
  481. <?php } ?>
  482. </select>
  483. </span>
  484. <span class="inline blue mr15">
  485. <input class="customInput"
  486. name="ratenum[]" type="input"
  487. value=""
  488. onkeyup="checknum(this.value,this)"> %
  489. <input name="rateid[]" type="hidden"
  490. value="">
  491. </span>
  492. <a href="javascript:;">删除</a>
  493. </div>
  494. </div>
  495. <div class="create-orders table-hide">
  496. <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm" value="保存"
  497. style="width:100px">
  498. </div>
  499. </form>
  500. </div>
  501. <div class="step-six steps-choose">
  502. <h3 style="padding-left: 20px">安全与隐私</h3>
  503. <table class="table-hide" style="margin-top: 15px;margin-left: 15px;">
  504. <tbody>
  505. <tr style="line-height: 40px;">
  506. <th style="width: 280px;">校内试卷是否公开于“本省推荐试卷”:</th>
  507. <td>
  508. <select class="customSelect" style="width: 100px;" id="is_private" name="is_private">
  509. <option value="0" <?php if (!$is_private) echo 'selected'?> >公开</option>
  510. <option value="1" <?php if ($is_private) echo 'selected'?>>不公开</option>
  511. </select>
  512. </td>
  513. </tr>
  514. </tbody>
  515. </table>
  516. <div class="table-hide" style="margin-top: 20px;padding-left: 4.5%;">
  517. <input type="button" name="submit_private" onclick="saveSchoolPrivate()" class="btn btn-success btn-sm" value="保存"
  518. style="width:100px;">
  519. </div>
  520. </div>
  521. </div>
  522. <div class="ttd dn">
  523. <div class="s-state clearfix posirela">
  524. <div class="hint_size clearfix">
  525. <span class="fl ml15">错误信息</span>
  526. </div>
  527. <div class="mistake_character">
  528. <p class="ml15" id="err_msg"></p>
  529. <div class="clearfix" style="width:180px;margin:0px auto;text-align:center">
  530. <p class="mt20">
  531. <button class="roger shut">确定</button>
  532. </p>
  533. </div>
  534. </div>
  535. </div>
  536. </div>
  537. </div><!-- /.main-content -->
  538. </div><!-- /.main-container -->
  539. <!-- basic scripts -->
  540. <!--[if !IE]> -->
  541. <!--<script src="/js/jquery.2.1.1.min.js"></script>-->
  542. <!-- <![endif]-->
  543. <!--[if IE]>
  544. <script src="assets/js/jquery.1.11.1.min.js"></script>
  545. <![endif]-->
  546. <!--[if !IE]> -->
  547. <script type="text/javascript">
  548. window.jQuery || document.write("<script src='/js/jquery.min.js'>" + "<" + "/script>");
  549. </script>
  550. <!-- <![endif]-->
  551. <!--[if IE]>
  552. <script type="text/javascript">
  553. window.jQuery || document.write("<script src='assets/js/jquery1x.min.js'>" + "<" + "/script>");
  554. </script>
  555. <![endif]-->
  556. <script type="text/javascript">
  557. if ('ontouchstart' in document.documentElement) document.write("<script src='/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
  558. </script>
  559. <script src="/js/bootstrap.min.js"></script>
  560. <!-- page specific plugin scripts -->
  561. <!-- ace scripts -->
  562. <script src="/js/ace-elements.min.js"></script>
  563. <script src="/js/ace.min.js"></script>
  564. <!-- 学校管理 js -->
  565. <script src="/js/school.management.js"></script>
  566. <script src="/js/xsgl.js"></script>
  567. <!-- inline scripts related to this page -->
  568. <script>
  569. function check() {
  570. var card_length = parseInt($("input[name=card_length]").val());
  571. var regMobile = /[0-9]$/;
  572. if (!regMobile.test(card_length)) {
  573. layer.msg('非法数据!');
  574. return false;
  575. }
  576. if (4 > card_length || card_length > 14) {
  577. layer.msg('不在范围!只能取4--14位');
  578. return false;
  579. }
  580. if (4 <= card_length && card_length <= 14) {
  581. return true;
  582. } else {
  583. layer.msg('非法数据!');
  584. return false;
  585. }
  586. }
  587. function saveSchoolPrivate() {
  588. var is_private = $('#is_private').val();
  589. $.ajax({
  590. type: 'post',
  591. data: {'is_private': is_private},
  592. url: "<?php echo Yii::app()->createUrl('school/saveSchoolPrivate') ;?>",
  593. dataType: 'json',
  594. success: function (res) {
  595. if (res.status){
  596. layer.alert("保存成功", {icon:1})
  597. } else{
  598. layer.msg("保存失败");
  599. }
  600. },
  601. error: function () {
  602. layer.msg("保存异常");
  603. }
  604. })
  605. }
  606. function gradecheck() {
  607. var card_length1 = parseInt($("input[name=card_length1]").val());
  608. var card_length2 = parseInt($("input[name=card_length2]").val());
  609. var card_length3 = parseInt($("input[name=card_length3]").val());
  610. var card_status1 = parseInt($("input[name=card_status1]:checked").val());
  611. var card_status2 = parseInt($("input[name=card_status2]:checked").val());
  612. var card_status3 = parseInt($("input[name=card_status3]:checked").val());
  613. if (!card_check(card_length1, '高一', card_status1)) {
  614. return false;
  615. }
  616. if (!card_check(card_length2, '高二', card_status2)) {
  617. return false;
  618. }
  619. if (!card_check(card_length3, '高三', card_status3)) {
  620. return false;
  621. }
  622. return true;
  623. }
  624. function check_contact() {
  625. var president_tel = $("input[name=president_tel]").val();
  626. var regMobile = /[0-9]$/;
  627. if (!regMobile.test(president_tel)) {
  628. layer.msg('手机号只能为数字!');
  629. return false;
  630. }
  631. var core_tel = $("input[name=core_tel]").val();
  632. if (!regMobile.test(core_tel)) {
  633. layer.msg('手机号只能为数字!');
  634. return false;
  635. }
  636. return true;
  637. }
  638. function card_check(card_length, msg, status) {
  639. if (status == 1) {
  640. var regMobile = /[0-9]$/;
  641. if (!regMobile.test(card_length)) {
  642. layer.msg(msg + ': ' + '非法数据!');
  643. return false;
  644. }
  645. if (4 > card_length || card_length > 14) {
  646. layer.msg(msg + ': ' + '不在范围!只能取4--14位');
  647. return false;
  648. }
  649. if (4 <= card_length && card_length <= 14) {
  650. return true;
  651. } else {
  652. layer.msg(msg + ': ' + '非法数据!');
  653. return false;
  654. }
  655. } else {
  656. return true;
  657. }
  658. }
  659. $("body").delegate(".customK a", "click", function () {
  660. if ($(this).closest(".independentPd").find(".customK").length > 1) {
  661. $(this).closest(".customK").remove();
  662. } else {
  663. layer.msg('最后一条不允许删除!');
  664. }
  665. })
  666. </script>
  667. </body>
  668. </html>