Plugin Directory

Changeset 1344507


Ignore:
Timestamp:
02/06/2016 08:19:46 AM (10 years ago)
Author:
ghazale
Message:

minor refinements for Data Storage

Location:
data-storage/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • data-storage/trunk/ghazale-data-storage-main.php

    r1330315 r1344507  
    55Description: 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.
    66Author: Ghazale Shirazi
    7 Version: 2.5.3
     7Version: 2.5.4
    88Text Domain: data-storage
    99Domain Path: /languages
     
    177177    $table_name = $wpdb->prefix . "ghazale_ds_";
    178178    $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 //    }
    205179    ?>
    206180    <form action="" method="post" id="ghazale_ds_add_fields">
     
    228202        </select><i> <?php _e('Select the form to which you want to add the field','data-storage'); ?></i><br><br>
    229203        <?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"); ?>
    231205        <?php _e('Field Type','data-storage'); ?>: <select name="ghazale_ds_field_type" class="ghazale_ds_field_type">
    232206            <option value=""> -- <?php _e('Select Field Type','data-storage'); ?> -- </option>
     
    543517        <h4><?php _e('Form','data-storage'); ?> : <?php echo ucfirst(str_replace(array($db_table_name, "_fields"),"", $_GET['ds-edit-field-table'])); ?> </h4>
    544518        <?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"); ?>
    546520        <?php _e('Field Type','data-storage'); ?>: <select name="ghazale_ds_edit_field_type" class="ghazale_ds_field_type">
    547521            <option value=""> -- <?php _e('Select Field Type','data-storage'); ?> -- </option>
     
    683657                                $output .= "<br><input type=\"date\" name=\"".$field['id']."\" size=\"30\" value=\"". (isset($_POST[$field['id']])? $_POST[$field['id']] : '') ."\" ". $required ." />" . "<br><br>";
    684658                                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;
    685662                            case "CheckBox":
    686663                                $output .= " <input type=\"checkbox\" name=\"".$field['id']."\" value=\"Yes\" ". $required;
     
    889866                            if(get_option('ghazale_ds_confirmation_email')){
    890867                                $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                                }
    892873                                $message = "<p>".get_option('ghazale_ds_confirmation_msg')."</p>";
    893874
  • data-storage/trunk/readme.txt

    r1331996 r1344507  
    44Tags: database, form, multiple forms, unlimited fields, unlimited forms, data download, download csv table, confirmation email, data types
    55Requires at least: 4.0.1
    6 Tested up to: 4.4.1
    7 Stable tag: 2.5.3
     6Tested up to: 4.4.2
     7Stable tag: 2.5.4
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1010
    11 Customizable and Downloadable data table creator. You can have multiple different forms at the same time and save the inputs, collect data, etc.
     11Customizable and Downloadable data table creator. You can have multiple different forms at the same time and can save the inputs.  Collect data, information, etc.
    1212
    1313== Description ==
     
    8585
    8686== Changelog ==
     87= 2.5.4 =
     88* Minor refinement
     89
    8790= 2.5.3 =
    8891* Minor fix
     
    141144
    142145== Upgrade Notice ==
     146= 2.5.4 =
     147* Minor refinement
     148
    143149= 2.5.3 =
    144150* Minor fix
Note: See TracChangeset for help on using the changeset viewer.