Location: PHPKode > projects > Wiki Web Help > wwh-0.3.9/wwh/handlers/getpage.php
<?php
require_once("../config.php");

if($page==null) $page = $_GET['id'];
if(!is_numeric($page)) exit; // extra precaution

if(!isset($_POST['lang'])) $lang=$_GET['lang'];
if(strlen($lang) > 2) return;

$sql = "SELECT * FROM page INNER JOIN node ON node.node_id=page.node_id WHERE node.node_id=$page AND page.language='$lang'";
$result = mysql_query($sql,$con) or die("Database Error ".mysql_error());

if(mysql_num_rows($result)==0){
	include('language.php');
	echo $language->menu->edit;
	exit;
}

$pid = mysql_result($result, 0, 'parent_id');

if($pid > 0)
	echo stripslashes(mysql_result($result, 0, 'page_text'));

?>
Return current item: Wiki Web Help