Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Two Questions

  • 16-04-2010 12:04pm
    #1
    Registered Users, Registered Users 2 Posts: 309 ✭✭


    Hi all,

    I have 2 question's that I've been trying to solve for the last couple of days but with no luck.

    Firstly I'm building a website for a local guest house. I have most of the site completed but I have run into one problem. They want a calender on the site, show what dates are booked, available etc. They have asked for one like the one used on the website www.welcomecottages.com.
    This shows unavailable dates in different colours to available ones and gives the price for the week when you click on the date. I've never used a calender like this before so I'm stumped. I've searched around for some different types but nothing is giving me what I want. Can anyone recommend any similar to the one on this website?

    Secondly, I've been asked by a friend of mine to manage the updates on his website. The site itself is designed and run by a much larger web design company. It was created in PHP. They have given me ftp access to the site to allow me do the updates, but once I've logged in, I'm completely lost. I've looked through the files, found ones I know i need to use, like news_do_create.php but I can't figure out how I can open them. Am I right in saying I need access to the backend to do this work or can it be done through ftp?

    Thanks


Comments

  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    jrochie wrote: »
    Hi all,

    I have 2 question's that I've been trying to solve for the last couple of days but with no luck.

    Firstly I'm building a website for a local guest house. I have most of the site completed but I have run into one problem. They want a calender on the site, show what dates are booked, available etc. They have asked for one like the one used on the website www.welcomecottages.com.
    This shows unavailable dates in different colours to available ones and gives the price for the week when you click on the date. I've never used a calender like this before so I'm stumped. I've searched around for some different types but nothing is giving me what I want. Can anyone recommend any similar to the one on this website?

    Secondly, I've been asked by a friend of mine to manage the updates on his website. The site itself is designed and run by a much larger web design company. It was created in PHP. They have given me ftp access to the site to allow me do the updates, but once I've logged in, I'm completely lost. I've looked through the files, found ones I know i need to use, like news_do_create.php but I can't figure out how I can open them. Am I right in saying I need access to the backend to do this work or can it be done through ftp?

    Thanks

    Sorry I've never attempted a calender before so I wouldn't know where to start.

    As far as the other site goes, if you have access to the ftp file manager then everything you need should be there. Whats the issue? Can you just not use PHP or is the PHP just not displaying in the ftp files?

    Can't you just download them and re-upload them to replace the old one? Surely any text editor will open a php file.


  • Registered Users, Registered Users 2 Posts: 309 ✭✭jrochie


    My apologies I wasn't very clear with the first post.
    It seems that the content is managed through a database. The code for the news_createdo.php file is as follows:
    <?php
    session_start();
    require '../lib/php/functions.php';
    $link = db_connect();
    /**
     * handle the image creation
     */
    if ($_FILES[image][name] != "") {
    	require 'inc/create_images.php';
    	$image = create_images($_FILES[image],'../media/images/','news','350');
    	$sql_image = "
    		image = '$image[main]',
    		thumb = '$image[thumb]',
    	";
    }
    
    $sql = "insert into news_list set
    					title = '".mysql_real_escape_string($_POST[title])."',
    					description = '".mysql_real_escape_string($_POST[description])."',
    					$sql_image
    					date = NOW()";
    mysql_query($sql, $link) or die(mysql_error()." - $sql");
    header("location: news_list.php");
    ?>
    
    ]
    I don't seem to have access to the mysql database though so I can't run any of these php files.


  • Registered Users, Registered Users 2 Posts: 7,838 ✭✭✭Nulty


    I see. Yeah you'll need administrator access to the database to edit the output on that page. Do they want you to edit the data base or pages that aren't reliant on the database. I'd say they either forgot to give you MySQL login or they want to to change the other pages.

    Acces to the database should be on the hosting site. If you've never used a database before I'd suggest you get reading. I can send you a PDF on it if you like.


  • Registered Users, Registered Users 2 Posts: 309 ✭✭jrochie


    basically i've signed up to keep the site up to date, by posting news stories etc. I've been given a firm warning not to edit anything which I completely understand and accept. I've done a bit with databases before, not quite my forte but I have a fair idea.

    That being said I always welcome any new reading material that will benefit me!

    Thanks!


  • Registered Users, Registered Users 2 Posts: 1,393 ✭✭✭Inspector Gadget


    Well, at a glance, if you really want to figure out a set of credentials for the database, have a look in that 'functions.php' file included at the top and you'll find the details there or in some file included in that (or included in an include file in that, and so on) - look for that db_connect() function and you'll find it.

    Thing is, though, based on the content of that PHP script you posted, it looks like it's part of a content management system that's already integrated into the site. I'd be inclined to guess that news_createdo.php, since its sole purpose is to insert a record into the news_list table, is the script that some web form submits to, and I'd be reasonably confident that the web form in question allows the person to compose the news item without having to know about the back end. Ask your mate if there's an administrative login to that site, and you might save yourself a lot of hassle.

    [edit] Meh, too late :) [/edit]

    Hope that helps,
    Gadget


  • Advertisement
Advertisement