All pastes #195540 Raw Edit

Stuff

public text v1 · immutable
·published 2006-10-09 18:02 UTC
rendered paste body
<?php
require_once('auth.php');
require_once('head.php');
require_once('footer.php');

require_once(LibConf::getExtPath().'EntryText.php');

if($_GET['admin_agb']){

	$agbSearch=new EntryText();
	$agbSearch->setField('id',2);
	$agb=$agbSearch->search();

	if($_POST['admin_agb_update']){
		echo $_POST['admin_agb_update'];
		$newagb=new EntryText();
		$newagb->setField('text',mysql_escape_string($_POST['admin_agb_update']));
		$agbSearch->update($newagb);
		$agb=$agbSearch->search();
		echo "AGB wurden aktualisiert";
	}

	Forms::beginForm('Allgemeine Geschäftsbedingungen','index.php?admin_agb=1');
	Forms::textArea('Text:',$agb[0]->getField('text'),'admin_agb_update');
	Forms::endForm(1);
}
?>