google地图 标记地图代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>标记地图</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAc8Kc8QqRiIgpsK23Kp5gkBSH2hU1_Yr14uOHyNBnrSDSRu1cOxQAA7Zqsv6wfxH6g3z1AadUX7peSA" type="text/javascript教程" charset="utf-8"></script>
<!--改用自己的key-->
<script type="text/javascript">
function save(point,zoom){
o = window.opener;
if (point !=null ) {
o.document.getElementById("layout_map").value='('+point.lng()+','+point.lat()+')';//经度
//o.document.getElementById("map_y").value=point.lat();
o.document.getElementById("layout_zoom").value=zoom;
try {
o.document.getElementById("emarked_img").src = "http://www.111cn.net/images/map/modify_note.gif" ;
}catch(e){}
}
}
function initialize(lng_x) {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));//设置map对象
map.addControl(new GSmallMapControl());//google 控件
try{
var owin;
if(window.opener){
owin = window.opener;
}else{
owin = window.parent;
}
map_x=owin.document.getElementById("layout_map").value;
//map_y=owin.document.getElementById("layout_map").value;
map_z=owin.document.getElementById("layout_zoom").value*1;
if( map_x == null || map_x =="" || map_z =='' )
{
map_x ='(103.974609375,33.284619968887675)';
map_z =4;
}
map_x =map_x.replace('(','');
map_x =map_x.replace(')','');
var temp =map_x.split(',');
map_x = temp[0];
map_y = temp[1];
//if(map_x !=null && map_x != "" && map_z>0 )
//{
thispoint=new GLatLng(map_y,map_x,true);
map.setCenter(thispoint,map_z);
map.addOverlay(new GMarker(thispoint));
//}
//else
//{
// map.setCenter(new GLatLng(37.86455455760559,112.55081176757812), 10);
// alert(map_y);
//}
}catch(e){
//alert(map_z);
map.setCenter(new GLatLng(37.86455455760559,112.55081176757812), 10);//设置中心点
}
//标记事件
GEvent.addListener(map,"click", function(overlay,point) {
map.clearOverlays();//清除原有的标记
map.addOverlay(new GMarker(point));
save(point,map.getZoom());
});
}
}
</script>
<style>
<!--
body{ margin:0px; padding:0px;}
#save{ line-height:1.8em; text-align:center; width:700px;}
-->
</style>
</head>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" style="width: 900px; height: 550px"></div>
<div id="save"><input value="保存标记" onclick="javascript:window.close();" type="button"/></div>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<script language="javascript教程">
check111cnNet()
{
var keyword = myfm.keyword.value;
if( keyword =='' )
{
alert('www.111cn.net提示你:请输入要查询的内容');
return false;
}
}
</script>
</head>
<body>
<form id="myfm" name="myfm" method="post" action="">
<label>
输入查询关键字:
<input type="text" name="keyword" />
</label>
<label>
<input type="submit" name="Submit" value="提交" onClick="return check111cnNet();" />
</label>
</form>
</body>
</html>
<?php
// 创建数据库教程连接
mysql教程_connect('localhost','111cn.net','www.111cn.net');
mysql_select_db('www.111cn.net');//数据库选择
mysql_query('set names "gbk"');
//进度查询操作
if($_POST)
{
$keyword = $_POST['keyword'];
$sql = "Select * from search where title like '%$keyword%' limit 0,10";
$query = mysql_query($sql ) or die("www.111cn.net提示你:查询出错了");
if( mysql_num_rows( $query ) )
{
while( $rs = mysql_fetch_array( $query ) )
{
echo $rs['title'];
}
}
else
{
echo '没有要找的内容';
}
}
/*
数据表结构
CREATE TABLE `111cnNet`.`test` (
`id` INT( 8 ) NOT NULL AUTO_INCREMENT ,
`title` CHAR( 150 ) NULL ,
`content` TEXT NULL ,
PRIMARY KEY ( `id` )
) ENGINE
*/
//函数解析
mysql_connect //数据库连接了有三个参数分别为 数据库服务器名称,用户名,密码
mysql_select_db//参数有二个,第二个可选 ,第一个数据库名称,第二个数据库连接$connwww.111cn.net
mysql_query('set names "gbk"'); //这一句比较重要,就是设置读取数据库内容的编码了,这句要设置与文档编辑一致,否则可能出现乱码。
mysql_query //数据查询,有二个参数,第一个必须,为sql查询语句。
mysql_num_rows //统计mysql_query查询记录多少条,返回为int型
mysql_fetch_array //读取当前记录集一条记录保存到数组。
$_POST
if else
while
// 纯本站原创转载必须注明来源否则必究责任 来源http://www.111cn.net/phper/php.html
?>
mysql教程_connect("localhost","root","root") or die('Database Server Uid or Password Error!');
mysql_select_db('ip') or die('data !');
mysql_query("SET NAMES 'gb2312'");
*/
include("boke/inc/re_conn.php");
$file = 'update.xml';
$url = '<urlset
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">';
$sql = "Select * from filecontent order by id desc limit 0,100 ";
$query = mysql_query( $sql );
while( $rs = mysql_fetch_array( $query ) )
{
$time = filemtime(substr($rs['s_url'],1));
$s = date("Y-m-d",$time);
$s1 = date("H:i:s+00:00",$time);
$s = $s.'T'.$s1;
$url .= "<url> <loc>http://www.111cn.net".$rs['s_url']."</loc> <priority>1.00</priority> <lastmod>$s</lastmod> <changefreq>hourly</changefreq> </url> ";
}
if( $url )
{
$url .="</urlset>";
null_write($url);
echo '生成网站地图成功<a href='.$file.' target=_blank>查看</a>';
}
function null_write($new)
{
global $file;
$f=fopen($file,"w");
flock($f,LOCK_EX);
fputs($f,$new);
fclose($f);
}
<?php
mysql教程_connect('localhost','root','1******') or die('database server no exists!');
mysql_select_db('wk') or die('database error!');
mysql_query("SET NAMES 'gbk'");//set document charset encode
function CreateXml(){
$tag =0;
$head ='<?xml version="1.0" encoding="gb2312" ?> <channel>';
$sql ="Select * from wk_works order by id desc";
while($rs =mysql_fetch_array($res) ){
if($tag==0){
$stp = "<item class="".$rs['w_type']."" uid="".$rs['m_id']."" name="".$this->get_name($rs['m_id'])."" portrait="".$rs['w_head']."" blogname = "".$rs['blogname']."" url="user.php?id=".$rs['m_id']."" poll = "".$rs['w_support']."" ></item>";
}else{
}
}
$foot ='</channel>';
$cont =fopen("xml/111cn.net.xml",'w');
fwrite($cont,$head.$stp.$foot);
fclose($cont);
}
function get_name($id){
$sqle ="select id,m_uid from wk_member where id='$id'";
$relt = mysql_query($sqle);
$reus = mysql_fetch_array($relt);
return $reus['m_uid'];
}
?>
本站原创转载注明: www.111cn.net
@session_start();
mysql教程_connect('localhost','root','19860427') or die('database server no exists!');
mysql_select_db('wk') or die('database error!');
mysql_query("SET NAMES 'gbk'");//set document charset encode
$login_pwd = get_value('p','post');
if(strlen($uid)<3 || strlen($uid)>12){
alert('用户长度为3-12个字符!','');
}elseif ( strlen($login_pwd)<6 || strlen($login_pwd)>12 ){
alert('登录密码不正确,长度为6-12位','');
}else{
$sql = "select * from wk_member where m_uid='$uid' and m_pass='$login_pwd'";
$result = mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($result) ){
$rs = mysql_fetch_array($result);
if($rs['m_pass']!=md5($login_pwd) ){
alert('用户名与密码不匹配!','');
}else{
$_SESSION['uid']=array($rs['id'],$uid,$rs['m_tel']);
exit("<script>location='registerok.php';</script>");
}
}else{
alert('登陆失败,用户名不存在!','');
}
}
function get_value( $st,$str='get')
{
if( $str == 'post' )
{
return $_POST[$st];
}else{
return $_GET[$st];
}
}
<form id="form1" name="form1" method="post" action="">
<label>
<input type="text" name="u" id="u" />
</label>
用户名
<p>
<label>
<input type="text" name="p" id="p" />
</label>
密码</p>
<p>
<label>
<input type="submit" name="button" id="button" value="提交" />
</label>
</p>
</form>
//数据表wk_member结构
id
m_uid
m_pass
本站原创转载注明 www.111cn.net
相关文章
- 专做了百度和google的网盟推广以作推广效果的评估比较。百度的周期为6天,google为4天。 从百度的统计数据可以看出这六天的点击次数总共为464,平均点击花费了0.30元...2017-07-06
- 有一种方法,可以不打开网站而直接查看到这个网站的源代码.. 这样可以有效地防止误入恶意网站... 在浏览器地址栏输入: view-source:http://...2016-09-20
- <?php require('path.inc.php'); header('content-Type: text/html; charset=utf-8'); $borough_id = intval($_GET['id']); if(!$borough_id){ echo ' ...2016-11-25
- 本文实例讲述了JS基于Mootools实现的个性菜单效果代码。分享给大家供大家参考,具体如下:这里演示基于Mootools做的带动画的垂直型菜单,是一个初学者写的,用来学习Mootools的使用有帮助,下载时请注意要将外部引用的mootools...2015-10-23
- 本文实例讲述了JS实现自定义简单网页软键盘效果。分享给大家供大家参考,具体如下:这是一款自定义的简单点的网页软键盘,没有使用任何控件,仅是为了练习JavaScript编写水平,安全性方面没有过多考虑,有顾虑的可以不用,目的是学...2015-11-08
- 本文实例讲述了JS+CSS实现分类动态选择及移动功能效果代码。分享给大家供大家参考,具体如下:这是一个类似选项卡功能的选择插件,与普通的TAb区别是加入了动画效果,多用于商品类网站,用作商品分类功能,不过其它网站也可以用,...2015-10-21
- php 取除连续空格与换行代码,这些我们都用到str_replace与正则函数 第一种: $content=str_replace("n","",$content); echo $content; 第二种: $content=preg_replac...2016-11-25
- php简单用户登陆程序代码 这些教程很对初学者来讲是很有用的哦,这款就下面这一点点代码了哦。 <center> <p> </p> <p> </p> <form name="form1...2016-11-25
- 公司一些wordpress网站由于下载的插件存在恶意代码,导致整个服务器所有网站PHP文件都存在恶意代码,就写了个简单的脚本清除。恶意代码示例...2015-10-23
- 本文实例讲述了JS实现双击屏幕滚动效果代码。分享给大家供大家参考,具体如下:这里演示双击滚屏效果代码的实现方法,不知道有觉得有用处的没,现在网上还有很多还在用这个特效的呢,代码分享给大家吧。运行效果截图如下:在线演...2015-10-30
- 其实挺简单的就是if(navigator.userAgent.indexOf('UCBrowser') > -1) {alert("uc浏览器");}else{//不是uc浏览器执行的操作}如果想测试某个浏览器的特征可以通过如下方法获取JS获取浏览器信息 浏览器代码名称:navigator...2015-11-08
- 一、日期减去天数等于第二个日期function cc(dd,dadd){//可以加上错误处理var a = new Date(dd)a = a.valueOf()a = a - dadd * 24 * 60 * 60 * 1000a = new Date(a)alert(a.getFullYear() + "年" + (a.getMonth() +...2015-11-08
- 微信支付,即便交了保证金,你还是处理测试阶段,不能正式发布。必须到你通过程序测试提交订单、发货通知等数据到微信的系统中,才能申请发布。然后,因为在微信中是通过JS方式调用API,必须在微信后台设置支付授权目录,而且要到...2014-05-31
- 本文实例讲述了PHP常用的小程序代码段。分享给大家供大家参考,具体如下:1.计算两个时间的相差几天$startdate=strtotime("2009-12-09");$enddate=strtotime("2009-12-05");上面的php时间日期函数strtotime已经把字符串...2015-11-24
- 本文介绍了如何延迟javascript代码的加载,加快网页的访问速度。 当一个网站有很多js代码要加载,js代码放置的位置在一定程度上将会影像网页的加载速度,为了让我们的网页加载速度更快,本文总结了一下几个注意点...2013-10-13
- 小编分享了一段简单的php中文转拼音的实现代码,代码简单易懂,适合初学php的同学参考学习。 代码如下 复制代码 <?phpfunction Pinyin($_String...2017-07-06
php导出csv格式数据并将数字转换成文本的思路以及代码分享
php导出csv格式数据实现:先定义一个字符串 存储内容,例如 $exportdata = '规则111,规则222,审222,规222,服2222,规则1,规则2,规则3,匹配字符,设置时间,有效期'."/n";然后对需要保存csv的数组进行foreach循环,例如复制代...2014-06-07- ecshop商品无限级分类代码 function cat_options($spec_cat_id, $arr) { static $cat_options = array(); if (isset($cat_options[$spec_cat_id]))...2016-11-25
- 这篇文章主要介绍了vue项目,代码提交至码云,iconfont的用法说明,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2020-07-30
- 马上圣诞节了,作为一名程序猿,如何体现自己独特的过节风格,如何在朋友圈发一张专属自己的祝福照片我觉得很有必要,你们说是不是...2015-12-25