. /** * Exports a sudoku. * * @package mod_game * @copyright 2007 Vasilis Daloukas * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require( "../../../config.php"); require_login(); export(); /** * Exports */ function export() { global $CFG; $file = "import.php"; $h = fopen($file, 'w') or die("can't open file"); fwrite( $h, "level, $rec->opened, '$rec->data')\", false);\r\n"); if (++$i % 10 == 0) { fwrite( $h, "\r\n"); } } fwrite( $h, "\r\necho'Finished importing';"); fclose($h); }