Changeset 732 for trunk/Modules/Export
- Timestamp:
- Jan 8, 2014, 3:03:03 PM (11 years ago)
- Location:
- trunk/Modules/Export
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Export/Export.php
r731 r732 301 301 } 302 302 303 function AddProgress($add = 2) {303 function AddProgress($add = 1) { 304 304 305 305 $DbResult = $this->System->Database->query('SELECT Progress FROM `ExportTask` WHERE `Export`='.$this->Id); … … 321 321 while($Group = $DbResult->fetch_assoc()) 322 322 { 323 $this->AddProgress( );323 $this->AddProgress(2); 324 324 $Output .= $Group['Name'].', '; 325 325 if(file_exists($this->SourceDir.$this->ClientVersion['Version'].'/dbc/'.$Group['DBCFileName'].'.dbc')) -
trunk/Modules/Export/ExportOutput.php
r731 r732 219 219 } 220 220 } else { 221 222 221 $Output .= ShowProgress($Export); 222 223 } 224 return($Output); 225 } 226 227 function ShowProgress($Export) { 228 global $System; 229 $Output = ''; 223 230 $DbResult = $System->Database->query('SELECT Progress FROM `ExportTask` WHERE `Export`='.$Export->Id); 224 231 $Task = $DbResult->fetch_assoc(); 225 232 226 $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 227 'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&Auto&ExportId='.$Export->Id).'\'", 5000)'. 228 '</script>'; 229 $Output .= ' <strong>Dokončeno procent: '.ProgressBar(300, $Task['Progress']).'</strong>'; 233 // $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 234 // 'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&Auto&ExportId='.$Export->Id).'\'", 5000)'. 235 // '</script>'; '.ProgressBar(300, $Task['Progress']).' 236 $Output .= '<script src="http://code.jquery.com/jquery-latest.js"></script>'. 237 '<script>'. 238 '$(document).ready(function() {'. 239 'var refreshId = setInterval(function() {'. 240 '$("#progress").load("'.$System->Link('/Modules/Export/Progress.php?ExportId='.$Export->Id).'"); '. 241 '}, 500);'. 242 '});'. 243 '</script>'; 244 $Output .= ' <strong>Dokončeno procent: <div id="progress">'.ProgressBar(300, $Task['Progress']).'</div></strong>'; 245 // $(\'#load_progress\').load(\''.'?Action=View&Tab=7&Auto&ExportId='.$Export->Id.'\'); 246 // Modules/Export/Progress.php?ExportId=37 230 247 if ($Task['Progress'] == 0) $Output .= '<br/><br/><strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 231 } 232 return($Output); 233 } 248 249 return ($Output); 250 } 251 234 252 function OutputEXEToFile($ExportId) 235 253 { … … 267 285 } else { 268 286 269 $DbResult = $System->Database->query('SELECT Progress FROM `ExportTask` WHERE `Export`='.$Export->Id); 270 $Task = $DbResult->fetch_assoc(); 271 272 $Output .= '<script type="text/javascript" language="JavaScript" charset="utf-8">'. 273 'setTimeout("parent.location.href=\''.$System->Link('/export/?Action=View&Tab=7&Auto&ExportId='.$Export->Id).'\'", 5000)'. 274 '</script>'; 275 $Output .= ' <strong>Dokončeno procent: '.ProgressBar(300, $Task['Progress']).'</strong>'; 276 if ($Task['Progress'] == 0) $Output .= '<br/><br/><strong>Soubor čeká na zpracování ve frontě.</strong><br/>'; 287 $Output .= ShowProgress($Export); 277 288 } 278 289 return($Output); -
trunk/Modules/Export/ProcessTask.php
r731 r732 175 175 176 176 //copy need files 177 SetProgress($Export, 10);177 SetProgress($Export,5); 178 178 echo('Copy files...'."\n"); 179 179 rcopy('files/'.$Export->ClientVersion['Version'].'/patch-5.MPQ', $Export->TempDir.'patch-5.MPQ'); … … 184 184 rcopy('files/Fonts/', $Export->TempDir.'Fonts/'); 185 185 186 SetProgress($Export,1 5);186 SetProgress($Export,10); 187 187 echo('Export lua...'."\n"); 188 188 $Export->ExportToLua(); 189 SetProgress($Export, 20);189 SetProgress($Export,15); 190 190 echo('Export CzWoW...'."\n"); 191 191 $Export->MakeAddon(); 192 SetProgress($Export,3 5);192 SetProgress($Export,30); 193 193 echo('Export dbc...'."\n"); 194 194 $Export->ExportToDBC(); 195 195 196 196 echo('Create readme...'."\n"); 197 SetProgress($Export,6 5);197 SetProgress($Export,60); 198 198 $File = new FileStream(); 199 199 $File->CreateFile($Export->TempDir.'ReadMe.htm');
Note:
See TracChangeset
for help on using the changeset viewer.