Jump to content
Killersites Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by DavidCampbell

  1. no worries I found them, there was a link in the PDF
  2. ah its these templates I'm looking for. I'm not sure how to get back to them.
  3. Hi Stef. Thanks for replying. I'll check the PDF. But I'm sure there was some files. In particular a basic terms and conditions for dealing with clients. And a basic contract outlining the 1/3 upfront, 1/3 on delivery of first draft, etc. Am I mistaken? My memory is pretty foggy. Dave
  4. Hi, I hope Stef you can help me out, or anyone. Back in 2018 I bought Complete Entrepreneur and Complete Freelancer course. My hard drive died since where I had downloaded all the files. Today I've just re-downloaded the mp3 a pdf course outline. I was sure there was more than this, video files maybe? But definitely some docs; example terms and conditions, contracts and various other useful files. Splitting the payment into three, all those sort of things. Would be really useful for me to get again right now. Where can I find this files? Thanks in advance
  5. I had some time to return to this today - fixed it. The bug arrises because of the subtle difference between get_data in the Template class. in the oopLogin the method does not have the option to echo out the data, whereas the one in phpCart, it does. so much confusion over something so simple.
  6. Hi Stefan, I haven't solved it yet, I'm a little stumped. My local version of OOP Login works as expected. Obviously there are differences in the file structure and the use of DPO instead of MYSQLI. My next move was to just refactor the code and use MYSQLI. But It would be nice to get DPO working though.
  7. the admin index.php, is very simple: <?php // ==================================================== // INDEX // // ==================================================== /* * Are we loged in? * YES - redirect to admin home * NO - redirect to login */ include("app/init.php"); // check authorization if ($Auth->checkLoginStatus() == FALSE) { $Template->redirect('login.php'); } else { echo "redirect to home.php"; // $Template->redirect('home.php'); }
  8. v_login.php (view) <!DOCTYPE html> <html> <head> <title>Login In</title> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <link href="resources/css/style.css" media="screen" rel="stylesheet" type="text/css"> </head> <body> <h1>Log In</h1> <div id="content"> <form action="" method="post"> <div> <? $alerts = $this->get_alerts(); if ($alerts != '') { echo "<ul class=\"alerts\">\n";
  9. login.php <?php // ==================================================== // LOGIN // // ==================================================== include("app/init.php"); $Template->set_data('page_class', 'login'); if (isset($_POST['submit'])) { // get data $Template->set_data('input_user', $_POST['username']); $Template->set_data('input_pass', $_POST['password']); // validate data if ($_POST['username'] == '' || $_POST['password'] == '') { // show error if ($_POST['username'] == '') { $Template->set_data('error_user', 'required');} if ($_POST['password']
  10. auth.php <?php // ==================================================== // AUTHORIZATION CLASS // Deals with auth tasks // ==================================================== class Auth { // ========================== // Class scope vars // ========================== private $salt = 'j4H9?s0d'; // ========================== // Constructor // ========================== function __construct() { // do nothing } // ========================== // Methods // ========================== // ============= // validate login
  11. template.php <?php // ==================================================== // TEMPLATE CLASS // Handling all templating tasks - displaying views, alerts, erros and view data // ==================================================== class Template { // ========================== // Class scope vars // ========================== private $data; private $alert_types = array('success', 'error'); // ========================== // Constructor // ========================== function __construct() { // do nothing } // ===============
  12. <?php // =========================================== // INIT // Basic configuration settings // =========================================== // connect to database (PDO) $host = "localhost"; $username = "root"; $password = "yes"; $dbname = "recordLabel"; $dsn = "mysql:host=$host;dbname=$dbname"; $options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION); $connection = new PDO($dsn, $username, $password, $options); // set up constants define('SITE_NAME', 'My Record Label'); define('SITE_PATH', 'http://recordLabel.local/admin/'); // local/admin define('IMAGE_PA
  13. Here is a screenshot of the bug: This login is based on the KillerSites OOP Login tutorial. But I've made some differences. Firstly is in a sub directory 'admin' as i'm building that first. Secondly the most important change is I've changed it to PDO instead of MySQLi. I've gone all through my code and cant see where this would decide to print out like this. Feel a bit dumb not being able to find out why this is performing like this. Hoping someone has a quick answer. I'm just at the beginning of this build and I wanted to adapt the code to use DPO, although I have had no exp
  14. You tell them that you are a web developer, not an SEO consultant. Go hire an SEO consultant. If they want you to do it, there's an extra charge - get them to pay you a monthly retainer to manage their SEO needs. If they don't like the results they can cancel anytime. This falls into the bracket of managing customer expectations. Also putting people off getting you do silly work. If you don't want to do it, put your price up so they don't ask you to do it... or you're happy to do it because you're getting paid well.
  15. https://www.youtube.com/results?search_query=photoshop
  16. your style sheet should not have this syntax: <style> </style> just do it like this: body { background: url("images/background-forum.jpg"); } and include it in your html head: <link href="pathTo/style.css" media="all" rel="stylesheet" type="text/css">
  17. actually I think I've solved it: BigDecimal a00 = new BigDecimal(a[0][0]); BigDecimal a01 = new BigDecimal(a[0][1]); BigDecimal a02 = new BigDecimal(a[0][2]); BigDecimal a10 = new BigDecimal(a[1][0]); BigDecimal a11 = new BigDecimal(a[1][1]); BigDecimal a12 = new BigDecimal(a[1][2]); BigDecimal a20 = new BigDecimal(a[2][0]); BigDecimal a21 = new BigDecimal(a[2][1]); BigDecimal a22 = new BigDecimal(a[2][2]); BigDecimal a00a11a22 = new BigDecimal("0.0"); BigDecimal a01a12a20 = new BigDecimal("0.0"); BigDecimal a02a10a21 = new BigDecimal("0.0"); BigDecimal
  18. anyone know how to multiply multiple BigDecimals? not like this example: BigDecimal subTotal, taxRate, tax, total; subTotal = new BigDecimal("32.50"); taxRate = new BigDecimal("0.05"); tax = subTotal.multiply(taxRate); total = subTotal.add(tax); I need to multiple more than two numbers and also do addition. This is the line i'm trying to convert to BigDecimals: double aDeterminantMinuend = (a[0][0] * a[1][1] * a[2][2]) + (a[0][1] * a[1][2] * a[2][0]) + (a[0][2] * a[1][0] * a[2][1]); as you can see those are doubles in an array that i'm doing my arithmetic to. so I
  19. when you open a <div> always close the div </div> I like to mark my closing divs, so I don't lose track. In PHP I would have comment like: // END div.classOfDiv print "</div>"; or in html: <!-- END div.classOfDiv --> </div> yes you can embed divs within other divs.
  20. I disagree with the don't use classes comment. No! Use classes all the time, not id's. It's rare that you are styling one specific element. Maybe something like a logo. But most things are going to be groups of elements, so use a class for that group, for that "class" of element. Thats what its for. If you want to minimise the classes you're adding to elements, just add a class to the one element that is the parent to a group (in the DOM), usually a div. Then you can use that to target all elements within. div.myListItem p Styles all paragraphs within any div with a class of 'myListItem'.
  21. What do we think of Brian Will's assertion that Object-Oriented Programming is Bad?
  22. With photoshop don't get too attached to the details, as once you start coding, things tend to look different. Especially once you start accounting for the way different browsers interpret your beautifully crafted design. Being pedantic about pixel perfect design will just lead you to despair. You need to think of design as fluid, it's not like graphic design for print. Not at all. Don't be scared of using CSS, the work flow can be very fast once you know what you're doing. Just as fast as fumbling around in photoshop or illustrator. I'm in the camp of preferring to dive straight in w
  • Create New...