Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by fantomel

  1. Hello i have a problem with the following code: $uri = '/index.php/'; $this->finalRegex = '/^' . preg_quote($uri, '/') . '$/'; if(preg_match($this->finalRegex, '/index.php') { echo "works!"; } It returns string(18) "/^\/index\.php\/$/" As you can see it adds a \ before .php which would be inconsistent with the string i'm trying to match ( offered an example). can you help me understand how to fix i tried everything it came in my mind.
  2. yes.. i'm thinking the same way but still .. before i go for this design i`m looking for more ideeas / options.. see how it fits better. was thinking separating in two tables end user computer and one table for the data center split in two 1 for nodes and 1 for main computer/s
  3. Hello can someone help me please with a database design for network topology? i need to store a list of network terminals and for the data center ( including computer specifications ) and i'm not sure how to do it never did something like this. any ideeas, advices or models are welcomed thank you for your help.
  4. Hello i need some help creating the database for an online shop. I have the same products but i have 10 different shops and all got the same products only prices are different a little and i`m not sure how should i create the database for the shop can someone help me a little please ? Thanks in advance
  5. I need to do an application that would read a com port save the data in mysql and split it in parts & check for errors did anyone tried something like this until now ? anyone got any ideas how could i read a port ?
  6. hell o got this code for a profile page add / peding / remove friend options. [code $('#add_friend').live('click', function() { $.get("{/literal}{$ISD_URL}members/managesfriends/action/add/id/{$user_details.user_id}{literal}", function(data) { if (data == "ok") { $('#add_friend').parent('td').html('{/literal}<a id="remove_friend">{$lang.pending}</a>{literal}'); } }); }); it works fine the only problem is that if i click add friend or remove friend etc.. it updates that portion of the div after i refresh the page can someone help me update it after i click it ?
  7. thank you very much for you responses.
  8. umm sorry my bad $month = date('m') - 1;$date_startt = date('Y').'-'.$month.'-01';$timestamp_start = strtotime($date_startt); well the final result should be like this: today : Sat 31 Oct 2010 and i want to find out the date of a month ago and if it's January you know that Jan sometimes got +1 day or -1 one day and i need to calculate this correct.
  9. hello i got this small function i`m working on to get the date of a month something like get current date - 1 but not sure how to handle jan month can someone help me please ? $month = date('m') - 1;$date_startt = date('Y').'-'.$luna.'-01';$timestamp_start = strtotime($data_start);
  10. fantomel

    img link

    Hello i`m trying to create a link for an image but seems i`m not getting anywhere can someone please help me? i got this code and i can't manage getting the desired result. thank you in advance. <div class="LoginRight"> <div class="IntraInCont"> <div class="Usita"></div> <div class="UsitaLink"> <a href="intra_in_cont.html" alt="Intra in Contul Tau">Intra in contul tau</a> </div> </div> <div class="Inregistrare"> <a href="inregistrare.html" alt="Inregistrare">Inregistrare</a> </div> </div> CSS: .LoginRight .IntraInCont { width: 200px; height: 100px; display: inline; position: absolute; top: 25px; } .LoginRight .IntraInCont .Usita { background: url(images/login_06.jpg) right top no-repeat; width: 18px; height: 16px; float: left; padding-left: 5px; margin-top: 2px; } .LoginRight .IntraInCont .UsitaLink { background-image:url(images/login_07.jpg); text-indent: -9999px; overflow: hidden; margin-top: 2px; margin-left: 23px; width: 104px; height: 16px; } .LoginRight .Inregistrare { background-image: url(images/login_03.jpg); width: 127px; height: 36px; float: right; margin-top: 20px; text-indent: -9999px; display: block; }
  11. <div class="gallery"> <?php $query = mysql_query("select lucrare_nume, group_concat( lucrare_poze ) from gallery group by lucrare_nume"); while($row = mysql_fetch_assoc($query)) { $row['group_concat( lucrare_poze )'] = explode(',', $row['group_concat( lucrare_poze )']); ?> <div class="project_name"> <h4><?php echo $row['lucrare_nume'] ?></h4> </div> <?php foreach($row['group_concat( lucrare_poze )'] as $key => $value) { ?> <div class="img"> <img src="gallery/thumbnails/<?php echo $value; ?>" /> </div> <?php } }?> </div> solved the problem like this if anyone needs one day something like this maybe will find this topic
  12. yes something like that.. you see the problems is on a single page i have to get the all the projects and their corresponding pictures(without knowing the project name as in your example )
  13. <?php $query = mysql_query("SELECT DISTINCT `lucrare_nume`, `lucrare_poze` FROM `gallery`"); ?> <div class="gallery"> <?php while ($row = mysql_fetch_assoc($query)) { ?> <div class="project_name"> <h4> <?php echo $row['lucrare_nume'] ?> </h4> </div> <div class="img"> <img src="gallery/thumbnails/<?php echo $row['lucrare_poze']; ?>" /> </div> <?php } ?> </div> My problem is not an error with the above code i want to echo the name of the project only once and i don't have any idea how to do that and i was hoping that someone might help me. In the db for each picture there is an insert with the picture name and project name and i want to show all picture like this: Project Name: Picture1 , picture2, picture3, Project Name: Picture1, picture2, picture3 And so on.. in exchange for each picture i get an echo of the project name can someone explain to me how to solve it ? please
  14. Well i`m quite tired it's almost morning but if the $user var doesn't come from $_SESSION['user']; ( or how it is there ) then the user can simply modify his username there and the sql will retrive that one...(if it isn't provided by the session. i think you should solve the problem by first checking if the $user == $_SESSION['user']; and only then can perform the query(that's the method i`m using it) if anyone has a better idea / method please post it (someone with more experience. cheers Later Edit: if i did a mistake i apologize but i`m sleepy very sleepy can't fix very well
  15. I've read so many tutorials about php security on forms .. and stuff like that . that i think in the end i got lost. thank you everyone for your response. @ChemicalBliss i always do a preg_match on fields from forms according to what they have to do. a-zA-Z or only numbers.. depends:D again thank you everyone for your responses.
  16. I needed a function for cleaning input data.. and i`m not the best at php security just started to learn about it so i need some advices corrections. function cleanInput($string){ return nl2br(htmlspecialchars(strip_tags(trim(urldecode($string))))); } Should i add anything else to this function? on each insert in mysql i add mysql_real_escape_string.
  17. hello is there any way to get all the products from a user using amazon api and php ? i`m reffering to all the products he got on sale...
  18. Hello i know i could get banned i know it's againts the rules but i`m very noob at htaccess(very very noob) didn't understand anything about it and i need an .htaccess file that will rewrite the index.php?request=params to pretty urls index.php/params... If someone got an htaccess file can you please share it with me? thank you P.S if an admin reads this topic please delete it not ban me thanks
  19. yeah i know that filter functions are awsome there is not way you can't love them and not start using them when you have everything you need right there . And yes i think it's really hard to make this class work out the way it should be i need to consider many things, approaches, and existing functions not only regular expressions.
  20. Hello guys, been a while since i posted around here. I`m trying to build a validation class and i was wondering what were the most often PCRE expressions that you use in your projects, and for what are they used? I`m trying to make a validation class with some predefined PCRE expressions.
  21. it is our choice .. we decided.. what we are going to use for our project.
  22. Yeah that was the first choice at the start..but e decided.. to use something made by us not by others:P
  23. Hello guys.. i`m building with a friend a small php framework for personal purposes. we've build a small ini parser class but we decided today that in the end we want to store out configuration settings in xml files but they are so many options out there that we can't decide on what approach should we take. 1. Building a custom class. 2. Using DOM from php 3. Usign SimpleXML from php What is you advice?
  24. for the second one pot stick you can use it for making schnitzel and other sortiments of food.
  • 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.