PHP - Error Code Is Hanging
I'm in the mist of doing a login script for a new site. I have the script working, just as long as you get it right the first time, because after that, it seems to hang on the delay. Script is below
$("#login_button").click(function() { $.post("inc/login.php", $("#loginForm").serialize(), function(data) { var login = data.login; var message = data.message; if(login == true) { $("#login").empty().delay(5000).fadeOut('slow'); } if(login == false) { $("#login_window").css('visibility','hidden'); $("#message").css('visibility','visible').html(message); $("#message").delay(4000).queue(function() { $("#message").empty().css('visibility','hidden'); $("#login_window").css('visibility','visible'); }); } }, "json"); });Basically, its supposed to show the returned error message for 4 seconds, then show the login form again. I'm using a regular button, not the submit type button. I don't have any errors in firebug. Anyone have any ideas? (i know about show and hide, but those caused entirely to many problems). Edited by richei, 14 May 2014 - 11:54 PM. Similar TutorialsI'm writing a script to grab some info from a list of urls in the database, but it just continuously loads and doesn't display anything. Here's the script: <? $username="*****"; $password="*****"; $database="*****"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM dvds"; $result=mysql_query($query); $num=mysql_numrows($result); echo "<b><center>Database Output</center></b><br><br>"; $i=0; while ($i < $num) { $url=mysql_result($result,$i,"imdb_url"); echo "<b>Getting page: $url</b><br>"; //get the page content $imdb_content = get_data($url); //parse for movie details $name = get_match('/<title>(.*)<\/title>/isU',$imdb_content); $director = strip_tags(get_match('/<h5[^>]*>Director:<\/h5>(.*)<\/div>/isU',$imdb_content)); $plot = get_match('/<h5[^>]*>Plot:<\/h5>(.*)<\/div>/isU',$imdb_content); $release_date = get_match('/<h5[^>]*>Release Date:<\/h5>(.*)<\/div>/isU',$imdb_content); $mpaa = get_match('/<a href="\/mpaa">MPAA<\/a>:<\/h5>(.*)<\/div>/isU',$imdb_content); $run_time = get_match('/Runtime:<\/h5>(.*)<\/div>/isU',$imdb_content); //build content $content.= '<h2>Film</h2><p>'.$name.'</p>'; $content.= '<h2>Director</h2><p>'.$director.'</p>'; $content.= '<h2>Plot</h2><p>'.substr($plot,0,strpos($plot,'<a')).'</p>'; $content.= '<h2>Release Date</h2><p>'.substr($release_date,0,strpos($release_date,'<a')).'</p>'; $content.= '<h2>MPAA</h2><p>'.$mpaa.'</p>'; $content.= '<h2>Run Time</h2><p>'.$run_time.'</p>'; $content.= '<h2>Full Details</h2><p><a href="'.$url.'" rel="nofollow">'.$url.'</a></p>'; //display the content echo $content; $i++; } //gets the match content function get_match($regex,$content) { preg_match($regex,$content,$matches); return $matches[1]; } //gets the data from a URL function get_data($url) { $ch = curl_init(); $timeout = 5; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch,CURLOPT_RETURNTRANSFER,1); curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout); $data = curl_exec($ch); curl_close($ch); return $data; } ?> Hopefully someone better at php can tell me how to fix it! Thanks! I have a website for ordering business cards, and have encountered an error with either the HTML or PHP coding. The website has a form with several text boxes and drop-down menus to fill in the order form, and at the end after clicking the "submit" button, it generates an e-mail through a PHP script that sends the order form to the printer of the business cards. For some reason, whenever a user has a "job title" with the word "specialist" in it, the e-mail never gets sent. I removed all job titles from the one drop-down menu, to try and fix the problem, but now when users type "specialist" in the comments box at the bottom of the form, that blocks the e-mail from being sent as well. I have tried looking online for possible reasons why this one word would cause such a problem, but have not found the answer yet. Does anyone on this forum know why the word "specialist" would cause this issue, or know where I can look for a solution? If you can help me, that would be greatly appreciated. Thanks! I'm getting an error with this code:
<?php so I have been making a php chat service, and when i use this code:
Welcome <?php echo $_COOKIE["username"]; ?><br> chatroom: <?php echo $_COOKIE["chatroom"]; ?> <?php $phpfile=$_COOKIE["chatroom"]; $chpage = $phpfile .".php"; $chtext = $phpfile .".txt"; $filename = $_COOKIE["chatroom"] . ".txt"; $myfile = fopen($filename, "r") or die("Unable to open file!"); fopen($myfile); fclose($myfile); include $chtxt; ?> <form action="post.php" method="post"> message: <input type="text" name="msg"><br> <input type="submit"> </form>I get a 403 error. I does anyone know that is wrong with the code? there are more files that set the cookies but they work fine. I can't find anything wrong. please help. Fairly new to PHP and have the following code which should simply output into 3 columns - I have checked the query which does work - so I dont understand why I get this error mysql_fetch_array() expects parameter 1 to be resource,
// Create connection
// Check connection
$sql = “SELECT * FROM duration_matched WHERE groupm = '”.$coincidence ."’";
// set up loop counter
// start table and first tr ’;
while ($row=mysql_fetch_array($result)) {
’;
// always output the td
’;
// then close off the last row and the table ’ . $row[‘image’] . ‘ ’; $conn->close(); $bbreplace = array ( '/(\[[Bb]\])(.+)(\[\/[Bb]\])/', '/(\[[Ii]\])(.+)(\[\/[Ii]\])/', '/(\[[Uu]\])(.+)(\[\/[Uu]\])/', '/(\[[Ss]\])(.+)(\[\/[Ss]\])/', '/(\[url=http://)(.+)(\])(.+)(\[\/url\])/', '/(\[img\])(.+)(\[\/img\])/', '/(\[IMG\])(.+)(\[\/IMG\])/', '/(\[COLOR=)(.+)(\])(.+)(\[\/COLOR\])/', '/(\[color=)(.+)(\])(.+)(\[\/color\])/', '/(\[SIZE=)(.+)(\])(.+)(\[\/SIZE\])/', '/(\[size=)(.+)(\])(.+)(\[\/size\])/', '/(\[list\](.+)(\[\/list\])/', '/(\[list=1\](.+)(\[\/list\])/', '/(\[lLIST\](.+)(\[\/LIST\])/', '/(\[LIST=1\](.+)(\[\/LIST\])/', '/(\[*\](.+)/' ); $bbreplacements = array ( '<b>\\2</b>', '<i>\\2</i>', '<u>\\2</u>', '<s>\\2</s>', '<a href="\\2">\\4</a>', '<img src="\\2">', '<img src="\\2">', '<font color="\\2">\\4</font>', '<font color="\\2">\\4</font>', '<font size="\\2">\\4</font>', '<font size="\\2">\\4</font>', '<ul>\\2</ul>', '<ol>\\2</ol>', '<ul>\\2</ul>', '<ol>\\2</ol>', '<li>\\2</li>' ); $PostText = preg_replace($bbreplace, $bbreplacements, $PostText); This is what I have to do BB Codes so Far. Now when I go to view the thread I get: Warning: preg_replace() [function.preg-replace]: Compilation failed: missing ) at offset 25 in /home/rayth/public_html/forum/viewthread.php on line 95 Line 95: $PostText = preg_replace($bbreplace, $bbreplacements, $PostText); From testing I didn't get this error untill I added the tags Why doesn't this code work? I can't figure it out. Database information: DB: abelltx table: homework Fields in table: id, pid, uid, name, url, approved, comment, SubmissionTime <?PHP $link = mysql_connect('xxxxxx', 'xxxxx', 'xxxxxxx') or die(mysql_error()); mysql_select_db("abelltx", $link) or die(mysql_error()); $uid=abelltx $query = "SELECT DISTINCT name FROM homework ORDER BY id ASC"; $result = query_db($query); while ($myrow = mysql_fetch_array($result)) { echo $myrow[name].", "; } ?> I get the following error: "Parse error: syntax error, unexpected T_VARIABLE in D:\Hosting\5366560\html\test.php on line 6" I have a page that displayes a table from my database. What I'm attempting to do is create a page where you can delete rows of that table. I'm creating 3 pages 1( select the student or row to delete) 2( comfirm whether you want to delete that student) and 3( where the student has been deleted) I'm already having trouble with my first page. This is my code to select the row or student you want to delete: <?php Code: [Select] <?php include 'includes/config.php'; $delete_sql ="SELECT sno,cname, sname FROM student ORDER BY sno DESC"; $delete_query = mysql_query($delete_sql) or die(mysql_error()); $rsDelete = mysql_fetch_assoc($delete_query); ?> <html> <head> </head> <body> <p> select student to delete </p> <?php do {?> <p><a href="deletecomfirm.php?sno= <?php echo $rsDelete['sno']; ?>"> <?php echo $rsDelete['cname']; ?> by <?php echo $rsDelete['fname']; ?> </a> </p> <?php} while ($rsDelete = mysql_fetch_assoc($delete_query)) ?> </body> </html>?> I keep getting this error: Parse error: syntax error, unexpected $end in C:\Program Files\EasyPHP-5.3.3\www\Project\selectdelstudent.php on line 32 I'm assuming this error indicates an improper closing tag or something? Though I can't see my mistake. Also if you have any tips on improving my code feel free to comment Hi, I still a noob in PHP programming I hope somebody in the forum can help me and give an ideas how to fixed to this problem, everytime I run localhost this message appear: ErrorException in Builder.php line 1023:count(): Parameter must be an array or an object that implements CountableBut if I type localhost/(anycharacter) the page appear but with error 404(kindly refer to image, all other buttons are working except the one indicated with the arrow( kindly refer on the last image, note: app_debug set to true), this problem keeps bugging me for a few weeks now that I still cannot find a way to fixed it. Thank you in advance. )
Hey all, Basically I have this code which technically should work, but I have put an error in the logic somewhere and am really struggling to find it, I've been going over it for about an hour now :/ The error is that in the second part (// Enter them into the activities database if they're not already there), it won't enter them, and it won't show the word 'Randomevent1' either, so clearly somehow I have put in something to prevent it performing that step. Can anybody help me out? I'd be amazingly grateful, I have no clue how I've screwed it up. if(isset($_POST['submit'])){ $ownerid = $_SESSION['id']; // If completed = Y give an error $completeyn = "SELECT completed FROM activities WHERE playerno='$ownerid' AND activityno = '1'"; $completecheck=mysql_query($completeyn) or die(mysql_error()); while($row = mysql_fetch_array( $completecheck )) { if($row['completed'] == 'Y'){ echo 'Oops, you\'ve already done this twice today!';} else { // Enter them into the activities database if they're not already there $stepno2 = "SELECT playerno, timesdone FROM activities WHERE playerno='$ownerid' AND activityno = '1'"; $stepnoanswer2=mysql_query($stepno2) or die(mysql_error()); $num_rows2 = mysql_num_rows($stepnoanswer2); echo $num_rows2; if($num_rows2 == '0'){ $putintodb2 = mysql_query("INSERT INTO activities (playerno, activityno, timesdone) VALUES ('$ownerid', '1', '1')") or die("Error: ".mysql_error()); echo 'Randomevent1'; }else{ // If they are already there update their stepcount $updatestepcount2=("UPDATE activities SET timesdone=timesdone+'1' WHERE playerno='$ownerid' AND activityno = '1'"); $newstepcount2=mysql_query($updatestepcount2); echo 'Randomevent2';} // If this new stepcount is equal to 2, set completed to Y $checkstep = "SELECT timesdone FROM activities WHERE playerno='$ownerid' AND activityno = '1'"; $checkstepresult=mysql_query($checkstep) or die(mysql_error()); while($row = mysql_fetch_array( $checkstepresult )) { if($row['timesdone'] == '2'){ echo $row['timesdone']; $updatestepcount22=("UPDATE activities SET completed = 'Y' WHERE playerno='$ownerid' AND activityno = '1'"); $newstepcount22=mysql_query($updatestepcount22); } }}}} <?php ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); include 'helpers.php'; $foldername = uniqid(); $destination = "vierkant/$foldername"; $locatie = "circles/$foldername"; createDirectory($locatie); createDirectory($destination); $upload_files = []; for ($i = 0; $i < count($_FILES['file']['name']); $i++) { move_uploaded_file( $_FILES['file']['tmp_name'][$i], $destination . '/' . $_FILES['file']['name'][$i] ); $target_name = $_FILES['file']['name'][$i]; // Remove the extension and replace it with .png. imagepng(imagecreatefromstring(file_get_contents($_FILES["file"]["tmp_name"] )), "output.png"); // One method for this is to use the "explode" function with a dot as a delimiter. // variable we are going to split print_r (explode(".",$target_name)); // Then replace the last part with png and then stick the string back together with "implode" $upload_files[] = [ 'square' => $destination . '/' . $_FILES['file']['name'][$i], 'circle' => $locatie . '/' . $_FILES['file']['name'][$i], ]; } foreach ($upload_files as $loopdata) { print_r($loopdata['circle']); toCircle($loopdata['square'],$loopdata['circle'],'450'); }
I have to do this but i get this error: https://ibb.co/mFzxqXL can anyone help me? // Remove the extension and replace it with .png.
// variable we are going to split: // Then replace the last part with png and then stick the string back together with "implode" please can you help .. I'm passing a value from another page using $_SESSION and trying to then use it in a SELECT statement in SQL think I'm missing something ... if hard code the value it works , and I have also checked at the other end that the variable is being assigned ...
code is (its the = $_SESSION['g_district'] "); that's causing the issue
I'm getting Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /Applications/XAMPP/xamppfiles/htdocs/mytimekeeper/add/add.php on line 170 in the browser <div class="row s2 m2 l2"> <div> <label for="course_id">Choose the course raced:</label> <select name="course_id"> <?php // query to create course_id dropdown $resultset = $conn->query("SELECT `course_id`,`course_name` FROM `tbl_courses` WHERE `district`= $_SESSION['g_district'] "); while($row = $resultset->fetch_assoc()) { echo "<option value='{$row[course_id]}'>{$row['course_name']}</option>"; } ?> </select>
Hi, I wrote a simple code to check to see if the user filled in the name field, but when I uploaded the file, it just displays the code. here 's the code. Code: [Select] <!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>Untitled Document</title> </head> <body> <?php $errors=array(); if(isset($_POST['submit'])) { validate_input(); if(count($errors) !=0) { display_form(); } else { display_form(); } } function validate_input() { global $errors; if($_POST['name'] == " "){ $errors['name']="dipshit, put your name"; } ?> <form action="" method="post" name="test"> Name: <input name="name" type="text" size="10" maxlength="15" value="<?php echo $_POST[name]; ?>"/><br /> <?php echo $errors['name']; ?> <input name="submit" type="button" value="submit" /> </form> </body> </html> When I log in on my web-site it takes me to a php login-check page This is the error code that I am getting; Quote Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in D:\xampp\htdocs\login-check.php on line 26 This is the php code that i am using; Code: [Select] <?php $host="localhost"; // Host name $username="root"; // Mysql username $password=""; // Mysql password $db_name="deliverpizza"; // Database name $tbl_name="customer, admin, staff"; // Table name // Connect to server and select databse. mysql_connect("$host", "$username", "$password")or die("cannot connect"); mysql_select_db("$db_name")or die("cannot select DB"); // username and password sent from form $myusername=$_POST['myusername']; $mypassword=$_POST['mypassword']; // To protect MySQL injection (more detail about MySQL injection) $myusername = stripslashes($myusername); $mypassword = stripslashes($mypassword); $myusername = mysql_real_escape_string($myusername); $mypassword = mysql_real_escape_string($mypassword); $sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'"; $result=mysql_query($sql); // Mysql_num_row is counting table row $count=mysql_num_rows($result); // If result matched $myusername and $mypassword, table row must be 1 row if($count==1){ // Register $myusername, $mypassword and redirect to file "login_success.php" session_register("myusername"); session_register("mypassword"); header("location:login_privelage.php"); } else { } ?> i am trying to insert data into a database with the following code <?php $first_name=$_POST['first_name']; $middle_name=$_POST['middle_name']; $last_name=$_POST['last_name']; $gender=$_POST['gender']; $file_number=$_POST['file_number']; $character=$_POST['character']; $diagnosis=$_POST['diagnosis']; $description=$_POST['description']; $day = $_POST['day']; $month = $_POST['month']; $year = $_POST['year']; $date = date("Y-m-d", mktime(0,0,0,$month, $day, $year)); $con = mysql_connect("localhost","fathersh_search","f33321rh"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("fathersh_childsearch", $con); $sql="INSERT INTO child_info (first_name,middle_name,last_name,gender,birthdate,character,diagnosis,description,file_number) VALUES ('$_POST[first_name]','$_POST[middle_name]','$_POST[last_name]','$_POST[file_number]','$_POST[gender]','$date','$_POST[character]','$_POST[diagnosis]','$_POST[description]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con) ?> the error i get is Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'character,diagnosis,description,file_number) VALUES ('James','Anthony','Peters',' at line 1 Hi, I tried putting this Viglink code into my custom themes index.template.php on my SMF forum (I should do that right?) and I ended up with this error... Code: [Select] Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in .../Themes/androidrtk_rev4n/index.template.php on line 554 545: subMenusContainerId:\'admsubMenus\', 546: duration:\'150\' 547: }); 548: }); 549: } 550: </script> 551: 552: <script type="text/javascript"> 553: var vglnk = { api_url: '//api.viglink.com/api', 554: key: 'ad93febdf4e33c034d9635037b687fb3' }; 555: 556: (function(d, t) { 557: var s = d.createElement(t); s.type = 'text/javascript'; s.async = true; 558: s.src = ('https:' == document.location.protocol ? vglnk.api_url : I figured since it was a copy paste code that it would work just fine In any case, how can I fix this? Thanks in advance, Jimmy Hello, The below code works on my home machine.. but not on my Linux machine, I am unable to figure out the problem, please help Code: [Select] require_once("dbconnection.php"); function coun_list() { $rs=mysql_query("select name from timezones") or die(mysql_error()); while($row=mysql_fetch_row($rs)) { $tzone=$row[0]; if($tzone=='Asia/Calcutta') $tzone='Asia/Kolkata'; try { $tz = new DateTimeZone("$tzone"); $lt=$tz->getLocation(); $lat=$lt['latitude']; $lon=$lt['longitude']; echo "$tzone"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } } } coun_list(); I get the below error on my Linux machine, Code: [Select] Caught exception: DateTimeZone::__construct() [datetimezone.--construct]: Unknown or bad timezone () Please help me to figure out the issue.. I am writing a code using jquery in a php page to check the username availabiltiy,but getting error ie every time username is available is the message i am getting. the code is $(document).ready(function() { $("#username").blur(function() { //remove all the class add the messagebox classes and start fading $("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow"); //check the username exists or not from ajax //$.post("themes/user_availability.php",{ username:$(this).val() } ,function(data) $.post("themes/user_availability.php",{username:$(this).val() } ,function(data) { if(data=="no") //if username not avaiable { $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox { //add message and change the class of the box and start fading $(this).html('This User name Already exists').addClass('messageboxerror').fadeTo(900,1); }); } if(data=="yes") { $("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox { //add message and change the class of the box and start fading $(this).html('Username available to register').addClass('messageboxok').fadeTo(900,1); }); } }); }); }); php file user_availability.php <?php $login=$_POST['username']; $sql="select username from web_payregister where username='$login'"; $result=mysql_query($sql); if(mysql_num_rows($result)>0){ echo "no"; }else{ echo "yes"; } ?> Hi a get a server error with this code, this worked for awhile, now it doesn't work. I use the first part to extract the user name from the url. then parse it to the IF cookie function as a variable for the cookie name. The cookie is placed on another html page and i placed it like this: <script language="javascript"> document.cookie = "{PROFILE_USERNAME}= 1"; </script> // this code works perfectly i used php to parser the variable to the javascript function, when i check the browser for cookies, it is placed correctly. this code i use to check the cookie's name to see if it exists. the variable below is taken from the url, and matches the username above, but when i execute the code i get this error: Illegal variable _files or _env or _get or _post or _cookie or _server or _session or globals passed to script. can anyone see the problem? <?php $url = $_SERVER['SCRIPT_FILENAME']; $newurl = explode("/", $url); $profmanager=$newurl[6]; $cook= $profmanager; if(!isset($_COOKIE['$cook'])) { $url2 = $_SERVER['HTTP_HOST']; $myurls = 'http://'.$url2.'/'; echo "<META HTTP-EQUIV=Refresh CONTENT=\"0;URL=$myurls\">"; } else { my page code here }?> // to note when i echo the $newurl[6] it does equal the username. the first code in on a html page/the javascript above, // the second code piece is AT THE TOP of a php page. // if there is a better way, liike matching values instead of the cookie name, i would be keen to see it in action. When clicking on the link "groups", there is no problem printing out the first level subgroups. But when clicking on any of the subgroup, the second level subgroups are not being displayed. I have or die(mysql_error()); after some queries but I can not see what is the error. It always gives the same message: Quote No Products Found. Sorry, but there are no products in this section at the moment. The products are constantly being updated, however. Please try again later or contact us. How would I find out which part of the code fails? The code: <?php include 'scrptz/functions.php'; // Page vars $thisPage=$getVars["page"]; if($thisPage<1)$thisPage=1; $firstGroup=($thisPage*16)-16; // Get group details and stick them into an array $qMain="SELECT * FROM PGroups WHERE PG = '".$getVars["prodg"]."'"; $result=mysql_query($qMain) or die(mysql_error()); $groupDetails=mysql_fetch_array($result); // Get all sub groups in current product group $qMain="SELECT * FROM SubG WHERE ProdG = '".$getVars["prodg"]."'"; $result=mysql_query($qMain) or die(mysql_error()); // Stick sub groups in a 2D associative array $j=0; while ($row=mysql_fetch_array($result)) { foreach($row as $i=>$data)$array[$j][$i]=$data; $j++; } // Calculate vars for navigation $totalGroups=$j; $totalPages=ceil($totalGroups/16); // Set page title (for bookmark) $pageTitle=$groupDetails["GPname"]; // Set top title if($totalGroups>0){$topTitle="VIEW PRODUCTS";}else{$topTitle="ERROR";} ?> <html> <head> <title>Lock-Tech® Hi-Specification Architectural Hardware</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="scrptz/styles.css" rel="stylesheet" type="text/css"> <script language="JavaScript" type="text/javascript">var theID="<?php echo $getVars['uid']; ?>";</script> <script language="JavaScript" src="scrptz/content.js" type="text/javascript"></script> <script language="JavaScript" src="scrptz/menu.js" type="text/javascript"></script> <script language="JavaScript" src="scrptz/scripts.js" type="text/javascript"></script> </head> <body background="imgz/bg.gif" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0"<?php echo $notify ?>> <?php include("top.php"); ?> <table width="952" height="509" border="0" cellpadding="0" cellspacing="0" class="maintext"> <?php if($sessions['accCode']){?><form action="http://www.lock-tech.co.uk/index.php" method="post" name="logout" target="_parent"><input name="account" type="hidden" value="<?php echo $sessions['accCode']; ?>"><input name="killSession" type="hidden" value="<?php echo $getVars['uid']; ?>"></form><?php }?> <tr> <td width="1" rowspan="5" bgcolor="#000000"></td> <td height="21" background="imgz/topbar.gif" bgcolor="#14359E"> </td> <td height="21" colspan="5" valign="middle" background="imgz/topbar.gif" bgcolor="#14359E" class="mainyellow"><?php include("scrptz/dd_menu.php"); ?></td> <td height="21" background="imgz/topbar.gif" bgcolor="#14359E"> </td> <td width="1" rowspan="5" bgcolor="#000000"></td> </tr> <tr> <td width="5" rowspan="3"> </td> <td width="306" height="30" valign="bottom" class="title2"><?php echo $groupDetails["GPname"] ?></td> <td width="11" rowspan="3"><img src="imgz/maindiv.gif" width="11" height="466"></td> <td width="306" height="30" align="center" valign="bottom" class="title2"><?php if($totalGroups>0){?><a href="g_view.php?pgroup=<?php echo $groupDetails["PG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link4" onmouseover="window.status='View List of all Products in <?php echo $groupDetails["GPname"] ?>'; return true">VIEW ALL</a> | <a href="g_browse.php?pgroup=<?php echo $groupDetails["PG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link4" onmouseover="window.status='Browse all Products in <?php echo $groupDetails["GPname"] ?>'; return true">BROWSE ALL</a><?php }?></td> <td width="11" rowspan="3"><img src="imgz/maindiv.gif" width="11" height="466"></td> <td width="306" height="30" align="center" valign="bottom"> </td> <td width="5" rowspan="3"> </td> </tr> <tr> <td height="20" valign="top" class="mainbold"></td> <td width="306" rowspan="2" valign="top" class="maintext"> <?php for($i=$firstGroup; $i<($firstGroup+8) && $i<$totalGroups; $i++){?> <a href="sub.php?PSubG=<?php echo $array[$i]["SPG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link1" onmouseover="window.status='View Products in <?php echo $array[$i]["SPGname"] ?>'; return true"><?php echo $array[$i]["SPGname"] ?></a><br> <?php // Get all subsubs in current sub group $qMain="SELECT * FROM SubSubG WHERE SPG = '".$array[$i]["SPG"]."'"; $result=mysql_query($qMain) or die(mysql_error()); // Print subsubs while ($row=mysql_fetch_array($result)) { ?> [<a href="subsub.php?PSubSubG=<?php echo $row["SSPG"]?>&uid=<?php echo $getVars['uid']; ?>" class="link3" onmouseover="window.status='View Products in <?php echo $row["SSPGName"]?>'; return true"><?php echo $row["SSPGName"]?></a>] <?php } ?> <br><br> <?php }?></td> <td width="306" rowspan="2" valign="top" class="maintext"> <?php for($i=$firstGroup+8; $i<($firstGroup+16) && $i<$totalGroups; $i++){ ?> <a href="sub.php?PSubG=<?php echo $array[$i]["SPG"] ?>&uid=<?php echo $getVars['uid']; ?>" class="link1" onmouseover="window.status='View Products in <?php echo $array[$i]["SPGname"] ?>'; return true"><?php echo $array[$i]["SPGname"] ?></a><br> <?php // Get all subsubs in current sub group $qMain="SELECT * FROM SubSubG WHERE SPG = '".$array[$i]["SPG"]."'"; $result=mysql_query($qMain) or die("<font color=\"#FF0000\">ERROR {9.4}! Please navigate to a <a href=\"main.php?uid=".$getVars['uid']."\">different page</a> and then try this page again.</font>"); // Print subsubs while ($row=mysql_fetch_array($result)) { ?> [<a href="subsub.php?PSubSubG=<?php echo $row["SSPG"]?>&uid=<?php echo $getVars['uid']; ?>" class="link3" onmouseover="window.status='View Products in <?php echo $row["SSPGName"]?>'; return true"><?php echo $row["SSPGName"]?></a>] <?php } ?> <br><br> <?php }?></td> </tr> <tr> <td height="416" valign="top" class="mainbold"> <?php if($totalGroups>0) { ?> <img src="grp_pics/<?php echo $groupDetails["PG"] ?>.jpg" alt="Group Picture" galleryimg="no"><br><img src="imgz/pixel.gif" width="306" height="5"><br> <?php echo $groupDetails["GPText"] ?><?php } else { ?> or die(mysql_error()); <p class="noresult">No Products Found.</p><p class="mainbold">Sorry, but there are no products in this section at the moment. The products are constantly being updated, however. Please try again later or <a href="mailto:sales@lock-tech.co.uk" class="link1" onmouseover="window.status='Send us an Email.'; return true">contact us</a>.</p><?php }?></td> </tr> <tr> <td width="5" height="22" background="imgz/btmbar.gif" bgcolor="#14359E"> </td> <td width="306" height="22" align="center" valign="top" background="imgz/btmbar.gif" bgcolor="#14359E"><a href="javascript:history.back()" onmouseover="prev_btn.src='imgz/prev2.gif';window.status='Previous Page'; return true" onmouseout="prev_btn.src='imgz/prev.gif'"><img name="prev_btn" src="imgz/prev.gif" width="124" height="16" border="0"></a></td> <td width="11" height="22" bgcolor="#14359E"><img src="imgz/btmdiv.gif" width="11" height="22"></td> <td width="306" height="22" align="center" background="imgz/btmbar.gif" bgcolor="#14359E" class="nav"><? include 'scrptz/nav.php' ?></td> <td width="11" height="22" bgcolor="#14359E"><img src="imgz/btmdiv.gif" width="11" height="22"></td> <td width="306" height="22" align="center" valign="top" background="imgz/btmbar.gif" bgcolor="#14359E"><a href="javascript:directLink('<?php echo $prodLink; ?>','<? echo $pageTitle ?>')" onmouseover="link_btn.src='imgz/link2.gif'; window.status='Direct Link to This Page'; return true" onmouseout="link_btn.src='imgz/link.gif'"><img name="link_btn" src="imgz/link.gif" alt="" width="182" height="16" border="0"></a></td> <td width="5" height="22" background="imgz/btmbar.gif" bgcolor="#14359E"> </td> </tr> </table> </body> </html> |