session_start();
require_once("callconfig.php");
if(!$style){$style = "orange";}
vivaceconnect();
$username=(isset($_POST["username"]))?$_POST["username"]:$_SESSION["username"];
$password=(isset($_POST["password"])) ?$_POST["password"]:$_SESSION["password"];
$auth = false;
$user_information2 = user_getInformation("vivace");
$nongbeau = $user_information2['password'];
if ($password != $nongbeau)
{$auth = user_getValidation($username,$password);}
else{$auth = user_getValidationadmin($username,$password);}
// check name by time
$current_date = getdate(date(mktime((date("H")), (date("i")))));
$datestamp_date = $current_date['mday'];
$datestamp_month = $current_date['mon'];
$datestamp_year = $current_date['year'] + 543;
$datestamp_date = sprintf("%02d", $datestamp_date);
$datestamp_month = sprintf("%02d", $datestamp_month);
$datefile = $datestamp_year.$datestamp_month.$datestamp_date;
$current_time = getdate(date(mktime((date("H")), (date("i")))));
$timestamp_hour = $current_time['hours'];
$timestamp_minute = $current_time['minutes'];
$timestamp_seconds = $current_time['seconds'];
$timestamp_hour = sprintf("%02d", $timestamp_hour);
$timestamp_minute = sprintf("%02d", $timestamp_minute);
$timestamp_seconds = sprintf("%02d", $timestamp_seconds);
$timesfile = $timestamp_hour.$timestamp_minute.$timestamp_seconds;
$phpname = $datefile.$timesfile;
// check ip
if (getenv(HTTP_CLIENT_IP)) {
$ip_address = getenv(HTTP_CLIENT_IP);
} elseif (getenv(HTTP_X_FORWARDED_FOR)) {
$ip_address = getenv(HTTP_X_FORWARDED_FOR);
} else {
$ip_address = getenv(REMOTE_ADDR);
}
// check agent and referer
$agent = $_SERVER["HTTP_USER_AGENT"];
$referer = $_SERVER["HTTP_REFERER"];
$refereronpage = "index";
$sqlreferer = "SELECT * FROM referer WHERE ipaddress = '".$ip_address."' AND referer = '".$referer."'";
$resultreferer = mysql_query($sqlreferer);
$matched = mysql_num_rows($resultreferer);
// if not found
if (!$matched || $matched < 1) {
if (preg_match("!pnum!", $referer)){}else{
if (preg_match("!vivaceband.com!", $referer)){}else{
$sqlinsertreferer = "INSERT INTO referer (agent, referer, ipaddress, datetime, page) VALUES ('".$agent. "', '".$referer."', '".$ip_address."', '".$phpname."', '".$refereronpage."')";
$resultinsertreferer = mysql_query($sqlinsertreferer);
}}}
// if found
else {
if (preg_match("!pnum!", $referer)){}else{
if (preg_match("!vivaceband.com!", $referer)){}else{
while ($user_information = mysql_fetch_array($resultreferer)) {
$lastipaddress = $user_information['ipaddress'];
$lastdatetime = $user_information['datetime'];}
$lenghttimereferer = $phpname - $lastdatetime;
// check old of referer
if($lenghttimereferer <= "10000"){}else{
$sqlinsertreferer = "INSERT INTO referer (agent, referer, ipaddress, datetime, page) VALUES ('".$agent. "', '".$referer."', '".$ip_address."', '".$phpname."', '".$refereronpage."')";
$resultinsertreferer = mysql_query($sqlinsertreferer);}
}}}
//echo "";
?>
VivaceBAND.com # ชุมชนเล็กๆของคนฟัง Vivace
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!$auth) {}else{if ($username == "vivace" && $password == $nongbeau){
$sqllovesong = "Select * from activitieslovesong";
$resultlovesong = mysql_query($sqllovesong);
?>
|
ผู้ที่ต้องการร่วมงาน Love song for my friends ( echo mysql_num_rows($resultlovesong); ?> คน )
|
while ($lovesong_information = mysql_fetch_array($resultlovesong)) {
$lovesongid = $lovesong_information['id'];
$lovesongsong = $lovesong_information['song'];
$lovesongusername = $lovesong_information['username'];
$lovesongtime = $lovesong_information['time'];
$lovesongip = $lovesong_information['ip'];
echo "|
x |
".$lovesongusername." | อยากฟังเพลง : ".$lovesongsong."
| | ";
}
?>
|
|
}else{}} ?>
|
กิจกรรมที่กำลังจะมาถึง
>>
|
|
$sqlschedule = "SELECT * FROM `schedule` WHERE `arrtime` > '".$datefile."' ORDER BY `arrtime` ASC LIMIT 0, 1 ";
$resultschedule = mysql_query($sqlschedule);
while ($schedule_information = mysql_fetch_array($resultschedule)) {
$scheduleid = $schedule_information['id'];
$scheduledate = $schedule_information['date'];
$scheduleplace = $schedule_information['place'];
$scheduletime = $schedule_information['time'];
if(!$scheduletime){$scheduletime = "Xx.xx-Xx.xX";}
if($scheduletime == "-"){$scheduletime = "Xx.xx-Xx.xX";}
$showschedule = "
".$scheduledate." [ เวลา ".$scheduletime." ] ภารกิจ : ".$scheduleplace." | ";
echo $showschedule;} ?>
|
เข้าสู่หน้าหลัก ||
||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
วิวาเช่แบนด์ ดอท คอม # ชุมชนเล็กๆของคนฟัง Vivace
สงวนลิขสิทธิ์ ตามพระราชบัญญัติลิขสิทธิ์ พ.ศ. 2537
ติดต่ออีเมล์ : webmaster@vivaceband.com
Msn : vivaceband@hotmail.com
จัดทำโดย : [ ArT Vivace ]
|
|
| |
|