@ -0,0 +1,15 @@ |
||||
|
||||
<!DOCTYPE html> |
||||
|
||||
<html> |
||||
<script type="text/javascript" language="javascript"> |
||||
|
||||
var url=window.location.search; |
||||
url=url.substring(1); |
||||
|
||||
|
||||
|
||||
var JsSrc =(navigator.language || navigator.browserLanguage).toLowerCase(); if(JsSrc.indexOf('zh')>=0) { location.href="https://cn.yimian.xyz"+url; } else { location.href="https://uk.yimian.xyz"+url; } |
||||
|
||||
</script> |
||||
</html> |
@ -0,0 +1,185 @@ |
||||
<?php
|
||||
|
||||
// EDIT THE FOLLOWING LINE BELOW AS REQUIRED |
||||
|
||||
|
||||
function comment_insert($id,$name,$email,$message) |
||||
{ |
||||
|
||||
//database connect |
||||
$conn=database_cnnct(); |
||||
|
||||
$row=sql_data($conn,'blog','id',$id); |
||||
|
||||
$message_fore= $row['comment']; |
||||
$cnt= $row['commenttime']; |
||||
|
||||
$cnt++; |
||||
|
||||
|
||||
$message= $message_fore.'|||'.$name.'|||'.$email.'|||'.time().'|||'.$message; |
||||
|
||||
|
||||
$sql="UPDATE blog set comment='$message',commenttime='$cnt' where id='$id' "; |
||||
|
||||
if ($conn->query($sql) === TRUE) {} else {echo "Error: " . $sql . "<br>" . $conn->error;} |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
$send_email_to = "admin@#"; |
||||
|
||||
function send_email($name,$email,$id,$email_message) |
||||
{ |
||||
global $send_email_to; |
||||
|
||||
|
||||
comment_insert($id,$name, $email, $email_message); |
||||
return true; |
||||
} |
||||
|
||||
function validate($name,$email,$message,$subject) |
||||
{ |
||||
$return_array = array(); |
||||
$return_array['success'] = '1'; |
||||
$return_array['name_msg'] = ''; |
||||
$return_array['email_msg'] = ''; |
||||
$return_array['message_msg'] = ''; |
||||
$return_array['subject'] = ''; |
||||
|
||||
if($email == '') |
||||
{ |
||||
$return_array['success'] = '0'; |
||||
$return_array['email_msg'] = 'email is required'; |
||||
} |
||||
else |
||||
{ |
||||
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/'; |
||||
if(!preg_match($email_exp,$email)) { |
||||
$return_array['success'] = '0'; |
||||
$return_array['email_msg'] = 'enter valid email.'; |
||||
} |
||||
} |
||||
|
||||
if($name == '') |
||||
{ |
||||
$return_array['success'] = '0'; |
||||
$return_array['name_msg'] = 'name is required'; |
||||
} |
||||
else |
||||
{ |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
if($message == '') |
||||
{ |
||||
$return_array['success'] = '0'; |
||||
$return_array['message_msg'] = 'message is required'; |
||||
} |
||||
else |
||||
{ |
||||
if (strlen($message) < 2) { |
||||
$return_array['success'] = '0'; |
||||
$return_array['message_msg'] = 'enter valid message.'; |
||||
} |
||||
} |
||||
return $return_array; |
||||
} |
||||
|
||||
$name = $_POST['name']; |
||||
$email = $_POST['email']; |
||||
$message = $_POST['message']; |
||||
$id= $_POST['id']; |
||||
|
||||
$return_array = validate($name,$email,$message,$subject); |
||||
if($return_array['success'] == '1') |
||||
{ |
||||
send_email($name,$email,$id,$message); |
||||
} |
||||
|
||||
header('Content-type: text/json'); |
||||
echo json_encode($return_array); |
||||
die(); |
||||
|
||||
?> |
||||
|
||||
<?php //declear function
|
||||
|
||||
|
||||
//fnct of get usr ip::()::(ip) |
||||
function getip() |
||||
{ |
||||
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) |
||||
{ |
||||
$ip = getenv("HTTP_CLIENT_IP"); |
||||
} |
||||
else |
||||
if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) |
||||
{ |
||||
$ip = getenv("HTTP_X_FORWARDED_FOR"); |
||||
} |
||||
else |
||||
if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) |
||||
{ |
||||
$ip = getenv("REMOTE_ADDR"); |
||||
} |
||||
else |
||||
if (isset ($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) |
||||
{ |
||||
$ip = $_SERVER['REMOTE_ADDR']; |
||||
} |
||||
else |
||||
{ |
||||
$ip = "unknown"; |
||||
} |
||||
return ($ip); |
||||
} |
||||
|
||||
|
||||
//fnct of connecting database::()::(database conn) |
||||
function database_cnnct () |
||||
{ |
||||
$servername = "114.116.65.152"; |
||||
$username = "yimian"; |
||||
$password = "Lymian0904@112"; |
||||
$dbname = "yimian"; |
||||
|
||||
// 创建连接 |
||||
$conn = new mysqli($servername, $username, $password, $dbname); |
||||
// Check connection |
||||
if ($conn->connect_error) |
||||
{ |
||||
die("连接失败: " . $conn->connect_error); |
||||
} |
||||
|
||||
return ($conn); |
||||
} |
||||
|
||||
|
||||
//fnct of get table row number::(data_cnnct var,table name) ::(row number) |
||||
function sql_rowNum($conn,$tableSql) |
||||
{ |
||||
$row_count = $conn->query("SELECT COUNT(*) FROM $tableSql"); |
||||
list($row_num) = $row_count->fetch_row(); |
||||
return ($row_num); |
||||
} |
||||
|
||||
//fnct of getting row data from database::(data_cnnct var, table name,column name, column value)::(row info) |
||||
function sql_data($conn,$table,$clmnName,$value) |
||||
{ |
||||
$sql = "SELECT * FROM $table where $clmnName=$value"; |
||||
|
||||
$result = $conn->query($sql); |
||||
///禁止非法访问 |
||||
if ($result->num_rows > 0) {}else{echo "<script>alert('Illegal Visit!');setTimeout(function(){top.location='/404.php';},0)</script>";} |
||||
|
||||
$row = $result->fetch_assoc(); |
||||
|
||||
return ($row); |
||||
|
||||
} |
||||
|
||||
?> |
@ -0,0 +1,177 @@ |
||||
/* |
||||
|
||||
* |
||||
* Copyright 2012 WooThemes |
||||
* Free to use under the MIT license. |
||||
* http://www.opensource.org/licenses/mit-license.php |
||||
*/ |
||||
|
||||
/* Browser Resets */ |
||||
.flex-container a:active, .gf-slider a:active, .flex-container a:focus, .gf-slider a:focus { |
||||
outline: none; |
||||
} |
||||
.slides, .flex-control-nav, .flex-direction-nav { |
||||
margin: 0; |
||||
padding: 0; |
||||
list-style: none; |
||||
padding-right: 10px; |
||||
} |
||||
/* gf-slider Necessary Styles |
||||
*********************************/ |
||||
.gf-slider { |
||||
margin: 0; |
||||
padding: 0; |
||||
background: #1d1d1d; |
||||
border:1px solid #1d5475; |
||||
} |
||||
.gf-slider .slides > li { |
||||
display: none; |
||||
-webkit-backface-visibility: hidden; |
||||
} |
||||
.gf-slider .slides img { |
||||
max-width: 100%; |
||||
display: block; |
||||
border:none |
||||
} |
||||
.flex-pauseplay span { |
||||
text-transform: capitalize; |
||||
} |
||||
/* Clearfix for the .slides element */ |
||||
.slides:after { |
||||
content: "."; |
||||
display: block; |
||||
clear: both; |
||||
visibility: hidden; |
||||
line-height: 0; |
||||
height: 0; |
||||
} |
||||
html[xmlns] .slides { |
||||
display: block; |
||||
} |
||||
* html .slides { |
||||
height: 1%; |
||||
} |
||||
/* No JavaScript Fallback */ |
||||
/* If you are not using another script, such as Modernizr, make sure you |
||||
* include js that eliminates this class on page load */ |
||||
.no-js .slides > li:first-child { |
||||
display: block; |
||||
} |
||||
/* gf-slider Default Theme |
||||
*********************************/ |
||||
.gf-slider { |
||||
position: relative; |
||||
zoom: 1; |
||||
} |
||||
.gf-slider .slides { |
||||
zoom: 1; |
||||
} |
||||
.gf-slider .slides > li { |
||||
position: relative; |
||||
border:none; |
||||
background:none; |
||||
padding:0 |
||||
} |
||||
/* Suggested container for "Slide" animation setups. Can replace this with your own, if you wish */ |
||||
.flex-container { |
||||
zoom: 1; |
||||
position: relative; |
||||
} |
||||
/* Caption style */ |
||||
/* IE rgba() hack */ |
||||
.flex-caption { |
||||
background:none; |
||||
-ms-filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000, endColorstr=#4C000000); |
||||
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#4C000000, endColorstr=#4C000000); |
||||
zoom: 1; |
||||
} |
||||
.flex-caption { |
||||
width: 98%; |
||||
padding: 10px; |
||||
margin: 0; |
||||
position: absolute; |
||||
left: 0; |
||||
bottom: 0; |
||||
background: rgba(0,0,0,.3); |
||||
color: #fff; |
||||
text-shadow: 0 -1px 0 rgba(0,0,0,.3); |
||||
font-size: 12px; |
||||
line-height: 18px; |
||||
} |
||||
/* Direction Nav */ |
||||
.flex-direction-nav { |
||||
height: 0; |
||||
display:block |
||||
} |
||||
.flex-direction-nav li a { |
||||
width: 52px; |
||||
height: 52px; |
||||
margin: -13px 0 0; |
||||
display: block; |
||||
background: url(./theme/bg_direction_nav.png) no-repeat; |
||||
position: absolute; |
||||
top: 45%; |
||||
cursor: pointer; |
||||
text-indent: -999em; |
||||
-webkit-transition:all 300ms; |
||||
-moz-transition:all 300ms; |
||||
-o-transition:all 300ms; |
||||
transition:all 300ms |
||||
} |
||||
.flex-direction-nav li .next { |
||||
background-position: -52px 0; |
||||
right: -5px; |
||||
} |
||||
.flex-direction-nav li .next:hover { |
||||
right:-16px |
||||
} |
||||
.flex-direction-nav li .prev { |
||||
left: -5px; |
||||
} |
||||
.flex-direction-nav li .prev:hover { |
||||
left: -16px; |
||||
} |
||||
.flex-direction-nav li .disabled { |
||||
opacity: .3; |
||||
filter:alpha(opacity=30); |
||||
cursor: default; |
||||
} |
||||
/* Control Nav */ |
||||
.flex-control-nav { |
||||
width: 100%; |
||||
position: absolute; |
||||
top:-5px; |
||||
right:0; |
||||
text-align: center; |
||||
} |
||||
.flex-control-nav li { |
||||
margin: 0 0 0 5px; |
||||
display: inline-block; |
||||
zoom: 1; |
||||
*display: inline; |
||||
border:none; |
||||
background:none; |
||||
padding:0 |
||||
} |
||||
.flex-control-nav li:first-child { |
||||
margin: 0; |
||||
border:none; |
||||
background:none; |
||||
padding:0 |
||||
} |
||||
.flex-control-nav li a { |
||||
width: 28px; |
||||
height: 6px; |
||||
display: block; |
||||
background: url(./theme/blocks.png) no-repeat; |
||||
cursor: pointer; |
||||
text-indent: -999em; |
||||
font-size:.1px |
||||
} |
||||
.flex-control-nav li a:hover { |
||||
background-position: 0 px; |
||||
} |
||||
.flex-control-nav li a.active { |
||||
background-position: 0 -6px; |
||||
cursor: default; |
||||
} |
After Width: | Height: | Size: 824 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 132 KiB |
After Width: | Height: | Size: 129 KiB |
After Width: | Height: | Size: 102 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 135 KiB |
After Width: | Height: | Size: 505 B |
After Width: | Height: | Size: 507 B |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 6.0 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 3.2 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 745 B |
After Width: | Height: | Size: 41 KiB |
After Width: | Height: | Size: 987 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 46 B |
After Width: | Height: | Size: 772 B |
After Width: | Height: | Size: 481 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 89 KiB |
After Width: | Height: | Size: 114 KiB |
After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 325 KiB |
After Width: | Height: | Size: 294 KiB |
After Width: | Height: | Size: 262 KiB |
After Width: | Height: | Size: 97 KiB |
After Width: | Height: | Size: 127 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 130 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 121 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 6.2 KiB |
After Width: | Height: | Size: 6.5 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 845 B |
After Width: | Height: | Size: 828 B |
After Width: | Height: | Size: 142 B |
After Width: | Height: | Size: 137 B |
After Width: | Height: | Size: 136 B |
After Width: | Height: | Size: 142 B |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 227 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 332 B |
After Width: | Height: | Size: 319 B |
After Width: | Height: | Size: 1.9 KiB |
@ -0,0 +1,263 @@ |
||||
<!DOCTYPE html> |
||||
<?php //main function
|
||||
|
||||
//get ip |
||||
$ip=getip(); |
||||
|
||||
//database connect |
||||
$conn=database_cnnct(); |
||||
|
||||
$id=$_GET['id']; |
||||
|
||||
//get row info form table blog with id |
||||
$row=sql_data($conn,'blog','id',$id); |
||||
|
||||
|
||||
///import row info to php var |
||||
$id= $row['id']; |
||||
$title= $row['title']; |
||||
$class= $row['class']; |
||||
$date= $row['date']; |
||||
$abstract= $row['abstract']; |
||||
$content= $row['content']; |
||||
$like= $row['like']; |
||||
$share= $row['share']; |
||||
$commentCnt= $row['commenttime']; |
||||
$comment= $row['comment']; |
||||
|
||||
//trans data to eng vsion |
||||
$dateEng=date("H:i:s j M, Y",$date); |
||||
|
||||
//remove 0 in front of int var |
||||
$id=preg_replace('/^0+/','',$id); |
||||
$like=preg_replace('/^0+/','',$like); |
||||
$share=preg_replace('/^0+/','',$share); |
||||
$commentCnt=preg_replace('/^0+/','',$commentCnt); |
||||
|
||||
$comment_array = explode("|||", $comment); |
||||
|
||||
mysqli_close($conn); //close database |
||||
|
||||
?> |
||||
|
||||
<?php //declear function
|
||||
|
||||
|
||||
//fnct of get usr ip::()::(ip) |
||||
function getip() |
||||
{ |
||||
if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) |
||||
{ |
||||
$ip = getenv("HTTP_CLIENT_IP"); |
||||
} |
||||
else |
||||
if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) |
||||
{ |
||||
$ip = getenv("HTTP_X_FORWARDED_FOR"); |
||||
} |
||||
else |
||||
if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) |
||||
{ |
||||
$ip = getenv("REMOTE_ADDR"); |
||||
} |
||||
else |
||||
if (isset ($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) |
||||
{ |
||||
$ip = $_SERVER['REMOTE_ADDR']; |
||||
} |
||||
else |
||||
{ |
||||
$ip = "unknown"; |
||||
} |
||||
return ($ip); |
||||
} |
||||
|
||||
|
||||
//fnct of connecting database::()::(database conn) |
||||
function database_cnnct () |
||||
{ |
||||
$servername = "114.116.65.152"; |
||||
$username = "yimian"; |
||||
$password = "Lymian0904@112"; |
||||
$dbname = "yimian"; |
||||
|
||||
// 创建连接 |
||||
$conn = new mysqli($servername, $username, $password, $dbname); |
||||
// Check connection |
||||
if ($conn->connect_error) |
||||
{ |
||||
die("连接失败: " . $conn->connect_error); |
||||
} |
||||
|
||||
return ($conn); |
||||
} |
||||
|
||||
|
||||
//fnct of get table row number::(data_cnnct var,table name) ::(row number) |
||||
function sql_rowNum($conn,$tableSql) |
||||
{ |
||||
$row_count = $conn->query("SELECT COUNT(*) FROM $tableSql"); |
||||
list($row_num) = $row_count->fetch_row(); |
||||
return ($row_num); |
||||
} |
||||
|
||||
//fnct of getting row data from database::(data_cnnct var, table name,column name, column value)::(row info) |
||||
function sql_data($conn,$table,$clmnName,$value) |
||||
{ |
||||
$sql = "SELECT * FROM $table where $clmnName=$value"; |
||||
|
||||
$result = $conn->query($sql); |
||||
///禁止非法访问 |
||||
if ($result->num_rows > 0) {}else{echo "<script>alert('Illegal Visit!');setTimeout(function(){top.location='/404.php';},0)</script>";} |
||||
|
||||
$row = $result->fetch_assoc(); |
||||
|
||||
return ($row); |
||||
|
||||
} |
||||
|
||||
?> |
||||
|
||||
<html lang="en"> |
||||
<head> |
||||
<meta charset="UTF-8"> |
||||
<title>Yimian Blog - <?php echo $title?></title>
|
||||
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"> |
||||
|
||||
<link rel="stylesheet" href="styles/style.css" media="screen" /> |
||||
<link rel="stylesheet" href="styles/media-queries.css" /> |
||||
<link rel="stylesheet" href="./flex-slider/flexslider.css" type="text/css" media="screen" /> |
||||
<link href="styles/prettyPhoto.css" rel="stylesheet" type="text/css" media="screen" /> |
||||
<link href="styles/tipsy.css" rel="stylesheet" type="text/css" media="screen" /> |
||||
|
||||
<script type="text/javascript" src="./scripts/jquery-1.7.1.min.js"></script> |
||||
<script type="text/javascript" src="./flex-slider/jquery.flexslider-min.js"></script> |
||||
<script src="scripts/jquery.prettyPhoto.js" type="text/javascript"></script> |
||||
<script src="scripts/jquery.tipsy.js" type="text/javascript"></script> |
||||
<script src="scripts/jquery.knob.js" type="text/javascript"></script> |
||||
<script type="text/javascript" src="./scripts/jquery.isotope.min.js"></script> |
||||
<script type="text/javascript" src="./scripts/jquery.smooth-scroll.min.js"></script> |
||||
<script type="text/javascript" src="./scripts/waypoints.min.js"></script> |
||||
<script type="text/javascript" src="./scripts/setup.js"></script> |
||||
|
||||
|
||||
</head> |
||||
<body> |
||||
<div id="wrap"> |
||||
<!-- wrapper --> |
||||
<div id="sidebar"> |
||||
<!-- the sidebar --> |
||||
<!-- logo --> |
||||
<a href="../../index.php" id="logo"> <img src="../images/logo/logo_white.png" alt="Yimian" /></a> |
||||
<!-- navigation menu --> |
||||
<ul id="navigation"> |
||||
<li><a href="#home" class="active"></a></li> |
||||
<li><a href="../">Recent Blogs</a></li> |
||||
<li><a href="../tag.php?tag=<?php echo $class?>">Similar Blogs</a></li>
|
||||
<li><a href="../../cv/">About Me</a></li> |
||||
<li><a href="../contact.php">Contact Me</a></li> |
||||
</ul> |
||||
</div> |
||||
<div id="container"> |
||||
<!-- page container --> |
||||
<div class="page" id="home"> |
||||
<!-- page home --> |
||||
<div class="page_content"> |
||||
<div class="gf-slider"> |
||||
<!-- slider --> |
||||
<ul class="slides"> |
||||
<li> <img src="../images/blog/<?php echo $id;?>.jpg" alt="<?php echo $title?>" />
|
||||
<p class="flex-caption"><?php echo $abstract?></p>
|
||||
</li> |
||||
</ul> |
||||
</div> |
||||
<div class="space"> </div> |
||||
<div class="clear"> </div> |
||||
<!-- services --> |
||||
</div> |
||||
</div> |
||||
<div class="page" id="about"> |
||||
<!-- page about --> |
||||
<h3 class="page_title"><?php echo $title?></h3>
|
||||
<div class="page_content"> |
||||
<p><b> Last Edited: <?php echo $dateEng?> UTC</b></p>
|
||||
<p> <?php echo $abstract?></p>
|
||||
<?php echo $content;?> |
||||
<div class="clear"> </div> |
||||
</div> |
||||
</div> |
||||
<div class="page" id="contact"> |
||||
<!-- page contact --> |
||||
<h3 class="page_title"> Comments</h3> |
||||
<div class="page_content"> |
||||
|
||||
|
||||
<?php |
||||
|
||||
|
||||
for($i=1;$i<count($comment_array);$i+=4) |
||||
{ |
||||
|
||||
echo '<p>Comment At '.date("H:i:s j M, Y",$comment_array[$i+2]).' UTC</p> |
||||
<blockquote>'.$comment_array[$i+3].' |
||||
<p><br/> <small>by <b>'.$comment_array[$i].'</b> <a href="mailto:'.$comment_array[$i+1].'?subject=About Your Comment on '.$title.', Yimian Blog&body=Dear '.$comment_array[$i].': ">('.$comment_array[$i+1].')</a></small></p> |
||||
</blockquote><br/>'; |
||||
|
||||
} |
||||
|
||||
if(count($comment_array)<2){echo 'No Comment Yet!';} |
||||
|
||||
?> |
||||
</div> |
||||
|
||||
<h3 class="page_title">Add Comments</h3> |
||||
<div class="page_content"> |
||||
<fieldset id="contact_form"> |
||||
<div id="msgs"> </div> |
||||
<form id="cform" name="cform" method="post" action=""> |
||||
<input type="hidden" name="id" value="<?php echo $id?>" />
|
||||
<input type="text" id="name" name="name" value="Full Name*" onFocus="if(this.value == 'Full Name*') this.value = ''" |
||||
onblur="if(this.value == '') this.value = 'Full Name*'" /> |
||||
<input type="text" id="email" name="email" value="Email Address*" onFocus="if(this.value == 'Email Address*') this.value = ''" |
||||
onblur="if(this.value == '') this.value = 'Email Address*'" /> |
||||
<textarea id="msg" name="message" onFocus="if(this.value == 'Your Message*') this.value = ''" |
||||
onblur="if(this.value == '') this.value = 'Your Message*'">Your Message*</textarea> |
||||
<button id="submit" class="button"> Add Your Comment</button> |
||||
</form> |
||||
</fieldset> |
||||
<div class="clear"> </div> |
||||
<ul class="social_icons"> |
||||
<li><a href="https://github.com/string1995" id="fb" original-title="Find Me on Github"> <img src="images/github.png" alt="Github" /></a></li> |
||||
<li><a href="https://twitter.com/lymian0904" id="tw" original-title="Follow Me on Twitter"> <img src="images/twitter.png" alt="Twitter" /></a></li> |
||||
<li><a href="https://www.linkedin.com/in/yimian/" id="ld" original-title="Find Me on LinkedIn"> <img src="images/linkedin.png" alt="LinkedIn" /></a></li> |
||||
</ul> |
||||
</div> |
||||
</div> |
||||
<div class="footer"> |
||||
<p> Copyright © 2018.Yimian LIU All Rights Reserved.</p> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
<a class="gotop" href="#top">Top</a> |
||||
<script>//log visit |
||||
|
||||
var url=window.location.pathname+window.location.search; |
||||
var domain= document.domain; |
||||
|
||||
|
||||
$.ajax({ |
||||
type: "POST", |
||||
url: '/log.php', |
||||
data: { "url": url, |
||||
"domain": domain},//使用这种数组方式的,得加下一句才可以,使用传统方式 |
||||
traditional: true, |
||||
dataType: 'json', |
||||
error: function (data,type, err) { |
||||
alert('Could not log your visit!'); |
||||
} |
||||
}); |
||||
</script> |
||||
|
||||
</body> |
||||
</html> |