Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function encode_start(array $list) {
- $code = "";
- for($i=0; $i < (count($list)-1); $i++) {
- $content = file_get_contents($list[$i]);
- $arr1 = explode("/", $list);
- $name = $arr1[count($arr1)-1];
- $letters = str_split($content);
- for($j=0; $j < (count($letters)-1); $j++) {
- if($j = (count($letters)-1)) {
- $code .= char::ord($letters[$j])."./FLN:".base64_encode($name)."|";
- $this->progressBar->progress = count($letters) / 100 * ($j+1);
- $this->label3->text = "Обработка файла: ".$j."/".count($letters)-1;
- } else {
- $code .= char::ord($letters[$j]).".";
- $this->progressBar->progress = count($letters) / 100 * ($j+1);
- $this->label3->text = "Обработка файла: ".$j."/".count($letters)-1;
- }
- }
- $this->progress->progress = count($list) / 100 * ($i+1);
- $this->encode_label->text = "Готовы файлы: ".$i."/".count($list)-1;
- }
- file_put_contents($this->edit->text.".tns", $code);
- Animation::fadeOut($this->progress,500);
- Animation::fadeOut($this->progressBar,500);
- Animation::fadeOut($this->encode,500);
- Animation::fadeOut($this->encode_label,500);
- Animation::fadeOut($this->label3,500);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement