$s = new Scaffold($table); $s->download = true; /*file_put_contents( "temp/$base/{$table['list_page']}", $s->listtable() ); file_put_contents( "temp/$base/{$table['new_page']}", $s->newrow() ); file_put_contents( "temp/$base/{$table['edit_page']}", $s->editrow() ); file_put_contents( "temp/$base/{$table['delete_page']}", $s->deleterow() ); */ $createZip = new createZip; $createZip -> addFile($s->listtable(), $table['list_page'] ); $createZip -> addFile($s->newrow(), $table['new_page'] ); $createZip -> addFile($s->editrow(), $table['edit_page'] ); $createZip -> addFile($s->deleterow(), $table['delete_page'] ); $fileName = "temp/$base.zip"; $fd = fopen ($fileName, "wb"); $out = fwrite ($fd, $createZip -> getZippedfile() ); fclose ($fd); $createZip -> forceDownload($fileName); //@unlink($fileName); } else { header("Location: index.php");
echo "</textarea>"; echo "<div class=options><a href=javascript:toggle('new');>Show/Hide</a> | <a href=javascript:selectAll('new');>Select All"; if (stripos($_SERVER['HTTP_USER_AGENT'], 'msie') !== false) echo " & Copy"; echo "</a> | <a href=download.php>Download All Files</a></div>"; echo "<h2>New</h2>"; echo "<textarea rows=30 cols=80 wrap=off class=textarea id=new>"; echo $s->newrow(); echo "</textarea>"; echo "<div class=options><a href=javascript:toggle('edit');>Show/Hide</a> | <a href=javascript:selectAll('edit');>Select All"; if (stripos($_SERVER['HTTP_USER_AGENT'], 'msie') !== false) echo " & Copy"; echo "</a> | <a href=download.php>Download All Files</a></div>"; echo "<h2>Edit</h2>"; echo "<textarea rows=30 cols=80 wrap=off class=textarea id=edit>"; echo $s->editrow(); echo "</textarea>"; echo "<div class=options><a href=javascript:toggle('delete');>Show/Hide</a> | <a href=javascript:selectAll('delete');>Select All"; if (stripos($_SERVER['HTTP_USER_AGENT'], 'msie') !== false) echo " & Copy"; echo "</a> | <a href=download.php>Download All Files</a></div>"; echo "<h2>Delete</h2>"; echo "<textarea rows=10 cols=80 wrap=off class=textarea id=delete>"; echo $s->deleterow(); echo "</textarea>"; }