use db_query functions for SQL (remove dependence on MySQL); use tempnam to create zip in temporary directory and not in CWD.
use db_query functions for SQL (remove dependence on MySQL); use tempnam to create zip in temporary directory and not in CWD.

usernamenumber/xerteonlinetoolkits,torinfo/xerteonlinetoolkits,thexerteproject/xerteonlinetoolkits,thexerteproject/xerteonlinetoolkits,torinfo/xerteonlinetoolkits,torinfo/xerteonlinetoolkits,usernamenumber/xerteonlinetoolkits,usernamenumber/xerteonlinetoolkits,usernamenumber/xerteonlinetoolkits,torinfo/xerteonlinetoolkits,thexerteproject/xerteonlinetoolkits,thexerteproject/xerteonlinetoolkits,thexerteproject/xerteonlinetoolkits,torinfo/xerteonlinetoolkits