<?php
 $name = input('name');
 $description = input('description');
 $coverphoto = input('coverphoto');
 
 if(empty($name) || empty($description)){
		ossn_trigger_message(ossn_print('wpage:fields:required'), 'error');
		redirect(REF);
 }
 $vars = array(
		'name' => $name,
		'description' => $description,
		'phone' => input('phone'),
		'address' => input('address'),
		'website' => input('website'),
		'coverphoto'=> $coverphoto,
 );
 $page = new \Ossn\Component\WorldsPage\Worlds;
 if($guid = $page->addPage($vars)){
		ossn_trigger_message(ossn_print('wpages:added'));
		redirect("administrator/settings/cpages?mpage=list);
 }
 ossn_trigger_message(ossn_print('wpage:add:failed'), 'error');
 redirect(REF); 