查看文件: main.php
大小: 7.58 KB
类型: application/octet-stream
<?php if (!isset($_SESSION)) { session_start(); } require_once('../Connections/BE2.php'); ?> <?php //http://www.incenseworld.com.tw/admin/main.php?act=contact $colname_Rtm2 = "welcome"; //"welcome"; if (isset($_GET['act'])) { $colname_Rtm2 = (get_magic_quotes_gpc()) ? $_GET['act'] : addslashes($_GET['act']); } mysql_select_db($database_BE2, $BE2); $query_Rtm2 = sprintf("SELECT * FROM ad_menu WHERE act = '%s'", $colname_Rtm2); $Rtm2 = mysql_query($query_Rtm2, $BE2) or die(mysql_error()); $row_Rtm2 = mysql_fetch_assoc($Rtm2); $totalRows_Rtm2 = mysql_num_rows($Rtm2); $act=isset($_GET['act'])?$_GET['act']:"welcome"; ?> <!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=utf-8" /> <meta http-equiv="cache-control" content="no-cache"> <title>無標題文件</title> <link href="style2.css" rel="stylesheet" type="text/css" /> <link href="/css/jquery-ui.css" rel="stylesheet"> <script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="html_editor/ckeditor.js"></script> <script type="text/javascript" src="/js/jquery-ui.min.js"></script> <?php $fckwrite=false; if( $act=='setmenu' || $act=='setmenu2' ){ ?> <script language="JavaScript" src="images/jscookmenu.js" type="text/javascript"></script> <link rel="stylesheet" href="images/theme.css" type="text/css" /> <script language="JavaScript" src="images/theme.js" type="text/javascript"></script> <? }?> <script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $.datepicker.regional['zh-TW']={ dayNames:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"], dayNamesMin:["日","一","二","三","四","五","六"], monthNames:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"], monthNamesShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"], prevText:"<", nextText:">", weekHeader:"週" }; $.datepicker.setDefaults($.datepicker.regional["zh-TW"]); $("#sdate").datepicker({dateFormat:"yy-mm-dd",showMonthAfterYear:true}); $("#edate").datepicker({dateFormat:"yy-mm-dd",showMonthAfterYear:true}); $('.addr').click(function () { var zip=$(this).attr("id"); $('#addrfield').val(zip); Frl=$(this).offset().left+"px", Frt=$(this).offset().top+25+"px" ; $("#addrdiv").css({"left":Frl,"top":Frt,"width":"300px","height":"210px" }); var zip4=zip+'_4'; if($('#'+zip4).val()!=""){ var url="addr.php"; $.post(url,{"z4":$('#'+zip4).val()}, function(data){ $('#addrdiv').html(data); for(var i=5;i<10;i++){ var v1=zip+'_'+i; $('#ta'+i).val($('#'+v1).val() ); } }); } $('#addrdiv').toggle(1000); }); }); function setfe2(){ var z=$("#fe1").val(); // $('#fe2').find('option').remove().end(); var url="select_tb5_fe1.php"; $.post(url,{"z":z }, function(data){ $('#fe2').find('option').remove().end().append(data); }); } function setfe2txt(){ var s=$('#fe2 :selected').text(); $("#fe2t").val( s ); } function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } function setcityz1(){ var z=$("#ta1").val(); $('#ta4').find('option').remove().end(); var url="select_zip2_z1.php"; $.post(url,{"z":z }, function(data){ $('#ta2').find('option').remove().end().append(data); }); } function setcityz2(){ var z2=$("#ta2").val(); var url="select_zip2_z2.php"; $.post(url,{"cid":z2 }, function(data){ $('#ta4').find('option').remove().end().append(data); }); } function set_addr(){ var field=$("#addrfield").val(); var s=$("#ta4 option:selected").text(); var ta1=($("#ta1").val()=="0")?"":$("#ta1").val(); var ta2=($("#ta2").val()=="0")?"":$("#ta2").val(); var ta5=($("#ta5").val()=="")?"":$("#ta5").val()+"巷"; var ta6=($("#ta6").val()=="")?"":$("#ta6").val()+"弄"; var ta7=($("#ta7").val()=="")?"":$("#ta7").val()+"號"; var ta8=($("#ta8").val()=="")?"":$("#ta8").val()+"樓"; var ta9=($("#ta9").val()=="")?"":"之"+$("#ta9").val(); var ta3=$("#ta3").val(); s=(s=="=====")?"":s; var addrstr=ta1+$("#ta2 option:selected").text()+s+ta5+ta6+ta7+ta8+ta9; $("#"+field).val(addrstr); $("#"+field+'_2').val($("#ta2").val()); $("#"+field+'_4').val($("#ta4").val()); $("#"+field+'_5').val($("#ta5").val()); $("#"+field+'_6').val($("#ta6").val()); $("#"+field+'_7').val($("#ta7").val()); $("#"+field+'_8').val($("#ta8").val()); $("#"+field+'_9').val($("#ta9").val()); $('#addrdiv').toggle(1000); } function close_addr(){ $('#addrdiv').toggle(1000); } function showhide(){ $('#mycontent').toggle(1000); $('#Ly').height(screen.height).css({width:screen.width,cursor:"auto", "background-color":"gray"}); $('#Ly').fadeTo(0, 0.5); } function lyhide(){ //if($('#mycontent').is(':visible')){ alert('visible'); } $('#Ly').hide(); $('#mycontent').toggle(1000); } function show_webpic(){ var url = "show_webpic.php" ; $.get(url, function(data){ showhide(); $("#mycontent").html(data); }); } function setpicid(s){ $("#webpicname").val(s); $("#webpicid").attr("src","/webpic/_thumbs/"+s); lyhide(); } </script> <style type="text/css"> .ti2 { font-size: 18px; font-weight: bold; color: 06F; } .ti2 A:link {color: #00F} #addrdiv { position:absolute; width:280px; height:190px; z-index:4; } #Layer2 { position:absolute; left:745px; top:9px; width:240px; height:36px; z-index:2; overflow: hidden; } #Ly { position: fixed; left: 0; top: 0; height:1px; z-index:3; background-color: #666666; filter:alpha(opacity=80); } .scrollbody { width: 800px; height: 600px; background-color: #DCDCDC; overflow: scroll; /* showing scrollbars */ } tr:hover { background: #FFFFCC; } </style> </head> <body> <div id="header" class="container"> <div id="logo"> <h1><?php echo $row_Rtm2['act_title']; ?></h1> <p>Admin system interface-Ver2.1 2015/05</p> </div> <div id="menu"> <ul> <li class="current_page_item"> <? $showt=true; if($row_Rtm2['link_title']==''){ $showt=false; } if($row_Rtm2['link']=='welcome_add'){ if ($_SERVER['REMOTE_ADDR']<>'220.130.43.118'){ $showt=false; } } if( $showt){?> <a href="main.php?act=<?php echo $row_Rtm2['link']; ?>"><?php echo $row_Rtm2['link_title']; ?></a> <? }?> </li> </ul> </div> </div> <div id="page" class="container"> <div id="content"> <?php include $row_Rtm2['act'].".php" ;?> <div id="back"><a href="javascript:history.back();"><img src="images/back.gif" alt="回上一頁" title="回上一頁" width="115" height="32" border="0" /></a></div> </div> </div> <div id="mycontent" style="position:fixed; width:900px; height:700px; top:50%; left:50%;margin-top:-300px; margin-left:-450px; display:none; z-index:4; "></div> <div id="Ly" style="display:none" onClick="lyhide()" > </div> </body> </html> <?php mysql_free_result($Rtm2); ?>
保存
取消
返回文件列表