Plugin Directory

Changeset 2042908


Ignore:
Timestamp:
03/02/2019 06:07:58 PM (7 years ago)
Author:
codecompiled
Message:

Refactoring:Insert statements for database tables

Location:
wp-settings/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-settings/trunk/readme.txt

    r2042805 r2042908  
    11=== WP Settings ===
    22Contributors: codecompiled
    3 Tags: wordpress settings,php Infroamtion,mysql version,theme details,apache version,WP Settings,mysql information,installed plugins,codecompiled
     3Tags: wordpress settings,php Informtion,database backup,database backup script,mysql version,theme details,apache version,WP Settings,mysql information,installed plugins,codecompiled
    44Tested up to: 5.1
    55Requires PHP: 5.2.4
     
    1818
    1919
    20 Some of the details you can view using this plugin:
     20Some of the options in this plugin:
    2121
    2222* WordPress settings such as version and url.
    2323
    2424* MySQL details such as version and database.
     25
     26* Generate Database Backup Script
    2527
    2628* Server details such as Apache version.
  • wp-settings/trunk/wp-settings.php

    r2042807 r2042908  
    1313/*ceating tabs*/
    1414function ilc_admin_tabs( $current = '00' ) {
    15     $tabs = array( 'homepage' => 'Home Settings', 'databse' => 'Databse');
     15    $tabs = array( 'homepage' => 'Home Settings', 'databse' => 'Database Settings');
    1616    echo '<div id="tabs" class="icon32"><br></div>';
    1717    echo '<h2 class="nav-tab-wrapper">';
     
    210210
    211211$tab='';
    212 //echo 'in wpsettings_GetWPInfo';
    213212if(isset($_GET['tab']))
    214213$tab=$_GET['tab'] ;
    215214
    216 //$regstration = $_GET['registration'];
    217 
    218215//echo $tab;
    219216//check which tab to display
    220 if($tab!='')
    221 {
     217
    222218   echo '<table class="form-table">';
    223219   switch ( $tab ){
    224220
    225221      case 'databse' :
    226       //echo 'aaaaaa';
    227       //backup_tables(DB_HOST,DB_USER,DB_PASSWORD,DB_NAME);
    228        //  echo "f";
    229          ?>
     222         ?>
    230223       
    231224        <?php
     
    247240         <?php
    248241      break;
     242 default:
     243          getHomePageContent(); ?>
     244         
     245       
     246         <?php
     247      break;
    249248      case 'homepage' :
    250249         ?>
     
    254253   }
    255254   echo '</table>';
    256 }
     255
    257256}
    258257//check which tab to display
     
    265264<?php $sqldetails=wpsettings_getMySqlDetails();?>
    266265<tr>
    267     <th colspan="2">
    268     MySQL Details
     266    <th >
     267    Following is the information about the database
    269268    </th>
    270269   
     
    283282     }?>   
    284283<tr>
    285 <td>
    286 Download database script
     284<td colspan="2">
     285Click the download button to take backup of the database
    287286<input type="submit" value="Download" name="submit_btn">
    288287</td>
     
    314313      $result = $mysqli->query('SHOW TABLES');
    315314     
    316       if(isset($result))
    317       {
    318         echo 'variable is null';
    319       }
    320       else
    321       {
    322          echo 'variable is null';
    323       }
    324      
     315         
    325316      $tableCount=0;
    326317      $tables = array();
     
    332323    }
    333324   
    334     echo 'tableCount'.$tableCount;
    335    
    336    
    337    
    338         foreach($tables as $table)
     325            foreach($tables as $table)
    339326    {
    340327                  echo "step no 2";
     
    351338        for ($i = 0; $i < $num_fields; $i++)
    352339        {
    353             while($row =  mysqli_fetch_row($mysqli ,$result))
     340            while($row =  mysqli_fetch_row($result))
    354341            {
    355342                $return.= 'INSERT INTO '.$table.' VALUES(';
Note: See TracChangeset for help on using the changeset viewer.