X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=metaform.php;h=04e786a0459d0723bfd223e5fe47337c59d2aae5;hb=423f31ad0add74bbb6066d3c9f760ad0a5580cda;hp=b2d3c21c4a8ae584289d33401ccadb890b6a749a;hpb=f22b600c925131bb767db73d77dc595f18a1406a;p=wfpl.git diff --git a/metaform.php b/metaform.php index b2d3c21..04e786a 100644 --- a/metaform.php +++ b/metaform.php @@ -51,7 +51,8 @@ $GLOBALS['types'] = array( 'rightyesno' => array('checkbox', 'yesno', 'varchar(3)'), 'yesno' => array('leftcheck', 'yesno', 'varchar(3)'), 'delete' => array('checkbox', 'yesno', 'n/a'), - 'image' => array('image', 'oneline', 'varchar(200)'), + 'image' => array('image', 'oneline', 'varchar(120)'), + 'thumb' => array('image', 'oneline', 'varchar(240)'), 'submit' => array('submit', 'oneline', 'n/a') ); @@ -244,6 +245,9 @@ function make_html($whole_file = true) { if($GLOBALS['opt_display'] == 'Yes') { switch($input) { + case 'image': + $tem->show('display_image'); + break; case 'checkbox': case 'leftcheck': $tem->show('display_yesno'); @@ -270,10 +274,15 @@ function make_html($whole_file = true) { if(show_in_listing($type, $input, $format, $sql)) { if($format == 'bool' || $format == 'yesno') { $tem->set('listing_enc', 'yesno'); + $tem->show('listing_value_enc'); } elseif($input == 'date') { $tem->set('listing_enc', 'mmddyyyy'); + $tem->show('listing_value_enc'); + } elseif($type == 'thumb') { + $tem->show('listing_value_thumb'); } else { $tem->set('listing_enc', 'html'); + $tem->show('listing_value_enc'); } $tem->show('listing_head_col'); $tem->show('listing_row_col'); @@ -333,11 +342,13 @@ function show_in_listing($type, $input, $format, $sql) { case 'textarea': case 'html': return false; - default: - return true; } -} + if($type == 'image') { + return false; + } + return true; +} function make_php() { $tem = new tem(); @@ -364,8 +375,13 @@ function make_php() { $php_fields .= '$' . $name; } if($input == 'image') { + if($type == 'thumb') { + $tem->show('thumb_settings'); + $tem->show('thumb_upload_params'); + $tem->show('thumb_w_h'); + } + $tem->show('image_settings'); $tem->show('image_upload'); - $tem->show('image_db'); if(!$image_included_yet) { $tem->show('image_include'); $tem->show('upload_max'); @@ -438,7 +454,6 @@ function view_php() { echo make_php(); } - function make_email() { $tem = new tem(); $tem->load('code/wfpl/metaform/template.email.txt'); @@ -474,7 +489,6 @@ function view_email() { echo make_email(); } - function preview() { tem_load('code/wfpl/metaform/preview.html'); tem_set('file_name', $GLOBALS['file_name']); @@ -523,5 +537,3 @@ function download_tar() { metaform(); exit(); - -?>