123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444 |
- <?php if(!defined('IN_DISCUZ')) exit('Access Denied'); ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
- <title>我è¦�å�‚åŠ </title>
- <link href="source/plugin/xj_event/ui/jquery-ui.css" rel="stylesheet">
- <style>
- body{ font-size:12px; padding:0px 10px;font-family: "Microsoft YaHei" ! important;}
- #dialog label, #dialog input { display:block; }
- #dialog label { margin-top: 0.5em; }
- #dialog input, #dialog textarea { width: 95%; }
- #tabs { margin-top: 1em; }
- #tabs li .ui-icon-close { float: left; margin: 0.4em 0.2em 0 0; cursor: pointer; }
- #add_tab { cursor: pointer; }
- </style>
- <script src="source/plugin/xj_event/ui/jquery.1.10.2.js" type="text/javascript"></script>
- <script src="source/plugin/xj_event/ui/jquery-ui.js" type="text/javascript"></script>
- <script src="source/plugin/xj_event/module/wsqcenter/js/jquery.form.js" type="text/javascript"></script>
- <script>
- $(function() {
- var event_number_max = <?php echo $items['event_number_max'];?>;
- var tabCounter = <?php echo $tabCounter;?>,weinum = <?php echo $tabCounter;?>,
- tabTemplate = "<li><a href='#<?php echo href;?>'>#<?php echo label;?></a> </li>";
- var tabs = $( "#tabs" ).tabs();
- $("#button").button().click(function(event) {
- if(weinum<=event_number_max){
- addTab();
- }
- });
- tabs.delegate( "span.ui-icon-close", "click", function() {
- var panelId = $( this ).closest( "li" ).remove().attr( "aria-controls" );
- $( "#" + panelId ).remove();
- tabs.tabs( "refresh" );
- //Ë¢ÐÂÒ»ÏÂλÊý
- weinum = 1;
- $('#tabs ul li').each(function(index) {
- $(this).children("a").html('第'+weinum+'�');
- weinum++;
- });
- });
- //µØÇøÑ¡Ôñ
- var residecity;
- $(".residecity").button();
- $("body").on("click",".residecity", function () {
- residecity = $(this);
- $.ajax({
- cache: false,
- type: "POST",
- url: 'plugin.php?id=xj_event:city&level=1',
- dataType: 'html',
- async: true,
- error: function(request) {
- alert("Connection error");
- },
- success: function(html) {
- residecity.hide();
- residecity.next().html(html);
- }
- });
- });
- $("body").on("change","#province",function(){
- var province = $(this).val();
- $.ajax({
- cache: false,
- type: "POST",
- url: 'plugin.php?id=xj_event:city&level=2&province='+province,
- dataType: 'html',
- async: true,
- error: function(request) {
- alert("Connection error");
- },
- success: function(html) {
- residecity.next().html(html);
- }
- });
- // alert($(this).find("option:selected").text());
- });
- $("body").on("change","#city",function(){
- var city = $(this).val();
- var province = $("#province").val();
- $.ajax({
- cache: false,
- type: "POST",
- url: 'plugin.php?id=xj_event:city&level=2&province='+province+'&city='+city,
- dataType: 'html',
- async: true,
- error: function(request) {
- alert("Connection error");
- },
- success: function(html) {
- residecity.next().html(html);
- }
- });
- });
- $("body").on("change","#county",function(){
- var county = $(this).val();
- var province = $("#province").val();
- var city = $("#city").val();
- $.ajax({
- cache: false,
- type: "POST",
- url: 'plugin.php?id=xj_event:city&level=3&province='+province+'&city='+city+'&county='+county,
- dataType: 'html',
- async: true,
- error: function(request) {
- alert("Connection error");
- },
- success: function(html) {
- if(html.indexOf('<!--end-->')>-1){
- residecity.prev().html($("#province").find("option:selected").text() + $("#city").find("option:selected").text() + $("#county").find("option:selected").text());
- residecity.prev().prev().val($("#province").find("option:selected").text() + $("#city").find("option:selected").text() + $("#county").find("option:selected").text());
- residecity.next().html('');
- residecity.show();
- }else{
- residecity.next().html(html);
- }
- }
- });
- });
- $("body").on("change","#town",function(){
- residecity.prev().html($("#province").find("option:selected").text() + $("#city").find("option:selected").text() + $("#county").find("option:selected").text() + $("#town").find("option:selected").text());
- residecity.prev().prev().val($("#province").find("option:selected").text() + $("#city").find("option:selected").text() + $("#county").find("option:selected").text() + $("#town").find("option:selected").text());
- residecity.next().html('');
- residecity.show();
- });
-
- //ÉúÈÕʱÆÚÑ¡Ôñ
- $("body").on("focus",".dateselect",function(){
- $(this).next().html('<input type="text" id="datepicker">');
- $( "#datepicker" ).datepicker({
- defaultDate: '<?php echo $mybirthday;?>',
- monthNamesShort:['一月', '二月', '三月', '四月', '五月', 'å…æœˆ', '七月', '八月', 'ä¹�月', 'å��月', 'å��一月', 'å��二月'],
- dayNamesMin :['æ—¥', '一', '二', '三', 'å››', '五', 'å…'],
- changeMonth: true,
- changeYear: true,
- dateFormat: 'yy-mm-dd',
- onClose: function( selectedDate ) {
- //$( "#to" ).datepicker( "option", "minDate", selectedDate );
- $(this).parent().prev().val(selectedDate);
- $(this).parent().prev().show();
- $(this).parent().html('');
- }
-
- });
- $(this).hide();
- $(this).next().find("input").focus();
- });
-
-
-
- //Ìá½»
- $("#sumbit").button().click(function(event) {
-
-
- var postjson = [];
- var a = false;
- $('#tabs ul li').each(function(index) {
- var json = {};
- $('#'+$(this).attr('aria-controls')+' input').each(function(index) {
- if($(this).attr('type')=='text' || $(this).attr('type')=='hidden'){
- json[$(this).attr('name')] = $(this).val();
- }
- if($(this).attr('type')=='checkbox'){
- if($(this).is(':checked')){
- var checkboxname = $(this).attr('name').replace('[]','');
- if(json[checkboxname]){
- json[checkboxname] = json[checkboxname] + ',' + $(this).val();
- }else{
- json[checkboxname] = $(this).val();
- }
- }
- }
- if( $(this).attr('type')=='radio'){
- if($(this).is(':checked')){
- json[$(this).attr('name')] = $(this).val();
- }
- }
- });
- $('#'+$(this).attr('aria-controls')+' select').each(function(index) {
- json[$(this).attr('name')] = $(this).val();
- });
- //ÅжÏÊÇ·ñÓпյÄÊý¾Ý
- if(JSON.stringify(json).indexOf('""')>-1){
- a = true;
- }
- $('#'+$(this).attr('aria-controls')+' textarea').each(function(index) {
- json[$(this).attr('name')] = $(this).val();
- });
- postjson.push(json);
- });
- //alert(JSON.stringify(postjson));
- //ÅжÏÊÇ·ñÓпյÄÊý¾Ý
- if(a){
- showmessage('报�资料请填写完整');
- return;
- }
- var postdata = JSON.stringify(postjson);
- $('#tabs').hide();
- $('#sumbit').hide();
- $.ajax({
- cache: false,
- type: "POST",
- url: 'plugin.php?id=xj_event:event_join_modify&tid=<?php echo $tid;?>&action=modifyfull&formhash=<?php echo $_G['formhash'];?>',
- data: postdata,
- dataType: 'json',
- async: true,
- error: function(request) {
- alert("Connection error");
- $('#tabs').show();
- $('#sumbit').show();
- },
- success: function(json) {
- if(json.full == 1){
- showmessage(json.message);
- $('body,html').animate({scrollTop:0},0);
- if(json.url){
- window.parent.parent.location.href=json.url;
- }else{
- window.parent.parent.location.href='forum.php?mod=viewthread&tid=<?php echo $tid;?>';
- }
- return true;
- }else if(json.full == 2){
- $('#tabs').show();
- $('#sumbit').show();
- showmessage(json.message);
- $('body,html').animate({scrollTop:0},1000);
- return false;
- }
- }
- });
- });
-
- function addTab() {
- var label = '' || "Tab " + tabCounter,
- id = "tabs-" + tabCounter,
- li = "<li><a href='#"+id+"'>第"+weinum+"�</a><span class='ui-icon ui-icon-close' role='presentation'>Remove Tab</span></li>",
- tabContentHtml = '' || "Tab " + tabCounter + " content.";
-
- tabs.find( ".ui-tabs-nav" ).append( li );
- tabs.append( "<div id='"+id+"' aria-labelledby='ui-id-"+tabCounter+"' class='ui-tabs-panel ui-widget-content ui-corner-bottom' role='tabpanel' aria-hidden='true' style='display: none;'>"+$("#bmtemplate").html()+"</div>" );
- tabs.tabs( "refresh" );
- tabCounter++;
- weinum++;//µÚ¼¸Î»Î»ÊýÔö¼Ó
- }
-
- function showmessage(mm){
- $('#warning_mm').html(mm);
- $('#warning').show();
- function closemm(){
- $('#warning').hide();
- clearTimeout(mmtime);
- }
-
- var mmtime = setTimeout(function(){
- closemm()
- },4000);
- }
- });
- </script>
- </head>
- <body>
- <div class="ui-widget" id="warning" style="display:none;">
- <div class="ui-state-highlight ui-corner-all" style="margin-top: 20px; padding: 0 .7em;">
- <p><span class="ui-icon ui-icon-info" style="float: left; margin-right: .3em;"></span><span id="warning_mm"></span></p>
- </div>
- </div>
- <!-- Tabs -->
- <div id="tabs">
- <ul>
- <?php if(is_array($apply)) foreach($apply as $key => $value) { ?> <?php $i = $key+1?><li><a href="#tabs-<?php echo $i;?>">第<?php echo $i;?>�</a><?php if($i>1) { ?><span class="ui-icon ui-icon-close" role="presentation">Remove Tab</span><?php } ?></li>
- <?php } ?>
- <button id="button"><span class="ui-icon ui-icon-plus"></span></button>
- </ul>
- <?php if(is_array($apply)) foreach($apply as $key => $value) { ?> <?php $i = $key+1?><div id="tabs-<?php echo $i;?>">
- <?php if($setting['session']) { ?>
- <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;">活动场次</div>
- <select name="session" style="width:120px;">
- <?php if(is_array($setting['session'])) foreach($setting['session'] as $s_key => $s_value) { ?> <option value="<?php echo $s_key;?>" <?php if($value['session'] == $s_key) { ?>selected="selected"<?php } ?>><?php echo $s_value;?></option>
- <?php } ?>
- </select>
- </div>
- <?php } ?>
- <?php if($setting['cost']) { ?>
- <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;">报�类型</div>
- <select name="costclass" style="width:120px;">
- <?php if(is_array($setting['cost'])) foreach($setting['cost'] as $cvalue) { ?> <option value="<?php echo $cvalue['id'];?>" <?php if($cvalue['id'] == $value['ufielddata']['costclass']) { ?>selected<?php } ?>><?php echo $cvalue['cost_name'];?></option>
- <?php } ?>
- </select>
- </div>
- <?php } ?>
-
-
- <?php if(!empty($selectuserfield)) { ?>
- <?php if(is_array($selectuserfield)) foreach($selectuserfield as $fieldid) { ?> <?php if($settings[$fieldid]['available']) { ?>
- <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;"><?php echo $settings[$fieldid]['title'];?></div>
- <?php if($settings[$fieldid]['formtype'] != 'file') { ?>
- <?php if($settings[$fieldid]['formtype'] == 'checkbox') { ?>
- <?php echo $value['ufielddata'][$fieldid];?>
- <?php } elseif($fieldid == 'residecity') { ?>
- <?php echo str_replace('value=""><span></span>','value="'.$value[ufielddata][$fieldid].'"><span>'.$value[ufielddata][$fieldid].'</span>',$htmls[$fieldid]);?> <?php } elseif($settings[$fieldid]['formtype'] == 'select') { ?>
- <?php echo str_replace('value="'.$value[ufielddata][$fieldid].'"','value="'.$value[ufielddata][$fieldid].'" selected',$htmls[$fieldid]);?> <?php } else { ?>
- <?php echo str_replace('value=""','value="'.$value[ufielddata][$fieldid].'"',$htmls[$fieldid]);?> <?php } ?>
- <?php } else { ?>
- <input id="activitypic_<?php echo $fieldid;?>" type="text" tabindex="1" value="" placeholder="请输入图片地�" class="px" name="<?php echo $fieldid;?>" onblur="if(!this.value.match(/^https?:\/\/.+\/.+\.(jpg|png|gif|jpeg|bmp)$/i)){ $('showerror_<?php echo $fieldid;?>').innerHTML='图片地�错误';}else{ $('showerror_<?php echo $fieldid;?>').innerHTML=' ';}">
- <?php } ?>
- </div>
- <?php } ?>
- <?php } ?>
- <?php } ?>
-
- <?php if(!empty($myuserfield)) { ?>
- <?php if(is_array($value['myuserfield'])) foreach($value['myuserfield'] as $val) { ?> <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;"><?php echo $val['title'];?></div>
- <?php echo $val['html'];?>
- </div>
- <?php } ?>
- <?php } ?>
-
- <div style=" padding:10px 10px;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;">留言</div>
- <textarea name="message" maxlength="100" cols="38" rows="3" class="pt" tabindex="4"><?php echo $value['bmmessage'];?></textarea>
- </div>
- </div>
- <?php } ?>
- </div>
- <div style="padding:10px; text-align:center;">
- <button id="sumbit">ä¿�å˜</button>
- </div>
- <div id="bmtemplate" style="display:none;">
- <?php if($setting['session']) { ?>
- <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;">活动场次</div>
- <select id="selectmenu" name="session" style="width:120px;">
- <option value="" selected="selected">请选择</option>
- <?php if(is_array($setting['session'])) foreach($setting['session'] as $key => $value) { ?> <option value="<?php echo $key;?>"><?php echo $value;?></option>
- <?php } ?>
- </select>
- </div>
- <?php } ?>
- <?php if($setting['cost']) { ?>
- <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;">报�类型</div>
- <select name="costclass" style="width:120px;">
- <?php if(is_array($setting['cost'])) foreach($setting['cost'] as $value) { ?> <option value="<?php echo $value['id'];?>"><?php echo $value['cost_name'];?></option>
- <?php } ?>
- </select>
- </div>
- <?php } ?>
- <?php if(!empty($selectuserfield)) { ?>
- <?php if(is_array($selectuserfield)) foreach($selectuserfield as $fieldid) { ?> <?php if($settings[$fieldid]['available']) { ?>
- <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;"><?php echo $settings[$fieldid]['title'];?></div>
- <?php if($settings[$fieldid]['formtype'] != 'file') { ?>
- <?php echo $htmls[$fieldid];?>
- <?php } else { ?>
- <input id="activitypic_<?php echo $fieldid;?>" type="text" tabindex="1" value="" placeholder="请输入图片地�" class="px" name="<?php echo $fieldid;?>" onblur="if(!this.value.match(/^https?:\/\/.+\/.+\.(jpg|png|gif|jpeg|bmp)$/i)){ $('showerror_<?php echo $fieldid;?>').innerHTML='图片地�错误';}else{ $('showerror_<?php echo $fieldid;?>').innerHTML=' ';}">
- <?php } ?>
- </div>
- <?php } ?>
- <?php } ?>
- <?php } ?>
-
- <?php if(!empty($myuserfield)) { ?>
- <?php if(is_array($myuserfield)) foreach($myuserfield as $value) { ?> <div style=" padding:10px 10px; border-bottom:1px dashed #CCC;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;"><?php echo $value['title'];?></div>
- <?php echo $value['html'];?>
- </div>
- <?php } ?>
- <?php } ?>
-
- <?php if(in_array('bmmessage',$selectuserfield)) { ?>
- <div style=" padding:10px 10px;">
- <div style="width:80px; float:left; line-height:30px; font-size:12px; color:#999;">留言</div>
- <textarea name="message" maxlength="100" cols="38" rows="3" class="pt" tabindex="4"></textarea>
- </div>
- <?php } ?>
- </div>
- <script language="javascript">
- $(function(){
- //ÉÏ´«Í¼Æ¬
- $("body").on("change",".uploadfile",function(){
- var showimg = $(this).parent().parent().find('.showimg');
- var bar = $(this).parent().parent().find('.bar');
- var uploadcover = $(this).parent().parent().find('.uploadcover');
- var uploaderror = $(this).parent().parent().find('.uploaderror');
- var inputtext = $(this).parent().parent().find('.inputtext');
- bar.show();
- $(this).parent().parent().find('form').ajaxSubmit({
- dataType: 'json',
- beforeSend: function() {
- //showimg.empty();
- var percentVal = '0%';
- bar.width(percentVal);
- },
- uploadProgress: function(event, position, total, percentComplete) {
- var percentVal = percentComplete + '%';
- bar.width(percentVal);
- },
- success: function(data) {
- if(data.error){
- alert(data.error);
- var percentVal = '0%';
- bar.width(percentVal);
- return;
- }
- //progress.hide();
- bar.hide();
- //files.html("<b>"+data.name+"("+data.size+"k)</b> <span class='delimg' rel='"+data.pic+"'>ɾ³ý</span>");
- if(data.pic!=null){
- var img = "<?php echo $_G['siteurl'];?>"+data.dir+data.pic;
- inputtext.val(img);
- showimg.html("<img src='"+img+"' style='width:100%;'>");
- uploadcover.hide();
- }
- },
- error:function(xhr){
- bar.width('0');
- uploaderror.html(xhr.responseText);
- }
- });
- });
- });
- </script>
- </body>
- </html>
|