#!/usr/bin/perl
# Copyright 2001-2010 Leslie Richardson
# This file is part of Open Admin for Schools.
# Open Admin for Schools is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# Metaedit.pl - edit meta table for formtype, default values.
my %lex = ('Main' => 'Main',
'Eoy' => 'Eoy',
'Save Changes' => 'Save Changes',
'Edit Metadata' => 'Edit Metadata',
'Field Id' => 'Field Id',
'Field Name' => 'Field Name',
'Defaults' => 'Defaults',
'Form Type' => 'Form Type',
'View Size' => 'View Size',
'Reqd' => 'Reqd',
'Edit Table' => 'Edit Table',
'Your fields have been updated.' => 'Your fields have been updated.',
'Edit more records' => 'Edit more records',
'Please select table to edit.' => 'Please select table to edit.',
'Error' => 'Error',
'Table' => 'Table',
'Include Description' => 'Include Description',
'Description' => 'Description',
);
$self = 'metaedit.pl';
$notes = 'The Defaults for Select Form Entry:
Separate items with a space (First Second),
Join multiword entries with underscore character (which will be
stripped)(First_One Second_One),
Items with leading tilde (~Choose_One~) will be ignored during student
entry.
Textarea Boxes: put rows and cols in the viewsize field
separated with an x (ie. 6x80)';
use DBI;
use CGI;
# Read config variables
eval require "../../etc/admin.conf";
if ( $@ ) {
print $lex{Error}. ": $@
\n";
die $lex{Error}. ": $@\n";
}
my $q = new CGI;
print $q->header( -charset, $charset );
my %arr = $q->Vars;
my $dsn = "DBI:mysql:$dbase";
my $dbh = DBI->connect($dsn,$user,$password);
$dbh->{mysql_enable_utf8} = 1;
print "$doctype\n