space_magic_mybox_opreation.htm
7.98 KB
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
<!--{template common/header}-->
<!--{if empty($_GET['infloat'])}-->
<div id="pt" class="bm cl">
<div class="z"><a href="./" class="nvhm" title="{lang homepage}">$_G[setting][bbname]</a> <em>›</em> $navigation</div>
</div>
<div id="ct" class="ct2_a wp cl">
<div class="mn">
<div class="bm bw0">
<!--{/if}-->
<form id="magicform" method="post" action="home.php?mod=magic&action=mybox&infloat=yes" onsubmit="ajaxpost('magicform', 'return_$_GET[handlekey]', 'return_$_GET[handlekey]', 'onerror');return false;">
<div class="f_c">
<h3 class="flb">
<em>
<!--{if $operation == 'give'}-->
{lang magics_operation_present}{lang magic}
<!--{elseif $operation == 'drop'}-->
{lang magics_operation_drop}{lang magic}
<!--{elseif $operation == 'sell'}-->
{lang magics_operation_sell}{lang magic}
<!--{elseif $operation == 'use'}-->
{lang magics_operation_use}{lang magic}
<!--{/if}-->
</em>
<span><!--{if !empty($_GET['infloat'])}--><a href="javascript:;" class="flbc" onclick="hideWindow('$_GET[handlekey]');return false;" title="{lang close}">{lang close}</a><!--{/if}--></span>
</h3>
<div class="c" id="hkey_$_GET[handlekey]">
<div id="return_$_GET[handlekey]"></div>
<input type="hidden" name="formhash" value="{FORMHASH}" />
<input type="hidden" name="handlekey" value="$_GET[handlekey]" />
<input type="hidden" name="operation" value="$operation" />
<input type="hidden" name="magicid" value="$magicid" />
<!--{if $operation == 'give'}-->
<table cellspacing="0" cellpadding="0" class="tfm">
<tr>
<th> </th>
<td>{lang magics_operation_present}"$magic[name]"</td>
</tr>
<!--{if $_G['group']['allowmagics'] > 1 }-->
<tr>
<th>{lang magics_target_present}</th>
<td class="hasd cl">
<input type="text" id="selectedusername" name="tousername" size="12" autocomplete="off" value="" class="px p_fre" style="margin-right: 0;" />
<!--{if $buddyarray}-->
<a href="javascript:;" class="dpbtn" onclick="showselect(this, 'selectedusername', 'selectusername')">∇</a>
<ul id="selectusername" style="display:none">
<!--{loop $buddyarray $buddy}-->
<li>$buddy[fusername]</li>
<!--{/loop}-->
</ul>
<!--{/if}-->
</td>
</tr>
<!--{/if}-->
<tr>
<th>{lang magics_num}</th>
<td><input name="magicnum" type="text" size="12" autocomplete="off" value="1" class="px p_fre" /></td>
</tr>
<tr>
<th>{lang magics_present_message}</th>
<td><textarea name="givemessage" rows="3" class="pt">{lang magics_present_message_text}</textarea></td>
</tr>
</table>
<input type="hidden" name="operatesubmit" value="yes" />
<!--{elseif $operation == 'use'}-->
<!--{if $magiclist}-->
<p class="mtw mbw">
<select name="magicid" onchange="showWindow('magics', 'home.php?mod=magic&action=mybox&operation=use&&infloat=yes&type=$typeid&pid=$pid&typeid=$typeid&magicid='+this.options[this.selectedIndex].value)" class="chosemagic">
<option value="0">{lang magics_select}</option>
<!--{loop $magiclist $magics}-->
<option value="$magics[magicid]" $magicselect[$magics[magicid]]>$magics[name] - $magics[description]</option>
<!--{/loop}-->
</select>
</p>
<!--{/if}-->
<dl class="xld cl">
<dd class="m"><img src="$magic[pic]" alt="$magic[name]"></dd>
<dt class="z">
$magic[name]
<div class="pns xw0 cl">
<!--{if method_exists($magicclass, 'show')}-->
<!--{eval $magicclass->show();}-->
<!--{/if}-->
<!--{if $useperoid !== true}-->
<p class="xi1"><!--{if $magic['useperoid'] == 1}-->{lang magics_outofperoid_1}<!--{elseif $magic['useperoid'] == 2}-->{lang magics_outofperoid_2}<!--{elseif $magic['useperoid'] == 3}-->{lang magics_outofperoid_3}<!--{elseif $magic['useperoid'] == 4}-->{lang magics_outofperoid_4}<!--{/if}--><!--{if $useperoid > 0}-->{lang magics_outofperoid_value}<!--{else}-->{lang magics_outofperoid_noperm}<!--{/if}--></p>
<!--{/if}-->
</div>
</dt>
</dl>
<input type="hidden" name="usesubmit" value="yes" />
<input type="hidden" name="operation" value="use" />
<input type="hidden" name="magicid" value="$magicid" />
<!--{if !empty($_GET['idtype']) && !empty($_GET['id'])}-->
<input type="hidden" name="idtype" value="$_GET[idtype]" />
<input type="hidden" name="id" value="$_GET[id]" />
<!--{/if}-->
<!--{elseif $operation == 'sell'}-->
<dl class="xld cl">
<dd class="m"><img src="$magic[pic]" alt="$magic[name]"></dd>
<dt class="z">
<p class="mtm mbm">{lang magics_operation_sell} <input name="magicnum" type="text" size="2" value="1" class="px pxs" /> {lang magics_unit}"$magic[name]"</p>
<p class="xw0">
{lang recycling_prices}:
<!--{if {$_G['setting']['extcredits'][$magic[credit]][unit]}}-->
{$_G['setting']['extcredits'][$magic[credit]][title]} $discountprice {$_G['setting']['extcredits'][$magic[credit]][unit]}/{lang magics_unit}
<!--{else}-->
$discountprice {$_G['setting']['extcredits'][$magic[credit]][title]}/{lang magics_unit}
<!--{/if}-->
</p>
</dt>
</dl>
<input type="hidden" name="operatesubmit" value="yes" />
<!--{elseif $operation == 'drop'}-->
<dl class="xld cl">
<dd class="m"><img src="$magic[pic]" alt="$magic[name]"></dd>
<dt class="z">
<p class="mtm mbm">{lang magics_operation_drop} <input name="magicnum" type="text" size="2" autocomplete="off" value="1" class="px pxs" /> {lang magics_unit}"$magic[name]"</p>
<p class="xw0">{lang magics_weight}: $magic[weight]</p>
</dt>
</dl>
<input type="hidden" name="operatesubmit" value="yes" />
<!--{/if}-->
</div>
</div>
<!--{if empty($_GET['infloat'])}--><div class="m_c"><!--{/if}-->
<div class="o pns" id="hbtn_$_GET[handlekey]">
<!--{if $operation == 'give'}-->
<button class="pn pnc" type="submit" name="operatesubmit" id="operatesubmit" value="true" onclick="return confirmMagicOp(e)"><span>{lang magics_operation_present}</span></button>
<!--{elseif $operation == 'use'}-->
<button class="pn pnc" type="submit" name="usesubmit" id="usesubmit" value="true"><span>{lang magics_operation_use}</span></button>
<!--{elseif $operation == 'sell'}-->
<button class="pn pnc" type="submit" name="operatesubmit" id="operatesubmit" value="true" onclick="return confirmMagicOp(e)"><span>{lang magics_operation_sell}</span></button>
<!--{elseif $operation == 'drop'}-->
<button class="pn pnc" type="submit" name="operatesubmit" id="operatesubmit" value="true" onclick="return confirmMagicOp(e)"><span>{lang magics_operation_drop}</span></button>
<!--{/if}-->
</div>
<!--{if empty($_GET['infloat'])}--></div><!--{/if}-->
</form>
<script type="text/javascript" reload="1">
function confirmMagicOp(e) {
e = e ? e : window.event;
showDialog('{lang magics_confirm}', 'confirm', '', 'ajaxpost(\'magicform\', \'return_magics\', \'return_magics\', \'onerror\');');
doane(e);
return false;
}
function succeedhandle_$_GET[handlekey](url, msg) {
hideWindow('$_GET[handlekey]');
if(arguments[2] && arguments[2]['avatar']) {
msg += ' <ul class="ml mls cl"><li><a class="avt" target="_blank" href="home.php?mod=space&uid='+arguments[2]['uid']+'"><em class=""></em><img src="{$_G[setting][ucenterurl]}/avatar.php?uid='+arguments[2]['uid']+'&size=small" /></a><p><a title="admin" href="home.php?mod=space&uid='+arguments[2]['uid']+'" target="_blank"><b>'+arguments[2]['username']+'</b></a></p></li></ul>';
}
<!--{if !$location}-->
showDialog(msg, 'notice', null, function () { location.href=url; }, 0);
<!--{else}-->
showWindow('$_GET[handlekey]', 'home.php?$querystring');
<!--{/if}-->
showCreditPrompt();
}
</script>
<!--{if empty($_GET['infloat'])}-->
</div></div>
<div class="appl"><!--{subtemplate common/userabout}--></div>
</div>
<!--{/if}-->
<!--{template common/footer}-->