UnknownSec Bypass
403
:
/
mnt
/
lmsestudio-instance-vol002
/
lms_491f64ca609b
/
app
/
Services
/
Import
/ [
drwxr-xr-x
]
Menu
Upload
Mass depes
Mass delete
Terminal
Info server
About
name :
CSVService.php
<?php namespace EstudioLMS\Services\Import; /** * Class ImportService * @package EstudioLMS\Services\Import */ class CSVService { /** * ImportService constructor. */ public function __construct() { } /** * @param string $file * @return int */ public function countRegisters(string $file) { $fp = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); return count($fp); } /** * @param string $file * @param bool $registerMail * @param bool $enrollCourse * @param bool $enrollMail * @param int|null $courseId * @param int|null $planId * @return string */ public function import(string $file, bool $registerMail, bool $enrollCourse, bool $enrollMail, int $courseId = null, int $planId = null) { if ($enrollCourse && (is_null($courseId) || is_null($planId) || empty($courseId) || empty($planId))) return 'Não foi definido o curso e/ou plano para matrícula '; return 'Rodou legal'; } /** * @param string $file * @return string */ public function validateCsvFile(string $file) { $csv = fopen($file, "r"); $line = fgetcsv($csv, 1000, ","); if (!array_key_exists(1, $line)) { return false; } return true; } }
Copyright © 2026 - UnknownSec