Changeset 1344507
- Timestamp:
- 02/06/2016 08:19:46 AM (10 years ago)
- Location:
- data-storage/trunk
- Files:
-
- 2 edited
-
ghazale-data-storage-main.php (modified) (6 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
data-storage/trunk/ghazale-data-storage-main.php
r1330315 r1344507 5 5 Description: Fully customizable,editable,downloadable data table creator. You can have multiple different forms and their corresponding tables in one wordpress system. Equipped with instant feedback to user upon submitting the form. Perfect for collecting people's data, information, inquiries and many other purposes such as online contests. In addition of having the data in the backend, you also have the option to receive the details of the submitted data, right in your email as well. There's also the option to send Thank you/Confirmation email to the user with customized text and address as well as many other cool features. 6 6 Author: Ghazale Shirazi 7 Version: 2.5. 37 Version: 2.5.4 8 8 Text Domain: data-storage 9 9 Domain Path: /languages … … 177 177 $table_name = $wpdb->prefix . "ghazale_ds_"; 178 178 $tables= $wpdb->get_results("SHOW TABLES LIKE "."'" .$table_name."%_fields'",ARRAY_A); 179 //180 // $table_name_prefix = $wpdb->prefix . "ghazale_ds_";181 // $input_tables= $wpdb->get_results("SHOW TABLES LIKE "."'" .$table_name_prefix."%_inputs'");182 // $order = 0;183 // foreach($input_tables as $input_table){184 // foreach($input_table as $table){185 // $column_exists = $wpdb-> query("SHOW COLUMNS FROM `".$table."` LIKE 'input_order'");186 // if(!$column_exists){187 // $add_column = "ALTER TABLE ". $table. " ADD input_order INT(10) NOT NULL AFTER field_id";188 // $wpdb->query($add_column);189 // $last_field_id = "SELECT MAX(field_id) FROM ".$table. " LIMIT 1";190 // $max_field_id_query = $wpdb-> get_var($last_field_id);191 // $inputs_field_id = "SELECT id,field_id,input_order FROM ".$table. " ORDER BY id ASC";192 // $inputs_field_id_query = $wpdb->get_results($inputs_field_id,ARRAY_A);193 // var_dump($inputs_field_id_query);194 // foreach($inputs_field_id_query as $input){195 // if( $input['field_id'] <= $max_field_id_query ){196 // $wpdb->query('UPDATE '. $table.' SET input_order='.($order+1).' WHERE id='.$input['id']);197 // }198 // if( $input['field_id']== $max_field_id_query){199 // $order = $input['input_order'];200 // }201 // }202 // }203 // }204 // }205 179 ?> 206 180 <form action="" method="post" id="ghazale_ds_add_fields"> … … 228 202 </select><i> <?php _e('Select the form to which you want to add the field','data-storage'); ?></i><br><br> 229 203 <?php _e('Field Name','data-storage'); ?>: <input type="text" name="ghazale_ds_field_name" id="ghazale_ds_field_name" maxlength="300" placeholder="Enter Field Name" value="<?php if(isset($_POST['ghazale_ds_field_name'])){ echo trim($_POST['ghazale_ds_field_name']); }else{ echo ''; } ?>"/><i> <?php _e('Example: Name, Email, Address, etc... (Should be Alphanumeric. Can have space and allowed Symbols: @-_.,\/:?\'!;&~())','data-storage'); ?></i><br><br> 230 <?php $type_array = array("Text Field","Text Area","Drop Down","Multiple Choice","Email","File Upload","Number","Telephone","URL","Date"," CheckBox","Instruction Text"); ?>204 <?php $type_array = array("Text Field","Text Area","Drop Down","Multiple Choice","Email","File Upload","Number","Telephone","URL","Date","Time","CheckBox","Instruction Text"); ?> 231 205 <?php _e('Field Type','data-storage'); ?>: <select name="ghazale_ds_field_type" class="ghazale_ds_field_type"> 232 206 <option value=""> -- <?php _e('Select Field Type','data-storage'); ?> -- </option> … … 543 517 <h4><?php _e('Form','data-storage'); ?> : <?php echo ucfirst(str_replace(array($db_table_name, "_fields"),"", $_GET['ds-edit-field-table'])); ?> </h4> 544 518 <?php _e('Field Name','data-storage'); ?> : <input type="tex" name="ghazale_ds_edit_field_name" id="ghazale_ds_edit_field_name" value="<?php echo $field['field_name']; ?>"/><i> Should be alphanumeric. Can have space and allowed symbols @-_.,\/:?'!;&~()</i><br><br> 545 <?php $type_array = array("Text Field","Text Area","Drop Down","Multiple Choice","Email","File Upload","Number","Telephone","URL","Date"," CheckBox","Instruction Text"); ?>519 <?php $type_array = array("Text Field","Text Area","Drop Down","Multiple Choice","Email","File Upload","Number","Telephone","URL","Date","Time","CheckBox","Instruction Text"); ?> 546 520 <?php _e('Field Type','data-storage'); ?>: <select name="ghazale_ds_edit_field_type" class="ghazale_ds_field_type"> 547 521 <option value=""> -- <?php _e('Select Field Type','data-storage'); ?> -- </option> … … 683 657 $output .= "<br><input type=\"date\" name=\"".$field['id']."\" size=\"30\" value=\"". (isset($_POST[$field['id']])? $_POST[$field['id']] : '') ."\" ". $required ." />" . "<br><br>"; 684 658 break; 659 case "Time": 660 $output .= "<br><input type=\"time\" name=\"".$field['id']."\" size=\"30\" value=\"". (isset($_POST[$field['id']])? $_POST[$field['id']] : '') ."\" ". $required ." />" . "<br><br>"; 661 break; 685 662 case "CheckBox": 686 663 $output .= " <input type=\"checkbox\" name=\"".$field['id']."\" value=\"Yes\" ". $required; … … 889 866 if(get_option('ghazale_ds_confirmation_email')){ 890 867 $to = $user_email; 891 $subject = "Your recent submission on ".get_bloginfo('name'); 868 if(get_option('ghazale_ds_confirmation_subject')){ 869 $subject = get_option('ghazale_ds_confirmation_subject'); 870 }else { 871 $subject = "Your recent submission on " . get_bloginfo('name'); 872 } 892 873 $message = "<p>".get_option('ghazale_ds_confirmation_msg')."</p>"; 893 874 -
data-storage/trunk/readme.txt
r1331996 r1344507 4 4 Tags: database, form, multiple forms, unlimited fields, unlimited forms, data download, download csv table, confirmation email, data types 5 5 Requires at least: 4.0.1 6 Tested up to: 4.4. 17 Stable tag: 2.5. 36 Tested up to: 4.4.2 7 Stable tag: 2.5.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html 10 10 11 Customizable and Downloadable data table creator. You can have multiple different forms at the same time and save the inputs, collect data, etc.11 Customizable and Downloadable data table creator. You can have multiple different forms at the same time and can save the inputs. Collect data, information, etc. 12 12 13 13 == Description == … … 85 85 86 86 == Changelog == 87 = 2.5.4 = 88 * Minor refinement 89 87 90 = 2.5.3 = 88 91 * Minor fix … … 141 144 142 145 == Upgrade Notice == 146 = 2.5.4 = 147 * Minor refinement 148 143 149 = 2.5.3 = 144 150 * Minor fix
Note: See TracChangeset
for help on using the changeset viewer.