Admin page to edit XML files (newbie)

Hi
I have an online flash gallery that uses xml files (x2) to store paths, file names, file sizes (group.xml) menu items (localText.xml). I can edit them manually, adding/deleting but would like an admin panel to do this for me, just filling in the relevant details and uploading the images to the correct folders.
I think I need:
login - user and password
front end - with add, delete, edit entry, create new group, upload images (4 at a time)(group.xml)
- add menu items (localText.xml)
- create users
I know there is more to it than this but could do with some help to get started.
I’m pretty new to all this. Below are the two xml files I want to edit

group.xml

<?xml version='1.0' encoding='UTF-8'?>
    <mediaGroup>
      <amgVersion version="1.3" />
      <groupInfo>
        <author></author>
        <authorApplication>AMG Hand Coded</authorApplication>
        <creationDate>04/10/07, 01:27:09 PM</creationDate>
        <galleryMaker name="Adobe Flash Gallery" version="1.3" />
        <groupData groupID="" groupName="" />
        <authorID></authorID>
         <custom>
          <groupTitle>Collection 1</groupTitle>
          <groupDescription>Biog here</groupDescription>
          <siteTitle></siteTitle>
          <contactName></contactName>
          <contactEmail></contactEmail>
        </custom>
      </groupInfo>
      <sizes>
        <imageSize size="thumb" maxwidth="96" maxheight="96" />
        <imageSize size="small" maxwidth="800" maxheight="450" />
        <imageSize size="medium" maxwidth="1040" maxheight="520" />
        <imageSize size="large" maxwidth="1150" maxheight="650" />
        <imageSize size="video" maxwidth="400" maxheight="300"/>
      </sizes>
     <media totalGallerySize="154">
<item>
<title>1109enh</title>
<description></description>
<mediaType category="image" format="jpeg" />
<renditions>
<rendition size="large" src="media/large/1109enh.jpg" height="650" width="474" />
<rendition size="medium" src="media/medium/1109enh.jpg" height="520" width="379" />
<rendition size="small" src="media/small/1109enh.jpg" height="450" width="328" />
<rendition size="thumb" src="media/thumb/1109enh.jpg" height="96" width="70" />
</renditions>
</item>
<item>
<title>1110crp</title>
<description></description>
<mediaType category="image" format="jpeg" />
<renditions>
<rendition size="large" src="media/large/1110crp.jpg" height="650" width="468" />
<rendition size="medium" src="media/medium/1110crp.jpg" height="520" width="375" />
<rendition size="small" src="media/small/1110crp.jpg" height="450" width="324" />
<rendition size="thumb" src="media/thumb/1110crp.jpg" height="96" width="69" />
</renditions>
</item>

localText.xml

<?xml version="1.0"?>
<localization>
	<galleryMenus>
		<menuitem label="View" event="MenuView">
			<menuitem label="Gallery" type="radio" event="MenuViewGallery"/>
			<menuitem label="Slideshow" type="radio" event="MenuViewSlideshow"/>
			<menuitem label="Separator" event="Separator"/>
			<menuitem label="Biog" type="radio" event="MenuViewAbout"/>		
		</menuitem>
		
		<menuitem label="Background Color" event="MenuView">
			<menuitem label="BgColor Dark Grey" event="livePreview" prevNode="&lt;backgroundBgColor color='000000' alpha='100' &gt;/"/>	
			<menuitem label="BgColor Grey" event="livePreview" prevNode="&lt;backgroundBgColor color='111111' alpha='100' &gt;/"/>
			<menuitem label="BgColor Light Grey" event="livePreview" prevNode="&lt;backgroundBgColor color='444444' alpha='100' &gt;/"/>			
		</menuitem>
		
		<menuitem label="Layout" event="MenuView">
			<menuitem label="Scrolling Left" event="livePreview" prevNode="&lt;changeGallery style='styles/style.xml' &gt;/"/>
			<menuitem label="Scrolling Bottom" event="livePreview" prevNode="&lt;changeGallery style='styles/style_scrolling_bottom.xml' &gt;/"/>
			<menuitem label="Paginated" event="livePreview" prevNode="&lt;changeGallery style='styles/style_paged.xml' &gt;/"/>		
		</menuitem>
		
		<menuitem label="Collection" event="MenuView">
			<menuitem label="Collection 1" event="livePreview" prevNode="&lt;changeGallery group='groups/group.xml' &gt;/"/>	
			<menuitem label="Collection 2" event="livePreview" prevNode="&lt;changeGallery group='groups/group2.xml' &gt;/"/>
			<menuitem label="Collection 3" event="livePreview" prevNode="&lt;changeGallery group='groups/group3.xml' &gt;/"/>
			<menuitem label="Collection 4" event="livePreview" prevNode="&lt;changeGallery group='groups/group4.xml' &gt;/"/>
			<menuitem label="Collection 5" event="livePreview" prevNode="&lt;changeGallery group='groups/group5.xml' &gt;/"/>
			<menuitem label="Collection 6" event="livePreview" prevNode="&lt;changeGallery group='groups/group6.xml' &gt;/"/>	
			<menuitem label="Collection 7" event="livePreview" prevNode="&lt;changeGallery group='groups/group7.xml' &gt;/"/>	
		</menuitem>
		
		<menuitem label="Links" event="MenuView">
			<menuitem label="Contact" event="livePreview" prevNode="&lt;anchorLink href='http://' target='_blank' &gt;/"/>
			<menuitem label="superGiantband.com" event="livePreview" prevNode="&lt;anchorLink href='http://www.supergiantband.com' target='_blank' &gt;/"/>	
		</menuitem>
	</galleryMenus>
	<toolTips>
		<toolTip label="Next Image" item="SlideshowVCRNextTip"/>
		<toolTip label="Previous Image" item="SlideshowVCRPrevTip"/>
		<toolTip label="Play Slideshow" item="SlideshowVCRPlayTip"/>
		<toolTip label="Pause Slideshow" item="SlideshowVCRPauseTip"/>
		<toolTip label="View Gallery" item="SlideshowViewGalleryTip"/>
		<toolTip label="View Slideshow" item="SlideshowViewSlideshowTip"/>
		<toolTip label="Add Comment" item="SlideshowOpenCommentTip"/>
		<toolTip label="Mark as Favorite" item="SlideshowMarkFavoriteTip"/>
		<toolTip label="Next Page" item="ThumbnailNextPageTip"/>
		<toolTip label="Previous Page" item="ThumbnailPrevPageTip"/>
		<toolTip label="Last Page" item="ThumbnailLastPageTip"/>
		<toolTip label="First Page" item="ThumbnailFirstPageTip"/>
		<toolTip label="Play Video" item="SlideshowVideoPlayTip"/>
		<toolTip label="Pause Video" item="SlideshowVideoPauseTip"/>
		<toolTip label="Rewind Video" item="SlideshowVideoRewindTip"/>
	</toolTips>
</localization>

Thanx

First, there are a few samples of this type of code around this site like the JW posts and millions around google.
BUT, we like to help! First, a couple quick questions…

Were you planning on keeping the XML or were you interested in turning this into a database system?
This question is important. Most see an XML file as handy due to the and fairly easy to read.
But, a database program allows for nice searches with simple queries. Where you want to head with
this?

A few thoughts. If you have a huge number of users, then, database is the ONLY way to go. If they are
allowed to update items, load pictures, database… Sounds like database…

A few general comments to help you get started. Take a look at the overall project. Right everything down so you can organize it all. Separate it into parts and pages. First, as an example of this, let’s start with users. A few user items…

Add new user, delete one, alter their info (email/ phone/ password) Verify them when they log in, make sure nothing is display for non-members (on every page), maintain the database of their records such as when they log in, when they posted a new picture, etc.

This one part of your project can be a starting point. This usually takes three web pages. One standard INDEX.HTML file for the opening page with blurbs about the site and a log-in area on it. This will call a login-page.php which will open the database and verify that they are allowed in. The opening page will also have a non-member “REGISTER-NOW” button that will also call the login-page.php which will redirect the user to a fourth page for newbies to register at. (lots to do there for security issues.) Then, if they are a valid member, the login-page.php will “redirect” to the live HomePage.php after setting a $_SESSION variable to prevent non-members from viewing the page. Since PHP runs SERVER-SIDE only, users can not see session varibles. And, if someone goes to your www.mysite.com/HomePage.php, that page will first check the session variable to see if they have logged in, if not, they get redirected to a You-Are-NOT-allowed-here page.

So, that is where I would start. Get the users section done first and when working come back for more help.

You need to design nice login page. Create your database with a Users table and fields to accept all of the records you wish for one user. Create a registration page where a new user can enter all this data and update it to the database. Create a Not-Allowed page for use one the users are in place. Create an ADMIN page for future use. This ADMIN page would show a list of all users with options to change their data and to be able to delete users. Once all this is in place, you can move on to the gallery part.

Sorry if I gave you too much info, but, there are several parts to your project. You can ask here for more help or google “php code login page sample” or something like that to acquire code. If you get stuck, please ask away…

Good luck

Thanks for the quick reply.
From what i’ve read there’s a lot to consider, but i would like to stick to XML for this site.
The site itself is an archive for an artist… http://79.170.44.100/grahamcupples.com/ (temp url)
I’d like to make it easier for myself/client to add/delete content.
Eventually i’d like a db based system with search/query but at the moment this will do.
I need to get my head round the basics :wink:
I will answer in full later.
Cheers for the guidance.

Okay, I understand where you are heading… Part one, get it working, part two upgrade to database.

As a Newbie, make a couple lists. First, what data you have now. What you want in the future. General layout of pages of your site. Such as: ADMIN, homepage, Help page, contact page, privacy-policy page, and the various main content pages for the artists and for visitors.

This sounds like a lot at first, but, a large amount of it will write itself. For instance, the Contact-Us page is standard and look at any contact page to steal ideas.

Also, pick your colors and types of button in advance. You can download free ones if you search around google…

I looked at your demo site. Nice looking! I like it! Of course that would be the “Gallery” page and need more. After seeing that page, you are on the right track. XML is basically just TEXT, so you could place it into a database as TEXT. This would give you the search features as you can search text inside of a database with a QUERY. Otherwise, you have to use file access to read/write files and to use PHP/XML code to parse thru the XML. This is NOT as hard as it sounds.

Why don’t you read the notes I suggested on the this post and the previous one and make you decision and ask us whatever you need. Start with a question or two and get them solved then move to a couple more. We are here to help.

Sponsor our Newsletter | Privacy Policy | Terms of Service