|
|
|
ไฟล์รันบน localhost ปกติแต่พอนำขึ้น host จริงข้อมูลขึ้นไม่ครบครับ ช่วยดูที |
|
|
|
|
|
|
|
Code (PHP)
<?php
session_start();
include "admin/connect.php";
function cutStr($str, $maxChars='', $holder=''){
if (strlen($str) > $maxChars ){
$str = iconv_substr($str, 0, $maxChars,"UTF-8") . $holder;
}
return $str;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta keyword="haitian ,haitian thai ,haitian thailand ,spi ,spintermach ,sp intermach ,injection mold" />
<meta description="sp intermach official sales and partner of haitian" />
<!--<meta http-equiv="refresh" content="30" />-->
<meta http-equiv="content-type" content="text/html;" charset="windows-1252" />
<link rel="shortcut icon" href="images/favicon.ico">
<link href="style.css" type="text/css" rel="stylesheet" />
<link href="flexslider.css" type="text/css" rel="stylesheet" media="screen" />
<title>SP Intermach</title>
<!-- Facebook Plugin -->
<div id="fb-root"></div>
<script src="js/modernizr.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery.js"></script>
<script type="text/javascript" language="javascript" src="js/jquery-1.6.1.min.js"></script>
<script language="javascript">(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
var xmlhttp
function Inint_AJAX () {
var xmlhttp = false;
try {
xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
xmlhttp = false;
}
}
if(!xmlhttp && document.createElement){
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function startCallback() {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
document.getElementById("time").innerHTML=xmlhttp.responseText; //รับค่ากลับมา
delete xmlhttp;
setTimeout("doStart()", 1000);
}
}
}
function doStart() {
xmlhttp = Inint_AJAX();
var url = "time.php";
xmlhttp.open("GET", url, true);
xmlhttp.onreadystatechange = startCallback;
xmlhttp.send(null);
}
</script>
<!-- End Facebook Plugin -->
</head>
<body>
<div id="wrapper">
<div id="head_main"> <!-- Main Header -->
<? include "header.php"; ?>
</div> <!-- End Main Header -->
<div id="main"> <!-- Main -->
<div class="container">
<div class="m_center"> <!-- m_center -->
<!-- block Logo & Ads Banner -->
<div id="upper">
<? include "main_ads.php"; ?>
</div><br />
<!-- jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.min.js">\x3C/script>')</script>
<!-- FlexSlider -->
<script defer src="js/jquery.flexslider.js"></script>
<script type="text/javascript">
$(function(){
SyntaxHighlighter.all();
});
$(window).load(function(){
$('.flexslider').flexslider({
animation: "slide",
start: function(slider){
$('body').removeClass('loading');
}
});
});
</script>
<!-- Content -->
<div id="main_content" class="block">
<div id="type_title">
<div class="column">
<?
if($_SESSION["lang"]==en)
{
?>
Stories Today ! <? echo date("d-m-y"); ?>
<?
}
else
{
?>
เรื่องเด่น วันนี้ ! <? echo date("d-m-y"); ?>
<?
}
?>
</div>
</div>
<div class="title_today">
<div class="block_inside">
<?
if($_SESSION["lang"]!=th) //ตรงส่วนนี้ครับที่ข้อมูลไม่ขึ้น เลยทำให้ข้อมูลด้านล่างลงไปไม่ขึ้นเลย
{
include "title_eng.php";
}
else
{
include "title_th.php";
}
/*<div class="block_inside">
<?
$sql_query = "SELECT * FROM sp_title WHERE active = 1 ORDER BY date_post DESC LIMIT 0,5";
$sq = select($sql_query);
$qs = $sq[0];
?>
<div class="image_block">
<img src="images/title/<?=$qs[image]?>" width="300" height="200"/>
</div>
<div class="text_block">
<h2 style="text-decoration:underline; color:black;"><?=stripcslashes($qs[name_th])?></h2>
<small>on <?=$qs[date_post]?></small>
<?
echo cutStr($qs[detail_th], 316, '....');
?>
<br />
<a href="" class="button">Read More</a>
</div>
</div> */
?>
</div>
</div>
</div> <!-- end content -->
<div class="line4"></div>
<div class="sub_title">
<div class="left">
<a href="http://www.haitian.com"><img src="images/Haitian.gif"/></a>
<div id="main_product">
<div class="head_product">
<div class="line3"></div>
<!-- Check Stock Realtime -->
<div class="content">
<div class="date">
<div id="time"></div>
<script language="javascript">doStart();</script>
</div>
<? include "warehouse/check_stock_realtime.php"; ?>
</div>
<!-- END Check Stock Realtime -->
</div>
</div>
<div id="main_fb">
<div class="head_fb">
<div class="line3"></div>
<div class="content">
<div class="fb-like-box" data-href="http://www.facebook.com/sp-intermach" data-width="300" data-height="300" data-show-faces="true" data-stream="false" data-header="false"></div>
</div>
</div>
</div>
<!--<div id="main_youtube">
<div class="head_youtube">
<div class="line3"></div>
<div class="content">
<iframe width="300" height="300" src="http://www.youtube.com/embed/oLqam1jF-1Y" frameborder="0" allowfullscreen></iframe>
</div>
</div>
</div>-->
</div>
<!-- Main Sub Content -->
<div class="right">
<?
if($_SESSION["lang"]!=th)
{
include "subtitle_eng.php";
}
else
{
include "subtitle_th.php";
}
/*<div id="type_title">
<div class="column">
More Stories
</div>
</div>
<?
$i = 0;
while($i<count($sq))
{
$rs = $sq[$i];
$i++;
?>
<div class="container">
<div class="pic_img">
<img src="images/title/<?=$rs[image]?>" width="140" height="100" />
</div>
<div class="content_sub">
<div class="text_sub">
<h3 style="text-decoration:underline; color:black;"><?=stripcslashes($rs[name_th])?></h3>
<small>on <?=$rs[date_post]?></small>
<p><? echo cutStr(stripcslashes($qs[detail_th]), 119, '....');?></p>
<a href="" class="button">Read More</a>
</div>
</div>
</div>
<div class="line2"></div>
<?
}
?>
<a href="" class="button_all">Read All</a>*/
?>
</div><!-- end Sub Content -->
</div><!-- end sub_title -->
</div> <!-- end m_center -->
</div>
</div>
<!-- End Main -->
<div id="footer"> <!-- Footer -->
<? include "footer.html"; ?>
</div> <!-- End Footer -->
</div>
</body>
</html>
Code (PHP)
<?
if($_SESSION["lang"]!=th)
{
include "title_eng.php";
}
else
{
include "title_th.php";
}
?>
น่าจะเป็นที่ตัวนี่มั้งครับ ผมว่ามันก็ถูกหมดแล้วนะ
Tag : PHP, MySQL
|
|
|
|
|
|
Date :
2013-05-22 22:52:19 |
By :
golden014 |
View :
1007 |
Reply :
5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ตรง
Code (PHP)
echo cutStr($qs["detail_th"], 219, '....');
'...' น่าจะมี 3จุดนะครับ
(แต่ก็ไม่น่าจะเกี่ยว)
|
|
|
|
|
Date :
2013-05-26 13:13:56 |
By :
turaw |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|