Jump to content

feri_soft

Members
  • Posts

    147
  • Joined

  • Last visited

    Never

Everything posted by feri_soft

  1. Can someone explain me the basis of multiple databases search. I have searched but didn't find anything useful. Thanks!
  2. Yes its useful but instead of checked i want to change the style of a div tag so for exemple to be: style="visibility:hidden;"
  3. How to check a checkbox value with js and if it equals to a certain value to make the visibility of another div tag hidden... Solution needed very fast...  :-\
  4. 10000000000000000х Thank you very much.
  5. I have 1 primary field auto increment. Now i have some values written and i didn't change anything. The last value is 127. Before one hour i could freely add new records. But now i get duplicate value 127 for key 1. Help Please!!!  :)
  6. Yes but i have tested directly with HTTP_REFERER  array, but nothing. PS [quote]i could never get the HTTP_REFERER to work[/quote] With me its working. When i seperate the two clauses between the != they are showing the same thing...??! Why then no comparing. I just get a blanc page because of the exit()
  7. i am not very familiar with JS but i think its something with parent.frame + js code but i need the correct syntax.
  8. Its the reffer but it doesn't seem to have problems. When i separate != and check the values they are the same....
  9. Do you see error here. I have e strict and e all but i dont see a mistake: [code]$sstep = $_GET['step']; $reffer = $_SERVER['HTTP_REFERER']; if (!isset($_GET['step']) || $sstep != 2 || $reffer != 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . '?step=1') { exit; }[/code] However when i remove it everything is fine else it doesnt work
  10. Hi all, I have an image upload and one tinymce. The problem is that my inages are uploaded in a popup windows and i want when upload finishes to have a link in the popup which updates the content in the tinymce. I have the code to update the content but as the tinymce is in a different window it doest do anything. A possible solution will be with iframe too. Please help me.
  11. How dynamically to generate a table like this: I have 22 subcategories in mysql i open a main category and i want all the subs to be shown in the page but formated as a table, not simple <br> Like; adasd                                asdasdasd                              asdas asdasda                            adasdasdasd                            asdasda adasdasd                            adasdasd asdasd                              adasdasd I cant figure out a way because the number of subcats for each category is not fixed.  And there are categories with only 2-3 subs.... Please help!
  12. It is working now, but actually i wanted something to count the chars not the individual words, something with strlen maybe...
  13. Nice, but can i have a little explanation on the code, please?
  14. How to break up a string for  example $row['asdasdasd'] when it has more than 300 chars show the first 300 and display more... at the end. if(strlen($text) > 300){ $text } I have that for now.... from here???
  15. Have you seen it on websites where results are listed with alternative colors for example one row is grey the next is blue and again and again changing. I cant find a way using while and fetch array to do this.Here is the result i want: [table][tr][td]1.[color=red]asdasdasd[/color][/td][/tr] [tr][td]2.[color=bleu]bbbbbbb[/color][/td][/tr] [tr][td]3.[color=red]cccccc[/color][/td][/tr] [tr][td]4.[color=bleu]ddddddd[/color][/td][/tr] [tr][td]5.[color=red]eeeeeee[/color][/td][/tr] [tr][td]6.[color=bleu]ffffffffff[/color][/td][/tr][/table] But instead of changing the color of the text i will change the background,but i suppose the idea is the same.
  16. No problem, just having some trouble with !== so i have changed a bit any other suggestions??
  17. I have 2 arrays: [code=php] <?php foreach ($_FILES[images][name] as $img) {   $ext123  = substr(strrchr($img, "."), 1); if(($ext123 == "jpg") || ($ext123 == "jpeg") || ($ext123 == "gif")){ }else{   $error[] = "ERROR"; } }?>[/code] which is before my database query and [code=php]<?php while(list($key1,$value1) = each($_FILES[images][name])) { if(!empty($value1)) { $ext1 = substr(strrchr($value1, "."), 1); $filename = $idlast . ' - ' . $key1 . '.' . $ext1; echo $filename; $add = "upload/$filename";                             copy($_FILES[images][tmp_name][$key1], $add); $add = trashinput($add); $fq = "UPDATE listings SET img". $key1 ." = '$add' WHERE id = '$idlast'";     mysql_query($fq) or die('Грешка : ' . mysql_error());      } }?>[/code] which is after the query. The first one checks the file extension and if they are good it proceeds if not it dies. The second is after the query so that i can get the last id and put it as a file name. But when i put the first array check it doesn't want to upload files. When i remove it, it works more than perfect. Can you tell me where is the problem or suggest another way of uploading with id names ;)
  18. Asking again, may be now someone can help !?
  19. Ideas the site is not in english but i thing you will get the idea ;) the pinc rounded rects are the upload buttons the upper is for image the lower for text :)
  20. I found this in one application which is very simillar to what i want to do but i dont know the "-" use of substr and some other things. Can you show a different approach to do the same or explain the code please: [code=php] <?php function notify_new_listing($listingID) { global $conn, $lang, $config; $display = ''; require_once($config['basepath'] . '/include/misc.inc.php'); $misc = new misc(); require_once($config['basepath'] . '/include/search.inc.php'); $sql = "SELECT userdb_id, usersavedsearches_title, usersavedsearches_query_string, usersavedsearches_notify FROM " . $config['table_prefix'] . "usersavedsearches WHERE usersavedsearches_notify = 'yes'"; $recordSet = $conn->Execute($sql); if ($recordSet === false) { $misc->log_error($sql); } while (!$recordSet->EOF) { $query_string = $misc->make_db_unsafe($recordSet->fields['usersavedsearches_query_string']); $user_id = $recordSet->fields['userdb_id']; $search_title = $misc->make_db_unsafe($recordSet->fields['usersavedsearches_title']); // Break Quesry String up into $_GET variables. unset($_GET); $query_string = urldecode($query_string); $criteria = explode('&', $query_string); foreach ($criteria as $crit) { if ($crit != '') { $pieces = explode('=', $crit); $pos = strpos($pieces[0], '[]'); if ($pos !== false) { $name = substr($pieces[0], 0, -2); $_GET[$name][] = $pieces[1]; }else { $_GET[$pieces[0]] = $pieces[1]; } } } if (!isset($_GET)) { $_GET[] = ''; } $matched_listing_ids = search_page::search_results(true); if (in_array($listingID, $matched_listing_ids)) { // Listing Matches Search $sql = "SELECT userdb_user_name, userdb_emailaddress FROM " . $config['table_prefix'] . "userdb WHERE userdb_id = " . $user_id; $recordSet2 = $conn->Execute($sql); if ($recordSet2 === false) { $misc->log_error($sql); } $email = $misc->make_db_unsafe($recordSet2->fields['userdb_emailaddress']); $user_name = $misc->make_db_unsafe($recordSet2->fields['userdb_user_name']); $message = $lang['automated_email'] . "\r\n\r\n\r\n" . date("F j, Y, g:i:s a") . "\r\n\r\n" . $lang['new_listing_notify_long'] . "'" . $search_title . "'.\r\n\r\n" . $lang['click_on_link_to_view_listing'] . "\r\n\r\n$config[baseurl]/index.php?action=listingview&amp;listingID=" . $listingID . "\r\n\r\n\r\n" . $lang['automated_email'] . "\r\n"; // Send Mail $sent = $misc->send_email($config['admin_name'], $config['admin_email'], $email, $message, $lang['new_listing_notify']); $display .= $lang['new_listing_email_sent'] . $user_name . "': " . $lang['new_listing_notify'] . "'" . $search_title . "'<br>"; } $recordSet->MoveNext(); } // while return $display; } ?>[/code]
  21. see here: click browse and choose a picture: http://www.portokal.net/upload
  22. NO i mean that iusing php i have to delte it .... and create again with new changes thats why i need some kind of js code to do this without the need of create and delete new files.
×
×
  • 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.