123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
- <meta charset="utf-8"/>
- <title>校本课程平台</title>
- <meta name="description" content=""/>
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0"/>
- <!-- bootstrap & fontawesome -->
- <link rel="stylesheet" href="/css/bootstrap.min.css"/>
- <link rel="stylesheet" href="/css/font-awesome/4.2.0/css/font-awesome.min.css"/>
- <!-- page specific plugin styles -->
- <!-- text fonts -->
- <link rel="stylesheet" href="/css/fonts/fonts.googleapis.com.css"/>
- <!-- ace styles -->
- <link rel="stylesheet" href="/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style"/>
- <!--[if lte IE 9]>
- <link rel="stylesheet" href="assets/css/ace-part2.min.css" class="ace-main-stylesheet"/>
- <![endif]-->
- <link rel="stylesheet" href="/css/style.css"/>
- <!--[if lte IE 9]>
- <link rel="stylesheet" href="assets/css/ace-ie.min.css"/>
- <![endif]-->
- <!-- inline styles related to this page -->
- <!-- ace settings handler -->
- <script src="/js/ace-extra.min.js"></script>
- <script src="/js/jquery-2.2.2.min.js"></script>
- <!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->
- <script src="/js/layer/layer.js"></script>
- <!--[if lte IE 8]>
- <script src="assets/js/html5shiv.min.js"></script>
- <script src="assets/js/respond.min.js"></script>
- <![endif]-->
- <script type="text/javascript">
- var ratehtml = '';
- jQuery(document).ready(function () {
- ratehtml = $("#hidrate").html();
- var htmls = "";
- for (var i = 0; i < 3; i++) {
- htmls += $("#hidrate").html();
- }
- $("#rate").append(htmls);
- jQuery(window.parent.document).find("#iframe").ready(function () {
- jQuery(window.parent.document).find(".menuLi, .menuTop").click(function () {
- var url = jQuery(this).attr("url");
- window.parent.location.href = "xxx" + url;
- });
- window.parent.document.url = window.location.href;
- var main = jQuery(window.parent.document).find("#iframe");
- var thisheight = jQuery("body").height() + 30;
- main.height(thisheight);
- });
- jQuery(window.parent.document).find("#iframe").load(function () {
- var main = jQuery(window.parent.document).find("#iframe");
- var thisheight = jQuery("body").height() + 30;
- main.height(thisheight);
- });
- });
- jQuery(document).ready(function () {
- $('.step-two.steps-choose').click(function () {
- $('.step-one.steps-choose.show').removeClass('show');
- $('.step-four.steps-choose.show').removeClass('show');
- $('.step-three.steps-choose.show').removeClass('show');
- $('.step-six.steps-choose.show').removeClass('show');
- $(this).addClass('show');
- });
- $('.step-three.steps-choose').click(function () {
- $('.step-two.steps-choose.show').removeClass('show');
- $('.step-one.steps-choose.show').removeClass('show');
- $('.step-four.steps-choose.show').removeClass('show');
- $('.step-six.steps-choose.show').removeClass('show');
- $(this).addClass('show');
- });
- $('.step-four.steps-choose').click(function () {
- $('.step-two.steps-choose.show').removeClass('show');
- $('.step-one.steps-choose.show').removeClass('show');
- $('.step-three.steps-choose.show').removeClass('show');
- $('.step-six.steps-choose.show').removeClass('show');
- $(this).addClass('show');
- });
- $('.step-one.steps-choose').click(function () {
- $('.step-two.steps-choose.show').removeClass('show');
- $('.step-three.steps-choose.show').removeClass('show');
- $('.step-four.steps-choose.show').removeClass('show');
- $('.step-six.steps-choose.show').removeClass('show');
- $(this).addClass('show');
- });
- $('.step-six.steps-choose').click(function () {
- $('.step-two.steps-choose.show').removeClass('show');
- $('.step-three.steps-choose.show').removeClass('show');
- $('.step-one.steps-choose.show').removeClass('show');
- $('.step-four.steps-choose.show').removeClass('show');
- $(this).addClass('show');
- });
- });
- function addrate() {
- $('#rate').append(ratehtml)
- }
- function check() {
- $("#profileyear").val($("#year").html())
- return true;
- }
- function checknum(str, obj) {
- obj.value = obj.value.replace(/[^\d.]/g, ""); //清除“数字”和“.”以外的字符
- obj.value = obj.value.replace(/^\./g, ""); //验证第一个字符是数字而不是.
- obj.value = obj.value.replace(/\.{2,}/g, "."); //只保留第一个. 清除多余的.
- obj.value = obj.value.replace(".", "$#$").replace(/\./g, "").replace("$#$", ".");
- }
- </script>
- <style type="text/css">
- .errorMessage {
- color: red;
- margin-left: 10px;
- }
- .breadcrumb > li {
- padding: 3px 5px;
- color: #fff;
- background: #6fb3e0;
- }
- .breadcrumb > li > a {
- color: #fff !important;
- }
- .li_backgrond_color {
- background-color: #00CC99 !important;
- }
- .li_backgrond_color > a {
- color: #fff !important;
- }
- .breadcrumb > li + li:before {
- display: none;
- }
- .steps-choose table th {
- text-align: right;
- width: 200px;
- }
- </style>
- </head>
- <body class="no-skin">
- <ul class="clearfix main-content-inner-ul">
- <?php if (Yii::app()->session['coachInfo']['leader'] == 1) { ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("semester/index"); ?>"'
- class="button button_normal button_group button_arrow" data-button="red">学期管理
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- <?php } ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("teacher/index"); ?>"'
- class="button button_normal button_group button_arrow" data-button="red">教师管理
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/index"); ?>"'
- class="button button_normal button_group button_arrow" data-button="red">班级管理
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("studentinfo/index"); ?>"'
- class="button button_normal button_group button_arrow" data-button="red">学生管理
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- <?php if (Yii::app()->session['coachInfo']['leader'] == 1) { ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("school/add"); ?>"'
- class="button button_normal button_group button_arrow button_active" data-button="red">学校管理
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- <?php } ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("classes/export"); ?>"'
- class="button button_normal button_group button_arrow " data-button="red">导出学生
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- </ul>
- <div class="shade"></div>
- <div class="main-container" id="main-container">
- <div class="main-content">
- <?php if ($schoocontact === null) { ?>
- <input type='hidden' name='actionsc' value='add'>
- <?php } else { ?>
- <input type='hidden' name='actionsc' value='edit'>
- <?php } ?>
- <?php if ($schoolentrancerate === null) { ?>
- <input type='hidden' name='actionse' value='add'>
- <?php } else { ?>
- <input type='hidden' name='actionse' value='edit'>
- <?php } ?>
- <?php if ($schoolprofile === null) { ?>
- <input type='hidden' name='actionsp' value='add'>
- <?php } else { ?>
- <input type='hidden' name='actionsp' value='edit'>
- <?php } ?>
- <div class="step-one steps-choose show">
- <h3 style="padding-left: 20px">基本信息</h3>
- <table class="table-hide" style="margin-top: 15px">
- <tbody>
- <tr style="line-height:40px">
- <th>学校名称:</th>
- <td><span><?php echo $schoolinfo['school_name'] ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>学校地址:</th>
- <td>
- <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>
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>邮编:</th>
- <td><span><?php echo $schoolinfo['postcode'] ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>联系电话:</th>
- <td><span><?php echo $schoolinfo['phone'] ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>类型:</th>
- <td><span><?php echo $schoolinfo['client'] == 1 ? "非客户学校" : "客户学校"; ?></span></td>
- </tr>
- <tr style="line-height:40px">
- <th>简介:</th>
- <td><span><?php echo $schoolinfo['intro'] ?></span></td>
- </tr>
- </tbody>
- </table>
- </div>
- <?php if (!isset(Yii::app()->session["crmUserInfo"])) {
- if ($grade) { ?>
- <div class="step-three steps-choose">
- <h3 style="padding-left: 20px">设置学校准考证号 <i class="fa fa-plus"
- style="font-style: normal;color:#15ae68 "></i></h3>
- <form action="<?php echo Yii::app()->createUrl('school/grade_insert') ?>" method="post" id="orderAdd"
- onsubmit="return gradecheck();">
- <ul class="table-hide">
- <?php foreach ($grade as $v) { ?>
- <li class="row marginNo table-hide-li pt20" style="width: 760px">
- <div class="textRight fl " style="width:160px;line-height: 80px;height: 80px"><span
- class="mt15"><?php if ($v->id == 1) {
- echo "高一";
- } elseif ($v->id == 2) {
- echo '高二';
- } else {
- echo '高三';
- } ?>:</span>
- </div>
- <div class="col-xs-9 paddingNo fl ">
- <div class="col-xs-9 fl lineHeight40">
- 准考证号位数: <input class="students-search" type="text" placeholder=""
- name="card_length<?php echo $v->id ?>"
- value='<?php echo $v->card_length ?>'
- style="width:50px;"> 位
- </div>
- <div class="col-xs-8 fl lineHeight40 text-left">
- <span style="float: left">是否开启准考证号:</span> <div
- class="col-sm-4 mt6 ">
- <span class="inline blue">
- <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
- value="1" <?php echo $v->card_status == 1 ? "checked" : '' ?>>
- <span> 是</span>
- </span>
-
- <span class="inline blue">
- <input type="radio" class="ace" name="card_status<?php echo $v->id ?>"
- value="0" <?php echo $v->card_status == 0 ? "checked" : '' ?>>
- <span> 否</span>
- </span>
- </div>
- </div>
- </div>
- </li>
- <?php } ?>
- </ul>
- <div class="create-orders table-hide" style="line-height: 24px;color: red">
- 1、修改学校准考证号位数时,同时修改学生的学校准考证号的位数,两者位数必须一致,否则无法使用。 <br>2、如:学校准考证号设置为5位,学生的学校准考证号为“12345”<br>3、准考证号位数最好在14位内
- </div>
- <div class="create-orders table-hide">
- <input type="submit" name="grade_submit" id="grade_submit" class="btn btn-success btn-sm"
- value="保存" style="width:100px">
- </div>
- </div><?php }
- } ?>
- </form>
- </div>
- <div class="step-two steps-choose">
- <h3 style="padding-left: 20px">联系人</h3>
- <form action="<?php echo Yii::app()->createUrl('school/contact_insert') ?>" method="post" id="orderAdd"
- onsubmit="return check_contact();">
- <table class="table-hide" style="margin-top: 15px;">
- <tbody>
- <tr style="line-height:40px">
- <th>校长: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="president"
- value='<?php echo $schoocontact['head'] ?>' style="width:240px">
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>校长联系电话: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="president_tel"
- value='<?php echo $schoocontact['head_tel'] ?>' style="width:240px">
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>关键联系人: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="core_name"
- value='<?php echo $schoocontact['core'] ?>' style="width:240px">
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>关键联系人电话: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="core_tel"
- value='<?php echo $schoocontact['core_tel'] ?>' style="width:240px">
- </td>
- </tr>
- <tr style="line-height:40px">
- <th>关键联系人岗位: </th>
- <td>
- <input class="students-search" type="text" placeholder="" name="core_title"
- value='<?php echo $schoocontact['core_title'] ?>' style="width:240px">
- </td>
- </tr>
- </tbody>
- </table>
- <div class="create-orders table-hide">
- <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm" value="保存"
- style="width:100px">
- </div>
- </form>
- </div>
- <div class="step-four steps-choose">
- <h3 style="padding-left: 20px">学校概况</h3>
- <form action="<?php echo Yii::app()->createUrl('school/profile_insert') ?>" method="post" id="orderAdd">
- <ul class="table-hide">
- <li class="row marginNo table-hide-li pt20 ">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">建校年份:</span>
- </div>
- <div class="fl col-xs-9 paddingNo">
- <div class='diy_select' style="width:238px;float: left;">
- <input type='hidden' class='diy_select_input' id="profileyear" name="profile[year]"
- value="<?php echo $schoolprofile['year'] ?>"/>
- <div class='diy_select_txt' style="width:205px;"
- id="year"><?php if ($schoolprofile['year']) {
- echo $schoolprofile['year'];
- } else {
- echo '选择年份';
- } ?></div>
- <div class='diy_select_btn'></div>
- <ul class='diy_select_list'>
- <?php for ($i = 1900; $i < (int)date("Y"); $i++) { ?>
- <li val="<?php echo $i; ?>" class=""><?php echo $i; ?></li>
- <?php } ?>
- </ul>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">所属行政部门:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <input class="students-search" type="text" placeholder="" name="profile[dept]"
- value="<?php echo $schoolprofile['dept'] ?>" style="width:240px">
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="">学校性质:</span> </div>
- <div class="col-xs-9 paddingNo fl">
- <div class="col-sm-12 paddingNo mt6">
- <span class="inline blue mr15">
- <input class="ace"
- type="radio" <?php if ($schoolprofile['nature'] == "1" || $schoolprofile['nature'] == "") {
- echo ' checked="checked"';
- } ?> checked="checked"
- name="profile[nature]" value="1">
- <span class="lbl middle">高中</span>
- </span>
- <span class="inline blue mr15">
- <input class="ace"
- type="radio" <?php if ($schoolprofile['nature'] == "2" || $schoolprofile['nature'] == "") {
- echo ' checked="checked"';
- } ?> name="profile[nature]" value="2">
- <span class="lbl middle">初中</span>
- </span>
- <span class="inline blue">
- <input class="ace"
- type="radio" <?php if ($schoolprofile['nature'] == "3" || $schoolprofile['nature'] == "") {
- echo ' checked="checked"';
- } ?> name="profile[nature]" value="3">
- <span class="lbl middle">完中</span>
- </span>
- </div>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="">是否设少数民族:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <div class="col-sm-12 paddingNo mt6">
- <span class="inline blue mr15">
- <input class="ace"
- type="radio" <?php if ($schoolprofile['is_minority'] == "1") {
- echo ' checked="checked"';
- } ?> value="1"
- name="profile[is_minority]">
- <span class="lbl middle">是</span>
- </span>
- <span class="inline blue mr15">
- <input class="ace" type="radio" <?php if (!$schoolprofile['is_minority']) {
- echo ' checked="checked"';
- } ?> value="0" name="profile[is_minority]">
- <span class="lbl middle">否</span>
- </span>
- </div>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">寄宿制形式:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <div class='diy_select' style="width:238px;float: left;">
- <input type='hidden' class='diy_select_input' id="type_id" name="profile[is_staying]"
- value="<?php echo $schoolprofile['is_staying'] ?>"/>
- <div class='diy_select_txt'
- style="width:205px;"><?php echo $schoolprofile['is_staying'] == 1 ? "寄宿制" : "非寄宿制" ?></div>
- <div class='diy_select_btn'></div>
- <ul class='diy_select_list'>
- <li val="0">非寄宿制</li>
- <li val="1">寄宿制</li>
- </ul>
- </div>
- </li>
- <li class="row marginNo table-hide-li pt20">
- <div class="textRight lineHeight30 fl" style="width:160px"><span class="mt15">高考升学率:</span>
- </div>
- <div class="col-xs-9 paddingNo fl">
- <div class="mt6"><a href="javascript:void(0);" onclick="addrate()">+添加</a></div>
- <div class="clearfix mt15 independentPd" id="rate">
- <?php
- if (!empty($schoolentrancerate)) {
- foreach ($schoolentrancerate as $k => $v) { ?>
- <div class="customK">
- <span class="inline blue mr15">
- <select class="customSelect" name="rateyear[]">
- <option>年份</option>
- <?php for ($i = (int)date("Y"); $i >= 1900; $i--) { ?>
- <option value="<?php echo $i; ?>" <?php if ($i == $v['year']) {
- echo " selected='true'";
- } ?>><?php echo $i; ?></option>
- <?php } ?>
- </select>
- </span>
- <span class="inline blue mr15">
- <input class="customInput"
- name="ratenum[]" type="input"
- value="<?php echo $v['rate'] ?>"
- onkeyup="checknum(this.value,this)"> %
- <input name="rateid[]" type="hidden"
- value="<?php echo $v['id'] ?>">
- </span>
- <a href="javascript:;">删除</a>
- </div>
- <?php }
- } ?>
- </div>
- </div>
- </li>
- </ul>
- <div id="hidrate" style="display:none">
- <div class="customK">
- <span class="inline blue mr15">
- <select class="customSelect" name="rateyear[]">
- <option>年份</option>
- <?php for ($i = (int)date("Y"); $i >= 1900; $i--) { ?>
- <option value="<?php echo $i; ?>"><?php echo $i; ?></option>
- <?php } ?>
- </select>
- </span>
- <span class="inline blue mr15">
- <input class="customInput"
- name="ratenum[]" type="input"
- value=""
- onkeyup="checknum(this.value,this)"> %
- <input name="rateid[]" type="hidden"
- value="">
- </span>
- <a href="javascript:;">删除</a>
- </div>
- </div>
- <div class="create-orders table-hide">
- <input type="submit" name="my_submit" id="my_submit" class="btn btn-success btn-sm" value="保存"
- style="width:100px">
- </div>
- </form>
- </div>
- <div class="step-six steps-choose">
- <h3 style="padding-left: 20px">安全与隐私</h3>
- <table class="table-hide" style="margin-top: 15px;margin-left: 15px;">
- <tbody>
- <tr style="line-height: 40px;">
- <th style="width: 280px;">校内试卷是否公开于“本省推荐试卷”:</th>
- <td>
- <select class="customSelect" style="width: 100px;" id="is_private" name="is_private">
- <option value="0" <?php if (!$is_private) echo 'selected'?> >公开</option>
- <option value="1" <?php if ($is_private) echo 'selected'?>>不公开</option>
- </select>
- </td>
- </tr>
- </tbody>
- </table>
- <div class="table-hide" style="margin-top: 20px;padding-left: 4.5%;">
- <input type="button" name="submit_private" onclick="saveSchoolPrivate()" class="btn btn-success btn-sm" value="保存"
- style="width:100px;">
- </div>
- </div>
- </div>
- <div class="ttd dn">
- <div class="s-state clearfix posirela">
- <div class="hint_size clearfix">
- <span class="fl ml15">错误信息</span>
- </div>
- <div class="mistake_character">
- <p class="ml15" id="err_msg"></p>
- <div class="clearfix" style="width:180px;margin:0px auto;text-align:center">
- <p class="mt20">
- <button class="roger shut">确定</button>
- </p>
- </div>
- </div>
- </div>
- </div>
- </div><!-- /.main-content -->
- </div><!-- /.main-container -->
- <!-- basic scripts -->
- <!--[if !IE]> -->
- <!--<script src="/js/jquery.2.1.1.min.js"></script>-->
- <!-- <![endif]-->
- <!--[if IE]>
- <script src="assets/js/jquery.1.11.1.min.js"></script>
- <![endif]-->
- <!--[if !IE]> -->
- <script type="text/javascript">
- window.jQuery || document.write("<script src='/js/jquery.min.js'>" + "<" + "/script>");
- </script>
- <!-- <![endif]-->
- <!--[if IE]>
- <script type="text/javascript">
- window.jQuery || document.write("<script src='assets/js/jquery1x.min.js'>" + "<" + "/script>");
- </script>
- <![endif]-->
- <script type="text/javascript">
- if ('ontouchstart' in document.documentElement) document.write("<script src='/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
- </script>
- <script src="/js/bootstrap.min.js"></script>
- <!-- page specific plugin scripts -->
- <!-- ace scripts -->
- <script src="/js/ace-elements.min.js"></script>
- <script src="/js/ace.min.js"></script>
- <!-- 学校管理 js -->
- <script src="/js/school.management.js"></script>
- <script src="/js/xsgl.js"></script>
- <!-- inline scripts related to this page -->
- <script>
- function check() {
- var card_length = parseInt($("input[name=card_length]").val());
- var regMobile = /[0-9]$/;
- if (!regMobile.test(card_length)) {
- layer.msg('非法数据!');
- return false;
- }
- if (4 > card_length || card_length > 14) {
- layer.msg('不在范围!只能取4--14位');
- return false;
- }
- if (4 <= card_length && card_length <= 14) {
- return true;
- } else {
- layer.msg('非法数据!');
- return false;
- }
- }
- function saveSchoolPrivate() {
- var is_private = $('#is_private').val();
- $.ajax({
- type: 'post',
- data: {'is_private': is_private},
- url: "<?php echo Yii::app()->createUrl('school/saveSchoolPrivate') ;?>",
- dataType: 'json',
- success: function (res) {
- if (res.status){
- layer.alert("保存成功", {icon:1})
- } else{
- layer.msg("保存失败");
- }
- },
- error: function () {
- layer.msg("保存异常");
- }
- })
- }
- function gradecheck() {
- var card_length1 = parseInt($("input[name=card_length1]").val());
- var card_length2 = parseInt($("input[name=card_length2]").val());
- var card_length3 = parseInt($("input[name=card_length3]").val());
- var card_status1 = parseInt($("input[name=card_status1]:checked").val());
- var card_status2 = parseInt($("input[name=card_status2]:checked").val());
- var card_status3 = parseInt($("input[name=card_status3]:checked").val());
- if (!card_check(card_length1, '高一', card_status1)) {
- return false;
- }
- if (!card_check(card_length2, '高二', card_status2)) {
- return false;
- }
- if (!card_check(card_length3, '高三', card_status3)) {
- return false;
- }
- return true;
- }
- function check_contact() {
- var president_tel = $("input[name=president_tel]").val();
- var regMobile = /[0-9]$/;
- if (!regMobile.test(president_tel)) {
- layer.msg('手机号只能为数字!');
- return false;
- }
- var core_tel = $("input[name=core_tel]").val();
- if (!regMobile.test(core_tel)) {
- layer.msg('手机号只能为数字!');
- return false;
- }
- return true;
- }
- function card_check(card_length, msg, status) {
- if (status == 1) {
- var regMobile = /[0-9]$/;
- if (!regMobile.test(card_length)) {
- layer.msg(msg + ': ' + '非法数据!');
- return false;
- }
- if (4 > card_length || card_length > 14) {
- layer.msg(msg + ': ' + '不在范围!只能取4--14位');
- return false;
- }
- if (4 <= card_length && card_length <= 14) {
- return true;
- } else {
- layer.msg(msg + ': ' + '非法数据!');
- return false;
- }
- } else {
- return true;
- }
- }
- $("body").delegate(".customK a", "click", function () {
- if ($(this).closest(".independentPd").find(".customK").length > 1) {
- $(this).closest(".customK").remove();
- } else {
- layer.msg('最后一条不允许删除!');
- }
- })
- </script>
- </body>
- </html>
|