-require_once('code/wfpl/template.php');
+require_once(__DIR__ . '/template.php');
function calendar_week(&$template) {
$template->sub('week');
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require_once('code/wfpl/encode.php');
-require_once('code/wfpl/format.php');
+require_once(__DIR__ . '/encode.php');
+require_once(__DIR__ . '/format.php');
# db_connect() -- connect to a mysql database
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require_once('code/wfpl/file.php');
+require_once(__DIR__ . '/file.php');
function dwt_reset() {
$GLOBALS['_dwt_keys'] = array('<!-- TemplateEndEditable -->');
# fdb_set_dir() passing the path to that directory.
-require_once('code/wfpl/file.php');
-require_once('code/wfpl/binary.php');
+require_once(__DIR__ . '/file.php');
+require_once(__DIR__ . '/binary.php');
# call this to set what directory is used to store the files
function fdb_set_dir($dir) {
# date is edited as mm/dd/yyyy but stored as yyyy-mm-dd
function format_mdy_to_ymd($str) {
if($str == '') return '';
- require_once('code/wfpl/time.php');
+ require_once(__DIR__ . '/time.php');
return mdy_to_ymd(format_oneline($str));
}
# date is yyyy-mm-dd
function format_ymd($str) {
- require_once('code/wfpl/time.php');
+ require_once(__DIR__ . '/time.php');
list($year, $month, $day) = ymd_clean($str);
return sprintf('%04u-%02u-%02u', $year, $month, $day);
}
# </div>
# <!--~}~-->
-require_once('code/wfpl/template.php');
+require_once(__DIR__ . '/template.php');
# call this to display a message
function message($msg) {
# This file writes the code for you (sql, php, html, email) to handle a form.
-require_once('code/wfpl/template.php');
-require_once('code/wfpl/http.php');
-require_once('code/wfpl/tar.php');
-require_once('code/wfpl/format.php');
+require_once(__DIR__ . '/template.php');
+require_once(__DIR__ . '/http.php');
+require_once(__DIR__ . '/tar.php');
+require_once(__DIR__ . '/format.php');
# see code/wfpl/metaform/template.html for the html templates for these elements
$GLOBALS['types'] = array(
# see messages.php for documentation on how to use it.
-require_once('code/wfpl/session.php');
-require_once('code/wfpl/string_array.php');
-require_once('code/wfpl/messages.php');
+require_once(__DIR__ . '/session.php');
+require_once(__DIR__ . '/string_array.php');
+require_once(__DIR__ . '/messages.php');
function session_save_messages() {
if(!isset($GLOBALS['wfpl_messages'])) {
# This file contains code to convert an array into a string, and back again.
-require_once('code/wfpl/binary.php');
+require_once(__DIR__ . '/binary.php');
function string_to_array($data) {
$header_count = pop_int($data);
# tem_auto_* function to munge the data, automating certain common use
# cases. See the comments on the tem_auto functions for more details.
-require_once('code/wfpl/encode.php');
-require_once('code/wfpl/file.php');
-require_once('code/wfpl/misc.php');
+require_once(__DIR__ . '/encode.php');
+require_once(__DIR__ . '/file.php');
+require_once(__DIR__ . '/misc.php');
# Top-Level Functions
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-require_once('code/wfpl/template.php');
-require_once('code/wfpl/encode.php');
-require_once('code/wfpl/session.php');
-require_once('code/wfpl/upload.php'); # FIXME for path_to() which should be somewhere else
+require_once(__DIR__ . '/template.php');
+require_once(__DIR__ . '/encode.php');
+require_once(__DIR__ . '/session.php');
+require_once(__DIR__ . '/upload.php'); # FIXME for path_to() which should be somewhere else
# This function is for making an uploader with a progress bar.
#