public static function pass_gen($length = 8, $chartypes = 'lower,numbers,upper') { return newFile::random_string($length, $chartypes); }
echo Tools::pass_gen(8, 'lower,numbers,upper,special'); if (isset($_FILES["file"])) { $struct = newFile::create("file", $ext)->allowedTypes(array('image/jpeg', 'image/png', 'image/gif'))->setFullPath("./upload/")->setFileName($_FILES["file"]["name"])->maxSize(1024 * 1024 * 100)->upload(); if (!$struct["error"]) { $img = file_get_contents($struct["path"]); $t = new Tools($img); $img_e = $t->base64(false, $struct["ext"]); unlink($struct["path"]); } } elseif (isset($_FILES["cssmin"])) { $struct = newFile::create("cssmin", $ext)->allowedTypes(array('text/css', 'image/png', 'image/gif'))->setFullPath("./upload/")->setFileName($_FILES["cssmin"]["name"])->maxSize(1024 * 1024 * 100)->upload(); if (!$struct["error"]) { $res = Tools::cssmin_file($struct); } } elseif (isset($_FILES["jsmin"])) { $struct = newFile::create("jsmin", $ext)->allowedTypes(array('application/javascript', 'image/png', 'image/gif'))->setFullPath("./upload/")->setFileName($_FILES["jsmin"]["name"])->maxSize(1024 * 1024 * 100)->upload(); if (!$struct["error"]) { $res = Tools::jsmin_file($struct); } else { print_r($struct); } } header("Content-Type: text/html"); if (isset($img_e)) { ?> <img src="<?php echo $img_e; ?> "> <?php } elseif (isset($cssmin)) {