X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=metaform.php;h=1119d0cac765914344d969cb0ad6a145fb4bcc02;hb=1a959570273fb3d6e37fb27cf152fd4c62ec4770;hp=7bfa9f7778af2b604ed90f5436069f3befbd74a8;hpb=030f09ab36a49e16a65163e8a537a7ccdb3061e4;p=wfpl.git diff --git a/metaform.php b/metaform.php index 7bfa9f7..1119d0c 100644 --- a/metaform.php +++ b/metaform.php @@ -71,6 +71,8 @@ function metaform() { tem_set('opt_email', $GLOBALS['opt_email']); $GLOBALS['opt_db'] = format_yesno($_REQUEST['opt_db']); tem_set('opt_db', $GLOBALS['opt_db']); + $GLOBALS['opt_http_pass'] = format_yesno($_REQUEST['opt_http_pass']); + tem_set('opt_http_pass', $GLOBALS['opt_http_pass']); } else { $GLOBALS['form_name'] = 'some_form'; } @@ -203,6 +205,7 @@ function make_html($whole_file = true) { if($GLOBALS['opt_db'] == 'Yes') { $tem->sub('opt_db_1'); + $tem->sub('opt_db_2'); } else { $tem->sub('opt_db_1_else'); } @@ -284,6 +287,10 @@ function make_php() { $tem->sub('opt_email_1'); $tem->sub('opt_email_2'); } + if($GLOBALS['opt_http_pass'] == 'Yes') { + $tem->sub('opt_http_pass_1'); + $tem->sub('opt_http_pass_2'); + } return $tem->run(); } @@ -293,6 +300,7 @@ function edit_url() { $url = ereg_replace('view_php=[^&]*', 'edit=yes', $url); $url = ereg_replace('download_tar=[^&]*', 'edit=yes', $url); $url = ereg_replace('/[a-z0-9_.]*\?', '/?', $url); + $url = str_replace('jasonwoof.l', 'jasonwoof.com', $url); # so that code generated on Jason's home computer will display a publically accessible link. return $url; } @@ -350,8 +358,10 @@ function download_tar() { ".htaccess" => make_htaccess(), "run.php ->" => 'code/wfpl/run.php', "$name.html" => make_html(), - "$name.sql" => make_sql(), "$name.php" => make_php()); + if($GLOBALS['opt_db'] == 'Yes') { + $data["$name.sql"] = make_sql(); + } if($GLOBALS['opt_email'] == 'Yes') { $data["$name.email.txt"] = make_email(); }