Jump to content

dbibby

Members
  • Content count

    51
  • Joined

  • Last visited

1 Follower

About dbibby

  • Birthday 07/31/1987

Profile Information

  1. dbibby

    Need help with a contribution

    @@DunWeb Thank you for this I have read though it and i still have the same problem as before. I dont think this is a coding issue since my code is correct and works the aim is to get the code working on a page on my site so Its figuring out how to get the right side and footer back with that code. I know I can code the page to look the same as the website but im not that talented and would never get it right. Thanks Daniel
  2. dbibby

    Need help with a contribution

    Hi Chris I have but it isnt like that unfortunally I need to password protect some pages that are not items (well mostly). Thanks
  3. Good Afternoon Im working on a contribution that will password protect a area of your site allowing you to secure certain pages. Problem is I cant seem to put the php code into the site without losing the right column and footer Here is my code <?php /* $Id: shipping.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_phptest2); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_phptest2)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> </td> </tr> <tr> <td></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2" align="center"> <table border="0" width="100%" cellspacing="0" cellpadding="2" align="center"> <?php ############################################################### # Page Password Protect 2.13 ############################################################### # Visit http://www.zubrag.com/scripts/ for updates ############################################################### # # Usage: # Set usernames / passwords below between SETTINGS START and SETTINGS END. # Open it in browser with "help" parameter to get the code # to add to all files being protected. # Example: password_protect.php?help # Include protection string which it gave you into every file that needs to be protected # # Add following HTML code to your page where you want to have logout link # <a href="http://www.example.com/path/to/protected/page.php?logout=1">Logout</a> # ############################################################### /* ------------------------------------------------------------------- SAMPLE if you only want to request login and password on login form. Each row represents different user. $LOGIN_INFORMATION = array( 'zubrag' => 'root', 'test' => 'testpass', 'admin' => 'passwd' ); -------------------------------------------------------------------- SAMPLE if you only want to request only password on login form. Note: only passwords are listed $LOGIN_INFORMATION = array( 'root', 'testpass', 'passwd' ); -------------------------------------------------------------------- */ ################################################################## # SETTINGS START ################################################################## // Add login/password pairs below, like described above // NOTE: all rows except last must have comma "," at the end of line $LOGIN_INFORMATION = array( 'zubrag' => 'root', 'admin' => 'adminpass', 'daniel' => 'test' ); // request login? true - show login and password boxes, false - password box only define('USE_USERNAME', true); // User will be redirected to this page after logout define('LOGOUT_URL', 'http://www.datanetuk.com/catalog'); // time out after NN minutes of inactivity. Set to 0 to not timeout define('TIMEOUT_MINUTES', 5); // This parameter is only useful when TIMEOUT_MINUTES is not zero // true - timeout time from last activity, false - timeout time from login define('TIMEOUT_CHECK_ACTIVITY', true); ################################################################## # SETTINGS END ################################################################## /////////////////////////////////////////////////////// // do not change code below /////////////////////////////////////////////////////// // show usage example if(isset($_GET['help'])) { die('Include following code into every page you would like to protect, at the very beginning (first line):<br><?php include("' . str_replace('\\','\\\\',__FILE__) . '"); ?>'); } // timeout in seconds $timeout = (TIMEOUT_MINUTES == 0 ? 0 : time() + TIMEOUT_MINUTES * 60); // logout? if(isset($_GET['logout'])) { setcookie("verify", '', $timeout, '/'); // clear password; header('Location: ' . LOGOUT_URL); exit(); } if(!function_exists('showLoginPasswordProtect')) { // show login form function showLoginPasswordProtect($error_msg) { ?> <div style="width:600px; margin-left:auto; margin-right:auto; text-align:center"> <form method="post"> <h3>Datanet Communications Public Sector Gateway</h3> <P> Please Enter Your Username and Password to Continue. </P> <font color="red"><?php echo $error_msg; ?></font><br /> <?php if (USE_USERNAME) echo 'Login:<br /><input type="input" name="access_login" /><br />Password:<br />'; ?> <input type="password" name="access_password" /><p></p><input type="submit" name="Submit" value="Submit" /> </form> <br /> </div> <?php // stop at this point die(); } } // user provided password if (isset($_POST['access_password'])) { $login = isset($_POST['access_login']) ? $_POST['access_login'] : ''; $pass = $_POST['access_password']; if (!USE_USERNAME && !in_array($pass, $LOGIN_INFORMATION) || (USE_USERNAME && ( !array_key_exists($login, $LOGIN_INFORMATION) || $LOGIN_INFORMATION[$login] != $pass ) ) ) { showLoginPasswordProtect("Incorrect password."); } else { // set cookie if password was validated setcookie("verify", md5($login.'%'.$pass), $timeout, '/'); // Some programs (like Form1 Bilder) check $_POST array to see if parameters passed // So need to clear password protector variables unset($_POST['access_login']); unset($_POST['access_password']); unset($_POST['Submit']); } } else { // check if password cookie is set if (!isset($_COOKIE['verify'])) { showLoginPasswordProtect(""); } // check if cookie is good $found = false; foreach($LOGIN_INFORMATION as $key=>$val) { $lp = (USE_USERNAME ? $key : '') .'%'.$val; if ($_COOKIE['verify'] == md5($lp)) { $found = true; // prolong timeout if (TIMEOUT_CHECK_ACTIVITY) { setcookie("verify", md5($lp), $timeout, '/'); } break; } } if (!$found) { showLoginPasswordProtect(""); } } ?> </tr> <tr><td width="600" ><P> </td> </table> <BR> <table><td width="600" align="center"><BR><BR> </td> <tr><td width="200"><P><BR> </tr></table> <table border="0" width="100%" cellspacing="0" cellpadding="2" align="center"> </td></tr> </td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Here is a link to the page http://datanetuk.com/catalog/phptest2 If anyone could help me I would very much appreciate it. Many Thanks
  4. Can anyone recommend a hosting company that OSCOM 3 will work with fine? I want to start testing and working with the platform so I can in time move everything over from my V2.2. Thanks
  5. Yeah I suppose so and not for the first time im afraid to say!
  6. Thank you Harald I thought that was the issue 1and1 lying to me again! Think I will give them a call :) My Server Test
  7. Morning I have just installed OSCOM3 and when I go to the index page im getting the following error: Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /homepages/39/d308468606/htdocs/webshop2/index.php on line 9 Let me guess that even though 1 and 1 confirmed to me that my PHP is 5.3 this isnt the case? Many Thanks Daniel
  8. dbibby

    OSC V3

    Thank you very much :)
  9. dbibby

    Sage Pay Form Download

    Oh its working now so must had been a temp issue. Thanks Dan
  10. dbibby

    Sage Pay Form Download

    Good Afternoon Im having problems downloading Sage Pay Form the download link keeps failing. Sage Pay Link Does anyone else have a link to this that works or knows where I can install it? Many Thanks Daniel Bibby
  11. Good Afternoon I have installed as it says on new install but I have this error when I try to log into admin Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /homepages/39/d308468606/htdocs/catalog/admin/includes/functions/database.php on line 19 Unable to connect to database server! Does anyone know why? Many Thanks
×