-
Notifications
You must be signed in to change notification settings - Fork 3
/
advance_indextemplate.php
177 lines (111 loc) · 5.13 KB
/
advance_indextemplate.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
include "include/config.php";
include "top.php";
$pid = $_REQUEST['id'];
$type = $_REQUEST['type'];
if($type == "del"){
$id = $_REQUEST['id'];
$sql = "delete from ebay_messagecategory where id=$id";
if($dbcon->execute($sql)){
$status = " -[<font color='#33CC33'>操作记录: 记录删除成功</font>]";
}else{
$status = " -[<font color='#FF0000'>操作记录: 记录删除失败</font>]";
}
}else{
$status = "";
}
?>
<div id="main">
<div id="content" >
<table style="width:100%"><tr><td><div class='moduleTitle'></div>
<div id='Accountsbasic_searchSearchForm' style='' class="edit view search basic">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td nowrap="nowrap" scope="row" >
<input type="button" name='button' value='添加广告' id='search_form_submit' onClick="location.href='advance_indextemplateadd.php?module=advance&pid=<?php echo $_REQUEST['id'];?>'"/>
</td>
</tr>
</table>
</div>
<div id='Accountsadvanced_searchSearchForm' style='display:none' class="edit view search advanced"></div>
<div id='Accountssaved_viewsSearchForm' style='display: none';></div>
</form>
<table cellpadding='0' cellspacing='0' width='100%' border='0' class='list view'>
<tr class='pagination'>
<td colspan='9'>
<table border='0' cellpadding='0' cellspacing='0' width='100%' class='paginationTable'>
<tr>
<td nowrap="nowrap" width='2%' class='paginationActionButtons'> </td>
<td nowrap='nowrap' width='1%' align="right" class='paginationChangeButtons'> </td>
</tr>
</table> </td>
</tr><tr height='20'>
<th scope='col' nowrap="nowrap">
<div style='white-space: nowrap;'width='100%' align='left'>广告名称</div> </th>
<th scope='col' nowrap="nowrap">广告类型</th>
<th scope='col' nowrap="nowrap">SKU</th>
<th scope='col' nowrap="nowrap">链接类型</th>
<th scope='col' nowrap="nowrap">图片</th>
<th scope='col' nowrap="nowrap">Item Number</th>
<th scope='col' nowrap="nowrap">连接</th>
<th scope='col' nowrap="nowrap">
<div style='white-space: nowrap;'width='100%' align='left'>显示顺序</div> </th>
<th scope='col' nowrap="nowrap">
<div style='white-space: nowrap;'width='100%' align='left'> 操作 </div> </th>
</tr>
<?php
$sql = "select * from ebay_advancenamedetail where ebay_user='$user' and pid = '$pid' order by salemodule desc ";
$sqla = $dbcon->execute($sql);
$sql = $dbcon->getResultArray($sqla);
$dbcon->free_result($sqla);
for($i=0;$i<count($sql);$i++){
$name = $sql[$i]['name'];
$sku = $sql[$i]['sku'];
$type = $sql[$i]['type']?'链接至商品':'其它链接';
$picurl = $sql[$i]['picurl'];
$itemid = $sql[$i]['itemid'];
$id = $sql[$i]['id'];
$salemodule = $sql[$i]['salemodule'];
$displaysort = $sql[$i]['displaysort'];
if($salemodule == '0' ) $salemodule = '顶部广告';
if($salemodule == '1' ) $salemodule = '秒杀广告';
if($salemodule == '2' ) $salemodule = '推荐广告';
if($salemodule == '3' ) $salemodule = '分类广告';
if($salemodule == '4' ) $salemodule = 'TOP 5广告';
if($salemodule == '5' ) $salemodule = '新品广告';
?>
<tr height='20' class='oddListRowS1'>
<td scope='row' align='left' valign="top" ><?php echo $name;?> </td>
<td scope='row' align='left' valign="top" ><?php echo $salemodule;?> </td>
<td scope='row' align='left' valign="top" ><?php echo $sku;?></td>
<td scope='row' align='left' valign="top" ><?php echo $type ?></td>
<td scope='row' align='left' valign="top" >
<img src="images/<?php echo $picurl;?>" width="50" height="50" /></td>
<td scope='row' align='left' valign="top" ><?php echo $itemid;?></td>
<td scope='row' align='left' valign="top" > </td>
<td scope='row' align='left' valign="top" ><?php echo $displaysort;?> </td>
<td scope='row' align='left' valign="top" ><a href="#" onClick="delaccount(<?php echo $id; ?>)"></a>
<a href="advance_indextemplateadd.php?module=advance&id=<?php echo $id;?>">更新</a> </td>
</tr>
<?php
}
?>
<tr class='pagination'>
<td colspan='9'>
<table border='0' cellpadding='0' cellspacing='0' width='100%' class='paginationTable'>
<tr>
<td nowrap="nowrap" class='paginationActionButtons'></td>
</tr>
</table> </td>
</tr></table>
<div class="clear"></div>
<?php
include "bottom.php";
?>
<script language="javascript">
function delaccount(id){
if(confirm('您确认删除此条记录吗')){
location.href = 'messagecategory.php?type=del&id='+id+"&module=message&action=Message分类";
}
}
</script>