| Server IP : 103.82.32.14 / Your IP : 216.73.217.121 Web Server : Apache/2.2.32 (Unix) mod_ssl/2.2.32 OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 System : Linux cloud.lonmanhoabinh.com 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : lonmakmf ( 524) PHP Version : 5.6.30 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /home/rubymnik/public_html/admin/ |
Upload File : |
<?php
session_start();
date_default_timezone_set('Asia/Ho_Chi_Minh');
if((!isset($_SESSION['login']) || $_SESSION['login'] == '' || $_SESSION['login']['ChucVu'] == '') && !isset($noncecheck))
{
$_SESSION['login'] = null;
include 'login.php';
die();
}
if(isset($_GET['logout']))
{
$_SESSION['login'] = '';
Header( "Location: ../" );
exit;
}
function tiGiaUsdSangVND()
{
return 23000;
}
function secondsToTime($inputSeconds)
{
$secondsInAMinute = 60;
$secondsInAnHour = 60 * $secondsInAMinute;
$secondsInADay = 24 * $secondsInAnHour;
// extract days
$days = floor($inputSeconds / $secondsInADay);
// extract hours
$hourSeconds = $inputSeconds % $secondsInADay;
$hours = floor($hourSeconds / $secondsInAnHour);
// extract minutes
$minuteSeconds = $hourSeconds % $secondsInAnHour;
$minutes = floor($minuteSeconds / $secondsInAMinute);
// extract the remaining seconds
$remainingSeconds = $minuteSeconds % $secondsInAMinute;
$seconds = ceil($remainingSeconds);
// return the final array
if($days != 0)
{
return $days . ' ngày trước';
}
else if($hours != 0)
{
return $hours . ' giờ trước';
}
}
function formatMoney($number, $fractional=false)
{
$number = round($number);
if ($fractional) {
$number = sprintf('%.2f', $number);
}
while (true) {
$replaced = preg_replace('/(-?\d+)(\d\d\d)/', '$1,$2', $number);
if ($replaced != $number) {
$number = $replaced;
} else {
break;
}
}
return $number;
}
function countSundayInMonth($thoiGian)
{
$months = date("m",strtotime($thoiGian));
$years = date("Y",strtotime($thoiGian));
$monthName = date("F", mktime(0, 0, 0, $months));
$fromdt=date('Y-m-01 ',strtotime("First Day Of $monthName $years")) ;
$todt=date('Y-m-d ',strtotime("Last Day of $monthName $years"));
$num_sundays= 0;
for ($i = 0; $i <= ((strtotime($todt) - strtotime($fromdt)) / 86400); $i++)
{
if(date('l',strtotime($fromdt) + ($i * 86400)) == 'Sunday')
{
$num_sundays++;
}
}
return $num_sundays;
}
function countSundayInDay($thoiGianStart, $thoiGianStop)
{
$num_sundays= 0;
for ($i = 0; $i <= ((strtotime($thoiGianStop) - strtotime($thoiGianStart)) / 86400); $i++)
{
if(date('l',strtotime($thoiGianStart) + ($i * 86400)) == 'Sunday')
{
$num_sundays++;
}
}
return $num_sundays;
}
function countInDay($thoiGianStart, $thoiGianStop)
{
$num_sundays= 0;
for ($i = 0; $i <= ((strtotime($thoiGianStop) - strtotime($thoiGianStart)) / 86400); $i++)
{
$num_sundays++;
}
return $num_sundays;
}
function getAvatar($id)
{
global $page;
$file = $page . "assets/images/users/" . $id . '.jpg';
if(!file_exists($file))
{
$file = $page . "assets/images/users/avatar_default.jpg";
}
echo $file;
}
$soLuongUploadMoiNgay = 3;
$soLuongCommentVideoMoiNgay = 20;
$soLuongShareMXHMoiNgay = 10;