Esempio n. 1
0
<?php

require INSTALLER_PATH . '/config.php';
# seed the random generator
srand((double) microtime() * 1000000);
$rmax = getrandmax();
$versions = new VersionSet();
$version = new Version($short_version, $long_version);
$version->addSeparator('Database Information');
$version->collectOption('db_type', 'Server Type', array('MySQL', 'PostgreSQL'), array('mysql', 'postgres7'), 'mysql');
$version->collectText('db_user', 'User Name', 'root');
$version->collectPassword('db_password', 'Password', '');
$version->collectText('db_server', 'Server Address', 'localhost');
$version->collectText('db_database', 'Database Name', 'care2x');
$version->addSeparator('System Administrator User');
$version->collectText('admin_user', 'User Name', 'admin');
$version->collectPassword('admin_password', 'Password', '');
$version->collectPassword('admin_confirm', 'Password Confirm', '');
$version->addSeparator('Network Protocol and Domain');
$version->collectOption('transfer_protocol', 'Transfer Protocol', array('http', 'https'), array('http', 'https'), 'http');
$version->collectText('care2x_address', 'Care2x Host', 'localhost');
$version->addSeparator('Encryption Keys');
$version->collectText('1st_key', '1st Key', (rand(1, $rmax) . rand(1, $rmax)) * rand(1, $rmax));
$version->collectText('2nd_key', '2nd Key', (rand(1, $rmax) . rand(1, $rmax)) * rand(1, $rmax));
$version->collectText('3rd_key', '3rd Key', (rand(1, $rmax) . rand(1, $rmax)) * rand(1, $rmax));
$version->addSeparator('');
$version->addTest('PHPVersionOver', array('4.3.0'));
$version->addTest('PHPVersionUnder', array('5.0.0'));
//$version->addTest('PHPMemory', array('8M'));
//$version->addTest('PHPMagicQuotes', array('Off'));
//$version->addTest('PHPRegisterGlobals', array('Off'));
Esempio n. 2
0
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 * http://www.gnu.org/copyleft/gpl.html
 *
 */
/*
 * Created on Aug 16, 2005
 *
 * SureInvoice version file for application installer
 */
$base_path = realpath(dirname(__FILE__) . '/../');
$versions = new VersionSet();
$versions->collectData('db_user', 'Database Username', 'text', 'root');
$versions->collectData('db_password', 'Database Password', 'text', '');
$versions->collectData('db_server', 'Database Server', 'text', 'localhost');
$versions->collectData('db_port', 'Database Port', 'text', '3306');
$versions->collectData('db_database', 'Database Name', 'text', '');
// 0.0 Release (All Required Tests and Actions)
$version_0_0 = new Version('0.0');
$version_0_0->addTest('PHPVersionOver', array('4.3.0'));
$version_0_0->addTest('PHPExtension', array('mysql', 'curl'));
$version_0_0->addTest('WritableLocation', array($base_path . '/includes/global_config.php', $base_path . '/installer/tmp'));
$version_0_0->addTest('MysqlVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'version' => '4.1.0'));
$version_0_0->addAction('AcceptText', array($base_path . '/LICENSE'));
$version_0_0->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array($base_path . '/includes/global_config.php.dist' => $base_path . '/includes/global_config.php'), 'fields' => array('INSTALL_DB_DATABASE' => 'db_database', 'INSTALL_DB_SERVER' => 'db_server', 'INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password')));
$versions->add($version_0_0);
// 0.2 Release
Esempio n. 3
0
<?php

/*
 * Created on Aug 16, 2005
 *
 * Example version file for application installer
 */
$versions = new VersionSet();
$version_0_2 = new Version('0.2');
$version_0_2->collectData('db_user', 'Database Username', 'text', 'root');
$version_0_2->collectData('db_password', 'Database Password', 'text', '');
$version_0_2->collectData('db_server', 'Database Server', 'text', 'localhost');
$version_0_2->collectData('db_port', 'Database Port', 'text', '3306');
$version_0_2->collectData('db_database', 'Database Name', 'text', '');
$version_0_2->addTest('PHPVersionOver', array('4.2.0'));
$version_0_2->addTest('PHPExtension', array('mysql', 'gd'));
$version_0_2->addTest('WritableLocation', array(dirname(__FILE__) . '/test_replacement.txt', realpath(dirname(__FILE__) . '/tmp')));
$version_0_2->addTest('MysqlVersionOver', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'version' => '4.0.1'));
$version_0_2->addAction('AcceptText', array(dirname(__FILE__) . '/LICENSE'));
$version_0_2->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/sureinvoice.sql')));
$version_0_2->addAction('ReplaceString', array('message' => "Saved database configuration information!", 'files' => array(dirname(__FILE__) . '/test_replacement.txt'), 'fields' => array('INSTALL_DB_USERNAME' => 'db_user', 'INSTALL_DB_PASSWORD' => 'db_password'), 'strings' => array('TEST_STRING' => 'This is my test string text!')));
$versions->add($version_0_2);
$version_0_3 = new Version('0.3');
$version_0_3->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/update-0.2-0.3.sql')));
$versions->add($version_0_3);
$version_0_4 = new Version('0.4');
$version_0_4->addAction('SQLFile', array('username_field' => 'db_user', 'password_field' => 'db_password', 'server_field' => 'db_server', 'port_field' => 'db_port', 'db_field' => 'db_database', 'files' => array(realpath(dirname(__FILE__) . '/sql') . '/update-0.3-0.4.sql')));
$versions->add($version_0_4);
?>