Jump to content

xox

Members
  • Posts

    44
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

xox's Achievements

Member

Member (2/5)

0

Reputation

  1. I'm writing php modul that has front-end(user) and back-end (admin) I can show you how it should look like in front-end http://imageshack.us/photo/my-images/214/screenhe.png/ Values bellow the select box are changing depending on option selected above. This entries can be unlimited. I know how to this but, my issue is how to make user friendly admin form. Admin must enter values in select box, size,price and also bolded text. Because this options aren't limited in no way I must make it so that admin can add fields - in short dynamic form. Any ideas?
  2. Well that's OK if you know how many input boxes you have, but I don't, that's the problem. My script is creating input boxes on the fly, depending on values in database (mysql). An example of my code for date input field <?php if($row['fieldtype'] == 'd') //d as date { $date++; ?> <input class="textFieldXXL" type="text" name="textboxRes[]"[b] id="datum<?php echo $date;?>"[/b] maxlength="50" value="" /> <img class="eFormsHelp" src="date.jpg" id="date<?php echo $count;?>" /> <LABEL class="inputDescription" FOR="desc"><?php echo $row['description'];?></LABEL> <div class="eFormsError"> <div id=divDatum<?php echo $date;?>> </div> </div> <?php } I've bolded where the problem is...
  3. Hello, I'm using date picker for my input boxes that needs date as input, everything works ok on an simple example like this css+js <style type="text/css"> @import "kolendar_stil.css"; </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script type="text/javascript" src="kolendar.js"></script> <script type="text/javascript"> $(function() { $('#popupDatepicker').datepick(); $('#inlineDatepicker').datepick({onSelect: showDate}); }); function showDate(date) { alert('The date chosen is ' + date); } </script> input (ISSUE only first textbox get's calender) <p>a <input type="text" id="popupDatepicker"></p> <p>b <input type="text" id="popupDatepicker"></p> <p>c <input type="text" id="popupDatepicker"></p> This was just an example, here is my code of what I'm trying <?php if($row['fieldtype'] == 'a') { $date++; ?> <style type="text/css"> @import "kolendar_stil.css"; </style> <script type="text/javascript"> $(function() { $('#date').datepick(); }); </script> <input class="textFieldXXL" type="text" name="textboxZamenjava[]" id="date<?php echo $date;?>" maxlength="50" value="" /> <img class="eFormsHelp" src="help.jpg" id="pomoc<?php echo $stej;?>" /> <LABEL class="inputDescription" FOR="desc"><?php echo $row['description'];?></LABEL> <div class="eFormsError"> <div id=divDate<?php echo $date;?>> </div> </div> But JS date picker won't show up, what' could be the issue? Here's the source of whole script, but I think there is no issue http://pastebin.com/RfgtkUzs
  4. Hello, I'm using phpmailer for this job, and what I want is that in first mail user gets only text and in second he gets text with attachment. But code below is only sending me the mail with attachment(second mail), what is cosing this problem? Here's the code for ($i=0; $i<2; $i++) { if (!class_exists("phpmailer")) { require("PHPMailer/class.phpmailer.php"); } if ($price != 0 ) { $mail = new PHPMailer(); $mail->CharSet = 'UTF-8'; $mail->From = "domain@d.com"; $mail->FromName = "Company"; $mail->AddAddress($email, ""); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = "Subjcet"; $mail->Body = $content; } if ($i == 1 || $price == 0 ) { //require("PHPMailer/class.phpmailer.php"); $mail = new PHPMailer(); $mail->CharSet = 'UTF-8'; $mail->From = "domain@d.com"; $mail->FromName = "Company"; $mail->AddAddress($email, ""); $mail->WordWrap = 50; $mail->IsHTML(true); $mail->Subject = "Subjcet"; $mail->Addattachment ("file/patch".$fileName, ); // patch and name of an attachment } }
  5. Hello, I have a form that has a preview, before user can preview the form inputs he must login. If he is logedin, he can see preview and continue to editing form, but after user is finished with editing his values he is redirected to "preview" page for which he must be logged in. But the problem is that variables are "empty" after redirecting back to preview. $_POST['email'] is received from login.php $_SESSION['code'] is 5 digit code generated at start, it isn't important in this issue. Here's the code: preview.php $id_user= 0; $code = $_SESSION['code']; $email = $_POST['email']; $_SESSION['email_login'] = $email; So now you can see that $email and $_SESSION['email_login'] are empty because when redirecting from "editing" to preview $_POST['email'] can't be found...
  6. Problem remains, or should I say, things are even worse. Here's my processing script <style type="text/css"> <!-- div.media-box{ float:left; margin-right:40px; overflow: hidden; background-color:#CCCCFF; padding:3px; margin-bottom: 10px; border:1px solid #fff; color:#CC0000; } .media-box img{ background-repeat: repeat-x; background-position: center; margin:5px; } .clearrow{ clear:both; } --> </style> <div id="mediaboxes"> <?php $query = "SELECT DISTINCT k.ID, k.name_category, pk.name_subcategory, pk.id_subcategory FROM `categories` AS k LEFT JOIN `subcategories` AS pk ON pk.id_main_category = k.ID"; $result = mysql_query($query) or die(mysql_error()); $currentCat = false; while($row = mysql_fetch_array($result)) { if($currentCat != $row['ID']) { $i++; if ($i==4 || $i==8 || $i==12 || $i==16) { ?> <div class="clearrow"></div> <?php } ?> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b><?php echo $row['name_category'] ?></b> <?php $currentCat= $row['ID']; } ?> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=<?php print $row['id_subcategory'];;?>"><?php print $row['name_subcategory'] ?></a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> <?php } ?> And here is output generated by above script <!-- START: Content --> <div class="contentContainer clearfix"> <div class="wideMainContent"> <div class="article"> <h6 class="font"> E-obrazci</h6> <style type="text/css"> <!-- div.media-box{ float:left; margin-right:40px; overflow: hidden; background-color:#CCCCFF; padding:3px; margin-bottom: 10px; border:1px solid #fff; color:#CC0000; } .media-box img{ background-repeat: repeat-x; background-position: center; margin:5px; } .clearrow{ clear:both; } --> </style> <div id="mediaboxes"> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b>Test text</b> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=95">Text bottom</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b>Test text</b> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=99">Bottom text</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b>Izvršba</b> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=96">bottom text</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> <div class="clearrow"></div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b>Test text/b> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=100">Bottom text</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=103">Bottom text</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b>Test text</b> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=105">bottom text</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b>Test text</b> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=101">Bottom text</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> </div> </div> <div id="extra-box"> <p> <a href="?action=xxx&id=102">Bottom text</a></p> <input type="button" value="Back" onClick="history.go(-1);return true;"> </div> </div> </div>
  7. The problem I'm getting now is that div is closed to early when more than one line is written. Can you help me out with it? Here's the source: <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /> <b>Test text</b> <p> <a href="?action=xxx&id=100">Text bottom</a> </p> </div><!-- here's the problem --> <p> <a href="?action=xxx&id=103">Text bottom</a> </p> </div> Your blog is already in my favorites.
  8. I've misunderstood you, sorry. Here's the source <!-- START: Content --> <div class="contentContainer clearfix"> <div class="wideMainContent"> <div class="article"> <h6 class="font"> Testing</h6> <style> <!-- div.media-box{ float:left; margin-right:40px; overflow: hidden; background-color:#CCCCFF; padding:3px; margin-bottom: 10px; border:1px solid #fff; color:#CC0000; } .media-box img{ background-repeat: repeat-x; background-position: center; margin:5px; } --> </style> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /><b>Test text</b> <p><a href="?action=xxx&id=95">Text bottom</a> </p> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /><b>Test text</b> <p><a href="?action=xxx&id=99">Text bottom</a> </p> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /><b>Test text</b> <p><a href="?action=xxx&id=96">Text bottom</a> </p> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /><b>Test text</b> <p><a href="?action=xxx&id=100">Text bottom</a> </p> </div> <p><a href="?action=xxx&id=103">Text bottom</a> </p> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /><b>Test text</b> <p><a href="?action=xxx&id=105">Text bottom</a> </p> </div> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /><b>Test text</b> <p><a href="?action=xxx&id=101">Text bottom</a> </p> </div> <p><a href="?action=xxx&id=102">Text bottom</a> </p> </div> <input type="button" value="Back" onClick="history.go(-1);return true;">  </div> </div>
  9. This is the whole code I've written <style> <!-- div.media-box{ float:left; margin-right:40px; overflow: hidden; background-color:#CCCCFF; padding:3px; margin-bottom: 10px; border:1px solid #fff; color:#CC0000; } .media-box img{ background-repeat: repeat-x; background-position: center; margin:5px; } --> </style> <?php $query = "SELECT DISTINCT k.ID, k.name_category, pk.name_subcategory, pk.id_subcategory FROM `categories` AS k LEFT JOIN `subcategories` AS pk ON pk.id_main_category = k.ID"; $result = mysql_query($query) or die(mysql_error()); $currentCat = false; while($row = mysql_fetch_array($result)) { //so it doesn't repeat if($currentCat != $row['ID']) { ?> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> //main category output <br /><b><?php echo $row['name_category']?></b> <?php $currentCat = $row['ID']; } //subcategory output ?> <p><a href="?action=xxxx&id=<?php print $row['id_subcategory'];?>"><?php print $row['name_subcategory'] ?></a> </p> </div> <? } ?> Well I know how to make image as background in CSS but is this possible inside .media-box img class? Because I will get images from mysql with something like this <img src="images/'.$row['path']." alt="" /> and I believe php inside css isn't possible.
  10. Thanks for you help, this is what I was looking for! But now I have a slight problem with more than one line of text under the image,you can see in screen shot that text is on the right side... totally wrong place. The problem is also that the last two boxes doesn't have links like others have and "test text" isn't bold. Also how could I make image as background with this solution you've posted? The image with the problem described is attached to this post. CSS div.media-box{ float:left; margin-right:40px; overflow: hidden; background-color:#CCCCFF; padding:3px; margin-bottom: 10px; border:1px solid #fff; color:#CC0000; } .media-box img{ background-repeat: repeat-x; background-position: center; margin:5px; } HTML/PHP <?php $query = "SELECT DISTINCT k.ID, k.name_category, pk.name_subcategory, pk.id_subcategory FROM `categories` AS k LEFT JOIN `subcategories` AS pk ON pk.id_main_category = k.ID"; $result = mysql_query($query) or die(mysql_error()); $currentCat = false; while($row = mysql_fetch_array($result)) { //so it doesn't repeat if($currentCat != $row['ID']) { ?> <div class="media-box"> <img src="http://i55.tinypic.com/2d962ww.png" alt="" /> <br /><b>{$row['name_category']}</b> <?php $currentCat = $row['ID']; } ?> <p><a href="?action=xxx<?php print $row['id_subcategory'];?>"><?php print $row['name_subcategory'] ?></a></p> </div> <? } ?> [attachment deleted by admin]
  11. I wonder how image galleries work... they show everything in grid...
×
×
  • 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.