function save_field($name, $value, $file = -1) { if ($name == "tags") { return editTags($value); } global $arquivo, $tikilib; $objResponse = new xajaxResponse(); $error = false; if ($file < 0) { $error = $arquivo->update(array($name => $value)); } else { $error = $arquivo->filereferences[(int) $file]->update(array($name => $value)); } if (is_string($error)) { $objResponse->call('exibeErro', $name, $error); } else { $l = strlen($value); // TODO: avisar usuario $value = strip_tags($value); // TODO: generalizar isso, de acordo com wikiParsed do ajax_textarea if ($name == 'descricao' || $name == 'fichaTecnica' || $name == 'letra') { $value = $tikilib->parse_data($value); } $objResponse->call('exibeCampo', $name, $value); } $objResponse->call('setWaiting', $name, false); return $objResponse; }
<!doctype html> <html lang="en"> <head> <?php echo "\t<meta charset='utf-8'>\n\t<title>" . $c['title'] . " - " . $c['page'] . "</title>\n\t<base href='{$host}'>\n\t<meta name='viewport' content='width=device-width, initial-scale=1'>\n\t<link rel='stylesheet' href='themes/" . $c['themeSelect'] . "/style.css'>\n\t<meta name='description' content='" . $c['description'] . "'>\n\t<meta name='keywords' content='" . $c['keywords'] . "'>\n\t<script src='//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js'></script>"; editTags(); ?> </head> <body> <nav id="nav"> <h1><a href='./'><?php echo $c['title']; ?> </a></h1> <?php menu(); ?> <div class="clear"></div> </nav> <?php if (is_loggedin()) { settings(); } ?> <div id="wrapper" class="border"> <div class="pad"> <?php content($c['page'], $c['content']); ?>