I am trying to install an article manager and know very little of php. it looks like the login file is incomplete
how can i link the login php file which contains only html code to other files
here is the html code with the file
<form name="login" action="" method="post">
<b>Username:</b>
<input type="text" name="username" />
<b>Password:</b>
<input type="password" name="password" />
<input type="submit" name="login" value="login" />
</form>
this is the edit.php page is is to link with
<?php
session_start(); //start the session
include("../system.php"); //include the system
if(isLogged())
{
//make safe
$id = makeSafe($_GET["id"]);
if(!$id)
echo "No id found!";
else
{
$query = mysql_query("SELECT * FROM news_book WHERE news_id = '$id'");
$data = getObject($query);
}
?>
<form action="" method="post">
<b>Title:</b>
<input type="text" name="title" value="<?php echo $data->title;?>" cols="50"/>
<b>Content:</b>
<textarea name="content" cols="120" rows="15" id="editor1"><?php echo stripslashes($data->content);?></textare…
<b>Category:</b>
<?php displayCategoriesAsList(getCategory($a->… ?>
<input type="hidden" name="post_id" value="<?php echo $id; ?>" />
<input type="submit" name="updatenews" value="Update" />
</form>
<?php
}
else
echo "You must be logged in to add news";
?>
and this is the preceding index.php file
<?php
if(session_id() == '') {
session_start();
}
/**
* This page can be included into a page on your website, please read the readme.txt file to
* find out how to get this script working.
*/
include("system.php"); //include the system
?>
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="<?=INSTALL_LOCATION;?>script/joverlay_1_0_0.js"> </script>
<script type="text/javascript" src="<?=INSTALL_LOCATION;?>tinymce/jscripts/tiny_mce/tiny_mce.js" ></script>
<script>
$(document).ready(function(){
$("a").jOvery({
//When popup loaded, load this function
onLoad: function(){
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
// Theme options
theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
// Skin options
skin : "o2k7",
skin_variant : "silver",
// Example content CSS (should be your site CSS)
content_css : "css/example.css",
// Drop lists for link/image/media/template dialogs
template_external_list_url : "js/template_list.js",
external_link_list_url : "js/link_list.js",
external_image_list_url : "js/image_list.js",
media_external_list_url : "js/media_list.js",
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
},
//Set trans value (90%)
trans: 0.9,
popWidth:"",
popHeight:"",
popLeft:"25%",
bcolour:"#222",
loadingText: "<center><img src='<?=INSTALL_LOCATION;?>/script/loading.gif' /><br /> Loading, please wait ...</center>"
});
});
</script>
<?php
//IS USE CSS TRUE? IF SO USE THE NEWSBOOK CSS SHEET
if(USE_CSS){
?>
<style>
@import "<?=INSTALL_LOCATION?>style.css";
</style>
<?php
}
?>
</head>
<body>
<div id="content">
<?php
//If not logged in
echo "<span id=\"header_controls\">";
if(!isLogged()){
echo "<a href=\"".INSTALL_LOCATION."page/login.php\" rel=\"overlayable\"> Login </a> ";
}else{
echo "<a href=\"".INSTALL_LOCATION."page/addpost.php\" rel=\"overlayable\"> Add News </a> ";
echo "<a href=\"".INSTALL_LOCATION."page/addcategory.php\" rel=\"overlayable\"> Add Category </a> ";
echo "<a href=\"".INSTALL_LOCATION."page/settings.php\" rel=\"overlayable\"> Edit Settings </a> ";
echo "<a href=\"?logout\"> Logout </a>";
}
echo "</span>";
//DISPLAY CURRENT NEWS (WITH A LIMIT ON HOW MANY TO SHOW, THIS CAN BE CHANGED IN SYSTEM.php
displayNews(WEBSITE_POST_LIMIT,INSTALL_LOCATION,$_GET["category"],$_GET["term"]);
?>
</div>
<div id="copyright"> © Copyright <?=date("Y")?> - <b>Powered By </b> <a href="http://www.dalemooney.co.uk" target="_blank"> NewsBook </a> </div>
</body>
</html>