banner.php
5 years ago
cp-feedback.php
5 years ago
cp_admin_int_edition.inc.php
5 years ago
cpabc_appointments_admin_addbk.inc.php
5 years ago
cpabc_appointments_admin_int.inc.php
5 years ago
cpabc_appointments_admin_int_bookings_list.inc.php
5 years ago
cpabc_appointments_admin_int_calendar_list.inc.php
5 years ago
cpabc_apps_go.inc.php
5 years ago
cpabc_apps_on.inc.php
5 years ago
cpabc_publish_wizzard.inc.php
5 years ago
cpabc_scheduler.inc.php
5 years ago
index.html
5 years ago
cp_admin_int_edition.inc.php
182 lines
| 1 | <?php |
| 2 | |
| 3 | if ( !is_admin() ) |
| 4 | { |
| 5 | echo 'Direct access not allowed.'; |
| 6 | exit; |
| 7 | } |
| 8 | |
| 9 | global $wpdb; |
| 10 | |
| 11 | $cpid = 'CP_ABC'; |
| 12 | $plugslug = 'cpabc_appointments.php'; |
| 13 | |
| 14 | if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST[$cpid.'_post_edition'] ) ) |
| 15 | echo "<div id='setting-error-settings_updated' class='updated settings-error'> <p><strong>Settings saved.</strong></p></div>"; |
| 16 | |
| 17 | if ($_GET["item"] == 'js') |
| 18 | $saved_contents = base64_decode(get_option($cpid.'_JS', '')); |
| 19 | else if ($_GET["item"] == 'css') |
| 20 | $saved_contents = base64_decode(get_option($cpid.'_CSS', '')); |
| 21 | |
| 22 | ?> |
| 23 | <script> |
| 24 | // Move to an external file |
| 25 | jQuery(function(){ |
| 26 | var $ = jQuery; |
| 27 | <?php |
| 28 | if(function_exists('wp_enqueue_code_editor')) |
| 29 | { |
| 30 | $settings_js = wp_enqueue_code_editor(array('type' => 'application/javascript')); |
| 31 | $settings_css = wp_enqueue_code_editor(array('type' => 'text/css')); |
| 32 | |
| 33 | // Bail if user disabled CodeMirror. |
| 34 | if(!(false === $settings_js && false === $settings_css)) |
| 35 | { |
| 36 | if ($_GET["item"] == 'js') |
| 37 | print sprintf('{wp.codeEditor.initialize( "editionarea", %s );}',wp_json_encode( $settings_js )); |
| 38 | else |
| 39 | print sprintf('{wp.codeEditor.initialize( "editionarea", %s );}',wp_json_encode( $settings_css ));; |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | ?> |
| 44 | }); |
| 45 | </script> |
| 46 | <style> |
| 47 | .ahb-tab{display:none;} |
| 48 | .ahb-tab label{font-weight:600;} |
| 49 | .tab-active{display:block;} |
| 50 | .ahb-code-editor-container{border:1px solid #DDDDDD;margin-bottom:20px;} |
| 51 | |
| 52 | .ahb-csssample { margin-top: 15px; margin-left:20px; margin-right:20px;} |
| 53 | .ahb-csssampleheader { |
| 54 | font-weight: bold; |
| 55 | background: #dddddd; |
| 56 | padding:10px 20px;-webkit-box-shadow: 0px 2px 2px 0px rgba(100, 100, 100, 0.1);-moz-box-shadow: 0px 2px 2px 0px rgba(100, 100, 100, 0.1);box-shadow: 0px 2px 2px 0px rgba(100, 100, 100, 0.1); |
| 57 | } |
| 58 | .ahb-csssamplecode { background: #f4f4f4; |
| 59 | border: 1px solid #ddd; |
| 60 | border-left: 3px solid #f36d33; |
| 61 | color: #666; |
| 62 | page-break-inside: avoid; |
| 63 | font-family: monospace; |
| 64 | font-size: 15px; |
| 65 | line-height: 1.6; |
| 66 | margin-bottom: 1.6em; |
| 67 | max-width: 100%; |
| 68 | overflow: auto; |
| 69 | padding: 1em 1.5em; |
| 70 | display: block; |
| 71 | word-wrap: break-word; |
| 72 | } |
| 73 | </style> |
| 74 | <div class="wrap"> |
| 75 | <h1>Customization / Edit Page</h1> |
| 76 | |
| 77 | |
| 78 | |
| 79 | <input type="button" name="backbtn" value="Back to items list..." onclick="document.location='admin.php?page=<?php echo $plugslug; ?>';"> |
| 80 | <br /><br /> |
| 81 | |
| 82 | |
| 83 | Note: This section has been modified to improve security. Please edit the custom CSS in the theme. You can <a href="https://abc.dwbooster.com/contact-us">contact us for support and assistance</a>. |
| 84 | |
| 85 | |
| 86 | |
| 87 | </form> |
| 88 | |
| 89 | |
| 90 | <?php if ($_GET["item"] == 'css') { ?> |
| 91 | <hr /> |
| 92 | |
| 93 | <div class="ahb-statssection-container" style="background:#f6f6f6;"> |
| 94 | <div class="ahb-statssection-header" style="background:white; |
| 95 | padding:10px 20px;-webkit-box-shadow: 0px 2px 2px 0px rgba(100, 100, 100, 0.1);-moz-box-shadow: 0px 2px 2px 0px rgba(100, 100, 100, 0.1);box-shadow: 0px 2px 2px 0px rgba(100, 100, 100, 0.1);"> |
| 96 | <h3>Sample Styles:</h3> |
| 97 | </div> |
| 98 | <div class="ahb-statssection"> |
| 99 | |
| 100 | <div class="ahb-csssample"> |
| 101 | <div class="ahb-csssampleheader"> |
| 102 | Center the calendar in the page: |
| 103 | </div> |
| 104 | <div class="ahb-csssamplecode"> |
| 105 | .appContainer{text-align:center;}<br /> |
| 106 | .appContainer2{margin-left:auto;margin-right:auto;width:200px} |
| 107 | </div> |
| 108 | </div> |
| 109 | |
| 110 | <div class="ahb-csssample"> |
| 111 | <div class="ahb-csssampleheader"> |
| 112 | Change the calendar's width and height: |
| 113 | </div> |
| 114 | <div class="ahb-csssamplecode"> |
| 115 | .yui-calendar td.calcell, #cp_abcform_pform .yui-calendar td.calcell {<br /> |
| 116 | padding-top:10px;<br /> |
| 117 | padding-bottom:10px;<br /> |
| 118 | border:1px solid #E0E0E0;<br /> |
| 119 | text-align:center;<br /> |
| 120 | vertical-align: top;<br /> |
| 121 | } <br /> |
| 122 | </div> |
| 123 | </div> |
| 124 | |
| 125 | <div class="ahb-csssample"> |
| 126 | <div class="ahb-csssampleheader"> |
| 127 | Change the background color of the selected date: |
| 128 | </div> |
| 129 | <div class="ahb-csssamplecode"> |
| 130 | .yui-calendar td.calcell.reserveddate { background-color:#B6EA59; } |
| 131 | </div> |
| 132 | </div> |
| 133 | |
| 134 | <div class="ahb-csssample"> |
| 135 | <div class="ahb-csssampleheader"> |
| 136 | Make the calendar 100% width: |
| 137 | </div> |
| 138 | <div class="ahb-csssamplecode"> |
| 139 | .yui-calendar td.calcell, #cp_abcform_pform .yui-calendar td.calcell {<br /> |
| 140 | border:1px solid #E0E0E0;<br /> |
| 141 | text-align:center;<br /> |
| 142 | vertical-align: top;<br /> |
| 143 | }<br /> |
| 144 | .yui-calendar .calheader, #cp_abcform_pform .yui-calendar .calheader {<br /> |
| 145 | width:100%;<br /> |
| 146 | }<br /> |
| 147 | .yui-calendar, #cp_abcform_pform .yui-calendar {<br /> |
| 148 | width:100%;<br /> |
| 149 | table-layout: fixed;<br /> |
| 150 | } |
| 151 | </div> |
| 152 | </div> |
| 153 | |
| 154 | <div class="ahb-csssample"> |
| 155 | <div class="ahb-csssampleheader"> |
| 156 | Other styles: |
| 157 | </div> |
| 158 | <div class="ahb-csssamplecode"> |
| 159 | For other styles check the design section in the FAQ: <a href="https://abc.dwbooster.com/faq?page=faq#design">https://abc.dwbooster.com/faq?page=faq#design</a> |
| 160 | </div> |
| 161 | </div> |
| 162 | |
| 163 | </div> |
| 164 | </div> |
| 165 | |
| 166 | <?php } ?> |
| 167 | |
| 168 | </div> |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 |