MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
include ("../include.inc.php");
require ('check.php');
//retrieve post data
$form = new Form('addrss');
//check if any data was submited
if ($form->exists()){
//insert news
$sql = new SQL();
$sql->myInsert('nicaw_news',array('id[COLOR="Yellow"](tutaj zamiast id wpisacname?)[/COLOR]' => null, 'title' => $form->attrs['title'], 'creator' => $form->attrs['creator'], 'date' => time(), 'text' => $form->attrs['text'], 'html' => $form->getBool('html')));
echo $sql->getError();
}else{
//create new form
$form = new IOBox('addrss');
$form->target = $_SERVER['PHP_SELF'];
$form->addLabel('Create News');
$form->addInput('title');
$form->addInput('creator');
$form->addTextBox('text');
$form->addCheckBox('html',false);
$form->addClose('Cancel');
$form->addSubmit('Save');
$form->show();
}
?>