Jump to content
Stef's Coding Community


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About CLU

  • Rank
  1. It seems that you are right, I wasnt thinking about them being essentially on the same domain. Cheers for helping out... Also a heads up on another potential issue with the colorbox and the long. Because everything within the innit file is absolute so the site path being stated as www.domain.com... if a user types domain.com ... then when they click on the login link it throws an error, as its not including the www. The simple solution i fount was to create a htaccess file and just make sure the url is changed to match that within the innit file. Just a heads up. Thanks again.
  2. At the moment the two sites that I have tested are on local servers, I was running tests to check everything and this is when i came across this issue. They are both reading from different databases, could the issue be with regards to the salt being the same?
  3. It still seems to allow the user access irrespective of whether there PW and usernames are the same... So it just allows access... I really cannot find out how to prevent this....
  4. Hi Guys, I think I have came across a potential security issue with the build a CMS. It seems there is a worrying issue, that being if you had two different sites, then the users that login for one would be able to log into the other. I think this must have something to do with the session start. Although there would have to be some form of serendipity as the users will have to be using the same browser, but still this seems to be rather worrying. Would/does anyone have a solution to this? Maybe this could be solved by changing the salt? If anyone could help that would be great.
  5. Hi Guys ok, Im starting to get the hang of PHP OOP and MVC, what i cannot seem to prevent are Notices: Undefined Variables. I understand i can switch this off, but i just want to know why proper way to get this done. Does anyone know. Here is my code: From my model m_settings: function siteSettings() { if ($stmt = $FS->Database->query("SELECT * FROM site_settings WHERE id='1'")) $row = mysqli_fetch_array($stmt); } This is just grabbing the results from a database and relaying them onto the view... which is the following: v_index.php: <tr><td
  6. CLU

    This is Driving me nuts

    So do you think i could have it in just one function... Maybe this could be easier... Basically for the two mysqli quieries is checking to see if the typwe within the database is test, and if it is then it will echo the title and body, I have updated this to use the Exerpt so that it only shows 10 characters form the post. But I think (correct me if im wrong) but could i just fetch the array in the top query and then just display the results in the following $row['title'] and the same for post. I think by watching your tutorials on here has really helped me learning OOP... As it seems other tu
  7. CLU

    This is Driving me nuts

    Hi Ben, Thanks again for your help... It would seem whilst we have came to the same'ish conclusion.... I did this lastnight function display_blog() { $blog_posts = $this->load_blog(); if ($this->FS->Auth->checkLoginStatus()) { $blog_start = '<div class="fs_edit">'; $blog_link = '<a class="fs_edit_quotes" href="' . SITE_PATH . 'app/blog/index.php">Edit Blog</a>'; $blog_end = '</div>'; echo $blog_start . $blog_link . $blog_end; } else { echo
  8. CLU

    This is Driving me nuts

    Hi Ben, There errors that i am getting are the following: Notice: Undefined variable: result in /Applications/MAMP/htdocs/ukmocks/app/cms/models/m_cms.php on line 211 Fatal error: Call to a member function fetch_object() on a non-object in /Applications/MAMP/htdocs/ukmocks/app/cms/models/m_cms.php on line 211 That line seems to be 'while ($row = $result->fetch_object())'... Any ideas whats going on? Thanks again...
  9. CLU

    This is Driving me nuts

    HI Ben, thanks for your reply. I tired that code out but as soon as that code is added and the call of <?php $FS->Cms->display_blog(); ?> is added to my index page the page breaks and i get a HTTP ERROR 500 (Internal Error Page) display. This is really confusing as to why it is not working... Because from the code above it seems logical to me and it should work... Any other suggestions?
  10. CLU

    This is Driving me nuts

    Thant for your reply Symphlion, excuse my ignorance but i still can't work it out... I have changed the code to which i think you was talking about... function load_blog() { // get contents from database if ($stmt = $this->FS->Database->prepare("SELECT * FROM blog_posts ORDER BY id")) { $stmt->execute(); $stmt->store_result(); if ($stmt->num_rows > 0) { $stmt->bind_result($blog_posts); $stmt->fetch(); $stmt->close(); return $status; } else { $stmt->close(); return FALSE; } } } function display_blog() {
  11. CLU

    This is Driving me nuts

    Really appreciate your replies guys... @Ben the page loads as normal... But does not display anything to do with the stated function. But when i am logged in it does echo out the ''You are logged in"... Really don't know what i am doing wrong? @symphlion I thought by having 'return $blog_posts;' That i would be returning the result? The second thing was just testing to see if just echoing anything out would work. Still trying to work it out... Can you guys see something I'm missing? Thanks again
  12. Hi everyone, I wonder if anyone can see what i am doing wrong here... I have created a table called blog_posts and just want to echo the posts onto my index page. I have created the cms application from Bens tutorials, and essentially i am trying to copy what he did with his code to create two new functions (display_blog and load_blog) All i want to do is use this function on my index page... But cannot see where i am going wrong.... Heres my code: (m_cms.php) function load_blog() { // get contents from database if ($stmt = $this->FS->Database->prepare("SELECT * FRO
  13. This looks good, nice work ben. Do you think i could take the view code and put it into a class. Then call the class to display a database?
  14. Hi Guys, I was wondering that for somereason when ever I add anything jquery or javascript to the flightpath cms certain things stop working... I think this has something to do with the noconflict... But how do i use this with jquery on the frontend of the site? If anyone has any help this would be most appreciated... Kind Regards
  15. @neliuz Yea got it sorted, the issue was within the config file. As i was/am using MAMP on my mac within my HTdocs folder i had another folder (With the cms and site within) From this i never added the folder name to the path within the plugins config file... So it stated the path was wrong. All you have to do is create a fold (I called mine upload) and place it on the front end of your site... Type in its relative path... so mine was /images/uploaded_images (No trailing slash) and hey presto it worked. Hope this helps bud.
  • Create New...