function getSetMenu() { $setMenu = setMenu(); return $setMenu; }
<?php include_once 'interfaz.php'; setMenu(); ?> <h2>Libro de visitas</h2> <form method="post"> <label>¿Te ha gustado la página? <br/> <br/> <input type="radio" name="encuesta" checked value="si"> Si <br/> <input type="radio" name="encuesta" value="no"> No <br/> <br/> </label> <label>Tu comentario: <br/> <textarea name="comentario"></textarea> </label> <br/> <?php //Comprobar el comentario, sino mostrar un erroren rojo if (isset($_POST['publicar']) && $_POST["comentario"] == null) { echo "<p style='color:red'>¡No has escrito ningún comentario!</p>"; }
/** *Starts Orongo! :) * @param String $paramCurrentPage the current page */ function startOrongo($paramCurrentPage = 'anonymous') { session_start(); define("ROOT", dirname(__FILE__)); define("LIB", ROOT . "/lib"); define("ADMIN", ROOT . "/orongo-admin"); define("CONFIG", ROOT . "/config.php"); define('RANK_ADMIN', 3); define('RANK_WRITER', 2); define('RANK_USER', 1); define('ARTICLE_NOT_EXIST', 2100); define('PAGE_NOT_EXIST', 3100); define('USER_NOT_EXIST', 4100); define('COMMENT_NOT_EXIST', 5100); error_reporting(E_ALL); if (file_exists("orongo-install.php")) { die("If you didn't install OrongoCMS yet, proceed to the <a href='orongo-install.php'>installer</a><br/>If you installed it, please delete orongo-install.php"); } if (!file_exists(CONFIG)) { die("config.php (" . CONFIG . ") was missing!"); } require_once CONFIG; require LIB . '/function_load.php'; try { load(LIB); } catch (Exception $e) { die($e->getMessage()); } setDatabase(new Database(CONFIG)); try { setLanguage(new Language(ADMIN . '/lang/' . Settings::getLanguageName())); } catch (Exception $e) { $msgbox = new MessageBox(); $msgbox->bindException($e); die($msgbox->getImports() . $msgbox->toHTML()); } setCurrentPage($paramCurrentPage); $style = null; try { $style = Settings::getStyle(); } catch (Exception $e) { $msgbox = new MessageBox(); $msgbox->bindException($e); die($msgbox->getImports() . $msgbox->toHTML()); } setMenu(new Menu()); setStyle($style); setDisplay(new Display($style->getStylePath())); setUser(handleSessions()); if (defined('HACK_PLUGINS') && HACK_PLUGINS == true) { Plugin::hackKeys(); } try { setPlugins(Plugin::getActivatedPlugins('orongo-admin/')); } catch (Exception $e) { $msgbox = new MessageBox(); $msgbox->bindException($e); getDisplay()->addObject($msgbox); } //getLanguage()->setTempLanguage(ADMIN . '/lang/en_US'); OrongoDefaultEventHandlers::init(); }
insertNewSetItems($title, $items, $cost); $row = setMenu(); $resp = $row; echo json_encode($resp); } elseif (isset($_POST['setMenuKey'])) { //delete set menu $key = $_POST['setMenuKey']; deleteSetMenu($key); $row = setMenu(); $resp = $row; echo json_encode($resp); } elseif (isset($_POST['setItemsID'])) { //get all set menu info $key = $_POST['setItemsID']; $row = setMenuInfo($key); $resp['key'] = $row['sm_id']; $resp['Name'] = $row['sm_title']; $resp['items'] = $row['sm_description']; $resp['value'] = $row['sm_price']; echo json_encode($resp); } elseif (isset($_POST['setMenuEditedName'])) { //update setmenu info $title = $_POST['setMenuEditedName']; $cost = $_POST['setMenuEditedCost']; $key = $_POST['setMenuEditedKey']; $items = $_POST['setMenuItems']; updateSetMenu($title, $items, $cost, $key); $row = setMenu(); $resp = $row; echo json_encode($resp); }
if ($functionname == 'getUserGroupByID') { $userGroupID = $_POST["userGroupID"]; getUserGroupByID($userGroupID, $mysqli); } if ($functionname == 'delUserGroup') { $userGroupID = $_POST["userGroupID"]; delUserGroup($userGroupID, $mysqli); } /*Menu*/ if ($functionname == 'setMenu') { $menuID = $_POST["menuID"]; $menuName = $_POST["menuName"]; $menuDescription = $_POST["menuDescription"]; $menuCode = $_POST["menuCode"]; $menuRanking = $_POST["menuRanking"]; setMenu($menuID, $menuName, $menuDescription, $menuCode, $menuRanking, $mysqli); } if ($functionname == 'getMenu') { getMenu($mysqli); } if ($functionname == 'getMenuByID') { $menuID = $_POST["menuID"]; getMenuByID($menuID, $mysqli); } if ($functionname == 'delMenu') { $menuID = $_POST["menuID"]; delMenu($menuID, $mysqli); } /*MenuItem Item*/ if ($functionname == 'setMenuItem') { $menuItemID = $_POST["menuItemID"];