PageRenderTime 1ms CodeModel.GetById 50ms app.highlight 8ms RepoModel.GetById 0ms app.codeStats 0ms

/Quản lý website tin tức PHP/discuznews/template/default/portal/portalcp_diy.htm

https://gitlab.com/phamngsinh/baitaplon_sinhvien
HTML | 224 lines | 182 code | 4 blank | 38 comment | 0 complexity | 637d44da5601a03fb5fc59904aa7d73b MD5 | raw file
  1<!--{template common/header}-->
  2<!--{if $op=='blockclass'}-->
  3	<div class="tbmu mbm" id="contentblockclass_nav" style="margin-top: -15px">
  4		<!--{eval $isfirst=1;}-->
  5		<!--{loop $_G['cache']['blockclass'] $key $value}-->
  6		<!--{if $isfirst}-->
  7		<!--{eval $isfirst=0;}-->
  8		<a href="javascript:;" id="bcnav_$key" class="a" onclick="spaceDiy.switchBlockclass('$key');return false;">$value[name]</a>
  9		<!--{else}-->
 10		<span class="pipe">|</span>
 11		<a href="javascript:;" id="bcnav_$key" onclick="spaceDiy.switchBlockclass('$key');return false;">$value[name]</a>
 12		<!--{/if}-->
 13		<!--{/loop}-->
 14	</div>
 15	<!--{eval $isfirst=1;}-->
 16	<!--{loop $_G['cache']['blockclass'] $key $value}-->
 17	<!--{if $isfirst}-->
 18	<!--{eval $isfirst=0;}-->
 19	<ul class="blocks content" id="contentblockclass_$key">
 20	<!--{else}-->
 21	<ul class="blocks content" id="contentblockclass_$key" class="hide">
 22	<!--{/if}-->
 23		<li class="module-$key">
 24			<ol>
 25			<!--{loop $value[subs] $skey $svalue}-->
 26				<li class="module-$skey"><label onmousedown="drag.createObj (event,'block','$skey');" onmouseover="className='hover';" onmouseout="this.className='';">$svalue[name]</label></li>
 27			<!--{/loop}-->
 28			</ol>
 29		</li>
 30	</ul>
 31	<!--{/loop}-->
 32<!--{elseif $op == 'style'}-->
 33<ul class="content" style="overflow-y: auto; height: 90px;">
 34<!--{loop $themes $value}-->
 35  <li><a href="javascript:;" onclick="spaceDiy.changeStyle('$value[dir]');return false;"><img src="{STATICURL}$value['dir']/preview.jpg" />$value['name']</a></li>
 36<!--{/loop}-->
 37</ul>
 38<!--{elseif $_GET['op'] == 'image'}-->
 39	<div id="diyimg_prev" class="z">$multi</div>
 40	<ul id="imagebody">
 41		<!--{loop $list $key $value}-->
 42		<li class="thumb"><a href="javascript:;" onclick="return false;"><img src="$value[pic]" alt="" onclick="spaceDiy.setBgImage(this);"/></a></li>
 43		<!--{/loop}-->
 44	</ul>
 45	<div id="diyimg_next" class="z">$multi</div>
 46<!--{elseif $_GET['op'] == 'diy'}-->
 47<dl class='diy'>
 48	<dt class="cl pns">
 49		<div class="y">
 50			<button type="button" id="uploadmsg_button" onclick="Util.toggleEle('upload');" class="pn pnc z{if empty($list)} hide{/if}"><span>{lang diy_upload_image}</span></button>
 51			<div id="upload" class="z{if $list} hide{/if}"><iframe id="uploadframe" name="uploadframe" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
 52				<form method="post" autocomplete="off" name="uploadpic" id="uploadpic" action="portal.php?mod=portalcp&ac=diy" enctype="multipart/form-data" target="uploadframe" onsubmit="return spaceDiy.uploadSubmit();">
 53					<input type="file" class="t_input" name="attach" size="15">
 54					<input type="hidden" name="formhash" value="{FORMHASH}" />
 55					<input type="hidden" name="topicid" value="$_GET[topicid]" />
 56					<button type="submit" name="uploadsubmit" id="btnupload" class="pn" value="true"><span>{lang diy_update_start}</span></button>
 57				</form>
 58			</div>
 59			<span id="uploadmsg" class="z"></span>
 60		</div>
 61		{lang diy_editing}:
 62		<a id="diy_tag_body" href="javascript:;" onclick="spaceDiy.setCurrentDiy('body');return false;">{lang background}</a>
 63		<span class="pipe">|</span><a id="diy_tag_blocktitle" href="javascript:;" onclick="spaceDiy.setCurrentDiy('blocktitle');return false;">{lang title_bar}</a></span>
 64		<span class="pipe">|</span><a id="diy_tag_ct" href="javascript:;" onclick="spaceDiy.setCurrentDiy('ct');return false;">{lang content_area}</a>
 65
 66	  	<a style="margin-left: 40px;" id="bg_button" href="javascript:;" onclick="spaceDiy.hideBg();return false;">{lang background_image_cancel}</a>
 67		<span class="pipe">|</span><a id="recover_button" href="javascript:;" onclick="spaceDiy.recoverStyle();return false;">{lang restore_skin}</a>
 68	</dt>
 69	<dd>
 70		<div class="photo_list cl">
 71			<div id="currentimgdiv" class="z" style="width:446px;">
 72				<center><ul><li class="thumb" style="border:1px solid #ccc; padding:2px;"><img id="currentimg" alt="" src=""/></li></ul>
 73				<div class="z cur1" onclick="spaceDiy.changeBgImgDiv();">{lang diy_change}</div></center>
 74			</div>
 75			<div id="diyimages" class="z" style="width: 446px; display: none">
 76				<div id="diyimg_prev" class="z">$multi</div>
 77				<ul id="imagebody">
 78					<!--{loop $list $key $value}-->
 79					<li class="thumb"><a href="javascript:;" onclick="return false;"><img src="$value[pic]" alt="" onclick="spaceDiy.setBgImage(this);"/></a></li>
 80					<!--{/loop}-->
 81				</ul>
 82				<div id="diyimg_next" class="z">$multi</div>
 83			</div>
 84			<div class="z" style="padding-left: 7px; width: 160px; border: solid #CCC; border-width: 0 1px;">
 85				<table cellpadding="0" cellspacing="0">
 86					<tr>
 87						<td><label for="repeat_mode">{lang image_repeat_mode}:</label></td>
 88						<td>
 89							<select id="repeat_mode" name="repeat_mode" class="ps" onclick="spaceDiy.setBgRepeat(this.value);">
 90								<option value="0" selected="selected">{lang image_repeat}</option>
 91								<option value="1">{lang image_repeat_direct}</option>
 92								<option value="2">{lang image_repeat_horizontal}</option>
 93								<option value="3">{lang image_repeat_vertical}</option>
 94							</select>
 95						</td>
 96					</tr>
 97					<tr>
 98						<td>{lang image_position}:</td>
 99						<td>
100							<table cellpadding="0" cellspacing="0" id="positiontable">
101								<tr>
102									<td id="bgimgposition0" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
103									<td id="bgimgposition1" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
104									<td id="bgimgposition2" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
105								</tr>
106								<tr>
107									<td id="bgimgposition3" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
108									<td id="bgimgposition4" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
109									<td id="bgimgposition5" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
110								</tr>
111								<tr>
112									<td id="bgimgposition6" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
113									<td id="bgimgposition7" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
114									<td id="bgimgposition8" onclick="spaceDiy.setBgPosition(this.id)">&nbsp;</td>
115								</tr>
116							</table>
117						</td>
118					</tr>
119				</table>
120			</div>
121			<div class="z diywin" style="padding-left: 7px; width: 160px;">
122				<table cellpadding="0" cellspacing="0">
123					<tr>
124						<td>{lang background_attach_mode}:</td>
125						<td>
126							<label for="rabga0"><input type="radio" id="rabga0" name="attachment_mode" onclick="spaceDiy.setBgAttachment(0);" class="pr" />{lang background_attach_scroll}</label>
127							<label for="rabga1"><input type="radio" id="rabga1" name="attachment_mode" onclick="spaceDiy.setBgAttachment(1);" class="pr" />{lang background_attach_fixed}</label>
128						</td>
129					</tr>
130					<tr>
131						<td>{lang background_color}:</td>
132						<td><input type="text" id="colorValue" value="" size="6" onchange="spaceDiy.setBgColor(this.value);" class="px vm" style="font-size: 12px; padding: 2px;" />
133						<input id="cbpb" onclick="createPalette('bpb', 'colorValue', 'spaceDiy.setBgColor');" type="button" class="pn colorwd" value="" />
134						</td>
135					</tr>
136				</table>
137			</div>
138			<div class="z diywin" style="padding-left: 7px; width: 160px;">
139				<table cellpadding="0" cellspacing="0">
140					<tr>
141						<td>{lang text_color}:</td>
142						<td><input type="text" id="textColorValue" value="" size="6" onchange="spaceDiy.setTextColor(this.value);" class="px vm" style="font-size: 12px; padding: 2px;" />
143						<input id="ctpb" onclick="createPalette('tpb', 'textColorValue', 'spaceDiy.setTextColor');" type="button" class="pn colorwd" value="" />
144						</td>
145					</tr>
146					<tr>
147						<td>{lang link_color}:</td>
148						<td><input type="text" id="linkColorValue" value="" size="6" onchange="spaceDiy.setLinkColor(this.value);" class="px vm" style="font-size: 12px; padding: 2px;" />
149						<input id="clpb" onclick="createPalette('lpb', 'linkColorValue', 'spaceDiy.setLinkColor');" type="button" class="colorwd" value="" style="background: #fff;" />
150						</td>
151					</tr>
152				</table>
153			</div>
154  </dd>
155</dl>
156<!--{elseif $op == 'import'}-->
157<h3 class="flb">
158	<em id="return_$_GET[handlekey]">{lang import_frame}</em>
159	<span>
160		<!--{if $_G[inajax]}--><a href="javascript:;" class="flbc" onclick="hideWindow('$_GET[handlekey]');return false;" title="{lang close}">{lang close}</a><!--{/if}-->
161	</span>
162</h3>
163<ul class="tb cl">
164	<li{if empty($_GET['type'])} class="a"{/if} id="li_import_upload"><a onclick="showWindow('showimport', this.getAttribute('href'));" href="portal.php?mod=portalcp&ac=diy&op=import&type=0&tpl=$_GET['tpl']">{lang diy_uploadfile}</a></li>
165	<li{if $_GET['type'] == 1} class="a"{/if} id="li_import_system"><a onclick="showWindow('showimport', this.getAttribute('href'));" href="portal.php?mod=portalcp&ac=diy&op=import&type=1&tpl=$_GET['tpl']">{lang diy_systemfile}</a></li>
166</ul>
167
168<form name="frameimport" id="frameimport" enctype="multipart/form-data" method="post" autocomplete="off" action="portal.php?mod=portalcp&ac=diy&op=import" onsubmit="ajaxpost('frameimport','return_$_GET[handlekey]','','onerror',$('frameimportbutton'));">
169	<div class="c" style="width:420px;line-height:100px; overflow-y: auto; ">
170	<!--{if $_GET['type'] == 1}-->
171		<!--{if $xmlarr}-->
172		{lang import_select_file}:
173		<select id="importfilename" name="importfilename" class="">
174			<!--{loop $xmlarr $key $value}-->
175			<option value="$key">$value</option>
176			<!--{/loop}-->
177		</select>
178		<!--{else}-->
179		<center>{lang import_system_file_no_exists}</center>
180		<!--{/if}-->
181	<!--{else}-->
182		{lang import_text_file_from}: <input type="file" id="importfile" name="importfile" style="margin: 5px;">
183	<!--{/if}-->
184	</div>
185	<div class="o pns">
186		<input type="hidden" name="handlekey" value="$_GET['handlekey']" />
187		<input type="hidden" name="importsubmit" value="true" />
188		<input type="hidden" name="tpl" value="$_GET['tpl']" />
189		<input type="hidden" name="formhash" value="{FORMHASH}" />
190		<button type="submit" class="pn pnc" id="frameimportbutton"><strong>{lang import}</strong></button>
191	</div>
192</form>
193<script type="text/javascript" reload="1">
194function succeedhandle_$_GET['handlekey'] (url, message, values) {
195	if (values['status'] == '1') {
196		if (values['css']) spaceDiy.initDiyStyle(values['css']);
197
198		var areaArr = values['html'];
199		var dom = document.createElement("div");
200		for (var i in areaArr) {
201			var html = areaArr[i].replace(/\[script/g, '<script').replace(/\[\/script\]/g, '<\/script>');
202			var area = $(i) ? $(i) : drag.moveableArea[0];
203			dom.innerHTML = html;
204			var arr = [];
205			for (var i=0, l=dom.childNodes.length; i < l; i++) {
206				arr.push(dom.childNodes[i]);
207			}
208			var one = '';
209			while(one = arr.pop()) {
210				Util.insertBefore(one,area.firstChild);
211			}
212		}
213		drag.initPosition();
214		drag.isChange = true;
215		drag.setClose();
216		var blocks = values['bids'].split(',');
217		drag.blockForceUpdateBatch(blocks);
218	}
219
220	hideWindow('$_GET['handlekey']');
221}
222</script>
223<!--{/if}-->
224<!--{template common/footer}-->