Jump to content

craigtolputt

Members
  • Posts

    161
  • Joined

  • Last visited

    Never

Everything posted by craigtolputt

  1. thats cool man cheers for the help and trying ill keep trying to find an answer
  2. Sorry, that don't seem to work either, it now lets me register with say just an f in the email field.... This is very hard for such a simple thing i wish it was as easy as if ( email ends in .pnn.police.uk ) goto and play(): lmao I WISH!
  3. Is it easy to implement into my php file? Could someone take a look?
  4. Ha Ha yeah sure paypal ok? lol Sorry to sound stupid but im a designer and a bit of flash and this has been dumped on me to sort out. So i would add this to my register file? <?php function check_email($email) { return (substr(trim($email), -14) == '.pnn.police.uk'); } //example use if(!check_email($email)) { echo "email not ok"; } else{ // ok. } ?> And what is the mysql_real_escape_string() all about, what does it do? and is it easy to addon?
  5. If someone here knows how i can do this i am willing to pay for the advice as i have been playing with this for about 3 days now and the dealine is getting close cheers
  6. Ah OK this looks like it might work... So if i need it to check that the extension of an email address is .pnn.police.uk could i do something like... <?php // Example 1 $extension = "pnn police uk"; $email = explode(" ", $extension); echo $email[0]; // .pnn echo $email[1]; // .police echo $email[2]; // .uk ?>
  7. Hmmmmm Simple Hey!! Im not sure about that ha ha Anyway what is explode? and is it php or flash? or is it a site? sorry im probably looking a bit silly right now but i really need to get this sorted. cheers
  8. Hi Guys, Im new here and im hoping someone has the answer to my question... I have a flash site with a registration form which works very well but i need to add a validation to it to check that the email address that the user adds ends in .pnn.police.uk Im not sure if i need the code to be in the php page which is here... <?php //include the connect script include "connect.php"; /*THIS VARIABLE IS WHAT TABLE YOU ARE USING...IF YOU USED MY SQL FILE, THEN YOUR DEFAULT TABLE*/ /*NAME SHOULD BE 'userv2' AND YOU DO NOT NEED TO CHANGE ANYTHING, BUT IF YOU MADE YOUR OWN TABLE,*/ /*CHANGE THIS VARIABLE.*/ $tableName = "usersv2"; //Post all of the users information (md5 Encrypt the password) $username = $_POST['username']; $password = md5($_POST['password']); $passwordsend = ($_POST['password']); $firstName = $_POST['firstName']; $lastName = $_POST['lastName']; $email = $_POST['email']; $phone = $_POST['phone']; $address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip']; //Generate confKey (this is used to determine which user it is when the user forget's their password. function createConfKey() { $chars = "abcdefghijkmnopqrstuvwxyz023456789"; srand((double)microtime()*1000000); $i = 0; $key = ''; while ($i <= 31) { $num = rand() % 33; $tmp = substr($chars, $num, 1); $key = $key . $tmp; $i++; } return $key; } $thekey = createConfKey(); //$theKey is the random 32 character string and then $confKey is the random 32 character string with md5 encryption. $confKey = md5($thekey); //grab all the usernames in the table $sql1 = mysql_query("SELECT * FROM $tableName WHERE username = '$username'"); //grab all the emails in the table $sql2 = mysql_query("SELECT * FROM $tableName WHERE email = '$email'"); //get number of results from both queries $row1 = mysql_num_rows($sql1); $row2 = mysql_num_rows($sql2); //if there is a result it will be either 1 or higher if($row1 > 0 || $row2 > 0) { //echo username or email is already in use and deny registration. echo "&msgText=Username or email already in use!"; } else { //if there was no existing username or email, insert all their information into the database. $insert = mysql_query("INSERT INTO $tableName (username,password,firstName,lastName,email,phone,address,city,state,zip,confKey) VALUES ('$username','$password','$firstName','$lastName','$email','$phone','$address','$city','$state','$zip','$confKey')") or die(mysql_error()); //This is required for and HTML email to be sent through PHP. $headers = "From: [email protected]\r\n"; $headers.= "Subject: RedWeb Security Group Registration Details\r\n"; $headers.= "Content-Type: text/html; charset=ISO-8859-1 "; $headers .= "MIME-Version: 1.0 "; /******HERE YOU CAN EDIT WHAT YOU WANT THE EMAIL TO SAY WHEN THEY FORGET THEIR PASSWORD******/ /* */ /*PHP Explained: */ /*$msg are all the same variable, however, when you set the first one to just '=' and the */ /*second one to '.=' it basically concatinates the two variables. For example: */ /* */ /* */ /* $a = 1; */ /* $a .= 2; */ /* $a .= 3; */ /* echo $a; */ /* */ /* This will echo: 123 */ /* */ /* */ /* Be sure to include $firstName & $lastName somewhere in the message so the user knows */ /* what the message is */ /* */ /* */ /* */ /********************************************************************************************/ $msg = "Hello $firstName $lastName,<br/>"; $msg .= "We would like to thank you for joining our web site.<br/><br>"; $msg .= "Your Username is: $username<br/>"; $msg .= "Your Password is: $passwordsend<br/><br>"; $msg .= "Please keep these safe and if you have any questions, contact us at <br><br>"; $msg .= "<a href=\"mailto:[email protected]\">[email protected]</a>."; mail($email,"Thanks for Registering!",$msg,$headers); //and echo "Successfully registered!" and take them to a "thanks for registering" frame in flash echo "&msgText=Successfully registered!"; echo "&nameText=$firstName"; } ?> or in the flash actionscript which is here... stop(); //This sets a minimum character length to the password field. Change how you like. var passwordLength:Number = 4; //This variable determines if the registration completed successfully. If it did, change the submitBtn actions to go back to the login page. var success:Boolean = false; status_txt.text = ""; status_txt.autoSize = true; //Variables to hand the PHP files. var dataOut:LoadVars = new LoadVars(); var dataIn:LoadVars = new LoadVars(); //Run this once flash gets a response from the PHP. dataIn.onLoad = function() { var responsetext = this.msgText; var nametext = this.nameText; status_txt.text = responsetext; submitBtn.enabled = true; //If success change the button to continue and go back to the login screen and proceed to login. if (responsetext == "Successfully registered!") { _global.whoReg = nametext; success = true; gotoAndPlay("regcomplete"); } }; //This is run once the user clicks on submit submitBtn.onRelease = function() { //If the user has not registered successfully yet, do this... if (success == false) { //if the passwords dont match, alert the user. if (password1.text != password2.text) { status_txt.text = "Password Mismatch."; } else if (username.text == "" || password1.text == "" || password2.text == "" || firstName.text == "" || lastName.text == "" || email.text == "" || phone.text == "" || address.text == "" || city.text == "" || state_cb.value == "Select a state" || zip.text == "") { //If there are any empty fields, alert the user. status_txt.text = "Please fill in all fields."; } else if (password1.length < passwordLength || password2.length < passwordLength) { //If the password doesn't meet the required length, alert the user. status_txt.text = "Password length too short. " + passwordLength + " or more characters."; } else { //If everything goes through, send the input data to register.php submitBtn.enabled = false; status_txt.text = "Registering...Please wait..."; dataOut.username = username.text; dataOut.password = password1.text; dataOut.firstName = firstName.text; dataOut.lastName = lastName.text; dataOut.email = email.text; dataOut.phone = phone.text; dataOut.address = address.text; dataOut.city = city.text; dataOut.state = state_cb.value; dataOut.zip = zip.text; dataOut.sendAndLoad(registerLocation,dataIn,"POST"); } } else { //if success was equal to true, change the button actions to go back to the login screen. _parent.gotoAndStop("login"); } }; //Same actions as above, just adds functionality to the enter key. var keyObj:Object = new Object(); keyObj.onKeyDown = function() { if (Key.getCode() == Key.ENTER) { if (success == false) { if (password1.text != password2.text) { status_txt.text = "Password Mismatch."; } else if (username.text == "" || password1.text == "" || password2.text == "" || firstName.text == "" || lastName.text == "" || email.text == "" || phone.text == "" || address.text == "" || city.text == "" || state_cb.value == "Select a state" || zip.text == "") { status_txt.text = "Please fill in all fields."; } else if (password1.length < passwordLength || password2.length < passwordLength) { status_txt.text = "Password length too short. " + passwordLength + " or more characters."; } else { submitBtn.enabled = false; status_txt.text = "Registering...Please wait..."; dataOut.username = username.text; dataOut.password = password1.text; dataOut.firstName = firstName.text; dataOut.lastName = lastName.text; dataOut.email = email.text; dataOut.phone = phone.text; dataOut.address = address.text; dataOut.city = city.text; dataOut.state = state_cb.value; dataOut.zip = zip.text; dataOut.sendAndLoad(registerLocation,dataIn,"POST"); } } else { _parent.gotoAndStop("login"); } } }; Key.addListener(keyObj); // Populate the combo box with all the states. state_cb.addItem({data:"Select a county", label:"Select a county"}); state_cb.addItem({data:"England", label:"Avon"}); state_cb.addItem({data:"Bedfordshire", label:"Bedfordshire"}); state_cb.addItem({data:"Berkshire", label:"Berkshire"}); state_cb.addItem({data:"Borders", label:"Borders"}); state_cb.addItem({data:"Buckinghamshire", label:"Buckinghamshire"}); state_cb.addItem({data:"Cambridgeshire", label:"Cambridgeshire"}); state_cb.addItem({data:"Central", label:"Central"}); state_cb.addItem({data:"Cheshire", label:"Cheshire"}); state_cb.addItem({data:"Cleveland", label:"Cleveland"}); state_cb.addItem({data:"Clwyd", label:"Clwyd"}); state_cb.addItem({data:"Cornwall", label:"Cornwall"}); state_cb.addItem({data:"County Antrim", label:"County Antrim"}); state_cb.addItem({data:"County Armagh", label:"County Armagh"}); state_cb.addItem({data:"County Down", label:"County Down"}); state_cb.addItem({data:"Indiana", label:"Indiana"}); state_cb.addItem({data:"County Fermanagh", label:"County Fermanagh"}); state_cb.addItem({data:"County Londonderry", label:"County Londonderry"}); state_cb.addItem({data:"County Tyrone", label:"County Tyrone"}); state_cb.addItem({data:"Cumbria", label:"Cumbria"}); state_cb.addItem({data:"Derbyshire", label:"Derbyshire"}); state_cb.addItem({data:"Devon", label:"Devon"}); state_cb.addItem({data:"Dorset", label:"Dorset"}); state_cb.addItem({data:"Dumfries and Galloway", label:"Dumfries and Galloway"}); state_cb.addItem({data:"Durham", label:"Durham"}); state_cb.addItem({data:"Dyfed", label:"Dyfed"}); state_cb.addItem({data:"East Sussex", label:"East Sussex"}); state_cb.addItem({data:"Essex", label:"Essex"}); state_cb.addItem({data:"Fife", label:"Fife"}); state_cb.addItem({data:"Gloucestershire", label:"Gloucestershire"}); state_cb.addItem({data:"New Hampshire", label:"New Hampshire"}); state_cb.addItem({data:"Grampian", label:"Grampian"}); state_cb.addItem({data:"Greater Manchester", label:"Greater Manchester"}); state_cb.addItem({data:"Gwent", label:"Gwent"}); state_cb.addItem({data:"Gwynedd County", label:"Gwynedd County"}); state_cb.addItem({data:"Hampshire", label:"Hampshire"}); state_cb.addItem({data:"Herefordshire", label:"Herefordshire"}); state_cb.addItem({data:"Hertfordshire", label:"Hertfordshire"}); state_cb.addItem({data:"Highlands and Islands", label:"Highlands and Islands"}); state_cb.addItem({data:"Humberside", label:"Humberside"}); state_cb.addItem({data:"Isle of Wight", label:"Isle of Wight"}); state_cb.addItem({data:"Kent", label:"Kent"}); state_cb.addItem({data:"Lancashire", label:"Lancashire"}); state_cb.addItem({data:"Leicestershire", label:"Leicestershire"}); state_cb.addItem({data:"Lincolnshire", label:"Lincolnshire"}); state_cb.addItem({data:"Lothian", label:"Lothian"}); state_cb.addItem({data:"Merseyside", label:"Merseyside"}); state_cb.addItem({data:"Mid Glamorgan", label:"Mid Glamorgan"}); state_cb.addItem({data:"Norfolk", label:"Norfolk"}); state_cb.addItem({data:"North Yorkshire", label:"North Yorkshire"}); state_cb.addItem({data:"Northamptonshire", label:"Northamptonshire"}); state_cb.addItem({data:"Northumberland", label:"Northumberland"}); state_cb.addItem({data:"Nottinghamshire", label:"Nottinghamshire"}); state_cb.addItem({data:"Oxfordshire", label:"Oxfordshire"}); state_cb.addItem({data:"Powys", label:"Powys"}); state_cb.addItem({data:"Rutland", label:"Rutland"}); state_cb.addItem({data:"Shropshire", label:"Shropshire"}); state_cb.addItem({data:"Somerset", label:"Somerset"}); state_cb.addItem({data:"South Glamorgan", label:"South Glamorgan"}); state_cb.addItem({data:"South Yorkshire", label:"South Yorkshire"}); state_cb.addItem({data:"Staffordshire", label:"Staffordshire"}); state_cb.addItem({data:"Strathclyde", label:"Strathclyde"}); state_cb.addItem({data:"Suffolk", label:"Suffolk"}); state_cb.addItem({data:"Surrey", label:"Surrey"}); state_cb.addItem({data:"Tayside", label:"Tayside"}); state_cb.addItem({data:"Tyne and Wear", label:"Tyne and Wear"}); state_cb.addItem({data:"Warwickshire", label:"Warwickshire"}); state_cb.addItem({data:"West Glamorgan", label:"West Glamorgan"}); state_cb.addItem({data:"West Midlands", label:"West Midlands"}); state_cb.addItem({data:"West Sussex", label:"West Sussex"}); state_cb.addItem({data:"West Yorkshire", label:"West Yorkshire"}); state_cb.addItem({data:"Wiltshire", label:"Wiltshire"}); state_cb.addItem({data:"Worcestershire", label:"Worcestershire"}); // Add event listener and event handler function. var cbListener:Object = new Object(); cbListener.change = function(evt_obj:Object):Void { var currentlySelected:Object = evt_obj.target.selectedItem; //trace("data: " + currentlySelected.data); //trace("label: " + currentlySelected.label); }; state_cb.addEventListener("change",cbListener); If someone knows the answer to this i would really appreciate it. cheers Craig
  9. Hi Guys, Im not a PHP developer by far i mainly work with front end desgin but ive been editing some code on a website left by the previous web developer. What i have is a news editor in the admin section of a site which has Image Uploader - upload an image which works fine title - text input box which works fine image - javascript wysiwyg editor which doesnt work very well news - javascript wysiwyg editor which works fine ref - text input box which works fine. So what i would like to do is in the image part i want to display all the images in the uploaded image folder and then have checkboxes next to the images so that the user can select an image to use. Then when they have filled in all the other fields like Title, News, Ref etc for the image to also be added to the news item. My Code so far <?php require_once('../Connections/keylekkerland.php'); ?> <? //print_r($_POST); if($_POST["action"] == "Upload Image") { unset($imagename); if(!isset($_FILES) && isset($HTTP_POST_FILES)) $_FILES = $HTTP_POST_FILES; if(!isset($_FILES['image_file'])) $error["image_file"] = "An image was not found."; $imagename = basename($_FILES['image_file']['name']); //echo $imagename; if(empty($imagename)) $error["imagename"] = "The name of the image was not found."; if(empty($error)) { $newimage = "newsimages/" . $imagename; //echo $newimage; $result = @move_uploaded_file($_FILES['image_file']['tmp_name'], $newimage); if(empty($result)) $error["result"] = "There was an error moving the uploaded file."; } } ?> <?php //initialize the session if (!isset($_SESSION)) { session_start(); } // ** Logout the current user. ** $logoutAction = $_SERVER['PHP_SELF']."?doLogout=true"; if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")){ $logoutAction .="&". htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_GET['doLogout'])) &&($_GET['doLogout']=="true")){ //to fully log out a visitor we need to clear the session varialbles $_SESSION['MM_Username'] = NULL; $_SESSION['MM_UserGroup'] = NULL; $_SESSION['PrevUrl'] = NULL; unset($_SESSION['MM_Username']); unset($_SESSION['MM_UserGroup']); unset($_SESSION['PrevUrl']); $logoutGoTo = "../index.html"; if ($logoutGoTo) { header("Location: $logoutGoTo"); exit; } } ?> <?php if (!isset($_SESSION)) { session_start(); } $MM_authorizedUsers = ""; $MM_donotCheckaccess = "true"; // *** Restrict Access To Page: Grant or deny access to this page function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { // For security, start by assuming the visitor is NOT authorized. $isValid = False; // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. // Therefore, we know that a user is NOT logged in if that Session variable is blank. if (!empty($UserName)) { // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. // Parse the strings into arrays. $arrUsers = Explode(",", $strUsers); $arrGroups = Explode(",", $strGroups); if (in_array($UserName, $arrUsers)) { $isValid = true; } // Or, you may restrict access to only certain users based on their username. if (in_array($UserGroup, $arrGroups)) { $isValid = true; } if (($strUsers == "") && true) { $isValid = true; } } return $isValid; } $MM_restrictGoTo = "login.php"; if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) { $MM_qsChar = "?"; $MM_referrer = $_SERVER['PHP_SELF']; if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&"; if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) $MM_referrer .= "?" . $QUERY_STRING; $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer); header("Location: ". $MM_restrictGoTo); exit; } ?><?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']); } if ((isset($_GET['delete'])) && ($_GET['delete'] != "")) { $deleteSQL = sprintf("DELETE FROM News WHERE id=%s", GetSQLValueString($_GET['delete'], "text")); mysql_select_db($database, $keylekkerland); $Result1 = mysql_query($deleteSQL, $keylekkerland) or die(mysql_error()); } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $insertSQL = sprintf("INSERT INTO News (id, title, `image`, `news`, `ref`) VALUES (%s, %s, %s, %s, %s)", GetSQLValueString($_POST['hiddenField'], "date"), GetSQLValueString($_POST['Title'], "text"), GetSQLValueString($_POST['image'], "text"), GetSQLValueString($_POST['news'], "text"), GetSQLValueString($_POST['Reference'], "text")); mysql_select_db($database, $keylekkerland); $Result1 = mysql_query($insertSQL, $keylekkerland) or die(mysql_error()); } mysql_select_db($database, $keylekkerland); $query_News = "SELECT * FROM News"; $News = mysql_query($query_News, $keylekkerland) or die(mysql_error()); $row_News = mysql_fetch_assoc($News); $totalRows_News = mysql_num_rows($News); ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Key Lekkerland | Login</title> <link rel="shortcut icon" href="favicon.ico" > <link href="../css/main.css" rel="stylesheet" type="text/css" /> <script src="../css_browser_selector.js" type="text/javascript"></script> <script src="../Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <style type="text/css"> <!-- .style3 { font-size: 18px; font-weight: bold; color: #FF0000; } .style4 {font-family: Tahoma} .style5 {font-size: 16px} .style6 { font-family: Tahoma; font-size: 14px; color: #FF0000; font-weight: bold; } --> </style> <script type="text/javascript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <script language="JavaScript" type="text/javascript" src="wysiwyg.js"> </script> </head> <body onload="MM_preloadImages('../images/LOGOUTOVER.gif','../images/customer-login-over.gif','../images/not-yet-registered-over.gif')"> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#FFFFFF"><img src="../images/logo.gif" alt="lekkerland-logo" width="194" height="110" /> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','250','height','110','src','../flash/slogan','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','../flash/slogan' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="250" height="110"> <param name="movie" value="../flash/slogan.swf" /> <param name="quality" value="high" /> <embed src="../flash/slogan.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="250" height="110"></embed> </object> </noscript> </td> </tr> </table> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ED1B2F"> <tr> <td height="60"> </td> </tr> </table> <table width="1000" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF"> <tr> <td width="192" align="left" valign="top" bgcolor="#e0e1e3"><div id="left"> <ul> <li><a class="menu" href="../index.html">Home</a></li> <li><a class="menu" href="../news.php">News</a></li> <li><a class="menu" href="../wholesale-members.html">Wholesale Members</a></li> <li><a class="menu" href="../contact-us.html">Contact us</a></li> </ul> <div align="center"> <br /> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="top"><script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','179','height','329','title','Deals','src','../flash/lekkerland-deals','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','../flash/lekkerland-deals' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="179" height="329" title="Deals"> <param name="movie" value="../flash/lekkerland-deals.swf" /> <param name="quality" value="high" /> <embed src="../flash/lekkerland-deals.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="179" height="329"></embed> </object> </noscript></td> </tr> </table> </div> </div></td> <td align="left" valign="top" bgcolor="#FFFFFF"><div id="mid"><table width="95%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="10" height="35"> </td> <td align="left" valign="bottom"><a href="<?php echo $logoutAction ?>" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('LOGOUT','','../images/LOGOUTOVER.gif',1)"><img src="../images/LOGOUT.gif" alt="Logout" name="LOGOUT" width="61" height="25" border="0" id="LOGOUT" /></a></td> </tr> </table> <table width="95%" border="0" cellspacing="0" cellpadding="6"> <tr> <td><form method="POST" enctype="multipart/form-data" name="image_upload_form" action="<?$_SERVER["PHP_SELF"];?>"> <p>If you wish to use an image in your news item you can upload it here using the image uploader.</p> <p> <input type="file" name="image_file" size="20"> </p> <p><input type="submit" value="Upload Image" name="action"></p> </form> <? if(is_array($error)) { while(list($key, $val) = each($error)) { echo $val; echo "<br>\n"; } } ?></td> </tr> </table> <span class="style6">*Please make sure to fill in all Sections to add your news article.</span> <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>"> <table width="95%" border="0" cellspacing="4" cellpadding="0"> <tr> <td> </td> <td><input name="hiddenField" type="hidden" id="hiddenField" /></td> </tr> <tr> <td align="left" valign="top">Title:</td> <td><input name="Title" type="text" id="Title" size="50" /></td> </tr> <tr> <td align="left" valign="top">Image:</td> <td>Please note if you have uploaded a new image your image URL will be<br /> <span class="style5">http://www.tktest.co.uk/lekkerland/admin/newsimages/yourimagename</span><br /> And select Layout Align Left before inserting your image.<br /> <textarea name="image" id="image" cols="30" rows="2"></textarea></td> </tr> <tr> <td align="left" valign="top">News:</td> <td><textarea name="news" id="news" cols="30" rows="2"></textarea></td> </tr> <tr> <td align="left" valign="top">Reference:</td> <td><input name="Reference" type="text" id="Reference" size="50" /></td> </tr> <tr> <td> </td> <td><input type="submit" name="add" id="add" value="Add News" /> <span class="style4">* Remember only the top 4 News in the list are shown within the website...</span></td> </tr> </table> <br /> <input type="hidden" name="MM_insert" value="form1" /> </form> <script language="javascript1.2"> generate_wysiwyg('image'); generate_wysiwyg('news'); </script> </div> </div> </div></td> <td width="212" align="right" valign="top" bgcolor="#e0e1e3"><table border="0" cellspacing="0" cellpadding="0"> <tr> <td align="center" valign="top"><a href="http://web6.enable.com/keylekkerland/Login.aspx" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Customer Login','','../images/customer-login-over.gif',1)"><img src="../images/customer-login.gif" alt="Customer Login" name="Customer Login" border="0" id="Customer Login" /></a></td> </tr> <tr> <td align="center" valign="top"><a href="http://web6.enable.com/KeyLekkerland/Enquiry.aspx?PageID=136843&enqtype=Retail" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Not yet Registered?','','../images/not-yet-registered-over.gif',1)"><img src="../images/not-yet-registered.gif" alt="Not yet Registered?" name="Not yet Registered?" border="0" id="Not yet Registered?" /></a></td> </tr> </table></td> </tr> </table> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF"> <tr> <td height="1"></td> </tr> </table> <div id="footer"><br /> Copyright © Key Lekkerland 2008 - <a href="http://web6.enable.com/KeyLekkerland/Terms.aspx" class="botlinks">Terms and Conditions</a> - <a href="http://web6.enable.com/KeyLekkerland/Privacy.aspx" class="botlinks">Privacy</a> - <a href="http://www.tktest.co.uk/lekkerland/admin/login.php" class="botlinks">News Admin</a></div> </div> <!--end wrap--> <table width="100%" border="0" cellspacing="2" cellpadding="0"> <tr> <td bgcolor="#000000"><span class="style3">Timestamp</span></td> <td bgcolor="#000000"><span class="style3">Title</span></td> <td bgcolor="#000000"><span class="style3">Image </span></td> <td bgcolor="#000000"><span class="style3">News</span></td> <td bgcolor="#000000"><span class="style3">Reference</span></td> <td bgcolor="#000000"> </td> </tr> <?php do { ?> <tr> <td bgcolor="#E6F9FF"><?php echo $row_News['id']; ?></td> <td bgcolor="#E6F9FF"><?php echo $row_News['title']; ?></td> <td bgcolor="#E6F9FF"><?php echo $row_News['image']; ?></td> <td bgcolor="#E6F9FF"><?php echo $row_News['news']; ?></td> <td bgcolor="#E6F9FF"><?php echo $row_News['ref']; ?></td> <td bgcolor="#E6F9FF"><a href="edit.php?RecordID=<?php echo $row_News['id']; ?>">Edit</a> <a href="index.php?delete=<?php echo $row_News['id']; ?>">| Delete</a></td> </tr> <?php } while ($row_News = mysql_fetch_assoc($News)); ?> </table> </body> </html> <?php mysql_free_result($News); ?> Please can someone help??
×
×
  • 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.