Location: PHPKode > projects > phpMUR Multi User Randomizer > mkdist.php
<?php
	include_once 'class/db.class.php';
	include_once 'config.inc.php';
	$db = new db(DB_HOST, DB_NAME, DB_UNAME, DB_PWORD, $die = true);
	$tables = $db->get_results_assoc("SHOW TABLES");
	foreach ($tables as $table) {
		foreach ($table as $t) {
			echo $t."\n";
			$creates["$t"] = $db->get_assoc("SHOW CREATE TABLE `$t`");
		}
	}
	$fp = fopen('install/creates.php','w');
	fputs($fp, '<?php'."\n");
	fputs($fp, '$creates = array();'."\n");
	foreach ($creates as $t=>$v) {
		fputs($fp, '$creates[\''.$v['Table'].'\'] = "'.$v['Create Table']."\";\n\n");
	}
	fputs($fp, "\n".'?>');
	// zip -r phpMUR.zip ./ -x converted/*
	passthru('find ./ -iname \'*~\' -exec rm {} -vf \;');
	passthru('zip -r phpMUR.zip ./ -x converted/* -x phpMUR.zip -x config.inc.php -x error-output.txt -x *.log -x cd/* -x log.* -x seq_downloads/* -x session.php -x tmp.* -x dta -x dropdown.tmp.php -x auto_complete.php');
	$src = 'phpMUR.zip';
	$dst = '/home/erm/backup/phpMUR/phpMUR.' . date('Y-m-d D H:i') . '.zip';
	if (copy ($src, $dst)) {
		echo "$src => $dst\n";
	}

?>
Return current item: phpMUR Multi User Randomizer