function create_pages_if_necessary() { global $smarty, $_REQUEST; $template_name = null; if (isset($_REQUEST['template_name'])) { $template_name = $_REQUEST['template_name']; } $pages_to_create = get_pages_to_create(); list($inexistant_page, $existing_pages) = check_for_existence_of_pages($pages_to_create); $smarty->assign('pages_created', $inexistant_page); $smarty->assign('pages_not_created', $existing_pages); if (count($inexistant_page) > 0 || count($existing_pages) > 0) { $smarty->assign('display_creation_result', 'y'); } else { $smarty->assign('display_creation_result', 'n'); } foreach ($inexistant_page as $lang => $page_name) { create_page($page_name, $lang, $template_name); } make_pages_translations_of_each_other($inexistant_page); }
<?php echo create_page("VÍDEOS", $this->controller, $form, $this->module);
<?php echo create_page("PROGRAMAS", $this->controller, $form, $this->module);
<?php echo create_page("ESTADOS", $this->controller, $form, $this->module);
function content() { global $pagenum, $selected, $message, $menu, $set, $langmessage, $LNEversion, $out, $prefix; if ($message != "") { $out .= "<div class=\"LNE_message\">" . $message . "</div>\n"; } if ($_SESSION['adminlevel'] > 3) { $out .= adminmenu(); } switch ($_GET['do']) { case "search": $out .= "<h2 class=\"LNE_title\">{$langmessage['66']}</h2>\n"; $out .= search(); break; case "register": if ($set['gzip']) { $out .= register(); } break; case "addons": $out .= addons(); break; case "create": $out .= create_page(); break; case "database": $out .= query(); break; case "delete": delete_page(); break; case "edit": print $out; $out = ""; editpage(); break; case "editextra": print $out; $out = ""; extras(); break; case "editmenu": $out .= editmenu(); break; case "login": $out .= loginform(); break; case "plugins": $out .= plugins(); break; case "profile": if ($_SESSION[$set['password']] == "1") { $out .= profile(); } break; case "query": $out .= query(); break; case "settings": $out .= settings(); break; case "setup": $out .= setup(); break; case "sitemap": $out .= showsitemap($langmessage, 0); break; case "users": $out .= users(); break; default: $addons = fetch_all(dbquery("SELECT * FROM " . $prefix . "addons WHERE active=1")); $found = false; foreach ($addons as $addon) { if ($_GET['do'] == $addon['name'] && $_SESSION['adminlevel'] >= $addon['adminlevel']) { require_once "addons/" . $addon['name'] . "/admin.php"; $out .= $addon['aname'](); $found = true; break; } } if (!$found) { $result = dbquery("SELECT * FROM " . $prefix . "paginas WHERE page=\"" . $pagenum . "\""); if ($row = fetch_array($result)) { if ($row['restricted'] != 0 && $row['restricted'] > $_SESSION['adminlevel']) { $out .= restrictedpage($row['restricted']); } else { $contnt = html_entity_decode(stripslashes($row['content'])); showcontent($contnt); } } else { $result = dbquery("SELECT * FROM " . $prefix . "paginas WHERE page=\"index\""); if ($row = fetch_array($result)) { $contnt = html_entity_decode(stripslashes($row['content'])); showcontent($contnt); } else { $out .= "<h2>{$langmessage['116']}</h2>\n"; } } foreach ($addons as $addon) { if (strpos($contnt, "%!\$" . $addon['name']) && $addon['header'] == 1) { require_once "addons/" . $addon['name'] . "/header.php"; } } } } }
$result->execute(); $result->bind_result($articleid, $title, $body, $type, $roles); while ($result->fetch()) { $en_pages[$articleid]['title'] = $title; $en_pages[$articleid]['body'] = $body; $en_pages[$articleid]['type'] = $type; $en_pages[$articleid]['roles'] = $roles; } $result->close(); foreach ($languages as $language) { echo "<h1>{$language}</h1>\n"; echo "<ul>"; $lang_pages = pages_in_lang($language, $help_table, $mysqli); foreach ($en_pages as $pageID => $page_details) { if (!isset($lang_pages[$pageID])) { create_page($language, $pageID, $page_details, $help_table, $mysqli); echo "<li>Creating #{$pageID} - " . $page_details['title'] . "</li>"; } } echo "</ul>"; } ?> </div> </body> </html> <?php function create_page($language, $articleid, $page_details, $help_table, $db) { $title = $page_details['title'];
<? include("assets/php/functions/f_create_page.php"); $page_code = ''; // Evalue le code de la page que l'on souhaite afficher if (empty($_GET['page']) || !isset($_GET['page'])) { $page_code = 'accueil'; } else { $page_code = $_GET['page']; } list ($page_titre, $page_contenue, $page_scripts) = create_page($page_code); define('WP_USE_THEMES', false); // aucun besoin d'utiliser le thème actif donc on le désactive require('blog/wp-load.php'); // on include le "moteur" wordpress include("header.php"); echo '<!-- content_BEGIN -->'; echo '<div class="content">'; echo '<!-- container_BEGIN -->'; echo '<div class="container">'; echo'<h1 id="titre_page" class="text-center">'.$page_titre.'</h1>'; include($page_contenue); echo '</div>'; echo '<!-- container_END -->'; echo '</div> '; echo '<!-- .content -->';
<?php /** * $Author: pengwenfei p@simple-log.com * $Date: 2010-02-16 * www.simple-log.com */ require_once PBBLOG_ROOT . '/includes/base.function.php'; if ($action == 'comment_list') { //页数处理 $pg = isset($_GET['pg']) ? intval($_GET['pg']) : 1; $page_size = !empty($page_size) ? $page_size : '15'; $sql = 'SELECT count(*) FROM ' . table('comment'); $page_count = intval(($db->getone($sql) - 1) / $page_size) + 1; $page_arr = create_page($page_count, $pg, 0); //获取分组数据 $start = ($pg - 1) * $page_size; $sql = 'SELECT o.* , u.title FROM ' . table('comment') . ' o LEFT JOIN ' . table('blog') . ' u on o.blog_id=u.blog_id' . " ORDER BY comment_id DESC LIMIT " . $start . ' , ' . $page_size; if ($comment_list = $db->getall($sql)) { foreach ($comment_list as $key => $val) { $comment_list[$key]['add_time'] = pbtime($val['add_time']); $comment_list[$key]['short_comment'] = pbsubstr($val['content'], 10); $comment_list[$key]['content'] = unprocess_text($val['content']); $comment_list[$key]['short_comment'] = unprocess_text($comment_list[$key]['short_comment']); } } $smarty->assign('comment_list', $comment_list); $smarty->assign('page_arr', $page_arr); $smarty->assign('page_count', $page_count); $smarty->assign('pg', $pg); $smarty->assign('url', 'admin.php?act=comment_list&pg=');
<?php include_once 'admin_functions.php'; if (count($_POST)) { if (create_page($_POST)) { header("Location: pages.php"); } } include 'common/header.php'; ?> <div id="page"> <div id="page-bgtop"> <div id="page-bgbtm"> <div id="content"> <h3 class="title">Create New Page:</h3> <table> <tr> <td><<<a href="pages.php"> Go back</a> <br /> <br /> </td> </tr> <tr> <td> <?php ?> <form method="post" action=""> <table> <tr> <Td>Name</Td>
<?php echo create_page("SANTO", $this->controller, $form, $this->module);
<?php echo create_page("CIDADES", $this->controller, $form, $this->module);
</a></td> </tr><?php } } ?> </table><?php } if ($_POST["action"] == "addnew") { if (post_exists($_POST["id"], "page")) { $data = "title='" . $_POST["title"] . "', content='" . $_POST["content"] . "'"; update_page($_POST["id"], $data); echo "updated post!"; echo "<a href=?action=new&id=" . $_POST["id"] . ">Edit again</a> | "; echo "<a href=" . get_blog_stuff("url") . get_post_stuff($_POST["id"], "title") . ">Visit</a>"; } else { create_page($_POST["title"], $_POST["content"]); echo "created page!"; echo "<a href=" . get_blog_stuff("url") . "?p=" . $_POST["id"] . ">Visit</a>"; } } elseif ($_GET["action"] == "new") { ?> <form method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?> "> <input type="hidden" name="action" value="addnew"> <input name="title" id="title" value="<?php echo get_page_stuff($_GET["id"], "title"); ?> "> <input name="id" type="hidden" value="<?php
// trim and strip leading _s if (isset($function["params"][$param])) { $param_type = $function["params"][$param]["type"]; } else { $param_type = "..."; } $params[$param] = array("type" => $param_type, "name" => $param); } $functions[$name] = array("name" => $name, "return_type" => $function["return_type"], "params" => $params, "api_type" => $function["api_type"], "infile" => $wrapper["infile"]); unset($wrappers[$name]); $additions++; } } } while ($additions > 0); foreach ($functions as $name => $function) { create_page($name, $function["return_type"], $function["params"], $function["api_type"], $function["infile"]); } function create_page($function, $return_type, $params, $api_type, $infile) { global $overwrite, $api_dir; // now generate the doc filename for this function $functype = strtolower($function) == $function ? "function" : "macro"; $filename = $api_dir[$api_type] . "/" . $functype . "s/" . $function . ".xml"; // only proceed it fhe file doesn't exist yet (no overwrites) // and do not expose functions staring with '_' if ($function[0] != '_' && ($overwrite || !file_exists($filename))) { // now write the template file to phpdoc/en/internals/zendapi/functions echo "writing {$filename}\n"; ob_start(); echo '<?xml version="1.0" encoding="iso-8859-1"?>' . "\n"; // take revision from existing file
<?php include "../header.php"; include "../db.php"; create_page($_POST['title'], $_POST['link'], $_POST['content'], $_POST['is_active']); echo "Стараница успешно создана!";
<?php echo create_page("USUÁRIOS", $this->controller, $form, $this->module);
<?php echo create_page("COISAS DE FRANCISCO", $this->controller, $form, $this->module);
<?php echo create_page("LITURGIA", $this->controller, $form, $this->module);
<?php echo create_page("PENSE", $this->controller, $form, $this->module);
<?php echo create_page($this->title, $this->controller, $form, $this->module);