Changeset 1515872
- Timestamp:
- 10/16/2016 12:54:30 PM (8 years ago)
- Location:
- custom-tables/trunk
- Files:
-
- 2 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
custom-tables/trunk/custom-tables-search.php
r1509473 r1515872 4 4 Plugin URI: http://blog.murawski.ch/2011/08/custom-tables-wordpress-plugin/ 5 5 Description: [PREMIUM FEATURE] Extend the normal WordPress Search with the search in the Custom Tables 6 Version: 4. 0.06 Version: 4.1.0 7 7 Author: Web Updates KMU 8 8 Author URI: http://wuk.ch/ … … 760 760 } 761 761 762 $current = get_option('active_plugins'); 763 if (count($current)==0 AND WP_ALLOW_MULTISITE == true) { 764 $current = get_site_option('active_sitewide_plugins'); 765 } 766 767 if (in_array( 'custom-tables/custom-tables-search.php', $current) OR array_key_exists( 'custom-tables/custom-tables-search.php', $current) AND (!in_array( 'custom-tables/custom-tables.php', $current) OR $settings['form_serial'] == '')) { 768 if (WP_ALLOW_MULTISITE == true) { 769 foreach ($current as $var => $wert) { 770 if ($var != "custom-tables/custom-tables-search.php" AND $wert != "custom-tables/custom-tables-search.php") { $newplugs[$var] = $wert; } 771 } 772 773 echo "<div class=\"updated\" style=\"width:610px;background-color: red;\"><p><b>Custom Tables Search</b>". 774 __('The Premium Extension is Single Domain Usage only! Please activate it only on the subpages directly.<br/><br/>This Plugin extension will be automatically disabled.','wct')."</p> 775 </div>"; 776 777 update_site_option('active_sitewide_plugins', $newplugs); 778 update_option('active_plugins', $newplugs); 762 $settings = get_option('wuk_custom_tables'); 763 if ($settings['form_serial'] == '') { 764 $settings = get_option('wuk_custom_tables'); 765 if (is_multisite()) { 766 $current = get_site_option('active_sitewide_plugins'); 767 if (array_key_exists( 'custom-tables/custom-tables-search.php', $current)) { 768 unset($current['custom-tables/custom-tables-search.php']); 769 update_site_option('active_sitewide_plugins', $current); 770 } 771 779 772 } 780 773 else { 781 782 echo "<div class=\"updated\" style=\"width:610px;background-color: red;\"><p><b>Custom Tables Search</b>". 783 __('This is a Premium Extension! The usage without a key is prohibited.<br/><br/>This Plugin extension will be automatically disabled.','wct')."</p> 784 </div>"; 785 786 array_splice($current, array_search( 'custom-tables/custom-tables-search.php', $current) +1, 1 ); 787 update_option('active_plugins', $current); 774 $current = get_option('active_plugins'); 775 if (in_array( 'custom-tables/custom-tables-search.php', $current)) { 776 foreach ($current as $index => $data) { 777 if ($data == 'custom-tables/custom-tables-search.php') { 778 unset($current[$index]); 779 update_option('active_plugins', $current); 780 } 781 } 782 } 788 783 } 789 784 } 790 785 791 786 if ($_GET['s'] != '') { 792 787 add_filter('posts_results','wct_search_addon'); … … 795 790 } 796 791 797 798 792 ?> -
custom-tables/trunk/custom-tables-widget.php
r1509473 r1515872 4 4 Plugin URI: http://blog.murawski.ch/2011/08/custom-tables-wordpress-plugin/ 5 5 Description: [PREMIUM FEATURE] Delivers a Widget for Link Categories to a Custom Table 6 Version: 4. 0.06 Version: 4.1.0 7 7 Author: Web Updates KMU 8 8 Author URI: http://wuk.ch/ -
custom-tables/trunk/custom-tables.php
r1511112 r1515872 4 4 Plugin URI: http://blog.murawski.ch/2011/08/custom-tables-wordpress-plugin/ 5 5 Description: Create Tables and show on a page/article. Usable for all kind of diffrent databases. 6 Version: 4. 0.06 Version: 4.1.0 7 7 Author: Web Updates KMU 8 8 Author URI: http://wuk.ch/ … … 27 27 */ 28 28 29 define('WCT_VERSION', '4. 0.0');30 define('WCT_DBVERSION', '201610 0601');29 define('WCT_VERSION', '4.1.0'); 30 define('WCT_DBVERSION', '2016101601'); 31 31 32 32 if (!function_exists('mres')) { function mres($t) { $t = esc_sql($t); return $t; } } … … 56 56 } 57 57 58 include_once("tinymce-class.php");59 60 58 if (!class_exists('wuk_custom_tables')) { 61 59 class wuk_custom_tables { … … 66 64 var $wctnr; 67 65 68 function wuk_custom_tables() {66 function __construct() { 69 67 global $wpdb; 70 68 $this->getOptions(); … … 113 111 if ($this->settings['dbversion'] == "2013030501") { $this->dbupdate('2013102001',1); } 114 112 if ($this->settings['dbversion'] == "2013102001") { $this->dbupdate('2016100601',1); } 113 if ($this->settings['dbversion'] == "2016100601") { $this->dbupdate('2016101601',1); } 115 114 116 115 add_action('in_plugin_update_message-custom-tables/custom-tables.php', array(&$this, 'plugin_updates')); … … 212 211 213 212 function wuk_scripts() { 214 wp_enqueue_script('jquery'); 215 wp_enqueue_script('jquery-ui-core'); 216 wp_enqueue_script('jquery-ui-datepicker'); 213 wp_enqueue_script('jquery-ui-core',array( 'jquery')); 214 wp_enqueue_script('jquery-ui-datepicker',array( 'jquery','jquery-ui-core')); 215 wp_enqueue_script('jquery-validate-script', plugins_url('custom-tables/jquery/jquery.validate.min.js') ,array( 'jquery')); 216 217 217 wp_enqueue_style('jquery-ui-theme', plugins_url('custom-tables/jquery/smoothness/jquery-ui.min.css')); 218 wp_enqueue_script( 'tinymce_js', includes_url( 'js/tinymce/' ) . 'wp-tinymce.php', array( 'jquery' ), false, true ); 218 219 219 220 if ($this->prem_chk() == true) { … … 1141 1142 } 1142 1143 1143 function ShowTinyMCE() {1144 wp_enqueue_script( 'common' );1145 wp_enqueue_script( 'jquery-color' );1146 wp_print_scripts('editor');1147 if (function_exists('add_thickbox')) add_thickbox();1148 wp_print_scripts('media-upload');1149 if (function_exists('wp_tiny_mce')) wp_tiny_mce();1150 wp_admin_css();1151 wp_enqueue_script('utils');1152 do_action("admin_print_styles-post-php");1153 do_action('admin_print_styles');1154 }1155 1156 1144 /* Hooks for additional Extensions */ 1157 1145 function hook_table($content) { return $content; } -
custom-tables/trunk/pages/editcontent.php
r941483 r1515872 224 224 225 225 $qry = $wpdb->get_row("SELECT * FROM `".$wpdb->prefix."wct".$tableid."` WHERE `id`='".mres($_GET['rid'])."' LIMIT 1;"); 226 echo $message."<form action=\"".$wctmp.$tableid."&wcttab=content&wcttab2=".$_GET['wcttab2']."&action=edit2&wcts=".$_GET['wcts']."&rid=".$_GET['rid']."\" method=\"post\"><table >";226 echo $message."<form action=\"".$wctmp.$tableid."&wcttab=content&wcttab2=".$_GET['wcttab2']."&action=edit2&wcts=".$_GET['wcts']."&rid=".$_GET['rid']."\" method=\"post\"><table style=\"min-width:800px;width:90%;\">"; 227 227 for($i=1;$i<=$x;$i++) { 228 228 if ($feld[$i] != 'id') { 229 echo "<input type=\"hidden\" name=\"wctff[]\" value=\"".$feld[$i]."\" /><tr><td ><strong>".$feld[$i]."</strong> </td><td>";229 echo "<input type=\"hidden\" name=\"wctff[]\" value=\"".$feld[$i]."\" /><tr><td style=\"width:150px;\"><strong>".$feld[$i]."</strong> </td><td>"; 230 230 if ($feld2[$i] == "smallint(6)") { echo "<input size=\"7\" type=\"text\" name=\"wctf[]\" value=\"".stripslashes($qry->$feld[$i])."\" maxsize=\"6\"/>"; } 231 231 elseif ($feld2[$i] == "int(11)") { echo "<input size=\"12\" type=\"text\" name=\"wctf[]\" value=\"".stripslashes($qry->$feld[$i])."\" maxsize=\"11\"/>"; } … … 243 243 elseif ($feld2[$i] == "text") { 244 244 echo "<input type=\"hidden\" name=\"wctf[]\" value=\"SpeCial_".$feld[$i]."\"/>"; 245 if ($_GET['tableselector'] != '') { 246 echo "<textarea id=\"wctfs_".$feld[$i]."\" name=\"wctfs_".$feld[$i]."\" style=\"height: 155px;width: 100%;\">".htmlspecialchars(stripslashes($qry->$feld[$i]), ENT_QUOTES)."</textarea>"; 247 $mytextfelder .= "wctfs_".$feld[$i].","; 248 } 249 else { 250 the_editor(stripslashes($qry->$feld[$i]), "wctfs_".$feld[$i], $feld[($i-1)], $media_buttons = false); 251 } 252 245 the_editor(stripslashes($qry->$feld[$i]), "wctfs_".$feld[$i], $feld[($i-1)], $media_buttons = false); 253 246 } 254 247 elseif (substr($feld2[$i],0,4) == "enum") { … … 313 306 } 314 307 } 315 if ($_GET['tableselector'] != '' AND $mytextfelder != '' AND $this->prem_chk() == true) { 316 $wct_elements = substr($mytextfelder,0,strlen($mytextfelder)-1); 317 global $wuk_tinymce; 318 if (class_exists('wuk_tinymce')) { 319 $wuk_tinymce->tinymce_getInitJS($wct_elements,$html); 320 } 321 } 308 322 309 echo "</table><input type=\"submit\" name=\"submit1\" value=\"". __('Save all Changes', 'wct') ."\"> <input type=\"submit\" name=\"submit2\" value=\"". __('Save & back', 'wct') ."\"> <input type=\"submit\" name=\"submit5\" value=\"". __('Save & next', 'wct') ."\"></form>"; 323 310 … … 362 349 elseif ($feld2[$i] == "text") { 363 350 echo "<input type=\"hidden\" name=\"wctf[]\" value=\"SpeCial_".$feld[$i]."\"/>"; 364 if ($_GET['tableselector'] != '') { 365 echo "<textarea name=\"wctfs_".$feld[$i]."\" style=\"height: 155px;width: 100%;\"></textarea>"; 366 $mytextfelder .= "wctfs_".$feld[$i].","; 367 } 368 else { 369 the_editor('', "wctfs_".$feld[$i], $feld[($i-1)], $media_buttons = false); 370 } 351 the_editor('', "wctfs_".$feld[$i], $feld[($i-1)], $media_buttons = false); 371 352 } 372 353 elseif (substr($feld2[$i],0,4) == "enum") { … … 424 405 } 425 406 } 426 if ($_GET['tableselector'] != '' AND $mytextfelder != '' AND $this->prem_chk() == true) { 427 $wct_elements = substr($mytextfelder,0,strlen($mytextfelder)-1); 428 global $wuk_tinymce; 429 if (class_exists('wuk_tinymce')) { 430 $wuk_tinymce->tinymce_getInitJS($wct_elements,$html); 431 } 432 } 407 433 408 echo "</table><input type=\"submit\" name=\"submit1\" value=\"". __('Save Entry', 'wct') ."\"> <input type=\"submit\" name=\"submit2\" value=\"". __('Save & back', 'wct') ."\"> <input type=\"submit\" name=\"submit3\" value=\"". __('Save & create new', 'wct') ."\"></form>"; 434 409 if (is_array($picturefeld)) { add_action('admin_print_footer_scripts', $this->picture_upload($picturefeld), 61); } … … 639 614 $r = ceil($anz / 30); 640 615 if ($r >= '2') { 641 echo"<tr><td colspan=\"3\"></td><form action=\"".$wctmp.$tableid."&wcttab=content&wcttab2=".$_GET['wcttab2']."&wctsort=".$_GET['wctsort']."&wctinvs=".$_GET['wctinvs']."\" method=\"post\"><td colspan=\"".($i + 1)."\"><div class=\"tablenav\"><div class=\"tablenav-pages\"><span class=\"displaying-num\">".$anz." Elemente</span>616 $sortme = "<tr><td colspan=\"3\"></td><form action=\"".$wctmp.$tableid."&wcttab=content&wcttab2=".$_GET['wcttab2']."&wctsort=".$_GET['wctsort']."&wctinvs=".$_GET['wctinvs']."\" method=\"post\"><td colspan=\"".($i + 1)."\"><div class=\"tablenav\"><div class=\"tablenav-pages\"><span class=\"displaying-num\">".$anz." Elemente</span> 642 617 <span class=\"pagination-links\"><a class=\"first-page".($starting > '29' ? "" : " disabled")."\" title=\"Zur ersten Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcttab2=".$_GET['wcttab2']."&wctsort=".$_GET['wctsort']."&wctinvs=".$_GET['wctinvs']."\">«</a> 643 618 <a class=\"prev-page".($starting > '29' ? "" : " disabled")."\" title=\"Zur vorherigen Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcts=".($starting > '30' ? ($starting-30) : '0')."&wcttab2=".$_GET['wcttab2']."&wctsort=".$_GET['wctsort']."&wctinvs=".$_GET['wctinvs']."\"><</a> 644 619 <span class=\"paging-input\"><input class=\"current-page\" title=\"Aktuelle Seite\" name=\"wcts2\" value=\"".(($starting/30)+1)."\" size=\"2\" type=\"text\"> von <span class=\"total-pages\">".$r."</span></span> 645 <a class=\"next-page".($starting >= (($r-1)*30) ? " disabled" : "")."\" title=\"Zur n ächsten Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcts=".($starting >= (($r-1)*30-30) ? (($r-1)*30) : ($starting+30))."&wcttab2=".$_GET['wcttab2']."&wctsort=".$_GET['wctsort']."&wctinvs=".$_GET['wctinvs']."\">></a>620 <a class=\"next-page".($starting >= (($r-1)*30) ? " disabled" : "")."\" title=\"Zur nächsten Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcts=".($starting >= (($r-1)*30-30) ? (($r-1)*30) : ($starting+30))."&wcttab2=".$_GET['wcttab2']."&wctsort=".$_GET['wctsort']."&wctinvs=".$_GET['wctinvs']."\">></a> 646 621 <a class=\"last-page".($starting >= (($r-1)*30) ? " disabled" : "")."\" title=\"Zur letzten Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcts=".(($r-1)*30)."&wcttab2=".$_GET['wcttab2']."&wctsort=".$_GET['wctsort']."&wctinvs=".$_GET['wctinvs']."\">»</a></span></div></div></td></form></tr>"; 622 echo $sortme; 647 623 } 648 624 … … 694 670 695 671 if ($r >= '2') { 696 echo "<tr><td colspan=\"3\">".($globaledit == '1' ? "<input type=\"submit\" name=\"submit\" value=\"". __('Save all Changes', 'wct') ."\">" : "")."</td>".($globaledit == '1' ? "</form>" : "")." 697 <form action=\"".$wctmp.$tableid."&wcttab=content&wcttab2=".$_GET['wcttab2']."\" method=\"post\"><td colspan=\"".($i + 1)."\"><div class=\"tablenav\"><div class=\"tablenav-pages\"><span class=\"displaying-num\">".$anz." Elemente</span> 698 <span class=\"pagination-links\"><a class=\"first-page".($starting > '29' ? "" : " disabled")."\" title=\"Zur ersten Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcttab2=".$_GET['wcttab2']."\">«</a> 699 <a class=\"prev-page".($starting > '29' ? "" : " disabled")."\" title=\"Zur vorherigen Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcts=".($starting > '30' ? ($starting-30) : '0')."&wcttab2=".$_GET['wcttab2']."\"><</a> 700 <span class=\"paging-input\"><input class=\"current-page\" title=\"Aktuelle Seite\" name=\"wcts2\" value=\"".(($starting/30)+1)."\" size=\"2\" type=\"text\"> von <span class=\"total-pages\">".$r."</span></span> 701 <a class=\"next-page".($starting >= (($r-1)*30) ? " disabled" : "")."\" title=\"Zur nächsten Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcts=".($starting >= (($r-1)*30-30) ? (($r-1)*30) : ($starting+30))."&wcttab2=".$_GET['wcttab2']."\">></a> 702 <a class=\"last-page".($starting >= (($r-1)*30) ? " disabled" : "")."\" title=\"Zur letzten Seite gehen\" href=\"".$wctmp.$tableid."&wcttab=content&wcts=".(($r-1)*30)."&wcttab2=".$_GET['wcttab2']."\">»</a></span></div></div></td></form></tr>"; 672 echo $sortme; 703 673 } 704 674 else { -
custom-tables/trunk/pages/save_forms.php
r1509473 r1515872 28 28 $feld .= "<td>{".rtrim(substr($var,5,1024))."}</td>"; 29 29 } 30 if (substr($var,0,5) == "felb_" AND $wert == '1') { 31 $feld3[] = rtrim(substr($var,5,1024)); 32 } 30 33 elseif (substr($var,0,5) == "valu_") { 31 34 $feld2 .= trim($wert).","; 32 35 } 33 36 } 34 if ($feld2 != '') { $feld2 = substr($feld2,0,strlen($feld2)-1); } 35 $wpdb->get_row("UPDATE `".$wpdb->prefix."wct_form` SET `t_setup`='".mres($feld)."', `t_val`='".mres($feld2)."' WHERE `id`='".mres($formid)."' LIMIT 1;"); 37 38 if ($feld2 != '') { $feld2 = substr($feld2,0,strlen($feld2)-1); } 39 if (is_array($feld3)) { $feld3 = implode(",",$feld3); } 40 $wpdb->get_row("UPDATE `".$wpdb->prefix."wct_form` SET `t_setup`='".mres($feld)."', `t_val`='".mres($feld2)."', `p_fields`='".mres($feld3)."' WHERE `id`='".mres($formid)."' LIMIT 1;"); 36 41 } 37 42 -
custom-tables/trunk/pages/setup_form.php
r1509473 r1515872 101 101 102 102 case 'tsetup': 103 echo "<h3>" . __('Table Setup','wct'). "</h3><input type=\"hidden\" name=\"ts\" value=\"1\"><table><tr><td><b>".__('Field','wct')."</b></td><td><b>".__('Show','wct')." </b></td><td><b>".__('R ights','wct')."</b></td><td><b>".__('Standard Value (PHP possible)','wct')."</b></td></tr>";104 $myrow = $wpdb->get_row("SELECT `r_fields`,`t_setup`,`t_val`,`r_table` FROM `".$wpdb->prefix."wct_form` WHERE `id`='".mres($formid)."' LIMIT 1;");103 echo "<h3>" . __('Table Setup','wct'). "</h3><input type=\"hidden\" name=\"ts\" value=\"1\"><table><tr><td><b>".__('Field','wct')."</b></td><td><b>".__('Show','wct')." </b></td><td><b>".__('Required field','wct')."</b></td><td><b>".__('Standard Value (PHP Variable possible)','wct')."</b></td><td><b>".__('Rights','wct')."</b></td></tr>"; 104 $myrow = $wpdb->get_row("SELECT `r_fields`,`t_setup`,`t_val`,`r_table`,`p_fields` FROM `".$wpdb->prefix."wct_form` WHERE `id`='".mres($formid)."' LIMIT 1;"); 105 105 106 106 $table = $wpdb->get_row("SHOW CREATE TABLE `".$wpdb->prefix."wct".$myrow->r_table."`;"); … … 115 115 116 116 $felder2 = explode(",",$myrow->r_fields); 117 $felder3 = explode(",",$myrow->p_fields); 117 118 118 119 if (strstr($myrow->t_val,",")) { $valu = explode(",",$myrow->t_val); } else { $valu= array(); } … … 122 123 echo "<tr><td>".$feld."</td><td><input type=\"checkbox\" value=\"1\" name=\"feld_".$feld."\""; 123 124 if (strpos($myrow->t_setup, "{".$feld."}") !== false) { echo " checked"; } 124 echo "></td><td><font color=\""; 125 echo "></td><td><input type=\"checkbox\" value=\"1\" name=\"felb_".$feld."\""; 126 if (in_array($feld,$felder3)) { echo " checked"; } 127 echo "></td><td><input type=\"text\" name=\"valu_".$feld."\" value=\"".str_replace("\"",""",stripslashes($valu[$t]))."\"></td><td><font color=\""; 125 128 if (in_array($feld,$felder2)) { echo "#00BF60\">yes"; } else { echo "#FF0000\">no"; } 126 echo "</font></td>< td><input type=\"text\" name=\"valu_".$feld."\" value=\"".str_replace("\"",""",stripslashes($valu[$t]))."\"></td></tr>";129 echo "</font></td></tr>"; 127 130 $t++; 128 131 } -
custom-tables/trunk/pages/show_form.php
r1511160 r1515872 3 3 // [wctform id="1" limit="50"] als ausgabe zu Form 1 4 4 5 $form = $wpdb->get_row("SELECT `e_setup`,`t_setup`,`t_val`,`rights`,`r_table`,`r_fields`,`r_filter`,`htmlview`,`smail`,`toapprove` FROM `".$wpdb->prefix."wct_form` WHERE `id`='".$id."' LIMIT 1;");5 $form = $wpdb->get_row("SELECT `e_setup`,`t_setup`,`t_val`,`rights`,`r_table`,`r_fields`,`r_filter`,`htmlview`,`smail`,`toapprove`,`p_fields` FROM `".$wpdb->prefix."wct_form` WHERE `id`='".$id."' LIMIT 1;"); 6 6 $felder2 = explode(",",$form->r_fields); 7 $felder3 = explode(",",$form->p_fields); 7 8 8 9 if (strstr($form->t_val,",")) { $valu = explode(",",$form->t_val); } else { $valu= array(); } … … 10 11 // uses variables as std values 11 12 $val = str_replace(array("'","\"",";","[","]"),"",stripslashes($valu[$i])); 13 $val = str_replace(array("date()","time()"),array(date("m/d/Y",time()),time()),$val); 12 14 if (strstr($val,"\$_GET")) { $valu[$felder2[$i]] = htmlentities($_GET[str_replace("\$_GET","",$val)]); } 13 15 elseif (strstr($val,"\$_POST")) { $valu[$felder2[$i]] = htmlentities($_POST[str_replace("\$_POST","",$val)]); } … … 138 140 } 139 141 } 140 $out .= "<h3>".__('Create Entry','wct')."</h3><form action=\"".$url."wctfid=".$_GET['wctfid']."&wctefid=save".($_GET['wctnew'] != '' ? "&wctnew=".$_GET['wctnew'] : "")."\" method=\"POST\" enctype=\"multipart/form-data\">";142 $out .= "<h3>".__('Create Entry','wct')."</h3><form id=\"checking\" action=\"".$url."wctfid=".$_GET['wctfid']."&wctefid=save".($_GET['wctnew'] != '' ? "&wctnew=".$_GET['wctnew'] : "")."\" method=\"POST\" enctype=\"multipart/form-data\">"; 141 143 142 144 if ($captcha == '0') { $out .= "<h2><font color=\"red\">".__('Please fillout captcha corretly!','wct')."</font></h2>"; } … … 148 150 149 151 foreach ($matches[1] as $val => $wert) { 152 if (in_array($wert,$felder3)) { $addon2 = " required "; } else { $addon2 = "";} 153 150 154 if (strpos($rights,",".$wert.",") === false) { 151 155 $addon = " style=\"background-color: grey;\" readonly"; … … 154 158 $addon = ""; 155 159 if ($feld2[$wert] == "int(10)") { 156 $addon = " id=\"f_date_".$wert."\" style=\"background-image: url('".plugins_url('custom-tables/jquery/cal.png')."');background-repeat: no-repeat;background-position: right center; \">157 <script type=\"text/javascript\">jQuery(document).ready(function(){jQuery('#f_date_".$wert."').datepicker({dateFormat : 'yy-mm-dd',firstDay: 1});});</script";158 } 159 } 160 161 if ($feld2[$wert] == "smallint(6)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formint6\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"6\"".$addon ."/>",$inhalt); }160 $addon = " id=\"f_date_".$wert."\" style=\"background-image: url('".plugins_url('custom-tables/jquery/cal.png')."');background-repeat: no-repeat;background-position: right center;width:120px;\""; 161 $skripte = "jQuery('#f_date_".$wert."').datepicker({dateFormat : 'yy-mm-dd',firstDay: 1});"; 162 } 163 } 164 165 if ($feld2[$wert] == "smallint(6)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formint6\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"6\"".$addon2.$addon."/>",$inhalt); } 162 166 elseif ($feld2[$wert] == "int(10)") { 163 167 if (strpos($rights,",".$wert.",") === false) { 164 $inhalt = str_replace("{".$wert."}","<input class=\"wct-formdate\" type=\"text\" name=\"wctn_".$wert."\" value=\"".($valu[$wert] != '' ? $valu[$wert] : date("Y-m-d",time()))."\" maxsize=\"10\"".$addon .">",$inhalt);168 $inhalt = str_replace("{".$wert."}","<input class=\"wct-formdate\" type=\"text\" name=\"wctn_".$wert."\" value=\"".($valu[$wert] != '' ? $valu[$wert] : date("Y-m-d",time()))."\" maxsize=\"10\"".$addon2.$addon.">",$inhalt); 165 169 } 166 170 else { 167 $inhalt = str_replace("{".$wert."}","<input class=\"wct-formdate\" type=\"text\" name=\"wctf_".$wert."\" value=\"".($valu[$wert] != '' ? $valu[$wert] : date("Y-m-d",time()))."\" maxsize=\"10\"".$addon .">",$inhalt);168 } 169 } 170 elseif ($feld2[$wert] == "int(11)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formint11\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"11\"".$addon ."/>",$inhalt); }171 elseif ($feld2[$wert] == "varchar(32)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formchar32\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"32\"".$addon ."/>",$inhalt); }172 elseif ($feld2[$wert] == "varchar(64)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formchar64\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"64\"".$addon ."/>",$inhalt); }173 elseif ($feld2[$wert] == "varchar(128)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formchar128\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"128\"".$addon ."/>",$inhalt); }174 elseif ($feld2[$wert] == "varchar(160)" OR $feld2[$wert] == "varchar(254)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formpic\" id=\"wctp_".$wert."\" type=\"file\" size=\"50\" name=\"wctp_".$wert."\" value=\"".$valu[$wert]."\" />",$inhalt); }171 $inhalt = str_replace("{".$wert."}","<input class=\"wct-formdate\" type=\"text\" name=\"wctf_".$wert."\" value=\"".($valu[$wert] != '' ? $valu[$wert] : date("Y-m-d",time()))."\" maxsize=\"10\"".$addon2.$addon.">",$inhalt); 172 } 173 } 174 elseif ($feld2[$wert] == "int(11)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formint11\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"11\"".$addon2.$addon."/>",$inhalt); } 175 elseif ($feld2[$wert] == "varchar(32)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formchar32\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"32\"".$addon2.$addon."/>",$inhalt); } 176 elseif ($feld2[$wert] == "varchar(64)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formchar64\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"64\"".$addon2.$addon."/>",$inhalt); } 177 elseif ($feld2[$wert] == "varchar(128)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formchar128\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"128\"".$addon2.$addon."/>",$inhalt); } 178 elseif ($feld2[$wert] == "varchar(160)" OR $feld2[$wert] == "varchar(254)") { $inhalt = str_replace("{".$wert."}","<input class=\"wct-formpic\" id=\"wctp_".$wert."\" type=\"file\" size=\"50\" name=\"wctp_".$wert."\" value=\"".$valu[$wert]."\" ".$addon2."/>",$inhalt); } 175 179 elseif (substr($feld2[$wert],0,4) == "enum") { 176 180 if ($addon == "") { 177 $tmp = "<select style=\"width:120px;\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" >";181 $tmp = "<select style=\"width:120px;\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" ".$addon2.">"; 178 182 $defs = explode("xxxoooxxx",str_replace("'","",substr($feld2[$wert],6,(strlen(rtrim($feld2[$wert]))-8)))); 179 183 foreach ($defs as $posibility) { … … 184 188 } 185 189 else { 186 $tmp = "<input size=\"10\" type=\"text\" name=\"wctn_".$wert."\" value=\"".($valu[$wert] != '' ? $valu[$wert] : stripslashes($row->$wert))."\" maxsize=\"32\"".$addon ."/>";190 $tmp = "<input size=\"10\" type=\"text\" name=\"wctn_".$wert."\" value=\"".($valu[$wert] != '' ? $valu[$wert] : stripslashes($row->$wert))."\" maxsize=\"32\"".$addon2.$addon."/>"; 187 191 } 188 192 $inhalt = str_replace("{".$wert."}",$tmp,$inhalt); … … 194 198 foreach ($defs as $posibility) { 195 199 $ji++; 196 $tmp .= "<div class=\"set_checkbox\"><input type=\"checkbox\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."[]\" value=\"".$posibility."\"".($valu[$wert] == $posibility ? ' checked' : '')." >".substr($posibility,0,17)."</div>";200 $tmp .= "<div class=\"set_checkbox\"><input type=\"checkbox\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."[]\" value=\"".$posibility."\"".($valu[$wert] == $posibility ? ' checked' : '')."".$addon2.">".substr($posibility,0,17)."</div>"; 197 201 } 198 202 $inhalt = str_replace("{".$wert."}",$tmp,$inhalt); 199 203 } 200 elseif ($feld2[$wert] == "float(8.2)") { $inhalt = str_replace("{".$wert."}","<input size=\"12\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"11\"".$addon ."/>",$inhalt); }204 elseif ($feld2[$wert] == "float(8.2)") { $inhalt = str_replace("{".$wert."}","<input size=\"12\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".$valu[$wert]."\" maxsize=\"11\"".$addon2.$addon."/>",$inhalt); } 201 205 elseif ($feld2[$wert] == "text") { 202 206 if ($addon != '') { $addon = " style=\"background-color: #CCC;\" readonly=\"readonly\""; } else { $mytextfelder .= "wctf_".$wert.","; } 203 $inhalt = str_replace("{".$wert."}","<textarea class=\"wct-formtext\" id=\"wctf_".$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" style=\"height: 155px;width: 100%;\"".$addon.">".($valu[$wert] != '' ? $valu[$wert] : stripslashes($row->$wert))."</textarea>",$inhalt); 204 } 205 } 206 207 if ($mytextfelder != '') { 208 $wct_elements = substr($mytextfelder,0,strlen($mytextfelder)-1); 209 global $wuk_tinymce; 210 if (class_exists('wuk_tinymce')) { 211 $wuk_tinymce->tinymce_getInitJS($wct_elements,$form->htmlview); 212 } 213 } 214 207 208 if ($mytextfelder != '') { 209 ob_start(); 210 wp_editor(($valu[$wert] != '' ? $valu[$wert] : stripslashes($row->$wert)), ($addon != '' ? "wctn_" : "wctf_").$wert, array('media_buttons' => false,'textarea_rows' => '10','tinymce' => true,'editor_css' => '<style> .wp-editor-wrap { line-height: 1px; } .wp-editor-tabs br { float:right; } pre { line-height: 0px; }</style>')); 211 $out2 = str_replace(array("id=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\""),array("id=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\"".$addon),ob_get_contents()); 212 ob_end_clean(); 213 $inhalt = str_replace("{".$wert."}",$out2,$inhalt); 214 } 215 else { 216 $inhalt = str_replace("{".$wert."}","<textarea class=\"wct-formtext\" id=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" style=\"height: 155px;width: 100%;\"".$addon2.$addon.">".($valu[$wert] != '' ? $valu[$wert] : stripslashes($row->$wert))."</textarea>",$inhalt); 217 } 218 } 219 } 220 221 if ($skripte != '') { 222 $inhalt .= "<script type=\"text/javascript\">jQuery(document).ready(function(){".$skripte."});</script>"; 223 } 224 225 if (count($felder3) >= '1') { 226 $inhalt .= '<script>jQuery.validator.setDefaults({showErrors: function(map, list) {var focussed = document.activeElement;if (focussed && jQuery(focussed).is("input, textarea")) {jQuery(this.currentForm).tooltip("close", {currentTarget: focussed}, true)}this.currentElements.removeAttr("title").removeClass("ui-state-highlight");jQuery.each(list, function(index, error) {jQuery(error.element).attr("title", error.message).addClass("ui-state-highlight");});if (focussed && jQuery(focussed).is("input, textarea")) {jQuery(this.currentForm).tooltip("open", {target: focussed});}}});(function() {jQuery("#checking").tooltip({show: false,hide: false});jQuery(\"#checking\").validate();jQuery(":submit").button();})();</script>'; 227 } 228 215 229 // Create Multiple New Entries 216 230 $menge = substr_count($inhalt,"[again]"); … … 226 240 227 241 $cap = $this->captcha(); 228 $out .= rbr($this->filter_tables($inhalt)).($cap != '1' ? $cap : '')."<br/><input type=\"submit\" name=\"submit\" value=\"". __('Save all Changes', 'wct')."\"></form>";242 $out .= rbr($this->filter_tables($inhalt)).($cap != '1' ? $cap : '')."<br/><input type=\"submit\" name=\"submit\" value=\"".__('Save all Changes', 'wct')."\"></form>"; 229 243 $out = do_shortcode(stripslashes($out)); 230 244 } … … 355 369 } 356 370 $row = $wpdb->get_row("SELECT * FROM `".$wpdb->prefix."wct".$form->r_table."` WHERE `status` != 'passive' AND `id`='".mres($entry)."' ".$filter." LIMIT 1;"); 357 $out .= "<h3>".__('Edit Entry','wct')."</h3><form action=\"".$url."wctfid=".$_GET['wctfid']."&wctefid=save".($_GET['wctnew'] != '' ? "&wctnew=".$_GET['wctnew'] : "")."\" method=\"POST\" enctype=\"multipart/form-data\">";371 $out .= "<h3>".__('Edit Entry','wct')."</h3><form id=\"checking\" action=\"".$url."wctfid=".$_GET['wctfid']."&wctefid=save".($_GET['wctnew'] != '' ? "&wctnew=".$_GET['wctnew'] : "")."\" method=\"POST\" enctype=\"multipart/form-data\">"; 358 372 359 373 $inhalt = str_replace("[again]","",$form->e_setup); … … 363 377 364 378 foreach ($matches[1] as $val => $wert) { 379 if (in_array($wert,$felder3)) { $addon2 = " required "; } else { $addon2 = ""; } 365 380 if (strpos($rights,",".$wert.",") === false) { 366 381 $addon = " style=\"background-color: #CCC;\" readonly"; … … 369 384 $addon = ""; 370 385 if ($feld2[$wert] == "int(10)") { 371 $addon = " id=\"f_date_".$wert."\" style=\"background-image: url('".plugins_url('custom-tables/jquery/cal.png')."');background-repeat: no-repeat;background-position: right center; \"/>".386 $addon = " id=\"f_date_".$wert."\" style=\"background-image: url('".plugins_url('custom-tables/jquery/cal.png')."');background-repeat: no-repeat;background-position: right center;width:120px;\"/>". 372 387 "<script type=\"text/javascript\">jQuery(document).ready(function(){jQuery('#f_date_".$wert."').datepicker({dateFormat : 'yy-mm-dd',firstDay: 1});});</script"; 373 388 } 374 389 } 375 390 376 if ($feld2[$wert] == "smallint(6)") { $inhalt = str_replace("{".$wert."}","<input size=\"7\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"6\"".$addon ."/>",$inhalt); }391 if ($feld2[$wert] == "smallint(6)") { $inhalt = str_replace("{".$wert."}","<input size=\"7\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"6\"".$addon2.$addon."/>",$inhalt); } 377 392 elseif ($feld2[$wert] == "int(10)") { 378 393 if (strpos($rights,",".$wert.",") === false) { 379 $inhalt = str_replace("{".$wert."}","<input size=\"10\" type=\"text\" name=\"wctn_".$wert."\" value=\"".date("Y-m-d",$row->$wert)."\" maxsize=\"10\"".$addon .">",$inhalt);380 } 381 else { 382 $inhalt = str_replace("{".$wert."}","<input size=\"10\" type=\"text\" name=\"wctf_".$wert."\" value=\"".date("Y-m-d",$row->$wert)."\" maxsize=\"10\"".$addon .">",$inhalt);383 } 384 } 385 elseif ($feld2[$wert] == "int(11)") { $inhalt = str_replace("{".$wert."}","<input size=\"12\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"11\"".$addon ."/>",$inhalt); }386 elseif ($feld2[$wert] == "varchar(32)") { $inhalt = str_replace("{".$wert."}","<input size=\"34\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"32\"".$addon ."/>",$inhalt); }387 elseif ($feld2[$wert] == "varchar(64)") { $inhalt = str_replace("{".$wert."}","<input size=\"65\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"64\"".$addon ."/>",$inhalt); }388 elseif ($feld2[$wert] == "varchar(128)") { $inhalt = str_replace("{".$wert."}","<input size=\"112\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"128\"".$addon ."/>",$inhalt); }389 elseif ($feld2[$wert] == "varchar(160)" OR $feld2[$wert] == "varchar(254)") { $inhalt = str_replace("{".$wert."}","<input id=\"nix_".$wert."\" type=\"text\" size=\"50\" name=\"nix_".$wert."\" value=\"".stripslashes($row->$wert)."\" readonly/><input id=\"nix2_".$wert."\" type=\"button\" value=\"".__('Browse','wct')."\" onclick=\"javascript:document.getElementById('nix_".$wert."').style.visibility = 'hidden';document.getElementById('nix_".$wert."').style.display = 'none';document.getElementById('wctp_".$wert."').style.visibility = 'visible';document.getElementById('wctp_".$wert."').style.display = 'block';document.getElementById('nix2_".$wert."').style.visibility = 'hidden';document.getElementById('nix2_".$wert."').style.display = 'none';document.getElementById('wctp_".$wert."').click();\"><input size=\"50\" id=\"wctp_".$wert."\" type=\"file\" name=\"wctp_".$wert."\" value=\"".stripslashes($row->$wert)."\" style=\"visibility:hidden;display:none;\"/>",$inhalt); }394 $inhalt = str_replace("{".$wert."}","<input size=\"10\" type=\"text\" name=\"wctn_".$wert."\" value=\"".date("Y-m-d",$row->$wert)."\" maxsize=\"10\"".$addon2.$addon.">",$inhalt); 395 } 396 else { 397 $inhalt = str_replace("{".$wert."}","<input size=\"10\" type=\"text\" name=\"wctf_".$wert."\" value=\"".date("Y-m-d",$row->$wert)."\" maxsize=\"10\"".$addon2.$addon.">",$inhalt); 398 } 399 } 400 elseif ($feld2[$wert] == "int(11)") { $inhalt = str_replace("{".$wert."}","<input size=\"12\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"11\"".$addon2.$addon."/>",$inhalt); } 401 elseif ($feld2[$wert] == "varchar(32)") { $inhalt = str_replace("{".$wert."}","<input size=\"34\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"32\"".$addon2.$addon."/>",$inhalt); } 402 elseif ($feld2[$wert] == "varchar(64)") { $inhalt = str_replace("{".$wert."}","<input size=\"65\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"64\"".$addon2.$addon."/>",$inhalt); } 403 elseif ($feld2[$wert] == "varchar(128)") { $inhalt = str_replace("{".$wert."}","<input size=\"112\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"128\"".$addon2.$addon."/>",$inhalt); } 404 elseif ($feld2[$wert] == "varchar(160)" OR $feld2[$wert] == "varchar(254)") { $inhalt = str_replace("{".$wert."}","<input id=\"nix_".$wert."\" type=\"text\" size=\"50\" name=\"nix_".$wert."\" value=\"".stripslashes($row->$wert)."\" ".$addon2." readonly/><input id=\"nix2_".$wert."\" type=\"button\" value=\"".__('Browse','wct')."\" onclick=\"javascript:document.getElementById('nix_".$wert."').style.visibility = 'hidden';document.getElementById('nix_".$wert."').style.display = 'none';document.getElementById('wctp_".$wert."').style.visibility = 'visible';document.getElementById('wctp_".$wert."').style.display = 'block';document.getElementById('nix2_".$wert."').style.visibility = 'hidden';document.getElementById('nix2_".$wert."').style.display = 'none';document.getElementById('wctp_".$wert."').click();\"><input size=\"50\" id=\"wctp_".$wert."\" type=\"file\" name=\"wctp_".$wert."\" value=\"".stripslashes($row->$wert)."\" style=\"visibility:hidden;display:none;\"/>",$inhalt); } 390 405 elseif (substr($feld2[$wert],0,4) == "enum") { 391 406 if ($addon == "") { … … 401 416 } 402 417 else { 403 $tmp = "<input size=\"10\" type=\"text\" name=\"wctn_".$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"32\"".$addon ."/>";418 $tmp = "<input size=\"10\" type=\"text\" name=\"wctn_".$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"32\"".$addon2.$addon."/>"; 404 419 } 405 420 $inhalt = str_replace("{".$wert."}",$tmp,$inhalt); … … 411 426 foreach ($defs as $posibility) { 412 427 $ji++; 413 $tmp .= "<div style=\"width:135px;float:left;overflow:hidden;\"><input type=\"checkbox\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."[]\" value=\"".$posibility."\"";428 $tmp .= "<div style=\"width:135px;float:left;overflow:hidden;\"><input ".$addon2." type=\"checkbox\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."[]\" value=\"".$posibility."\""; 414 429 if (stripos($wasjetzt,",".$posibility.",") !== false) { $tmp .= " checked"; } 415 430 $tmp .= ">".substr($posibility,0,17)."</div>"; … … 418 433 $inhalt = str_replace("{".$wert."}",$tmp,$inhalt); 419 434 } 420 elseif ($feld2[$wert] == "float(8.2)") { $inhalt = str_replace("{".$wert."}","<input size=\"12\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"11\"".$addon ."/>",$inhalt); }435 elseif ($feld2[$wert] == "float(8.2)") { $inhalt = str_replace("{".$wert."}","<input size=\"12\" type=\"text\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" maxsize=\"11\"".$addon2.$addon."/>",$inhalt); } 421 436 elseif ($feld2[$wert] == "text") { 422 437 if ($addon != '') { $addon = " style=\"background-color: #CCC;\" readonly=\"readonly\""; } else { $mytextfelder .= "wctf_".$wert.","; } 423 $inhalt = str_replace("{".$wert."}","<textarea id=\"wctf_".$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" style=\"height: 155px;width: 100%;\"".$addon.">".stripslashes($row->$wert)."</textarea>",$inhalt); 438 439 if ($mytextfelder != '') { 440 ob_start(); 441 wp_editor(stripslashes($row->$wert), ($addon != '' ? "wctn_" : "wctf_").$wert, array('media_buttons' => false,'textarea_rows' => '10','tinymce' => true,'editor_css' => '<style> .wp-editor-wrap { line-height: 1px; } .wp-editor-tabs br { float:right; } pre { line-height: 0px; }</style>')); 442 $out2 = str_replace(array("id=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\""),array("id=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\"".$addon),ob_get_contents()); 443 ob_end_clean(); 444 $inhalt = str_replace("{".$wert."}",$out2,$inhalt); 445 } 446 else { 447 $inhalt = str_replace("{".$wert."}","<textarea id=\"wctf_".$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" style=\"height: 155px;width: 100%;\"".$addon2.$addon.">".stripslashes($row->$wert)."</textarea>",$inhalt); 448 } 424 449 } 425 450 else { … … 427 452 if (count($abfrage) == '1') { 428 453 if (preg_match("/(.*)/",$abfrage->name,$treffer)) { 429 echo "<input id=\"wctf_".$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" size=\"".($treffer[1]+1)."\" type=\"text\" />"; 430 } 431 echo "<input id=\"wctf_".$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" size=\"112\" type=\"text\" />"; 432 } 433 else { 434 echo __('undefinied field type','wct')."<input id=\"wctf_".$wert."\" type=\"hidden\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" />"; 435 } 436 } 437 } 438 439 if ($mytextfelder != '') { 440 $wct_elements = substr($mytextfelder,0,strlen($mytextfelder)-1); 441 global $wuk_tinymce; 442 if (class_exists('wuk_tinymce')) { 443 $wuk_tinymce->tinymce_getInitJS($wct_elements,$form->htmlview); 444 } 454 echo "<input id=\"wctf_".$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" size=\"".($treffer[1]+1)."\" type=\"text\" ".$addon2." />"; 455 } 456 echo "<input id=\"wctf_".$wert."\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" size=\"112\" type=\"text\" ".$addon2." />"; 457 } 458 else { 459 echo __('undefinied field type','wct')."<input id=\"wctf_".$wert."\" type=\"hidden\" name=\"".($addon != '' ? "wctn_" : "wctf_").$wert."\" value=\"".stripslashes($row->$wert)."\" ".$addon2." />"; 460 } 461 } 462 } 463 464 if (count($felder3) >= '1') { 465 $inhalt .= '<script>jQuery.validator.setDefaults({showErrors: function(map, list) {var focussed = document.activeElement;if (focussed && jQuery(focussed).is("input, textarea")) {jQuery(this.currentForm).tooltip("close", {currentTarget: focussed}, true)}this.currentElements.removeAttr("title").removeClass("ui-state-highlight");jQuery.each(list, function(index, error) {jQuery(error.element).attr("title", error.message).addClass("ui-state-highlight");});if (focussed && jQuery(focussed).is("input, textarea")) {jQuery(this.currentForm).tooltip("open", {target: focussed});}}});(function() {jQuery("#checking").tooltip({show: false,hide: false});jQuery(\"#checking\").validate();jQuery(":submit").button();})();</script>'; 445 466 } 446 467 -
custom-tables/trunk/readme.txt
r1509473 r1515872 110 110 111 111 == Changelog == 112 113 = 4.1.0 = 114 * [Feature] jQuery Validation for Forms added 115 * [Feature] `date()` and `time()` possible for standard values in forms 116 * [Feature] Required fields in forms possible 117 * [Bugfix] TinyMCE Frontendeditor has been fixed 118 * [Bugfix] Loosing Sort and Order in Backend Table has been fixed 119 * [Bugfix] Picture didn't show correctly in backend has been fixed 120 * [Bugfix] Debug Fieldnames of varchar(32) fields disabled in form view again 121 * [Bugfix] Premium Plugins can be activated on Single installations and MU installations again 112 122 113 123 = 4.0.0 =
Note: See TracChangeset
for help on using the changeset viewer.