daily-prayer-time-for-mosques
Last commit date
Assets
6 years ago
Models
6 years ago
Views
6 years ago
.gitignore
7 years ago
LICENSE
10 years ago
daily-prayer-time.php
6 years ago
readme.txt
6 years ago
uninstall.php
6 years ago
widget-admin.php
7 years ago
widget-admin.php
85 lines
| 1 | <?php |
| 2 | require_once('Models/Processors/CsvProcessor.php'); |
| 3 | require_once('Models/Processors/LanguageProcessor.php'); |
| 4 | require_once('Models/Processors/OtherProcessor.php'); |
| 5 | require_once('Models/Processors/HijriProcessor.php'); |
| 6 | require_once('Models/Processors/QuickUpdateProcessor.php'); |
| 7 | require_once('Models/Processors/ThemeSettingsProcessor.php'); |
| 8 | |
| 9 | require_once ('Models/HijriDate.php'); |
| 10 | |
| 11 | ini_set('auto_detect_line_endings', true); |
| 12 | |
| 13 | if (isset($_POST['submit'])) { |
| 14 | $csvProcessor = new CsvProcessor($_FILES); |
| 15 | |
| 16 | if ( $csvProcessor->isValidFile() ) { |
| 17 | $csvProcessor->process(); |
| 18 | } else { |
| 19 | echo "<p class='ui-state-error dptCenter'><b>Invalid csv file ?</b>"; |
| 20 | echo "</br>Found: <i>(". $csvProcessor->getFileType() .")</i></p>"; |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | if (! empty($_POST['languageSettings'])) { |
| 25 | $languageProcessor = new LanguageProcessor($_POST); |
| 26 | $languageProcessor->proocess(); |
| 27 | } |
| 28 | |
| 29 | if (! empty($_POST['hijriSettings'])) { |
| 30 | $hijri = new HijriProcessor($_POST); |
| 31 | $hijri->process(); |
| 32 | } |
| 33 | |
| 34 | if (! empty($_POST['otherSettings'])) { |
| 35 | $otherProcessor = new OtherProcessor($_POST); |
| 36 | $otherProcessor->process(); |
| 37 | } |
| 38 | |
| 39 | if (! empty($_POST['quickUpdate'])) { |
| 40 | $otherProcessor = new QuickUpdateProcessor($_POST); |
| 41 | $otherProcessor->process(); |
| 42 | } |
| 43 | |
| 44 | if (! empty($_POST['themeSettings'])) { |
| 45 | $themeSettings = new ThemeSettingsProcessor($_POST); |
| 46 | $themeSettings->process(); |
| 47 | } |
| 48 | ?> |
| 49 | |
| 50 | <div id="tabs" style="display: none;"> |
| 51 | <ul> |
| 52 | <li><a href="#tabs-1" data-tab-index="0">Upload Timetable</a></li> |
| 53 | <li><a href="#tabs-2" data-tab-index="1">Change Language</a></li> |
| 54 | <li><a href="#tabs-3" data-tab-index="2">Hijri settings</a></li> |
| 55 | <li><a href="#tabs-4" data-tab-index="3">Theme settings</a></li> |
| 56 | <li><a href="#tabs-5" data-tab-index="4">Quick Update</a></li> |
| 57 | <li><a href="#tabs-6" data-tab-index="5">Other settings</a></li> |
| 58 | </ul> |
| 59 | |
| 60 | <div id="tabs-1" class="wrap" xmlns="http://www.w3.org/1999/html"> |
| 61 | <?php include 'Views/Tabs/CsvUpload.php' ?> |
| 62 | </div> |
| 63 | |
| 64 | <div id="tabs-2"> |
| 65 | <?php include 'Views/Tabs/ChangeLanguage.php' ?> |
| 66 | </div> |
| 67 | |
| 68 | <div id="tabs-3"> |
| 69 | <?php include 'Views/Tabs/HijriDate.php' ?> |
| 70 | </div> |
| 71 | |
| 72 | <div id="tabs-4"> |
| 73 | <?php include 'Views/Tabs/ThemeSettings.php' ?> |
| 74 | </div> |
| 75 | |
| 76 | <div id="tabs-5"> |
| 77 | <?php include 'Views/Tabs/QuickUpdate.php' ?> |
| 78 | </div> |
| 79 | |
| 80 | <div id="tabs-6"> |
| 81 | <?php include 'Views/Tabs/OtherSettings.php' ?> |
| 82 | </div> |
| 83 | </div> |
| 84 | <span class="dpt-donation"><a href="http://www.uwt.org/" target="_blank">Support The Ummah</a></span> |
| 85 | <span class="dpt-donation"><a href="https://wordpress.org/support/view/plugin-reviews/daily-prayer-time-for-mosques/reviews/#new-post" target="_blank">Write a Review </a></span> |