Код HTML:
public AdminLog(string[])
{
new query[300];
query[0] = (EOS);
new result2[300];
mysql_real_escape_string(string, result2);
mysql_format(g_Sql, query, sizeof(query), "INSERT INTO log_admin (`log`) VALUES ('%s')",result2);
mysql_query(g_Sql,query);
return 1;
}
Код HTML:
stock GetDMY(info)
{
new string[20];
if(info) format(string, sizeof(string), "%02d/%02d/%d", gday, gmonth, gyear);
else
{
getdate(gyear, gmonth, gday);
gday += SetDay;
gmonth += SetMonth;
if(IsMonth31(gmonth))
{
if(gday > 31)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 31) gday -= 31;
}
else while(gday > 31) gday -= 31;
}
}
else if(!IsMonth31(gmonth) && gmonth != 2)
{
if(gday > 30)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 30) gday -= 30;
}
else while(gday > 30) gday -= 30;
}
}
else if(!IsMonth31(gmonth) && IsMonth29(gyear) && gmonth == 2)
{
if(gday > 29)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 29) gday -= 29;
}
else while(gday > 29) gday -= 29;
}
}
else if(!IsMonth31(gmonth) && !IsMonth29(gyear) && gmonth == 2)
{
if(gday > 28)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 28) gday -= 28;
}
else while(gday > 28) gday -= 28;
}
}
format(string, sizeof(string), "%02d/%02d/%d", gday, gmonth, gyear);
}
return string;
}
stock GetDMYH(info)
{
new hour, minute, second, string[40];
gettime(hour, minute, second);
FixTime(hour, minute);
if(info) format(string, sizeof(string), "%02d/%02d/%d, %02d:%02d:%02d", gday, gmonth, gyear, hour, minute, second);
else
{
getdate(gyear, gmonth, gday);
gday += SetDay;
gmonth += SetMonth;
if(IsMonth31(gmonth))
{
if(gday > 31)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 31) gday -= 31;
}
else while(gday > 31) gday -= 31;
}
}
else if(!IsMonth31(gmonth) && gmonth != 2)
{
if(gday > 30)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 30) gday -= 30;
}
else while(gday > 30) gday -= 30;
}
}
else if(!IsMonth31(gmonth) && IsMonth29(gyear) && gmonth == 2)
{
if(gday > 29)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 29) gday -= 29;
}
else while(gday > 29) gday -= 29;
}
}
else if(!IsMonth31(gmonth) && !IsMonth29(gyear) && gmonth == 2)
{
if(gday > 28)
{
gmonth += 1;
if(gmonth > 12)
{
gmonth = 1;
gyear += 1;
while(gday > 28) gday -= 28;
}
else while(gday > 28) gday -= 28;
}
}
format(string, sizeof(string), "%02d/%02d/%d, %02d:%02d:%02d", gday, gmonth, gyear, hour, minute, second);
}
return string;
}