0){
unset ($_GET['posted']);
unset ($_GET['pComment']);
unset ($_GET['pName']);
unset ($_GET['pEmail']);
} else {
$queryF = "insert into BlogComments (BlogID, Name, Email, Comment, CommentDate) values ('$id', '$Name', '$Email', '$Comment', NOW())";
$resultF = mysql_query($queryF);
//add user info to user data
$queryF4 = "select Email from BlogData where Email = '$Email'";
$resultF4 = mysql_query($queryF4);
if (mysql_num_rows($resultF4) <= 0){
$queryF3 = "insert into BlogData (Name, Email, IP) values ('$Name', '$Email', '$IP')";
$resultF3 = mysql_query($queryF3);
}
if ($resultF){
unset ($_GET['posted']);
unset ($_GET['pComment']);
unset ($_GET['pName']);
unset ($_GET['pEmail']);
} else {
$form_msg = "Could not add comment to blog. Please contact support@bludomain.com.";
}
}
} else {
$form_msg = "Please fill out all fields.";
}
}
$TextFont = "Arial, Helvetica, sans-serif";
$TextSize = "12px";
?>
|
|
if ($LogoType == "custom"){ ?>
} else { ?>
echo $LogoText ?>
} ?>
|
|
0){
while ($row = mysql_fetch_array($result, MYSQL_BOTH)){
if ($id != ""){
$query_type = "id";
$query2 = "SELECT * FROM Blog WHERE ID = '$id' AND Visible = 'yes' ORDER BY PostDate ASC";
} else {
if ($month!= ""){
$query_type = "month";
$query2 = "SELECT * FROM Blog WHERE DATE_FORMAT(PostDate, '%Y') = '$year' AND DATE_FORMAT(PostDate, '%M') = '$month' AND DATE_FORMAT(PostDate, '%M %d %Y') = '".$row[0]."' ORDER BY PostDate ASC";
} else {
$query2 = "SELECT * FROM Blog WHERE DATE_FORMAT(PostDate, '%M %d %Y') = '".$row[0]."' ORDER BY PostDate ASC";
}
}
$result2 = mysql_query($query2);
while ($row2 = mysql_fetch_array($result2, MYSQL_BOTH)){
if ($query_type == "recent" && $row2['Visible'] == 'yes'){
$post_no++;
}
if ($row2['Visible'] == 'yes' && $post_no <= $Recent){
?>
//DISPLAY DATE
$query3 = "SELECT DATE_FORMAT(PostDate, '%M %D, %Y') FROM Blog WHERE ID = '".$row2['ID']."'";
$result3 = @mysql_query($query3);
$row3 = mysql_fetch_array($result3);
if ($date == ""){
$date = $row3[0];
echo " $date ";
echo "$line ";
} else{
if ($row3[0] != $date){
$date = $row3[0];
echo "$date ";
echo "$line ";
}
}
//DISPLAY HEADER
if ($Header != ""){
echo "".$row2['Header']." ";
}
//DISPLAY CONTENT
$Content = stripslashes(trim($row2['Content']));
$Content = ereg_replace("'", "'", $Content);
$Content = ereg_replace("apos;", "'", $Content);
if ($Content != ""){
echo "".$Content." ";
}
?>
|
//DISPLAY IMAGES
$query4 = "SELECT * FROM BlogImages WHERE BlogID = '".$row2['ID']."' order by OrderNum";
$result4 = @mysql_query($query4);
while($row4 = mysql_fetch_array($result4, MYSQL_BOTH)){
$img_path = $dir.$row4['Picture'];
//$size = getimagesize($img_path);
//$img_w = $size[0];
//$img_h = $size[1];
//if ($img_w >=300){
?>
if ($row4['Description'] != ""){?>
$Description = ereg_replace("'", "'", $row4['Description']);
$Description = ereg_replace("apos;", "'", $Description);
echo $Description;
?>
} else {?>
} ?>
|
}
$queryP = "select * from BlogComments where BlogID = '".$row2['ID']."' order by CommentDate DESC";
$resultP = mysql_query($queryP);
$comment_count = mysql_num_rows($resultP);
?>
|
include("comments_form.php");
?>
|
//DISPLAY RIGHT MENU
if ($first){
$first = false;
$rows = $entry_count *2;
echo
?>
" valign="top" align="right">
echo $LinkButton ?>
echo $Button ?>
if ($id != "" || $month != ""){ ?>
Go To Main Page
} ?>
include("recent.php");
include("archive.php");
?>
|
} ?>
|
} } }
} else {
?>
|
" valign="top" align="right">
echo $LinkButton ?>
echo $Button ?>
|
}?>
|
|
|
echo $TrackingCode ?>