ແຈ້ງການ

ວາລະສານ

ປະຕິທິນ

"1","Mon"=>"2","Tue"=>"3","Wed"=>"4","Thu"=>"5","Fri"=>"6","Sat"=>"7"); $first_day=date("D",mktime(0,0,1,intval(date("m")),1,date("Y"))); $start_td=$day_now[$first_day]-1; $num_day=date("t"); $num_day2=($num_day+$start_td); $num_day3=(7*ceil($num_day2/7)); ?>

S M T W T F S
>=1 && $i-$start_td <=$num_day)?$i-$start_td:" "?>

ຈຳນວນຜູ້ເຂົ້າຊົມ

$record) { $record = $day; $record_time = $counter_time; } // speichern und aufräumen und anzahl der online leute bestimmten $online = 1; // write counter data (avoid resetting) if ($all > 1) { $fp = fopen($counter_filename,"w+"); if ($fp) { //flock($fp, LOCK_EX); $canWrite = false; while (!$canWrite) $canWrite = flock($fp, LOCK_EX); $add_line1 = date("z") . ":" . $day . "||" . (date("z")-1) . ":" . $yesterday . "||" . date("W") . ":" . $week . "||" . date("n") . ":" . $month . "||" . date("Y") . ":" . $year . "||" . $all . "||" . $record . "||" . $record_time . "\n"; fwrite($fp, $add_line1); $length = sizeof($continue_block); for ($i = 0; $i < $length; $i++) { fwrite($fp, $continue_block[$i] . "\n"); $online++; } fwrite($fp, $counter_ip . "||" . $counter_time . "\n"); flock($fp, LOCK_UN); fclose($fp); } } else { $online = 1; } } else { // show data when error (of course these values are wrong, but it prevents error messages and prevent a counter reset) // get counter values $yesterday = 0; $day = $week = $month = $year = $all = $record = 1; $record_time = $counter_time; $online = 1; } } else { // get data for reading only if (sizeof($c_file) > 0) list($day_arr, $yesterday_arr, $week_arr, $month_arr, $year_arr, $all, $record, $record_time) = explode("||", $c_file[0]); else list($day_arr, $yesterday_arr, $week_arr, $month_arr, $year_arr, $all, $record, $record_time) = explode("||", date("z") . ":1||" . (date("z")-1) . ":0||" . date("W") . ":1||" . date("n") . ":1||" . date("Y") . ":1||1||1||" . $counter_time); // day $day_data = explode(":", $day_arr); $day = $day_data[1]; // yesterday $yesterday_data = explode(":", $yesterday_arr); $yesterday = $yesterday_data[1]; // week $week_data = explode(":", $week_arr); $week = $week_data[1]; // month $month_data = explode(":", $month_arr); $month = $month_data[1]; // year $year_data = explode(":", $year_arr); $year = $year_data[1]; $record_time = trim($record_time); $online = sizeof($c_file) - 1; if ($online <= 0) $online = 1; } } else { // create counter file $add_line = date("z") . ":1||" . (date("z")-1) . ":0||" . date("W") . ":1||" . date("n") . ":1||" . date("Y") . ":1||1||1||" . $counter_time . "\n" . $counter_ip . "||" . $counter_time . "\n"; // write counter data $fp = fopen($counter_filename,"w+"); if ($fp) { //flock($fp, LOCK_EX); $canWrite = false; while (!$canWrite) $canWrite = flock($fp, LOCK_EX); fwrite($fp, $add_line); flock($fp, LOCK_UN); fclose($fp); } // get counter values $yesterday = 0; $day = $week = $month = $year = $all = $record = 1; $record_time = $counter_time; $online = 1; } ?>
»     ອອນໄລ
»   ມື້ນີ້
»   ມື້ວານນີ້
»   ອາທິດນີ້
»   ເດືອນນີ້
»   ປີນີ້
»   ທັງໜົດ

ລິຂະສິດ © 2017
ອົງການໄອຍະການປະຊາຊົນສຸງສຸດສະຫງວນລິຂະສິດໄວ້ທັງໜົດ