Jump to content

MarcP

Members
  • Posts

    40
  • Joined

  • Last visited

MarcP's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thank You, I'm a newbie to php, can you give me an example? or point me to an example that I can look at?
  2. I would like some code to countdown 10 days. At the end of 10 days the user would be redirected to a webpage. I would prefer a server side language. Can't I utilize the following code to determine the countdown starting point?? <?php $d=strtotime("+10 Days"); echo date("M-d-Y h:i:sa", $d) . "<br>"; ?> The following code works but I would prefer not to set a specific date. HERE'S THE CODE THAT I HAVE SO FAR <?php date_default_timezone_set("America/New_York"); $days = 11; // Day of the countdown $month = 2; // Month of the countdown $year = 2016; // Year of the countdown $hours = 20; // Hour of the day (east coast time) $event = "Your Trial period expires."; //event $calculation = ((mktime ($hours,0,0,$month,$days,$year) - time())/3600); $hours = (int)$calculation; $days = (int)($hours/24); if ($hours <= ("0")) { echo '<script>window.location.href = "TRIALPAGE_B.html";</script>'; } ?> <ul> <li>The date is <?=(date ("l, jS \of F Y g:i:s A"));?>.</li> <li>It is <?=$days?> days until <?=$event?>.</li> <li>It is <?=$hours?> hours until <?=$event?>.</li> </ul>
  3. MarcP

    30 day demo?

    I could use some help here.....I currently am using a compiler to create some simple software. This compiler utilizes a "recipe". This "recipe" contains tags which look like this...[#tags#]. When you run your created software it will ask you for a question pertaining to that specific tag. At the end you may "Preview" your result and this will open up in a browser window. Pretty much any computer language can be used with this compiler but I prefer html and javascript. My dilemma, how can I create a 30 day demo of the software that I create?? I've tried numerous countdowns but was unsucessful. Below is a sample "recipe" for a piece of software that helps you create a press release. Contact Information: [#Company/Individual#] [#Email Address#] [#Street Address Only#] [#City and State#] [#Zip Code#] [#Phone w/ Area Code#] [#Company/Individual#] Announces the Launch of [#Product#] FOR IMMEDIATE RELEASE [#City and State#] - [#Company/Individual#] is excited to announce the launch of [#Product#]. [#Description and Basics#]. The official launch date for [#Product#] is [#Launch Date#]. [#Company/Individual#] believes [#Product#] will will appeal to the newbie, the novice and the experienced. [#More Details#] [#Product Launch Types of Marketing#] [#Quote someone related to this launch#] [#Boilerplate#] ###
  4. Here's what I have so far<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"><title>Colorformulator [#customer#] [#date#]</title><style type="text/css"><!--.fontforsheet { font-family: Arial, Helvetica, sans-serif; text-align: right; color: #333;}.fontforsheet p { color: #6AA957; font-weight: bold; text-align: center;}.fontforsheet table tr td { color: #6AA957; font-weight: normal; text-align: center;}.background { color: #333333;}.style { font-weight: bold;}.letstyle {}.fontforsheetp { font-family: Arial, Helvetica, sans-serif; color: #FCFDFE;}.fontforsheetp { color: #6AA957;}.fontforsheetp { font-weight: bold; text-align: center;}.fontforsheetp table tr td { text-align: center;}--></style></head><body bgcolor="#333333" class="fontforsheetp"><table width="1000" border="0" align="center"> <tr> <th class="fontforsheet" scope="col"><p>Color Formula Results Page</p> <p> </p> <table width="450" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="218"><span class="style">Client / Customer Name</span>: </td> <td width="232"><font color ="#FFFFFF">[#customer#]</font></td> </tr> </table> <table width="450" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td width="140"><span class="letstyle">Street Address</span>:</td> <td width="310"><font color ="#FFFFFF">[#address#]</font></td> </tr> </table> <p> </p> <table width="450" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="148"><span class="letstyle">Contact Number</span>: </td> <td width="302"><font color ="#FFFFFF">[#phone#]</font></td> </tr> </table> <table width="450" border="0" align="right" cellpadding="0" cellspacing="0"> <tr> <td width="140" class="letstyle">City, State, Zip :</td> <td width="310"><font color ="#FFFFFF">[#citystatezip#]</font></td> </tr> </table> <p> </p> <table width="450" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="148">Date: </td> <td width="302"><font color="#FFFFFF">[#date#]</font></td> </tr> </table> <p> </p> <p> </p> <p>Below is the information that you entered into the software. Please make sure that it is correct,</p> <p> if it is not, then go back to the software and re-enter your information</p> <p> </p> <table width="329" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="135" class="letstyle">Existing Level:</td> <td width="194"><font color ="#FFFFFF">[#existinglevel#]</font></td> </tr> </table> <table width="330" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="134" class="letstyle">Existing Tone:</td> <td width="196"><font color ="#FFFFFF">[#existingtone#]</font></td> </tr> </table> <table width="330" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="144"><div align="justify" class="letstyle"> Amount of Grey:</div></td> <td width="186"><font color ="#FFFFFF">[#percent#]</font> % </td> </tr> </table> <p> </p> <table width="330" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="135" class="letstyle">Target Level:</td> <td width="195"><font color ="#FFFFFF">[#targetlevel#]</font></td> </tr> </table> <table width="310" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="135" class="letstyle">Target Tone:</td> <td width="175"><font color ="#FFFFFF">[#targettone#]</font></td> </tr> </table> <table width="330" border="0" align="left" cellpadding="0" cellspacing="0"> <tr> <td width="234" class="letstyle">Is Hair Previously Colored ?</td> <td width="96"><font color ="#FFFFFF">[#tint#]</font></td> </tr> </table> <p> </p> <p> </p> <p>Formula</p> <p>All Ratios are - (Color : Developer) </p> <p>If Possible All Amounts Will Converted To Millilitres (mls), Grams (g) and Ounces (oz)</p> <script type="text/javascript" language="javascript">var existinglevel = "[#existinglevel#]";var existingtone = "[#existingtone#]";var percent = "[#percent#]";var targetlevel = "[#targetlevel#]";var targettone = "[#targettone#]";var tint = "[#tint#]";var difference = targetlevel - existinglevel;var clr1 = targetlevel targettone;var clr1mls = devmls11 - nsmls;var clr1g = devg11 - nsg;var clr1oz = devoz11 - nsoz;var bleach = "Decolorizer (Bleach)";var blchamt = "App. 1 Level Scoop";var devmls11 = "40";var devoz11 = "1.0";var devg11 = "30";var devmls115 = "60";var devoz115 = "1.5";var devg115 = "45";var devmls12 = "80";var devoz12 = "2.0";var devg12 = "60";var nsmlsvar nsgvar nsoz var volvar r = "One way to buy back or replace red pigment into the hair is to mix 1 part of a red fill shade, that coincides with your target tone, with 2 - 3 parts water and apply to dry or towel dry hair. Blot excess and continue with the color treatment. DO NOT RINSE RED FILL SHADE PRIOR TO COLOR TREATMENT. Another way is to add additional red pigment to the color mixture, above and beyond, the total color mixed. Example - If your total color mixture is 75g, you would then add approximately a 1 inch ribbon of the red pigment or intensifier that coincides with your target color, to the mixture. Check with your color manufacturer as to their recommendations.<p>"var k = " "One way to buy back or replace copper pigment into the hair is to mix 1 part of a copper fill shade, that coincides with your target tone, with 2 - 3 parts water and apply to dry or towel dry hair. Blot excess and continue with the color treatment. DO NOT RINSE COPPER FILL SHADE PRIOR TO COLOR TREATMENT. Another way is to add additional copper pigment to the color mixture, above and beyond, the total color mixed. Example - If your total color mixture is 75g, you would then add approximately a 1 inch ribbon of the copper pigment or intensifier that coincides with your target color, to the mixture. Check with your color manufacturer as to their recommendations.<p>"var g = "One way to buy back or replace gold pigment into the hair is to mix 1 part of a gold fill shade, that coincides with your target tone, with 2 - 3 parts water and apply to dry or towel dry hair. Blot excess and continue with the color treatment. DO NOT RINSE GOLD FILL SHADE PRIOR TO COLOR TREATMENT. Another way is to add additional gold pigment to the color mixture, above and beyond, the total color mixed. Example - If your total color mixture is 75g, you would then add approximately a 1 inch ribbon of the gold pigment or intensifier that coincides with your target color, to the mixture. Check with your color manufacturer as to their recommendations.<p>"if (difference <= -2) { var vol = "0 Level Lift / 10"; } if (difference <= -2 & percentgrey >= "80") {var vol = "0 Level Lift / 10";}if (difference == -1) { var vol = "0 Level Lift / 10"; } if (difference == 0) { var vol = "0 Level Lift / 10"; } if (difference == 1) { var vol = "1 Level Lift / 20"; } if (difference == 2) { var vol = "2 Level Lift / 30"; } if (difference == 3) { var vol = "3 Level Lift / 40"; } if (difference == 4) { var vol = "4 Level Lift / 40" ;} if (vol == "4 Level Lift / 40" ) {document.write ( "If your target color is a Level 9 or 10 Blonde or to get a full 4 levels of lift you may need to use a high lift or blonding agent added to your color formula. You also have the option to do a 2 step process by decolorizing (bleaching) the hair one half to one level lighter and then toning to desired color." + "<p>" )}ORif (difference == 4 ) {document.write ( "If your target color is a Level 9 or 10 Blonde or to get a full 4 levels of lift you may need to use a high lift or blonding agent added to your color formula. You also have the option to do a 2 step process by decolorizing (bleaching) the hair one half to one level lighter and then toning to desired color." + "<p>" )}var percent = "[#percent#]";if (percent < 31 ) {var nsmls = "5 to 10";} if (percent < 51 & percent > 30) { var nsmls = "15"; } if (percent > 50) { var nsmls = "30"; }if (percent < 31 ) {var nsg = "0 to 5";} if (percent < 51 & percent > 30) { var nsg = "10"; } if (percent > 50) { var nsg = "15"; }if (percent < 31 ) {var nsoz = "up to .25";} if (percent < 51 & percent > 30) { var nsoz = ".25"; } if (percent > 50) { var nsoz = ".50"; }if (difference >= 3 & targetlevel <=5) { var clr2 = " " ; } if (difference >= 3 & targetlevel >=6 & targetlevel < 8 ) { var clr2 = ".1 or .01 Blue / Green Base " ; } if (difference >= 3 & targetlevel >=8 & < 11) { var clr2 = ".01 or .21 Blue Base " ; } if (difference >= 3 & targetlevel >=11) { var clr2 = ".21 Blue Violet or Violet Base " ; } if (difference >= 3 & targetlevel >=5) { var clr2mls = "10" ;}if (difference >= 3 & targetlevel >=5) { var clr2g = "10" ;}if (difference >= 3 & targetlevel >=5) { var clr2oz = ".25" ;}if (clr2mls=="10" & nsmls== "0") {var clr1mls = "30" ;}if (clr2mls=="10" & nsmls== "5 to 10") {var clr1mls = "20 to 25" ;}if (clr2mls=="10" & nsmls== "15") {var clr1mls = "15" ;}if (clr2mls=="10" & nsmls== "30") {var clr1mls = " " ;}if (clr2g=="10" & nsg== "0") {var clr1g = "20" ;}if (clr2g=="10" & nsg== "0 to 5") {var clr1g = "15" ;}if (clr2g=="10" & nsg== "10") {var clr1g = "10" ;}if (clr2g=="10" & nsg== "15") {var clr1g = "5" ;}if (clr2oz==".25" & nsoz== "0") {var clr1oz = ".75" ;}if (clr2oz==".25" & nsoz== "up to .25") {var clr1oz = ".50" ;}if (clr2oz==".25" & nsoz== ".25") {var clr1oz = ".50" ;}if (clr2oz==".25" & nsoz== "up to .50") {var clr1oz = ".25" ;}if (difference >= 3 & targetlevel >=5) { document.write ( "If you are lifting 3 or more levels then you must use control. The only time that control is not necessary is when you desire a Copper color as an end result. Check the info sheet and as always check with your color manufacturer's guidelines." + "<p>" ) } if (vol == "2 Level Lift / 30" ) {document.write ( "When lifting <b>from levels 2 - 7</b> the underlying pigment is <b>orange</b>. <br><b>*</b>When lifting <b>from levels 8 - 10</b> the underlying pigment is <b>yellow.</b><br><br>Blue base controls orange. <br>Green base also controls orange and reds. <br>Blue/Violet or Violet controls yellows. " + "<p>" )}if (vol == "3 Level Lift / 40" ) {document.write ( " <b>*</b> When lifting <b>3 or more levels</b> it is necessary to use some form of control to avoid unnecessary warmth. <i><b>unless</b></i> you are trying to achieve a Copper tone in the target color. <p><b>*</b>When lifting <b>from levels 2 - 7</b> the underlying pigment is <b>orange</b>. <br><b>*</b>When lifting <b>from levels 8 - 10</b> the underlying pigment is <b>yellow.</b><br><br>Blue base controls orange. <br>Green base also controls orange and reds. <br>Blue/Violet or Violet controls yellows. " + "<p>" )} </table><p> </p></th> </tr></table><p> <font color ="#CF0B14">1:1 RATIO</font> </p><p><i>*Only Mix Millilitres Together OR Grams OR Ounces</i></p><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Developer</td> <td width="228"><p><font color ="#FFFFFF">vol</font> Volume</p></td> <td width="100"><font color ="#FFFFFF">devmls11</font> mls.</td> <td width="180"><font color ="#FFFFFF">devg11</font> g.</td> <td width="183"><font color ="#FFFFFF">devoz11</font> oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">"N" Series (To cover grey)</td> <td width="227"><font color ="#FFFFFF">targetlevel </font>N (NW)</td> <td width="100"><font color ="#FFFFFF">nsmls</font> mls.</td> <td width="181"><font color ="#FFFFFF">nsg</font> g.</td> <td width="183"><font color="#FFFFFF">nsoz </font>oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Color 1 </td> <td width="227"><font color ="#FFFFFF">clr1</font></td> <td width="100"><font color ="#FFFFFF">clr1mls</font> mls.</td> <td width="181"><font color="#FFFFFF">clr1g </font>g.</td> <td width="183"><font color="#FFFFFF">clr1oz </font>oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Color 2 (Control, if any)</td> <td width="227"><font color ="#FFFFFF">clr2</font></td> <td width="100"><font color ="#FFFFFF">clr2mls</font> mls.</td> <td width="181"><font color="#FFFFFF">clr2g </font>g.</td> <td width="183"><font color="#FFFFFF">clr2oz </font>oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219"> </td> <td width="227"> </td> <td width="100"> </td> <td width="181"> </td> <td width="183"> </td> </tr></table><p> </p><p><font color ="#CF0B14">1:1.5 RATIO</font> </p><p><i>*Only Mix Millilitres Together OR Grams OR Ounces</i></p><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Developer</td> <td width="228"><font color ="#FFFFFF">vol</font> volume</td> <td width="110"><font color ="#FFFFFF">devmls115</font> mls</td> <td width="170"><font color ="#FFFFFF">devg115</font> g</td> <td width="183"><font color ="#FFFFFF">devoz115</font> oz</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">"N" Series (To cover grey)</td> <td width="227"><font color ="#FFFFFF">targetlevel </font>N (NW)</td> <td width="110"><font color ="#FFFFFF">nsmls </font>mls.</td> <td width="171"><font color="#FFFFFF">nsg </font>g.</td> <td width="183"><font color="#FFFFFF">nsoz </font>oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Color 1 </td> <td width="227"><font color ="#FFFFFF">clr1</font></td> <td width="110"><font color ="#FFFFFF">clr1mls</font> mls.</td> <td width="171"><font color="#FFFFFF">clr1g </font>g.</td> <td width="183"><font color="#FFFFFF">clr1oz </font>oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Color 2 (Control, if any)</td> <td width="227"><font color ="#FFFFFF">clr2</font></td> <td width="110"><font color="#FFFFFF">clr2mls </font>mls.</td> <td width="171"><font color="#FFFFFF">clr2g </font>g.</td> <td width="183"><font color="#FFFFFF">clr2oz </font>oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219"> </td> <td width="227"> </td> <td width="110"> </td> <td width="171"> </td> <td width="183"> </td> </tr></table><p> </p><p><font color ="#CF0B14">1:2 RATIO</font> </p><p><i>*Only Mix Millilitres Together OR Grams OR Ounces</i></p><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Developer</td> <td width="228"><font color="#FFFFFF">vol </font>volume</td> <td width="100"><font color ="#FFFFFF">devmls12</font> mls.</td> <td width="180"><font color ="#FFFFFF">devg12</font> g.</td> <td width="183"><font color="#FFFFFF">devoz12</font> oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">"N" Series (To cover grey)</td> <td width="227"><font color ="#FFFFFF">targetlevel</font> N (NW)</td> <td width="100"><font color ="#FFFFFF">nsmls</font> mls.</td> <td width="181"><font color ="#FFFFFF">nsg</font> g.</td> <td width="183"><font color="#FFFFFF">nsoz </font>oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Color 1 </td> <td width="227"><font color ="#FFFFFF">clr1</font></td> <td width="100"><font color ="#FFFFFF">clr1mls</font> mls.</td> <td width="181"><font color="#FFFFFF">clr1g </font>g.</td> <td width="183"><font color="#FFFFFF">clr1oz</font> oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Color 2 (Control, if any)</td> <td width="227"><font color ="#FFFFFF">clr2</font></td> <td width="100"><font color="#FFFFFF">clr2mls</font> mls.</td> <td width="181"><font color="#FFFFFF">clr2g</font> g.</td> <td width="183"><font color="#FFFFFF">clr2oz</font> oz.</td> </tr></table><table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219"> </td> <td width="227"> </td> <td width="100"> </td> <td width="181"> </td> <td width="183"> </td> </tr></table><p> </p><table width="950" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><p>Comments:</p></td> </tr> <tr> <td><font color="#FFFFFF">[#comments#]</font></td> </tr></table></script></p><p> </p></body></html>
  5. Good day, I have several variables with values assigned to them in this code. The problem that I am having is that when I run the script only the variable name shows up in the table and not the value assigned to it. Here is an example of what I'm talking about;<table width="950" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="219">Developer</td> <td width="228"><p><font color ="#FFFFFF"> vol </font> Volume</p></td> <td width="100"><font color ="#FFFFFF"> devmls11 </font> mls.</td> <td width="180"><font color ="#FFFFFF"> devg11 </font> g.</td> <td width="183"><font color ="#FFFFFF"> devoz11 </font> oz.</td> </tr></table>vol, devmls11, devg11, devoz11 are all variables with values assigned to them. Any ideas would be greatly appreciatedM~
  6. Thank you jesh, during the bandwidth blackout I was able to figure it out.I am now trying to re-direct to another html page when the cookie expires, any ideas?M~
  7. yeah but according to the code above shouldn't the cookie expire in 1 day? I set that cookie over 5 days ago and it still hasn't expired.My ultimate goal is to have a cookie expire in a given amount of days at which point the user will be re-directed to another page.I'm finding cookies to be a bit confusing. I can't find a problem with the above code, any ideas justsomeguy?M~
  8. These are applications that I wrote, javascript.if you like I can upload them and let you take a look at themM~
  9. Thank you for your quick response, I've found the cookie and it says that the cookie expires when the session ends. I'm assuming that means when I close the browser.M~
  10. I have a test cookie that I set to expire in one day and here it is 3 days later and it still hasn't expired.Cookies confuse me and I could use the help, thank you,Here's the cookieM~ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"> <title>Cookie1</title> <script type="text/javascript">function getCookie(c_name){if (document.cookie.length>0){c_start=document.cookie.indexOf(c_name + "=");if (c_start!=-1){ c_start=c_start + c_name.length+1 ;c_end=document.cookie.indexOf(";",c_start);if (c_end==-1) c_end=document.cookie.lengthreturn unescape(document.cookie.substring(c_start,c_end));} }return ""}function setCookie(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+1000*60*60*24*1);document.cookie=c_name+ "=" +escape(value)+((expiredays==null) ? "" : "; expires="+exdate.toGMTString());}function checkCookie(){cftrial=getCookie('cftrial');if (cftrial!=null && cftrial!=""){alert('Welcome again '+cftrial+' !');}else {cftrial=prompt('Thank you for trying my software for a 30 day trial, Please enter your NAME to continue:',"");if (cftrial!=null && cftrial!=""){setCookie('cftrial',cftrial,1);}}} </script></head><body onload="checkCookie()"><br></body></html>
  11. Thank you for your quick response SynookThe 2 buttons are located on an interface of a "menu" piece of software that I'm trying to create.M~
  12. Even though all of the applications are on my hard drive and I'm not even accessing a browser??
  13. Hey all, I have 2 buttons and each links to a different application. When I click on either button I get a "File download Security Warning" that asks if I want to "Run" or "Save" this file. When I click "Run" I get an "Unknown Application - Security Warning" that states that the publisher could not be verified and asks if I want to run this software. All of the software in question is software that I have written and is currently on my computer and the buttons point to these applications on my hard drive.Any ideas on how to verify or validate my software to not get these warnings??Here's the code for the buttons, maybe there's a problem there that I haven't seenThanxMarc <input type=button class="button_output" id="gen" value="ColorFormulator (GEN)" onclick="java script:window.location.href='C:/Program Files/ColorFormulator/ColorFormulatorV2.01.exe';"><input type=button class="button_output" id="lat" value="ColorFormulator (LAT)" onClick="java script:window.location.href=('C:/Program Files/ColorFormulator/ColorFormulatorV2.01Lat.exe');">
  14. MarcP

    cookie trouble

    thank you deirdre's dad, I was just getting ready to sign in and let you know that I found the problemI'm now working on a redirect so that when the cookie expires you will be redirected to a webpage or maybe an alert box that directs you to a webpage, any suggestions are always appreciatedM~
×
×
  • Create New...