Plugin Directory

Changeset 2644079


Ignore:
Timestamp:
12/14/2021 06:12:15 PM (4 years ago)
Author:
outgrow
Message:

removing white space error

Location:
outgrow/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • outgrow/trunk/callingDb.php

    r2641762 r2644079  
    11<?php
    2 
    32global $wpdb;
    43    $db_result = $wpdb->get_results('select * from wp_outgrow_calci_api_table');
  • outgrow/trunk/cookies.php

    r2028953 r2644079  
    1 
    21<?php
    32global $wpdb;
  • outgrow/trunk/fetch.php

    r2641762 r2644079  
    1414       //    addActive();
    1515       }
    16        ?>
     16?>
  • outgrow/trunk/outgrow-api.php

    r2643816 r2644079  
    2424            add_action( 'admin_enqueue_scripts', array( &$this, 'admin_scripts_css' ) );
    2525        }
    26 
    2726        static $header_script1;
    2827    }
    29 
    3028    /**
    3129    * Check if the current user can edit Posts or Pages, and is using the Visual Editor
     
    3937            return;
    4038        }
    41      
    4239        // Check if the logged in WordPress User has the Visual Editor enabled
    4340        // If not, don't register our TinyMCE1 plugin
     
    6360        $plugin_array['custom_class'] = plugin_dir_url( __FILE__ ) . './tinymce-custom-class.js';
    6461        return $plugin_array;
    65      
    6662    }
    6763
     
    7773        array_push( $buttons, 'custom_class' );
    7874        return $buttons;
    79      
    8075    }
    8176
     
    8883        // add_menu_page("Outgrow", "Outgrow", "manage_options", 'final_outgrow_calci_menu', "calci_script_page", "dashicons-cake", 50);
    8984    }
    90 
    91 }
    92 
     85}
    9386$msgError=0;
    9487// add_action( 'calling_db_script_enq', 'calling_db_scripts');
    95 
    9688$outgrow_api_class = new Outgrow_API_Class;
    97 
    98 
    9989// ....others....
    10090// static $header_script1;
     
    110100));
    111101wp_enqueue_script('my_plugin_script');
    112 
    113 
    114102wp_register_style('my-plugin-style4','https://fonts.googleapis.com/icon?family=Material+Icons');
    115103wp_enqueue_style('my-plugin-style4');
    116 
    117104wp_register_style('my-plugin-style', plugins_url('/outgrow/css/style.css'));
    118105wp_register_style('my-plugin-style2', plugins_url('/outgrow/css/line-awesome/css/line-awesome-font-awesome.css'));
     
    131118wp_enqueue_style('fonts2');
    132119// font ends
    133 
    134120register_activation_hook(__FILE__, 'calci_api_table');
    135121register_activation_hook(__FILE__, 'calci_table');
    136122register_deactivation_hook(__FILE__, 'deactivation_table');
    137 
    138123function og_enqueue_script(){
    139     wp_enqueue_script('ajax', 'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js');
     124wp_enqueue_script('ajax', 'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js');
    140125}
    141126add_action('wp_enqueue_scripts','og_enqueue_script');
    142127// add_action('wp_enqueue_styles','og_enqueue_stylesheets');
    143 
    144128// ends
    145129function og_outgrow_calci(){
    146130    add_menu_page("Outgrow", "Outgrow", "manage_options", 'final_outgrow_calci_menu', "calci_script_page", "dashicons-cake", 50);
    147131    // add_menu_page("Outgrow", "Outgrow", "manage_options", 'final_outgrow_calci_menu', "calci_script_page",'', 50);
    148 
    149 }
    150 
     132}
    151133// ..................adding dropdown buttons...................
    152134function add_mce_button() {
     
    162144}
    163145add_action('admin_head', 'add_mce_button');
    164 
    165 
    166146// register new button in the editor
    167147function register_mce_button( $buttons ) {
     
    169149    return $buttons;
    170150}
    171 
    172 
    173151// declare a script for the new button
    174152// the script will insert the shortcode on the click event
     
    177155  return $plugin_array;
    178156}
    179 
    180157// ........................ends...................
    181 
    182 
    183 
    184 // include_once "database.php";
    185 
     158// include_once "database.php";
    186159if(isset($_POST['ajax']) && isset($_POST['show_data'])){
    187160    //  echo $_POST['name'];
     
    189162     exit;
    190163}
    191    
    192164// Cookies area
    193165    include_once "cookies.php";
    194166// cookies area ends
    195 
    196167if (isset($_POST['header_script1'])) {
    197168    if($_POST['header_script1']!=""){
     
    212183        if($res->data){
    213184            $calci_count = count($res->data);
    214         }
    215        
    216 
     185        }     
    217186        if ($res->success == "true" || $res->code != 401 && $calci_count>0) {
    218187            if ($wpdb->insert('wp_outgrow_calci_api_table', array(
     
    234203                    'title' => $res3[$i]->meta_data->title,
    235204                    'image_url' => $res3[$i]->meta_data->image_url
    236                 )) == false) {
    237                    
     205                )) == false) {                   
    238206                }else{
    239            
    240                 }
    241    
     207                }   
    242208            }
    243            
    244209        }else{
    245210            // api_Warning("No API Found - Please add your API to view Calculators.");
    246211            api_Warning("INVALID API");
    247 
    248212        }
    249213    }   
    250214    }
    251215}
    252 
    253216function calci_script_page($api){
    254217    global $wpdb;
     
    257220        $msgError++;
    258221    //    api_Warning("Please add API Key");
    259        ?>
    260        
     222?>       
    261223        <div class="add-api-msg" id="adding-api-key">
    262224            <h2>Please Add API KEY</h2>
    263225        </div>
    264 
    265226        <script>
    266227        if(document.getElementById("api-warning")){
     
    268229        }
    269230    </script>
    270 
    271        <?php
     231<?php
    272232    }else{
    273233        // for api-check at db
     
    294254        }
    295255    }
    296 ?>
    297  
     256?> 
    298257    <div class="super-class">
    299258    <!-- <div id="loader-div-class" class="loader-class" > -->
     
    319278    <form name="form1" style="margin-bottom:0em;" method="post">
    320279        <ul class="main-list">           
    321             <?php
     280<?php
    322281                global $wpdb;
    323282                $db_result = $wpdb->get_results('select * from wp_outgrow_calci_api_table');
    324283                if($db_result){
    325284                    foreach ($db_result as $db_row) {
    326                         ?>
     285?>
    327286                        <li id="api-list">
    328                        
    329                         <input type="button" class="option" id="select-api-key" onclick="selectKey('<?php echo $db_row->api_key ?>')" name ="show_data" value="<?php echo $db_row->api_key ?>">
     287                       <input type="button" class="option" id="select-api-key" onclick="selectKey('<?php echo $db_row->api_key ?>')" name ="show_data" value="<?php echo $db_row->api_key ?>">
    330288                        <button name="delete_data" class="list-close" value="<?php echo $db_row->api_key ?>">x</button>
    331289                        </li>
    332                         <?php
     290<?php
    333291                    }
    334292                }
    335             ?>
    336            
     293?>
    337294        </ul>
    338295    </div>
     
    341298       <br>
    342299    </div>
    343    
    344     <?php
    345    
    346    
     300<?php
    347301    global $wpdb;
    348302    $optionAPI = "";
    349303    $db_result = $wpdb->get_results('select * from wp_outgrow_calci_api_table');
    350304    if ($db_result) {
    351 ?>
    352      
     305?>
    353306        <div id="content" class="hide">
    354307        </div>
    355308<?php
    356     }
    357 
    358      
    359 ?>
    360    </form>
    361                    
     309    }
     310?>
     311   </form>                   
    362312    </select>
    363313    </div>
    364         <!-- <hr> -->
    365    
     314        <!-- <hr> -->   
    366315    <div class="super-class">
    367316        <div class="section-1" id="section-1" style="display:none">
     
    406355                        <img class="icon-class" src= "<?php echo plugins_url('/images/icon-4.png', __FILE__) ?>" alt="outgrow"  onclick="result('Calculator')">
    407356                    </div> -->
    408                 </div>
    409      
     357                </div>     
    410358        </div>
    411359        </div>
     
    413361        <div class="section-2" id="section-2">
    414362        <div id="get-calci-name"></div>
    415 <?php
    416        
    417         include_once "view.php";               
    418    
    419 ?>
    420      
    421      </div>
    422              
     363<?php       
     364        include_once "view.php";
     365?>
     366     </div>             
    423367    </div>
    424 
    425     </div>   
    426 
    427368    </div>
    428 
     369    </div>
    429370<!--  modal open -->
    430     <?php
     371<?php
    431372        include_once "modal.html";
    432     ?>
    433 
     373?>
    434374<!-- modal ennd -->
    435    <?php
    436 }
    437 
     375<?php
     376}
    438377// delete API
    439 
    440378if (isset($_POST['delete_data'])) {
    441379    global $wpdb;
    442 
    443380    $item = sanitize_text_field($_POST['delete_data']);
    444381   
     
    462399    }
    463400}
    464 
    465 
    466401// delete API ends
    467 
    468 
    469402// shortcode starts
    470 
    471403function display_outgrow_calci($atts,$content,$tag){
    472404    $custom="<style>
     
    595527}
    596528add_shortcode('outgrow','display_outgrow_calci');
    597 
    598529// shortcode ends
    599530
     
    613544    }
    614545}
    615 
    616 
    617546// data table
    618547function calci_table(){
     
    635564    }
    636565}
    637 
    638 
    639566// deactivation
    640 
    641567function deactivation_table(){
    642568    global $wpdb;
     
    644570    $wpdb->query('DROP table IF Exists wp_outgrow_calci_api_table');
    645571}
    646 
    647572// icon
    648573add_action('admin_menu', 'custom_favicon');
    649 
    650 
    651 function custom_favicon() {
    652        
     574function custom_favicon() {       
    653575    echo '
    654576        <style>
     
    661583    ';
    662584}
    663 
    664 
    665585//repeated apis
    666586
     
    672592            if($db_row->api_key  == $api){
    673593                api_Warning("API Already Exists - Please add new API.");   
    674             ?>
    675         <?php
     594?>
     595<?php
    676596        return "present";
    677597            }else{
     
    682602    }
    683603}
    684 
    685604function api_Warning($msg){
    686605    // print_r("------------Error Count----------",$msgError);
    687 
    688     ?>
    689      <div class="no-api" id="api-warning" style="display:block">
    690                
    691                 <strong> <?php echo $msg; ?></strong>
    692             </div>
    693     <?php
    694    
    695 }
    696 
    697 
    698 ?>
    699 
     606?>
     607<div class="no-api" id="api-warning" style="display:block">
     608<strong> <?php echo $msg; ?></strong>
     609</div>
     610<?php
     611}
     612?>
  • outgrow/trunk/view.php

    r2643816 r2644079  
    2929<div id="result-Survey" >
    3030       
    31 </div>       
    32 
    33 
    34        
     31</div>             
Note: See TracChangeset for help on using the changeset viewer.