From b35a7995ad42e242177f61a5978848c603ba9706 Mon Sep 17 00:00:00 2001
From: Ivan Lanin
Date: Sat, 15 Mar 2014 23:12:35 +0700
Subject: [PATCH] Check requirements
---
samples/bootstrap/css/phpword.css | 13 +++++++++----
samples/index.php | 13 +++++++++++++
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/samples/bootstrap/css/phpword.css b/samples/bootstrap/css/phpword.css
index d2195240..d7470598 100644
--- a/samples/bootstrap/css/phpword.css
+++ b/samples/bootstrap/css/phpword.css
@@ -1,8 +1,13 @@
body {
- padding-top: 20px;
- padding-bottom: 20px;
+ padding-top: 20px;
+ padding-bottom: 20px;
}
-
.navbar {
- margin-bottom: 20px;
+ margin-bottom: 20px;
+}
+.passed {
+ color: #339900;
+}
+.failed {
+ color: #ff0000;
}
diff --git a/samples/index.php b/samples/index.php
index b9f52eac..f4446ad4 100644
--- a/samples/index.php
+++ b/samples/index.php
@@ -11,5 +11,18 @@ if (!CLI) {
+$requirements = array(
+ 'php' => array('PHP 5.3.0', version_compare(phpversion(), '5.3.0', '>=')),
+ 'zip' => array('PHP extension ZipArchive', extension_loaded('zip')),
+ 'xml' => array('PHP extension XML', extension_loaded('xml')),
+ 'gd' => array('PHP extension GD (optional)', extension_loaded('gd')),
+);
+echo "Requirements
";
+echo "";
+foreach ($requirements as $key => $value) {
+ $status = $value[1] ? 'passed' : 'failed';
+ echo "- {$value[0]} ... {$status}
";
}
+echo "
";
+} // if (!CLI)
include_once 'Sample_Footer.php';