Jump to content

Ricklord

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Everything posted by Ricklord

  1. Thank you so much. I will get to it later today.
  2. Still looking for any input on this one ???
  3. Oh i thought you might need the code from the new_ticket.php file the form is posted to: <?php include_once("config.php"); include_once("header.php"); if(isset($post_vars['act'])) { $act=$post_vars['act']; } else { $act=""; } switch($act) { case NULL: // Open a ticekt form $supp_obj->open_a_ticketfrm($supp_obj,$session_vars,$generic_msg); break; case "openticket": $return_vars=$supp_obj->submit_ticket($supp_obj,$session_vars,$post_vars,$generic_msg,$file_vars); //print_R($return_vars); if($return_vars['status']==false) { $post_vars['status_msg']=$return_vars['status_msg']; $supp_obj->open_a_ticketfrm($supp_obj,$session_vars,$generic_msg,$post_vars); } break; } include_once("footer.php"); ?> and also this is the javscript code above the form <script language="JavaScript"> function validate_ticket(frm) { with(frm) { var flag1=validate_field(client_name,'{{cNoname}}'); if(flag1==false) { return false; } if(!isEmailAddress(email.value)) { alert('{{cNoemail}}'); email.focus(); return false; } {{custom_javascript}} var flag1=validate_field(pass_word,'{{cNopassword}}'); if(flag1==false) { return false; } if(pass_word.value!=password_confirm.value) { alert("{{cPasswordmismatch}}"); return false; } var flag3=validate_field(dept_id,'{{cNodepartment}}'); if(flag3==false) { return false; } var flag1=validate_field(priority_id,'{{cNopriority}}'); if(flag1==false) { return false; } var flag1=validate_field(subject,'{{cNosubject}}'); if(flag1==false) { return false; } var flag1=validate_field(message,'{{cNomessage}}'); if(flag1==false) { return false; } return true; } } </script>
  4. Hi Guys, The form below is part of a new ticketing system i am playing around with. I dont know much about it yet but i want to add a mandatory checkbox to the form and also a text area which contains my terms and conditions. The form below is part of submitting a new ticket and before they can do so i want them to have to check the box below my terms and conditions saying they have read and agree. I'm no expert on forms but im guessing this could be acheived by adding a text area and a checkbox. Most important thing >>>> If the checkbox is not checked i want a pop up warning to pop up saying please tick the box or something like that. Heres the form anyway: <form name="new_ticket" method="post" action="new_ticket.php" onSubmit="return validate_ticket(document.new_ticket);" enctype="multipart/form-data" > <input type="hidden" name="act" value="openticket"> <div class="sub-heading"> {{cClient_newtickettitle}} </div> <div class="formheading"> <span class="label"> {{cLogin_direct}} </span> </div> <div class="formrow"> <span class="label">{{cClient_fullname}}:</span> <span class="field"><input name="client_name" type="text" class="singleline-field" id="full_name" value="{{client_name}}" /> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cClient_phone}} : </span> <span class="field"> <input type="text" name="phone" value="{{phone}}" class="singleline-field"> </span> </div> <div class="formrow"> <span class="label"> {{cClient_email}} : </span> <span class="field"> <input type="text" name="email" value="{{email}}" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <{customfields_loopstart}> <div class="formrow"> <span class="label"> <{field_name}> : </span> <span class="field"> <{draw_field}> </span> </div> <{customfields_loopend}> <div class="formrow"> <span class=label> {{cDepartment}} : </span> <span class="field"> <select name="dept_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{dept_loopstart}> <option value="<{dept_id}>" <{selected}> ><{dept_name}></option> <{dept_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_priority}} : </span> <span class="field"> <select name="priority_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{priority_loopstart}> <option value="<{priority_id}>" <{selected}> ><{priority_name}></option> <{priority_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_subject}} : </span> <span class="field"> <input type="text" name="subject" value="{{subject}}" class="textarea-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_message}} : </span> <span class="field"> <textarea name="message" cols="{{cols}}" rows="{{rows}}" class="textarea-field" id="comments">{{message}}</textarea> <span class="mandatory-fld"> * </span> </span> </div> <{attachment_start}> <div class="formrow"> <span class=label> {{cTicket_attachment}} : </span> <span class="field"> <input type="file" name="attachment" value="" size="50" /> ({{cMax}} {{attachment_size}} {{cKb}}) </span> </div> <{attachment_end}> <div class="formheading"> <span class="label"> {{cProvide_password}} </span> </div> <div class="formrow"> <span class="label"> {{cPassword}} : </span> <span class="field"> <input type="password" name="pass_word" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="label"> {{cPassword_confirm}} : </span> <span class="field"> <input type="password" name="password_confirm" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="field"> <input type="submit" name="Submit" value="{{cSubmit}}" class="stdbutton-field" /> <input type="reset" name="reset" value="{{cReset}}" class="stdbutton-field" /> </span> </div> </form> I also have a number of other forms i will want to add this feature too so if anyone edits the code please highlight the part you added for me to see easily and then i can just copy it to my otehr forms. Thanks in advance
  5. Solved. If anyone else is interested in knowing this is what i found. After doing some text searches i managed to find a file stored in the helpdesk directory called genric.php in this file it defines what should go where it says: line89 in file below {{cClient_fullname}} I just changed it in there so now everywhere within the help desk software instead of it saying Full Name it says Company Name... YAY!!!!
  6. Hi Guys, I've just got the free version of helpdeskpilot availablel from there website www.helpdeskpilot.com I've had it for 15 minutes got it installed and already want to make some minor changes just to get the ball running. The first thing i notice is the forms are stored in template files (.tpl) so it is these files i want to edit. When a customer submits a ticket for the first time they have to enter there details which are used for loging in next time to check the status. At present on the form it says Full Name: which would be Joe Bloggs. Now what i want to do is change the text output instead of Full Name: i want Company Name: Reason for this is becuase this field is key for tarcking activity. I want to leave teh actual field ID's the same so i dont have to change it all over the software but just change the out put text on the form. Anyway heres the template file and the line in question is around line 89. I was wondering how i could make this out put as Company Name, rather than Full Name????? You can see the form on my test site here: http://www.creativecogs.com/support/new_ticket.php?tab=tickets Oh yeah and heres teh code for that page: <script language="JavaScript"> function validate_ticket(frm) { with(frm) { var flag1=validate_field(client_name,'{{cNoname}}'); if(flag1==false) { return false; } if(!isEmailAddress(email.value)) { alert('{{cNoemail}}'); email.focus(); return false; } {{custom_javascript}} var flag1=validate_field(pass_word,'{{cNopassword}}'); if(flag1==false) { return false; } if(pass_word.value!=password_confirm.value) { alert("{{cPasswordmismatch}}"); return false; } var flag3=validate_field(dept_id,'{{cNodepartment}}'); if(flag3==false) { return false; } var flag1=validate_field(priority_id,'{{cNopriority}}'); if(flag1==false) { return false; } var flag1=validate_field(subject,'{{cNosubject}}'); if(flag1==false) { return false; } var flag1=validate_field(message,'{{cNomessage}}'); if(flag1==false) { return false; } return true; } } </script> <br /> <div class="tickets-main"> {{cNew_ticket}} </div> <{errormsg_start}> <div class="errormsg"> {{status_msg}} </div> <{errormsg_end}> <div class="form-container"> <form name="new_ticket" method="post" action="new_ticket.php" onSubmit="return validate_ticket(document.new_ticket);" enctype="multipart/form-data" > <input type="hidden" name="act" value="openticket"> <div class="sub-heading"> {{cClient_newtickettitle}} </div> <div class="formheading"> <span class="label"> {{cLogin_direct}} </span> </div> <div class="formrow"> <span class="label">{{cClient_fullname}}:</span> <span class="field"><input name="client_name" type="text" class="singleline-field" id="full_name" value="{{client_name}}" /> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cClient_phone}} : </span> <span class="field"> <input type="text" name="phone" value="{{phone}}" class="singleline-field"> </span> </div> <div class="formrow"> <span class="label"> {{cClient_email}} : </span> <span class="field"> <input type="text" name="email" value="{{email}}" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <{customfields_loopstart}> <div class="formrow"> <span class="label"> <{field_name}> : </span> <span class="field"> <{draw_field}> </span> </div> <{customfields_loopend}> <div class="formrow"> <span class=label> {{cDepartment}} : </span> <span class="field"> <select name="dept_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{dept_loopstart}> <option value="<{dept_id}>" <{selected}> ><{dept_name}></option> <{dept_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_priority}} : </span> <span class="field"> <select name="priority_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{priority_loopstart}> <option value="<{priority_id}>" <{selected}> ><{priority_name}></option> <{priority_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_subject}} : </span> <span class="field"> <input type="text" name="subject" value="{{subject}}" class="textarea-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_message}} : </span> <span class="field"> <textarea name="message" cols="{{cols}}" rows="{{rows}}" class="textarea-field" id="comments">{{message}}</textarea> <span class="mandatory-fld"> * </span> </span> </div> <{attachment_start}> <div class="formrow"> <span class=label> {{cTicket_attachment}} : </span> <span class="field"> <input type="file" name="attachment" value="" size="50" /> ({{cMax}} {{attachment_size}} {{cKb}}) </span> </div> <{attachment_end}> <div class="formheading"> <span class="label"> {{cProvide_password}} </span> </div> <div class="formrow"> <span class="label"> {{cPassword}} : </span> <span class="field"> <input type="password" name="pass_word" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="label"> {{cPassword_confirm}} : </span> <span class="field"> <input type="password" name="password_confirm" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="field"> <input type="submit" name="Submit" value="{{cSubmit}}" class="stdbutton-field" /> <input type="reset" name="reset" value="{{cReset}}" class="stdbutton-field" /> </span> </div> </form> <div class="mandatory-txt"> {{cMandatory_txt}} </div> </div> <script language="JavaScript"> document.new_ticket.client_name.focus(); </script> Any ideas what to change or where to look next? Rick
  7. Hi, Thanx for that reply. 1.let me see if i got a few things straight. NOT NULL would mean something has to be entered in this field and NULL allows the field to be blank. 2.Default text area, i guess would be used for example a login page, so username field come be defaulted to say... <enter your username here> 3.the extra column i will leave blank for now as you suggested 4.as for the reply about using SERIAL as a type. the guide i am using that tells me to use this type is a PHP & MySQL everyday apps for dummies guide. All i can tell you is that ti am using procedural approach instead of object oriented. Is this the best way? Also i have looked down my list for AUTO_INCREMENT type but i cant find it. Any other suggestions. 5. Im still a little worried about the collation column, can i leave this or does it need to be used? more feedback still needed for clarification on above please. thanks in advance rick
  8. Hi, Im having problems when it comes to adding the tables to by database. I am following a dummies guide book on creating a CMS. I have created the database but the guide isnt very clear when it comes to the information stored in the tables. This is just a few of the fields i have got for 1 of the tables: Table name: dept_user Field names and details seperated by <> Field:user_name <> Type:VARCHAR(255) <> Primary Key Field:dept_id <> Type:INT Field:password <> Type:VARCHAR(255) There is 7 fields in total but these are the 3 different types for the first table. I am using phpmyadmin on my hosting server to configure the tables and i have the ability to create the table and get to the page where i need to add the fields. I have started adding the fields but become concerend when i was leaving alot of empty boxes for each field. For example: Field = name (ok) Type = VARCHAR (ok) Lengh/Values = 255 (not to sure on this one but am i right here?) Collation = (i have no idea what this is for) Attributes = (i have no idea what this is for) Null= (null or not null????, i dont know which to choose) Default= (free text field, again dont know what for) Extra= (dont know what this is for) Then at the end of the row i get to choose primary key/index/unique/full text or leave radio button with --- above it selected. Ok so now i hav etried to explain that as best i can i guess what im after is to find out if the fields i am not sure about are important and if so what value they should be? The main one is Collation as im guessing i need to pick something from the drop down menu here. Finally on all of the other tables i need to create, they all have a field with type set to { SERIAL } when i look down the type drop down menu i cant see this on there. What should i use instead and would i need to change anything in my php files which link to this or has the SERIAL type been replaced with another type???? I hope i have explained my self so you guys can understand me. Im kinda new to phpmyadmin and mySQL but ive got to start somewhere and as i need a CMS i thought id do it myself from the dummies guide i have. Thanks for any responses in advance Rick
  9. Ok so we fixed the pargraph issue and i have now changed my top images for my containers to be 10px high so the padding looks nice all the way around. In IE it keeps the line height to 20px but in firefox it works fine. one exaxmple below. [code] #content_top { width:580px; height:10px; background-image:url(images/content_top.gif); background-repeat:no-repeat; } [/code] i have tried max-height but this doesnt work either. In the container in the html there is nothing there so look slike this [code] <div id="content_top"></div> [/code] any fixes for this IE problem? cheers Rick
  10. Thanks Wildteen I haven't done it the way you suggested but your suggestions opened my eyes to something i wasnt seeing. I have created my styles in my CSS i.e content_p and content_h1 Then just used <span class="content_h1">Example Header here</span> This seems to do the trick and i can still manager my font styles from within the CSS. Cheers again Rick
  11. What if i wanted to define 2 different styles i.e headers and paragraphs? Rick
  12. Hi Guys, I have created yet another test site but this one will demonstrate an ecommerce store. you can view the page here [url=http://www.creativecogs.co.uk/ecommerce_demo]www.creativecogs.co.uk/ecommerce_demo[/url] If you view the page in IE its fine but if you view it in firefox the background image of the containers has a gap when i add text using <P>example text here</P> Any suggestions on how to fix this? my code is below. CSS for container [code] #content_main { float:right; width: 580px; } #content_top { width:580px; height:20px; background-image:url(images/content_top.gif); background-repeat:no-repeat; } #content_body { width:545px; padding: 0px 0px 0px 0px; background-image:url(images/content_body.gif); background-repeat:repeat-y; } #content_bottom { width:580px; height:20px; background-image:url(images/content_bottom.gif); background-repeat:no-repeat; } [/code] HTML used in this container [code] <div id="content_main"> <div id="content_top"></div> <div id="content_body">   <p>Example text here</p> </div> <div id="content_bottom"></div> </div> [/code] Its the paragraph which is throwing the formatting out but i need to use pargraphs to define text style in my style sheet dont I??? Cheers Rick
  13. Cheers Andy, Managed to get it to work now, not sure if its the corrent way but looks alot tidier now its in CSS with the rest of the page. That site was helpful but didnt give me the exact answer. Cheers again Rick
  14. Can you post the code?
  15. dont know if thi is right but i was having problem with padding in IE aswell so i tried margin instead for my stuff and it solved the problem and works in FF and IE. Rick
  16. Could you use position:fixed; ? I think this works in FF but not to sure about IE. Rick
  17. Ricklord

    CSS Font Size

    Hi, I would use something like font size 12px and font style tahoma with a line height of 140% for my main content of a site. see below for example style: [code] content p {       font-family: Tahoma;       font-size : 12px;       font-weight : normal;       text-align:justify;       color : #000000;       background-color : transparent;       line-height : 140%; } [/code] I've never had a problem with this in any browsers. As for having different font sizes for different text just give the style another name. like in my example i have got -content p- for paragraph if i wanted a header i would create another style called -content h1- then -h2- and so on. Naming the styles this way will link to the main container called content so if you have a container called sidebar for news you would use -sidebar p- or -sidebar h1- and so on. If creating links use -content a- and define the style for the link and then use -content a:hover- to define what the text would look like if you hover over the link. Also to get rid of the underline which is created in prgrams like dreamweaver add -text-decoration: none;- to the style for links. Hope this helps. Rick
  18. Hey Guys, Im creating a demo store for my website and was just wondering if some one could help me with a small problem. If you look at the site here [url=http://www.creativecogs.co.uk/ecommerce_demo]www.creativecogs.co.uk/ecommerce_demo[/url] The side bar and the 2 content areas have been set up in my CSS but i have had to put tables in to be able to get the background to expand as content is added. Is there away to get the backgorund image to expand without using a table? At the moment i have got the 2 containers as below and then just inserted tables into the containers with 3 rows and split the image for top, body and bottom so that the body cell will expand and the background will repeat. css for this part [code] #sidebar { float:left; width: 200px; background-color:#FFFFFF; } #content { float:left; width: 580px; background-color:#FFFFFF; } #footer { clear:both; width: 780px; height: 30px; padding: 10px 0 0 0; text-align:center; background-image:url(images/footer.gif); background-repeat:no-repeat; }[/code] HTML with how i have added the tables and looks messy which is why i want to get it all in CSS if possible [code] <div id="sidebar">   <table width="200" border="0" cellpadding="0" cellspacing="0">     <tr>       <td width="200" height="20" background="images/sidebar_top.gif">&nbsp;</td>     </tr>     <tr>       <td width="200" height="20" background="images/sidebar_body.gif"><p>&nbsp;</p>         <p>&nbsp;</p>         <p>&nbsp;</p>         <p>&nbsp;</p>         <p>&nbsp;</p>         <p>&nbsp;</p></td>     </tr>     <tr>       <td width="200" height="20" background="images/sidebar_bottom.gif">&nbsp;</td>     </tr>   </table> </div> <div id="content"><table width="580" border="0" cellpadding="0" cellspacing="0">   <tr>     <td width="580" height="20" background="images/content_top.gif">&nbsp;</td>   </tr>   <tr>     <td width="580" height="20" background="images/content_body.gif"><p>&nbsp;</p>       <p>&nbsp;</p>       <p>&nbsp;</p>       <p>&nbsp;</p>       <p>&nbsp;</p></td>   </tr>   <tr>     <td width="580" height="20" background="images/content_bottom.gif">&nbsp;</td>   </tr>   <tr>     <td width="580" height="20" background="images/special_top.gif">&nbsp;</td>   </tr>   <tr>     <td width="580" height="20" background="images/special_body.gif"><p>&nbsp;</p>       <p>&nbsp;</p>       <p>&nbsp;</p>       <p>&nbsp;</p></td>   </tr>   <tr>     <td width="580" height="20" background="images/special_bottom.gif">&nbsp;</td>   </tr> </table> </div>[/code] I have tried to do this a couple of ways but i always loose the order of my containers and it ends up being all messy. If anyone knows what i need to do please can you post example code or point me in the direction of the code i need to change/include. Thanks in advance Rick
  19. anyone got any suggestions on this one? cheers Rick
  20. Sorry forgot to add this. instead of the echo command can i use a function/command which will forward to an error page rather than printed text. Cheers Rick
  21. Hi Guys, I been trying to use some tuturials to add a email validator to my current email script. this is what ive come up with so far. [code]<?php header("Location: http://www.creativecogs.co.uk/web_design/thankyou.html"); if(isset($_POST['submit'])) { $to = "rick@creativecogs.co.uk"; $subject = "Web Design Online enquiry"; $name_field = $_POST['name']; $email_field = $_POST['email']; $telephone_field = $_POST['telephone']; $message = $_POST['message']; $header = "From: {$name}<{$email_field}>"; function checkemail($email_field){     return preg_match("/^[^\s()<>@,;:\"\/\[\]?=]+@\w[\w-]*(\.\w[\w-]*)*\.[a-z]{2,}$/i",$email_field);  } if((!$email_field) OR (!checkemail($email_field))){ echo ' - You did not enter a valid e-mail address.'; exit; }   foreach($_POST['check'] as $value) { $check_msg .= "Checked: $value\n"; }   $body = "From: $name_field\n E-Mail: $email_field\n Telephone: $telephone_field\n $check_msg Option: $option\n Message: $message";   echo "Data has been submitted to $to!"; mail($to, $subject, $body, $header);   } else { echo "failed please try again"; } ?> [/code] If i take the header out the checker will follow the echo command when an email address is invalid which is what i want but i also want to forward to my thankyou page if the email is valid. I'm not a php coder i just learn as i go, take tuturials learn what they do and then change them to fit my needs. If some one could point out how i can correct this i would be greatful. Is there another comand to use which i can put at the end of the script to forward onto my thankyou page? from my understanding the header command has got to be at the top of the script and will be executed first so teh user would get redirected before the check is actually done in my above example. Any help will be great Cheers Rick
  22. thanks for comment Andy, them stats you posted also show that more than 70% use 1280x1024 or higher. But with you saying thats like turning away 3 out of 10 customers, thats a different thing all together so probably best to stick to 800x600 then. Cheers Rick
  23. Hey Guys Screen res question. If were going to do this idea we might design the site at a screen res of 1024x768 in hope we will be able to fit more content into the pages. I have done some research and found statistics which show more than 70% of people use this resolution or higher and only 20% of people use 800x600. I have got my stats from here [url=http://www.w3schools.com/browsers/browsers_stats.asp]http://www.w3schools.com/browsers/browsers_stats.asp[/url] Any one think this is a bad idea? Rick
  24. Hi, Just wanted to say i like the site very simple and easy to follow. My concerns > > It is very white and although this is gives you a simple look i think it can be to simple just my opinion. > Lack of information, I don't know exactly what the site does. I gather it allows people to advertise things for free by the looks of it, but i would want to know more detail about why i should use you rather than someone else. > Apart from that its a nice straightforward site. Rick
×
×
  • 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.