Jump to content

Looktrne

Members
  • Posts

    184
  • Joined

  • Last visited

About Looktrne

  • Birthday 06/22/1980

Profile Information

  • Gender
    Male

Looktrne's Achievements

Regular Member

Regular Member (3/5)

0

Reputation

  1. Do you think it could be a mysql version issue? or maybe I missed something importing the database? I think it's an "old syntax" I know it worked fine on the other server but now we have upgraded everything.
  2. The Querry works on a different server so it must be a depreciated something going on in there
  3. SELECT profile.id as profile_id, photos.filename_1 as filename_1, photos.filename_2 as filename_2, photos.filename_3 as filename_3, photos.filename_4 as filename_4, photos.filename_5 as filename_5 FROM dt_billing_history as billing_history, dt_members as member, dt_profile as profile, dt_photos as photos LEFT JOIN dt_privacy as privacy ON privacy.member_id = member.id WHERE billing_history.gender = 'Female' AND member.id = billing_history.member_id AND (privacy.spotlight_yn <> 'Y' OR privacy.spotlight_yn IS NULL) AND photos.member_id = member.id AND profile.id = member.profile_id AND profile.status = 1 ORDER BY billing_history.id DESC LIMIT 4; Can someone please help me find the Syntax error in the above mysql Querry? Unknown column 'member.id' in 'on clause'
  4. I found a function that was killing the check boxes this function was being called and killing checkboxes from working //$type_rs_to_register = array( "GET", "POST", "COOKIE", "FILES", "SESSION", "SERVER" ); if ( !get_magic_quotes_gpc( ) ) { foreach ( $type_rs_to_register as $type_r ) { if ( !( 0 < @count( ${ "_".$type_r } ) ) ) { continue; } while ( list( $key, $value ) = each( ${ "_".$type_r } ) ) { ${ "_".$type_r }[$key] = addslashes( $value ); } } }
  5. I tried this <td width=50%><input value=1 type=checkbox name=search_marital_status[1] checked> Single - Never Married</td> <td width=50%><input value=3 type=checkbox name=search_marital_status[2]> Married</td> <td width=50%><input value=5 type=checkbox name=search_marital_status[3] checked> Divorced</td> $search_martial_status = implode('|', $_POST['search_martial_status']); echo "Marital Status Is:".$search_martial_status."<br>" I get nothing out? if I change search_marital_status[1] to search_marital_status then I would get data but it seems it won't eccept array? this is just weird it works on some servers and not others. is there a simple way to re-write? the code is old I just want to re-write this part Paul
  6. Here is the page that receives it... all it does is write the marital_status variable into the database. When I use a variable without [] or [1] in the button it passes the data with [] or [1] I get nothing... I just need a simple way to rewrite the button code so I can then write to database as |1|2|3 as explained above. thanks for any thoughts <? if($action == disable) { q("UPDATE dt_members SET matchfinder='0' WHERE id='$fMember[id]'"); $fMember[ matchfinder ] = 0; } if($action == enable) { $error = ""; if((int)$age_from <= 0 || (int)$age_to <= 0 || $age_from > $age_to || $age_to > 90) { $error = "Invalid age from and age to entered! Please try again."; } if($error == "") { q("UPDATE dt_members SET looking_for='$looking_for' WHERE id='$fMember[id]'"); q("UPDATE dt_members SET matchfinder='1' WHERE id='$fMember[id]'"); $fMember[ matchfinder ] = 1; $fMember[ looking_for ] = $looking_for; $f_mf = f(q("SELECT * FROM dt_matchfinder WHERE member_id='$fMember[id]'")); $fields = array( "search_marital_status", "search_body_type", "search_hair_color", "search_eye_color", "search_race", "search_religion", "search_education", "search_occupation", "search_food" ); foreach($fields as $field_name) { if(isset($$field_name)) { $temp = "|"; foreach($$field_name as $field_key=>$field_value) { if($field_value) $temp .= $field_key."|"; } $$field_name = $temp; } } if($f_mf == "") { q("INSERT INTO dt_matchfinder(member_id, age_from, age_to,country,race,marital_status,education,hair_color,eye_color,food,occupation,state,city) VALUES('$fMember[id]', '$age_from','$age_to','$search_country','$search_race','$search_marital_status','$search_education','$search_hair_color','$search_eye_color','$search_food','$search_occupation','$state','$city')"); } else { q("UPDATE dt_matchfinder SET age_from='$age_from' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET age_to='$age_to' WHERE id='$f_mf[id]'"); // new code for webDate v1.3.5 q("UPDATE dt_matchfinder SET country='$search_country' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET state='$state' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET city='$city' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET marital_status='$search_marital_status' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET body_type='$search_body_type' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET hair_color='$search_hair_color' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET eye_color='$search_eye_color' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET race='$search_race' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET religion='$search_religion' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET education='$search_education' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET occupation='$search_occupation' WHERE id='$f_mf[id]'"); q("UPDATE dt_matchfinder SET food='$search_food' WHERE id='$f_mf[id]'"); } } } $f_mf = f(q("SELECT * FROM dt_matchfinder WHERE member_id='$fMember[id]'")); if($f_mf != "" && $fMember[ matchfinder ] == 1) { $enabled = 1; } if($enabled) { $matchfinder_status = "enabled"; $matchfinder_submit = "Update Settings"; $matchfinder_disable = '<input type="button" value="'."Disable Matchfinder".'" OnClick="window.location.href='."'index.php?page=matchfinder&action=disable'".'">'; } else { $matchfinder_status = "disabled"; $matchfinder_submit = "Enable Matchfinder"; } if ($error) { $matchfinder_error = '<tr>'; $matchfinder_error .= '<td class="trtc" height="25" colspan="2"> '; $matchfinder_error .= '<font color=C00000>'.$error.'</font>'; $matchfinder_error .= '</td>'; $matchfinder_error .= '</tr>'; } $looking_for = $fMember[ looking_for ]; $matchfinder_looking_for = sysGetValSelect(looking_for, dt_genders); $age_from=$f_mf[ age_from ]; $matchfinder_age_from = sysGetNumberSelect(age_from, 18, 55, 0); $age_to=$f_mf[ age_to ]; if($age_to=="")$age_to=35; $matchfinder_age_to = sysGetNumberSelect(age_to, 18, 80, 0); $search_country=$f_mf[ country ]; $matchfinder_search_country = sysGetSelect(search_country, dt_countries,0,$search_country); $matchfinder_search_state = ""; if(!$no_state) { $state = $f_mf[ state ]; if($state_dropdown) { $matchfinder_search_state_select = sysGetValSelect(state, dt_states,0,$state); } else { $matchfinder_search_state_select = '<input type=text name=state value="'.$state.'">'; } $matchfinder_search_state = parseVariables("templates/matchfinder_state.html",0); } $matchfinder_search_city = $f_mf[ city ]; $temp = explode("|", $f_mf[marital_status]); $search_marital_status = ""; foreach($temp as $i) $search_marital_status[$i] = 1; $matchfinder_marital_status = sysGetCheckboxesMatchfinder("search_marital_status", "dt_marital_status",0); $temp = explode("|", $f_mf[body_type]); $search_body_type = ""; foreach($temp as $i) $search_body_type[$i] = 1; $matchfinder_body_types = sysGetCheckboxesMatchfinder("search_body_type", "dt_body_types",0); $temp = explode("|", $f_mf[hair_color]); $search_hair_color = ""; foreach($temp as $i) $search_hair_color[$i] = 1; $matchfinder_hair_colors = sysGetCheckboxesMatchfinder("search_hair_color", "dt_hair_colors",0); $search_eye_color = ""; $temp = explode("|", $f_mf[eye_color]); foreach($temp as $i) $search_eye_color[$i] = 1; $matchfinder_eye_colors = sysGetCheckboxesMatchfinder("search_eye_color", "dt_eye_colors",0); $search_race = ""; $temp = explode("|", $f_mf[race]); foreach($temp as $i) $search_race[$i] = 1; $matchfinder_race = sysGetCheckboxesMatchfinder("search_race", "dt_races",0); $search_religion = ""; $temp = explode("|", $f_mf[religion]); foreach($temp as $i) $search_religion[$i] = 1; $matchfinder_religion = sysGetCheckboxesMatchfinder("search_religion", "dt_religions",0); $search_education = ""; $temp = explode("|", $f_mf[education]); foreach($temp as $i) $search_education[$i] = 1; $matchfinder_education = sysGetCheckboxesMatchfinder("search_education", "dt_educations",0); $search_occupation = ""; $temp = explode("|", $f_mf[occupation]); foreach($temp as $i) $search_occupation[$i] = 1; $matchfinder_occupation = sysGetCheckboxesMatchfinder("search_occupation", "dt_occupations",0); $search_food = ""; $temp = explode("|", $f_mf[food]); foreach($temp as $i) $search_food[$i] = 1; $matchfinder_food = sysGetCheckboxesMatchfinder("search_food", "dt_food",0); parseVariables("templates/matchfinder.html"); ?> Paul
  7. Seems Register Globals OFF is ok but Safe_mode should be disabled according to the script I know Safe_mode is no longer existing.... any thoughts on how this may effect my Form?
  8. I believe it may be using register globals but have seen it work on sites with it disabled also I pretty much need a variable to equal $search_marital_status = "|1|3|5|"; if I selected all 3 boxes is there a simple way to re-write the buttons to accomplish this? thanks Paul
  9. Basically if all 3 are checked I would need: $search_marital_status = "|1|3|5|"; this is what I need to save into the database
  10. I am transfering a site from PHP 5.2 to PHP 5.4 now the checkboxes are not being passed to PHP the html looks like this <form action="index.php?page=matchfinder&action=enable" method=post> <tr> <td width=50%><input value=1 type=checkbox name=search_marital_status[1] checked> Single - Never Married</td> <td width=50%><input value=1 type=checkbox name=search_marital_status[2]> Married</td> <td width=50%><input value=1 type=checkbox name=search_marital_status[3] checked> Divorced</td> </tr> <input type="submit" value="Update Settings"> </form> on the PHP page that it posts to I don't receive the $search_marital_status data. if I change "search_marital_status[1]" to "search_marital_status1" it can read the variable my question is why would this work normally on 5.2 but not 5.4? any suggestions it saves values into a database field names "marital_status" and would look like this if all 3 were checked "|1|3|" Why would this be broken in 5.4? any thoughts? it doesn't like the checkbox variables using [1] [2] on the end thanks for any insite Paul
  11. Just curious if this .htaccess access file is protecting this folder? <FilesMatch "\.(php|pl|py|jsp|asp|htm|shtml|sh|cgi)$"> ForceType text/plain <Files /cleanup.php> ForceType application/x-httpd-php SetHandler application/x-httpd-php </Files> </FilesMatch> how can I check if the folder can be accessed by the database or server etc?
  12. People may need to share exe files using the site. I do not want to block any files only execution of all scripts
  13. I wrote a script that allows site users to upload a file and it spits out a link for them to share so others can download the file. I noticed some EXE files being uploaded but when I navigate to the them in my browser they just pop up as downloads. I also did htaccess to prevent script execution in this folder. so I need some opinions on if I am safe? or could someone possibly execute something in my upload folder? thanks for any thoughts Paul
  14. In simpler terms. if I set permissions on "m" directory can I safely allow executable scripts to be uploaded to this directory without worry they can hack my server? If so what permissions do you recommend? thanks Paul
  15. I have a script that allows for anyone to upload a file to my server using this method move_uploaded_file($_FILES["file"]["tmp_name"], "m/" . $newname); it lets the user select a file for upload and then uploads the file in a directory named "m" once the file upload it provides a link so they can share and anyone can download the file. can I make this safe using .htaccess premissions? I want them to be able to upload and download EXE files but not execute on my server. Thanks for any tips on how to make this safe? Paul
×
×
  • 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.