查看文件: body_ecardshop.php
大小: 8.47 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <?php if (!isset($_SESSION)){ session_start(); } if($_POST["ecardshop"] == "ecardshop"){ $updateSQL = sprintf("UPDATE member SET adkind=%s WHERE mem_auto=%s", GetSQLValueString($_POST['adkind'], "int"), GetSQLValueString($_SESSION['login_memid'], "int")); //$_SESSION['login_memid'] mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $msg='更新完成....' ; echo '<script>alert("'.$msg.'");</script>'; } mysql_select_db($database_BE2, $BE2); $query_Rt3 = sprintf("SELECT * FROM ecardshop WHERE coid= 1 OR coid='%s' order by coid,windex",$_SESSION['login_memid']) ; $Rt3 = mysql_query($query_Rt3, $BE2) or die(mysql_error()); $row_Rt3 = mysql_fetch_assoc($Rt3); $totalRows_Rt3 = mysql_num_rows($Rt3); /* mysql_select_db($database_BE2, $BE2); $query_Rt4 = sprintf("SELECT * FROM ecardshop WHERE coid='%s' AND windex=0",$_SESSION['login_memid']) ; $Rt4 = mysql_query($query_Rt4, $BE2) or die(mysql_error()); $row_Rt4 = mysql_fetch_assoc($Rt4); $totalRows_Rt4 = mysql_num_rows($Rt4); */ //echo $query_Rt3; $arr1=array(); $arr2=array(); // for windex=0 $arr2[0][0]=0; $arr2[0][1]=''; $arr2[0][2]=''; $arr2[0][3]=''; $i=0; do { if( $row_Rt3['windex']==0){ $arr2[0][0]=$row_Rt3['wid']; $arr2[0][1]=$row_Rt3['coid']; $arr2[0][2]=$row_Rt3['wtitle']; $arr2[0][3]='user_'.sprintf("%07d",$_SESSION['login_memid']).'.'.$row_Rt3['wimgext']; //$row_Rt3['wimg'].'.'.$row_Rt3['wimgext']; $arr2[0][4]=$row_Rt3['wlink']; }else{ // if($row_Rt3['coid']>1){ } $i=$row_Rt3['windex']-1; $arr1[$i][0]=$row_Rt3['wid']; $arr1[$i][1]=$row_Rt3['coid']; $arr1[$i][2]=$row_Rt3['wtitle']; $arr1[$i][3]=$row_Rt3['wimg'].'.'.$row_Rt3['wimgext']; $arr1[$i][4]=$row_Rt3['wlink']; // $i++; } } while ($row_Rt3 = mysql_fetch_assoc($Rt3)); mysql_select_db($database_BE2, $BE2); $query_Rt2 = sprintf("SELECT adkind FROM member where mem_auto='%s'",$_SESSION['login_memid']) ; //default 110 $Rt2 = mysql_query($query_Rt2, $BE2) or die(mysql_error()); $row_Rt2 = mysql_fetch_assoc($Rt2); $totalRows_Rt2 = mysql_num_rows($Rt2); mysql_select_db($database_BE2, $BE2); $query_Rvt3 = "SELECT * FROM travel where tbc='廣告會員網' order by tbx,tb0" ; //default 121 $Rvt3 = mysql_query($query_Rvt3, $BE2) or die(mysql_error()); $row_Rvt3 = mysql_fetch_assoc($Rvt3); $totalRows_Rvt3 = mysql_num_rows($Rvt3); ?> <style> .box2{ border-width:3px; border-style:dashed; border-color:#FFAC55; padding:5px; } img{ max-width: 100%; max-height: 100%; display: block; /* remove extra space below image */ } .box{ width: 250px; border: 5px solid black; } .box.large{ height: 300px; } .box.small{ height: 100px; } </style> <div class="main "> <div class="row"> <div class="col-lg-12"> <h3 class="page-header"><i class="fa fa-indent"></i>VIP雲名片管理</h3> <ol class="breadcrumb"> <li><i class="fa fa-home"></i><a href="index.html">首頁</a></li> <li><i class="fa fa-list-alt"></i><a href="#">雲明片</a></li> <li><i class="fa fa-indent"></i>VIP雲名片會員網連結</li> </ol> </div> </div> <div class="row"> <div class="col-sm-6"> <div class="panel panel-default"> <div class="panel-heading"> <h2><i class="fa fa-indent red"></i><strong>VIP雲名片會員網分類</strong></h2> </div> </div> </div> </div> <!-- end: Content --> <br><br><br> <row> <form action="" method="post" name="ecardshop" id="ecardshop" > </form> </row> <div class="row"> <div class="col-md-2" align="center">廣告分類選項:</div> <div class="col-md-4" align="center"> <form action="" method="post" name="ecardshop" id="ecardshop" > <select name="adkind" id="adkind" class="form-control placeholder"> <? do { ?> <option value="<?= $row_Rvt3['tb0']; ?>" <?= ($row_Rt2['adkind']==$row_Rvt3['tb0'])?'selected="selected"':""; ?>><?= $row_Rvt3['tb2']; ?></option> <? } while ($row_Rvt3 = mysql_fetch_assoc($Rvt3)); ?> </select> <br> <input type="hidden" name="ecardshop" id="ecardshop" value="ecardshop" class="btn btn-3d btn-black btn-md"/> <input type="submit" value="更新記錄" class="btn btn-3d btn-black btn-md"/> </form> </div> </div> <br><br> <div class="row"> <div class="col-md-6" align="center"> </div> <div class="col-md-9"> <? $img='/products/000830284715.jpg'; if(($arr2[0][0]>0) && ($arr2[0][3]<>'')){ $img="/ecard/img/".$arr2[0][3]; } ?> <div class="col-sm-9 box2"><img name="simg0" id="simg0" src="<?= $img ?>" alt="" /> <div align="center"><?= $arr2[0][2] ?></div> <div align="center"><input type="button" id="b0" name="b0" value="更新" onclick="updata(0)" /></div> </div> </div> </div> <div class="clearfix"> </div> <br /><br /> <div class="row"> <div class="col-md-6" align="center"> </div> <div class="col-md-9"> <? for($i=1;$i<4;$i++){ ?> <div class="col-sm-3 box2"><img name="simg<?= $i ?>" id="simg<?= $i ?>" src="/ecard/img/<?= $arr1[$i-1][3] ?>" alt="" /> <div align="center"><?= $arr1[$i-1][2] ?></div> <div align="center"><input type="button" id="b<?= $i ?>" name="b<?= $i ?>" value="更新" onclick="updata(<?= $i ?>)" /></div> </div> <? } ?> </div> </div> <br /><br /> <div class="row"> <div class="col-md-9"> <? for($i=4;$i<7;$i++){ ?> <div class="col-sm-3 box2"><img name="simg<?= $i ?>" id="simg<?= $i ?>" src="/ecard/img/<?= $arr1[$i-1][3] ?>" alt="" /> <? /* <input name="fileToUpload<?= $i ?>" type="file" id="fileToUpload1" /> <input type="hidden" name="h<?= $i ?>" value="fp1" /> 連結<input type="text" id="l<?= $i ?>" name="l<?= $i ?>" value="<?= $arr1[$i-1][4] ?>" /><br> 說明<input type="text" id="t<?= $i ?>" name="t<?= $i ?>" value="<?= $arr1[$i-1][2] ?>" /> */ ?><br /> <div align="center"><?= $arr1[$i-1][2] ?></div><br /> <div align="center"><input type="button" id="b<?= $i ?>" name="b<?= $i ?>" value="更新" onclick="updata(<?= $i ?>)" /></div> </div> <? } ?> </div> </div> <br /><br /> <div class="row"> <div class="col-md-9"> <? for($i=7;$i<10;$i++){ ?> <div class="col-sm-3 box2"><img name="simg<?= $i ?>" id="simg<?= $i ?>" src="/ecard/img/<?= $arr1[$i-1][3] ?>" alt="" /> <? /* <input name="fileToUpload<?= $i ?>" type="file" id="fileToUpload1" /> <input type="hidden" name="h<?= $i ?>" value="fp1" /> 連結<input type="text" id="l<?= $i ?>" name="l<?= $i ?>" value="<?= $arr1[$i-1][4] ?>" /><br> 說明<input type="text" id="t<?= $i ?>" name="t<?= $i ?>" value="<?= $arr1[$i-1][2] ?>" /> */ ?><br /> <div align="center"><?= $arr1[$i-1][2] ?></div><br /> <div align="center"><input type="button" id="b<?= $i ?>" name="b<?= $i ?>" value="更新" onclick="updata(<?= $i ?>)"/></div> </div> <? } ?> </div> </div> <script type="text/javascript"> function updata(i){ if(i==5){ window.location.href='memberstreetshop.html'; } else{ window.location.href='editecardshop.html?id='+i; } } function make_logo(i){ var title=$('#company_title').val(); alert(title); $.ajax({ method: "POST", url: "ajax_make_logo.php", //data: $('#yourformid').serialize(), data: {id: i} }).done(function( data ) { if(data!="ERR"){ $('#mylogo').html('<img name="logo" src="/logo_img/'+data +'" alt="1" />'); } // $('#mylogo').html(data); }); return false; } </script> <!-- end: Content --> <?php //mysql_free_result($Rt4); mysql_free_result($Rt3); mysql_free_result($Rt2); mysql_free_result($Rvt3); ?>
保存
取消
返回文件列表