查看文件: netshop.php
大小: 2.54 KB
类型: application/octet-stream
<?php require('system/login.php'); ?> <?php require_once('../Connections/BE2.php'); ?> <?php mysql_select_db($database_BE2, $BE2); $query_Rt3 ="SELECT * FROM webshop WHERE coid= 1 order by windex" ; $Rt3 = mysql_query($query_Rt3, $BE2) or die(mysql_error()); $row_Rt3 = mysql_fetch_assoc($Rt3); $totalRows_Rt3 = mysql_num_rows($Rt3); $arr1=array(); $i=0; do { 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']; $arr1[$i][5]=$row_Rt3['wuse']; $i++; } while ($row_Rt3 = mysql_fetch_assoc($Rt3)); ?> <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> <table width="100%%" border="0"> <? for($c=0;$c<3;$c++){ ?> <tr> <? for($i=1;$i<4;$i++){ $add=($c*3)+$i; ?> <td><div class="box2" align="center"><img name="simg<?= $add ?>" id="simg<?= $i ?>" src="/shop/img/<?= $arr1[$add-1][3] ?>" width="170" alt="" /> <div align="center"><?= $arr1[$add-1][2] ?></div> <div align="center"> <?= ($arr1[$add-1][5]=='Y')?'開放會員編輯':'不開放會員編輯'; ?><br> <input type="button" id="b<?= $add ?>" name="b<?= $add ?>" value="編輯" onclick="updata(<?= $add ?>)" /></div> </div></td> <? } ?> </tr> <? } ?> </table> <script type="text/javascript"> function updata(i){ //https://skybni.com/admin09/main.php?act=edit_userdoc // window.location.href='editwebshop.html?id='+i; window.location.href='main.php?act=editnetshop&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($Rt3); ?>
保存
取消
返回文件列表