Changeset 2566592
- Timestamp:
- 07/18/2021 10:31:01 AM (5 years ago)
- Location:
- ada2go-text-modules/trunk
- Files:
-
- 4 edited
-
a2g_tm_result.php (modified) (2 diffs)
-
ada2go-text-modules.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
settings_page.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ada2go-text-modules/trunk/a2g_tm_result.php
r2561723 r2566592 1 1 <?php 2 2 global $wpdb; 3 ob_start(); 4 $current_file = file_get_contents(ABSPATH . 'wp-content/plugins/ada2go-text-modules/a2g-css-output.txt'); 5 6 echo "<html> 7 <head> 8 <style> 9 ".$current_file." 10 </style> 11 </head> 12 <body class=\"a2g-out-body\"> 13 <div class=\"a2g-out-html\">"; 3 14 foreach ($_POST as $key => $value) { 4 15 $a2g_catid_textid = explode(",",$value); … … 6 17 echo "<br><br>"; 7 18 } 19 echo "</div> 20 </body> 21 </html>"; 22 23 $a2g_tm_seiteninhalt = ob_get_contents(); 24 25 ob_end_flush(); 26 27 $a2g_tm_dir = ABSPATH . 'wp-content/plugins/ada2go-text-modules/reslut-safes/'; 28 29 $a2g_tm_filecount = 0; 30 31 $a2g_tm_files = glob($a2g_tm_dir . "*"); 32 33 if ($a2g_tm_files){ 34 35 $a2g_tm_filecount = count($a2g_tm_files); 36 37 } 38 39 $a2g_tm_name_time = time(); 40 41 $a2g_tm_file = fopen($a2g_tm_dir.$a2g_tm_filecount.'_'.$a2g_tm_name_time.'_safe.html', "w"); 42 43 fputs($a2g_tm_file, $a2g_tm_seiteninhalt); 44 45 fclose($a2g_tm_file); -
ada2go-text-modules/trunk/ada2go-text-modules.php
r2566427 r2566592 3 3 Plugin Name: Ada2go - Text Modules 4 4 Description: (DE) ada2go - Text Modules gibt im Frontend ein anklickbares Formular aus um vordefinierten Text auszugeben. Du kannst es beispielsweise für Teilnehmerfeedback, Arbeitszeugnisse oder ähnliches nutzen. (EN) ada2go - Text Modules outputs a clickable form in the frontend to output predefined text. You can use it, for example, for participant feedback, job references or similar. 5 Version: 1. 15 Version: 1.2 6 6 Author: Heiko von ada2go.de 7 7 Author URI: https://ada2go.de/ … … 149 149 return $a2g_built_text_table; 150 150 } 151 152 /** 153 * Function: a2g_tm_while_safed_textes 154 * => Output the Text in Table 155 */ 156 function a2g_tm_while_safed_textes() { 157 global $wpdb; 158 $directory = ABSPATH . 'wp-content/plugins/ada2go-text-modules/reslut-safes/'; 159 $files = glob($directory . '*.{html}', GLOB_BRACE); 160 161 foreach($files as $file) 162 { 163 $path = parse_url($file, PHP_URL_PATH); 164 $path = basename($path); 165 echo "<tr><td>Pfad: ".$file." <br><a href='../wp-content/plugins/ada2go-text-modules/reslut-safes/". $path . "' target='_blank'>Datei öffnen</a> | <a href=\"#\">Datei löschen</a>" . "</td></tr>"; 166 } 167 return; 168 } 151 169 152 170 /** -
ada2go-text-modules/trunk/readme.txt
r2566425 r2566592 5 5 Requires at least: 4.7 6 6 Tested up to: 5.8 7 Stable tag: 1. 17 Stable tag: 1.2 8 8 Requires PHP: 7.0 9 9 License: GPLv3 or later … … 33 33 34 34 == Changelog == 35 = 1.2 = 36 * Important security fixes 35 37 36 38 = 1.1 = -
ada2go-text-modules/trunk/settings_page.php
r2566425 r2566592 22 22 ); 23 23 echo __('<div class="updated"> 24 <p>'.__('Erl digt! Alles gespeichert!', 'ada2go-text-modules').'</p>24 <p>'.__('Erledigt! Alles gespeichert!', 'ada2go-text-modules').'</p> 25 25 </div>'); 26 26 } … … 45 45 ); 46 46 echo __('<div class="updated"> 47 <p>'.__('Erl digt! Alles gespeichert!', 'ada2go-text-modules').'</p>47 <p>'.__('Erledigt! Alles gespeichert!', 'ada2go-text-modules').'</p> 48 48 </div>'); 49 49 } 50 50 51 52 // Handle EDIT Output CSS 53 if($_GET['action']=="editoutcss" AND (is_admin())) { 54 $a2g_new_css_content = sanitize_text_field( $_POST["css-output"]); 55 $file = ABSPATH . 'wp-content/plugins/ada2go-text-modules/a2g-css-output.txt'; 56 $current = file_get_contents($file); 57 $current = $a2g_new_css_content; 58 file_put_contents($file, $current); 59 echo __('<div class="updated"> 60 <p>'.__('Erledigt! Alles gespeichert!', 'ada2go-text-modules').'</p> 61 </div>'); 62 } 63 51 64 // Handle DEL Kat 52 65 if($_GET['action']=="delcat" AND (is_admin())) { … … 64 77 } 65 78 } 79 66 80 // Handle DEL Text 67 81 if($_GET['action']=="deltext" AND (is_admin())) { … … 161 175 <button class="tablinks" onclick="a2gSettingTab(event, 'textEdit')"><?php echo __('Texte bearbeiten', 'ada2go-text-modules'); ?></button> 162 176 <button class="tablinks" onclick="a2gSettingTab(event, 'textAdd')"><?php echo __('Texte hinzufügen', 'ada2go-text-modules'); ?></button> 177 <button class="tablinks" onclick="a2gSettingTab(event, 'textSafes')"><?php echo __('Gespeicherte Ergebnisse', 'ada2go-text-modules'); ?></button> 163 178 </div> 164 179 … … 179 194 3. <?php echo __('Mit dem Shortcode [a2gtm] fügst du ein Formular im FRONTEND ein das die Besucher nutzen können.', 'ada2go-text-modules'); ?><br> 180 195 4. <?php echo __('Wenn nur ausgewählte Benutzer diese Seite aufrufen sollen, schütze sie mit einem Passwort oder speziellen Plugin.', 'ada2go-text-modules'); ?> 196 <br><br> 197 <h3><?php echo __('CSS der Ausgabedatei bearbeiten', 'ada2go-text-modules'); ?></h3> 198 <?php echo __('Verwende folgende Klassen: .a2g-out-html, .a2g-out-body ohne HTML Tags (<script>)', 'ada2go-text-modules'); ?> 199 <br> 200 <form action="?page=a2g_tm_settings&action=editoutcss" method="post"> 201 <?php 202 $current_file = file_get_contents(ABSPATH . 'wp-content/plugins/ada2go-text-modules/a2g-css-output.txt'); 203 echo wp_editor( $current_file, 'css-output'); ?> 204 <br /> 205 <br /> 206 <input type="submit" name="submit" id="submit" class="button button-primary" value="<?php echo __( 'CSS für die Ausgabedatei speichern', 'ada2go-text-modules' ); ?>"> 207 </p> 208 </form> 209 210 211 212 181 213 </div> 182 214 … … 204 236 <?php echo __( 'Beschreibung', 'ada2go-text-modules' ); ?><br /> 205 237 <?php 206 echo wp_editor( '', 'kat-desc' ); ?>238 echo wp_editor( '', 'kat-desc'); ?> 207 239 <br /> 208 240 <br /> … … 236 268 <?php echo __( 'Text', 'ada2go-text-modules' ); ?><br /> 237 269 <?php 238 echo wp_editor( '', 'text-desc', array( 239 'media_buttons' => true, 240 'tinymce' => array( 'plugins' => $mce_plugins ) 241 ) ); ?> 270 echo wp_editor( '', 'text-desc'); ?> 242 271 </div> 243 272 <br /> … … 248 277 <input<?php if($a2g_tm_kat_exist=false) echo " disabled"; ?> type="submit" name="submit" id="submit" class="button button-primary" value="<?php echo __( 'Text speichern', 'ada2go-text-modules' ); ?>"> 249 278 </form> 279 </div> 280 281 <div id="textSafes" class="tabcontent"> 282 <h3>Gespeicherte Ausgaben</h3> 283 <div class="a2g-p-container"> 284 <?php 285 if(empty(a2g_tm_while_safed_textes())) { 286 echo __( 'Keine Dateien vorhanden.', 'ada2go-text-modules' ); 287 } else { 288 ?> 289 <table id="a2g-table"> 290 <tr> 291 <th><?php echo __( 'Dateiname', 'ada2go-text-modules' ); ?></th> 292 </tr> 293 <?php 294 echo a2g_tm_while_safed_textes(); 295 296 } 297 298 ?> 299 </table> 300 </div> 250 301 </div> 251 302
Note: See TracChangeset
for help on using the changeset viewer.