Changeset 2042807
- Timestamp:
- 03/02/2019 01:23:10 PM (7 years ago)
- File:
-
- 1 edited
-
wp-settings/trunk/wp-settings.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wp-settings/trunk/wp-settings.php
r2042805 r2042807 13 13 /*ceating tabs*/ 14 14 function ilc_admin_tabs( $current = '00' ) { 15 $tabs = array( 'homepage' => 'Home Settings', 'databse' => 'Datab ase Settings');15 $tabs = array( 'homepage' => 'Home Settings', 'databse' => 'Databse'); 16 16 echo '<div id="tabs" class="icon32"><br></div>'; 17 17 echo '<h2 class="nav-tab-wrapper">'; … … 25 25 //ilc_admin_tabs(); 26 26 /*ceating tabs*/ 27 28 27 29 add_action('admin_menu', 'wpsettings_setupOptionsMenu'); 30 31 32 33 28 34 // action function for above hook 29 35 function wpsettings_setupOptionsMenu() { … … 31 37 add_menu_page("WP Settings","WP Settings","install_plugins","wp-settings", 'wpsettings_DisplaySetingsPage'); 32 38 } 39 33 40 function wpsettings_load_scripts_styles() { 34 41 wp_enqueue_script( "wp-settings-script", plugin_dir_url( __FILE__ ) . '/js/wp-settings-script.js' ); … … 201 208 //main method to retreive wordpress information 202 209 function wpsettings_GetWPInfo() { 203 204 if(isset($_POST["name"])) 205 { 206 207 208 echo $_POST["name"]; 209 } 210 210 211 $tab=''; 211 212 //echo 'in wpsettings_GetWPInfo'; 213 if(isset($_GET['tab'])) 212 214 $tab=$_GET['tab'] ; 213 $regstration = $_GET['registration']; 215 216 //$regstration = $_GET['registration']; 214 217 215 218 //echo $tab; 216 219 //check which tab to display 217 220 if($tab!='') 218 221 { 219 222 echo '<table class="form-table">'; 220 223 switch ( $tab ){ … … 239 242 <?php 240 243 break; 241 default: 242 getHomePageContent(); ?> 243 244 case 'footer' : 245 ?> 244 246 245 247 <?php … … 253 255 echo '</table>'; 254 256 } 257 } 255 258 //check which tab to display 256 259 … … 280 283 }?> 281 284 <tr> 282 <td colspan="2">283 Download sql script,for creating and inserting values in tables.285 <td> 286 Download database script 284 287 <input type="submit" value="Download" name="submit_btn"> 285 288 </td> … … 348 351 for ($i = 0; $i < $num_fields; $i++) 349 352 { 350 while($row = mysqli_fetch_row($ result))353 while($row = mysqli_fetch_row($mysqli ,$result)) 351 354 { 352 echo 'insert script';353 355 $return.= 'INSERT INTO '.$table.' VALUES('; 354 356 for($j=0; $j < $num_fields; $j++) … … 365 367 } 366 368 367 ob_clean();368 header("Content-type: application/text");369 header("Content-Disposition: attachment; filename=dbBackup.sql");370 echo $return;369 ob_clean(); 370 header("Content-type: application/text"); 371 header("Content-Disposition: attachment; filename=dbBackup.txt"); 372 echo $return; 371 373 exit(); 372 374 } … … 495 497 </tr> 496 498 <?php 497 498 499 }?> 499 500 </table> … … 506 507 <th colspan="2"> 507 508 Server Details 508 </t d>509 </th> 509 510 </tr> 510 511 <?php foreach($phpdetails as $sqlKey=>$sqlValue) { ?> … … 527 528 <th colspan="2"> 528 529 Plugin Details 529 </t d>530 </th> 530 531 </tr> 531 532 <?php foreach($plugindetails as $sqlKey=>$sqlValue) { ?> … … 539 540 </tr> 540 541 <?php 541 542 } ?> 542 } ?></table> 543 543 <!-- add new section here--> 544 545 546 544 <?php }?> 547 548 549 </table>550 545 <!-- SQL DETAILS ENDS--> 551 552 <?php 553 } ?> 554 </table> 555 556 557 <?php function wpsettings_DisplaySetingsPage() { 546 <?php } function wpsettings_DisplaySetingsPage() { 558 547 include(plugin_dir_path( __FILE__ ).'/wp-settings-options.php'); 559 548 } ?>
Note: See TracChangeset
for help on using the changeset viewer.