Jump to content

avl8386

Members
  • Posts

    11
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

avl8386's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. it is working fine on my testing server just not on my web server when i upload it. Is there something on a server that could keep it from working?? I use wampserver locally as a test server
  2. For some reason my script is putting nothing but | marks in the data file and no info in the email. Anyone see problems? this is process.php <?php $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/")); $message=" Customer Move Estimate Request From Hawkeyemover.com First Name- ".$firstname." Last Name- ".$lastname." Home phone- ".$homephone." Cell Phone- ".$cellphone." Email Add- ".$email." Best way to contact- ".$bestcontact." Move Being paid for by- ".$movepay." Customer moving from- ".$origcity." Lives in a- ".$movefrom." There are (".$origfloors.") floors (including basment) Customer lives on the (".$origmulti.") floor (if multi level building) Elevator- ".$origelev." Packing services- ".$origpack." Destination Info Customer Moving to- ".$destcity." Moving into a- ".$moveto." There are (".$destfloors.") floors (including basment) Customer lives on the (".$destmulti.") floor (if multi level building) Dest Elevator- ".$destelev." Unpacking- ".$destpack." Estimated Move Date-".$movedate." Additional Comments- ".$addinfo." Were referrd to us by-".$refer." "; $message = stripslashes($message); mail("avl8386@gmail.com"," Online Estimate Request From HawkeyeMover.com",$message,"From: HawkeyeMover.com"); $make=fopen("estimatedata.txt","a"); $to_put=""; $to_put .= $firstname."|".$lastname."|".$homephone."|".$cellphone."|".$email."|".$bestcontact."|".$movepay."|".$origcity."|".$movefrom."|".$origfloors."|".$origmulti."|".$origelev."|".$origpack."|".$destcity."|".$moveto."|".$destfloors."|".$destmulti."|".$destelev."|".$destpack."|".$movedate."|".$addinfo." "; fwrite($make,$to_put); ?> this is the html file <Form name="estimate" action="processestimate.php" method="post"> <table width="479" height="814" border="0" align="center"> <tr> <td colspan="3"><strong>Customer Information</strong></td> </tr> <tr> <td width="94" align="right" valign="top" class="style4"> </td> <td width="184" align="right" valign="top"><span class="style4">First Name:</span></td> <td width="179" align="left" valign="top"><span class="style3"> <input name="firstname" type="text" id="firstname" /> </span></td> </tr> <tr> <td height="23" align="right" valign="top" class="style4"><p class="style3"> </p> </td> <td align="right" valign="top"><span class="style3">Last Name:</span></td> <td align="left" valign="top"><span class="style3"> <input name="lastname" type="text" id="lastname" /> </span></td> </tr> <tr> <td height="30" align="right" valign="top" class="style4"> </td> <td align="right" valign="top"><span class="style4"><span class="style3">Home Phone:</span></span></td> <td align="left" valign="top"><input name="homephone" type="text" id="homephone"></td> </tr> <tr> <td align="right" valign="top" class="style4"> </td> <td align="right" valign="top"><span class="style4"><span class="style3">Cell Phone:</span></span></td> <td align="left" valign="top"><span class="style3"> <input name="cellphone" type="text" id="cellphone" /> </span></td> </tr> <tr> <td align="right" valign="top" class="style4"> </td> <td align="right" valign="top"><span class="style4"><span class="style3">Email:</span></span></td> <td align="left" valign="top"><span class="style3"> <input name="email" type="text" id="email" /> </span></td> </tr> <tr> <td colspan="2" align="right" valign="top" class="style4">The Best Way To Contact Me Is:</td> <td align="left" valign="top"><span class="style3"> <select name="bestcontact" size="1" id="bestcontact"> <option value="none" selected="selected">Please Select</option> <option value="Home Phone">Home Phone</option> <option value="Cell Phone">Cell Phone</option> <option value="Email">Email</option> </select> </span></td> </tr> <tr> <td colspan="2" align="right" valign="top"> </td> <td align="left" valign="top"> </td> </tr> <tr> <td colspan="3" align="left" valign="top"><strong>Origin Information</strong></td> </tr> <tr> <td colspan="2" align="right" valign="top" class="style4">Origin City And State:</td> <td align="left" valign="top"><span class="style3"> <input name="origcity" type="text" id="origcity" /> </span></td> </tr> <tr> <td colspan="2" align="right" valign="top" class="style4">I Am Moving From A:</td> <td align="left" valign="top"><span class="style3"> <select name="movefrom" size="1" id="movefrom"> <option value="none" selected="selected">Please Select</option> <option value="House">House</option> <option value="Condo">Condo</option> <option value="Apartment">Apartment</option> <option value="Storage Unit">Storage Unit</option> <option value="Office">Office</option> </select> </span></td> </tr> <tr> <td colspan="2" align="right" valign="top" class="style4"># of floors (including basement):</td> <td align="left" valign="top"><input name="origfloors" type="text" id="origfloors" /></td> </tr> <tr> <td colspan="2" align="right" valign="top" class="style4">If Apartment/Condo what floor(s) are you on?:</td> <td align="left" valign="top"><input name="origmulti" type="text" id="origmulti" /></td> </tr> <tr> <td colspan="2" align="right" valign="top" class="style4">Is There An Elevator?:</td> <td align="left" valign="top"><select name="origelev" size="1" id="origelev"> <option value="No" selected>No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">Do You Need Packing Services?:</td> <td align="left" valign="top"><select name="origpack" size="1" id="origpack"> <option value="No" selected="selected">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td height="25" colspan="3" align="left" valign="top"><strong>Destination Info</strong></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">Destination City And State:</td> <td align="left" valign="top"><span class="style3"> <input name="destcity" type="text" id="destcity" /> </span></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">I Am Moving Into A:</td> <td align="left" valign="top"><span class="style3"> <select name="moveto" size="1" id="moveto"> <option value="none" selected="selected">Please Select</option> <option value="House">House</option> <option value="Condo">Condo</option> <option value="Apartment">Apartment</option> <option value="Storage Unit">Storage Unit</option> <option value="Office">Office</option> </select> </span></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4"># of floors (including basement):</td> <td align="left" valign="top"><input name="destfloors" type="text" id="destfloors" /></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">If Apartment/Condo what floor(s) are you on?:</td> <td align="left" valign="top"><input name="destmulti" type="text" id="destmulti" /></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">Is There An Elevator?:</td> <td align="left" valign="top"><select name="destelev" size="1" id="destelev"> <option value="No" selected="selected">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">Do You Need Unpacking Services?:</td> <td align="left" valign="top"><select name="destpack" size="1" id="destpack"> <option value="No" selected="selected">No</option> <option value="Yes">Yes</option> </select></td> </tr> <tr class="style4"> <td height="25" colspan="3" align="left" valign="top"><strong>Additional Information</strong></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">Approximate Move Date</td> <td align="left" valign="top"><input name="movedate" type="text" id="movedate" /></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">My Move Is Being Paid For By:</td> <td align="left" valign="top"><span class="style3"> <select name="movepay" size="1" id="movepay"> <option value="none" selected="selected">Please Select</option> <option value="Myself">Myself</option> <option value="Mycompany">My Company</option> <option value="Other">Other</option> </select> </span></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4"><p>Additional Info</p> <p>(concerns, special care items, questions, comments):</p></td> <td align="left" valign="top"><textarea cols="20" rows="8" name="addinfo" wrap="virtual" type="text" id="addinfo"></textarea></td> </tr> <tr> <td height="25" colspan="2" align="right" valign="top" class="style4">How were you referred to our site?:</td> <td align="left" valign="top"><span class="style3"> <select name="refer" size="1" id="refer"> <option value="none" selected="selected">Please Select</option> <option value="Search Engine">Search Engine</option> <option value="Previous Move">Previous Move</option> <option value="Friend">Friend</option> <option value="Other">Other</option> </select> </span></td> </tr> <tr> <td colspan="3" align="center" valign="top"><input type="submit" name="Submit" value="Submit"></td> </tr> </table> </Form>
  3. GOT IT WORKING!! THANKS JEREMY!! $query = "SELECT id FROM " . $DBPrefix . "users WHERE groups"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $groups = array(); $aGroup = ''; while ($row = mysql_fetch_assoc($res)) { $groups[] = $row['id']; $aGroup = $_POST['userType'];}
  4. I did find spelling and capitalization errors in my code but that still didn't help
  5. Ok i made changes like so to register.php I cut out the $query = "SELECT id FROM" . $DBPREFIX . "groups WHERE auto join == 1" Correct?? and added what you told me to $aGroup = ''; while ($row = mysql_fetch_assoc($res)) { $groups[] = $row['id']; } //will search through groups and see if it finds a match w/ p foreach ($groups as $value) { if (strcasecmp ($value , $_POST['userTtpe'] ) == 0) { $agroup = $_POST['userType']; } } $hash = get_hash(); $query = "INSERT INTO " . $DBPrefix . "users (nick, password, hash, name, address, city, prov, country, zip, phone, nletter, email, reg_date, birthdate, suspended, language, groups, balance, timecorrection) VALUES ('" . $system->cleanvars($TPL_nick_hidden) . "', '" . md5($MD5_PREFIX . $TPL_password_hidden) . "', '" . $hash . "', '" . $system->cleanvars($TPL_name_hidden) . "', '" . $system->cleanvars($_POST['TPL_address']) . "', '" . $system->cleanvars($_POST['TPL_city']) . "', '" . $system->cleanvars($_POST['TPL_prov']) . "', '" . $system->cleanvars($_POST['TPL_country']) . "', '" . $system->cleanvars($_POST['TPL_zip']) . "', '" . $system->cleanvars($_POST['TPL_phone']) . "', '" . $system->cleanvars($_POST['TPL_nletter']) . "', '" . $system->cleanvars($_POST['TPL_email']) . "', '" . time() . "', '" . ((!empty($DATE)) ? $DATE : 0) . "', '" . $SUSPENDED . "', '" . $language . "', '" . $agroup . "', '" . $balance . "', " . $system->SETTINGS['timecorrection'] . ")"; And my register.tpl is <td width="60%"><select name="userType"> <option value="1">Seller</option> <option value="2">Buyer</option> </select> (please select whether you want to be a buyer or seller)</td> </tr> It is not posting anything to the database. in the bottom of register.php there is this code that ?? assign template arrays ??. Do i need to add userType to this somewhere?? $template->assign_vars(array( 'L_ERROR' => $TPL_errmsg, 'L_COUNTRIES' => $country, 'L_ACCEPTANCE' => nl2br(stripslashes($system->SETTINGS['acceptancetext'])), 'L_DATEFORMAT' => ($system->SETTINGS['datesformat'] == 'USA') ? $dobmonth . ' ' . $dobday : $dobday . ' ' . $dobmonth, 'L_MESSAGE' => (isset($TPL_message)) ? $TPL_message : '', 'B_ERRORMSG' => ($TPL_err == 1), 'B_ADMINAPROVE' => ($system->SETTINGS['activationtype'] == 0), 'B_NLETTER' => ($system->SETTINGS['newsletter'] == 1), 'B_SHOWACCEPTANCE' => ($system->SETTINGS['showacceptancetext'] == 1), 'B_FIRST' => $first, 'CAPTCHATYPE' => $system->SETTINGS['spam_register'], 'CAPCHA' => ($system->SETTINGS['spam_register'] == 2) ? recaptcha_get_html($system->SETTINGS['recaptcha_public']) : $spam_html, 'BIRTHDATE' => ($DISPLAYED_FIELDS['birthdate_regshow'] == 1), 'ADDRESS' => ($DISPLAYED_FIELDS['address_regshow'] == 1), 'CITY' => ($DISPLAYED_FIELDS['city_regshow'] == 1), 'PROV' => ($DISPLAYED_FIELDS['prov_regshow'] == 1), 'COUNTRY' => ($DISPLAYED_FIELDS['country_regshow'] == 1), 'ZIP' => ($DISPLAYED_FIELDS['zip_regshow'] == 1), 'TEL' => ($DISPLAYED_FIELDS['tel_regshow'] == 1), 'REQUIRED' => array( ($MANDATORY_FIELDS['birthdate'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['address'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['city'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['prov'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['country'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['zip'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['tel'] == 'y') ? ' *' : '' ), 'V_YNEWSL' => ((isset($_POST['TPL_nletter']) && $_POST['TPL_nletter'] == 1) || !isset($_POST['TPL_nletter'])) ? 'checked=true' : '', 'V_NNEWSL' => (isset($_POST['TPL_nletter']) && $_POST['TPL_nletter'] == 2) ? 'checked=true' : '', 'V_YNAME' => (isset($_POST['TPL_name'])) ? $_POST['TPL_name'] : '', 'V_UNAME' => (isset($_POST['TPL_nick'])) ? $_POST['TPL_nick'] : '', 'V_EMAIL' => (isset($_POST['TPL_email'])) ? $_POST['TPL_email'] : '', 'V_YEAR' => (isset($_POST['TPL_year'])) ? $_POST['TPL_year'] : '', 'V_ADDRE' => (isset($_POST['TPL_address'])) ? $_POST['TPL_address'] : '', 'V_CITY' => (isset($_POST['TPL_city'])) ? $_POST['TPL_city'] : '', 'V_PROV' => (isset($_POST['TPL_prov'])) ? $_POST['TPL_prov'] : '', 'V_POSTCODE' => (isset($_POST['TPL_zip'])) ? $_POST['TPL_zip'] : '', 'V_PHONE' => (isset($_POST['TPL_phone'])) ? $_POST['TPL_phone'] : '' ));
  6. In the code it resizes a thumbnail to 120x120 and saves it. I need it to resize the original image to 640x427 before it saves it also. Can anyone help?? <?php include 'includes/common.inc.php'; if (!$user->logged_in) { //if your not logged in you shouldn't be here header("location: user_login.php"); exit; } $cropdefault = false; $width = $system->SETTINGS['thumb_show']; $height = $width / 1.2; function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale) { list($imagewidth, $imageheight, $imageType) = getimagesize($image); $imageType = image_type_to_mime_type($imageType); // some error checks $start_width = ($start_width < 0) ? 0 : $start_width; $start_height = ($start_height < 0) ? 0 : $start_height; $width = ($imagewidth < $width) ? $imagewidth : $width; $height = ($imageheight < $height) ? $imageheight : $height; if (($width + $start_width) > $imagewidth) { $start_width = $imagewidth - $width; } if (($height + $start_height) > $imageheight) { $start_height = $imageheight - $height; } $newImageWidth = ceil($width * $scale); $newImageHeight = ceil($height * $scale); $newImage = imagecreatetruecolor($newImageWidth, $newImageHeight); switch ($imageType) { case 'image/gif': $source = imagecreatefromgif ($image); break; case 'image/pjpeg': case 'image/jpeg': case 'image/jpg': $source = imagecreatefromjpeg($image); break; case 'image/png': case 'image/x-png': $source = imagecreatefrompng($image); break; } imagecopyresampled($newImage, $source, 0, 0, $start_width, $start_height, $newImageWidth, $newImageHeight, $width, $height); switch ($imageType) { case 'image/gif': imagegif ($newImage, $thumb_image_name); break; case 'image/pjpeg': case 'image/jpeg': case 'image/jpg': imagejpeg($newImage, $thumb_image_name, 90); break; case 'image/png': case 'image/x-png': imagepng($newImage, $thumb_image_name); break; } chmod($thumb_image_name, 0777); return $thumb_image_name; } // Process delete if ($_GET['action'] == 'delete' && isset($_GET['img'])) { if ($_SESSION['SELL_pict_url_temp'] == $_SESSION['UPLOADED_PICTURES'][intval($_GET['img'])]) { unlink($upload_path . session_id() . '/' . $_SESSION['SELL_pict_url']); unset($_SESSION['SELL_pict_url']); } unlink($upload_path . session_id() . '/' . $_SESSION['UPLOADED_PICTURES'][intval($_GET['img'])]); unset($_SESSION['UPLOADED_PICTURES'][intval($_GET['img'])]); unset($_SESSION['UPLOADED_PICTURES_SIZE'][intval($_GET['img'])]); } if ($_GET['action'] == 'makedefault') { $cropdefault = true; $image = $_GET['img']; } if ($_GET['action'] == 'crop' && !empty($_POST['w'])) { if ($_POST['upload_thumbnail'] == $MSG['616']) { // Get the new coordinates to crop the image. $x1 = intval($_POST['x1']); $y1 = intval($_POST['y1']); $x2 = intval($_POST['x2']); $y2 = intval($_POST['y2']); $w = intval($_POST['w']); $h = intval($_POST['h']); // Scale the image to the thumb_width set above $scale = $width / $w; $large_image_location = $upload_path . session_id() . '/' . $_GET['img']; $thumb_image_location = $upload_path . session_id() . '/thumb-' . $_GET['img']; $cropped = resizeThumbnailImage($thumb_image_location, $large_image_location, $w, $h, $x1, $y1, $scale); $_SESSION['SELL_pict_url'] = 'thumb-' . $_GET['img']; $_SESSION['SELL_pict_url_temp'] = $_GET['img']; } else { $_SESSION['SELL_pict_url_temp'] = $_SESSION['SELL_pict_url'] = $_GET['img']; } } // close window if (!empty($_POST['creategallery'])) { $_SESSION['GALLERY_UPDATED'] = true; print '<script type="text/javascript">window.close()</script>'; exit; } // PROCESS UPLOADED FILE if ($_POST['uploadpicture'] == $MSG['681']) { if (!empty($_FILES['userfile']['tmp_name']) && $_FILES['userfile']['tmp_name'] != 'none') { if (!isset($_SESSION['UPLOADED_PICTURES']) || !is_array($_SESSION['UPLOADED_PICTURES'])) $_SESSION['UPLOADED_PICTURES'] = array(); if (!isset($_SESSION['UPLOADED_PICTURES_SIZE']) || !is_array($_SESSION['UPLOADED_PICTURES_SIZE'])) $_SESSION['UPLOADED_PICTURES_SIZE'] = array(); $filename = $_FILES['userfile']['name']; $nameparts = explode('.', $filename); $file_ext = $nameparts[count($nameparts) - 1]; $file_types = array('gif', 'jpg', 'jpeg', 'png', 'GIF', 'JPG', 'JPEG', 'PNG'); if ($_FILES['userfile']['size'] > $system->SETTINGS['maxuploadsize']) { $ERR = $ERR_709 . ' ' . ($system->SETTINGS['maxuploadsize'] / 1024) . ' ' . $MSG['672']; } elseif (!in_array($file_ext, $file_types)) { $ERR = $ERR_710 . ' (' . $file_ext . ')'; } elseif (in_array($_FILES['userfile']['name'], $_SESSION['UPLOADED_PICTURES'])) { $ERR = $MGS_2__0054 . ' (' . $_FILES['userfile']['name'] . ')'; } else { // Create a TMP directory for this session (if not already created) if (!file_exists($upload_path . session_id())) { umask(0); mkdir($upload_path . session_id(), 0777); chmod($upload_path . session_id(), 0777); //incase mkdir fails } // Move uploaded file into TMP directory & rename $replace = array('.', ' ', ','); // clean the file $newname = str_replace('.' . $file_ext, '', $filename); $newname = str_replace($replace, '_', $newname) . '.' . $file_ext; if ($system->move_file($_FILES['userfile']['tmp_name'], $upload_path . session_id() . '/' . $newname)) { // Populate arrays array_push($_SESSION['UPLOADED_PICTURES'], $newname); $fname = $upload_path . session_id() . '/' . $newname; array_push($_SESSION['UPLOADED_PICTURES_SIZE'], filesize($fname)); if (count($_SESSION['UPLOADED_PICTURES']) == 1) { $cropdefault = true; $image = $newname; } } } } } if ($cropdefault) { list($imgwidth, $imgheight) = getimagesize($upload_path . session_id() . '/' . $image); $swidth = ($imgwidth < 380) ? '' : ' width: 380px;'; $imgratio = ($imgwidth > 380) ? $imgwidth / 380 : 1; $startX = $imgwidth; $startY = $imgheight; if ($imgwidth > $imgheight) { $ratio = '1.2:1'; $thumbwh = 'width:' . $width . '; height:' . $height . ';'; $scaleX = 120; $scaleY = 100; $startX = $startY * 1.2; } else { $ratio = '1:1.2'; $thumbwh = 'height:' . $width . '; width:' . $height . ';'; $scaleX = 100; $scaleY = 120; $startY = $startX * 1.2; } $template->assign_vars(array( 'RATIO' => $ratio, 'THUMBWH' => $thumbwh, 'SCALEX' => $scaleX, 'SCALEY' => $scaleY, 'IMGRATIO' => $imgratio, 'SWIDTH' => $swidth, 'IMGWIDTH' => $imgwidth, 'IMGHEIGHT' => $imgheight, 'IMGPATH' => $uploaded_path . session_id() . '/' . $image, 'STARTX' => $startX, 'STARTY' => $startY, 'IMAGE' => $image )); } else { $template->assign_vars(array( 'MAXIMAGES' => $system->SETTINGS['maxpictures'], 'ERROR' => (isset($ERR)) ? $ERR : '', 'B_CANUPLOAD' => (!isset($_SESSION['UPLOADED_PICTURES']) || count($_SESSION['UPLOADED_PICTURES']) < $system->SETTINGS['maxpictures']) )); } foreach ($_SESSION['UPLOADED_PICTURES'] as $k => $v) { $template->assign_block_vars('images', array( 'IMGNAME' => $v, 'IMGSIZE' => $_SESSION['UPLOADED_PICTURES_SIZE'][$k], 'ID' => $k, 'DEFAULT' => ($v == $_SESSION['SELL_pict_url_temp']) ? 'selected.gif' : 'unselected.gif' )); } if ($system->SETTINGS['fees'] == 'y') { $query = "SELECT value FROM " . $DBPrefix . "fees WHERE type = 'picture_fee'"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $image_fee = mysql_result($res, 0); } else { $image_fee = 0; } // get decimals for javascript rounder $decimals = ''; for ($i = 0; $i < $system->SETTINGS['moneydecimals']; $i++) { $decimals .= 0; } $template->assign_vars(array( 'SITENAME' => $system->SETTINGS['sitename'], 'THEME' => $system->SETTINGS['theme'], 'HEADERCOLOUR' => $system->SETTINGS['headercolor'], 'NUMIMAGES' => count($_SESSION['UPLOADED_PICTURES']), 'IMAGE_COST' => $image_fee, 'FEE_DECIMALS' => $decimals, 'B_CROPSCREEN' => $cropdefault )); $template->set_filenames(array( 'body' => 'upldgallery.tpl' )); $template->display('body'); ?>
  7. On the user registration i added a selection for the user to select whether they want to be a buyer or seller. I cant figure out how to code the sql part into register.php here is the register.tpl .. The list can be found by all the ########### <div class="content"> <div class="tableContent2"> <div class="titTable2"> {L_001} </div> <!-- IF B_FIRST --> <!-- IF B_ERRORMSG --> <div class="errfont"> {L_ERROR} </div> <!-- ENDIF --> <div class="table2"> <form name="registration" action="{SSLURL}register.php" method="post"> <table width="90%" border="0" cellpadding="4" cellspacing=0> <tr> <td width="40%" valign="top" align="right"><b>{L_002}</b> *</td> <td width="60%"> <input type="text" name="TPL_name" size=40 maxlength=255 value="{V_YNAME}"> </td> </tr> <tr> <td width="40%" valign="top" align="right"><b>{L_003}</b> *</td> <td width="60%"> <input type="text" name="TPL_nick" size=20 maxlength=20 value="{V_UNAME}"> {L_050} </td> </tr> <tr> <td width="40%" valign="top" align="right"><b>{L_004}</b> *</td> <td width="60%"> <input type="password" name="TPL_password" size=20 maxlength=20 value=""> {L_050} </td> </tr> <tr> <td width="40%" valign="top" align="right"><b>{L_005}</b> *</td> <td width="60%"> <input type="password" name="TPL_repeat_password" size=20 maxlength=20 value=""> </td> </tr> <tr> <td width="40%" valign="top" align="right"><b>{L_006}</b> *</td> <td width="60%"> <input type="text" name="TPL_email" size=50 maxlength=50 value="{V_EMAIL}"> </td> </tr> <!-- IF BIRTHDATE --> <tr> <td width="40%" valign="top" align="right"><b>{L_252}</b>{REQUIRED(0)}</td> <td width="60%"> {L_DATEFORMAT} <input type="text" name="TPL_year" size="4" maxlength="4" value="{V_YEAR}"> </td> </tr> <!-- ENDIF --> <!-- IF ADDRESS --> <tr> <td width="40%" valign="top" align="right"><b>{L_009}</b>{REQUIRED(1)}</td> <td width="60%"> <input type="text" name="TPL_address" size=40 maxlength=255 value="{V_ADDRE}"> </td> </tr> <!-- ENDIF --> <!-- IF CITY --> <tr> <td width="40%" valign="top" align="right"><b>{L_010}</b>{REQUIRED(2)}</td> <td width="60%"> <input type="text" name="TPL_city" size=25 maxlength=25 value="{V_CITY}"> </td> </tr> <!-- ENDIF --> <!-- IF PROV --> <tr> <td width="40%" valign="top" align="right"><b>{L_011}</b>{REQUIRED(3)}</td> <td width="60%"> <input type="text" name="TPL_prov" size=10 maxlength=10 value="{V_PROV}"> </td> </tr> <!-- ENDIF --> <!-- IF COUNTRY --> <tr> <td width="40%" valign="top" align="right"><b>{L_014}</b>{REQUIRED(4)}</td> <td width="60%"> <select name="TPL_country"> <option value="">{L_251}</option> {L_COUNTRIES} </select> </td> </tr> <!-- ENDIF --> <!-- IF ZIP --> <tr> <td width="40%" valign="top" align="right"><b>{L_012}</b>{REQUIRED(5)}</td> <td width="60%"> <input type="text" name="TPL_zip" size=8 value="{V_POSTCODE}" /> </td> </tr> <!-- ENDIF --> <!-- IF TEL --> <tr> <td width="40%" valign="top" align="right"><b>{L_013}</b>{REQUIRED(6)}</td> <td width="60%"> <input type="text" name="TPL_phone" size=40 maxlength=40 value="{V_PHONE}"> </td> </tr> <!-- ENDIF --> <tr> <!--######################################################################################################################## --> <!-- LIST IS HERE --> <td width="40%" align=right><strong>Account Type</strong></td> <td width="60%"><select name="userType"> <option value="1">Seller</option> <option value="2">Buyer</option> </select> (please select whether you want to be a buyer or seller)</td> </tr> <!--########################################################################################################################### --> <tr> <td colspan="2">{CAPCHA}</td> </tr> </table> <div style="text-align:center"> <!-- IF B_SHOWACCEPTANCE --> <p>{L_ACCEPTANCE}</p> <!-- ENDIF --> <input type="hidden" name="action" value="first"> <input type="submit" name="" value="{L_235}" > <input type="reset" name="" value="{L_035}" > </div> </form> </div> <!-- ELSE --> <div align="center">{L_MESSAGE}</div> <!-- ENDIF --> </div> </div> NOW in the register.php is where it tells the database this selection can someone insert the code to put this selection in the database. in the database it should go where everything else is going under the category groups Here is register.php <?php include 'includes/common.inc.php'; include $include_path . 'countries.inc.php'; include $include_path . 'banemails.inc.php'; // check recaptcha is enabled if ($system->SETTINGS['spam_register'] == 2) { include $include_path . 'captcha/recaptchalib.php'; } elseif ($system->SETTINGS['spam_register'] == 1) { include $include_path . 'captcha/securimage.php'; } if ($system->SETTINGS['https'] == 'y' && $_SERVER['HTTPS'] != 'on') { $sslurl = str_replace('http://', 'https://', $system->SETTINGS['siteurl']); header('Location: ' . $sslurl . 'register.php'); exit; } function CheckAge($day, $month, $year) // check if the users > 18 { $NOW_year = gmdate('Y'); $NOW_month = gmdate('m'); $NOW_day = gmdate('d'); if (($NOW_year - $year) > 18) { return 1; } elseif ((($NOW_year - $year) == 18) && ($NOW_month > $month)) { return 1; } elseif ((($NOW_year - $year) == 18) && ($NOW_month == $month) && ($NOW_day >= $day)) { return 1; } else { return 0; } } function get_hash() { $string = '0123456789abcdefghijklmnopqrstuvyxz'; $hash = ''; for ($i = 0; $i < 5; $i++) { $rand = rand(0, 35); $hash .= $string[$rand]; $string = str_replace($string[$rand], '', $string); } return $hash; } $TPL_errmsg = ''; $TPL_err = 0; if (empty($_POST['action'])) { $action = 'first'; } // Retrieve users signup settings $MANDATORY_FIELDS = unserialize($system->SETTINGS['mandatory_fields']); $DISPLAYED_FIELDS = unserialize($system->SETTINGS['displayed_feilds']); $spam_html = ''; if ($system->SETTINGS['spam_register'] == 1) { $resp = new Securimage(); $spam_html = $resp->show_html(); } if (isset($_POST['action']) && $_POST['action'] == 'first') { if (empty($_POST['TPL_name'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5029; } elseif (empty($_POST['TPL_nick'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5030; } elseif (empty($_POST['TPL_password'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5031; } elseif (empty($_POST['TPL_repeat_password'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5032; } elseif (empty($_POST['TPL_email'])) { $TPL_err = 1; $TPL_errmsg = $ERR_5033; } elseif (empty($_POST['TPL_address']) && $MANDATORY_FIELDS['address'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_5034; } elseif (empty($_POST['TPL_city']) && $MANDATORY_FIELDS['city'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_5035; } elseif (empty($_POST['TPL_prov']) && $MANDATORY_FIELDS['prov'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_5036; } elseif (empty($_POST['TPL_country']) && $MANDATORY_FIELDS['country'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_5037; } elseif (empty($_POST['TPL_zip']) && $MANDATORY_FIELDS['zip'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_5038; } elseif (empty($_POST['TPL_phone']) && $MANDATORY_FIELDS['tel'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_5039; } elseif ((empty($_POST['TPL_day']) || empty($_POST['TPL_month']) || empty($_POST['TPL_year'])) && $MANDATORY_FIELDS['birthdate'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_5040; } else { $birth_day = $_POST['TPL_day']; $birth_month = $_POST['TPL_month']; $birth_year = $_POST['TPL_year']; $DATE = $birth_year . $birth_month . $birth_day; if ($system->SETTINGS['spam_register'] == 2) { $resp = recaptcha_check_answer($system->SETTINGS['recaptcha_private'], $_SERVER['REMOTE_ADDR'], $_POST['recaptcha_challenge_field'], $_POST['recaptcha_response_field']); } if ($system->SETTINGS['spam_register'] == 2 && !$resp->is_valid) { $TPL_err = 1; $TPL_errmsg = $MSG['752']; } elseif ($system->SETTINGS['spam_register'] == 1 && !$resp->check($_POST['captcha_code'])) { $TPL_err = 1; $TPL_errmsg = $MSG['752']; } elseif (strlen($_POST['TPL_nick']) < 6) { $TPL_err = 1; $TPL_errmsg = $ERR_107; } elseif (strlen ($_POST['TPL_password']) < 6) { $TPL_err = 1; $TPL_errmsg = $ERR_108; } elseif ($_POST['TPL_password'] != $_POST['TPL_repeat_password']) { $TPL_err = 1; $TPL_errmsg = $ERR_109; } elseif (strlen($_POST['TPL_email']) < 5) { $TPL_err = 1; $TPL_errmsg = $ERR_110; } elseif (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$", $_POST['TPL_email'])) { $TPL_err = 1; $TPL_errmsg = $ERR_008; } elseif (!CheckAge($birth_day, $birth_month, $birth_year) && $MANDATORY_FIELDS['birthdate'] == 'y') { $TPL_err = 1; $TPL_errmsg = $ERR_113; } elseif (!empty($birth_month) && !empty($birth_day) && !empty($birth_year) && !checkdate($birth_month, $birth_day, $birth_year)) { $TPL_err = 1; $TPL_errmsg = $ERR_117; } elseif (BannedEmail($_POST['TPL_email'], $BANNEDDOMAINS)) { $TPL_err = 1; $TPL_errmsg = $MSG['30_0054']; } else { $sql = "SELECT nick FROM " . $DBPrefix . "users WHERE nick = '" . $system->cleanvars($_POST['TPL_nick']) . "'"; $res = mysql_query($sql); $system->check_mysql($res, $sql, __LINE__, __FILE__); if (mysql_num_rows($res) > 0) { $TPL_err = 1; $TPL_errmsg = $ERR_111; // Selected user already exists } $query = "SELECT email FROM " . $DBPrefix . "users WHERE email = '" . $system->cleanvars($_POST['TPL_email']) . "'"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); if (mysql_num_rows($res) > 0) { $TPL_err = 1; $TPL_errmsg = $ERR_115; // E-mail already used } if ($TPL_err == 0) { $TPL_nick_hidden = $_POST['TPL_nick']; $TPL_password_hidden = $_POST['TPL_password']; $TPL_name_hidden = $_POST['TPL_name']; $TPL_email_hidden = $_POST['TPL_email']; $SUSPENDED = ($system->SETTINGS['activationtype'] == 2) ? 0 : 8; $SUSPENDED = ($system->SETTINGS['activationtype'] == 0) ? 10 : $SUSPENDED; $query = "SELECT type FROM " . $DBPrefix . "fees WHERE type = 'signup_fee'"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $signup_fee = mysql_result($res, 0); if ($system->SETTINGS['fee_type'] == 2 && $signup_fee > 0) { $SUSPENDED = 9; $query = "UPDATE " . $DBPrefix . "counters SET inactiveusers = inactiveusers + 1"; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); } elseif ($system->SETTINGS['activationtype'] == 1 || $system->SETTINGS['activationtype'] == 0) { $query = "UPDATE " . $DBPrefix . "counters SET inactiveusers = inactiveusers + 1"; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); } else { $query = "UPDATE " . $DBPrefix . "counters SET users = users + 1"; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); } $balance = ($system->SETTINGS['fee_type'] == 2) ? 0 : ($system->SETTINGS['fee_signup_bonus'] - $signup_fee); $query = "SELECT id FROM " . $DBPrefix . "groups WHERE auto_join = 1"; $res = mysql_query($query); $system->check_mysql($res, $query, __LINE__, __FILE__); $groups = array(); while ($row = mysql_fetch_assoc($res)) { $groups[] = $row['id']; } $hash = get_hash(); $query = "INSERT INTO " . $DBPrefix . "users (nick, password, hash, name, address, city, prov, country, zip, phone, nletter, email, reg_date, birthdate, suspended, language, groups, balance, timecorrection) VALUES ('" . $system->cleanvars($TPL_nick_hidden) . "', '" . md5($MD5_PREFIX . $TPL_password_hidden) . "', '" . $hash . "', '" . $system->cleanvars($TPL_name_hidden) . "', '" . $system->cleanvars($_POST['TPL_address']) . "', '" . $system->cleanvars($_POST['TPL_city']) . "', '" . $system->cleanvars($_POST['TPL_prov']) . "', '" . $system->cleanvars($_POST['TPL_country']) . "', '" . $system->cleanvars($_POST['TPL_zip']) . "', '" . $system->cleanvars($_POST['TPL_phone']) . "', '" . $system->cleanvars($_POST['TPL_nletter']) . "', '" . $system->cleanvars($_POST['TPL_email']) . "', '" . time() . "', '" . ((!empty($DATE)) ? $DATE : 0) . "', '" . $SUSPENDED . "', '" . $language . "', '" . implode(',', $groups) . "', '" . $balance . "', " . $system->SETTINGS['timecorrection'] . ")"; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); $TPL_id_hidden = mysql_insert_id(); $query = "INSERT INTO " . $DBPrefix . "usersips VALUES (NULL, " . intval($TPL_id_hidden) . ", '" . $_SERVER['REMOTE_ADDR'] . "', 'first','accept')"; $system->check_mysql(mysql_query($query), $query, __LINE__, __FILE__); $_SESSION['language'] = $language; $first = false; if ($system->SETTINGS['activationtype'] == 0) { include $include_path . 'user_confirmation_needapproval.inc.php'; $TPL_message = $MSG['016_a']; } elseif ($system->SETTINGS['activationtype'] == 1) { include $include_path . 'user_confirmation.inc.php'; $TPL_message = sprintf($MSG['016'], $TPL_email_hidden); } else { $USER = array('name' => $TPL_name_hidden, 'email' => $_POST['TPL_email']); include $include_path . 'user_approved.inc.php'; $TPL_message = $MSG['016_b']; } if ($system->SETTINGS['fee_type'] == 2 && $signup_fee > 0) { $_SESSION['signup_id'] = $TPL_id_hidden; header('location: pay.php?a=3'); exit; } } } } } $country = ''; if (!isset($_POST['action']) || (isset($_POST['action']) && $TPL_err == 1)) { $first = true; $selcountry = isset($_POST['TPL_country']) ? $_POST['TPL_country'] : ''; foreach ($countries as $key => $name) { $country .= '<option value="' . $name . '"'; if ($name == $selcountry) { $country .= ' selected'; } elseif ($system->SETTINGS['defaultcountry'] == $name) { $country .= ' selected'; } $country .= '>' . $name . '</option>' . "\n"; } $dobmonth = '<select name="TPL_month"> <option value="00"></option> <option value="01"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '01') ? ' selected' : '') . '>' . $MSG['MON_001E'] . '</option> <option value="02"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '02') ? ' selected' : '') . '>' . $MSG['MON_002E'] . '</option> <option value="03"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '03') ? ' selected' : '') . '>' . $MSG['MON_003E'] . '</option> <option value="04"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '04') ? ' selected' : '') . '>' . $MSG['MON_004E'] . '</option> <option value="05"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '05') ? ' selected' : '') . '>' . $MSG['MON_005E'] . '</option> <option value="06"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '06') ? ' selected' : '') . '>' . $MSG['MON_006E'] . '</option> <option value="07"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '07') ? ' selected' : '') . '>' . $MSG['MON_007E'] . '</option> <option value="08"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '08') ? ' selected' : '') . '>' . $MSG['MON_008E'] . '</option> <option value="09"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '09') ? ' selected' : '') . '>' . $MSG['MON_009E'] . '</option> <option value="10"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '10') ? ' selected' : '') . '>' . $MSG['MON_010E'] . '</option> <option value="11"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '11') ? ' selected' : '') . '>' . $MSG['MON_011E'] . '</option> <option value="12"' . ((isset($_POST['TPL_month']) && $_POST['TPL_month'] == '12') ? ' selected' : '') . '>' . $MSG['MON_012E'] . '</option> </select>'; $dobday = '<select name="TPL_day"> <option value=""></option>'; for ($i = 1; $i <= 31; $i++) { $j = (strlen($i) == 1) ? '0' . $i : $i; $dobday .= '<option value="' . $j . '"' . ((isset($_POST['TPL_day']) && $_POST['TPL_day'] == $j) ? ' selected' : '') . '>' . $j . '</option>'; } $dobday .= '</select>'; } $template->assign_vars(array( 'L_ERROR' => $TPL_errmsg, 'L_COUNTRIES' => $country, 'L_ACCEPTANCE' => nl2br(stripslashes($system->SETTINGS['acceptancetext'])), 'L_DATEFORMAT' => ($system->SETTINGS['datesformat'] == 'USA') ? $dobmonth . ' ' . $dobday : $dobday . ' ' . $dobmonth, 'L_MESSAGE' => (isset($TPL_message)) ? $TPL_message : '', 'B_ERRORMSG' => ($TPL_err == 1), 'B_ADMINAPROVE' => ($system->SETTINGS['activationtype'] == 0), 'B_NLETTER' => ($system->SETTINGS['newsletter'] == 1), 'B_SHOWACCEPTANCE' => ($system->SETTINGS['showacceptancetext'] == 1), 'B_FIRST' => $first, 'CAPTCHATYPE' => $system->SETTINGS['spam_register'], 'CAPCHA' => ($system->SETTINGS['spam_register'] == 2) ? recaptcha_get_html($system->SETTINGS['recaptcha_public']) : $spam_html, 'BIRTHDATE' => ($DISPLAYED_FIELDS['birthdate_regshow'] == 1), 'ADDRESS' => ($DISPLAYED_FIELDS['address_regshow'] == 1), 'CITY' => ($DISPLAYED_FIELDS['city_regshow'] == 1), 'PROV' => ($DISPLAYED_FIELDS['prov_regshow'] == 1), 'COUNTRY' => ($DISPLAYED_FIELDS['country_regshow'] == 1), 'ZIP' => ($DISPLAYED_FIELDS['zip_regshow'] == 1), 'TEL' => ($DISPLAYED_FIELDS['tel_regshow'] == 1), 'REQUIRED' => array( ($MANDATORY_FIELDS['birthdate'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['address'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['city'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['prov'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['country'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['zip'] == 'y') ? ' *' : '', ($MANDATORY_FIELDS['tel'] == 'y') ? ' *' : '' ), 'V_YNEWSL' => ((isset($_POST['TPL_nletter']) && $_POST['TPL_nletter'] == 1) || !isset($_POST['TPL_nletter'])) ? 'checked=true' : '', 'V_NNEWSL' => (isset($_POST['TPL_nletter']) && $_POST['TPL_nletter'] == 2) ? 'checked=true' : '', 'V_YNAME' => (isset($_POST['TPL_name'])) ? $_POST['TPL_name'] : '', 'V_UNAME' => (isset($_POST['TPL_nick'])) ? $_POST['TPL_nick'] : '', 'V_EMAIL' => (isset($_POST['TPL_email'])) ? $_POST['TPL_email'] : '', 'V_YEAR' => (isset($_POST['TPL_year'])) ? $_POST['TPL_year'] : '', 'V_ADDRE' => (isset($_POST['TPL_address'])) ? $_POST['TPL_address'] : '', 'V_CITY' => (isset($_POST['TPL_city'])) ? $_POST['TPL_city'] : '', 'V_PROV' => (isset($_POST['TPL_prov'])) ? $_POST['TPL_prov'] : '', 'V_POSTCODE' => (isset($_POST['TPL_zip'])) ? $_POST['TPL_zip'] : '', 'V_PHONE' => (isset($_POST['TPL_phone'])) ? $_POST['TPL_phone'] : '' )); include 'header.php'; $template->set_filenames(array( 'body' => 'register.tpl' )); $template->display('body'); include 'footer.php'; ?>
  8. thanks for the help i have never done anything like that.
  9. yep i am lost on it.. I keep getting a blank screen obviously i just dont understand this. I just cant figure it out
  10. Tail, Where would i implement this into the script at?
  11. on my site www.budstreasureauctions.com there is a featured auctions box that users will pay to get there picture on the homepage. currently the box limit is 6. If you increase the limit then it will display the images in a row side by side continuously. I need it to display 6 per row then start a new row of 6, so on, so on. here is the current code: <? $feature_sql="select * from featuredproducts f,auction_details p where p.status='Active' and selling_method!='ads' and selling_method!='want_it_now' and home_feature='yes' and picture1!='' and p.bid_starting_date <= NOW() and f.productid=p.productid order by rand() limit 6"; $feature_res=mysql_query($feature_sql); $tot_count=mysql_num_rows($feature_res); if($tot_count!=0) { ?> <table border="0" align="center" cellpadding="0" cellspacing="0" width=574> <tr> <td colspan=4 height="30" valign="middle"> <table width="574" cellpadding="0" cellspacing="0" > <tr> <tr class="tdhead"><td width="1%" height="30" valign="top"><img src=templates/<?=$tfold?>/img_files/h_left.gif></td> <td width="98%" height="30" valign="middle"> <B>Featured Auctions</b> <a href="rssfeatured.php" target="_blank"><img src=templates/<? echo "$tfold" ?>/img_files/xml.gif border="0"></a></td> <td width="1%" height="30" valign="top"><img src=templates/<?=$tfold?>/img_files/h_right.gif></td></tr> </tr> </table> </tr></table> <table border="0" align="center" cellpadding="0" cellspacing="0" width=574 class="ft_right"> <? } ?> <? $count=0; while($feature_row=mysql_fetch_array($feature_res)) { $expire_date = $feature_row['expire_date']; require 'ends.php'; $string_1=$feature_row[detailed_descrip]; $count=$count+1; ?> <td valign=top> <table cellpadding=5 cellspacing=2> <td > <? if(empty($feature_row['picture1'])) { ?> <table height="49" border="0" cellpadding=0 cellspacing=0> <tr> <td height="12" background="templates/<? echo "$tfold" ?>/img_files/window_01.gif" ></td> </tr> <tr> <td background="templates/<? echo "$tfold" ?>/img_files/window_03.gif" > <table border="0" cellpadding="0" cellspacing="0" width=77> <tr valign="top"> <td align="center"> <a href="itechd.php?productid=<? echo $feature_row['productid']; ?>"> <? echo $featured_row['producttitle']; ?> <img src="templates/<? echo "$tfold" ?>/img_files/noimage2.gif" width=<?= $w; ?> height=<?=$h?> border=0> </a> </td> </tr> </table> </td> </tr><tr> <? $bid_sql="select * from site_bids where productid=".$feature_row['productid']; $bid_res=mysql_query($bid_sql); $bid_tot_row=mysql_num_rows($bid_res); if($bid_tot_row!=0) { $bid_row=mysql_fetch_array($bid_res); $curprice=$bid_row['bidding_amount']; } else { $curprice=$feature_row['min_bid_amount']; } if($feature_row['selling_method']=="fix") { $curprice=$feature_row['quick_buy_price']; } ?> <td valign=top align="center"><br><a href="itechd.php?productid=<? echo $feature_row['productid']; ?>"> <? echo $feature_row['producttitle'];?></a><br> <? echo "Price: ".$feature_row['currency']." ".$curprice; ?> <br> <a href="itechd.php?productid=<? echo $feature_row['productid']; ?>" style="text-decoration:none;"> <?= $string_difference; ?> </a> </td> </tr> </table> <? } else { $img=$feature_row['picture1']; list($width, $height, $type, $attr) = getimagesize("uploads/$img"); $h=$height; $w=$width; if($h>60) { $nh=60; $nw=($w/$h)*$nh; $h=$nh; $w=$nw; } if($w>60) { $nw=60; $nh=($h/$w)*$nw; $h=$nh; $w=$nw; } ?> <table height="49" border="0" cellpadding=0 cellspacing=0 align=center> <tr> <td height="12" ></td> </tr> <tr> <td align=center> <center> <table border="1" cellpadding="0" cellspacing="0" width=65 height=65 bordercolor="#000000"> <tr valign="top"> <td align="center" bgcolor="#ffffff"> <a href="itechd.php?productid=<? echo $feature_row['productid']; ?>"> <? echo $featured_row['producttitle']; ?> <img src="uploads/<? echo $feature_row['picture1']; ?>" width=<?= $w; ?> height=<?=$h?> border=0> </a> </td> </tr> </table></center> </td> </tr> <tr> <? $bid_sql="select * from site_bids where productid=".$feature_row['productid']; $bid_res=mysql_query($bid_sql); $bid_tot_row=mysql_num_rows($bid_res); if($bid_tot_row!=0) { $bid_row=mysql_fetch_array($bid_res); $curprice=$bid_row['bidding_amount']; } else { $curprice=$feature_row['min_bid_amount']; } if($feature_row['selling_method']=="fix") { $curprice=$feature_row['quick_buy_price']; } ?> <td valign=top align="center"><br><a href="itechd.php?productid=<? echo $feature_row['productid']; ?>"> <? echo $feature_row['producttitle'];?></a><br> <? echo "Price: ".$feature_row['currency']." ".$curprice; ?> <br> <a href="itechd.php?productid=<? echo $feature_row['productid']; ?>" style="text-decoration:none;"> <?= $string_difference; ?> </a> </td></tr> </table> <? } ?> </td> </tr> </table> </td> <? } ?> <? if($tot_count!=0) { ?> </tr> </table> <? } ?>
×
×
  • 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.