Jump to content

MadTechie

Staff Alumni
  • Posts

    9,409
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by MadTechie

  1. OMG.. you really need to re-think that code! also use code tags! Oh and you should have 3 for jpegs image/jpg image/jpeg image/pjpeg
  2. True, order by timestamp would be idea, but autonumber maybe fine So add ORDER BY `timestamp` DESC ORDER BY `ID` DESC before the limit
  3. assuming you have less than 100020 records, this will work, DELETE FROM `table` LIMIT 20 , 100000
  4. You seam to have code missing, ie $find=mysql_fetch_array(' if ( this is probably the route I would take <?php require_once ('config.php'); //Check if file exists in database $query = mysql_query("SELECT * FROM table"); $find = mysql_fetch_array($query); if (! empty($find['upload'])) { echo $find['upload']; echo "<td><font face=arial size=2><a href=page2.php>delete</a></font></td>"; } elseif(!empty($_FILES)){//Check file has been sent $limit_size = 10000; $filesize1 = $_FILES['file']['size']; $filetype1 = $_FILES['type']['type']; $filename1 = $_FILES['file']['name']; //Check up load details if (($filesize1 >= $limit_size) || ($filetype1 != 'image/jpeg') || (file_exists("upload/" . $filename1))) { echo "Max 10 Kb in JPG format and must not exists yet"; } else { //Moved Accepted upload to folder $path1 = "upload/" . $filename1; if (copy($_FILES['file']['tmp_name'], $path1)) { //Display filename echo "File Name :" . $_FILES['file']['name'] . "<BR/>"; } else { echo "<font face=arial size=2>Failed to upload!</font>"; } } }else{ echo "<font face=arial size=2>No image uploaded yet!</font>"; } ?>
  5. Without seeing any code anything is going to be guess work, if its the resize script then its likely to be a timeout or memory, you can probably remove that possibility but asking the client to upload a file, that you have already uploaded and tested (a very small jpeg), checking the error logs may reveal the problem, or you could even echo a message at different parts ie
  6. , I know you know now, but for others change the now() to the field name of your date
  7. I'm about to go to bed now, so i'll fing out the code in the morning but a quick how to go to youtube load up a video, and take note of the v= in the URL ie http://www.youtube.com/watch?v=okoPt9WIoDQ $V = okoPt9WIoDQ; Then View Source and find var swfArgs Now on that long line your find "t": after that is the token ie "t": "vjVQa1PpcFMUrnFuKkS6Z9g3DPHo%3D" $Token = vjVQa1PpcFMUrnFuKkS6Z9g3DPHo%3D $V = okoPt9WIoDQ Once you have both of these, add them to the following URL http://www.youtube.com/get_video?video_id=$V&t=$Token so the final URL for the FLV is http://www.youtube.com/get_video?video_id=okoPt9WIoDQ&t=vjVQa1PpcFMUrnFuKkS6Z9g3DPHo%3D Hope that makes sence
  8. It really depends on the query, personally i create an alias ie $SQL = "SELECT *, NOW() as theDate FROM table"; $timestamp = $list['theDate']; echo date("d/m/y",$timestamp) but you can also do this $SQL = "SELECT *, DATE_FORMAT(now(),'%e/%m/%y') as theDate FROM table"; echo $list['theDate']
  9. if your doing it via PHP then echo date("d/m/y",$timestamp) but for pure SQL then SELECT DATE_FORMAT(now(),'%e/%m/%y') as formatTime Hope that helps
  10. Read here session_regenerate_id
  11. Okay.. I'm not going to read all of that, the problem is simple.. a field name doesn't exist in the table find the line that is causing the error and change from mysql_error() to $sql.mysql_error() review the line and compare the field names to the ones in the table
  12. Garethp's Javascript would only download the current FLV file, if you want to view the actual files then I think they would be stored outside the public access directory and are purely parsed/steamed on request. I have my own version of a "YouTube Ripper", that a wrote purely because a friend asked me to fix one he found, that was badly coded. (I'll have a look for it)
  13. What are you trying to do ?
  14. try changing include(../sessions.php) to include("include/session.php"); could you give me an idea of the file names and folder, so i know what's where (only the PHP ones)
  15. when you login, does the url end with login.php ? it strange but it looks like sub-code.. in anycase okay searching for a function called it maybe misleading, so 1. you need to look for a file that contains code like this $form = new something the code probably include a file with the word form in the name, ie form.class.php check the included file first but your looking for a file that has code like this class something{ the something will be the same as from search 1
  16. define
  17. same problem really, but use include_once (just incase) <?php include_once("../include/session.php"); //added if($session->logged_in){
  18. $_SERVER['SERVER_NAME'] will only give you the domain you probably want $_SERVER["PHP_SELF"], Quick tip add this line of code echo "<!-- This file is:".$_SERVER["PHP_SELF"]." -->"; and load up the first template, and view source and look for 'This file is' copy the text after it, and use that in your statement also remember the $_GET maybe used to pick the page, ie ?page=home, you could use that instead ie if ($_GET['page'] == 'home')
  19. Ahh okay.. well this code function procUpdateLevel(){ global $session, $database, $form; shows that $session, $database, $form are being used So i am hoping session.php has all the parts we need okay, is adminprocess.php in the same folder as admin.php (assuming it is) update the top part admin.php from <? /** * Admin.php to <?php include("../include/session.php"); /** * Admin.php and try that
  20. okay, now does sessions.php have a lines that says. include "constants.php"; or require"constants.php"; it may also be include_once or require_once, also see if you can find a file that includes "sessions.php" (same idea as above) the reason i ask, is to try to get an idea of what type of setup is used, for example he may of created a file called config.php that includes the above and calls the classes, if you wish, you could upload the files here and i could have a quick look, (you require 10+ posts to upload last time i checked) but you could zip+ mail them if you like
  21. <form action="" id="form2"> should be <form action="" method="POST" id="form2">
  22. Well that's a shame because it works here with that URL.
  23. First off please use code tags (#) by the looks of things the admin.php shouldn't be access directly as $form, $database and $session are not set, I'm going to take a guess but assume his forgot to include a common.php or functions.php or config.php file if you can find a function called isAdmin() function isAdmin( then you could probably work out the code from their
  24. Have you tried all the suggestions ? i know at least 1 of them will work
  25. 1. click Privileges 2. click Add a new User 3.1.User name = test 3.2 Host: LocalHost 3.3 Password = pass 3.4 Retype = pass 4. Global privileges tick all in Data & Structure 5. click go Now click the Databases tab Create new database enter name (ie testing) click create Then Create new table on database testing .. i think the tutorial plays form here
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.