Beispiel #1
0
function dbcbackup_header()
{
    $header = "-- Database Cron Backup \n";
    $header .= "-- Version 1.0 for Wordpress 2.5+ \n";
    $header .= "-- Copyright Chris T aka Tefra http://www.t3-design.com \n";
    $header .= "-- Generated: " . date('l dS \\of F Y h:i A', time() + get_option('gmt_offset') * 3600) . " \n";
    $header .= "-- MySQL Server: " . mysql_get_host_info() . "\n";
    $header .= "-- MySQL Server version: " . mysql_get_server_info() . "\n";
    $header .= "-- Database: " . dbcbackup_backquote(DB_NAME) . "\n";
    $header .= "-- -------------------------------------------------------- \n";
    return $header;
}
Beispiel #2
0
/**
 * This is the header of the SQL file
 * @return string
 */
function dbcbackup_header()
{
    //@todo tidy this up
    $link = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD);
    $header = "# ####################################################### \n";
    $header .= "#  \n";
    $header .= "# DBC Backup 2\n";
    $header .= "# Version 2.3 for Wordpress 3.6 \n";
    $header .= "# Plugin by Damien Saunders http://wordpress.damien.co \n";
    $header .= "# Generated: " . date('l dS \\of F Y h:i A', time() + get_option('gmt_offset') * 3600) . " \n";
    $header .= "# MySQL Server: " . mysqli_get_host_info($link) . "\n";
    $header .= "# MySQL Server version: " . mysqli_get_server_info($link) . "\n";
    $header .= "# Database: " . dbcbackup_backquote(DB_NAME) . "\n";
    $header .= "#  \n";
    $header .= "# ####################################################### \n";
    return $header;
}