toupper()
{
	uppername=`echo $1 | tr '[a-z]' '[A-Z]'`
	export uppername
}

if [ "$#" == "2" ]
	then

		single=$2
		multi=$1

		toupper $single
		singleupper=$uppername
		toupper $multi
		multiupper=$uppername

		cp ../lang/english/admin/_default.php ../lang/english/admin/$1.php
		cp ../lang/english/admin/_default_edit.php ../lang/english/admin/$1_edit.php
		cp ../lang/english/admin/_default.php ../lang/german/admin/$1.php
		cp ../lang/english/admin/_default_edit.php ../lang/german/admin/$1_edit.php
		
		
		cp ../admin/includes/ajax_pager_tabs/_default.php ../admin/includes/ajax_pager_tabs/$1.php
		F=../admin/includes/ajax_pager_tabs/$1.php
		F_temp=../admin/includes/ajax_pager_tabs/$1_temp.php
		sed 's/__default__/'$multi'/g' $F > $F_temp
		sed 's/__default_single__/'$single'/g' $F_temp > $F
		sed 's/__defaultU__/'$multiupper'/g' $F > $F_temp
		sed 's/__defaultU_single__/'$singleupper'/g' $F_temp > $F
		rm $F_temp
		
		cp ../admin/includes/classes/_default.php ../admin/includes/classes/$1.php
		F=../admin/includes/classes/$1.php
		F_temp=../admin/includes/classes/$1_temp.php
		sed 's/__default__/'$multi'/g' $F > $F_temp
		sed 's/__default_single__/'$single'/g' $F_temp > $F
		sed 's/__defaultU__/'$multiupper'/g' $F > $F_temp
		sed 's/__defaultU_single__/'$singleupper'/g' $F_temp > $F
		rm $F_temp
		
		
		cp ../admin/includes/classes/_default_single.php ../admin/includes/classes/$2.php
		F=../admin/includes/classes/$2.php
		F_temp=../admin/includes/classes/$2_temp.php
		sed 's/__default__/'$multi'/g' $F > $F_temp
		sed 's/__default_single__/'$single'/g' $F_temp > $F
		sed 's/__defaultU__/'$multiupper'/g' $F > $F_temp
		sed 's/__defaultU_single__/'$singleupper'/g' $F_temp > $F
		rm $F_temp
		
		
		cp ../admin/_default_edit.php ../admin/$1_edit.php
		F=../admin/$1_edit.php
		F_temp=../admin/$1_edit_temp.php
		sed 's/__default__/'$multi'/g' $F > $F_temp
		sed 's/__default_single__/'$single'/g' $F_temp > $F
		sed 's/__defaultU__/'$multiupper'/g' $F > $F_temp
		sed 's/__defaultU_single__/'$singleupper'/g' $F_temp > $F
		rm $F_temp
		
		cp ../admin/_default.php ../admin/$1.php
		F=../admin/$1.php
		F_temp=../admin/$1_temp.php
		sed 's/__default__/'$multi'/g' $F > $F_temp
		sed 's/__default_single__/'$single'/g' $F_temp > $F
		sed 's/__defaultU__/'$multiupper'/g' $F > $F_temp
		sed 's/__defaultU_single__/'$singleupper'/g' $F_temp > $F
		rm $F_temp


		mysql -uyes4carrier -pgrinsen -hlocalhost -D yes4carrier -e "ALTER TABLE admin_access ADD $1 INT(1) NOT NULL; UPDATE admin_access SET $1='1' WHERE customers_id='1';"
		mysql -uyes4carrier -pgrinsen -hlocalhost -D yes4carrier -e "ALTER TABLE admin_access ADD $1_edit INT(1) NOT NULL; UPDATE admin_access SET $1_edit='1' WHERE customers_id='1';"
		mysql -uyes4carrier -pgrinsen -hlocalhost -D yes4carrier -e "ALTER TABLE admin_access ADD func_$1_delete INT(1) NOT NULL; UPDATE admin_access SET func_$1_delete='1' WHERE customers_id='1';"

	else
		echo "2 Parameter eingeben!"

fi
