| 
									
										
										
										
											2016-08-31 16:15:54 +00:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | require_once 'Header.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $requirements = [ | 
					
						
							| 
									
										
										
										
											2020-04-27 09:42:32 +00:00
										 |  |  |     'PHP 7.2.0' => version_compare(PHP_VERSION, '7.2.0', '>='), | 
					
						
							| 
									
										
										
										
											2016-08-31 16:15:54 +00:00
										 |  |  |     'PHP extension XML' => extension_loaded('xml'), | 
					
						
							|  |  |  |     'PHP extension xmlwriter' => extension_loaded('xmlwriter'), | 
					
						
							|  |  |  |     'PHP extension mbstring' => extension_loaded('mbstring'), | 
					
						
							| 
									
										
										
										
											2017-03-11 02:48:46 +00:00
										 |  |  |     'PHP extension ZipArchive' => extension_loaded('zip'), | 
					
						
							| 
									
										
										
										
											2016-08-31 16:15:54 +00:00
										 |  |  |     'PHP extension GD (optional)' => extension_loaded('gd'), | 
					
						
							|  |  |  |     'PHP extension dom (optional)' => extension_loaded('dom'), | 
					
						
							|  |  |  | ]; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if (!$helper->isCli()) { | 
					
						
							|  |  |  |     ?>
 | 
					
						
							|  |  |  |     <div class="jumbotron"> | 
					
						
							|  |  |  |         <p>Welcome to PHPSpreadsheet, a library written in pure PHP and providing a set of classes that allow you to read from and to write to different spreadsheet file formats, like Excel and LibreOffice Calc.</p> | 
					
						
							|  |  |  |         <p> </p> | 
					
						
							|  |  |  |         <p> | 
					
						
							|  |  |  |             <a class="btn btn-lg btn-primary" href="https://github.com/PHPOffice/PHPSpreadsheet" role="button"><i class="fa fa-github fa-lg" title="GitHub"></i>  Fork us on Github!</a> | 
					
						
							| 
									
										
										
										
											2017-07-30 14:22:28 +00:00
										 |  |  |             <a class="btn btn-lg btn-primary" href="https://phpspreadsheet.readthedocs.io" role="button"><i class="fa fa-book fa-lg" title="Docs"></i>  Read the Docs</a> | 
					
						
							| 
									
										
										
										
											2016-08-31 16:15:54 +00:00
										 |  |  |         </p> | 
					
						
							|  |  |  |     </div> | 
					
						
							|  |  |  |     <?php | 
					
						
							| 
									
										
										
										
											2017-10-01 08:48:59 +00:00
										 |  |  |     echo '<h3>Requirement check</h3>'; | 
					
						
							| 
									
										
										
										
											2016-08-31 16:15:54 +00:00
										 |  |  |     echo '<ul>'; | 
					
						
							|  |  |  |     foreach ($requirements as $label => $result) { | 
					
						
							|  |  |  |         $status = $result ? 'passed' : 'failed'; | 
					
						
							|  |  |  |         echo "<li>{$label} ... <span class='{$status}'>{$status}</span></li>"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  |     echo '</ul>'; | 
					
						
							|  |  |  | } else { | 
					
						
							|  |  |  |     echo 'Requirement check:' . PHP_EOL; | 
					
						
							|  |  |  |     foreach ($requirements as $label => $result) { | 
					
						
							|  |  |  |         $status = $result ? '32m passed' : '31m failed'; | 
					
						
							|  |  |  |         echo "{$label} ... \033[{$status}\033[0m" . PHP_EOL; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } |