Пример #1
0
 private static function setIP($code)
 {
     $table = 'loginhistories';
     if (self::hasIP()) {
         $query = 'UPDATE ' . $table . ' SET code = "' . $code . '", datetime = "' . Funcs::getDatetime() . '" WHERE ip = "' . Funcs::getIP() . '"';
     } else {
         $query = 'INSERT INTO ' . $table . ' (ip,code,datetime) VALUES ("' . Funcs::getIP() . '","' . $code . '","' . Funcs::getDatetime() . '")';
     }
     MyPDO::get()->query($query);
 }
Пример #2
0
 public static function getDatetime()
 {
     echo Funcs::getDatetime();
 }