# This form was initially auto-generated. If you would like to alter the
# parameters and generate a new one try this URL:
# This form was initially auto-generated. If you would like to alter the
# parameters and generate a new one try this URL:
-require_once('code/wfpl/format.php');
-require_once('code/wfpl/email.php');~uploads_include {~
-require_once('code/wfpl/upload.php');~}~
+require_once(__DIR__.'/'.'inc/wfpl/format.php');~opt_email {~
+require_once(__DIR__.'/'.'inc/wfpl/email.php');~}~~uploads_include {~
+require_once(__DIR__.'/'.'inc/wfpl/upload.php');~}~
$GLOBALS['~file_name~_field_to_caption'] = array(~name_to_caption {~
'~name~' => '~caption phpsq~'~ sep {~,~}~~}~
$GLOBALS['~file_name~_field_to_caption'] = array(~name_to_caption {~
'~name~' => '~caption phpsq~'~ sep {~,~}~~}~
$data['~name~'] = convert_uploaded_image('~name~', $GLOBALS['upload_directory'] . $GLOBALS['~name~_file_name'], $GLOBALS['~name~_max_width'], $GLOBALS['~name~_max_height']~thumb_upload_params {~, $GLOBALS['~name~_thumb_max_width'], $GLOBALS['~name~_thumb_max_height']~}~);
} else {
$data['~name~'] = convert_uploaded_image('~name~', $GLOBALS['upload_directory'] . $GLOBALS['~name~_file_name'], $GLOBALS['~name~_max_width'], $GLOBALS['~name~_max_height']~thumb_upload_params {~, $GLOBALS['~name~_thumb_max_width'], $GLOBALS['~name~_thumb_max_height']~}~);
} else {
return ~file_name~_main_display($id);~opt_public_form unset {~
} else {
message("Error: Broken Link (~singular cap~ #$id not found)");
return ~file_name~_main_display($id);~opt_public_form unset {~
} else {
message("Error: Broken Link (~singular cap~ #$id not found)");
function ~file_name~_main_display($id) {
$data = db_get_assoc('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'where id=%i', $id);
function ~file_name~_main_display($id) {
$data = db_get_assoc('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'where id=%i', $id);
message("Error: Broken Link (~singular cap~ #$id not found)");~opt_public_something {~
return './' . $GLOBALS['wfpl_basename'];~}~~opt_public_something unset {~
return './~file_name~';~}~
message("Error: Broken Link (~singular cap~ #$id not found)");~opt_public_something {~
return './' . $GLOBALS['wfpl_basename'];~}~~opt_public_something unset {~
return './~file_name~';~}~
$rows = db_get_rows('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'order by id');
$fields = explode(',', 'id,'.~file_name upper~_DB_FIELDS);
$header = array();
$rows = db_get_rows('~table_name~', 'id,'.~file_name upper~_DB_FIELDS, 'order by id');
$fields = explode(',', 'id,'.~file_name upper~_DB_FIELDS);
$header = array();
$sort = substr($sort, 1);
$desc = ' DESC ';
} else {
$data["sorting-by-$sort"] = '-';
}
$legal_sorts = explode(',', ~file_name upper~_DB_FIELDS);
$sort = substr($sort, 1);
$desc = ' DESC ';
} else {
$data["sorting-by-$sort"] = '-';
}
$legal_sorts = explode(',', ~file_name upper~_DB_FIELDS);
function ~file_name~_main_form($id = false) {~pulldowns {~
pulldown('~name~', ~pulldown_options~);~}~~has_pulldowns {~
~}~~opt_db {~
function ~file_name~_main_form($id = false) {~pulldowns {~
pulldown('~name~', ~pulldown_options~);~}~~has_pulldowns {~
~}~~opt_db {~
db_update_assoc('~table_name~', $data, 'where id=%i', $id);
message('~singular cap~ updated.');
} else {
db_insert_assoc('~table_name~', $data);
message('~singular cap~ saved.');
}~}~~opt_email {~
db_update_assoc('~table_name~', $data, 'where id=%i', $id);
message('~singular cap~ updated.');
} else {
db_insert_assoc('~table_name~', $data);
message('~singular cap~ saved.');
}~}~~opt_email {~
- if(email($from, $to, $subject, $message, $reply_to, $cc, $bcc)) {
+ if (email($from, $to, $subject, $message, $reply_to, $cc, $bcc)) {
- # otherwise, we display the form again. We've got the form field
- # values in $data and will put those back in the filds below. You
- # should add some message asking people to fix their entry in
- # whatever way you require.~opt_db {~
- } elseif($id) {
+ # else fall through to display the form again. Field values are in $data~opt_db {~
+ } elseif ($id) {
# we've recieved an edit id, but no data. So we grab the values to be edited from the database
$data = db_get_assoc('~table_name~', ~file_name upper~_DB_FIELDS, 'where id=%i', $id);~}~
} else {
# we've recieved an edit id, but no data. So we grab the values to be edited from the database
$data = db_get_assoc('~table_name~', ~file_name upper~_DB_FIELDS, 'where id=%i', $id);~}~
} else {