1
0
Fork 0
Dieser Commit ist enthalten in:
DSB 2011-06-10 21:55:32 +00:00
Ursprung 2b21070b1a
Commit f7a7c71f86
1583 geänderte Dateien mit 454759 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,43 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Helper for returning the absolute URL including scheme and serveraddress
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_AbsoluteUrl extends Zend_View_Helper_Abstract
{
/**
* Build an absolute URL (@see Zend_View_Helper_Url::url())
* @param array $urlOptions
* @param null $name
* @param bool $reset
* @param bool $encode
* @return string
*/
public function absoluteUrl(
array $urlOptions = array(),
$name = null,
$reset = false,
$encode = true
)
{
$serverUrlViewHelper = new Zend_View_Helper_ServerUrl();
$urlViewHelper = new Zend_View_Helper_Url();
$url = $urlViewHelper->url($urlOptions, $name, $reset, $encode);
$absoluteUrl = $serverUrlViewHelper->serverUrl($url);
return $absoluteUrl;
}
}

Datei anzeigen

@ -0,0 +1,49 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Load additional content via ajax
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_AjaxLoad extends Zend_View_Helper_Abstract
{
/**
* Call an ajax action from view
*
* Renders a view snippet which fires the ajax call. The response will
* replace the innerHtml of the given DOM-Id.
*
* @param array $ajaxOptions Options for ajax call (Controller, Action,
* Params to hand over to action)
* @param array $viewOptions Options to be printed to screen (showThrobber)
*
* @return string
*/
public function ajaxLoad($ajaxOptions, $viewOptions = null)
{
$viewRenderer = Zend_Controller_Action_HelperBroker::
getStaticHelper('viewRenderer');
$viewRenderer->initView();
$view = $viewRenderer->view;
$view->domId = str_replace('.', '-', uniqid('', true));
foreach ($ajaxOptions as $key => $val) {
$view->$key = $val;
}
$view->ajaxOptions = $ajaxOptions;
$view->viewOptions = $viewOptions;
return $view->render('helper/ajax-load.phtml');
}
}

Datei anzeigen

@ -0,0 +1,49 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Human readable byte output
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_ByteOutput extends Zend_View_Helper_Abstract
{
/**
* Humanize byte output
*
* @param int $bytes
* @param int $precision
* @param boolean $useHTML
*
* @return string
*/
public function byteOutput($bytes, $precision = 2, $useHtml = true)
{
$unitsLong = array('Bytes', 'KiloBytes', 'MegaBytes', 'GigaBytes',
'TeraBytes', 'PetaBytes', 'ExaBytes', 'YottaBytes');
$unitsShort = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB');
for ($level = 0; $bytes >= 1024; $level++) {
$bytes /= 1024;
}
if (!is_numeric($bytes) || !isset($unitsShort[$level])) {
return $bytes;
}
$pattern = '<span class="explain tooltip" title="%s">%s</span>';
$suffix = sprintf($pattern, $unitsLong[$level], $unitsShort[$level]);
if (!$useHtml) {
$suffix = strip_tags($suffix);
}
$ret = sprintf("%01." . $precision . "f", round($bytes, $precision));
return trim($ret . ' ' . $suffix);
}
}

Datei anzeigen

@ -0,0 +1,44 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Output human readable byte output
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_Filesize extends Zend_View_Helper_Abstract
{
public $view;
public function setView(Zend_View_Interface $view)
{
$this->view = $view;
}
/**
* Output human readable filesize
*
* @param string $filename Filename to read size
*
* @return string
*/
public function filesize($file)
{
$size = 0;
if (is_readable($file)) {
$size = filesize($file);
}
$size = $this->view->byteOutput($size);
return $size;
}
}

Datei anzeigen

@ -0,0 +1,26 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Get name of configuration
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_GetConfigTitle extends Zend_View_Helper_Abstract
{
public function getConfigTitle($configName)
{
$config = Msd_Configuration::getInstance();
$configData = $config->loadConfiguration($configName, false);
return $configData->general->title;
}
}

Datei anzeigen

@ -0,0 +1,35 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Get free disk space
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_GetFreeDiskspace extends Zend_View_Helper_Abstract
{
/**
* Get free diskspace
*
* @return string
*/
public function getFreeDiskspace()
{
$lang = Msd_Language::getInstance()->getTranslator();
$ret = $lang->_('L_NOTAVAIL');
$dfs = @diskfreespace(APPLICATION_PATH);
if ($dfs) {
$ret = $this->view->byteOutput($dfs);
}
return $ret;
}
}

Datei anzeigen

@ -0,0 +1,86 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Get img-tag for icon
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_GetIcon extends Zend_View_Helper_Abstract
{
/**
* Get html-img-tag for icon image
*
* @param string $name
* @param string $title
* @param int $size
*
* @return string
*/
public function getIcon($name, $title='', $size='')
{
static $baseUrl = false;
if (!$baseUrl) {
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
}
$icons = self::_getIconFilenames();
if (!isset($icons[$name])) {
throw new Msd_Exception(
'GetIcon: unknown icon \''.$name .'\' requested'
);
}
$config = Msd_Configuration::getInstance();
$img = '<img src="'.$baseUrl.'/%s/%s" alt="%s" title="%s" />';
if ($size>'') {
$img = '<img src="'.$baseUrl.'/%s/%sx%s/%s" alt="%s" title="%s" />';
$ret = sprintf(
$img,
$config->get('paths.iconpath'),
$size,
$size,
$icons[$name],
$title, $title
);
} else {
$ret = sprintf(
$img,
$config->get('paths.iconpath'),
$icons[$name],
$title,
$title
);
}
return $ret;
}
/**
* Get default values from defaultConfig.ini
*
* @return object
*/
private function _getIconFilenames ()
{
static $icons = false;
if (!$icons) {
$config = Msd_Configuration::getInstance();
$file = realpath(
APPLICATION_PATH . DS . '..' . DS . 'public'
. DS . $config->get('paths.iconpath') . DS . 'icon.ini'
);
$iconsIni = new Zend_Config_Ini($file, 'icons');
$icons = $iconsIni->toArray();
unset($iconsIni);
}
return $icons;
}
}

Datei anzeigen

@ -0,0 +1,80 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Get img source
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_GetIconSrc extends Zend_View_Helper_Abstract
{
/**
* Get path of an image
*
* @param string $name
* @param int $size
*
* @return string
*/
public function getIconSrc($name, $size='')
{
static $baseUrl = false;
if (!$baseUrl) {
$baseUrl = Zend_Controller_Front::getInstance()->getBaseUrl();
}
$icons = self::_getIconFilenames();
if (!isset($icons[$name])) {
throw new Msd_Exception(
'GetIconSrc: unknown icon \''.$name . '\' requested'
);
}
$config = Msd_Configuration::getInstance();
$img = $baseUrl.'/%s/%s';
if ($size>'') {
$img = $baseUrl.'/%s/%sx%s/%s';
$ret = sprintf(
$img,
$config->get('paths.iconpath'),
$size,
$size,
$icons[$name]
);
} else {
$ret = sprintf(
$img, $config->get('paths.iconpath'), $icons[$name]
);
}
return $ret;
}
/**
* Get default values from defaultConfig.ini
*
* @return object
*/
private function _getIconFilenames ()
{
static $icons = false;
if (!$icons) {
$config = Msd_Configuration::getInstance();
$file = realpath(
APPLICATION_PATH . DS . '..' . DS . 'public'
. DS . $config->get('paths.iconpath') . DS .'icon.ini'
);
$iconsIni = new Zend_Config_Ini($file, 'icons');
$icons = $iconsIni->toArray();
unset($iconsIni);
}
return $icons;
}
}

Datei anzeigen

@ -0,0 +1,34 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Get server protocol
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_GetServerProtocol extends Zend_View_Helper_Abstract
{
/**
* Get server protocol
*
* @return string
*/
public function getServerProtocol()
{
if (isset($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) == 'on') {
return 'https://';
} else {
return 'http://';
}
}
}

Datei anzeigen

@ -0,0 +1,32 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Get name of currently logged in user
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_GetUsername extends Zend_View_Helper_Abstract
{
/**
* Get name of currently logged in user
*
* @param string $time
*
* @return string
*/
public function getUsername()
{
$auth =Zend_Auth::getInstance()->getIdentity();
return $auth['name'];
}
}

Datei anzeigen

@ -0,0 +1,35 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Check if engine of table supports optimization
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_IsTableOptimizable extends Zend_View_Helper_Abstract
{
/**
* Detect if the table engine allwos optimization.
*
* @param string $tableEngine The engine of the table
*
* @return boolean
*/
public function isTableOptimizable($tableEngine)
{
$optimizable = array('MyISAM', 'InnoDB', 'ARCHIVE');
if (in_array($tableEngine, $optimizable)) {
return true;
}
return false;
}
}

Datei anzeigen

@ -0,0 +1,31 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Escape quotes in strings placed inside javascript alerts or confirms
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_JsEscape extends Zend_View_Helper_Abstract
{
/**
* Escape quotes
*
* @param string $text
*
* @return string
*/
public function jsEscape($text)
{
return str_replace('\'', '\\\'', $text);
}
}

Datei anzeigen

@ -0,0 +1,105 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Renders the menu
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_Menu extends Zend_View_Helper_Abstract
{
/**
* Renders the menu
*
* @param Msd_Version $version Msd_Version object
*
* @return void
*/
public function menu(Msd_Version $version)
{
$front = Zend_Controller_Front::getInstance();
$request = $front->getRequest();
if ($request->getActionName() == 'login') {
// reset menu state. Maybe user logs in again and has blended out
// the menu before.
$this->_resetMenuState();
//don't render menu when we show the login form
return;
}
$view = $this->view;
$view->databases = $this->_getDatabases();
$view->showMenu = $this->_isMenuShown();
$view->msdVersion = $version->getMsdVersion();
$menu = $view->render('index/menu.phtml');
return $menu;
}
/**
* Get list of databases
*
* Returns the list of accessable databases for actual user. If no database
* is selected, set first one as active and use it.
*
* @return array Numeric array with names of databases
*/
private function _getDatabases()
{
$actualDb = $this->view->config->get('dynamic.dbActual');
$databases = $this->view->config->get('dynamic.databases');
$dbo = Msd_Db::getAdapter();
if (empty($databases) || $dbo->selectDb($actualDb) !== true) {
// couldn't connect to db - refresh db-list
$databases = $dbo->getDatabaseNames();
// if database was deleted or is not accessible by user
// fallback to default db
$defaultDb = $this->view->config->get('config.dbuser.defaultDb');
if ($defaultDb != '') {
$actualDb = $defaultDb;
if ($dbo->selectDb($actualDb) !== true) {
// couldn't connect to default db - fallback to first found
$actualDb = $databases[0];
$dbo->selectDb($actualDb);
}
}
$this->view->config->set('dynamic.dbActual', $actualDb);
$this->view->config->set('dynamic.databases', $databases);
}
return $databases;
}
/**
* Detect if menu must be shown or hidden.
*
* @return integer
*/
private function _isMenuShown()
{
$menu = new Zend_Session_Namespace('menu');
if (!isset($menu->showMenu)) {
$menu->showMenu = 1;
};
return (int) $menu->showMenu;
}
/**
* Set menu state to "show".
*
* Actual menu state is saved to session
*
* @return void
*/
private function _resetMenuState()
{
$menu = new Zend_Session_Namespace('menu');
$menu->showMenu = 1;
}
}

Datei anzeigen

@ -0,0 +1,34 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Formats a number
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_NumberFormat extends Zend_View_Helper_Abstract
{
/**
* Format a number and return string ready to output
*
* @param float $nr Number to format
* @param int $precision Precision defaults to 0
*
* @return string
*/
public function numberFormat($number, $precision = 0)
{
$number = round($number, $precision);
$ret = number_format($number, $precision, ',', '.');
return $ret;
}
}

Datei anzeigen

@ -0,0 +1,49 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Convert output to HTML
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_Out extends Zend_View_Helper_Abstract
{
/**
* Helper to convert common values to HTML output
*
* Escape values
* Conditionally convert NULL values to "NULL" as string.
* Conditionally surround value with a HTML tag.
*
* @param string $value The value that may be converted
* @param boolean $ouputNull Whether to convert NULL values to string NULL
* @param string $decorator Decorate output with this HTML-Tag
*
* @return string HTML-Text ready to print to screen
*/
public function out($value, $outputNull = false, $decorator = '')
{
$ret = $this->view->escape($value);
if ($outputNull === true && is_null($value)) {
$ret = 'NULL';
}
if ($decorator > '') {
/*
* '%1$s means: Use the same value as in the first appearance of
* '%s' is used.
*/
$ret = sprintf('<%s>'.$ret.'</%1$s>', $decorator);
}
return $ret;
}
}

Datei anzeigen

@ -0,0 +1,254 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Build a paginator.
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_Paginator extends Zend_View_Helper_Abstract
{
/**
* Types for the buttons in the view script.
* The type depends on the current mode.
*
* @var array
*/
protected $_buttonTypes = array(
'form' => 'submit',
'js' => 'button',
'url' => 'button',
);
/**
* Defaults for the options. This array is used to fill missing options.
*
* @var array
*/
protected $_defaults = array(
'currentPage' => 1,
'pageCount' => 1,
'urlParam' => 'pageNr',
'baseUrl' => '',
'mode' => 'form',
'actions' => array(
'first' => '',
'prev' => '',
'next' => '',
'last' => '',
'change' => '',
),
'method' => 'post',
'enctype' => 'multipart/form-data',
);
/**
* Builds a paginator depending on the given options.
*
* <code>
* <?php
* $options = array(
* 'currentPage', // Number of the currently selected page.
* 'pageCount', // Number of total pages.
* 'urlParam', // Name of the url parameter which gets the new selected page number.
* 'baseUrl', // Base URL for form action and buttons. urlParam and new page number will be appended.
* 'mode', // Mode, in which the paginator operates (can be "form", "url" or "js")
* 'actions' => array( // JS code for the buttons in "js" mode and JS code for the text input field.
* 'first', // The string ":PAGE:" will be replaced with the target page number.
* 'prev',
* 'next',
* 'last',
* 'change', // If you want to call a JS function with the new page number as parameter
* ), // use "myFunc(this.value);".
* 'method', // Value for "method" HTML attribute of the "form" tag.
* 'enctype', // Value for "enctype" HTML attribute of the "form" tag.
* );
* ?>
* <code>
*
* @param array $options Options for the paginator
*
* @return string HTML code for view script inclusion
*/
public function paginator(array $options)
{
$view = clone $this->view;
$view->clearVars();
$options = array_merge($this->_defaults, $options);
$buttons = $this->_getButtons($options);
$onChange = $this->_getOnChange($options['mode'], $options['baseUrl'], $options['urlParam']);
if ($options['mode'] == 'js') {
$onChange = $this->_getOnChange($options['mode'], $options['actions']['change'], $options['urlParam']);
}
$viewData = array(
'currentPage' => $options['currentPage'],
'pageCount' => $options['pageCount'],
'urlParam' => $options['urlParam'],
'onChange' => $onChange,
'buttonType' => $this->_buttonTypes[$options['mode']],
'first' => $buttons['first'],
'prev' => $buttons['prev'],
'next' => $buttons['next'],
'last' => $buttons['last'],
'formEncType' => $options['enctype'],
'formAction' => $options['baseUrl'],
'formMethod' => $options['method'],
);
$view->assign($viewData);
return $view->render('helper/paginator.phtml');
}
/**
* Builds the information for the buttons (first page, previous page, next page and last page).
*
* @param array $options Button options
*
* @return array Information for the view script
*/
protected function _getButtons(array $options)
{
$buttons = array();
$buttons['first'] = $this->_getButtonInfo(
(bool) ($options['currentPage'] <= 1)
);
$buttons['first']['icon'] = 'First' . $buttons['first']['icon'];
$buttons['first']['click'] = $this->_getButtonClick(
$options['mode'],
array(
'targetPage' => 1,
'onClick' => $options['actions']['first'],
'baseUrl' => $options['baseUrl'],
'urlParam' => $options['urlParam'],
)
);
$buttons['prev'] = $this->_getButtonInfo(
(bool) ($options['currentPage'] <= 1)
);
$buttons['prev']['icon'] = 'Back' . $buttons['prev']['icon'];
$buttons['prev']['click'] = $this->_getButtonClick(
$options['mode'],
array(
'targetPage' => $options['currentPage'] - 1,
'onClick' => $options['actions']['prev'],
'baseUrl' => $options['baseUrl'],
'urlParam' => $options['urlParam'],
)
);
$buttons['next'] = $this->_getButtonInfo(
(bool) ($options['currentPage'] >= $options['pageCount'])
);
$buttons['next']['icon'] = 'Forward' . $buttons['next']['icon'];
$buttons['next']['click'] = $this->_getButtonClick(
$options['mode'],
array(
'targetPage' => $options['currentPage'] + 1,
'onClick' => $options['actions']['next'],
'baseUrl' => $options['baseUrl'],
'urlParam' => $options['urlParam'],
)
);
$buttons['last'] = $this->_getButtonInfo(
(bool) ($options['currentPage'] >= $options['pageCount'])
);
$buttons['last']['icon'] = 'Last' . $buttons['last']['icon'];
$buttons['last']['click'] = $this->_getButtonClick(
$options['mode'],
array(
'targetPage' => $options['pageCount'],
'onClick' => $options['actions']['last'],
'baseUrl' => $options['baseUrl'],
'urlParam' => $options['urlParam'],
)
);
return $buttons;
}
/**
* Builds the basic info for a button (disabled status and disabled suffix for buttons icon)
*
* @param bool $disabled Status of the button
*
* @return array Basic info about the button
*/
protected function _getButtonInfo($disabled)
{
return array(
'disabled' => $disabled ? ' disabled="disabled"' : '',
'icon' => $disabled ? 'Disabled' : '',
);
}
/**
* Builds the javascript code for the HTML attribute "onclick".
*
* @param string $mode Current paginator mode (can be "form", "url" or "js")
* @param array $options Options for the "onclick" attribute
*
* @return string JS-Code for the "onclick" attribute
*/
protected function _getButtonClick($mode, array $options)
{
$onClick = '';
if ($mode == 'form') {
$onClick = "$(this).parent().children('select').val(" . $options['targetPage'] . "); "
. "$(this).parent().parent()[0].submit();";
}
if ($mode == 'url') {
$onClick = "window.location.href = '" . rtrim($options['baseUrl'], '/')
. "/{$options['urlParam']}/{$options['targetPage']}/';";
}
if ($mode == 'js') {
$onClick = str_replace(':PAGE:', $options['targetPage'], $options['onClick']);
}
return $onClick;
}
/**
* Builds the Javascript code for "onchange" HTML attribute.
* This code is used for the combobox.
*
* @param string $mode Current paginator mode (can be "form", "url" or "js")
* @param string $baseUrl Base URL or Javascript code for the event.
* @param string $urlParam Name of the URL param. Its value will set to the entered page.
*
* @return string JS-Code for the "onchange" HTML attribute.
*/
protected function _getOnChange($mode, $baseUrl = '', $urlParam = '')
{
$onChange = "";
if ($mode == 'form') {
$onChange = "$(this).parent().parent()[0].submit();";
}
if ($mode == 'url') {
$onChange = "window.location.href = '" . rtrim($baseUrl, '/') . "/$urlParam/' + this.value + '/';";
}
if ($mode == 'js') {
$onChange = "$baseUrl";
}
return $onChange;
}
}

Datei anzeigen

@ -0,0 +1,178 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Displayment of messages
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_PopUpMessage extends Zend_View_Helper_Abstract
{
/**
* Stores the information about the messages to display.
*
* @var array
*/
private $_messages = array();
/**
* Mapping of Msd_Config position to jquery ui param
*
* @var array
*/
private $_positions = array(
'topLeft' => array('left','top'),
'topCenter' => array('center','top'),
'topRight' => array('right','top'),
'middleLeft' => array('left','center'),
'middleCenter' => array('center','center'),
'middleRight' => array('right','center'),
'bottomLeft' => array('left','bottom'),
'bottomCenter' => array('center','bottom'),
'bottomRight' => array('right','bottom'),
);
/**
* returns the instance of this view helper.
*
* @return Zend_View_Helper_PopUpMessage
*/
public function popUpMessage()
{
return $this;
}
/**
* Adds a new message to the stack.
*
* @param string $messageId Dom-Id of the dialog
* @param string $title Title for the dialog
* @param string|array $message Message to display
* @param array $options Additional options for the dialog box
*
* @return void
*/
public function addMessage($messageId, $title, $message, $options = array())
{
$lang = Msd_Language::getInstance();
$translator = $lang->getTranslator();
$optionKeys = array_keys($options);
if (!in_array('buttons', $optionKeys)) {
$options['buttons'] = array(
'L_OK' => 'function() {$(this).dialog(\'close\');}'
);
}
$translatedButtons = array();
foreach ($options['buttons'] as $key => $value) {
$translatedButtons[ucfirst($translator->_($key))] = $value;
}
$options['buttons'] = $translatedButtons;
if (!in_array('dialogClass', $optionKeys)) {
$options['dialogClass'] = 'info';
}
if (!in_array('position', $optionKeys)) {
$options['position'] = $this->_getDefaultPosition();
}
$options['title'] = $translator->_($title);
if (!empty($message)) {
if (is_array($message)) {
$message[0] = $translator->_($message[0]);
$message = call_user_func_array('sprintf', $message);
} else {
$message = $translator->_($message);
}
}
$this->_messages[$messageId] = array(
'message' => $message,
'params' => $options,
'attribs' => array(
'id' => $messageId,
),
);
}
/**
* Renders the dialogs.
*
* Add "OnLoad" scripts to jQuery and create the HTML-Output.
*
* @return string
*/
public function __toString()
{
$messages = array();
foreach ($this->_messages as $messageInfo) {
$html = '<div class="nodisplay"';
foreach ($messageInfo['attribs'] as $attribName => $attribValue) {
$html .= ' ' . $attribName . '="' . $attribValue . '"';
}
$html .= '>' . $messageInfo['message'] . '</div>';
$javascript = sprintf(
'%s(\'#%s\').dialog(%s);',
ZendX_JQuery_View_Helper_JQuery::getJQueryHandler(),
$messageInfo['attribs']['id'],
$this->_renderOptions($messageInfo['params'])
);
$this->view->jQuery()->addOnLoad($javascript);
$messages[] = $html;
}
return implode("\n", $messages);
}
/**
* Render the dialog options.
*
* This will return modified but valid JSON.
*
* @param array $options Dialog options
*
* @return string
*/
private function _renderOptions($options)
{
$json = '{';
$opts = array();
foreach ($options as $key => $value) {
$jsonOpt = $key . ': ';
if (is_array($value)) {
$jsonOpt .= $this->_renderOptions($value);
} elseif (is_bool($value)) {
$jsonOpt .= $value === true ? 'true':'false';
} elseif (
is_numeric($value) || strpos($value, 'function') !== false
) {
$jsonOpt .= $value;
} else {
$jsonOpt .= '"' . $value . '"';
}
$opts[] = $jsonOpt;
}
$json .= implode(',', $opts) . '}';
return $json;
}
/**
* Get position of notification window from config and mapt to jQueryUi
*
* @return array Array containing jQuerUi-params
*/
private function _getDefaultPosition()
{
$config = Msd_Configuration::getInstance();
$position = $config->get('config.interface.notificationWindowPosition');
if (isset($this->_positions[$position])) {
$position = $this->_positions[$position];
}
return $position;
}
}

Datei anzeigen

@ -0,0 +1,26 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Renders the SqlBrowser head naviagtion menu
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_SqlHeadNavi extends Zend_View_Helper_Abstract
{
public function sqlHeadNavi()
{
$view = $this->view;
return $view->render('sql/sql-head-navi.phtml');
}
}

Datei anzeigen

@ -0,0 +1,37 @@
<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @subpackage View_Helpers
* @version SVN: $Rev$
* @author $Author$
*/
/**
* Returns a formatted string from a w3c timestamp
*
* @package MySQLDumper
* @subpackage View_Helpers
*/
class Msd_View_Helper_TimeToDate extends Zend_View_Helper_Abstract
{
/**
* Get date by native w3c timestamp
*
* @param string $time
*
* @return string
*/
public function timeToDate($time)
{
Zend_Date::setOptions(array('format_type' => 'php'));
try {
$date = new Zend_Date($time);
return $date->toString("d.m.Y H:i:s");
} catch (Exception $e) {
return $e->getMessage();
}
}
}

Datei anzeigen

@ -0,0 +1,69 @@
<?php
$lang = Msd_Language::getInstance();
$this->headMeta()->appendHttpEquiv(
'Content-Type', 'text/html; charset=utf-8'
)
->appendHttpEquiv('expires', 'Wed, 26 Feb 1997 08:21:57 GMT')
->appendHttpEquiv('pragma', 'no-cache')
->appendHttpEquiv('Cache-Control', 'no-cache')
->appendName('author', 'Daniel Schlichtholz')
->appendName('robots', 'noindex,nofollow');
$this->headScript()->appendFile(
$this->baseUrl('/js/jquery/jquery.min.js'),
'text/javascript'
);
$this->headScript()->appendFile(
$this->baseUrl('/js/jquery/jquery-ui.min.js'),
'text/javascript'
);
$this->headScript()->appendFile(
$this->baseUrl('/js/pwdmeter.js'),
'text/javascript'
);
//and the stylesheet for the ui
$this->headLink()->appendStylesheet(
$this->baseUrl().'/css/msd/jquery'
.'/jquery-ui.custom.css'
);
$this->headScript()->appendFile(
$this->baseUrl('/js/script.js'),
'text/javascript'
);
$this->headLink()->appendStylesheet(
$this->baseUrl().'/css/msd/style.css'
);
$version = new Msd_Version();
?>
<?php echo $this->doctype();?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>MySQLDumper <?php echo $version->getMsdVersion();?></title>
<?php
echo $this->headLink() . "\n";
echo $this->headMeta() . "\n";
echo $this->headScript() . "\n";
?>
<style type="text/css">body {direction: ltr;}</style>
</head>
<body>
<div id="container">
<div id="fullcontent">
<h1>
<img src="<?php echo $this->baseUrl(); ?>/css/msd/pics/menu-headlogo.gif" alt="" />
<br />
<?php echo $lang->L_INSTALL;?>: <?php echo $lang->L_MSD_VERSION?> <?php echo $version->getMsdVersion();?>
</h1>
<?php echo $this->partial('install/stepIndicator.phtml', $this->stepInfo);?>
<div id="ajaxContent"><?php echo $this->layout()->content; ?></div>
</div>
</div>
</body>
</html>

Datei anzeigen

@ -0,0 +1,59 @@
<?php
$version = new Msd_Version();
$config = Msd_Configuration::getInstance();
$lang = Msd_Language::getInstance();
$theme = $config->get('config.interface.theme');
$language = $config->get('config.interface.language');
$this->headMeta()->appendHttpEquiv('content-language', $language);
$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8')
->appendHttpEquiv('expires', 'Wed, 26 Feb 1997 08:21:57 GMT')
->appendHttpEquiv('pragma', 'no-cache')
->appendHttpEquiv('Cache-Control', 'no-cache')
->appendName('author', 'Daniel Schlichtholz')
->appendName('robots', 'noindex,nofollow');
$this->jQuery()->addStylesheet($this->baseUrl('/css/' . $theme . '/jquery' . '/jquery-ui.custom.css'));
$this->jQuery()->addStylesheet($this->baseUrl('/css/' . $theme . '/jquery' . '/jquery-ui.autocomplete.css'));
$this->jQuery()->addStylesheet($this->baseUrl('/css/' . $theme . '/style.css'));
$request = Zend_Controller_Front::getInstance()->getRequest();
if ($request->getActionName() == 'login') {
$this->jQuery()->addStylesheet($this->baseUrl('/css/' . $theme . '/login.css'));
}
$this->jQuery()->addJavascriptFile($this->baseUrl('/js/script.js'));
$this->jQuery()->setLocalPath($this->baseUrl('/js/jquery/jquery.min.js'));
$this->jQuery()->setUiLocalPath($this->baseUrl('/js/jquery/jquery-ui.min.js'));
$this->jQuery()->addJavascriptFile($this->baseUrl('/js/jquery/jquery-combobox.js'));
$this->jQuery()->setVersion('1.4.2');
$this->jQuery()->setUiVersion('1.8.15');
$this->jQuery()->uiEnable();
$menu = $this->menu($version);
$messages = (string) $this->popUpMessage();
?>
<?php echo $this->doctype();?>
<html xmlns="http://www.w3.org/1999/xhtml"
lang="<?php echo $language?>"
xml:lang="<?php echo $language?>">
<head>
<title>MySQLDumper <?php echo $version->getMsdVersion();?></title>
<?php
echo (string) $this->jQuery();
echo $this->headMeta() . "\n";
echo $this->headScript() . "\n";
?>
<style type="text/css">body {direction: ltr;}</style>
</head>
<body>
<div id="container">
<?php
echo $messages;
echo $menu;
echo $this->layout()->content;
?>
</div>
<div id="page-loader"><?php echo $this->getIcon('ajax-loader');?></div>
</body>
</html>

Datei anzeigen

@ -0,0 +1,50 @@
<?php
$version = new Msd_Version();
$config = Msd_Configuration::getInstance();
$lang = Msd_Language::getInstance();
$theme = $config->get('config.interface.theme'); //@todo why theme?
$language = $config->get('config.interface.language');
$this->headMeta()->appendHttpEquiv('content-language', $language);
$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8')
->appendHttpEquiv('expires', 'Wed, 26 Feb 1997 08:21:57 GMT')
->appendHttpEquiv('pragma', 'no-cache')
->appendHttpEquiv('Cache-Control', 'no-cache')
->appendName('author', 'Daniel Schlichtholz')
->appendName('robots', 'noindex,nofollow');
$this->jQuery()->addStylesheet($this->serverUrl() . $this->baseUrl() . '/m/css/jquery.mobile-1.0a4.1.css');
$this->jQuery()->addStylesheet($this->serverUrl() . $this->baseUrl() . '/m/css/mobile.css');
$request = Zend_Controller_Front::getInstance()->getRequest();
$this->jQuery()->addJavascriptFile($this->serverUrl() . $this->baseUrl('/js/script.js'));
$this->jQuery()->setLocalPath($this->serverUrl() . $this->baseUrl() . '/m/js/jquery-1.5.js');
$this->jQuery()->addJavascriptFile($this->serverUrl() . $this->baseUrl() . '/m/js/jquery.mobile-1.0a4.1.js');
$this->jQuery()->addJavascriptFile($this->serverUrl() . $this->baseUrl() . '/m/js/jquery.mobile.carousel.js');
$this->jQuery()->setVersion('1.5');
$this->jQuery()->setUiVersion('1.8.5');
$this->jQuery()->uiEnable();
$messages = (string) $this->popUpMessage();
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
lang="<?php echo $language?>"
xml:lang="<?php echo $language?>">
<head>
<title>MySQLDumper Mobile <?php echo $version->getMsdVersion();?></title>
<?php
echo (string) $this->jQuery();
echo $this->headMeta() . "\n";
echo $this->headScript() . "\n";
?>
<style type="text/css">body {direction: ltr;}</style>
</head>
<body >
<?php
echo $messages;
echo $this->layout()->content;
?>
</body>
</html>

Datei anzeigen

@ -0,0 +1,163 @@
<?php
$t = Msd_Language::getInstance()->getTranslator();
?>
<div data-role="page" id="config_menu">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_CONFIG',
'lastPage' => array(
'title' => 'L_HOME',
'url' => $this->absoluteUrl(array(
'controller' => 'index',
'action' => 'index'
)),
))); ?>
<div data-role="content">
<form id="config_form" action="<?php echo $this->absoluteUrl(array(
'controller' => 'config',
'action' => 'index'
));?>">
<button type="submit"><?php echo $t->_('L_SAVE'); ?></button>
<br />
<ul id="config_menu_list" data-role="listview">
<li>
<a href="#config_general">
<?php echo $this->lang->L_GENERAL;?>
</a>
</li>
<li>
<a href="#config_dbuser">
<?php echo $this->lang->L_DBS;?>
</a>
</li>
<li>
<a href="#config_interface">
<?php echo $this->lang->L_CONFIG_INTERFACE;?>
</a>
</li>
<li>
<a href="#config_autodelete">
<?php echo $this->lang->L_CONFIG_AUTODELETE;?>
</a>
</li>
<li>
<a href="#config_email">
<?php echo $this->lang->L_EMAIL;?>
</a>
</li>
<li>
<a href="#config_ftp">
<?php echo $this->lang->L_FTP;?>
</a>
</li>
<li>
<a href="#config_cronscript">
<?php echo $this->lang->L_CRONSCRIPT;?>
</a>
</li>
<li>
<a href="#config_configfiles">
<?php echo $this->lang->L_CONFIGFILES;?>
</a>
</li>
</ul>
<br />
<button type="submit"><?php echo $t->_('L_SAVE'); ?></button>
</form>
</div>
</div>
<div id="config_general" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_GENERAL',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
))); ?>
<div data-role="content">
<?php echo $this->form->getSubForm('general'); ?>
</div>
</div>
<div id="config_dbuser" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_DBS',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
))); ?>
<div data-role="content">
<?php echo $this->form->getSubForm('dbuser'); ?>
</div>
</div>
<div id="config_interface" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_CONFIG_INTERFACE',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
)));?>
<div data-role="content">
<?php echo $this->form->getSubForm('interface'); ?>
</div>
</div>
<div id="config_autodelete" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_CONFIG_AUTODELETE',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
)));?>
<div data-role="content">
<?php echo $this->form->getSubForm('autodelete'); ?>
</div>
</div>
<div id="config_email" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_EMAIL',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
))); ?>
<div data-role="content">
<?php echo $this->form->getSubForm('email'); ?>
</div>
</div>
<div id="config_ftp" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_FTP',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
))); ?>
<div data-role="content">
<?php echo $this->form->getSubForm('ftp'); ?>
</div>
</div>
<div id="config_cronscript" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_CRONSCRIPT',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
))); ?>
<div data-role="content">
<?php echo $this->form->getSubForm('cronscript'); ?>
</div>
</div>
<div id="config_configfiles" data-role="page">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_CONFIGFILES',
'lastPage' => array(
'url' => 'back',
'title' => 'L_CONFIG'
))); ?>
<div data-role="content">
<?php echo $this->form->getSubForm('configfiles'); ?>
</div>
</div>

Datei anzeigen

@ -0,0 +1,53 @@
<?php
echo $this->doctype();
$version = new Msd_Version();
?>
<html>
<head>
<title>MySQLDumper <?php echo $version->getMsdVersion();?> Error</title>
<?php
echo $this->headMeta() . "\n";
echo $this->headScript() . "\n";
?>
</head>
<body>
<?php
if ($this->displayErrors == 1) {
?>
<h1>An error occurred</h1>
<h2><?php echo $this->message ?></h2>
<?php if (isset($this->exception)): ?>
<h3>Exception information:</h3>
<p>
<b>Message:</b> <?php echo $this->exception->getMessage() ?>
<br>
Controller:
<span id="controller">
<?php echo $this->request->getParam('controller'); ?>
</span>
<br>
Action:
<span id="action">
<?php echo $this->request->getParam('action'); ?>
</span>
<br>
Module:
<span id="module">
<?php echo $this->request->getParam('module'); ?>
</span>
</p>
<h3>Stack trace:</h3>
<pre><?php echo $this->exception->getTraceAsString() ?>
</pre>
<h3>Request Parameters:</h3>
<pre><?php echo var_export($this->request->getParams(), true) ?>
</pre>
<?php endif;
}
?>
</body>
</html>

Datei anzeigen

@ -0,0 +1,202 @@
<?php
$version = new Msd_Version();
$menu = $this->menu($version);
$t = Msd_Language::getInstance()->getTranslator();
?>
<div data-role="page" id="menu_1">
<?php echo $this->partial('/partials/header.phtml', array(
'title' => 'L_HOME',
'lastPage' => array(
'title' => 'L_HOME',
'url' => $this->absoluteUrl(array(
'controller' => 'index',
'action' => 'index'
)),
))); ?>
<ul id="carousel_menu" style="display: none;">
<li>
<div id="menu_content" data-role="content">
<div id="menu_icons">
<table id="menu_table" summary="menu">
<tr>
<td>
<div <?php if ($this->controller == 'index')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(array(
'controller' => 'index',
'action' => 'index'
));?>" data-ajax="false">
<?php echo$this->getIcon('Home', $t->_('L_HOME'), 48);?>
</a>
</div>
</td>
<td>
<div <?php if ($this->controller == 'config')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(array(
'controller' => 'config',
'action' => 'index'
));?>" data-ajax="false">
<?php echo $this->getIcon('Configure', $t->_('L_CONFIG'), 48);?>
</a>
</div>
</td>
<td>
<div <?php if ($this->controller == 'files' && $this->action == 'restore')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(array(
'controller' => 'files',
'action' => 'restore'
));?>" data-ajax="false">
<?php echo$this->getIcon('RestoreDatabase', $t->_('L_RESTORE'), 48);?>
</a>
</div>
</td>
</tr>
<tr>
<td>
<div <?php if ($this->controller == 'files' && $this->action != 'restore')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(array(
'controller' => 'files',
'action' => 'index'
));?> data-ajax="false"">
<?php echo$this->getIcon('FileManagement', $t->_('L_FILE_MANAGE'), 48);?>
</a>
</div>
</td>
<td>
<div <?php if ($this->controller == 'sql')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(
array(
'controller' => 'sql',
'action' => 'show.tables'
));?>" data-ajax="false">
<?php echo$this->getIcon('SqlBrowser', $t->_('L_SQL_BROWSER'), 48);?>
</a>
</div>
</td>
<td>
<div <?php if ($this->controller == 'sql.server')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(
array(
'controller' => 'sql.server',
'action' => 'index'
));?>" data-ajax="false">
<?php echo$this->getIcon('Server', $t->_('L_SQL_SERVER'), 48);?>
</a>
</div>
</td>
</tr>
<tr>
<td>
<div <?php if ($this->controller == 'log')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(
array(
'controller' => 'log',
'action' => 'index'
));?>" data-ajax="false">
<?php echo$this->getIcon('log', $t->_('L_LOG'), 48);?>
</a>
</div>
</td>
<td>
<?php if (count($this->databases) > 0): ?>
<div <?php if ($this->controller == 'dump')
echo 'class="active"';?>>
<a href="<?php echo $this->absoluteUrl(
array(
'controller' => 'dump',
'action' => 'index'
)); ?>" data-ajax="false">
<?php echo$this->getIcon('BackupDatabase', $t->_('L_DUMP'), 48);?></a>
</div>
<?php endif; ?>
</td>
<td>
<div class="active">
<a href="http://www.mysqldumper.net/credits/" class="new-window">
<?php echo$this->getIcon('Help', $t->_('L_CREDITS'), 48);?>
</a>
</div>
</td>
</tr>
</table>
</div>
</div>
</li>
</li>
<div id="selectConfig">
<form action="<?php echo $this->absoluteUrl(array(
'controller' => 'index',
'action' => 'selectdb'
));?>"
method="post" id="formSelectDb">
<fieldset id="dbSelect"><legend><?php echo$t->_('L_CHOOSE_DB');?>:</legend>
<div data-role="fieldcontain">
<input type ="hidden" name="lastController" value="<?php echo $this->controller;?>" />
<input type ="hidden" name="lastAction" value="<?php echo $this->action;?>" />
<?php if (count($this->databases) > 0 ) { ?>
<select name="selectedDb" id="selectedDb" data-native-menu="false" onchange="this.form.submit()">
<?php
foreach ($this->databases as $db) {
echo '<option value="'.base64_encode($db).'"';
if ($db == $this->config->get('dynamic.dbActual')) {
echo ' selected="selected"';
}
echo '>'.$db.'</option>';
}
?>
</select>
<?php } else {
echo $t->_('L_NO_DB_FOUND');
} ?>
</div>
</fieldset>
</form>
<form action="<?php echo $this->absoluteUrl(
array(
'controller' => 'index',
'action' => 'switchconfig'
));?>" method="post">
<fieldset id="configSelect"><legend><?php echo$t->_('L_CONFIG');?>:</legend>
<div data-role="fieldcontain">
<input type ="hidden" name="lastController" value="<?php echo $this->controller;?>" />
<input type ="hidden" name="lastAction" value="<?php echo $this->action;?>" />
<select name="selectedConfig" id="selectedConfig" style="width: 157px;" onchange="this.form.submit()">
<?php
$this->configFiles = Msd_File::getConfigNames();
foreach ($this->configFiles as $file) {
echo "\n" . '<option value="' . base64_encode($file) . '"';
if ($this->config->get('dynamic.configFile') == $file) {
echo ' selected="selected"';
}
echo '>'.$this->getConfigTitle($file).'</option>';
}
?>
</select>
</div>
</fieldset>
</form>
</div>
</li>
</ul>
<div data-role="footer" class="ui-bar">
<a href="<?php echo $this->absoluteUrl(
array(
'controller' => 'index',
'action' => 'logout'
));?>"
data-role="button" data-icon="delete" data-ajax="false" >
<?php echo $t->_('L_LOGOUT'); ?>
</a>
</div>
</div>
<script type="text/javascript">
$("#carousel_menu").carousel();
</script>

Datei anzeigen

@ -0,0 +1,36 @@
<?php
$t = Msd_Language::getInstance()->getTranslator();
?>
<div data-role="page" id="login">
<div data-role="header"><h1>MySQL Dumper</h1></div>
<div class="ui-bar ui-bar-b">
<h1><?php echo $t->_('L_LOGIN');?></h1>
</div>
<div data-role="content">
<form id="login_form" action="<?php
echo $this->url(array(
'controller' => 'index',
'action' => 'login',
), null, true);
?>" method="post" rel="external" data-ajax="false">
<div data-role="fieldcontain">
<label for="login_user"><?php echo $t->_('L_USERNAME'); ?>:</label><input type="text" name="user" id="login_user" />
<br />
<label for="login_password"><?php echo $t->_('L_PASSWORD'); ?>:</label><input type="password" name="pass" id="login_password" />
</div>
<div data-role="fieldcontain">
<label for="autologin"><?php echo $t->_('L_LOGIN_AUTOLOGIN'); ?>:</label>
<select name="autologin" id="autologin" data-role="slider">
<option value="1"><?php echo $t->_('L_MOBILE_ON'); ?></option>
<option value="0"><?php echo $t->_('L_MOBILE_OFF'); ?></option>
</select>
</div>
<fieldset class="ui-grid-a">
<div class="ui-block-b">
<input id="login_login" type="submit" data-iconpos="right" data-theme="b" data-icon="arrow-r" value="<?php echo $t->_('L_LOGIN'); ?>"></input>
</div>
</fieldset>
</form>
</div>
</div>

Datei anzeigen

@ -0,0 +1,19 @@
<?php
$t = Msd_Language::getInstance()->getTranslator();
?>
<div data-role="header" data-position="inline">
<?php if(isset($this->lastPage)): ?>
<?php $lastPage = $this->lastPage;?>
<?php if($lastPage['url'] != 'back'): ?>
<a href="<?php echo $lastPage['url'];?>" data-ajax="false" data-icon="back">
<?php else: ?>
<a href="#" data-rel="back" data-icon="back">
<?php endif; ?>
<?php echo $t->_($lastPage['title']);?></a>
<?php endif; ?>
<h1><?php echo $t->_($this->title); ?></h1>
<a href="<?php echo $this->absoluteUrl(array(
'controller' => 'index',
'action' => 'index'
)); ?>" data-ajax="false" data-icon="home"><?php echo $t->_('L_HOME'); ?></a>
</div>

Datei anzeigen

@ -0,0 +1,135 @@
<div id="panel_db" class="panel">
<fieldset>
<legend><?php echo $this->lang->L_CONNECTIONPARS;?></legend>
<div id="connection-params" style="display:none;">
<table style="width:100%" summary="Databases">
<tr class="row-even">
<td><?php echo $this->lang->L_DB_HOST;?>:</td>
<td>
<input class="text" type="text" name="dbhost"
value="<?php echo $this->escape($this->dbHost);?>" />
</td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_DB_USER;?>:</td>
<td><input class="text" type="text" name="dbuser"
value="<?php echo$this->escape($this->dbUser);?>" size="20" />
</td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_DB_PASS;?>:</td>
<td><input class="text" type="password" name="dbpass"
value="<?php echo $this->escape($this->dbPass);?>" size="20" />
</td>
</tr>
<tr class="row-odd">
<td colspan="2">
<br /><strong><?php echo $this->lang->L_EXTENDEDPARS;?></strong>
</td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_PORT;?>:</td>
<td>
<input class="text" type="text" name="dbport"
value="<?php echo $this->escape($this->dbPort);?>" />
</td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_SOCKET;?>:</td>
<td>
<input class="text" type="text" name="dbsocket"
value="<?php echo $this->escape($this->dbSocket);?>" />
</td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_ADD_DB_MANUALLY;?>:</td>
<td>
<input class="text" type="text" name="add_db_manual" value="" />
</td>
</tr>
<?php if ($this->dbAddedMessage > '') { ?>
<tr class="row-odd">
<td colspan="2" class="error">
<?php echo $this->escape($this->dbAddedMessage);?>
</td>
</tr>
<?php } ?>
<tr class="row-even">
<td>&nbsp;</td>
<td>
<p style="padding-left:8px;">
<button class="Formbutton" type="submit" name="save">
<?php echo $this->getIcon('save');?> <?php echo $this->lang->L_SAVE;?>
</button>
</p>
</td>
</tr>
</table>
</div>
<div>
<script type="text/javascript">
$(document).ready(function(){
$('#toggler').toggle(
function(){
$('#connection-params').slideDown(400);
$('#toggleImage').attr('src', '<?php echo $this->getIconSrc("ArrowUp", 16);?>');
}, function(){
$('#connection-params').slideUp(400);
$('#toggleImage').attr('src', '<?php echo $this->getIconSrc("ArrowDown", 16);?>');
});
});
</script>
<button type="button" class="Formbutton" id="toggler">
<img id="toggleImage" src="<?php echo $this->getIconSrc("ArrowDown", 16);?>" alt="" /> <?php echo $this->lang->L_FADE_IN_OUT;?>
</button>
</div>
</fieldset>
<br />
<fieldset>
<legend><?php echo $this->lang->L_DB_BACKUPPARS;?></legend>
<table style="width:100%" summary="Backup parameters">
<tr class="thead">
<th class="right">#</th>
<th><?php echo $this->lang->L_DB;?></th>
<th class="left"><?php echo $this->lang->L_DUMP;?></th>
<th><?php echo $this->lang->L_PREFIX;?></th>
<th><?php echo $this->lang->L_COMMAND_BEFORE_BACKUP;?></th>
<th><?php echo $this->lang->L_COMMAND_AFTER_BACKUP;?></th>
</tr>
<tr class="row-even">
<td colspan="2">&nbsp;</td>
<td class="left" colspan="4">
<a href="javascript:SelectMD(true,'<?php echo $this->nrOfDatabases;?>')"
class="small"><?php echo $this->getIcon('plus');?>
</a>
<a href="javascript:SelectMD(false,'<?php echo $this->nrOfDatabases;?>')"
class="small"><?php echo $this->getIcon('minus');?>
</a>
</td>
</tr>
<?php
$dbs = $this->config->get('config.databases');
echo $this->partial(
'config/databases/listDbs.phtml',
array('databases' => $dbs,
'dbActual' => $this->config->get('dynamic.dbActual'),
'parent' => $this,
)
);
?>
<tr class="row-even">
<td colspan="2">&nbsp;</td>
<td class="left" colspan="4">
<a href="javascript:SelectMD(true,'<?php echo $this->nrOfDatabases;?>')"
class="small"><?php echo $this->getIcon('plus');?></a>
<a href="javascript:SelectMD(false,'<?php echo $this->nrOfDatabases;?>')"
class="small"><?php echo $this->getIcon('minus');?></a>
</td>
</tr>
<?php if ($this->nrOfDatabases == 0) { ?>
<tr><td><?php echo $this->lang->L_NO_DB_FOUND;?></td></tr>
<?php } ?>
</table>
</fieldset>
</div>

Datei anzeigen

@ -0,0 +1,36 @@
<?php
$i =0;
foreach ($this->databases as $db => $val) {
$rowclass = $this->cycle(array('row-even','row-odd'))->next();
if ($db == $this->dbActual) {
$rowclass = 'row-highlight';
}
?>
<tr class="<?php echo $rowclass;?>">
<td class="right"><?php echo$i+1;?>.</td>
<td>
<label for="db_multidump_<?php echo$i;?>" style="display:block">
<?php echo $db;?>
</label>
</td>
<td>
<input type="checkbox" id="db_multidump_<?php echo$i;?>"
name="db_multidump_<?php echo$i;?>"
value="db_multidump_<?php echo$i;?>"
<?php if ($val['dump'] == 1) {?>
checked="checked"
<?php } ?>
/>
</td>
<td>
<input type="text" class="text" name="dbpraefix_<?php echo$i;?>"
size="10" value="<?php echo $this->escape($val['prefix']);?>" />
</td>
<td><?php echo $this->escape($val['command_before_dump']);?></td>
<td><?php echo $this->escape($val['command_after_dump']);?></td>
</tr>
<?php
$i++;
}
?>

Datei anzeigen

@ -0,0 +1,254 @@
<?php
$addReciptientCcUrl = $this->url(
array(
'controller' => 'config',
'action' => 'add.Recipient.Cc',
),
null,
true
);
$deleteReciptientCcUrl = $this->url(
array(
'controller' => 'config',
'action' => 'delete.Recipient.Cc',
),
null,
true
);
$addFtpConnectionUrl = $this->url(
array(
'controller' => 'config',
'action' => 'add.Ftp.Connection',
),
null,
true
);
$deleteFtpConnectionUrl = $this->url(
array(
'controller' => 'config',
'action' => 'delete.Ftp.Connection',
),
null,
true
);
?>
<script type="text/javascript">
/*<![CDATA[*/
$(function() {
$("#tabs").tabs({
event: 'click'
});
$('#tabs').bind('tabsselect', function(event, ui) {
$('#selectedTab').val(ui.panel.id);
});
/* make sure to reopen the same panel after reloading or saving */
$("#tabs").tabs('select', '#<?php echo $this->currentTab;?>');
/* init dialog box */
$("#dialog").dialog({
modal: true,
buttons: {
Ok: function() {
$( this ).dialog( "close" );
}
}
});
/* turn off autocomplete for password fields in form */
$('input[type=password]').each( function() {
$(this).attr('autocomplete','off');
});
/* enable/disabled dependant input elements and set correct state */
$('input[class*="toggler"]').each(
function (el) {
if ($(this).attr('checked') == true) {
// get onclick function
var onclick = $(this).attr('onclick').toString();
// remove line breaks
onclick = onclick.replace(/\n/g, '');
onclick = onclick.replace(/\r/g, '');
// extract myToggle function call
var exp = /(.*){(.*)}(.*)/;
exp.exec(onclick);
var call = RegExp.$2;
call = call.replace(');', '');
call = call.replace(/"/g, '');
call = call.replace(/'/g, '');
call = call.replace(/ /g, '');
// extract myToggle params
var params = call.split(',');
// call function to set state
myToggle(this, params[1], params[2]);
}
});
toggleEmailProgram();
});
function myToggle(obj, enableVal, myClass) {
if ($(obj).attr('value') == enableVal) {
$('.'+myClass).each(
function () {
$(this).removeAttr('disabled');
});
} else {
$('.'+myClass).each(
function () {
$(this).attr('disabled', 'disabled');
});
}
}
function myHide(jqObject) {
if (jqObject.css('display') == 'block') {
jqObject.hide();
}
}
function myShow(jqObject) {
if (jqObject.css('display') == 'none') {
jqObject.show();
}
}
function toggleEmailProgram() {
var value = $('#toggleEmailSettings').val();
switch (value) {
case 'php':
myHide($('.sendmailConfig'));
myHide($('.smtpConfig'));
break;
case 'sendmail':
myShow($('.sendmailConfig'));
myHide($('.smtpConfig'));
break;
case 'smtp':
myHide($('.sendmailConfig'));
myShow($('.smtpConfig'));
break;
}
}
//enable inputs right before submit for not losing
//content of disabled inputs
function enableInputs( myClass) {
$('input[class*="Toggle"]').each(
function () {
$(this).removeAttr('disabled');
});
}
function addEmailReciptientCc()
{
$('#config_form').attr('action','<?php echo $addReciptientCcUrl; ?>');
$('#config_form').submit();
}
function deleteEmailReciptientCc(recipientId)
{
setParam(recipientId);
$('#config_form').attr('action','<?php echo $deleteReciptientCcUrl; ?>');
$('#config_form').submit();
}
function addFtpConnection()
{
$('#config_form').attr('action','<?php echo $addFtpConnectionUrl; ?>');
$('#config_form').submit();
}
function deleteFtpConnection(recipientId)
{
setParam(recipientId);
$('#config_form').attr('action','<?php echo $deleteFtpConnectionUrl; ?>');
$('#config_form').submit();
}
function setParam(value)
{
$('#param').val(value);
}
/*]]>*/
</script>
<div id="content">
<h2><?php echo $this->lang->L_CONFIG_HEADLINE;?>: <?php echo $this->config->get('dynamic.configFile');?>
<span class="small">(<?php echo $this->lang->L_MSD_MODE;?>: <?php echo $this->config->get('config.general.mode');?>)</span></h2>
<form method="post" action="<?php
echo $this->url(
array(
'controller' => 'config',
'action' => 'index'
),
null,
true
);
?>"
id="config_form" onsubmit="enableInputs('Toggle');">
<div id="tabs">
<ul>
<li>
<a href="#tab_general">
<?php echo $this->getIcon('Configure', '', 16);?><?php echo $this->lang->L_GENERAL;?>
</a>
</li>
<li>
<a href="#tab_dbuser">
<?php echo $this->getIcon('Database', '', 16);?><?php echo $this->lang->L_DBS;?>
</a>
</li>
<li>
<a href="#tab_interface">
<?php echo $this->getIcon('Lookup', '', 16);?><?php echo $this->lang->L_CONFIG_INTERFACE;?>
</a>
</li>
<li>
<a href="#tab_autodelete">
<?php echo $this->getIcon('DustbinFull', '', 16);?><?php echo $this->lang->L_CONFIG_AUTODELETE;?>
</a>
</li>
<li>
<a href="#tab_email">
<?php echo $this->getIcon('Options', '', 16);?><?php echo $this->lang->L_EMAIL;?>
</a>
</li>
<li>
<a href="#tab_ftp">
<?php echo $this->getIcon('RemoteAccess', '', 16);?><?php echo $this->lang->L_FTP;?>
</a>
</li>
<li>
<a href="#tab_cronscript">
<?php echo $this->getIcon('Options', '', 16);?><?php echo $this->lang->L_CRONSCRIPT;?>
</a>
</li>
<li>
<a href="#tab_configfiles">
<?php echo $this->getIcon('CardFile', '', 16);?><?php echo $this->lang->L_CONFIGFILES;?>
</a>
</li>
</ul>
<?php echo $this->form; ?>
<div id="tab_configfiles">coming soon...</div>
</div>
</form>
<br /><br /><br /><br />
<script type="text/javascript">
/* <![CDATA[ */
<?php if (count((array) $this->config->get('dynamic.databases')) == 0): ?>
mySlideDown('connection-params');
<?php endif; ?>
/*]]>*/
</script>
</div>
<?php
if ($this->jsMessage > '') { ?>
<div id="dialog" title="Information">
<p><?php echo $this->jsMessage; ?></p>
</div>
<?php
}

Datei anzeigen

@ -0,0 +1,51 @@
<?php
$this->config = $this->parent->config;
$this->lang = $this->parent->lang;
?>
<tr class="row-even">
<td class="small"><?php echo $this->lang->L_SEND_MAIL_FORM?>:</td>
<td class="small right">
<?php
if ($this->config->get('config.email.sendMail') == 0) {
echo $this->lang->L_NO;
} else {
echo $this->lang->L_YES;
?>
<table style="width:100%;" summary="E-Mail parameters">
<?php if ($this->config->email['attach_backup'] == 0) { ?>
<tr class="row-even">
<td class="small right" colspan="2"><?php echo $this->lang->L_DONT_ATTACH_BACKUP?></td>
</tr>
<?php } else { ?>
<tr class="row-even">
<td class="small right" colspan="2"><?php echo $this->lang->L_ATTACH_BACKUP?></td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_MAX_UPLOAD_SIZE?>:</td>
<td class="small right" colspan="2"><?php echo $d->SEND_MAIL.ATTACH_BACKUP.SIZE?></td>
</tr>
<?php } ?>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_EMAIL_RECIPIENT?>:</td>
<td class="small right"><?php echo $this->escape($this->config->email['recipient_name'])?></td>
</tr>
<?php
if (count($this->config->email['recipient_cc']) > 0) {
?>
<tr class="row-even">
<td class="small"><?php echo $this->lang->L_EMAIL_CC?>:</td>
<?php
$cc = '';
foreach ($this->config->email['recipient_cc'] as $r) {
$cc .= $r['name'].', ';
}
$cc = substr($cc, 0, -2);
?>
<td class="small right"><?php echo $this->escape($cc)?></td>
</tr>
<?php } ?>
</table>
<?php } ?>
</td>
</tr>

Datei anzeigen

@ -0,0 +1,35 @@
<?php
$this->config = $this->parent->config;
$this->lang = $this->parent->lang;
if (count($this->config->get('config.ftp'))>0) {
$ftpNr = 1;
foreach ($this->config->get('config.ftp') as $ftp) {
if ($ftp['use'] == 'y') {
?>
<tr class="row-even">
<td class="small"><?php echo $this->lang->L_FTP_TRANSFER. ' '. $ftpNr?>:</td>
<td class="small">
<table style="width:100%" summary="FTP parameters">
<tr class="row-even">
<td class="small">
<?php echo $this->lang->L_FTP_SERVER?>,
<?php echo $this->lang->L_FTP_PORT?>,
<?php echo $this->lang->L_FTP_USER?>
</td>
<td class="small right">
<?php echo $this->escape($ftp['server'])?>,
<?php echo $this->escape($ftp['port'])?>,
<?php echo $this->escape($ftp['user'])?>
</td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_FTP_DIR?>:</td>
<td class="small right"><?php echo $this->escape($ftp['dir'])?></td>
</tr>
</table>
</td>
</tr>
<?php } ?>
<?php } ?>
<?php } ?>

Datei anzeigen

@ -0,0 +1,108 @@
<?php
$d = $this->dumpData;
?>
<div id="content">
<h2><?php echo $this->lang->L_DUMP;?></h2>
<div id="headnavi">
<ul class="Formbutton" id="tabnav">
<li>
<a href="#tab_php" id="tab_php" class="tab Formbutton">
<?php echo$this->getIcon('BackupDatabase', '', 16);?>
<?php echo $this->lang->L_DUMP;?> PHP
</a>
</li>
<li><a href="#tab_perl" id="tab_perl" class="tab Formbutton">
<?php echo$this->getIcon('BackupDatabase', '', 16);?>
<?php echo $this->lang->L_DUMP;?> Perl
</a>
</li>
</ul>
</div>
<div id="panel_php" class="panel">
<form id="fm" method="post" action="<?php echo $this->url(array('controller'=>'dump','action'=>'start.dump'));?>/startDump">
<h3><?php echo $this->lang->L_DUMP?> PHP</h3>
<div>
<ul class="Formbutton">
<li>
<button class="Formbutton" type="submit">
<?php echo$this->getIcon('BackupDatabase', '', 16);?>
<?php echo $this->lang->L_FM_STARTDUMP?>
</button>
</li>
<li>
<a href="<?php echo $this->url(array('controller'=>'dump','action'=>'select.tables'));?>" class="Formbutton">
<?php echo$this->getIcon('CheckBoxes', '', 20);?>
<?php echo $this->lang->L_FM_SELECTTABLES?>
</a>
</li>
</ul>
</div>
<div>
<table class="bdr">
<tr class="row-even">
<td class="small vmiddle">
<label for="comment">
<?php echo $this->lang->L_FM_COMMENT?>:
</label>
</td>
<td class="small">
<input type="text" class="text noleftmargin" style="width:260px;" id ="comment"
name="comment" value="<?php echo $this->escape($this->comment)?>" />
</td>
</tr>
<?php if ($this->config->get('config.mode') > 0) { ?>
<tr class="row-odd">
<td><label for="backup_using_updates">Update (REPLACE Command):</label></td>
<td><input type="checkbox" class="checkbox noleftmargin" name="backup_using_updates" id="backup_using_updates" value="1" /></td>
</tr>
<tr class="row-odd">
<td>
<label for="sel_dump_encoding"><?php echo $this->lang->L_FM_CHOOSE_ENCODING?>:</label>
</td>
<td>
<select name="sel_dump_encoding" id="sel_dump_encoding">
{POSSIBLE_DUMP_ENCODINGS}
</select>
</td>
</tr>
<?php } ?>
</table>
</div>
</form>
</div>
<br />
<?php
echo $this->partial('dump/settings.phtml',array('parent' => $this));
?>
<div id="panel_perl" class="panel" style="display:none">
<h3><?php echo $this->lang->L_DUMP?> PERL (<?php echo $this->lang->L_CONFIG_HEADLINE;?>: <?php echo $this->config->get('dynamic.configFile')?>)</h3>
<button class="Formbutton" name="DoCronscript" onclick="show_perl_output('<?php echo $d->PERL_HTTP_CALL?>')"><?php echo $this->lang->L_DOCRONBUTTON?></button>
<button class="Formbutton" name="DoSimpleTest" onclick="show_perl_output('<?php echo $d->PERL_TEST?>')"><?php echo $this->lang->L_DOSIMPLETEST?></button>
<button class="Formbutton" name="DoPerlTest" onclick="show_perl_output('<?php echo PERL_MODULTEST?>')"><?php echo $this->lang->L_DOPERLTEST?></button>
<br />
<table class="bdr" style="width:90%" summary="Perl">
<tr class="row-odd">
<td><?php echo $this->lang->L_PERLOUTPUT2?>:</td>
<td style="width:60%"><input class="text" style="width:95%" type="text" value="{PERL_HTTP_CALL}" /></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_PERLOUTPUT3?>:</td>
<td><input class="text" style="width:95%" type="text" value="{PERL_CRONTAB_CALL}" /></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_PERLOUTPUT1?>:</td>
<td><input class="text" style="width:95%" type="text" value="{PERL_ABSOLUTE_PATH_OF_CONFIGDIR?>" /></td>
</tr>
</table>
<br />
<div id="perloutput_div" style="width:100%;height:200px;overflow:hidden;display:none;">
<iframe id="perloutput" style="width:100%;height:100%;"></iframe>
</div>
</div>
</div>

Datei anzeigen

@ -0,0 +1,19 @@
<?php
$this->config = $this->parent->config;
$this->lang = $this->parent->lang;
$d = $this->parent->dumpData;
if ($this->config->get('config.general.multiPart') == 0) { ?>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_MULTI_PART?>:</td>
<td class="small right" colspan="2"><?php echo $this->lang->L_NO?></td>
</tr>
<?php } else { ?>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_MULTI_PART?>:</td>
<td class="small right"><?php echo $this->lang->L_YES?></td>
</tr>
<tr>
<td class="small">&nbsp;&nbsp;<?php echo $this->lang->L_MULTIPART_SIZE?>:</td>
<td class="small right"><?php echo$this->byteOutput($this->config->multipartGroesse);?></td>
</tr>
<?php }

Datei anzeigen

@ -0,0 +1,113 @@
<?php
$d = $this->parent->dumpData;
$sumTotal = $this->parent->dumpData->sumTotal;
$this->lang = $this->parent->lang;
$this->config = $this->parent->config;
?>
<div id="dumpsettings">
<h3><?php echo $this->lang->L_FM_DUMPSETTINGS;?></h3>
<table class="bdr floatLeft" summary="Dump settings">
<tr class="row-even">
<td class="small"><?php echo $this->lang->L_CONFIG_HEADLINE?></td>
<td class="small right"><?php echo $this->config->get('dynamic.configFile')?></td>
</tr>
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_DBS?>:</td>
<td class="small right">
<?php echo $d->databasesToBackup?> (<?php echo $d->nrOfDatabasesToBackup?>)
</td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_TABLES?>:</td>
<td class="small right"><?php echo $this->numberFormat($sumTotal['tablesTotal'])?>
</td>
</tr>
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_RECORDS?>:</td>
<td class="small right"><?php echo $this->numberFormat($sumTotal['recordsTotal'])?></td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_DATASIZE?>:</td>
<td class="small right"><?php echo $this->byteOutput($sumTotal['datasizeTotal'])?></td>
</tr>
<tr class="row-odd">
<td colspan="2" class="small">
<span class="small right">(<?php echo $this->lang->L_DATASIZE_INFO?>.)</span>
</td>
</tr>
<tr class="dbrow">
<td class="small nowrap"><?php echo $this->lang->L_GZIP?>:</td>
<td class="small right"><?php echo $this->config->get('dynamic.compression') ? $this->lang->L_YES: $this->lang->L_NO; ?></td>
</tr>
<?php
echo $this->partial('dump/multipart.phtml', array('parent' => $this->parent));
echo $this->partial('dump/email.phtml', array('parent' => $this->parent));
echo $this->partial('dump/ftp.phtml', array('parent' => $this->parent));
?>
</table>
<?php
if (!empty($sumTotal['tables'])) {
?>
<table class="bdr floatLeft" style="margin-left:12px;" summary="Info table types and records">
<tr class="thead">
<th><?php echo $this->lang->L_TABLE_TYPE;?></th>
<?php
$details = $sumTotal['tables'];
$keys = array_keys($details);
foreach ($keys as $tableType) {
echo '<th>'.$tableType.'</th>';
}
?>
<th><?php echo $this->lang->L_INFO_SUM;?></th>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_TABLES;?>:</td>
<?php
$tablesTotal = 0;
foreach ($keys as $tableType) {
echo '<td class="small right">'
.$this->numberFormat($details[$tableType]['tablesTotal'])
.'</td>';
$tablesTotal += $details[$tableType]['tablesTotal'];
}
?>
<td class="small right">
<?php echo $this->numberFormat($tablesTotal);?>
</td>
</tr>
<tr class="row-even">
<td class="small"><?php echo $this->lang->L_RECORDS;?>:</td>
<?php
$recordsTotal = 0;
foreach ($keys as $tableType) {
echo '<td class="small right">'
.$this->numberFormat($details[$tableType]['recordsTotal'])
.'</td>';
$recordsTotal += $details[$tableType]['recordsTotal'];
}
?>
<td class="small right">
<?php echo $this->numberFormat($recordsTotal);?>
</td>
</tr>
<tr class="row-odd">
<td class="small"><?php echo $this->lang->L_DATASIZE;?>:</td>
<?php
$datasizeTotal = 0;
foreach ($keys as $tableType) {
echo '<td class="small right">'
.$this->byteOutput($details[$tableType]['datasizeTotal'])
.'</td>';
$datasizeTotal += $details[$tableType]['datasizeTotal'];
}
?>
<td class="small right">
<?php echo $this->byteOutput($datasizeTotal);?>
</td>
</tr>
</table>
<?php } ?>
</div>

Datei anzeigen

@ -0,0 +1,277 @@
<?php
$url = $this->url(array('controller'=>'dump','action'=>'do.dump'));
?>
<script type="text/javascript">
/*<![CDATA[*/
var scroll_log=true;
function doDump()
{
$.ajax({
url: '<?php echo $url;?>?MySQLDumper=<?php echo $this->sessionId;?>',
method:'get',
dataType: 'json',
async: false,
success: function(data, textStatus){
/*
if (!(transport.responseText.substr(0,21)=='{"backup_in_progress"')) {
// unnormal error returned
alert('Error');
} else {
*/
parseDumpResponse(data);
},
error: function(){ alert('Something with the Ajax-Request went wrong. Maybe a server timout happened?') }
});
}
function parseDumpResponse(json)
{
if (json.config_file)
{
// values only submitted once because they don't change during backup process
$('#config_file').html(json.config_file);
$('#dump_encoding').html(json.dump_encoding);
$('#speed_min').html(json.speed_min);
$('#speed_max').html(json.speed_max);
$('#tables_total').html(json.tables_total);
$('#records_total').innerHTML = json['records_total'];
$('#comment').innerHTML = json['comment'];
}
$('tables_optimized').innerHTML=json['tables_optimized'];
if (json['dbs_to_backup']) $('dbs_to_backup').innerHTML = json['dbs_to_backup'] ;
$('actual_database').innerHTML = json['actual_database'] ;
if (json['actual_table']>'') $('actual_table').innerHTML = '`'+json['actual_database']+'`.`'+json['actual_table']+'`' ;
else $('actual_table').innerHTML='';
$('actual_table_nr').innerHTML = json['actual_table_nr'];
$('table_records_total').innerHTML = json['table_records_total'];
$('records_saved_total').innerHTML = json['records_saved_total'];
$('filename').innerHTML = json['filename'];
$('filesize').innerHTML = json['filesize'];
$('elapsed_time').innerHTML = json['elapsed_time'];
if (json['estimated_end']) $('estimated_end').innerHTML=json['estimated_end'];
$('page_refreshs').innerHTML = json['page_refreshs'];
$('record_offset_start').innerHTML = json['record_offset_start'];
$('record_offset_end').innerHTML = json['record_offset_end'];
$('progress_table_percent').innerHTML = json['progress_table_percent'];
$('speed').innerHTML = json['speed'];
$('nr_of_errors').innerHTML = json['nr_of_errors'];
if (json['multipart_part']) $('multipart_part').innerHTML = json['multipart_part'];
if (json['prefix']) $('prefix').innerHTML = json['prefix'];
// Logs
if (json['actions']) $('log').innerHTML+= json['actions']+'<br />';
if (json['errors']) $('log').innerHTML+= '<span class="error">'+json['errors']+'<\/span><br />';
//scroll log to bottom
if (scroll_log && (json['actions'] || json['errors'])) $('log').scrollTop = $('log').scrollHeight;
/*
// progressbars
$('progressbar_table').morph( 'progressbar_table', {
style: 'width:'+json['progressbar_table_width']+'px;',
duration: 0.3
});
if (json['progress_overall_percent'])
{
$('progress_overall_percent').innerHTML = json['progress_overall_percent'];
$('progressbar_overall').morph( 'progressbar_overall', {
style: 'width:'+json['progressbar_overall_width']+'px;',
duration: 0.3
});
}
$('speedbar').morph( 'speedbar', {
style: 'width:'+json['speedbar_width']+'px;',
duration: 0.3
});
*/
if (json['backup_in_progress']==1) doDump(); // Backup not finished -> continue
//else self.location.href='index.php?p=dump&action=done&MySQLDumper={SESSION_ID}';
}
$(document).ready( function () {
doDump();
})
/*]]>*/
</script>
<div id="content">
<h2><?php echo $this->lang->L_DUMP_HEADLINE;?></h2>
<div id="dump_infos">
<table class="bdr" summary="Dump parameters">
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_CONFIG;?>:</td>
<td class="small right">
<span id="config_file">
<?php echo $this->config->get('dynamic.configFile')?>
</span>
</td>
</tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_COMMENT;?>:</td>
<td class="small right"><span id="comment"></span></td>
</tr>
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_CHARSET;?>:</td>
<td class="small right"><span id="dump_encoding"></span></td>
</tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_GZIP_COMPRESSION;?>:</td>
<td class="small right">{GZIP}</td>
</tr>
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_DUMP_FILENAME;?>:</td>
<td class="small right"><span id="filename">{DUMP_FILENAME}</span></td>
</tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_FILESIZE;?>:</td>
<td class="small right"><span id="filesize">{DUMP_FILESIZE}</span></td>
</tr>
<!-- BEGIN MULTIPART -->
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_MULTI_PART;?>:</td>
<td class="small right">
<table width="100%">
<tr>
<td class="small"><?php echo $this->lang->L_MULTIPART_ACTUAL_PART?>:</td>
<td class="small right"><span id="multipart_part"></span></td>
</tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_MULTIPART_SIZE;?>:</td>
<td class="small right">{MULTIPART.SIZE}</td>
</tr>
</table>
</td>
</tr>
<!-- END MULTIPART -->
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_DBS;?>:</td>
<td class="small right"><span id="dbs_to_backup"></span></td>
</tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_INFO_ACTDB;?>:</td>
<td class="small right"><span id="actual_database"></span></td>
</tr>
<tr class="dbrow">
<td class="small"><?php echo $this->lang->L_SAVING_TABLE;?>:</td>
<td class="small right">
<span id="actual_table_nr"></span>&nbsp;
<?php echo $this->lang->L_OF;?>
<span id="tables_total">{TABLE_COUNT}</span>
</td>
</tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_PREFIX;?>:</td>
<td class="small right"><span id="prefix"></span></td>
</tr>
<tr class="dbrow">
<td colspan="2" class="small right">
<span id="tables_optimized"></span>
</td>
</tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_ERROR;?>:</td>
<td class="small right">
<strong><span id="nr_of_errors"></span></strong>
</td>
</tr>
<tr class="dbrow" style="line-height:12px;"><td colspan="2">&nbsp;</td></tr>
<tr class="dbrow1">
<td class="small nowrap"><?php echo $this->lang->L_PROGRESS_TABLE;?>:</td>
<td class="small"><strong><span id="actual_table"></span></strong></td>
</tr>
<tr class="dbrow1">
<td>&nbsp;</td>
<td>
<table style="width:400px">
<tr>
<td style="width:60px" class="small right nowrap"><span id="progress_table_percent">0</span> %</td>
<td>
<img src="{ICONPATH}progressbar_dump.gif" id="progressbar_table" alt="" width="0" height="16" />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="small">
<?php echo $this->lang->L_ENTRY?> <strong><span id="record_offset_start"></span></strong>&nbsp;
<?php echo $this->lang->L_UPTO;?>
<strong><span id="record_offset_end"></span></strong>&nbsp;
<?php echo $this->lang->L_OF;?> <strong><span id="table_records_total"></span></strong>
</td>
</tr>
</table>
</td>
</tr>
<tr class="dbrow" style="line-height:12px;"><td colspan="2">&nbsp;</td></tr>
<tr class="dbrow1">
<td class="small"><?php echo $this->lang->L_RECORDS_PER_PAGECALL;?>:</td>
<td>
<table width="400">
<tr>
<td style="width:60px" valign="top" class="small right">
<span id="speed"></span>
</td>
<td colspan="2">
<img src="{ICONPATH}progressbar_speed.gif" id="speedbar" alt="" width="0" height="14" />
</td>
</tr>
<tr>
<td>&nbsp;</td>
<td class="nowrap small"><span id="speed_min"></span></td>
<td class="nowrap small right"><span id="speed_max"></span></td>
</tr>
</table>
</td>
</tr>
<tr class="dbrow" style="line-height:12px;">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="dbrow1">
<td class="small nowrap"><?php echo $this->lang->L_PROGRESS_OVER_ALL;?>:</td>
<td>
<table style="width:400px">
<tr>
<td style="width:60px" class="right small"><span id="progress_overall_percent"></span> %</td>
<td class="small">
<img src="{ICONPATH}progressbar_dump.gif" id="progressbar_overall" alt="" width="0" height="16" /><br />
<?php echo $this->lang->L_RECORDS;?> <strong><span id="records_saved_total"></span></strong>
&nbsp;<?php echo $this->lang->L_OF;?> <strong><span id="records_total"></span></strong><br />
</td>
</tr>
</table>
</td>
</tr>
<tr class="dbrow">
<td class="small nowrap"><?php echo $this->lang->L_PAGE_REFRESHS;?>:</td>
<td class="small right"><span id="page_refreshs">0</span></td>
</tr>
<tr class="dbrow1">
<td class="small nowrap"><?php echo $this->lang->L_DURATION;?>:</td>
<td class="small right"><span id="elapsed_time"></span></td>
</tr>
<tr class="dbrow">
<td class="small nowrap"><?php echo $this->lang->L_ESTIMATED_END;?>:</td>
<td class="small right"><span id="estimated_end"></span></td>
</tr>
</table>
</div>
<br />
<h3><?php echo $this->lang->L_LOG;?>:</h3>
<div id="log" class="bdr small" style="height:100px;overflow:auto;" onmouseover="scroll_log=false" onmouseout="scroll_log=true"></div>
</div>
<br /><br />

Datei anzeigen

@ -0,0 +1,53 @@
<?php
echo $this->doctype();
$version = new Msd_Version();
?>
<html>
<head>
<title>MySQLDumper <?php echo $version->getMsdVersion();?> Error</title>
<?php
echo $this->headMeta() . "\n";
echo $this->headScript() . "\n";
?>
</head>
<body>
<?php
if ($this->displayErrors == 1) {
?>
<h1>An error occurred</h1>
<h2><?php echo $this->message ?></h2>
<?php if (isset($this->exception)): ?>
<h3>Exception information:</h3>
<p>
<b>Message:</b> <?php echo $this->exception->getMessage() ?>
<br>
Controller:
<span id="controller">
<?php echo $this->request->getParam('controller'); ?>
</span>
<br>
Action:
<span id="action">
<?php echo $this->request->getParam('action'); ?>
</span>
<br>
Module:
<span id="module">
<?php echo $this->request->getParam('module'); ?>
</span>
</p>
<h3>Stack trace:</h3>
<pre><?php echo $this->exception->getTraceAsString() ?>
</pre>
<h3>Request Parameters:</h3>
<pre><?php echo var_export($this->request->getParams(), true) ?>
</pre>
<?php endif;
}
?>
</body>
</html>

Datei anzeigen

@ -0,0 +1 @@
File-Management

Datei anzeigen

@ -0,0 +1 @@
Files waehlen für Restore

Datei anzeigen

@ -0,0 +1,21 @@
<span id="ajax-<?php echo $this->domId;?>">
<?php
if (isset($this->viewOptions['loadingMessage'])) {
echo $this->viewOptions['loadingMessage'];
}
if (isset($this->viewOptions['showThrobber']) && $this->viewOptions['showThrobber'] == true) {
echo $this->getIcon('ajax-loader');
}
?>
<script type="text/javascript">
$.ajax({
url: '<?php echo $this->url($this->ajaxOptions);?>',
type: "GET",
async : true,
cache: false,
success: function (data) {
$("#ajax-<?php echo $this->domId;?>").html(data);
}
});
</script>
</span>

Datei anzeigen

@ -0,0 +1,31 @@
<form action="<?php echo $this->formAction; ?>" method="<?php echo $this->formMethod; ?>" enctype="<?php echo $this->formEncType; ?>">
<div class="paginator">
<button class="Formbutton first" type="<?php echo $this->buttonType; ?>" onclick="<?php echo $this->first['click']; ?>" accesskey="c"<?php echo $this->first['disabled']; ?>>
<?php echo $this->getIcon($this->first['icon'], '', 16); ?>
</button>
<button class="Formbutton paginator prev" type="<?php echo $this->buttonType; ?>" onclick="<?php echo $this->prev['click']; ?>" accesskey="v"<?php echo $this->prev['disabled']; ?>>
<?php echo $this->getIcon($this->prev['icon'], '', 16); ?>
</button>
<select id="combobox" name="<?php echo $this->urlParam; ?>" onchange="<?php echo $this->onChange; ?>" accesskey="b">
<?php
for ($i = 1; $i <= $this->pageCount; $i++) {
?>
<option value="<?php echo $i; ?>"<?php echo ($i == $this->currentPage) ? ' selected="selected"' : ''; ?>><?php echo $i; ?></option>
<?php
}
?>
</select>
<button class="Formbutton next" type="<?php echo $this->buttonType; ?>" onclick="<?php echo $this->next['click']; ?>" accesskey="n"<?php echo $this->next['disabled']; ?>>
<?php echo $this->getIcon($this->next['icon'], '', 16); ?>
</button>
<button class="Formbutton last" type="<?php echo $this->buttonType; ?>" onclick="<?php echo $this->last['click']; ?>" accesskey="m"<?php echo $this->last['disabled']; ?>>
<?php echo $this->getIcon($this->last['icon'], '', 16); ?>
</button>
</div>
</form>
<script type="text/javascript">
$(function() {
$("#combobox").combobox();
});
</script>

Datei anzeigen

@ -0,0 +1,3 @@
<?php
echo $this->showMenu;
?>

Datei anzeigen

@ -0,0 +1,102 @@
<div id="content">
<h2><?php echo $this->lang->L_HOME;?></h2>
<a href="<?php echo $this->baseUrl();?>/index/phpinfo" class="Formbutton">
<?php echo $this->getIcon('Info', '', 16);?> PHP-Info
</a>
<br />
<h3><?php echo $this->lang->L_VERSIONSINFORMATIONEN;?></h3>
<img src="<?php echo $this->baseUrl();?>/css/<?php echo $this->config->get('config.interface.theme');?>/pics/loveyourdata.gif"
style="float:right;padding-left:10px;" alt="love your data" title="love your data" />
<table class="bdr" summary="Version information">
<tr class="row-even">
<td><?php echo $this->lang->L_OS;?>: </td>
<td><strong><?php echo PHP_OS;?></strong> <?php echo @php_uname();?></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_MYSQL_VERSION;?>:</td>
<td><strong><?php echo $this->mysqlServerVersion;?></strong></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_MYSQL_CLIENT_VERSION;?>:</td>
<td><strong><?php echo $this->mysqlClientVersion;?></strong></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_PHP_VERSION;?>:</td>
<td><strong><?php echo PHP_VERSION;?></strong></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_MEMORY;?>:</td>
<td>
<strong>
<?php echo $this->byteOutput($this->config->get('dynamic.phpRam')*1024*1024, 0);?>
</strong>
</td>
</tr>
<tr class="row-odd nowrap">
<td><?php echo $this->lang->L_MAX_EXECUTION_TIME;?>:</td>
<td>
<strong><?php echo $this->serverMaxExecutionTime;?>
<?php echo $this->lang->L_SECONDS;?>
(<?php echo $this->config->get('dynamic.maxExecutionTime');?>
<?php echo $this->lang->L_SECONDS;?>)
</strong>
</td>
</tr>
<tr class="row-even nowrap">
<td><?php echo $this->lang->L_ZEND_FRAMEWORK_VERSION;?>:</td>
<td><strong><?php echo Zend_Version::VERSION; ?></strong></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_PHP_EXTENSIONS;?>:</td>
<td class="small"><?php echo $this->config->get('dynamic.phpextensions');?>
<?php
if (!$this->config->get('dynamic.compression')) { ?>
<br /><span class="error"><?php echo $this->lang->L_NOGZPOSSIBLE;?></span>
<?php }
if (!extension_loaded('ftp')) { ?>
<br /><span class="error"><?php echo $this->lang->L_NOFTPPOSSIBLE;?></span>
<?php } ?>
</td>
</tr>
<?php if ($this->config->get('dynamic.disabledPhpFunctions') > '') { ?>
<tr class="row-even nowrap">
<td><?php echo $this->lang->L_DISABLEDFUNCTIONS;?>:</td>
<td class="small"><?php echo $this->config->get('dynamic.disabledPhpFunctions');?></td>
</tr>
<?php } ?>
</table>
<br />
<h3><?php echo $this->lang->L_MSD_INFO;?></h3>
<table class="bdr" summary="MySQLDumper Information">
<tr class="row-even nowrap">
<td><?php echo $this->lang->L_MSD_VERSION;?>:</td>
<td><strong><?php echo $this->version->getMsdVersion();?></strong></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_DB_ADAPTER;?>:</td>
<td><strong><?php echo $this->dbAdapter;?></strong></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_INFO_LOCATION;?>:</td>
<td><strong><?php echo $_SERVER['SERVER_NAME'];?></strong></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_INFO_ACTDB;?>:</td>
<td><strong><?php echo $this->config->get('dynamic.dbActual');?></strong></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_FM_FREESPACE;?>:</td>
<td><strong><?php echo $this->getFreeDiskspace();?></strong></td>
</tr>
<?php if ($this->filename > '') { ?>
<tr class="row-odd">
<td>
<?php echo $this->lang->L_LASTBACKUP.' '.$this->lang->L_VOM;?>
<strong><?php echo $this->fileMtime;?></strong>:
</td>
<td><strong><?php echo $this->filename;?></strong></td>
</tr>
<?php } ?>
</table>
</div>

Datei anzeigen

@ -0,0 +1,24 @@
<div id="fullcontent">
<h1>
<img src="<?php echo $this->baseUrl(); ?>/css/msd/pics/menu-headlogo.gif" alt="" />
<br /><br /><?php echo$this->lang->L_LOGIN;?>
</h1>
<br /><br />
<div style="width:500px;margin: auto auto; vertical-align:middle;
background: url(<?php echo $this->baseUrl(); ?>/css/msd/pics/User.png) no-repeat 5% 36%; ">
<form action="<?php
echo $this->url(array(
'controller' => 'index',
'action' => 'login',
), null, true); ?>" method="post" enctype="multipart/formdata">
<?php
echo $this->form;
?>
</form>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('#user').focus();
});
</script>

Datei anzeigen

@ -0,0 +1,220 @@
<?php
$theme = $this->config->get('config.interface.theme');
$request = Zend_Controller_Front::getInstance()->getRequest();
$this->controller = $request->getControllerName();
$this->action = $request->getActionName();
$menuToggleUrl = $this->url(array('controller' => 'index', 'action'=>'ajax.toggle.menu'));
$this->jQuery()->onLoadCaptureStart();
// menu needs to be hidden?
if ($this->showMenu == 0) { ?>
$('#sidebar').hide(0);
$("#content").animate({"marginLeft": "1em"}, 0);
$('#fadeMenuIn').show(0);
<?php } ?>
$('#version').hover(
function () {
$('#fadeMenuOut').show(50);
},
function () {
$('#fadeMenuOut').hide(50);
}
);
$('#fadeMenuOut').click(function() {
$.ajax({ url: '<?php echo $menuToggleUrl;?>/showMenu/0'});
$('#fadeMenuOut').hide();
$('#sidebar').hide('fast', function () {
$("#content").animate({"marginLeft": "1em"}, "slow", function () {
$('#fadeMenuIn').show();
});
});
return false;
});
$('#fadeMenuIn').click(function() {
$.ajax({ url: '<?php echo $menuToggleUrl;?>/showMenu/1'});
$('#fadeMenuIn').hide(0);
$("#content").animate({"marginLeft": "19em"}, "slow", function () {
$('#sidebar').show('fast');
});
return false;
});
<?php
if ($this->config->get('config.interface.showTooltips') == 'y') { ?>
SetupTooltips();
<?php }
$this->jQuery()->onLoadCaptureEnd();
?>
<div id="fadeMenuIn">
<img src="<?php echo $this->baseUrl(); ?>/css/<?php echo$theme?>/icons/handRight.png"
alt="<?php echo $this->lang->L_MENU_SHOW;?>" title="<?php echo $this->lang->L_MENU_SHOW;?>" />
</div>
<div id="sidebar">
<a href="http://www.mysqldumper.net" class="new-window"
title="<?php echo$this->lang->L_VISIT_HOMEPAGE; ?> www.mysqldumper.net">
<img src="<?php echo $this->baseUrl(); ?>/css/<?php echo$theme?>/pics/menu-headlogo.gif" alt="MySQLDumper - Homepage" /></a>
<div id="version">
<div id="fadeMenuOut" title="blend out menu">
<img style="margin-left:6px;" src="<?php echo $this->baseUrl(); ?>/css/<?php echo$theme?>/icons/handLeft.png"
alt="<?php echo $this->lang->L_MENU_HIDE;?>" title="<?php echo $this->lang->L_MENU_HIDE;?>" />
</div>
<span class="version-line">Version <?php echo $this->msdVersion;?></span>
<?php if ($this->config->get('config.general.mode') == 'easy') {?>
<img src="<?php echo $this->baseUrl(); ?>/css/<?php echo$theme?>/pics/navi_bg.jpg" alt="" />
<?php } else { ?>
<img src="<?php echo $this->baseUrl(); ?>/css/<?php echo$theme?>/pics/navi_bg_expert.jpg" alt="" />
<?php } ?>
</div>
<div id="menu">
<ul class="menu">
<li
<?php if ($this->controller == 'index') {
echo ' class="active"';
};?>
><a href="<?php echo $this->baseUrl();?>/index"><?php echo$this->getIcon('Home', $this->lang->L_HOME, 20);?><?php echo$this->lang->L_HOME;?></a>
</li>
<li
<?php if ($this->controller == 'config') {
echo ' class="active"';
};?>>
<a href="<?php echo $this->baseUrl();?>/config"><?php echo$this->getIcon('Configure', '', 20);?><?php echo$this->lang->L_CONFIG;?></a>
</li>
<?php if (count($this->databases) > 0) { ?>
<li
<?php if ($this->controller == 'dump') {
echo ' class="active"';
};?>>
<a href="<?php echo $this->baseUrl();?>/dump"><?php echo$this->getIcon('BackupDatabase', '', 20);?><?php echo$this->lang->L_DUMP;?></a>
</li>
<li
<?php if ($this->controller == 'files' && $this->action == 'restore') {
echo ' class="active"';
};?>
>
<a href="<?php echo $this->baseUrl();?>/files/restore"><?php echo$this->getIcon('RestoreDatabase', '', 20);?><?php echo$this->lang->L_RESTORE;?></a>
</li>
<li
<?php if ($this->controller == 'files' && $this->action != 'restore') {
echo ' class="active"';
};?>
>
<a href="<?php echo $this->baseUrl();?>/files"><?php echo$this->getIcon('FileManagement', '', 20);?><?php echo$this->lang->L_FILE_MANAGE;?></a>
</li>
<li
<?php if ($this->controller == 'sql') {
echo ' class="active"';
};?>
>
<a href="<?php echo $this->baseUrl();?>/sql/show.tables"><?php echo$this->getIcon('SqlBrowser', '', 20);?><?php echo$this->lang->L_SQL_BROWSER;?></a>
</li>
<li
<?php if ($this->controller == 'sql.server') {
echo ' class="active"';
};?>
><a href="<?php echo $this->baseUrl();?>/sql.server"><?php echo$this->getIcon('Server', '', 20);?><?php echo$this->lang->L_SQL_SERVER;?></a>
</li>
<li
<?php if ($this->controller == 'log') {
echo ' class="active"';
};?>
><a href="<?php echo $this->baseUrl();?>/log"><?php echo$this->getIcon('log', '', 20);?><?php echo$this->lang->L_LOG;?></a>
</li>
<?php } ?>
<li><a href="http://www.mysqldumper.net/credits/" class="new-window">
<?php echo$this->getIcon('Help', '', 20);?><?php echo$this->lang->L_CREDITS;?>
</a>
</li>
</ul>
</div>
<div id="selectConfig">
<form action="<?php echo $this->baseUrl();?>/index/selectdb" method="post" id="formSelectDb">
<fieldset id="dbSelect"><legend><?php echo$this->lang->L_CHOOSE_DB;?>:</legend>
<input type ="hidden" name="lastController" value="<?php echo $this->controller;?>" />
<input type ="hidden" name="lastAction" value="<?php echo $this->action;?>" />
<?php if (count($this->databases) > 0 ) { ?>
<select name="selectedDb" id="selectedDb" style="width:157px;" onchange="this.form.submit()">
<?php
foreach ($this->databases as $db) {
echo '<option value="'.base64_encode($db).'"';
if ($db == $this->config->get('dynamic.dbActual')) {
echo ' selected="selected"';
}
echo '>'.$db.'</option>';
}
?>
</select>
<?php } else {
echo $this->lang->L_NO_DB_FOUND;
} ?>
<a href="#" onclick="$('#formSelectDb').attr('action', '<?php echo $this->baseUrl();?>/index/dbrefresh');$('#formSelectDb').submit();"><?php echo$this->lang->L_LOAD_DATABASE;?></a>
</fieldset>
</form>
<form action="<?php echo $this->baseUrl();?>/index/switchconfig" method="post">
<fieldset id="configSelect"><legend><?php echo$this->lang->L_CONFIG;?>:</legend>
<input type ="hidden" name="lastController" value="<?php echo $this->controller;?>" />
<input type ="hidden" name="lastAction" value="<?php echo $this->action;?>" />
<select name="selectedConfig" style="width: 157px;" onchange="this.form.submit()">
<?php
$this->configFiles = Msd_File::getConfigNames();
foreach ($this->configFiles as $file) {
echo "\n" . '<option value="' . base64_encode($file) . '"';
if ($this->config->get('dynamic.configFile') == $file) {
echo ' selected="selected"';
}
echo '>'.$this->getConfigTitle($file).'</option>';
}
?>
</select>
</fieldset>
</form>
<?php if (in_array($this->config->get('config.interface.language'), array('de', 'ch'))) {; ?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p style="text-align:center">
<input type="image" src="<?php echo $this->baseUrl();?>/images/paypal-de.gif" name="submit" alt="Spende an MySQLDumper" />
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHfwYJKoZIhvcNAQcEoIIHcDCCB2wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA1F3dVoY6jmg5IdFqH9POgRXCbCOcfOiJjD+3izHjgsmmRV7U0B0VqUCGNyvBO2aeheQYL3WxHVIbmUgsyzUUj28IhgqBv62HWw3ywCIbMQ7H4XklpmYzYMjlKNyD1Oo7dOsThBFzGDudkDQP0gMDOC1BH1Hl3RMY5fcwTwL/31TELMAkGBSsOAwIaBQAwgfwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQICMTH9C2JujOAgdjF58o69ezIePXFRUAE3+rtqc7dwHauI4Zv3Oh3Eg8byWZXa4chZ1QpgY7I91YeNNGh0eFqJoSq7c5Pv0HwoQljN4pOxXsLWECxE7TK/8xHncxZiR0iJ/RCrTjCsUYlsG/KUPXOFxmiaWktcXGOTy1suqe7OKBTeXuVu1BiEYwXgFUg7AMpt0Mnkca+qd0vvWcT2sJ0Gbcxop00kTl1RsxHAtBM8mohM97dy/4gVTxHEd5bJgYun9m+fQN5tpTTJZLoL8QwMqn2JikP28XBmPWiIRjXhGGb/aWgggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMFHTt38RMxLXJyO2SmS+Ndl72T7oKJ4u4uw+6awntALWh03PewmIJuzbALScsTS4sZoS1fKciBGoh11gIfHzylvkdNe/hJl66/RGqrj5rFb08sAABNTzDTiqqNpJeBsYs/c2aiGozptX2RlnBktH+SUNpAajW724Nv2Wvhif6sFAgMBAAGjge4wgeswHQYDVR0OBBYEFJaffLvGbxe9WT9S1wob7BDWZJRrMIG7BgNVHSMEgbMwgbCAFJaffLvGbxe9WT9S1wob7BDWZJRroYGUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTA5MjIyMjExMTVaMCMGCSqGSIb3DQEJBDEWBBS9p7F8TShmC1kyEBpuIyOQV9QfIDANBgkqhkiG9w0BAQEFAASBgKCi8fdg8Dsu9VQwMtNmeZHUv4sVXSLCka406THCqOC0KuQnNhie2gaawI9f8vrfOwH+oKO/T1wHB1pCNcBRtlFoFWWq+mhpZD/hZo70j6KnbU0D6BB6rotGq4zdWs2QLZ2/HwPUrGof++YgZgBV3xtU5xuyn/Ru5j0GZWxYHYmZ-----END PKCS7-----" />
<img alt="" src="https://www.paypal.com/de_DE/i/scr/pixel.gif" width="1" height="1" />
</p>
</form>
<?php } else { ?>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<p style="text-align:center">
<input type="image" src="<?php echo $this->baseUrl();?>/images/paypal-en.gif" name="submit" alt="Donation to MySQLDumper" />
<input type="hidden" name="cmd" value="_s-xclick" />
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHfwYJKoZIhvcNAQcEoIIHcDCCB2wCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYC7qkaXTHaaDq4lOdTa1M8nhF6Sk+d0OeXS7BLG3NisVdmZtvpqvwO3bHjgqruolhfs2er1Z6ojYYWjfXpaKuaYpHWGfrtWsJ+bfMEJBSj4SrCOnm4esfSMymXFQHxUvrBRMIqgQb0hjrdwgDRiY5S/+D/TVjWpKqqTGtLoEePmFTELMAkGBSsOAwIaBQAwgfwGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI9eu3Pr86oo+AgdhxkHuSn+5dMykdRilZWzOgc84iG3/5JAA8vCtjGBAcAuV08VIJukSpZkvNoaJqinoU3cpS3vWoYsuyMeyjiBsCsL0Z5kLh6PCictEzq+JDMj0I+ojo06gJmczayjQ3G47OF9lx1IIJQuE40M4Hjdx4dvgYQ16fpl9EsAmhLT5XV65qdUjjmdTzQ/F8gbt9LtGnh5266GRqi+3ryOyrXHTVvpRyzyY4Stf+ZJJvwEnrRIXHjcrr76oRm2z7lrBWa4u7fVyNhJwgTMQbzT+ibS2SXwRkWlNLi12gggOHMIIDgzCCAuygAwIBAgIBADANBgkqhkiG9w0BAQUFADCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wHhcNMDQwMjEzMTAxMzE1WhcNMzUwMjEzMTAxMzE1WjCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMFHTt38RMxLXJyO2SmS+Ndl72T7oKJ4u4uw+6awntALWh03PewmIJuzbALScsTS4sZoS1fKciBGoh11gIfHzylvkdNe/hJl66/RGqrj5rFb08sAABNTzDTiqqNpJeBsYs/c2aiGozptX2RlnBktH+SUNpAajW724Nv2Wvhif6sFAgMBAAGjge4wgeswHQYDVR0OBBYEFJaffLvGbxe9WT9S1wob7BDWZJRrMIG7BgNVHSMEgbMwgbCAFJaffLvGbxe9WT9S1wob7BDWZJRroYGUpIGRMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbYIBADAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAIFfOlaagFrl71+jq6OKidbWFSE+Q4FqROvdgIONth+8kSK//Y/4ihuE4Ymvzn5ceE3S/iBSQQMjyvb+s2TWbQYDwcp129OPIbD9epdr4tJOUNiSojw7BHwYRiPh58S1xGlFgHFXwrEBb3dgNbMUa+u4qectsMAXpVHnD9wIyfmHMYIBmjCCAZYCAQEwgZQwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tAgEAMAkGBSsOAwIaBQCgXTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcBMBwGCSqGSIb3DQEJBTEPFw0wOTA5MjIyMjE2NDlaMCMGCSqGSIb3DQEJBDEWBBQTOI+g78xiHlnuun0WzrqZcYoCjDANBgkqhkiG9w0BAQEFAASBgFfWw0nugVmxr2/T8AUKCv0UODVMs+Ab5k170uF4kQDh/VFxnNWFToaS6rfaGIzIap05SELYzub/AAQByE7l6kgxBRMwK3trV60ycDS3G4lM2Ri9wLsIqLH88Qzbdw1+qbkVi7cOkCueclijovaX89mxi0kHk8rvFFAWpFrZh1Ok-----END PKCS7-----" />
<img alt="" src="https://www.paypal.com/en_EN/i/scr/pixel.gif" width="1" height="1" />
</p>
</form>
<?php } ?>
</div>
</div>
<?php
if ($this->config->get('config.interface.showServerCaption') == "y") {
?>
<div id="server0">
<?php echo$this->lang->L_SERVER;?>:
<a class="new-window server"
href="<?php echo $this->getServerProtocol() . $_SERVER['SERVER_NAME'];?>"
title="<?php echo $_SERVER['SERVER_NAME'];?>">
<?php echo $_SERVER['SERVER_NAME'];?>
</a>
</div>
<?php } ?>
<div id="logout">
<div id="username">
<p>
<strong><?php echo $this->getUsername(); ?></strong> |
<a href="<?php echo $this->baseUrl();?>/index/logout/">
<?php echo $this->lang->L_LOGOUT; ?>
</a>
</p>
</div>
<div id="icon"><?php echo $this->getIcon('LockUser', $this->lang->L_LOGGED_IN, 16);?></div>
</div>

Datei anzeigen

@ -0,0 +1,18 @@
<div id="content">
<div id="phpinfo" style="position:relative; top:20px;left:20px;width:700px;">
<?php
ob_start();
phpinfo();
$content = ob_get_clean();
$content = preg_replace('/\<style type=(.*?)>(.*?)\<\/style>/si','',$content);
$content = preg_replace('/\<!DOCTYPE (.*?)>/si','',$content);
$content = preg_replace('/\<title>(.*?)<body>/si','',$content);
$content = preg_replace('/\<font style="(.*?)">(.*?)\<\/font>/','<span style="$1">$2</span>',$content);
$content = str_replace('<html><head>','',$content);
$content = str_replace('</body></html>','',$content);
$content = str_replace('width="600"','width="800"',$content);
$content = str_replace('<hr />','',$content);
$content = str_replace('<img border="0"','<img style="border:0px"',$content);
echo $content;
?>
</div></div>

Datei anzeigen

@ -0,0 +1,13 @@
<?php
$lang = Msd_Language::getInstance();
?>
<table class="bdr" style="width:70%" summary="Installation error - old version of MySQL or PHP">
<tr class="thead"><th><?php echo $lang->L_ERROR;?></th></tr>
<tr>
<td>
<div class="error" id="installError" style="padding:12px;">
<?php echo $this->message; ?>
</div>
</td>
</tr>
</table>

Datei anzeigen

@ -0,0 +1,128 @@
<?php
$currentLanguage = $this->language;
$fallbackLanguage = $currentLanguage;
$languages = $this->languages;
$baseLangFile = APPLICATION_PATH . DS . 'language' . DS . '%s' . DS . 'lang.php';
?>
<script type="text/javascript">
function changeLang(lang)
{
document.location.href = '<?php echo $this->baseUrl(); ?>/install/index/language/' + lang + '/';
}
var langUrl = <?php
echo json_encode($this->url(array(
'controller' => 'install',
'action' => 'ajax',
'lang' => '',
)));
?>;
var throbberImgSrc = '<?php echo $this->baseUrl(); ?>/css/msd/icons/ajax-loader.gif';
var okImgSrc = '<?php echo $this->getIconSrc('Ok', 16); ?>';
var failImgSrc = '<?php echo $this->getIconSrc('Attention', 16); ?>';
var installedText = new Array();
var failedText = new Array();
var updateText = new Array();
<?php
foreach ($languages as $langId => $language) {
if (file_exists(sprintf($baseLangFile, $langId))) {
$this->lang->loadLanguage($langId);
} else {
$this->lang->loadLanguage($fallbackLanguage);
}
?>
installedText['<?php echo $langId; ?>'] = '<?php echo $this->lang->L_INSTALLED; ?>';
failedText['<?php echo $langId; ?>'] = '<?php echo $this->lang->L_ERROR; ?>';
updateText['<?php echo $langId; ?>'] = '<?php echo $this->lang->L_UPDATE; ?>';
<?php
}
$this->lang->loadLanguage($currentLanguage);
?>
var oldHtml = '';
function dlLanguageFile(language)
{
$('#status-icon-' + language).attr('src', throbberImgSrc);
$('#status-' + language).html(updateText[language]);
$('#update-button-' + language).attr('disabled', 'disabled');
$.getJSON(langUrl + language, function(objResult) {
if (objResult.success) {
$('#status-icon-' + objResult.language).attr('src', okImgSrc);
$('#status-' + objResult.language).html(installedText[objResult.language]);
$('#lang-' + objResult.language).removeAttr('disabled');
changeLang(objResult.language);
} else {
$('#status-icon-' + objResult.language).attr('src', failImgSrc);
$('#status-' + objResult.language).html(failedText[objResult.language]);
$('#lang-' + objResult.language).attr('disabled', 'disabled');
}
$('#update-button-' + objResult.language).removeAttr('disabled');
if (objResult.error.message) {
$('#container').append(objResult.error.message);
$('#update-message').dialog({"modal": 1,"dialogClass": "error","buttons": {"OK": function() {$(this).dialog('close');}},"position": {"0": "center","1": "center"},"title": "<?php echo $this->lang->L_INSTALL; ?>"});
}
});
}
</script>
<form id="langform" action="<?php
echo $this->url(
array(
'controller' => 'install',
'action' => 'index',
),
null,
true
);?>" method="post" enctype="multipart/formdata">
<table cellpadding="0" cellspacing="0" border="0" class="bdr" style="width: 700px;" summary="Select language">
<tr class="thead">
<td colspan="5" style="text-align:center;">
<button type="submit" class="Formbutton" style="margin:12px;"><?php echo $this->getIcon('save');?> <?php echo $this->lang->L_SAVEANDCONTINUE;?></button>
</td>
</tr>
<tr class="thead">
<th class="right">#</th>
<th><?php echo $this->lang->L_LANGUAGE;?></th>
<th colspan="2"><?php echo $this->lang->L_STATUS;?></th>
<th><?php echo $this->lang->L_ACTION;?></th>
</tr>
<?php
$counter = 1;
asort($languages);
foreach ($languages as $langId => $language) {
if (file_exists(sprintf($baseLangFile, $langId))) {
$this->lang->loadLanguage($langId);
} else {
$this->lang->loadLanguage($fallbackLanguage);
}
if ($langId == $this->language) {
$checked = ' checked="checked"';
} else {
$checked = '';
}
?>
<tr class="row-<?php echo (($counter % 2) == 0) ? 'odd' : 'even'; ?>">
<td class="right"><?php echo $counter; ?>.</td>
<td class="nowrap"><div id="lang_line_<?php echo $counter; ?>">
<input type="radio" class="radio" name="language" value="<?php echo $langId; ?>" id="lang-<?php echo $langId; ?>"<?php echo $language['installed'] ? '' : ' disabled="disabled"'; ?> onclick="changeLang('<?php echo $langId; ?>');"<?php echo $checked; ?> />
<label for="lang-<?php echo $langId; ?>"><img src="<?php echo $this->baseUrl(); ?>/flag.php?langId=<?php echo $langId; ?>" alt=""/> <?php echo $language['langName']; ?></label>
</div></td>
<td><img src="<?php
echo $language['installed'] ? $this->getIconSrc('Ok', 16) : $this->getIconSrc('Attention', 16);
?>" id="status-icon-<?php echo $langId; ?>" alt=""/></td>
<td id="status-<?php echo $langId; ?>"><?php
echo $language['installed'] ? $this->lang->L_INSTALLED : $this->lang->L_NOTAVAIL;
?></td>
<td style="text-align:center;"><button id="update-button-<?php echo $langId; ?>" type="button" class="Formbutton" onclick="dlLanguageFile('<?php echo $langId; ?>');" style="width:150px;"><?php echo $this->getIcon('Sync', '', 16); ?> <?php echo $this->lang->L_UPDATE; ?></button></td>
</tr>
<?php
$counter++;
}
$this->lang->loadLanguage($currentLanguage);
?>
<tr class="thead">
<td colspan="5" style="text-align:center;">
<button type="submit" class="Formbutton" style="margin:12px;"><?php echo $this->getIcon('save');?> <?php echo $this->lang->L_SAVEANDCONTINUE;?></button>
</td>
</tr>
</table>
<div id="langDl" title="Language Download">
</div>
</form>

Datei anzeigen

@ -0,0 +1,37 @@
<table cellpadding="0" cellspacing="0" class="bdr" summary="Show write status of directories">
<tr class="thead">
<th><?php echo $this->lang->L_DIR; ?></th>
<th colspan="2"><?php echo $this->lang->L_STATUS; ?></th>
<th>&nbsp;</th>
</tr>
<?php
$counter = 1;
foreach ($this->status as $directory => $statusInfo) {
$rowClass = 'row-' . ((($counter % 2) == 0)? 'odd' : 'even');
if (!$statusInfo['exists'] ||
!$statusInfo['writable'] ||
$statusInfo['chmod'] != '0777'
) {
$icon = $this->getIcon('delete');
} else {
$icon = $this->getIcon('Ok', null, 16);
}
?>
<tr class="<?php echo $rowClass; ?>">
<td rowspan="3"><?php echo $directory; ?></td>
<td>Exists</td>
<td><?php echo $statusInfo['exists'] ? 'yes' : 'no'; ?></td>
<td rowspan="3"><?php echo $icon; ?></td>
</tr>
<tr class="<?php echo $rowClass; ?>">
<td>Writable</td>
<td><?php echo $statusInfo['writable'] ? 'yes' : 'no'; ?></td>
</tr>
<tr class="<?php echo $rowClass; ?>">
<td>chmod</td>
<td><?php echo $statusInfo['chmod']; ?></td>
</tr>
<?php
$counter++;
}
?></table>

Datei anzeigen

@ -0,0 +1,18 @@
<form action="<?php echo $this->url(array(
'controller' => 'install',
'action' => 'step3',
), null, true);
?>" method="post" enctype="multipart/formdata">
<table cellpadding="0" cellspacing="0" class="bdr" style="width: 700px;" summary="Provide admin user account">
<tr class="thead left">
<th colspan="2">
<h2><?php echo $this->lang->L_NOTICE;?></h2>
<?php echo $this->lang->L_REGISTRATION_DESCRIPTION; ?>
<br /><br />
</th>
</tr>
<?php
echo $this->form;
?>
</table>
</form>

Datei anzeigen

@ -0,0 +1,128 @@
<form action="<?php
echo $this->url(array(
'controller' => 'install',
'action' => 'step4',
));
$okIcon = $this->getIcon('Ok', null, 16);
$request = Zend_Controller_Front::getInstance()->getRequest();
?>" method="post" enctype="multipart/formdata">
<table cellpadding="0" cellspacing="0" class="bdr" style="width: 700px;" summary="Provide MySQL access data">
<?php
if (isset($this->success) && $this->success) {
?>
<tr class="thead">
<td style="text-align:center;" colspan="2">
<br />
<button class="Formbutton" type="submit">
<?php echo $this->getIcon('save'); ?> <?php echo $this->lang->L_SAVEANDCONTINUE; ?>
</button><br class="clear" /><br />
</td>
</tr>
<?php
}
?>
<tr class="row-even">
<td><?php echo $this->lang->L_DB_HOST; ?>:</td>
<td><input type="text" class="text" name="host" maxlength="100" style="width:250px;"
value="<?php echo $request->getParam('host', 'localhost'); ?>"
autocomplete="off" /></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_DB_USER; ?>:</td>
<td><input type="text" class="text" name="user" maxlength="100" style="width:250px;"
value="<?php echo $request->getParam('user', 'root'); ?>"
autocomplete="off" /></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_DB_PASS; ?>:</td>
<td><input type="password" class="text" name="pass" maxlength="100" style="width:250px;"
value="<?php echo $request->getParam('pass', ''); ?>"
autocomplete="off" /></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_DB; ?>:
<p class="small"><?php echo $this->lang->L_ENTER_DB_INFO; ?></p></td>
<td><input type="text" class="text" name="manual" maxlength="100" style="width:250px;" value="<?php echo $request->getParam('manual', ''); ?>" /></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_PORT; ?>:
<p class="small"><?php echo $this->lang->L_INSTALL_HELP_PORT; ?></p></td>
<td><input type="text" class="text" name="port" maxlength="100" style="width:250px;" value="<?php echo $request->getParam('port', ''); ?>" /></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_SOCKET; ?>:
<p class="small"><?php echo $this->lang->L_INSTALL_HELP_SOCKET; ?></p></td>
<td><input type="text" class="text" name="socket" maxlength="100" style="width:250px;" value="<?php echo $request->getParam('socket', ''); ?>" /></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_TESTCONNECTION; ?>:</td>
<td><button type="submit" class="Formbutton">
<?php echo $this->getIcon('Connect', null, 16); ?> <?php echo $this->lang->L_CONNECTTOMYSQL; ?>
</button></td>
</tr>
</table>
<?php
if(isset($this->success)) {
?><br/><br/>
<table class="bdr" cellpadding="0" cellspacing="0" style="width:700px;" summary="MySQL connection results">
<?php
if ($this->success) {
?>
<tr class="thead">
<th><?php echo $this->lang->L_DBCONNECTION; ?> <?php echo $okIcon; ?></th>
</tr>
<?php
if (count($this->databases) > 0) {
foreach ($this->databases as $database) {
?>
<tr class="dbrow">
<td class="small success">
<div style="float:left; padding-right: 5px;" title="<?php echo $this->lang->L_INSTALL_DB_DEFAULT; ?>">
<input type="radio" name="defaultDb" value="<?php echo $database; ?>" />
</div>
<?php echo $database; ?>
<div style="float:right;">
<?php echo $okIcon; ?>
</div>
</td>
</tr>
<?php
}
} else {
?>
<tr>
<td><?php echo $okIcon; ?> <?php echo $this->lang->L_NO_DB_FOUND_INFO; ?></td>
</tr>
<?php
}
?>
<tr class="thead">
<td style="text-align:center;">
<br />
<button class="Formbutton" type="submit">
<?php echo $this->getIcon('save'); ?> <?php echo $this->lang->L_SAVEANDCONTINUE; ?>
</button><br class="clear" /><br />
<input type="hidden" name="save" value="1"/>
</td>
</tr>
<?php
} else {
?>
<tr class="thead">
<th><?php echo $this->lang->L_DBCONNECTION; ?> <?php echo $this->getIcon('delete'); ?></th>
</tr>
<tr>
<td class="error">
<br /><?php echo $this->errorMessage; ?><br /><br/>
</td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
</form>

Datei anzeigen

@ -0,0 +1,27 @@
<?php
$lang = Msd_Language::getInstance();
$language = isset($this->language) ? $this->language : '';
$firstStepOk = $secondStepOk = $thirdStepOk = $fourthStepOk = '';
$imageOk = $this->getIcon('Ok', null, 16);
if ($this->firstStepOK) {
$firstStepOk = $imageOk;
}
if ($this->secondStepOK) {
$secondStepOk = $imageOk;
}
if ($this->thirdStepOK) {
$thirdStepOk = $imageOk;
}
if ($this->fourthStepOK) {
$fourthStepOk = $imageOk;
}
?>
<table cellspacing="0" cellpadding="0" border="0" class="bdr" summary="Show active installation step">
<tr class="row-even">
<td><?php echo $lang->L_STEP;?> 1: <span class="small"><?php echo $lang->L_SELECT_LANGUAGE;?> (<?php echo$this->language;?>)</span><?php echo $firstStepOk;?></td>
<td><?php echo $lang->L_STEP;?> 2: <span class="small"><?php echo $lang->L_CHECK_DIRS;?></span><?php echo $secondStepOk;?></td>
<td><?php echo $lang->L_STEP;?> 3: <span class="small"><?php echo $lang->L_AUTHENTICATE;?></span><?php echo $thirdStepOk;?></td>
<td><?php echo $lang->L_STEP;?> 4: <span class="small"><?php echo $lang->L_DBPARAMETER;?></span><?php echo $fourthStepOk;?></td>
</tr>
</table><br/>
<h3><?php echo $lang->L_STEP ?> <?php echo $this->stepInfo['number'];?>: <?php echo $this->stepInfo['description'];?></h3>

Datei anzeigen

@ -0,0 +1,53 @@
<a onclick="getLog('<?php echo $this->url(array('action' => 'ajax', 'log' => $this->log, 'reverse' => $this->reverse, 'offset' => null))?>');"
href="#" class="Formbutton" accesskey="s">
<?php
if ($this->reverse == 0) {
echo $this->getIcon('ArrowUp', '', 16);
} else {
echo $this->getIcon('ArrowDown', '', 16);
}
?>
<?php echo$this->sortIcon;?></a>
<?php echo$this->paginagion;?>
<?php echo $this->paginationControl($this->logEntries,
'Sliding',
'log/paginator.phtml',
array($this->x)); ?>
<a class="Formbutton" href="<?php echo $this->url(array('controller' => 'log', 'action' => 'index', 'offset' => null, 'delete' => 1))?>"
onclick="if(!(confirm('<?php echo $this->jsEscape(sprintf($this->lang->L_CONFIRM_DELETE_FILE, $this->log), true); ?>'))) return false;">
<?php echo $this->getIcon('DustbinFull', '', 16);?>
<?php echo $this->lang->L_DELETE.' '.$this->log;?>
</a>
<br />
<table id="table_log" class="bdr" summary="Show log file data">
<tr class="thead">
<th class="left">#</th>
<th class="left"><?php echo$this->lang->L_TIMESTAMP?></th>
<th class="left"><?php echo$this->lang->L_MESSAGE?></th>
</tr>
<?php
$i=1;
if ($this->page>0) {
$i=(($this->page-1) * $this->entriesPerPage)+1;
}
foreach ($this->logEntries as $line) :
$data=explode(' ', $line, 2);
?>
<tr class="<?php echo$this->cycle(array('row-even', 'row-odd'))->next();?>">
<td class="small right"><?php echo $i;?>.</td>
<td class="small nowrap">
<?php
echo $this->timeToDate($data[0]);
?></td>
<td class="small">
<?php
if (!empty($data[1])) {
echo $data[1];
}
?></td>
</tr>
<?php
$i++;
endforeach; ?>
</table>

Datei anzeigen

@ -0,0 +1,132 @@
<?php
$phpLogUrl = $this->url(array('controller' => 'log',
'action' => 'index',
'log' => Msd_Log::PHP,
'revers' => $this->revers),
'default',
TRUE);
$errorLogUrl = $this->url(array('controller' => 'log',
'action' => 'index',
'log' => Msd_Log::ERROR,
'revers' => $this->revers),
'default',
TRUE);
$perlLogUrl = $this->url(array('controller' => 'log',
'action' => 'index',
'log' => Msd_Log::PERL,
'revers' => $this->revers),
'default',
TRUE);
$perlCompleteLogUrl = $this->url(array('controller' => 'log',
'action' => 'index',
'log' => Msd_Log::PERL_COMPLETE,
'revers' => $this->revers),
'default',
TRUE);
// get log param to set the active item in TabBar
$activeLog = Zend_Controller_Front::getInstance()->getRequest()->getParam('log', '');
// format action name and escape possible dot in action name
if (!empty($activeLog)) {
$activeLog = '"#' . str_replace('.', '\\\.', $activeLog) . '"';
} else {
$activeLog = '"#PHP-Log"'; // default
}
?>
<?php $this->jQuery()->javascriptCaptureStart(); ?>
// set selected tab
$(document).ready(function() {
$(<?php echo $activeLog; ?>).addClass("ui-tabs-selected");
});
<?php $this->jQuery()->javascriptCaptureEnd(); ?>
<div id="content">
<h2><?php echo $this->lang->L_LOG; ?></h2>
<div id="logButtonBar" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li id="PHP-Log" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $phpLogUrl; ?>">
<?php echo $this->getIcon('Info', '', 16);?>
<?php echo $this->lang->L_PHP_LOG; ?>
</a>
</li>
<li id="Error-Log" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $errorLogUrl; ?>">
<?php echo $this->getIcon('Info', '', 16);?>
<?php echo $this->lang->L_ERROR_LOG?>
</a>
</li>
<li id="PERL-Log" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $perlLogUrl; ?>">
<?php echo $this->getIcon('Info', '', 16);?>
<?php echo $this->lang->L_PERL_LOG?>
</a>
</li>
<li id="PERL-Complete-Log" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $perlCompleteLogUrl;?>">
<?php echo $this->getIcon('Info', '', 16);?>
<?php echo $this->lang->L_PERL_COMPLETELOG?>
</a>
</li>
</ul>
</div>
<div class="left">
<br />
<table class="bdr" summary="Show log file sizes">
<tr class="thead">
<th><?php echo $this->lang->L_NAME?></th>
<th class="right"><?php echo $this->lang->L_FILESIZE?></th>
</tr>
<tr>
<td><?php echo Msd_Log::PHP;?></td>
<td class="right">
<?php echo $this->filesize($this->log->getFile(Msd_Log::PHP));?>
</td>
</tr>
<tr>
<td><?php echo Msd_Log::ERROR;?></td>
<td class="right">
<?php echo $this->filesize($this->log->getFile(Msd_Log::ERROR));?>
</td>
</tr>
<tr>
<td><?php echo Msd_Log::PERL;?></td>
<td class="right">
<?php echo $this->filesize($this->log->getFile(Msd_Log::PERL));?>
</td>
</tr>
<tr>
<td><?php echo Msd_Log::PERL_COMPLETE;?></td>
<td class="right">
<?php echo $this->filesize($this->log->getFile(Msd_Log::PERL_COMPLETE));?>
</td>
</tr>
</table>
<br />
</div>
<div class="left" style="width: 100%">
<h3><?php echo $this->lang->L_LOG?> "<?php echo $this->activeLog?>": <img alt="Loading..." title="Loading..." style="display: none;"
class="ajax-reload" src="<?php echo $this->baseUrl();?>/css/msd/icons/ajax-loader.gif" /></h3>
<script type="text/javascript">
/*<![CDATA[*/
$(document).ready(function() {
getLog('<?php echo $this->url(array('controller' => 'log', 'action'=>'ajax','log'=>$this->activeLog,'revers'=>$this->revers, 'offset'=>$this->offset))?>');
});
/*]]>*/
</script>
<div id="ilog" class="small"></div>
</div>
</div>

Datei anzeigen

@ -0,0 +1,50 @@
<?php
$this->lang = Msd_Language::getInstance();
if ($this->pageCount): ?>
<a href="#" <?php if($this->current>1): ?>
onclick="getLog('<?php echo $this->url(array('action'=>'ajax','offset'=>$this->first)) ?>');"
accesskey="f" class="Formbutton"><?php echo $this->getIcon('First', '', 16);?>
<?php else: ?>
disabled="disabled" class="Formbutton"><?php echo $this->getIcon('FirstDisabled', '', 16);?>
<?php endif; ?>
</a>
<a href="#" <?php if($this->previous != null): ?>
onclick="return getLog('<?php echo $this->url(array('action'=>'ajax','offset'=>$this->previous)) ?>');"
accesskey="c" class="Formbutton">
<?php echo $this->getIcon('Back', '', 16);?>
<?php else: ?>
disabled="disabled" class="Formbutton"><?php echo $this->getIcon('BackDisabled', '', 16);?>
<?php endif; ?>
</a>
<script type="text/javascript">
$(function() {
$( "#combobox" ).combobox();
$( "#toggle" ).click(function() {
$( "#combobox" ).toggle();
});
});
</script>
<select id="combobox">
<?php for($i=1; $i <= $this->pageCount; $i++) { ?>
<option <?php if ($i == $this->current) echo 'selected="selected"'; ?>><?php echo $i; ?></option>
<?php } ?>
</select>
<a href="#" <?php if($this->next != null): ?>
onclick="return getLog('<?php echo $this->url(array('action'=>'ajax','offset'=>$this->next)) ?>');"
accesskey="v" class="Formbutton"><?php echo $this->getIcon('Forward', '', 16);?>
<?php else: ?>
disabled="disabled"
class="Formbutton"><?php echo $this->getIcon('ForwardDisabled', '', 16);?>
<?php endif; ?>
</a>
<a href="#" <?php if($this->current<$this->last): ?>
onclick="getLog('<?php echo $this->url(array('action'=>'ajax','offset'=>$this->last)) ?>');"
accesskey="f" class="Formbutton"><?php echo $this->getIcon('Last', '', 16);?>
<?php else: ?>
disabled="disabled" class="Formbutton"><?php echo $this->getIcon('LastDisabled', '', 16);?>
<?php endif; ?>
</a>
<?php endif; ?>

Datei anzeigen

@ -0,0 +1 @@
Restore

Datei anzeigen

@ -0,0 +1,27 @@
<?php
$i = 1;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
foreach ($this->processes as $process): ?>
<tr class="<?php echo $cycleHelper->next()?>">
<td>
<a href="<?php echo $this->url(array(
'controller'=>'sql.server',
'action'=>'kill.process',
'processId' => $process['Id']));?>">
<?php echo $this->getIcon('delete', $this->lang->L_KILL_PROCESS);?>
</a>
&nbsp;
</td>
<td class="right"><?php echo $i;?>.</td>
<td><?php echo $process['Id'];?></td>
<td><?php echo $process['User'];?></td>
<td><?php echo $process['Host'];?></td>
<td><?php echo $process['db'];?></td>
<td><?php echo $process['Command'];?></td>
<td><?php echo $process['Time'];?></td>
<td><?php echo $process['State'];?></td>
<td><?php echo $process['Info'];?></td>
</tr>
<?php
++$i;
endforeach; ?>

Datei anzeigen

@ -0,0 +1,63 @@
<?php
$showVariablesUrl = $this->url(array('controller'=>'sql.server','action'=>'show.variables'));
$showStatusUrl = $this->url(array('controller'=>'sql.server','action'=>'show.status'));
$showProcesslistUrl = $this->url(array('controller'=>'sql.server','action'=>'show.processlist'));
$showCharsetsUrl = $this->url(array('controller'=>'sql.server','action'=>'show.charsets'));
// get action name to set the active item in TabBar
$actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
// format action name and escape possible dot in action name
$actionName = '"#' . str_replace('.', '\\\.', $actionName) . '"';
?>
<?php $this->jQuery()->javascriptCaptureStart(); ?>
// set selected tab
$(document).ready(function() {
$(<?php echo $actionName; ?>).addClass("ui-state-active");
$(<?php echo $actionName; ?>).addClass("ui-tabs-selected");
});
<?php $this->jQuery()->javascriptCaptureEnd(); ?>
<div id="headnavi" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li id="show.variables"
class="ui-state-default ui-corner-top"
onmouseover="tabOver(this)"
onmouseout="tabOut(this)">
<a href="<?php echo $showVariablesUrl;?>">
<?php echo$this->getIcon('Reports', '', 16);?>
<?php echo $this->lang->L_MYSQLVARS;?>
</a>
</li>
<li id="show.status"
class="ui-state-default ui-corner-top"
onmouseover="tabOver(this)"
onmouseout="tabOut(this)">
<a href="<?php echo $showStatusUrl;?>">
<?php echo$this->getIcon('Reports', '', 16);?>
<?php echo $this->lang->L_STATUS;?>
</a>
</li>
<li id="show.processlist"
class="ui-state-default ui-corner-top"
onmouseover="tabOver(this)"
onmouseout="tabOut(this)">
<a href="<?php echo $showProcesslistUrl;?>">
<?php echo$this->getIcon('Reports', '', 16);?>
<?php echo $this->lang->L_PROZESSE;?>
</a>
</li>
<li id="show.charsets"
class="ui-state-default ui-corner-top"
onmouseover="tabOver(this)"
onmouseout="tabOut(this)">
<a href="<?php echo $showCharsetsUrl;?>">
<?php echo$this->getIcon('Reports', '', 16);?>
<?php echo $this->lang->L_CHARSETS;?>
</a>
</li>
</ul>
</div>

Datei anzeigen

@ -0,0 +1,4 @@
<div id="content">
<h2><?php echo $this->lang->L_SQL_SERVER;?></h2>
<?php echo $this->render('sql-server/head-navi.phtml');?>
</div>

Datei anzeigen

@ -0,0 +1,50 @@
<div id="content">
<h2><?php echo $this->lang->L_CHARSETS;?></h2>
<?php echo $this->render('sql-server/head-navi.phtml'); ?>
<table class="bdr" summary="Show possible character sets">
<tr class="thead">
<th class="right">#</th>
<th class="head"><?php echo $this->lang->L_DESCRIPTION;?></th>
<th class="head"><?php echo $this->lang->L_CHARSET;?></th>
<th class="head">
<span class="tooltip explain" title="<?php echo $this->lang->L_MAXIMUM_LENGTH_EXPLAIN;?>">
<?php echo $this->lang->L_MAXIMUM_LENGTH;?>
</span>
</th>
<th class="head"><?php echo $this->lang->L_DEFAULT_COLLATION_NAME;?></th>
<th class="head">
<span class="tooltip explain" title="<?php echo $this->lang->L_POSSIBLE_COLLATIONS_EXPLAIN;?>">
<?php echo $this->lang->L_POSSIBLE_COLLATIONS;?>
</span>
</th>
</tr>
<?php
$i = 1;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
foreach ($this->charsets as $set) {
$collations = $this->collations[$set['CHARACTER_SET_NAME']];
?>
<tr class="<?php echo $cycleHelper->next()?>">
<td class="small right"><?php echo $i;?>.</td>
<td class="small"><?php echo $this->escape($set['DESCRIPTION']);?></td>
<td class="small"><?php echo $this->escape($set['CHARACTER_SET_NAME']);?></td>
<td class="small"><?php echo $this->escape($set['MAXLEN']);?></td>
<td class="small"><?php echo $this->escape($set['DEFAULT_COLLATE_NAME']);?></td>
<td class="small"><?php echo $this->out($collations[0]);?></td>
</tr>
<?php
unset($collations[0]);
foreach ($collations as $collation) { ?>
<tr class="<?php echo $cycleHelper->next()?>">
<td class="small" colspan="4">&nbsp;</td>
<td class="small">&nbsp;</td>
<td class="small"><?php echo $this->escape($collation);?></td>
</tr>
<?php
}
$i++;
};
?>
</table>
<br /><br /><br />
</div>

Datei anzeigen

@ -0,0 +1,79 @@
<div id="content">
<h2><?php echo $this->lang->L_STATUS;?></h2>
<?php echo $this->render('sql-server/head-navi.phtml'); ?>
<div style="height:20px;">
<div style="width:32px;float: left">
&nbsp;
<span id="loader" class="invisible"><?php echo $this->getIcon('ajax-loader');?>
</span>
</div>
<div style="padding-top:2px;">
<?php echo $this->lang->L_REFRESHTIME .': <span id="refreshTime">'.$this->interval.'</span> '.$this->lang->L_SECONDS;?>
</div>
</div>
<div id="processlist-table">
<table class="bdr">
<thead>
<tr class="thead">
<th><?php echo $this->lang->L_ACTION;?></th>
<th>#</th>
<th><?php echo $this->lang->L_PROCESS_ID;?></th>
<th><?php echo $this->lang->L_DB_USER;?></th>
<th><?php echo $this->lang->L_DB_HOST;?></th>
<th><?php echo $this->lang->L_DB;?></th>
<th><?php echo $this->lang->L_COMMAND;?></th>
<th><?php echo $this->lang->L_TIME;?></th>
<th><?php echo $this->lang->L_STATUS;?></th>
<th><?php echo $this->lang->L_INFO;?></th>
</tr>
</thead>
<tbody id="processlist">
<tr>
<td colspan="10"></td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript">
<?php
$getProcesslistUrl = $this->url(array(
'controller'=>'sql.server',
'action'=>'get.processlist')
);
?>
function refreshProcesslist() {
setOpacity('#processlist-table', 0.5);
$('#loader').show();
$.ajax({
url: '<?php echo $getProcesslistUrl;?>',
cache: false,
success: function (data) {
$('#loader').hide();
$('#processlist').html(data);
setOpacity('#processlist-table', 1);
$('#refreshTime').html(<?php echo $this->interval;?>);
window.setTimeout("refreshTimer()", 1000);
}
});
}
function refreshTimer()
{
var seconds = $('#refreshTime').html();
seconds--;
if (seconds <= 0){
$('#refreshTime').html(0);
refreshProcesslist();
seconds = <?php echo $this->interval;?>;
} else {
window.setTimeout("refreshTimer()", 1000);
$('#refreshTime').html(seconds);
}
}
$(document).ready(function() {
refreshProcesslist();
});
</script>
<br /><br /><br />
</div>

Datei anzeigen

@ -0,0 +1,38 @@
<div id="content">
<h2><?php echo $this->lang->L_STATUS;?></h2>
<?php echo $this->render('sql-server/head-navi.phtml'); ?>
<form action="" method="post" id="groupChange">
<p>
<?php echo $this->lang->L_FILTER_BY; ?>:
<select name="group" id="group" onchange="$('#groupChange').submit();">
<?php echo $this->groupOptions;?>
</select>
<button class="Formbutton" onclick="$('#group').val('');$('#groupChange').submit();" type="button">
<?php
echo $this->getIcon('delete');
echo $this->lang->L_DESELECT_ALL;?>
</button>
</p>
</form>
<table class="bdr">
<tr class="thead">
<th class="right">#</th>
<th><strong><?php echo $this->lang->L_NAME;?></strong></th>
<th><strong><?php echo $this->lang->L_VALUE;?></strong></th>
</tr>
<?php
$i = 1;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
foreach ($this->variables as $name => $value) : ?>
<tr class="<?php echo $cycleHelper->next()?>">
<td class="small right"><?php echo $i;?>.</td>
<td class="small"><?php echo $this->escape($name);?></td>
<td class="small"><?php echo $this->escape($value);?></td>
</tr>
<?php
++$i;
endforeach;
?>
</table>
<br /><br /><br />
</div>

Datei anzeigen

@ -0,0 +1,38 @@
<div id="content">
<h2><?php echo $this->lang->L_MYSQLVARS;?></h2>
<?php echo $this->render('sql-server/head-navi.phtml'); ?>
<form action="" method="post" id="groupChange">
<p>
<?php echo $this->lang->L_FILTER_BY; ?>:
<select name="group" id="group" onchange="$('#groupChange').submit();">
<?php echo $this->groupOptions;?>
</select>
<button class="Formbutton" onclick="$('#group').val('');$('#groupChange').submit();" type="button">
<?php
echo $this->getIcon('delete');
echo $this->lang->L_DESELECT_ALL;?>
</button>
</p>
</form>
<table class="bdr">
<tr class="thead">
<th class="right">#</th>
<th><strong><?php echo $this->lang->L_NAME;?></strong></th>
<th><strong><?php echo $this->lang->L_VALUE;?></strong></th>
</tr>
<?php
$i = 1;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
foreach ($this->variables as $name => $value) : ?>
<tr class="<?php echo $cycleHelper->next()?>">
<td class="small right"><?php echo $i;?>.</td>
<td class="small"><?php echo $this->escape($name);?></td>
<td class="small"><?php echo $this->escape($value);?></td>
</tr>
<?php
++$i;
endforeach;
?>
</table>
<br /><br /><br />
</div>

Datei anzeigen

@ -0,0 +1,89 @@
<?php
$formUrl = $this->url(array('controller'=>'sql','action'=>'create.database'));
?>
<div id="content">
<h2><?php echo $this->lang->L_CREATE_DATABASE;?></h2>
<?php echo $this->sqlHeadNavi(); ?>
<h4><?php echo $this->lang->L_CREATE_DATABASE;?>:</h4>
<form method="post" action="<?php echo $formUrl;?>">
<table class="bdr" summary="create new database">
<tr class="row-odd">
<td><?php echo $this->lang->L_DB_NAME; ?>:</td>
<td><input type="text" class="text" id="dbName" name="newDbInfo[dbName]" value="<?php echo (isset($this->dbCreated) && !$this->dbCreated) ? $this->out($this->newDbInfo['dbName']) : ''; ?>"/></td>
</tr>
<tr class="row-even">
<td><?php echo $this->lang->L_DEFAULT_CHARSET;?>:</td>
<td><select class="select" id="dbCharset" name="newDbInfo[dbCharset]"><?php foreach ($this->charsets as $charset) { ?>
<option value="<?php echo $this->out($charset); ?>"<?php echo ($charset == $this->newDbInfo['dbCharset']) ? ' selected="selected"' : ''; ?>><?php echo $this->out($charset); ?></option>
<?php } ?></select></td>
</tr>
<tr class="row-odd">
<td><?php echo $this->lang->L_DEFAULT_COLLATION_NAME;?>:</td>
<td><select class="select" id="dbCollation" name="newDbInfo[dbCollation]"><?php foreach ($this->collations[$this->newDbInfo['dbCharset']] as $collation) { ?>
<option value="<?php echo $this->out($collation); ?>"<?php echo ($collation == $this->newDbInfo['dbCollation']) ? ' selected="selected"' : ''; ?>><?php echo $this->out($collation); ?></option>
<?php } ?></select></td>
</tr>
<tr class="row-even">
<td>&nbsp;</td>
<td class="buttonBar">
<button type="submit" class="Formbutton"><?php echo $this->getIcon('Database', '', 16); echo $this->lang->L_CREATE_DATABASE; ?></button>
</td>
</tr>
</table>
</form>
</div>
<?php $this->jQuery()->onLoadCaptureStart(); ?>
var dbCollations = <?php echo json_encode($this->collations); ?>;
var dbDefaultCollations = <?php echo json_encode($this->defaultCollations); ?>;
$('#dbCharset').bind('change', function() {
var newOpts = '';
var curCharset = $(this).val();
$(dbCollations[curCharset]).each(function(id, v) {
var selected = '';
if (v == dbDefaultCollations[curCharset]) {
selected = ' selected="selected"';
}
newOpts += '<option value="' + v +'"' + selected + '>' + v + '</option>';
$('#dbCollation').html(newOpts);
});
});
$(document).ready(function() {
$('#dbName').focus();
});
<?php
$this->jQuery()->onLoadCaptureEnd();
if (isset($this->dbCreated)) {
if ($this->dbCreated) {
$this->popUpMessage()->addMessage(
'dialogDbCreation',
'L_CREATE_DATABASE',
array('L_DATABASE_CREATED_SUCCESS', $this->newDbInfo['dbName']),
array(
'modal' => 'true',
'autoOpen' => 'true',
'buttons' => array(
'L_OK' => 'function(){$(this).dialog("close"); }',
)
)
);
} else {
$this->popUpMessage()->addMessage(
'dialogDbCreation',
'L_CREATE_DATABASE',
array(
'L_DATABASE_CREATED_FAILED',
'<span class="error">(' . $this->errorInfo['code'] . ') '
. $this->errorInfo['message'] .'</span>'
),
array(
'modal' => 'true',
'autoOpen' => 'true',
'buttons' => array(
'L_OK' => 'function(){$(this).dialog("close"); }',
)
)
);
}
}
?>

Datei anzeigen

@ -0,0 +1,44 @@
<tr class="thead">
<th>&nbsp;</th>
<th>
<img src="<?php echo $this->getIconSrc('plus', '');?>"
class="pointer tooltip"
title="<?php echo $this->lang->L_SELECT_ALL;?>"
alt="<?php echo $this->lang->L_SELECT_ALL;?>"
onclick="checkAll('.dbCheckbox');checkButtonState();"/>
<img src="<?php echo $this->getIconSrc('minus', '');?>"
class="pointer tooltip"
title="<?php echo $this->lang->L_DESELECT_ALL;?>"
alt="<?php echo $this->lang->L_DESELECT_ALL;?>"
onclick="unCheckAll('.dbCheckbox');checkButtonState();"/>
</th>
<th>#</th>
<th><?php echo $this->lang->L_DB_NAME;?></th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_MYSQL_TABLES_EXPLAIN;?>">
<?php echo $this->lang->L_TABLES;?>
</span>
</th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_DATASIZE_INFO;?>">
<?php echo $this->lang->L_DATASIZE;?>
</span>
</th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_MYSQL_VIEWS_EXPLAIN;?>">
<?php echo $this->lang->L_MYSQL_VIEWS;?>
</span>
</th>
<th>
<span class="tooltip explain"
title="<?php echo $this->lang->L_MYSQL_ROUTINES_EXPLAIN;?>">
<?php echo $this->lang->L_MYSQL_ROUTINES;?>
</span>
</th>
<th><?php echo $this->lang->L_DEFAULT_CHARACTER_SET_NAME;?></th>
<th><?php echo $this->lang->L_DEFAULT_COLLATION_NAME;?></th>
</tr>

Datei anzeigen

@ -0,0 +1,212 @@
<?php
$systemDatabases = $this->config->get('config.systemDatabases');
$formUrl = $this->url(array('controller'=>'sql','action'=>'index'));
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
?>
<div id="content">
<h2><?php echo $this->lang->L_DATABASES_OF_USER;?> '<?php echo $this->config->get('config.dbuser.user').'\'@\''.$this->config->get('config.dbuser.host');?>'</h2>
<?php echo $this->sqlHeadNavi(); ?>
<?php
if (isset($this->actionResults)) {
?>
<h4><?php echo $this->lang->L_ACTION . ' - ' . $this->lang->getTranslator()->translate($this->executedAction); ?>:</h4>
<table class="bdr" summary="Table shows formatted result of action">
<tr class="thead nowrap">
<td class="right">#</td>
<th class="left"><?php echo $this->lang->L_DB; ?></th>
<th class="small"><?php echo $this->lang->L_QUERY; ?></th>
<th colspan="2" class="left"><?php echo $this->lang->L_SQL_OUTPUT; ?></th>
</tr>
<?php
$row = 0;
foreach ($this->actionResults as $dbName => $dbResults) {
foreach ($dbResults as $dbResult) {
$row++;
if ($dbResult['result']) {
?>
<tr class="nowrap <?php echo $cycleHelper->next();?>">
<td class="small right"><?php echo $row; ?>.</td>
<td class="small"><?php echo $dbName; ?></td>
<td class="small"><?php echo $dbResult['query']; ?></td>
<td class="small right"><?php echo $this->getIcon('Ok', '', 16); ?></td>
</tr>
<?php
} else {
?>
<tr class="error">
<td class="right"><?php echo $row; ?>.</td>
<td class="small"><?php echo $dbName; ?></td>
<td><?php echo $dbResult['query']; ?></td>
<td class="error"><?php echo $dbResult['errorInfo']['code'] . ': ' . $dbResult['errorInfo']['message']; ?></td>
<td class="right"><?php echo $this->getIcon('Attention', '', 16); ?></td>
</tr>
<?php
}
}
}
if (isset($this->actionResults) && empty($this->actionResults)) {
?>
<tr class="nowrap <?php echo $cycleHelper->next();?>">
<td colspan="4">
<?php echo $this->lang->L_NOTHING_TO_DO; ?>
</td>
</tr>
<?php
}
?>
</table><br/>
<?php
}
?>
<form method="post" action="<?php echo $formUrl;?>" class="dbForm" id="dbForm">
<table class="bdr" summary="Table lists all databases">
<tr class="thead">
<th colspan="10">
<button class="Formbutton" type="button" onclick="window.location.href='<?php echo $this->url(array('controller' => 'sql', 'action' => 'create.database')); ?>';">
<?php
echo $this->getIcon('Database', '', 16);
echo $this->lang->L_CREATE_DATABASE;
?>
</button>
<button id="buttonTruncate" disabled="disabled" class="Formbutton" type="button"
onclick="if (!hasCheckedElements('.dbCheckbox')) return false;$('#confirmTruncateDb').dialog('open');">
<?php
echo $this->getIcon('DeleteTables', '', 16);
echo $this->lang->L_SQL_EMPTYDB;
?>
</button>
<button id="buttonDrop" disabled="disabled" class="Formbutton" type="button"
onclick="if (!hasCheckedElements('.dbCheckbox')) return false;$('#confirmDropDb').dialog('open');">
<?php
echo $this->getIcon('DeleteDatabase', '', 16);
echo $this->lang->L_DELETE_DATABASE;
?>
</button>
</th>
</tr>
<?php
echo $this->partial('sql/databases/database-header.phtml',
array('lang' => $this->lang));
$i=1;
$iconShowTable = $this->getIcon('Tables', '', 16);
foreach($this->dbInfos as $dbName => $data):
$dbNameEncoded = base64_encode($dbName);
$viewUrl = $this->url(array(
'controller'=>'sql',
'action'=>'show.tables',
'database'=> $dbNameEncoded)
);
?>
<tr class="nowrap
<?php
if ($dbName == $this->config->get('dynamic.dbActual')) {
echo 'row-highlight';
} else {
echo $this->cycle(array('row-even', 'row-odd'))->next();
}
?>">
<td class="small right">
<a href="<?php echo $this->url(array('controller' => 'sql', 'action' => 'show.tables', 'dbName' => $dbNameEncoded)); ?>"
title="<?php echo $this->lang->L_SHOW_TABLES . ': ' . $dbName;?>" class="tooltip">
<?php echo $iconShowTable; ?>
</a>
</td>
<td class="small right">
<?php
if (!in_array($dbName, $systemDatabases)) {
?>
<input id="<?php echo $this->out($dbName);?>" type="checkbox" name="dbNames[]" class="dbCheckbox checkbox" value="<?php echo $dbNameEncoded; ?>"/>
<?php } else { ?>
&nbsp;
<?php } ?>
</td>
<td class="small right"><?php echo $i;?>.</td>
<td class="small">
<?php
if (!in_array($dbName, $systemDatabases)) {
?>
<label class="block tooltip" for="<?php echo $this->out($dbName);?>" title="<?php echo $this->lang->L_SELECT . ': ' . $this->out($dbName);?>">
<?php echo $dbName;?>
</label>
<?php } else {
echo $dbName;
}
?>
</td>
<td class="small right">
<?php echo $this->numberFormat($data['tables']);?>
</td>
<td class="small right">
<?php echo $this->byteOutput($data['size']);?>
</td>
<td class="small right">
<?php echo $this->numberFormat($data['views']);?>
</td>
<td class="small right">
<?php echo $this->numberFormat($data['routines']);?>
</td>
<td class="small">
<?php echo $data['DEFAULT_CHARACTER_SET_NAME'];?>
</td>
<td class="small">
<?php echo $data['DEFAULT_COLLATION_NAME'];?>
</td>
</tr>
<?php
$i++;
endforeach;
echo $this->partial('sql/databases/database-header.phtml',
array('lang' => $this->lang));
?>
</table>
</form>
</div>
<?php
$dropDatabaseUrl = $this->url(array('controller' => 'sql', 'action' => 'drop.database'));
$this->popUpMessage()->addMessage(
'confirmDropDb',
'L_DELETE_DATABASE',
'L_CONFIRM_DROP_DATABASES',
array(
'modal' => true,
'autoOpen' => false,
'buttons' => array(
'L_YES' => "function() { changeFormAction('.dbForm', '" . $dropDatabaseUrl . "');$('#dbForm').submit();}",
'L_CANCEL' => 'function(){$(this).dialog("close"); return false;}',
)
)
);
$truncateDatabaseUrl = $this->url(array('controller' => 'sql', 'action' => 'truncate.database'));
$this->popUpMessage()->addMessage(
'confirmTruncateDb',
'L_TRUNCATE_DATABASE',
'L_CONFIRM_TRUNCATE_DATABASES',
array(
'modal' => true,
'autoOpen' => false,
'buttons' => array(
'L_YES' => "function() { changeFormAction('.dbForm', '" . $truncateDatabaseUrl . "');$('#dbForm').submit();}",
'L_CANCEL' => 'function(){$(this).dialog("close"); return false;}',
)
)
);
$this->jQuery()->onLoadCaptureStart();
?>
$('.dbCheckbox').change(function() {
checkButtonState();
});
<?php
$this->jQuery()->onLoadCaptureEnd();
?>
<script type="text/javascript">
function checkButtonState() {
var objs = ['#buttonTruncate', '#buttonDrop'];
if ($('.dbCheckbox:checked').size() > 0) {
objs_enable(objs);
} else {
objs_disable(objs);
}
}
</script>

Datei anzeigen

@ -0,0 +1,51 @@
<?php
if ($this->pageCount) {
if($this->current>1) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->first)) ?>"
accesskey="f" class="Formbutton"><?php echo $this->getIcon('First', '', 16);?>
</a>
<?php
} else { ?>
<button class="Formbutton" disabled="disabled"><?php echo $this->getIcon('FirstDisabled', '', 16);?></button>
<?php
}
if($this->previous != null) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->previous)) ?>"
accesskey="c" class="Formbutton">
<?php echo $this->getIcon('Back', '', 16);?>
</a>
<?php
} else { ?>
<button class="Formbutton" disabled="disabled"><?php echo $this->getIcon('BackDisabled', '', 16);?></button>
<?php
}
?>
<select>
<?php for($i=1; $i <= $this->pageCount; $i++) { ?>
<option <?php if ($i == $this->current) echo 'selected="selected"'; ?>><?php echo $i; ?></option>
<?php } ?>
</select>
<?php
if($this->next != null) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->next)) ?>"
accesskey="v" class="Formbutton"><?php echo $this->getIcon('Forward', '', 16);?>
</a>
<?php
} else { ?>
<button class="Formbutton"><?php echo $this->getIcon('ForwardDisabled', '', 16);?></button>
<?php
}
if ($this->current<$this->last) { ?>
<a href="<?php echo $this->url(array('offset'=>$this->last));?>"
accesskey="f" class="Formbutton"><?php echo $this->getIcon('Last', '', 16);?>
</a>
<?php
} else { ?>
<button disabled="disabled" class="Formbutton"><?php echo $this->getIcon('LastDisabled', '', 16);?></button>
<?php
}
} ?>

Datei anzeigen

@ -0,0 +1,84 @@
<?php
$showDatabasesUrl = $this->url(array('controller'=>'sql','action'=>'show.databases'));
$showTablesUrl = $this->url(array('controller'=>'sql','action'=>'show.tables'));
$showTableDataUrl = $this->url(array('controller'=>'sql','action'=>'show.table.data'));
$sqlBoxUrl = $this->url(array('controller'=>'sql','action'=>'sqlbox'));
// get action name to set the active item in TabBar
$actionName = Zend_Controller_Front::getInstance()->getRequest()->getActionName();
// format action name and escape possible dot in action name
$actionName = str_replace('.', '\\\.', $actionName);
$this->jQuery()->javascriptCaptureStart(); ?>
// set selected tab
$(document).ready(function() {
$('#<?php echo $actionName; ?>').addClass("ui-state-active");
$('#<?php echo $actionName; ?>').addClass("ui-tabs-selected");
});
<?php $this->jQuery()->javascriptCaptureEnd(); ?>
<div id="breadcrumb">
<ul>
<li>
<a href="#">
<?php
echo $this->getIcon('Server', '', 16)
. $this->config->get('config.dbuser.user') .'@'
. $this->config->get('config.dbuser.host');
$port = $this->config->get('config.dbuser.port');
if ($port > 0) {
echo ':' . $port;
}
?>
</a>
</li>
<li>
<a href="<?php echo $showDatabasesUrl;?>">
<?php echo$this->getIcon('Database', '', 16);?>
<?php echo $this->out($this->config->get('dynamic.dbActual'));?>
</a>
</li>
<?php
$actualTable = $this->config->get('dynamic.tableActual');
if ($actualTable > '') {
?>
<li>
<a href="#">
<?php echo$this->getIcon('Tables', '', 16);?>
<?php echo $this->out($actualTable);?>
</a>
</li>
<?php
}
?>
</ul>
</div>
<br />
<div id="headnavi" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li id="show.databases" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $showDatabasesUrl;?>">
<?php echo$this->getIcon('Database', '', 16);?>
<?php echo $this->lang->L_DBS;?>
</a>
</li>
<li id="show.tables" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $showTablesUrl;?>">
<?php echo$this->getIcon('Tables', '', 16);?>
<?php echo $this->lang->L_TABLES;?>
</a>
</li>
<li id="show.table.data" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $showTableDataUrl;?>">
<?php echo$this->getIcon('Tabledata', '', 16);?>
<?php echo $this->lang->L_RECORDS;?>
</a>
</li>
<li id="sqlbox" class="ui-state-default ui-corner-top" onmouseover="tabOver(this)" onmouseout="tabOut(this)">
<a href="<?php echo $sqlBoxUrl;?>">
<?php echo$this->getIcon('SqlBrowser', '', 16);?>
<?php echo $this->lang->L_SQLBOX;?>
</a>
</li>
</ul>
</div>

Datei anzeigen

@ -0,0 +1,95 @@
<div id="content">
<h2><?php echo $this->lang->L_SQLBOX;?></h2>
<?php echo $this->sqlHeadNavi(); ?>
<div id="mysqlbox">
<form action="<?php echo $this->url(array('controller'=>'sql','action'=>'sqlbox'));?>" method="post" id="myForm">
<div id="sqlheaderbox" style="height:28px;">
<div style="padding:2px 8px 0 4px; float:left;">
<a href="sqlbox.phtml#" onclick="$('#sqltextarea').animate({ height: '-0'}, 300);return false;"><?php echo $this->getIcon('ArrowUp', '', 16);?></a>
<a href="sqlbox.phtml#" onclick="$('#sqltextarea').animate({ height: '+=60'}, 300);return false;"><?php echo $this->getIcon('plus');?></a>
<a href="sqlbox.phtml#" onclick="$('#sqltextarea').animate({ height: '-=60'}, 300);return false;"><?php echo $this->getIcon('minus');?></a>
</div>
<span style="float:left;">
<?php echo $this->lang->L_TABLE;?>: <select id="selectTable" class="text" onchange="setShowTableQuery();"><?php echo $this->tableSelectBox;?></select>
<input class="Formbutton" type="submit" name="execsql" value="<?php echo $this->lang->L_SQL_EXEC;?>" />
<input class="Formbutton" type="button" value="<?php echo $this->lang->L_RESET;?>" onclick="$('#sqltextarea').val('');"/>
</span>
<br class="clear" />
</div>
<div>
<textarea style="height:<?php echo $this->config->get('config.interface.sqlboxHeight');?>px;" name="sqltextarea" id="sqltextarea" rows="4" cols="10"><?php echo $this->boxcontent;?></textarea>
<div class="sqlbox-warning small center"><?php echo $this->lang->L_SQL_WARNING;?></div>
</div>
</form>
</div>
<br />
<?php
$this->jQuery()->javascriptCaptureStart();
if (isset($this->errorMessage)) {
$this->popUpMessage()->addMessage(
'SqlError',
$this->lang->L_ERROR,
$this->errorMessage,
array(
'modal' => true,
'height' => 220,
'width' => 400,
'dialogClass' => 'error'
)
);
}
?>
function setShowTableQuery()
{
query = $('#selectTable').attr('value');
query = 'SELECT * FROM `' + query + '`';
$('#sqltextarea').val(query);
$('#myForm').submit();
}
<?php
$this->jQuery()->javascriptCaptureEnd();
if (isset($this->resultset)) {
$res = $this->resultset;
if (count($res)>0) {
$fieldNames = array_keys($res[0]);
$i = 1;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
?>
<table class="bdr" summary="Table lists result sets">
<tr class="thead">
<th class="right">#</th>
<?php
foreach ($fieldNames as $field) {
echo '<th>' . $field .'</th>';
}
?>
</tr>
<?php
foreach ($res as $row) {
?>
<tr class="<?php echo $cycleHelper->next()?>">
<td class="small right"><?php echo $this->numberFormat($i);?>.</td>
<?php
foreach ($row as $data) {
if (is_numeric($data)) {
echo '<td class="small right">' . $data . '</td>';
} else {
echo '<td class="small">' . $this->out($data) . '</td>';
}
}
echo '</tr>';
$i++;
}
?>
</table>
<?php
} else {
echo '<p>' . $this->lang->L_NO_ENTRIES . '</p>';
}
}
?>
</div>

Datei anzeigen

@ -0,0 +1,85 @@
<?php
$prefix = null;
$optimizeTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'optimize.tables'));
$analyzeTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'analyze.tables'));
$checkTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'check.tables'));
$repairTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'repair.tables'));
$emptyTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'empty.tables'));
$deleteTablesUrl = $this->url(array('controller' => 'sql', 'action' => 'delete.tables'));
$createTableUrl = $this->url(array('controller' => 'sql', 'action' => 'create.table'));
?>
<tr class="thead">
<th colspan="15">
<div class="buttonBar">
<ul class="Formbutton">
<li>
<button class="Formbutton"
type="submit"
onclick="changeFormAction('.tablesForm', '<?php echo $createTableUrl; ?>');">
<?php
echo $this->getIcon('Tabledata', '' ,16);
echo $this->lang->L_NEWTABLE;
?>
</button>
</li>
<li>
<button class="Formbutton" disabled="disabled"
id="buttonOptimize"
type="submit"
onclick="changeFormAction('.tablesForm', '<?php echo $optimizeTablesUrl; ?>');">
<?php echo$this->getIcon('Ok', '', 16);?>
<?php echo $this->lang->L_OPTIMIZE;?>
</button>
</li>
<li>
<button class="Formbutton" disabled="disabled"
id="buttonAnalyze"
type="submit"
onclick="changeFormAction('.tablesForm', '<?php echo $analyzeTablesUrl; ?>');">
<?php echo$this->getIcon('Ok', '', 16);?>
<?php echo $this->lang->L_ANALYZE;?>
</button>
</li>
<li>
<button class="Formbutton" disabled="disabled"
id="buttonCheck"
type="submit"
onclick="changeFormAction('.tablesForm', '<?php echo $checkTablesUrl; ?>');">
<?php echo$this->getIcon('Ok', '', 16);?>
<?php echo $this->lang->L_CHECK;?>
</button>
</li>
<li>
<button class="Formbutton" disabled="disabled"
id="buttonRepair"
type="submit"
onclick="changeFormAction('.tablesForm', '<?php echo $repairTablesUrl; ?>');">
<?php echo$this->getIcon('Ok', '', 16);?>
<?php echo $this->lang->L_REPAIR;?>
</button>
</li>
<li>
<button class="Formbutton" disabled="disabled"
id="buttonTruncate"
type="submit"
onclick="changeFormAction('.tablesForm', '<?php echo $emptyTablesUrl; ?>');">
<?php echo$this->getIcon('delete', '');?>
<?php echo $this->lang->L_EMPTY;?>
</button>
</li>
<li>
<button class="Formbutton" disabled="disabled"
id="buttonDelete"
type="submit"
onclick="changeFormAction('.tablesForm', '<?php echo $deleteTablesUrl; ?>');">
<?php echo$this->getIcon('delete', '');?>
<?php echo $this->lang->L_DELETE;?>
</button>
</li>
</ul>
</div>
</th>
</tr>

Datei anzeigen

@ -0,0 +1,8 @@
<div id="content">
<h2><?php echo $this->lang->L_SQL_CREATETABLE;?></h2>
<br /><br />
Hello (MySQLDumper-) World!
</div>

Datei anzeigen

@ -0,0 +1,47 @@
<div id="content">
<h2><?php echo $this->lang->L_RECORDS_OF_TABLE;?> `<?php echo $this->database;?>`.`<?php echo $this->table;?>`</h2>
<?php echo $this->sqlHeadNavi();
if (isset($this->noTables)) { ?>
<p class="error"><?php echo $this->lang->L_INFO_DBEMPTY;?></p>
<?php
} else {
?>
<table class="bdr" summary="show table data">
<tr class="thead">
<th>#</th>
<?php foreach($this->columns as $row => $value) { ?>
<th><?php echo $row?></th>
<?php } ?>
</tr>
<?php
$i = $this->offset+1;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
foreach($this->data as $data) {
?>
<tr class="nowrap <?php echo $cycleHelper->next()?>">
<td class="small right"><?php echo $i; ?>.</td>
<?php
foreach($data as $val) { ?>
<td class="small<?php if(is_numeric($val)) echo " right";?>">
<?php
if ($val !== null) {
echo $this->out($val);
} else {
echo $this->out($val, true, 'i');
}
?>
</td>
<?php
}
?>
</tr>
<?php
$i++;
};
if (empty($this->data) && !isset($this->noTables)) {
echo '<tr><td class="error" colspan="' . (sizeof($this->columns)+1) . '">'
. $this->lang->L_NO_ENTRIES . '</td></tr>';
} ?>
</table>
<?php } ?>
</div>

Datei anzeigen

@ -0,0 +1,265 @@
<div id="content">
<h2><?php echo $this->lang->L_SQL_TABLESOFDB;?> `<?php echo $this->config->get('dynamic.dbActual');?>`
</h2>
<?php
echo $this->sqlHeadNavi();
if (!isset($this->selectedTables)) {
$this->selectedTables = array();
}
if (!empty($this->actionResult)) {
$i = 1;
?>
<h4><?php echo $this->action;?>:</h4>
<table class="bdr" summary="Action result">
<tr class="thead nowrap">
<th class="right">#</th>
<th class="left"><?php echo $this->lang->L_TABLE;?></th>
<th class="left"><?php echo $this->lang->L_ACTION;?></th>
<th class="left"><?php echo $this->lang->L_MESSAGE_TYPE;?></th>
<th colspan="2" class="left"><?php echo $this->lang->L_MESSAGE;?></th>
</tr>
<?php
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
foreach ($this->actionResult as $data) {
if (!isset($data['code'])) {
//success, operation done, show result
?>
<tr class="<?php echo $cycleHelper->next();?> nowrap">
<td class="small right"><?php echo $this->numberFormat($i);?>.</td>
<td class="small"><?php echo $data['Table'];?></td>
<td class="small"><?php echo $data['Op'];?></td>
<td class="small"><?php echo $data['Msg_type'];?></td>
<td class="small"><?php echo $data['Msg_text'];?></td>
<td class="small right">
<?php
if ($data['Msg_type'] !== 'Error') {
echo $this->getIcon('Ok', '', 16);
} else {
echo $this->getIcon('Attention', '', 16);
}
?>
</td>
</tr>
<?php } else {
// an MySQL error occured
?>
<tr class="<?php echo $cycleHelper->next();?> nowrap">
<td class="small right"><?php echo $this->numberFormat($i);?>.</td>
<td class="small"><?php echo $data['Table'];?></td>
<td class="small"><?php echo $this->action;?></td>
<td class="small"><?php echo $this->lang->L_ERROR;?></td>
<td class="small">(<?php echo $data['code'] . ') '. $data['message'];?></td>
<td class="small right"><?php echo $this->getIcon('Attention', '', 16);?></td>
</tr>
<?php
}
$i++;
}
?>
</table>
<br />
<?php
}
if ($this->tables->getTotalItemCount() >= 1) {
?>
<div>
<?php echo $this->paginationControl($this->tables,
'Sliding',
'sql/paginator.phtml',
array(1));
?>
<br />
</div>
<?php
}
?>
<br />
<form method="post" action="../" class="tablesForm">
<table class="bdr" summary="Table lists all tables of the database">
<?php
echo $this->partial('/sql/tables/button-bar.phtml',
array('lang' => $this->lang));
echo $this->partial('/sql/tables/table-header.phtml',
array('lang' => $this->lang));
$i = $this->startEntry;
$cycleHelper = $this->getHelper('cycle')->cycle(array('row-even', 'row-odd'));
$imgTableData = $this->getIcon('Tabledata', '' ,16);
foreach ($this->tables as $data):
$tableName = $data['TABLE_NAME'];
$tableNameOut = $this->out($tableName);
?>
<tr class="nowrap <?php echo $cycleHelper->next()?>">
<td class="small center">
<a href="<?php echo $this->url(array('controller'=>'sql','action'=>'show.table.data',
'tableName'=> base64_encode($tableName)));?>"
class="tooltip" title="<?php echo $this->lang->L_TITLE_SHOW_DATA . ': ' . $tableNameOut;?>">
<?php echo $imgTableData;?>
</a>
</td>
<td class="small right center">
<input type="checkbox"
class="tableCheckbox checkbox"
name="tables[]"
id="<?php echo $tableNameOut;?>"
value="<?php echo $tableNameOut;?>"
<?php
if (in_array($tableName, $this->selectedTables)) {
echo ' checked="checked"';
}
?>
/>
</td>
<td class="small right"><?php echo $i; ?>.</td>
<td class="small">
<label for="<?php echo $tableNameOut;?>" class="block tooltip"
title="<?php echo $this->lang->L_SELECT . ': ' . $tableNameOut;?>">
<?php echo $tableNameOut;?>
</label>
</td>
<td class="small right">
<?php
if ($data['TABLE_ROWS'] > 0) {
echo $this->numberFormat($data['TABLE_ROWS']);
} elseif ($data['TABLE_ROWS'] === null) {
echo '<i>NULL</i>';
} else {
echo '-';
}
?>
</td>
<td class="small right">
<?php
if ($data['TABLE_TYPE'] == 'BASE TABLE') {
echo $this->byteOutput($data['DATA_LENGTH'] + $data['INDEX_LENGTH']);
} else {
echo '-';
}
?>
</td>
<td class="small right">
<?php
if ($data['INDEX_LENGTH'] > 0) {
echo $this->byteOutput($data['INDEX_LENGTH']);
} else {
echo '-';
}
?>
</td>
<td class="small right">
<?php
if ($data['AUTO_INCREMENT'] > 0) {
echo $this->numberFormat($data['AUTO_INCREMENT']);
} else {
echo '-';
}
?>
</td>
<td class="small right">
<?php
if ($this->isTableOptimizable($data['ENGINE'])) {
if ($data['DATA_FREE'] == 0) {
echo '-';
} else {
if ($data['ENGINE'] == 'InnoDB') {
echo '-';
} else {
echo $this->byteOutput($data['DATA_FREE']);
}
}
} else {
echo '&nbsp;';
}
?>
</td>
<td class="small">
<?php
if ($data['CREATE_TIME'] != '') {
echo$data['CREATE_TIME'];
} else {
echo '-';
}
?>
</td>
<td class="small">
<?php
if ($data['UPDATE_TIME'] != '') {
echo $data['UPDATE_TIME'];
} else {
echo '-';
}
?>
</td>
<td class="small"><?php echo$data['TABLE_TYPE'];?></td>
<td class="small"><?php echo$data['ENGINE'];?></td>
<td class="small">
<?php
if ($data['TABLE_COLLATION'] != '') {
echo $data['TABLE_COLLATION'];
} else {
echo '-';
}
?>
</td>
<td class="small">
<?php
if ($data['TABLE_COMMENT'] != '') {
echo $this->escape($data['TABLE_COMMENT']);
} else {
echo '-';
}
?>
</td>
</tr>
<?php
$i++;
endforeach;
if ($this->tables->getTotalItemCount() <= 0) { ?>
<tr><td colspan="12" class="error"><?php echo $this->lang->L_INFO_DBEMPTY;?></td></tr>
<?php }
echo $this->partial('/sql/tables/table-header.phtml',
array('lang' => $this->lang));
?>
</table>
</form>
<?php
if ($this->tables->getTotalItemCount() >= 1) {
?>
<div id="pagination" style="margin-top: 15px;">
<?php echo $this->paginationControl($this->tables,
'Sliding',
'sql/paginator.phtml',
array(1));
?>
</div>
<?php
}
?>
</div>
<?php
$this->jQuery()->onLoadCaptureStart();
?>
$('.tableCheckbox').change(function() {
checkButtonState();
});
<?php
$this->jQuery()->onLoadCaptureEnd();
?>
<script type="text/javascript">
function checkButtonState() {
var objs = ['#buttonOptimize', '#buttonAnalyze', '#buttonCheck',
'#buttonRepair', '#buttonTruncate', '#buttonDelete'];
if ($('.tableCheckbox:checked').size() > 0) {
objs_enable(objs);
} else {
objs_disable(objs);
}
}
</script>

Datei anzeigen

@ -0,0 +1,41 @@
<tr class="thead">
<th>&nbsp;</th>
<th class="toggle">
<div class="toggleBar" >
<img src="<?php echo $this->getIconSrc('plus', '');?>"
class="pointer tooltip"
title="<?php echo $this->lang->L_SELECT_ALL;?>"
alt="<?php echo $this->lang->L_SELECT_ALL;?>"
onclick="checkAll($('[type=checkbox]'));"/>
<img src="<?php echo $this->getIconSrc('minus', '');?>"
class="pointer tooltip"
title="<?php echo $this->lang->L_DESELECT_ALL;?>"
alt="<?php echo $this->lang->L_DESELECT_ALL;?>"
onclick="unCheckAll($('[type=checkbox]'));"/>
</div>
</th>
<th class="center">#</th>
<th>
<span class="explain tooltip" title="<?php echo $this->lang->L_TABLENAME_EXPLAIN;?>"><?php echo $this->lang->L_TABLENAME;?></span>
</th>
<th>
<span class="explain tooltip" title="<?php echo $this->lang->L_NR_OF_RECORDS;?>"><?php echo $this->lang->L_INFO_RECORDS;?></span>
</th>
<th>
<span class="explain tooltip" title="<?php echo $this->lang->L_DATASIZE;?>"><?php echo $this->lang->L_INFO_SIZE;?></span>
</th>
<th>
<span class="explain tooltip" title="<?php echo $this->lang->L_INDEX_SIZE;?>"><?php echo $this->lang->L_TITLE_INDEX;?></span>
</th>
<th class="nowrap">
<span class="explain tooltip" title="<?php echo $this->lang->L_NEXT_AUTO_INCREMENT;?>"><?php echo $this->lang->L_NEXT_AUTO_INCREMENT_SHORT;?></span>
</th>
<th><?php echo $this->lang->L_OVERHEAD;?></th>
<th><?php echo $this->lang->L_CREATED;?></th>
<th><?php echo $this->lang->L_INFO_LASTUPDATE;?></th>
<th><?php echo $this->lang->L_TABLE_TYPE;?></th>
<th><?php echo $this->lang->L_ENGINE;?></th>
<th><?php echo $this->lang->L_COLLATION;?></th>
<th><?php echo $this->lang->L_COMMENT;?></th>
</tr>