Jump to content

www.mihalism.com

Members
  • Posts

    68
  • Joined

  • Last visited

Posts posted by www.mihalism.com

  1. First stop, if a file is public, you should not expose it's deletion URL, speaking of which, perhaps only the uploader himself (and the admin of course) should be able to delete images.I haven't downloaded and tryed the script yet, but as it seems, there are a bunch of files on it. I would personally prefer if there's only one, with another GET variable to determine it's mode. For example multihoster.php?mode=viewer&file=blabla.png
    We will make it so delete URLs will only work for the IP address that uploaded it and and I think it would be a good idea to include it all in file like Invision Power Board 1.3 did.
    One of the random image was pretty naked...
    Sorry for that its a demo site and you never know what people will upload thats why the uploads are deleted everyday.
    Hopefully admins can turn the random image feature on and off because of this type of uploaders.btw, I saw that (and another such) image too :) .
    We will build it into the next version. Honestly I never thought of doing that.
  2. Here is a fixed version

    <?php include("../includes/DBConnecter.php"); ?>if($_POST['title'] == '') {	echo "You did not enter a title<br>";}else{	$FirstName = $_POST['f_name'];}	if($_POST['category'] = '') {	echo "You did not enter a category<br>";}else{	$Category = $_POST['category'];}if($_POST['article'] = '') {	echo "You did not enter an article<br>";}else{	$Article = $_POST['article']; }$sql = "CREATE TABLE ".$Category." (		`Title` TEXT NOT NULL, 		`Article` TEXT NOT NULL, 		`Time` TIMESTAMP NOT NULL		 )";		mysql_query($sql,$con); ?>

  3. CMS Can stand for the following:CMS-2 programming language, used by the United States NavyCode management system, a script or program for archiving and maintaining source codeContent management system, a system for maintaining web sitesCourse management system, a software system designed to facilitate the management of course materialsClinical Management System, software managing electronic medical records and practice management informationFor front-end and back-end read this:http://en.wikipedia.org/wiki/Frontend

  4. I've been search for about a hour to know how to do this. I want the footer of the website to align to the bottom of the page. First I used position absolute to do it but I found it did not scroll. Does anybody have a idea on how to do it to allow it to scroll?

  5. This should fix your email problems, and I have tested it to make sure it works.For the errors I thought it would be faster for you just to echo them so thats what I did.

    <?php 	$url = 'http://www.yourdomain.com/accountok.php'; 	$user = $_POST['username'];	$pass = $_POST['password'];	$pass2 = $_POST['password2'];	$zip = $_POST['zip'];	$email = $_POST['email'];	$min_lenngth = 6;	function CheckMail($email){		if(eregi("@", $email)){ 			return true;		}else { 			return false; 		}	}	function CheckZip($zip) {		if (eregi("[0-9]", $zip)){			return true;		}else{ 			return false; 		}	}	if (($pass)!=($pass2)){		echo "Passwords to not match!";		exit;	}elseif((empty($email)) || (!CheckMail($email))){		echo "E-mail is not valid";		exit;	}elseif((empty($zip)) || (!CheckZip($zip)) || (strlen($zip)!=5)){		echo "ZIP Code is not valid";		exit;	}elseif(strlen($user) < $min_lenngth || strlen($pass) < $min_lenngth){		echo "Password and or username is too short";		exit;	}else{		echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';	}?>

  6. Try using this version

    <?php 	$url = 'http://www.yourdomain.com/accountok.php'; 	$user = $_POST['username'];	$pass = $_POST['password'];	$pass2 = $_POST['password2'];	$zip = $_POST['zip'];	$email = $_POST['email'];	$min_lenngth = 6;	function CheckMail($email){		if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-z]{2,4}$",$email)){ 			return true;		}else { 			return false; 		}	}	function CheckZip($zip) {		if (eregi("[0-9]", $zip)){			return true;		}else{ 			return false; 		}	}	if (($pass)!=($pass2)){		header("Location: error-pwverify.php");		exit;	}elseif((empty($email)) || (!CheckMail($email))){		header("Location: error-email.php");		exit;	}elseif((empty($zip)) || (!CheckZip($zip)) || (strlen($zip)!=5)){		header("Location: error-zip.php"); 		exit;	}elseif(strlen($user) < $min_lenngth || strlen($pass) < $min_lenngth){		header("Location: error-pwshort.php"); 		exit;	}else{		echo '<META HTTP-EQUIV=Refresh CONTENT="0; URL='.$url.'">';	}?>

  7. I made a function to check if a name contains banned characters. When the function does check for a banned character it always return false.

    	function banned_letters($name){	global $_CONFIG;		for($i=0; $i < strlen($name); $i++){			$pos = strrpos($_CONFIG['allowed_letters'],$name{$i});				if ($pos === false){					return true;				}else{					return false;				}		}	}

  8. First of all you only need one bracket and you did not end your variables with ;Here i made it more clean and it should work

     <?php $mysql_servername=""; $mysql_username=""; $mysql_password=""; $mysql_database=""; $mysql_tablename=""; $mysql_fieldname=""; $mysql_password_field=""; $mysql_xml_reference=""; $username=$_POST["username"]; $password=$_POST["password"]; $connect = mysql_connect( $mysql_servername, $mysql_username , $mysql_password ); mysql_select_db( $mysql_database , $connect ); $login = "SELECT * from ".$mysql_tablename." WHERE ".$mysql_fieldname."='".$username'.""; $fetch_array = mysql_fetch_array($login)); if ($fetch_array['$mysql_password_field']="$password"){ $xml_reference=$fetch_array['$mysql_xml_reference']; } mysql_close($connect);  ?>

  9. For this to work you have to have browscap.ini set in your php.ini

    <?php$browser = get_browser(null, true);if($browser['browser'] == "IE" && $browser['version'] == "6.0"){echo "You are in Internet Explorer 6.0";}else{echo "You are not in Internet Explorer 6.0";}?>

  10. for the word User File in the form and post key try using underscores instead of spaces like this

    File Name: <input type="text" name="User_File" /><br />File: <a href="http://link.I.will.keep.to.myself/images/<?php echo $_POST["User_File"]; ?>.jpg</a>

×
×
  • Create New...