<?php
//google样式 
if(file_exists('output/googlestyle.png'))
{
	list($width, $height, $type, $attr) = getimagesize("output/googlestyle.png");
	$pic_html = <<<pic
<div style="margin-top:12px;" id="show_logo"><img id="show_img" src="output/googlestyle.png"/>&nbsp;&nbsp;<span>宽*高:{$width}px*{$height}px</span></div>
pic;
}
else
{
	$pic_html = <<<pic
<div id="show_logo"></div>
pic;
}

$js = <<<js
<script type="text/javascript">
function ajaxSend()
{
	$.ajax({
	   type: "POST",
	   url: "server.php",
	   data: {id:"googlestyle",bg_color:$(":radio:checked").attr("value"),logo_text:$("#logo_text").attr("value"),logo_padding:$("#logo_padding").attr("value"),font_size:$("#font_size").attr("value"),logo_desc:$("#logo_desc").attr("value"),desc_layout:$("#desc_layout").attr("value"),desc_size:$("#desc_size").attr("value")},
	   beforeSend:function(msg){
	   		$("#show_img").remove();
			$("#show_logo").append("<img id='show_img' src='images/loadingAnimation.gif'/>");
		},
	   success: function(msg){
			window.location.reload();
   	   },
   	   error: function(msg){
   	   	 alert(msg);
   	   }
	});
}
</script>
js;

$html = <<<html

<div style="text-align:left;font-size:18px;font-family:'microsoft yahei';color:#006ec6;">google风格</div>
<div class="tabstyle"></div>
<div class="divsettings">	
	<table cellspacing="0" cellpadding="5" width="100%" border="0">
		<tbody>
			<tr>
				<td valign="top" nowrap><span class="googlestyle">LOGO文本:</span></td>
				<td>
					<div class="tdstyle">
                    	<input maxlength="25" name="logo_text" type="text" value="" id="logo_text" style="width:241px;" onkeyup="value=value.replace(/[\W]/g,'')"/>
                    	<span>只能是数字或英文字母</span>
                    </div>
				</td>
			</tr>
			<tr>
				<td valign="top" nowrap><span class="googlestyle">字体间距:</span></td>
				<td>
					<div class="tdstyle">
                    	<select name="logo_padding" id="logo_padding" style="width:130px;">
							<option value="padding_large">大</option>
							<option selected="selected" value="padding_medimun">中(默认)</option>
							<option value="padding_small">小</option>
						</select>
					</div>
				</td>
			</tr>
			<tr>
				<td valign="top" nowrap><span class="googlestyle">字体大小:</span></td>
				<td class="tdstyle">
					<div>
                    	<select name="font_size" id="font_size" style="width:130px;">
							<option value="font_large">大</option>
							<option value="font_medimun">中</option>
							<option selected="font_selected" value="font_small">小</option>
						</select>
					</div>
				</td>
			</tr>
			<tr>
            	<td style="width: 70px; height: 29px" valign="top" nowrap>
                    <font face="Arial, sans-serif" size="-1">图片背景: </font>
                </td>
                <td style="height: 29px">
                   <font face="宋体"></font>
                   <span style="display:inline-block;height:18px;width:328px;"><input id="bg_color_0" type="radio" name="bg_color" value="white" checked="checked" />白色(默认)<input id="bg_color_1" type="radio" name="bg_color" value="transparent" />透明色(适合网站背景色为非白色的网站)</span>
                </td>
            </tr>
			<tr>
				<td></td>
				<td class="tdstyle"><input type="button" onclick="ajaxSend();" value="创建我的logo >>" id="logo_button" style="width:244px;" /></td>
			</tr>
		</tbody>
	</table>
</div>
$pic_html

html;
?>