i have create a html page with log in,log out,register ect...
i wont to create a admin page for this,for example if i wont to change images colors border color add image or something else can somebody suggest me what i have to do,give me some ideas.
diafol
POst your code so we have an idea what we're dealing with. You want to edit the css file via a form? Should it be permanent or temporary? Add some info.
andyy121 -9 Junior Poster
<?php
require_once("start.php");
require_once("myconfig.php");
require_once("db.php");
require_once("kontrollo.php");
require_once("mylib.php");
require_once("datavalidation.php");
$userid=$_SESSION["theuser"];
$sql="select * from users where userid = ".$_SESSION["theuser"];
$r=mysql_query($sql)
or die(mysql_error());
if (!$row=mysql_fetch_array($r))
{
exit("No active users");
}
$userid=$row["userid"];
$username=$row["username"];
//$password=$row["password"];
?>
<html>
<head>
<title>Garant Sig Edit Section</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../css/travel.css" rel="stylesheet" type="text/css">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function validate()
{
if(document.myform.expass.value=="")
{
alert('Futni passwordin e vjeter');
document.myform.expass.focus();
return false;
}
if(document.myform.pass1.value=="")
{
alert('Verini nje password');
document.myform.pass1.focus();
return false;
}
if (document.myform.pass1.value != document.myform.pass2.value)
{
alert('passwordi nuk eshte perseritur sakte');
document.myform.pass2.focus();
return false;
}
//for(var i=0;i<3;i++)// ------nuk e njef myfiles[] si array-------
//if(document.myform.myfiles[i].value==""){alert('Verini figuren ' + i);return false;}
return true;
}
</script>
</head>
<body leftmargin="0">
<table width="90%" border="0" align="center">
<tr>
<td width="100%" height="49" colspan="2" valign="top"><?php include('koka.php');?></td>
<td> </td>
</tr><tr>
<td height="20">
<?php include('menu.php');?>
</td>
</tr>
<tr>
<td height="491" valign="top" width="100%">
<table width="100%" >
<tr>
<!--content categories-->
<td width="20%" valign="top" bgcolor="#F8F8F8" align="right"><br>
<table width="100%" cellspacing="0">
<tr>
<td>
</td>
</tr>
<tr>
<td width="100%"><br></td>
</tr>
<tr>
<td> <br></td>
</tr>
</table></td>
<!--article and sections-->
<td width="80%" valign="top"> <table border="0" width="100%">
<tr>
<td width="80%">
<table width="100%" border="0">
<tr>
<td > <form name="myform" method='post' action="editaccount1.php"
onSubmit="return validate(); ">
<table width="100%" border="0" >
<tr>
<td colspan="2"><strong>Ndrysho fjalekalimin</strong>
<input type="hidden" name="userid" value="<?php echo $userid; ?>"></td>
</tr>
<tr>
<td colspan="2"><img src="images/bgmenu.png" width="100%" height="3px"></td>
</tr>
<tr>
<td colspan="2"><p>Username :
<input type="text" name="theuser" size="50" value="<?php echo $username;?>" readonly>
</p>
<p>Futni passwordin existues
<input type="password" name="expass">
</p>
<p> Password
<input type="password" name="pass1" value="">
</p>
<p>Ri futni passwordin
<input type="password" name="pass2">
</p></td>
</tr>
<tr>
<td colspan="2">
<center>
<p> </p>
</center></td>
</tr>
<tr>
<td width="52%"><input name="submit" type="submit" value=" Save " ></td>
<td width="48%"><a href="javascript:history.back();">kthehu</a></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td colspan="2"><img src="images/bgmenu.png" width="100%" height="3px"></td>
</tr>
<tr>
<td bgcolor="#F6F6F6">
<p><!--Advertising--></p></td>
</tr>
</table></td>
<td width="2" bgcolor="#EEEEEE"></td>
<td width="20%" valign="top" align="left" bgcolor="#F8F8F8"><br> <br>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr >
<td height="5" >
<?php include('fundi.php');?></td>
</tr>
</table>
diafol
I meant code for the admin page. Do you have an example form to change colours etc?
If you have a form, you apply colorpickers to fields, e.g. http://www.eyecon.ro/colorpicker/
You'll need ajax to overwrite css files or to produce xml. Good luck.
andyy121 -9 Junior Poster
thnx for that but i wont to change the background of the page the photos which are in every page how i have to do that can i create a page that can control the other pages??
diafol
Yes, they're called include files.
andyy121 -9 Junior Poster
ok thnx bro can you give me the steps to do something like that can give me some ideas
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.